Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is only the present invention's part embodiment, rather than whole embodiment.Embodiment based in the present invention, those of ordinary skills, not making the every other embodiment obtaining under creative work prerequisite, belong to the scope of protection of the invention.
Embodiment 1
The embodiment of the present invention provides a kind of method of control terminal application program operation, and as shown in Figure 1, the method comprises:
101, the note that receiving remote user sends.
102, detect in described note, whether to have defined TLV field.
Wherein, described TLV field is comprised of Tag value, Length value and Value value, and Value value can be both that numeral can be also character, and Length value represents the byte number that Value value takies.Length value and Value value are null values under default setting.
If 103 detect and have defined TLV field in described note, whether the Tag value of determining described TLV field is predefined indicated value, described indicated value is application extensions sign, and the Value value application programs being used to indicate by the TLV field corresponding with described Tag value defines.
Wherein, described indicated value be indivedual Tag values of appointment when predefine as the expansion sign of application program, what it was indicated is not certain application program, but the set that a plurality of application program forms.And Value value and application program are one to one, only have by the Value value under this indicated value and just can find corresponding application program.
If 104 determine that described Tag value is predefined indicated value, according to the Value value of TLV field corresponding to described Tag value, obtain the application program corresponding with the Value value of described TLV field, and carry out described application program.
In the embodiment of the present invention, only when receiving note, identify and control note, and need not move identification always, control note, so can reduce the power consumption of terminal; And the method and terminal can adopt the Value value in TLV field to carry out application program corresponding to predefine, because each Tag value can corresponding a plurality of Value values, and the definition of Value value in TLV field is not to be subject to byte limit, its number of applications that can define is also unrestricted, 65535 Tag values definition 65535 application programs corresponding with utilizing two bytes in prior art are compared, and have realized the expansion of the specified number of applications of TLV field.
Embodiment 2
The embodiment of the present invention provides the method for a kind of control terminal application program operation, the Value value judgement in the TLV field that terminal can comprise by note and start corresponding application program.Concrete, as shown in Figure 2, the method for this control terminal application program operation is:
201, the note that receiving remote user sends.
Wherein, it should be noted that, in receiving the process of note, the note receiving is not directly put into inbox, but before new message is put into inbox, carry out identification and the filtration of step 202 to 206.So just removed from and uninterruptedly read the power consumption of terminal that inbox is brought, thus the stand-by time of prolongation terminal.
202, detect in described note, whether to have defined TLV field; If detect in described note and defined TLV field, perform step 203; If detect in described note, there is no definition of T LV field, perform step 206.
Wherein, described TLV field is comprised of Tag value, Length value and Value value, and Value value can be both that numeral can be also character, and Length value represents the byte number that Value value takies.Length value and Value value are null values under default setting.And identifying by TLV field the method for controlling note can not affect short message content, and clear and definite differentiates normal note and special control note, thereby prevent that normal note from cannot read or control the chaotic problem losing efficacy of note.And, in a note, can comprise a plurality of TLV fields simultaneously, terminal system can be done step 203 to judgement and the operation of step 206 to each TLV field successively in this case.The method that sends a plurality of control informations by a note like this can improve the efficiency of control terminal application program operation.
Whether the Tag value of 203, determining described TLV field is predefined indicated value; If determine, described Tag value is predefined indicated value, performs step 204; If determine, described Tag value is not predefined indicated value, performs step 205.
Wherein, described indicated value is application extensions sign, is used to indicate by the Value value application programs corresponding with described Tag value and defines.When predefine, specify indivedual Tag values as the expansion sign of application program, what it was indicated is not certain application program, but the set that a plurality of application program forms.And Value value and application program are one to one, only have by the Value value under this indicated value and just can find corresponding application program.
204, according to the Value value of TLV field corresponding to described Tag value, obtain the application program corresponding with the Value value of described TLV field, and carry out described application program.
Wherein, describedly according to Value value corresponding to described Tag value, determine that the application program corresponding with described Value value can realize by following method, the method comprises:
The Value value corresponding according to described Tag value, inquires about the mapping table of predefined Value value and application program, obtains the application program corresponding with described Value value.Concrete, in terminal system, the mapping table of Value value of user's predefine and application program, allows the application deployment of carrying out in mapping table User Defined.Do not obtain the application program that user allows and be configured in mapping table and can not be remotely controlled, thereby make end application allow the selectable discretionary protection of user.The unique corresponding application program of each Value value, each Value value is defined by user oneself, and unique in mapping table, and Value value can be that numeral can be also character, the embodiment of the present invention does not limit this, can be other the form of expression yet.Wherein, the position of the mapping table storage of predefined Value value and application program can be the disk of terminal or an independent module in terminal, also can be external connection of storage card etc., be not limited only to above memory location, the embodiment of the present invention is enumerated other storable positions no longer one by one.When Value value represents in digital form, as shown in table 1, because integer is all generally 4 bytes, during programming, need not change, and use numeral can avoid terminal system to do the judgement of language set, so it is example that Value value can be take the integer of 4 bytes, thereby simplifies the decision process of Value value in programming.For example, the application program that in table 1, numerical value " 15 " is corresponding is "/disk/program/camera.exe "; The application program that numerical value " 11 " is corresponding is "/disk/program/fire.exe " etc.
| Value value |
Application program |
| 15 |
/disk/program/camera.exe |
| 11 |
/disk/program/fire.exe |
| 13 |
/disk/program/gps.exe |
| 78 |
/ disk/program/ wakes sleep .exe up |
Table 1
Now, the form of TLV field is as shown in table 2, and wherein indicated value (being Tag value) is also a predefined numeral, and by the agency of in step 203, comprises two bytes, for example 0x8001.
| Tag |
Length |
Value |
| 0x8001 |
4 |
78 |
| 0x8001 |
4 |
15 |
Table 2
For example, terminal is received a note, comprises TLV field in this note, and a TLV field of take in table 2 is example, and the Tag value in TLV field is 0x8001, and Value value is 78.Now, the method of control terminal application program operation is specially: when in the TLV field of carrying in detecting note, Tag value is 0x8001, obtain the Value value 78 in TLV field, and according to Value value 78 inquiry Value value and the lists of application program corresponding relation in TLV field, i.e. table 1, obtain the application program corresponding with Value value 78 "/disk/program/ wakes sleep .exe up ", and start this application program.Same, if terminal receives that the Value value in the TLV field of note is 15, obtain the application program corresponding with Value value 15 "/disk/program/camera.exe ", and start this application program.
It should be noted that; when Value value is digital form; because integer is all generally 4 bytes; avoid program to do the judgement of language set in order to use; therefore generally Value value is defined as to 4 bytes; certainly the embodiment of the present invention does not limit this yet, and the byte of any length all belongs to the scope of embodiment of the present invention protection.When Value value is defined as to 4 bytes, just nearly 232=4294967295 is individual for the application program number that it can be corresponding.
In addition, Value value can be not only numeral, can be also character.When user-defined Value value is the character string of random length, the mapping table of this Value value and application program is as shown in table 3, application program corresponding to character string " startcamera " is "/disk/program/camera.exe ", and application program corresponding to character string " poweroff1 " is "/disk/program/shutdown.exe " etc.
| Value value |
Application program |
| startcamera |
/disk/program/camera.exe |
| poweroff1 |
/disk/program/shutdown.exe |
Table 3
Now, the form of TLV field is as shown in table 4, and wherein Length value is the string length of Value value.
| Tag |
Length |
Value |
| 0x8001 |
11 |
startcamera |
| 0x8001 |
9 |
poweroff1 |
Table 4
For example, terminal is received a note, comprises TLV field in this note, and a TLV field of take in table 4 is example, and the Tag value in TLV field is 0x8001, and Value value is poweroff1.Now, the method of control terminal application program operation is specially: when terminal detects Tag value in the TLV field of carrying in note and is 0x8001, obtain the Value value poweroff1 in TLV field, and according to the Value value poweroff1 inquiry Value value in TLV field and the corresponding relation list of application program, i.e. table 3, obtain the application program "/disk/program/shutdown.exe " corresponding with Value value poweroff1, and start this application program.Same, if terminal receives that the Value value in the TLV field of note is startcamera, obtain the application program corresponding with startcamera "/disk/program/camera.exe ", and start this application program.
Known according to foregoing description; the definable numeral of Value value or character are very many; other people are very little by sending the probability moving with the correct control terminal application program of note of TLV field; so the application program that is allowed to move and be configured in mapping table also can be protected, and prevents stolen.
205, according to described Tag value, obtain the application program corresponding with described Tag value, and carry out described application program.
Wherein, through judgement with after filtering, be identified as the Tag value that does not belong to indicated value, the method for its control terminal application program operation is prior art, repeats no more here.
206, the note receiving is placed in inbox as general information, so that user checks.
In the embodiment of the present invention, only when receiving note, identify and control note, and need not move identification always, control note, so can reduce the power consumption of terminal.And, the method and terminal adopt the Value value in TLV field to carry out application program corresponding to predefine, because each Tag value can corresponding a plurality of Value values, and the definition of Value value in TLV field is not to be subject to byte limit, its number of applications that can define is also unrestricted, 65535 the Tag values corresponding with utilizing two bytes in prior art define 65535 application programs and compare, and have realized the expansion of the specified number of applications of TLV field.
And because control note by TLV field identification in this scheme, this TLV field does not belong to normal short message content, can be clear and definite by normal short message and control note and differentiate, so can not affect the reading of normal note.And one in note, can comprise a plurality of TLV fields, the method that sends a plurality of control informations by a note can improve the efficiency of control terminal application program operation simultaneously.
Further; because the Value value in mapping table and corresponding application program thereof are all User Defineds and allow operation; do not obtain the application program that user allows and be configured in mapping table and all can not be remotely controlled, so end application allows the selectable discretionary protection of user.Simultaneously; because the Value value in the mapping table in terminal system is by User Defined; and the definable numeral of Value value or character are very many; other people are very little by sending the probability moving with the correct control terminal application program of note of TLV field; so the application program that is allowed to move and be configured in mapping table also can be protected, and prevents stolen.
Embodiment 3
The embodiment of the present invention provides a kind of terminal, as shown in Figure 3, comprising: receiving element 31, detecting unit 32, determining unit 33, the first acquiring unit 34 and performance element 35.
Receiving element 31, the note sending for receiving remote user.
Detecting unit 32, for detection of whether having defined TLV field in described note.Wherein, described TLV field is comprised of Tag value, Length value and Value value, and Value value can be both that numeral can be also character, and Length value represents the byte number that Value value takies.Length value and Value value are null values under default setting.
Determining unit 33, while having defined TLV field for described note being detected at described detecting unit 32, whether the Tag value of determining described TLV field is predefined indicated value, described indicated value is application extensions sign, and the Value value application programs being used to indicate by the TLV field corresponding with described Tag value defines.Wherein, described indicated value be indivedual Tag values of appointment when predefine as the expansion sign of application program, what it was indicated is not certain application program, but the set that a plurality of application program forms.And Value value and application program are one to one, only have by the Value value under this indicated value and just can find corresponding application program.
The first acquiring unit 34, for when described determining unit 33 determines that described Tag value is predefined indicated value, obtains the application program corresponding with the Value value of described TLV field according to the Value value of TLV field corresponding to described Tag value.
Performance element 35, the described application program of obtaining for carrying out described the first acquiring unit 34.
Further, as shown in Figure 4, described the first acquiring unit 34 comprises:
Enquiry module 341, for according to the Value value of TLV field corresponding to described Tag value, inquires about the mapping table of predefined Value value and application program.It should be noted that, in terminal system, the mapping table of Value value of user's predefine and application program, allows the application deployment of carrying out in mapping table User Defined.Do not obtain the application program that user allows and be configured in mapping table and can not be remotely controlled, thereby make end application allow the selectable discretionary protection of user.The unique corresponding application program of each Value value, each Value value is defined by user oneself, and unique in mapping table, and Value value can be that numeral can be also character, the embodiment of the present invention does not limit this, can be other the form of expression yet.Wherein, the position of the mapping table storage of predefined Value value and application program can be the disk of terminal or a module in terminal, also can be external connection of storage card etc., be not limited only to above memory location, the embodiment of the present invention be enumerated other storable positions no longer one by one.
Acquisition module 342, for obtaining the application program corresponding with the Value value of described TLV field according to the Query Result of described enquiry module 341.
Further, as shown in Figure 5, described terminal also comprises: second acquisition unit 36.
Second acquisition unit 36, for when described determining unit 33 determines that described Tag value is not predefined indicated value, obtains the application program corresponding with described Tag value according to described Tag value.
Described performance element 35 also for, carry out the application program that described second acquisition unit 36 obtains.
It should be noted that, other of functional module that terminal comprises are described described in the embodiment of the present invention, can reference example 1 and the description of embodiment 2 corresponding parts, and the embodiment of the present invention will repeat no more herein.
In the embodiment of the present invention, only when receiving note, identify and control note, and need not move identification always, control note, so can reduce the power consumption of terminal.And, the method and terminal adopt the Value value in TLV field to carry out application program corresponding to predefine, because each Tag value can corresponding a plurality of Value values, and the definition of Value value in TLV field is not to be subject to byte limit, its number of applications that can define is also unrestricted, 65535 Tag values definition 65535 application programs corresponding with utilizing two bytes in prior art are compared, and have realized the expansion of the specified number of applications of TLV field.
And because control note by TLV field identification in this scheme, this TLV field does not belong to normal short message content, can be clear and definite by normal short message and control note and differentiate, so can not affect the reading of normal note.And one in note, can comprise a plurality of TLV fields, the method that sends a plurality of control informations by a note can improve the efficiency of control terminal application program operation simultaneously.
Further; because the Value value in mapping table and corresponding application program thereof are all User Defineds and allow operation; do not obtain the application program that user allows and be configured in mapping table and all can not be remotely controlled, so end application allows the selectable discretionary protection of user.Simultaneously; because the Value value in the mapping table in terminal system is by User Defined; and the definable numeral of Value value or character are very many; other people are very little by sending the probability moving with the correct control terminal application program of note of TLV field; so the application program that is allowed to move and be configured in mapping table also can be protected, and prevents stolen.
Through the above description of the embodiments, those skilled in the art can be well understood to the mode that the present invention can add essential common hardware by software and realize, and can certainly pass through hardware, but in a lot of situation, the former is better execution mode.Understanding based on such, the part that technical scheme of the present invention contributes to prior art in essence in other words can embody with the form of software product, this computer software product is stored in the storage medium can read, as the floppy disk of computer, hard disk or CD etc., comprise some instructions with so that computer equipment (can be personal computer, server, or the network equipment etc.) carry out the method described in each embodiment of the present invention.
The above; be only the specific embodiment of the present invention, but protection scope of the present invention is not limited to this, is anyly familiar with those skilled in the art in the technical scope that the present invention discloses; can expect easily changing or replacing, within all should being encompassed in protection scope of the present invention.Therefore, protection scope of the present invention should be as the criterion with the protection range of described claim.