The method of mobile communication terminal to search short message
Technical field
The invention belongs to the mobile communication technology field, relate in particular to a kind of method of mobile communication terminal to search short message.
Background technology
Function of receiving and sending short message is one of major function of existing mobile communication terminal, and most of user realizes the mutual of information by function of receiving and sending short message.Along with the memory capacity of mobile communication terminal constantly increases, its note that can store is also more and more, and a lot of user habits retain the note of receiving, in order to check in the future.
If the user need to check certain note of storing in mobile communication terminal, existing method is to search one by one.When the note of storing in user's mobile communication terminal is a lot, searches and waste time and energy one by one.Therefore, need a kind of technical scheme, make the user can search simply and easily the note in mobile communication terminal.
Summary of the invention
The object of the present invention is to provide a kind of method of mobile communication terminal to search short message, be intended to solve the problem of the note of storing in the fast finding mobile communication terminal.
The present invention is achieved in that a kind of method of mobile communication terminal to search short message, and described method comprises:
A, from the needs of input, search the related information of target note the information of searching of extracting, from the note of mobile communication terminal storage, searching and described note of searching information matches;
B, according to find with described note of searching information matches, form the matching sms list;
Wherein step a specifically comprises:
A1, the note of described mobile communication terminal storage is read in to structure chained list C1, from the receiver of input or addresser's telephone number or from the receiver of input or addresser's name or from the content keyword of input, extracting the described information of searching;
A2, travel through described structure chained list C1 by pointer, search and described note of searching information matches;
Wherein step b specifically comprises:
B1, being written in structural chain Table A 1 with described note of searching information matches of will finding, form the matching sms list;
The process that mobile communication terminal reads in structure chained list C1 by all notes of its storage is to carry out when boot system is initialized, thus initialization note data structure C 1.
More specifically, wherein before step a, also comprise:
A0, call the search short message submenu and show, the described needs of input are searched the related information of target note in the input frame of described search short message submenu.
More specifically, described related information is the telephone number that need to search receiver or the addresser of target note, and wherein step a specifically comprises:
A1, the note of described mobile communication terminal storage is read in to structure chained list C1, from the receiver of input or addresser's telephone number, extracting the described information of searching;
A2, travel through described structure chained list C1 by pointer, search and described note of searching information matches.
More specifically, described related information is the name that need to search receiver or the addresser of target note, and wherein step a specifically comprises:
A1, the note of described mobile communication terminal storage is read in to structure chained list C1, from the receiver of input or addresser's name, extracting the described information of searching;
A2, travel through described structure chained list C1 by pointer, search and described note of searching information matches.
More specifically, described related information is for searching the content keyword of target note, and wherein step a specifically comprises:
A1, the note of described mobile communication terminal storage is read in to structure chained list C1, from the content keyword of input, extracting the described information of searching;
A2, travel through described structure chained list C1 by pointer, search and described note of searching information matches.
More specifically, wherein step b specifically comprises:
B1, being written in structural chain Table A 1 with described note of searching information matches of will finding, form the matching sms list.
More specifically, wherein after step b, also comprise:
C, the described matching sms list of demonstration.
The present invention overcomes the deficiencies in the prior art, provide the search short message submenu to input for the user related information that need to search the target note, from the related information of target note of input, extracting the information of searching, then in the note of mobile communication terminal storage, travel through and search and the note of searching information matches, form the matching sms list and be shown to the user.Technical scheme provided by the invention makes related information that the user can need to search the target note by input from the note of mobile communication terminal storage, finding the target note, and simple and fast while searching is easy to operate.
The accompanying drawing explanation
Fig. 1 is the embodiment of the present invention " search short message " submenu schematic diagram.
Fig. 2 is embodiment of the present invention flow chart.
Embodiment
Technical scheme provided by the invention is: provide the search short message submenu to input for the user related information that need to search the target note, from the related information of target note of input, extracting the information of searching, then in the note of mobile communication terminal storage, travel through and search and the note of searching information matches, form the matching sms list and be shown to the user.
In order to make purpose of the present invention, technical scheme and advantage clearer, below in conjunction with drawings and Examples, the present invention is further elaborated.Should be appreciated that specific embodiment described herein, only in order to explain the present invention, is not intended to limit the present invention.
During specific implementation technical scheme provided by the invention, can in " note " menu of existing mobile communication terminal, increase " search short message " submenu.When the user need to search the note of storage, can call " note " menu, choose " search short message " submenu wherein and confirm, now system will start the search short message function of mobile communication terminal." search short message " submenu comprises two input frames, and as shown in Figure 1: the telephone number input frame is used for supplying the user to input addresser or receiver's telephone number; And the name input frame, be used for inputting addresser or name of addressee for the user.The user can input the addresser that need to search the target note/receiver's telephone number or addresser/name of addressee in this input frame, and clicks ACK button.
After the user completed the input of addresser/receiver's telephone number or addresser/name of addressee and confirms, at first mobile communication terminal read in structure chained list C1 by all notes of its storage, and the data structure of C1 is as follows:
struct tmp_C1_diag_t {
uint8 ver; // version number
Uint8 type; // type of this diagram " READ ", " NOT READ ", " SEND ", " NOT SEND " unsigned char* phone_number; // telephone number
Unsigned char* name; // name
Unsigned char* time; // short message the time
Unsigned char* data; // storage short message
Tmp_C1_diag_t* next; // sequence pointer
Tmp_C1_diag_t* tmp_next; // temporary order increases with pointer
};
tmp_C1_diag_t* C1
Then the information input_str(that the addresser who inputs by input frame from the user/receiver's telephone number or addresser/name of addressee, extraction need to be searched is hereinafter referred to as the information of searching), then by pointer, travel through structure chained list C1, to be written in structural chain Table A 1 with the note record of searching information matches, form the matching sms list, then show the matching sms list.
Above-mentioned mobile communication terminal also can carry out the process that all notes of its storage are read in structure chained list C1 when boot system is initialized, thus initialization note data structure C 1.
The user is when searching note, can in the input frame of " search short message " submenu, input addresser/receiver's telephone number, system, using the telephone number of user input as the note of searching information searching and matching, forms the matching sms list by lookup result; The user also can input addresser/name of addressee in the inputting interface of " search short message " submenu, system, using the name of user input as the note of searching information searching and matching, forms the matching sms list by lookup result; Perhaps, the user can input addresser/receiver's telephone number and addresser/name of addressee simultaneously, and the note that system is all mated telephone number and name, as matching result, forms the matching sms list.
In addition, the user is when searching the target note, except can in the input frame of " search short message " submenu, inputting addresser/receiver's telephone number or addresser/name of addressee, in " search short message " submenu, can also design other input frame, for the user, input and need to search other related informations of target note, as short message content keyword input frame.Like this, the user can input the content keyword that need to search the target note in this input frame, and system also can be searched the note of the content keyword match of the target note of inputting with the user in the note of storage, form the matching result list.Concrete realizes that principle is identical with above-mentioned telephone number searching or name look-up, and those of ordinary skills can be without contrasting and implement through creative work, and this does not repeat.
The flow chart of the embodiment of the present invention as shown in Figure 2, comprises the steps:
1, calling " search short message " submenu shows;
2, input need to be searched the addresser of target note/receiver's telephone number or addresser/name of addressee in the input frame of " search short message " submenu, and clicks and confirm;
3, from the needs of input, search the addresser of target note/receiver's telephone number or addresser/name of addressee the information of searching of extracting;
4, all notes of mobile communication terminal storage are read in to structure chained list C1;
5, by pointer, travel through structure chained list C1, search and the note of searching information matches;
6, will list in structural chain Table A 1 with the note record of searching information matches, form the matching sms list, then show the matching sms list.
The foregoing is only preferred embodiment of the present invention, not in order to limit the present invention, all any modifications of doing within the spirit and principles in the present invention, be equal to and replace and improvement etc., within all should being included in protection scope of the present invention.