Summary of the invention
The problem that technical solution of the present invention solves is that contact person's acquiescence head portrait Single-issue, contact person's acquiescence head portrait have when a plurality of, for the contact head image of each contact store association causes taking problem and the same contact person inconsistent problem of contact head image in different communication terminals that memory space and transinformation increase.
For addressing the above problem, technical solution of the present invention provides a kind of method that contact head image is set, and it is characterized in that, comprising:
By Generating Random Number, from the image collection of contact head image, choose image, described Generating Random Number is associated with contact person's information, wherein, contact person's information comprises at least one in contact person's telephone number, name, contact address and E-mail address;
The head portrait that is contact person by selected image setting.
Optionally, describedly by Generating Random Number, from the image collection of contact head image, choose image and comprise:
According to A=F (N) %K, obtain the index value of image, wherein, the index value that A is image, N represents contact person's information, F (N) represents the mathematical operation relevant to described contact person's information, and % is complementation computing, and K is the total number of images in described image collection;
Index value according to described image is chosen image from described image collection.
Optionally, the telephone number that described contact person's information is contact person, described F (N) is student movement calculation that each bit digital in described telephone number is counted.
Optionally, described contact person's information is contact person's name, described F (N) is for to do mathematical operation to the corresponding numeral of each word in described name, or described F (N) is for to do mathematical operation to each alphabetical corresponding numeral in the phonetic of described name.
Optionally, described contact person's information comprises contact person's telephone number and name, and described F (N) is for to do mathematical operation to the corresponding numeral of each word in each bit digital in described telephone number and described name.
Optionally, described contact person's information is contact person's contact address, described F (N) calculates for the student movement of counting of each bit digital that described contact address is comprised, or described F (N) is that the corresponding numeral of each word that described contact address is comprised is done mathematical operation, or described F (N) is that each bit digital and the corresponding numeral of each word that described contact address is comprised done mathematical operation.
Optionally, the E-mail address that described contact person's information is contact person, described F (N) is for to do mathematical operation to each alphabetical corresponding numeral in described E-mail address.
Optionally, described corresponding numeral is the decimal number that corresponding binary code converts to.
Optionally, described mathematical operation comprises summation, asks at least one in poor and quadrature.
Optionally, described Generating Random Number comprises congruence method, gets any one in middle method and Yu Weifa.
Optionally, the described method that contact head image is set also comprises: described contact person's head portrait is updated in the application module of the head image information that stores described contact person.
The corresponding above-mentioned method that contact head image is set, technical solution of the present invention also provides a kind of device that contact head image is set, and described device comprises:
Choose unit, be suitable for from the image collection of contact head image, choosing image by Generating Random Number, described Generating Random Number is associated with contact person's information, and wherein, contact person's information comprises at least one in contact person's telephone number, name, contact address and E-mail address;
Setting unit, is suitable for the described selected image setting in unit of choosing for contact person's head portrait.
Optionally, also comprise: memory cell, is suitable for storing the image collection of described contact head image.
Optionally, described in, choosing unit comprises:
Index value obtains subelement, be suitable for obtaining according to A=F (N) %K the index value of image, wherein, A is the index value of image, N represents contact person's information, F (N) represents the mathematical operation relevant to described contact person's information, and % is complementation computing, and K is the total number of images in described image collection;
Choose subelement, be suitable for from described image collection, choosing image according to the index value of described image.
Compared with prior art, technical scheme of the present invention has the following advantages:
By the Generating Random Number of the information association with contact person, from the image collection of contact head image, choose image as contact person's head portrait, because different contact persons' information is different, therefore different contact persons' head portrait is also different, user can directly be distinguished different contact persons from contact person's head image information, for the same contact person in the communication terminal of different model, different operating system, still can keep unified contact head image, effectively improve contact person's identification.
Due to when every subsystem starts, contact person's head image information is that the Generating Random Number of the information association based on contact person obtains, and that is to say the head image information that can not need for contact store acquiescence, has therefore saved the memory space of system.And, at transmission associated person information, can not reduce transinformation with redundant information (as the head image information of acquiescence) yet, improve systematic function.
By the Generating Random Number of the information association with contact person, from the image collection of default contact head image, choose image as contact person's head portrait, for same contact person, after communication terminal system restarts, or in different communication terminal systems, as long as use same Generating Random Number, definite head portrait is identical, can effectively solve after communication terminal system restarts or in different communication terminal systems the problem of the head portrait that same contact person is corresponding different.
For with described communication terminal system in the associated modules of same contact person, described in each module, same contact person's head portrait can be set to the head portrait being generated by described Generating Random Number, in modules, the unification of same contact person's head portrait is same head portrait, realize the unification of the head image information of the same contact person between each module, improve Administrative Contact's efficiency, improve user experience.
Embodiment
In prior art, the contact person's of the acquiescence of the system of some communication terminal head portrait only has one, but the development along with communication terminals such as mobile phones, user has been not content with single acquiescence contact head image, do not have the contact of special designated contact head portrait to be set to per capita same acquiescence head portrait user, user is in the process of using, for these a plurality of contact person users cannot be directly from contact person's head image information directly to these contact persons intuitively, distinguish easily.The contact person's of the acquiescence of the system of some communication terminal head portrait has a plurality of, can be for not have the contact person of special designated contact head portrait that acquiescence head portrait is set at random from the contact person's of a plurality of acquiescences of system head portrait, but also there are some problems, for example, for same contact person, if the acquiescence head portrait arranging for contact person is not preserved to the intrinsic information of contact person for this reason, each when system reopens, system can be again the random contact head image arranging of contact person for this reason, it is different that the contact person's that system resets acquiescence head portrait is probably restarted set acquiescence head portrait before with system, this gives in user's use procedure and brings inconvenience.And if the acquiescence head portrait for contact person setting is preserved to the intrinsic information of contact person for this reason, when the information of this contact head image of storage, the ROM(Read Only Memory that the system that need to take is certain, read-only memory) or RAM(Random Access Memory, random access memory) space, when if the contact head image of system storage is a lot, now can take a large amount of memory spaces, system resource is caused to certain waste.If using contact person's acquiescence head portrait as the intrinsic information of this contact person, when associated person information is transmitted, the contact head image information of acquiescence may be gone out as the intrinsic communication of this contact person, for example, using this contact person's information when business card sends to other people, if the acquiescence head portrait that is its distribution by system sends to other people together, obviously be problematic, because the acquiescence head portrait that system is its distribution is not this contact person's true head image information, is need to not be transferred to other people with card information.
For addressing the above problem, technical solution of the present invention provides a kind of method that contact head image is set, and comprises the steps: from the image collection of contact head image, to choose image by Generating Random Number; The head portrait that is contact person by selected image setting.
Can in system, set in advance the image collection of a contact head image, the total number of images in described image collection, the size of image can be set accordingly according to the systematic function of communication terminal, user's request etc.
Described Generating Random Number can adopt multiple Generating Random Number of the prior art, and the method that generates random number is a lot, and the method for common generation random number has congruence method, gets middle method and Yu Weifa etc., in this no limit.
With Generating Random Number, producing random number is current general method, and its feature is that the internal memory taking is few, and speed is fast, and the random number producing is uniform.Due to Generating Random Number feature, make the random number generating within the scope of certain numerical value by Generating Random Number can think separate, and equally distributed, for a plurality of contact persons that head portrait need to be set, adopting said method to arrange in the process of contact head image, each head portrait in the image collection of default contact head image is uniform as the probability of contact head image.
Adopting Generating Random Number to generate in the process of random number, characteristic parameter information that can be using some information of contact person as described Generating Random Number, make described Generating Random Number be associated with contact person's information, described contact person's information can be at least one information in contact person's the information such as telephone number, name, contact address and E-mail address.
Can be by being associated with contact person's the Generating Random Number of information and the head portrait that the image collection of predefined contact head image obtains contact person.
For example, can be index value corresponding to each image setting in the image collection of contact head image in advance, by formula (1), calculate the index value of contact head image in the image collection of predefined contact head image again, according to the index value of described image, from described image collection, choose image.The head portrait that is described contact person by selected image setting.
A=F(N)%K (1)
Wherein, the index value that A is image, N represents contact person's information, and F (N) represents the mathematical operation relevant to described contact person's information, and % is complementation computing, and K is the total number of images in described image collection.
In formula (1), described F (N) represents the mathematical operation relevant to described contact person's information, described mathematical operation can be digital summation, ask differ from and the mathematical operation such as quadrature at least one.Described mathematical operation can for distich be people information with numeral, as in telephone number, contact address with house number etc. perform mathematical calculations; Also can be that the decimal number converting to as corresponding binary code performs mathematical calculations to the corresponding numeral of the nonnumeric part in contact person's information (as word, letter, symbol etc.); Can also be that the numeral in contact person's information and the corresponding numeral of nonnumeric part are performed mathematical calculations.Described binary code can be ANSI(American National Standards Institute, ANSI) code, ASCII(American Standard Code for Information Interchange, U.S. information interchange standard) code, Unicode code (Universal Multiple-Octet Coded Character Set, Unicode) etc.
The Generating Random Number of the information by contact person is can be from described image collection random chooses the head portrait that different image setting is described different contact persons, and then described contact person's head portrait can also be updated in all application modules of the head image information that stores described contact person, for instance, if according to contact person's telephone number information, by Generating Random Number, from the image collection of default contact head image, choose an image, be set to described contact person's head portrait, can be by other module that contains this associated person information in system (for example, SMS module, card information etc.) head portrait of the contact person in is all set to selected head portrait.
The method that the present invention arranges contact person's head portrait is there is no special designated contact head portrait for user, and described by the contact head image of system institute default setting, user is the head portrait of designated contact specially also, for example user specifies the photo that contains contact person stored in use system as this contact person's head portrait, and now contact person's head portrait is the specified contact head image of user.
Pass through said method, for same contact person, after communication terminal system restarts, or in different communication terminal systems, as long as use same Generating Random Number, because the image collection of default contact head image is fixing, definite head portrait is identical, can effectively solve after communication terminal system restarts or in different communication terminal systems the problem of the head portrait that same contact person is corresponding different.Head image information can be stored in as contact person's information in system space, when needs show contact head image information, only needing in the image collection of default contact head image, to choose image according to the index value of the image corresponding to contact head image shows, like this when containing a fairly large number of contact person, owing to can each contact person's head image information being stored, can effectively reduce the occupancy in space, improve systematic function.
In the contact head image process arranging at the application module to containing this associated person information, can be directly with the index value of the corresponding image of described contact person that obtains, in the image collection of predefined contact head image, choose head portrait for showing, do not need to calculate again the index value that obtains image, do not need the information using the head portrait of acquisition as contact person to store yet, effectively minimizing system takes up room, and in each application module, the unification of same contact person's head portrait is same head portrait, realize the unification of the head image information of the same contact person between each application module, improve Administrative Contact's efficiency, improving user experiences.
For making above-mentioned purpose of the present invention, feature and a little can more becoming apparent, below in conjunction with drawings and Examples, technical solution of the present invention is described further.
Embodiment mono-
In the present embodiment, take telephone number that contact person's information is contact person describes as example.
Fig. 1 is the schematic flow sheet of the method that contact head image is set that provides of the present embodiment, first performs step S101, the image collection of default contact head image.
Set in advance the image collection of a contact head image, the size of described image collection can be set accordingly according to the systematic function of communication terminal, user's request etc., in the present embodiment, suppose that the image collection of presetting contact head image has 16 different images.
Perform step S102, obtain contact person's telephone number N.
User is when preserving a contact person; conventionally can input contact person's the information such as telephone number, name, E-mail address; the content that system can Real-time Obtaining user be inputted; in this step; obtain the telephone number information that user inputs, concrete acquisition methods can adopt several different methods well-known to those skilled in the art to obtain.
Execution step S103, the characteristic parameter information using contact person's telephone number as described Generating Random Number, obtains the index value A of the image mating with described contact person by Generating Random Number.
In the present embodiment, the characteristic parameter information using contact person's telephone number as described Generating Random Number, adopts formula (1) to obtain the index value of the image mating with described contact person.Particularly, each parameter information in formula (1) is as follows: the index value of the image that A is described image collection, N is contact person's telephone number, and F (N) is for to make summation operation to each bit digital in described contact person's telephone number, and K is the total number of images in described image collection.
Take contact person's telephone number N as 13912345678 being example, and F (N) represents that F (N) is 1+3+9+1+2+3+4+5+6+7+8 to all numeral summations in described contact person's telephone number, and result is 49.Due in step S101, the image collection of default contact head image has 16 images, so the index value A of the corresponding head portrait of contact person that telephone number is 13912345678 can represent with 49 divided by 16 for 49%16(%, result remainder number), the value that is A is 1, and the index value that obtains the image that mates with this contact person is 1.
Step S104, the image setting that is A by described index value is that telephone number is the contact person's of N head portrait.
The head portrait that index value in the image collection of default contact head image is 1 is set to the head portrait that telephone number is 13912345678 contact person, take and number 0~15 image in image collection and be numbered, get be numbered 1 image namely the 2nd image as this contact person's image.
Step S105, is updated to described contact person's head portrait in the application module of the head image information that stores described contact person.
The head portrait that contains the contact person in other application module of this associated person information in system all can be set to the image that in the image collection of default contact head image, index value is 1, when each application module need to show that telephone number is 13912345678 contact person's head portrait, directly according to the index value of the head portrait corresponding to contact person, in the image collection of default contact head image, choose image and show.
Embodiment bis-
In the present embodiment, take name that contact person's information is contact person describes as example.
Fig. 2 is the schematic flow sheet of the method that contact head image is set that provides of the embodiment of the present invention, first performs step S201, the image collection of default contact head image.Please refer to step S101, in the present embodiment, suppose that the image collection of default contact head image has 16 different images.
Perform step S202, obtain contact person's name.
In the process of user input, the content that system can Real-time Obtaining user be inputted, in this step, obtains the name that user inputs, and concrete acquisition methods can adopt several different methods well-known to those skilled in the art to obtain.
Perform step S203, obtain described contact person's the corresponding binary code of name, the corresponding binary code of described contact person's name is converted to decimal number.
The corresponding binary code of name that those skilled in the art can obtain described contact person by multiple habitual practice of the prior art, for example, the corresponding binary code of Zhang San is D5, C5, C8 and FD, and converting decimal number to is 213,197,200 and 253.
Step S204, the decimal number that the corresponding binary code of contact person's name is converted to, as the characteristic parameter information of described Generating Random Number, obtains the index value A of the image mating with described contact person by Generating Random Number.
In the present embodiment, the decimal number that the corresponding binary code of contact person's name is converted to, as the characteristic parameter information of described Generating Random Number, adopts formula (1) to obtain the index value of the image mating with described contact person.Particularly, each parameter information in formula (1) is as follows: the index value of the image that A is described image collection, the decimal number that the corresponding binary code of name that N is contact person converts to, F (N) makes summation operation for each numeral in the decimal number that the corresponding binary code of described contact person's name is converted to, and K is the total number of images in described image collection.
The decimal number N that the contact person's who obtains in step S203 the corresponding binary code of name converts to is 213,197,200 and 253, F (N) represents the decimal number summation that the corresponding binary code of described contact person's name is converted to, be that F (N) is 213+197+200+253, result is 863.Due in step S201, the image collection of default contact head image has 16 images, so the index value A of the corresponding head portrait of contact person that name is Zhang San can be 863%16, the value of A is 15, and the index value that obtains the image that mates with described contact person is 15.
Execution step S205, the image setting that is A by described index value is contact person's head portrait.
The head portrait that index value in the image collection of default contact head image is 15 is set to name for Zhang San's contact person's head portrait, take and number 0~15 image in image collection and be numbered, get be numbered 15 image namely the 16th image as this contact person's image.
Execution step S206, is updated to described contact person's head portrait in the application module of the head image information that stores described contact person.
The head portrait that contains the contact person in other application module of this associated person information in system all can be set to the image that in the image collection of default contact head image, index value is 15, when each application module need to show that name is Zhang San's contact person's head portrait, directly according to the index value of the head portrait corresponding to contact person, in the image collection of default contact head image, choose image and show.
It should be noted that, in above-described embodiment one and embodiment bis-, using respectively contact person's telephone number and contact person's the name characteristic parameter information as Generating Random Number, to the corresponding digital information of contact person's telephone number or contact person's name, adopt formula (1) can obtain the index value of the image mating with described contact person, and then choose contact person's head portrait.In other embodiments, also can be using contact person's telephone number and name all as the characteristic parameter information of Generating Random Number, also can adopt a kind of information in contact person's information such as telephone number, name, contact address and E-mail address or several information with the combinations such as numeral, word, letter and symbol as the characteristic parameter information of Generating Random Number.And algorithm also can adopt other Generating Random Numbers of the prior art, and is not limited to the shown Generating Random Number of formula (1).
The method that contact head image is set that corresponding technical solution of the present invention provides, technical solution of the present invention also provides a kind of device that contact head image is set, and comprises and chooses unit and setting unit.
The described unit of choosing is suitable for from the image collection of contact head image, choosing image by Generating Random Number, described Generating Random Number is associated with contact person's information, wherein, contact person's information comprises at least one in contact person's telephone number, name, contact address and E-mail address.
Described setting unit is suitable for the described selected image setting in unit of choosing for contact person's head portrait.
In specific embodiment, the described device that contact head image is set can also comprise: memory cell, is suitable for storing the image collection of described contact head image.
The described unit of choosing may further include index value and obtains subelement and choose subelement.
Described index value obtains the index value that subelement is suitable for obtaining according to A=F (N) %K image, wherein, A is the index value of image, N represents contact person's information, F (N) represents the mathematical operation relevant to described contact person's information, % is complementation computing, and K is the total number of images in described image collection.
The described subelement of choosing is suitable for from described image collection, choosing image according to the index value of described image.
Although the present invention discloses as above, the present invention is not defined in this.Any those skilled in the art, without departing from the spirit and scope of the present invention, all can make various changes or modifications, so protection scope of the present invention should be as the criterion with claim limited range.