Specific embodiment
In order to which technical problems, technical solutions and advantageous effects to be solved by the present invention are more clearly understood, below in conjunction with
Accompanying drawings and embodiments, the present invention will be described in further detail.It should be appreciated that specific embodiment described herein is only used
To explain the present invention, it is not intended to limit the present invention.
The embodiment of the invention provides a kind of method of attaching of text, the executing subject of this method can be electronic equipment,
Fig. 1 is the flow chart of the method for attaching of text provided in an embodiment of the present invention, as shown in Figure 1, the method comprising the steps of S110 is extremely
Step S140.
Step S110 obtains the content of text of duplication.
The content of text of duplication is usually that user determines that user is adjustable by adjusting the radio check mark in document
The position of two radio check marks in document, the text among two radio check marks are the content of text of duplication.
Step S120 parses content of text, determines the text type of content of text.
The feature that can analyze the text when parsing text content, determines text type by feature.Such as text
This content is to intert 2 dashes among 11 bit digitals either 11 bit digitals, then the corresponding text type of this feature is phone
Number;If including " .com ", " .cn " or other domain suffix in content of text, the corresponding text type of this feature is
Domain name, further, can continue to segment by domain name includes " .weibo.com " in text type, such as text, then the spy
Levying corresponding text type is microblogging.
Step S130, the determining and matched application program of text type.
A kind of text type may can be applied to one or more application programs, therefore, can will search with
The matched all application programs of text type are supplied to user's selection, for example, telephone number can match dialing, short message, communication
Programs, the microblogging such as record and wechat can match the programs such as browser and microblogging client.
Step S140 starts application program, and content of text is pasted in the application, generates and shows preview interface.
It is determining existing for local, and after the application program of matched text type, can call matched using journey
Sequence, and execute paste operation.If only one application program be it is matched, start this application program;If there is more
A application program be it is matched, then start this multiple application program.
Through the embodiment of the present invention, can with the text type of automatic identification content of text, call matched application program into
Row is pasted, and is generated preview graph and selected for user.User need to only select required application program, eliminate manual switching application
The step of program and paste text, improves the convenience of paste operation.
The preferred embodiment of the present invention provides a kind of method of attaching of text, and this method can be embodiment illustrated in fig. 1
Preferred implementation.This method comprises:
Step S110 obtains the content of text of duplication.
The content of text of duplication is usually that user determines that user is adjustable by adjusting the radio check mark in document
The position of two radio check marks in document, the text among two radio check marks are the content of text of duplication.
Step S120 parses content of text, determines the text type of content of text.
The feature that can analyze the text when parsing text content, determines text type by feature.Wherein, literary
This content can be number, text or webpage link address etc., and the embodiment of the present invention is not specifically limited herein.Such as text
Content is to intert 2 dashes among 11 bit digitals either 11 bit digitals, then the corresponding text type of this feature is phone number
Code;If including " .com ", " .cn " or other domain suffix in content of text, the corresponding text type of this feature is domain
Name, further, can continue to segment by domain name includes " .weibo.com " in text type, such as text, then this feature
Corresponding text type is microblogging.
Step S130, the determining and matched application program of text type.
A kind of text type may can be applied to one or more application programs, therefore, can will search with
The matched all application programs of text type are supplied to user's selection, for example, telephone number can match dialing, short message, communication
Programs, the microblogging such as record and wechat can match the programs such as browser and microblogging client.
It can be determined and the matched application program of text type, such as the power by checking each application program there are many mode
Limit information, or pass through preset mapping table etc..
Fig. 2 is the flow chart of the method provided in an embodiment of the present invention that matching application program is searched for by authority information.It should
Method is a kind of preferred implementation of step S130, as shown in Fig. 2, this method comprises:
Step S1301 reads local application list, includes multiple application programs in local application list.
All application programs for including on the electronic equipment are had recorded in local application list.
Step S1302 reads the authority information of each application program respectively.
Every kind of application program all has authority information, such as the application program having reads telephone number, some application programs
Read memorandum etc..In the electronic equipment having, authority information is further divided into default privilege information and user's authorization privilege
Information, such as the default privilege information of application program is to read telephone number and read geographical location, user prohibits reading ground
Position is managed, then user's authorization privilege information is to read telephone number.The present embodiment can read default privilege information, that is, pass through
Default privilege information knows that each application program has the ability for handling which information.
Step S1303, judges whether text type matches authority information.
If it is determined that the text type of duplication text, such as text type is telephone number, then can decide whether
Have telephone number that can match authority information, compared, determine that " read telephone number " can match, i.e., reading telephone number this
One authority information may use telephone number.
Step S1304 determines that text type matching authority information is corresponding after determining text type matching authority information
Application program.
After determining authority information involved by text type, the authority information of each application program is read one by one, so that it is determined that
Which application program includes the authority information, such as determines that text type is telephone number, determines that the authority information being related to is to read
After taking telephone number, that is, the authority information of each application program can be read, judges which application program needs to read telephone number.It needs
The application program for reading telephone number is exactly and the matched application program of content of text.
Fig. 3 is the flow chart of the method provided in an embodiment of the present invention that matching application program is searched for by mapping table.
This method is another preferred implementation of step S130, as shown in figure 3, this method comprises:
Step S1305, reads preset mapping table, includes pair of text type and application program in mapping table
It should be related to.
Mapping table can be what relevant hardware manufacturers or software producer provided, remember in the mapping table
The corresponding application program of various text types is recorded, further, which can provide the calling of each application program
The information such as interface.Such as the mapping table directly has recorded the corresponding application program of telephone number, comprising: dialing, is led at short message
News record and wechat etc..
Step S1306, search application program corresponding with text type in mapping table.
After determining corresponding application program, it can be searched for by above-mentioned local application list or calling interface
Application program.Such as it includes dialing, short message, address list and wechat that mapping table, which has recorded corresponding application program, then can
To check that locally there are which above-mentioned application programs by local application list;Or it can be by checking each calling interface
The case where, the unobstructed application program of calling interface information is to be present in the application program of local and matched text type.
Step S140 starts application program, and content of text is pasted in the application, generates and shows preview interface.
It is determining existing for local, and after the application program of matched text type, can call matched using journey
Sequence, and execute paste operation.If only one application program be it is matched, start this application program;If there is more
A application program be it is matched, then start this multiple application program.
Fig. 4 is the flow chart for the method that calling application program provided in an embodiment of the present invention executes paste operation, this method
It is a kind of preferred implementation of step S140, is a kind of processing mode to multiple matching reference programs.As shown in figure 4, should
Method includes:
Step S1401 starts the multiple and matched application program of text type from the background.
Matched application program may be it is multiple, this step is starting all matched application programs from the background.
Step S1402 executes paste operation in multiple application programs, generates preview interface.
Duplication text is pasted in the search box or input frame of each application program, generates corresponding preview interface, such as will
Telephone number is input in dialing, address list and wechat, and in dial-up program, preview interface is the telephone number directly displayed;
In address list, preview interface is the corresponding contact information of the telephone number;In wechat, preview interface is the telephone number
Corresponding WeChat ID information.When the search box in each application program pastes duplication text, can also be directly initiated after stickup
Search result is shown in preview interface, user is made more intuitively to see difference in different preview interfaces by function of search
Search result, shown and subsequent operation so that the application program that is more suitable for of user's selection be facilitated to carry out foreground.
Step S1403 shows preview interface on foreground.
After the preview interface for the program that is applied, preview interface is shown on foreground, multiple matched application programs can
To generate preview graph in a manner of tiling or is partly overlapping.
Step S1404 chooses operation to preview interface if detecting, the preview interface chosen is corresponding using journey
Sequence switches to foreground and is shown.
User can choose operation to determine required application program in preview graph by click etc., and electronic equipment is detecting
To after choosing, which can be switched into foreground.
Preferably, it in order to reduce unrelated application program to the occupancy of resource, can be cut in the application program for needing user
After shifting to foreground, unchecked preview interface is closed, and removing the corresponding application program of unchecked preview interface from the background.
Further, it can permit user by specific operation, application program be retained in backstage, it is preset detecting
After operation, retaining corresponding application program from the background.For example, include 4 application programs in the preview graph that step S1403 is generated,
User makes the movement slided to the left to first application program, carries out click determination to second application program, then can incite somebody to action
First application program remains in backstage, and second application program is switched to foreground, by third and the 4th application
Program is removed from backstage.By the implementation, the convenience of paste operation can be further improved.
In a kind of preferred implementation, it can allow user while operating multiple application programs by way of split screen.It should
Implementation may comprise steps of:
Step 1: if choosing multiple preview interfaces, screening into multiple screen areas, the preview interface each chosen
A corresponding screen area.
Step 2: respectively showing the corresponding application program of the preview interface respectively chosen in corresponding screen area.
Through the embodiment of the present invention, can with the text type of automatic identification content of text, call matched application program into
Row is pasted, and is generated preview graph and selected for user.User need to only select required application program, eliminate manual switching application
The step of program and paste text, improves the convenience of paste operation.
The embodiment of the invention provides a kind of sticker of text, which can be used to execute the stickup of above-mentioned text
Method, Fig. 5 are the structural block diagrams of the sticker of text provided in an embodiment of the present invention, as shown in figure 5, the device includes obtaining
Module 510, parsing module 520, determining module 530 and starting module 540.
Obtain the content of text that module 510 is used to obtain duplication.
Parsing module 520 determines the text type of content of text for parsing content of text.
Determining module 530 is for the determining and matched application program of text type.
Content of text is pasted in the application for starting application program, generates and show preview by starting module 540
Interface.
Preferably, determining module 530 includes: the first reading unit, locally applied for reading local application list
It include multiple application programs in program listing;Second reading unit, for reading the authority information of each application program respectively;Judgement
Unit, for judging whether text type matches authority information;Determination unit, for determining text type matching authority information
Afterwards, the corresponding application program of text type matching authority information is determined.
Preferably, determining module 530 includes: third reading unit, for reading preset mapping table, corresponding relationship
It include the corresponding relationship of text type and application program in table;Search unit is used to search in mapping table and text class
The corresponding application program of type.
Preferably, starting module 540 includes: start unit, for starting the multiple and matched application of text type from the background
Program;Application unit generates preview interface for executing paste operation in multiple application programs;Display unit, for preceding
Platform shows preview interface;Switch unit, for detect to preview interface choose operation after, preview interface pair that will choose
The application program answered switches to foreground and is shown.
Preferably, starting module 540 further include: clearing cell, for closing unchecked preview interface, and it is clear on backstage
Except the corresponding application program of unchecked preview interface.
Preferably, switch unit includes: split screen subelement, for screening into more after choosing multiple preview interfaces
A screen area, the corresponding screen area of the preview interface each chosen;Subelement is shown, for pre- by what is respectively chosen respectively
The corresponding application program in interface of looking at is shown in corresponding screen area.
Through the embodiment of the present invention, can with the text type of automatic identification content of text, call matched application program into
Row is pasted, and is generated preview graph and selected for user.User need to only select required application program, eliminate manual switching application
The step of program and paste text, improves the convenience of paste operation.
Fig. 6 is the structural block diagram for the electronic equipment that another embodiment of the present invention provides.Electronic equipment 600 shown in fig. 6
It include: at least one processor 601, memory 602, at least one network interface 604 and other users interface 603.Electronics is set
Various components in standby 600 are coupled by bus system 605.It is understood that bus system 605 is for realizing these components
Between connection communication.Bus system 605 further includes power bus, control bus and state letter in addition to including data/address bus
Number bus.But for the sake of clear explanation, various buses are all designated as bus system 605 in Fig. 6.
Wherein, user interface 603 may include display, keyboard or pointing device (for example, mouse, trace ball
(trackball), touch-sensitive plate or touch screen etc..
It is appreciated that the memory 602 in the embodiment of the present invention can be volatile memory or nonvolatile memory,
It or may include both volatile and non-volatile memories.Wherein, nonvolatile memory can be read-only memory (Read-
Only Memory, ROM), programmable read only memory (Programmable ROM, PROM), the read-only storage of erasable programmable
Device (Erasable PROM, EPROM), electrically erasable programmable read-only memory (Electrically EPROM, EEPROM) or
Flash memory.Volatile memory can be random access memory (Random Access Memory, RAM), be used as external high
Speed caching.By exemplary but be not restricted explanation, the RAM of many forms is available, such as static random access memory
(Static RAM, SRAM), dynamic random access memory (Dynamic RAM, DRAM), Synchronous Dynamic Random Access Memory
(Synchronous DRAM, SDRAM), double data speed synchronous dynamic RAM (Double Data Rate
SDRAM, DDRSDRAM), enhanced Synchronous Dynamic Random Access Memory (Enhanced SDRAM, ESDRAM), synchronized links
Dynamic random access memory (Synchlink DRAM, SLDRAM) and direct rambus random access memory (Direct
Rambus RAM, DRRAM).The memory 602 of system and method described herein is intended to include but is not limited to these and arbitrarily its
It is suitble to the memory of type.
In some embodiments, memory 602 stores following element, executable modules or data structures, or
Their subset of person or their superset: operating system 6021 and application program 6022.
Wherein, operating system 6021 include various system programs, such as ccf layer, core library layer, driving layer etc., are used for
Realize various basic businesses and the hardware based task of processing.Application program 6022 includes various application programs, such as media
Player (Media Player), browser (Browser) etc., for realizing various applied business.Realize the embodiment of the present invention
The program of method may be embodied in application program 6022.
In embodiments of the present invention, by the program or instruction of calling memory 602 to store, specifically, can be application
The program or instruction stored in program 6022, processor 601 are used to obtain the content of text of duplication;Content of text is parsed, is determined
The text type of content of text;The determining and matched application program of text type;Start application program, content of text is pasted onto
In application program, generates and show preview interface.
The method that the embodiments of the present invention disclose can be applied in processor 601, or be realized by processor 601.
Processor 601 may be a kind of IC chip, the processing capacity with signal.During realization, the above method it is each
Step can be completed by the integrated logic circuit of the hardware in processor 601 or the instruction of software form.Above-mentioned processing
Device 601 can be general processor, digital signal processor (Digital Signal Processor, DSP), dedicated integrated electricity
Road (Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field
Programmable Gate Array, FPGA) either other programmable logic device, discrete gate or transistor logic,
Discrete hardware components.It may be implemented or execute disclosed each method, step and the logic diagram in the embodiment of the present invention.It is general
Processor can be microprocessor or the processor is also possible to any conventional processor etc..In conjunction with institute of the embodiment of the present invention
The step of disclosed method, can be embodied directly in hardware decoding processor and execute completion, or with the hardware in decoding processor
And software module combination executes completion.Software module can be located at random access memory, and flash memory, read-only memory may be programmed read-only
In the storage medium of this fields such as memory or electrically erasable programmable memory, register maturation.The storage medium is located at
The step of memory 602, processor 601 reads the information in memory 602, completes the above method in conjunction with its hardware.
It is understood that embodiments described herein can with hardware, software, firmware, middleware, microcode or its
Combination is to realize.For hardware realization, processing unit be may be implemented in one or more specific integrated circuit (Application
Specific Integrated Circuits, ASIC), digital signal processor (Digital Signal Processing,
DSP), digital signal processing appts (DSP Device, DSPD), programmable logic device (Programmable Logic
Device, PLD), field programmable gate array (Field-Programmable Gate Array, FPGA), general processor,
In controller, microcontroller, microprocessor, other electronic units for executing the application function or combinations thereof.
For software implementations, the skill of this paper can be realized by executing the module (such as process, function etc.) of this paper function
Art.Software code is storable in memory and is executed by processor.Memory can in the processor or outside the processor
It realizes in portion.
Optionally, the determining operation with the matched application program of text type of processor 601 includes: to read locally applied journey
Sequence table includes multiple application programs in local application list;The authority information of each application program is read respectively;Judgement text
Whether this type matches authority information;After determining text type matching authority information, determine that text type matches authority information
Corresponding application program.
Optionally, the determination of processor 601 includes: that reading is preset corresponding with the operation of the matched application program of text type
Relation table includes the corresponding relationship of text type and application program in mapping table;Search in mapping table with text
The corresponding application program of type.
Optionally, processor 601 starts application program, and content of text is pasted in the application, generates and shows pre-
Look at interface operation include: backstage start it is multiple with the matched application program of text type;It is executed in multiple application programs viscous
Patch operation, generates preview interface;Preview interface is shown on foreground;Operation is chosen to preview interface if detecting, will be chosen
The corresponding application program of preview interface switch to foreground and shown.
Optionally, processor 601 carries out showing it the corresponding application program of the preview interface chosen is switched to foreground
Afterwards, it is also used to: closing unchecked preview interface, and removing the corresponding application program of unchecked preview interface from the background.
Optionally, if processor 601, which is detected, chooses operation to preview interface, the preview interface chosen is corresponding
If it includes: to choose multiple preview interfaces that application program, which switches to the operation that foreground is shown, multiple screens are screened into
Region, the corresponding screen area of the preview interface each chosen;Respectively by the corresponding application program of the preview interface respectively chosen
It is shown in corresponding screen area.
Electronic equipment 600 can be realized each process that electronic equipment is realized in previous embodiment, to avoid repeating, here
It repeats no more.
Electronic equipment provided in an embodiment of the present invention can call matched answer with the text type of automatic identification content of text
It is pasted with program, and generates preview graph and selected for user.User need to only select required application program, eliminate manually
The step of switching application program and paste text, improves the convenience of paste operation.
It is apparent to those skilled in the art that for convenience of description and succinctly, only with above-mentioned each function
Can unit division progress for example, in practical application, can according to need and by above-mentioned function distribution by different functions
Unit is completed, i.e., the internal structure of device is divided into different functional unit or module, with complete it is described above whole or
Person's partial function.Each functional unit in embodiment can integrate in one processing unit, and it is independent to be also possible to each unit
It is physically present, can also be integrated in one unit with two or more units, above-mentioned integrated unit both can be using hard
The form of part is realized, can also be realized in the form of software functional units.In addition, the specific name of each functional unit is also
For the ease of mutually distinguishing, the protection scope being not intended to limit this application.The specific work process of unit in above-mentioned apparatus, can
With with reference to the corresponding process in aforementioned device embodiment, details are not described herein.
Those of ordinary skill in the art may be aware that list described in conjunction with the examples disclosed in the embodiments of the present disclosure
Member and algorithm steps can be realized with the combination of electronic hardware or computer software and electronic hardware.These functions are actually
It is implemented in hardware or software, the specific application and design constraint depending on technical solution.Professional technician
Described function can be realized using different device to each specific application, but this realization is it is not considered that exceed
The scope of the present invention.
In embodiment provided by the present invention, it should be understood that disclosed device and device can pass through others
Mode is realized.For example, the apparatus embodiments described above are merely exemplary, for example, the division of module or unit, only
For a kind of logical function partition, there may be another division manner in actual implementation, such as multiple units or components can combine
Or it is desirably integrated into another system, or some features can be ignored or not executed.Another point, shown or discussed phase
Coupling or direct-coupling or communication connection between mutually can be through some interfaces, the INDIRECT COUPLING or communication of device or unit
Connection can be electrical property, mechanical or other forms.
Unit may or may not be physically separated as illustrated by the separation member, shown as a unit
Component may or may not be physical unit, it can and it is in one place, or may be distributed over multiple networks
On unit.It can some or all of the units may be selected to achieve the purpose of the solution of this embodiment according to the actual needs.
It, can also be in addition, the functional units in various embodiments of the present invention may be integrated into one processing unit
It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list
Member both can take the form of hardware realization, can also realize in the form of software functional units.
It, can if integrated unit is realized in the form of SFU software functional unit and when sold or used as an independent product
To be stored in a computer readable storage medium.Based on this understanding, the technical solution essence of the embodiment of the present invention
On all or part of the part that contributes to existing technology or the technical solution can be with the shape of software product in other words
Formula embodies, which is stored in a storage medium, including some instructions are used so that a calculating
It is real that machine equipment (can be personal computer, server or the network equipment etc.) or processor (processor) execute the present invention
Apply all or part of the steps of each embodiment device of example.And storage medium above-mentioned includes: USB flash disk, mobile hard disk, read-only storage
Device (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or light
The various media that can store program code such as disk.
The above embodiments are merely illustrative of the technical solutions of the present invention, rather than its limitations;Although with reference to the foregoing embodiments
Invention is explained in detail, those skilled in the art should understand that: it still can be to aforementioned each implementation
Technical solution documented by example is modified or equivalent replacement of some of the technical features;And these modification or
Replacement, the spirit and scope of each embodiment technical solution of the embodiment of the present invention that it does not separate the essence of the corresponding technical solution.
The above is merely preferred embodiments of the present invention, be not intended to limit the invention, it is all in spirit of the invention and
Made any modifications, equivalent replacements, and improvements etc., should all be included in the protection scope of the present invention within principle.