Summary of the invention
The embodiment of the present application provides clone method and the device of a kind of information, to reduce the difficulty of user's replicon informationDegree.
In order to solve above-mentioned technical problem, the embodiment of the present application discloses following technical scheme:
A kind of clone method of information, including:
Obtaining current information, described information is made up of different sub-information;
Judging whether there is the sub-information meeting preset rules in current information, described preset rules includes different sub-informationComposition rule;
If it does, labelling or extract this sub-information;
When receiving the duplicate instructions of this sub-information, perform to replicate the operation of this sub-information.
Preferably, described when receiving the duplicate instructions of this sub-information, perform to replicate the operation of this sub-information, including:
According to institute's labelling or the sub-information of extraction, generate sub-information reproduction button;
When described reproduction button receives duplicate instructions, replicate corresponding sub-information.
Preferably, described when reproduction button receives duplicate instructions, replicate corresponding sub-information, including:
Judge the quantity of sub-information corresponding to described reproduction button;
If quantity is 1, replicate this sub-information;
If quantity is more than 1, generating sub-information copy list, described sub-information copy list includes described reproduction buttonCorresponding all sub-information;
When the sub-information of in described copy list receives duplicate instructions, replicate this sub-information.
Preferably, described when reproduction button receives duplicate instructions, replicate corresponding sub-information, including:
Replicate and the whole sub-information corresponding to described reproduction button.
Preferably, described preset rules includes telephone number rule, network address rule, mailbox rule and icon rule, is given birth toThe reproduction button become includes telephone number reproduction button, network address reproduction button, mailbox reproduction button and icon reproduction button.
A kind of reproducing unit of information, including:
Acquisition module is used for, and obtains current information, and described information is made up of different sub-information;
Judge module is used for, it is judged that whether there is the sub-information meeting preset rules, described preset rules bag in current informationInclude the composition rule of different sub-information;
Labelling or extraction module are used for, and when there is the sub-information meeting preset rules in described information, labelling or extraction shouldSub-information;
First replication module is used for, and when receiving the duplicate instructions of this sub-information, performs to replicate the operation of this sub-information.
Preferably, described first replication module includes:
Reproduction button signal generating unit is used for, and according to institute's labelling or the sub-information of extraction, generates sub-information reproduction button;
First copied cells is used for, and when described reproduction button receives duplicate instructions, replicates corresponding sub-information.
Preferably, described first copied cells includes:
Judgment sub-unit is used for, it is judged that the quantity of the sub-information corresponding to described reproduction button;
First replicon unit is used for, and when the quantity of described sub-information is 1, replicates this sub-information;
Copy list generates subelement and is used for, and when the quantity of described sub-information is more than 1, generates sub-information copy list,Described sub-information copy list includes all sub-information corresponding to described reproduction button;
Second replicon unit is used for, and when the sub-information of in described copy list receives duplicate instructions, replicates this sonInformation.
Preferably, described first copied cells includes:
3rd replicon unit is used for, and replicates and the whole sub-information corresponding to described reproduction button.
Preferably, described preset rules includes telephone number rule, network address rule, mailbox rule and icon rule, is given birth toThe reproduction button become includes telephone number reproduction button, network address reproduction button, mailbox reproduction button and icon reproduction button.
From above technical scheme, the embodiment of the present application provides
The beneficial effect of the application includes: first obtain current information, then judge whether current information exists meet pre-If the sub-information of rule;If it does, labelling or extract this sub-information;And when receiving the duplicate instructions of this sub-information,Perform to replicate the operation of this sub-information.Use the present processes and device, can labelling or extraction one the most in the informationMolecular information, and manually select sub-information without user, thus reduce the difficulty of user's replicon information.
Detailed description of the invention
The embodiment of the present application provides the clone method of a kind of information and device, replicates one reducing user in whole informationThe difficulty of molecular information.
First the clone method of the information of the embodiment of the present application is illustrated, as it is shown in figure 1, the method at least includes:
Step S11: obtaining current information, described information is made up of different sub-information;
In actual applications, the sub-information such as telephone number, network address, mailbox and icon can be there is in an information.
Step S12: judging whether there is the sub-information meeting preset rules in current information, described preset rules includes notComposition rule with sub-information;If it does, perform step S13;If it does not, perform step S15;
In the embodiment of the present application, preset rules can include that telephone number composition rule, network address composition rule, mailbox formRule and icon composition rule.And utilize above-mentioned telephone number composition rule, network address composition rule, mailbox composition rule andIcon composition rule can judge whether to exist in current information telephone number, network address, mailbox and icon successively.
In the embodiment of the present application, telephone number composition rule may particularly include Mobile Directory Number composition rule and fixing electricityWords number composition rule;And Mobile Directory Number composition rule can be specially 11 bit digital information, and first three of digital informationOr first four meet China Mobile, alliance and the standard of China Telecom of China.Fixed telephone number composition rule can be speciallyThe digital information of area code numeral (3-4 position)+live count word (7-8 position)+extension number numeral (1-4 position).
In the embodiment of the present application, network address composition rule can be specially with http: // or https: // start, with .comOr the English character string of .cn ending.Mailbox composition rule are the character strings that can specially meet * * *@* * * .*** form.
In the embodiment of the present application, specifically with the form of regular expression, telephone number composition rule, network address composition can be describedRule and mailbox composition rule.
In the embodiment of the present application, the regular expression describing fixed telephone number can be:
/^(0[0-9]{2,3}\-)?([2-9][0-9]{6,7})+(\-[0-9]{1,4})?$/;
The regular expression describing Mobile Directory Number can be:
/(^0?[1][3458][0-9]{9}$)/;
The regular expression describing mailbox can be:
/^[a-zA-Z0-9_\.\-]+\@([a-zA-Z0-9\-]+\.)+[a-zA-Z0-9]{2,4}$/;
The regular expressions describing network address can be:
/^((https|http|ftp|rtsp|mms)?:\\/\\/)?(([0-9]{1,3}.){3}[0-9]{1,3}|([0-9a-z_!~* ' ()-]+ .) * ([0-9a-z] [0-9a-z-] { 0,61})?[0-9a-z]\\.[a-z]{2,6})(:[0-9]{1,5})?[\\/a-zA-Z0-9\\/]{0,}(\\/[0-9a-zA-Z\\.\\?-&=] { 0, })?$/;
Step S13: labelling or extract described sub-information;
In the embodiment of the present application, if extracting described sub-information, can be by the sub-information of extraction with Key-Value (keywordArray) form store.
Still continue to use the example above, when the sub-information extracted includes the sub-information such as telephone number, network address, mailbox and icon,Respectively using telephone number, network address, mailbox and icon as keyword, corresponding telephone number that storage is extracted, network address,The array such as mailbox and icon.
Step S14: when receiving the duplicate instructions of this sub-information, performs to replicate the operation of this sub-information.
Step S15: perform to replicate the operation of whole information.
Therefore, in the embodiment of the present application, first obtain current information, then judge whether current information existsMeet the sub-information of preset rules;If it does, labelling or extract this sub-information;And receiving the duplication of this sub-informationDuring instruction, perform to replicate the operation of this sub-information.Use the present processes, can labelling or extraction one the most in the informationParton information, and manually select sub-information without user, thus reduce the difficulty of user's replicon information.
In another possible embodiments of the application, as in figure 2 it is shown, step S14 in above-mentioned all embodiments, can haveBody includes:
Step S21: according to institute's labelling or the sub-information of extraction, generate sub-information reproduction button;
In the embodiment of the present application, preset rules includes telephone number rule, network address rule, mailbox rule and icon ruleDeng, therefore the sub-information of institute's labelling or extraction includes telephone number, network address, mailbox and icon etc., is further generatedSub-information reproduction button include that telephone number reproduction button, network address reproduction button, mailbox reproduction button and icon replicateButton etc..Additionally, based on user in actual applications, the demand of whole information is also replicated, therefore, except generating son letterOutside the reproduction button of breath, also should generate the reproduction button of a whole information.
Step S22: when described reproduction button receives duplicate instructions, replicates corresponding sub-information.
Still continue to use the example above, when telephone number reproduction button receives duplicate instructions, replicate labelling from current informationOr the telephone number extracted;And when network address reproduction button receives duplicate instructions, replicate labelling or carry from current informationThe network address taken;In like manner, when mailbox reproduction button receives duplicate instructions, replicate labelling or extraction from current informationMailbox;And when the reproduction button of whole information receives duplicate instructions, replicate whole information.
Therefore, use said method, the sub-information such as phone, network address, icon and mailbox can be replicated in current information.
In another possible embodiments of the application, as shown in Figure 8, such as current information is " the growth road of a peopleUpper per minute all along with these decisions: to do important work at once, be also to continue with brush microblogging brush Semen Sojae Preparatum;Rise in the morningBed is run, and has breakfast, or sleeps a hour more;Weekend evenings, reads a book at home, still meets a phone and brotherYoungster go out and drink, http://VIP.com, 137888384522 ".When user performs the operation replicating this information,In the embodiment of the present application, can automatically utilize above-mentioned telephone number composition rule, labelling or extract phone in current informationNumber 137888384522;Utilize network address composition rule, labelling or extract network address in current informationhttp://VIP.com.Then can generate a telephone number reproduction button according to the telephone number extracted and network address (i.e. to scheme" duplication phone " in 8) and network address reproduction button (i.e. " duplication network address " in Fig. 8), user is multiple the most for convenienceMake whole information, generate the button (i.e. " replicating all " in Fig. 8) of the whole information of duplication.Accordingly, Yong HudianHit reproduction button, corresponding information can be replicated in current information.
In the another possible embodiments of the application, as it is shown on figure 3, step S22 in above-mentioned all embodiments comprises the steps that
Step S31: judge the quantity of sub-information corresponding to described reproduction button;Quantity such as fruit information is 1, holdsRow step S32, otherwise, performs step S33;
In actual applications, an information can have multiple telephone number, network address or mailbox, therefore replicate when telephone numberWhen button, network address reproduction button or mailbox reproduction button receive duplicate instructions, need to first determine whether with this button corresponding toThe quantity of sub-information, if 1, can directly replicate this sub-information, if greater than 1, generates sub-information replicated columnsTable, so that user can a specifically chosen sub-information replicate.
In the embodiment of the present application, when corresponding two telephone numbers of a telephone number reproduction button, it is respectively137888384522 and 010-8943899-6028, then when this telephone number reproduction button receives duplicate instructions, instituteThe sub-information copy list generated, can the most as shown in Figure 9.
Step S32: replicate this sub-information;
Step S33: generate sub-information copy list, described sub-information copy list includes that described reproduction button is correspondingAll sub-information;
Step S34: when the sub-information of in described copy list receives duplicate instructions, replicate this sub-information.
Therefore, when an information includes the sub-information such as multiple telephone number, network address, mailbox or icon, useSaid method, a sub-information in reproducible many sub-information.
In another possible embodiments of the application, step S22 in above-mentioned all embodiments, may also include that
Replicate and the whole sub-information corresponding to described reproduction button.
As it was previously stated, in the embodiment of the present application, reproduction button can corresponding many sub-information (such as: a network addressReproduction button can corresponding multiple network address), then when this reproduction button receives duplicate instructions, replicate this reproduction button institute rightThe whole sub-information answered.
And when user is when performing paste operation, be separated the information replicated processing, in order to user distinguishes differentSub-information, such as, can add a space, to distinguish different sub-information between different sub-information.Such as, a network address replicatesButton corresponding two network address, respectively http://www.Alibaba.com and http://www.AliExpress.com,So after user clicks on this reproduction button, when performing the operation pasting this network address, in user interface, the network address of display can be:http://www.Alibaba.com http://www.AliExpress.com.Now, user can on a user interface,Directly delete the network address being not required to.
Therefore, use said method, also can realize from whole information, replicate a part of sub-information.
By the description of above embodiment of the method, those skilled in the art is it can be understood that can borrow to the applicationThe mode helping software to add required general hardware platform realizes, naturally it is also possible to by hardware, but a lot of in the case of the formerIt it is more preferably embodiment.Based on such understanding, prior art is made by the technical scheme of the application the most in other wordsThe part of contribution can embody with the form of software product, and this computer software product is stored in a storage medium,Including some instructions with so that a computer equipment (can be personal computer, server, or the network equipment etc.)Perform all or part of step of method described in each embodiment of the application.And aforesaid storage medium includes: read-only storageThe various media that can store program code such as device (ROM), random access memory (RAM), magnetic disc or CD.
Corresponding with said method, disclosed herein as well is the reproducing unit of a kind of information, as shown in Figure 4, at least wrapInclude:
Acquisition module 41 is used for, and obtains current information, and described information is made up of different sub-information;
In actual applications, an information can include the sub-information such as telephone number, network address, mailbox and icon.
Judge module 42 is used for, it is judged that whether there are the sub-information meeting preset rules, described default rule in current informationThen include the composition rule of different sub-information;
In the embodiment of the present application, described preset rules includes telephone number rule, network address rule, mailbox rule and iconRule etc..
Labelling or extraction module 43 are used for, when described information exists meet the sub-information of preset rules time, labelling or carryTake this sub-information;
First replication module 44 is used for, and when receiving the duplicate instructions of this sub-information, performs to replicate the behaviour of this sub-informationMake.
Therefore, in the embodiment of the present application, first acquisition module 41 can obtain current information, then judge module42 can determine whether whether there is the sub-information meeting preset rules in current information;If it does, labelling or extraction module 43Can labelling or extract this sub-information;And first replication module 44 can perform multiple when receiving the duplicate instructions of this sub-informationMake the operation of this sub-information.Use the device of the application, can in the information can labelling or extract a part of sub-information automatically,And manually select sub-information without user, thus reduce the difficulty of user's replicon information.
In another possible embodiments of the application, as it is shown in figure 5, the first replication module 44 in above-mentioned all embodimentsComprise the steps that
Reproduction button signal generating unit 51 is used for, and according to institute's labelling or the sub-information of extraction, generates sub-information reproduction button;
In the embodiment of the present application, preset rules includes telephone number rule, network address rule, mailbox rule and icon ruleDeng, therefore the sub-information of institute's labelling or extraction includes telephone number, network address, mailbox and icon etc., is further generatedSub-information reproduction button include that telephone number reproduction button, network address reproduction button, mailbox reproduction button and icon replicateButton etc..
First copied cells 52 is used for, and when described reproduction button receives duplicate instructions, replicates corresponding sub-information.
In the embodiment of the present application, multiple when telephone number reproduction button, network address reproduction button, mailbox reproduction button or iconWhen button processed receives duplicate instructions, current information replicates corresponding telephone number, network address, mailbox or icon.
Therefore, use said apparatus, the sub-information such as phone, network address, icon and mailbox can be replicated in current information.
In the another possible embodiments of the application, as shown in Figure 6, the first copied cells 52 in above-mentioned all embodimentsIncluding:
Judgment sub-unit 61 is used for, it is judged that the quantity of the sub-information corresponding to described reproduction button;
First replicon unit 62 is used for, and when the quantity of described sub-information is 1, replicates this sub-information;
Copy list generates subelement 63 and is used for, and when the quantity of described sub-information is more than 1, generates sub-information and replicatesList, described sub-information copy list includes all sub-information that described reproduction button is corresponding;
Second replicon unit 64 is used for, and when the sub-information of in described copy list receives duplicate instructions, replicatesThis sub-information.
Therefore, when an information includes the sub-information such as multiple telephone number, network address, mailbox or icon, useSaid apparatus, a sub-information in reproducible many sub-information.
In another possible embodiments of the application, as it is shown in fig. 7, the first copied cells 52 in above-mentioned all embodimentsMay also include that
3rd replicon unit 71 is used for, and replicates and the whole sub-information corresponding to described reproduction button.
In the embodiment of the present application, when a reproduction button receives duplicate instructions, that replicates corresponding to this reproduction button is completeThe sub-information in portion.
Therefore, use said apparatus, also can realize from whole information, replicate a part of sub-information.
It should be noted that in this article, such as the relational terms of " first " and " second " or the like be used merely to byOne entity or operation separate with another entity or operating space, and not necessarily require or imply these entities or behaviourRelation or the order of any this reality is there is between work.And, term " includes ", " comprising " or it is anyOther variants are intended to comprising of nonexcludability so that include the process of a series of key element, method, article orEquipment not only includes those key elements, but also includes other key elements being not expressly set out, or also includes for this mistakeThe key element that journey, method, article or equipment are intrinsic.In the case of there is no more restriction, statement " include oneIt is individual ... " key element that limits, it is not excluded that there is also in including the process of described key element, method, article or equipmentOther identical element.
The above is only the detailed description of the invention of the application, makes to skilled artisans appreciate that or realize the application.Multiple amendment to these embodiments will be apparent to one skilled in the art, and as defined herein oneAs principle can realize in other embodiments in the case of without departing from spirit herein or scope.Therefore, this ShenPlease be not intended to be limited to the embodiments shown herein, and be to fit to and principles disclosed herein and features of noveltyThe widest consistent scope.