Summary of the invention
In view of this, the embodiment of the present invention provides a kind of method and the device that operate text, to the operation by Voice command text, can carry out the operation of text without the need to exiting current application program in other application program, make the simple, convenient of text, Consumer's Experience is good.
First aspect, provides a kind of method operating text, comprising:
When receiving phonetic order, according to source location information and first operation information of the instruction of described phonetic order institute, in the first application of current operation, choose text corresponding to described source location information and operation corresponding to described first operation information is performed to described text;
According to destination locations information and second operation information of the instruction of described phonetic order institute, call the second application and operation corresponding to described second operation information is performed to the position of described text in described second application that described destination locations information is corresponding.
In the implementation that the first is possible, described receive phonetic order after, described method also comprises:
Described phonetic order is identified, obtains the source location information of described phonetic order institute instruction, destination locations information, the first operation information and the second operation information.
In conjunction with the first possible implementation of first aspect or first aspect, in the implementation that the second is possible, describedly in the first application of current operation, choose text corresponding to described source location information, comprising:
According to the text scale in described first application, determine the position of text in described first application that the source location information of described phonetic order institute instruction is corresponding;
Choose the text of described position.
In conjunction with first aspect or the first possible implementation of first aspect or the possible implementation of the second of first aspect, in the implementation that the third is possible, described current operation first application in choose text corresponding to described source location information before, described method also comprises:
Detect the instruction authority of the sender of described phonetic order;
If the sender of described phonetic order possesses instruction authority, then perform the operation that described first operation information is corresponding.
In conjunction with the third possible implementation of first aspect or the first possible implementation of first aspect or the possible implementation of the second of first aspect or first aspect, in the 4th kind of possible implementation, the described operation corresponding to described first operation information of described text execution, comprising:
According to the first operation information of described phonetic order institute instruction, the described text chosen is copied in internal memory.
In conjunction with the 4th kind of possible implementation of first aspect, in the 5th kind of possible implementation, the described destination locations information according to the instruction of described phonetic order institute and the second operation information, call the second application and operation corresponding to described second operation information performed to the position of described text in described second application that described destination locations information is corresponding, comprising:
According to the second operation information of described phonetic order institute instruction, call described second and apply and make described second application running background;
From internal memory, read described text, and described text is sent in described second application of running background, to perform operation corresponding to described second operation information to the position of described text in described second application that described destination locations information is corresponding;
Wherein, paste operation is operating as described in.
Second aspect, provides a kind of device operating text, comprising:
Choosing unit, for when receiving phonetic order, according to the source location information of described phonetic order institute instruction, in the first application of current operation, choosing text corresponding to described source location information;
First operating unit, for the first operation information according to the instruction of described phonetic order institute, performs operation corresponding to described first operation information to described text;
Second operating unit, for according to the destination locations information of described phonetic order institute instruction and the second operation information, call the second application and operation corresponding to described second operation information is performed to the position of described text in described second application that described destination locations information is corresponding.
In the implementation that the first is possible, described device also comprises:
Recognition unit, for identifying described phonetic order, obtains the source location information of described phonetic order institute instruction, destination locations information, the first operation information and the second operation information.
In conjunction with the first possible implementation of second aspect or second aspect, in the implementation that the second is possible, described in choose unit and comprise:
Determining unit, for according to the text scale in described first application, determines the position of text in described first application that the source location information of described phonetic order institute instruction is corresponding;
Selection unit, for selecting the text of described position.
In conjunction with second aspect or the first possible implementation of second aspect or the possible implementation of the second of second aspect, in the implementation that the third is possible, described device also comprises:
Detecting unit, for detecting the instruction authority of the sender of described phonetic order;
Judging unit, if possess instruction authority for the sender of described phonetic order, then performs the operation that described first operation information is corresponding.
In conjunction with the third possible implementation of second aspect or the first possible implementation of second aspect or the possible implementation of the second of second aspect or second aspect, in the 4th kind of possible implementation, described first operating unit comprises:
Copied cells, for the first operation information according to the instruction of described phonetic order institute, is copied to the described text chosen in internal memory.
In conjunction with second aspect or the first possible implementation of second aspect or the possible implementation of the second of second aspect or the third possible implementation of second aspect or the 4th kind of possible implementation of second aspect, in the 5th kind of possible implementation, described second operating unit comprises:
Call unit, for the second operation information according to the instruction of described phonetic order institute, calls described second and applies and make described second application running background;
Reading unit, for reading described text from internal memory;
Transmitting element, for being sent in described second application of running background by described text;
Application unit, for performing operation corresponding to described second operation information to the position of described text in described second application that described destination locations information is corresponding;
Wherein, paste operation is operating as described in.
Adopt and provided by the inventionly a kind ofly operate the method for text and the technical scheme of device, by the instruction of phonetic order, can carry out the operation of text without the need to exiting current application program in other application program, this is simple, convenient, and Consumer's Experience is good.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, be clearly and completely described the technical scheme in the embodiment of the present invention, obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.
Fig. 1 is a kind of method flow diagram operating an embodiment of the method for text provided by the invention.As shown in Figure 1, the method comprises the following steps:
Step S101, when receiving phonetic order, according to source location information and first operation information of the instruction of described phonetic order institute, in the first application of current operation, choose text corresponding to described source location information and operation corresponding to described first operation information is performed to described text.
In the present embodiment, the terminal devices such as mobile phone front stage operation be the program of the first application, namely current operation is the program of the first application, what show in the program of this first application is text etc., and in the terminal devices such as now more and more intelligent mobile phone, all be provided with voice assistant class software, such running software is on backstage.
User intends the text of certain position in the first application to be sent in the second application to process, but do not exit the first application of current operation, therefore, user starts voice assistant class software, send phonetic order, this phonetic order comprises the source location information of the text chosen, destination locations information, the text chosen is carried out to the first operation information of which kind of operation in the first application of current operation and the text chosen carried out to the second operation information of which kind of operation in the second application.
When terminal device receives this phonetic order, according to source location information and first operation information of this phonetic order institute instruction, in the first application of current operation, choose text corresponding to this source location information and operation corresponding to the first operation information is performed to the text.
Step S102, according to destination locations information and second operation information of the instruction of described phonetic order institute, calls the second application and performs operation corresponding to described second operation information to the position of described text in described second application that described destination locations information is corresponding.
In this step, terminal device is current still operates in the first application, and according to the destination locations information of phonetic order institute instruction and the second operation information, call the second application, operated in backstage, in the second application, determine the position that destination locations information is corresponding, in the position determined, operation corresponding to the second operation information is performed to the text chosen.
According to a kind of method operating text that one embodiment of the invention provides, by the instruction of phonetic order, can carry out the operation of text without the need to exiting current application program in other application program, this is simple, convenient, and Consumer's Experience is good.
Fig. 2 is a kind of method flow diagram operating another embodiment of the method for text.As shown in Figure 2, the method comprises:
Step S201, when receiving phonetic order, identifies described phonetic order, obtains the source location information of described phonetic order institute instruction, destination locations information, the first operation information and the second operation information.
In the present embodiment, the terminal devices such as mobile phone front stage operation be the program of the first application, namely current operation is the program of the first application, what show in the program of this first application is text etc., user just reads the text on the interface of this first application, such as, user wants partial content interested in the text to paste in second application such as microblogging, therefore, the voice assistant class software installed in the terminal devices such as user's starting hand-set, such running software is on backstage, user sends phonetic order to this voice assistant software: " please choose from the third line the 3rd row to the content of fifth line the 5th row and copy the text ", " please the text is pasted the blank space of microblogging ", this phonetic order can once send, also can divide and develop.
Voice assistant software receives this phonetic order from the microphone etc. of the terminal devices such as mobile phone.
The phonetic order sent due to user ununified form, so need this phonetic order identification, obtain key message wherein, namely the source location information of this phonetic order institute instruction, destination locations information, the first operation information and the second operation information is obtained, such as, according to the phonetic order that user sends, obtain that source location information be " the third line the 3rd in the first application arrange to fifth line the 5th arrange ", destination locations information be " blank space of microblogging ", the first operation information be " copying " and the second operation information is " stickup ".
Step S202, detects the instruction authority of the sender of described phonetic order.
What user read on the terminal devices such as mobile phone is text etc.; and the text often has copyright protection; the program of current first application needs the instruction authority of the sender of sense terminals equipment and phonetic order as copied etc. the text; restriction disabled user copy etc. text; therefore; require that the sender of phonetic order is provided in login account in the program of the first application and password etc., to detect its instruction authority.
Step S203, judges whether the sender of described phonetic order possesses instruction authority, if so, then goes to step S204, otherwise, then go to step S209.
The login account in the program of the first application provided according to the sender of phonetic order and password etc., judge that whether this login account and password etc. be correct, to determine whether the sender of this phonetic order possesses instruction authority.If possess instruction authority, then go to step S204, otherwise, then go to step S209, terminate the operation to text.
Step S204, according to the text scale in described first application, determines the position of text in described first application that the source location information of described phonetic order institute instruction is corresponding.
In order to the text that the positional information choosing the instruction of phonetic order institute is quickly and accurately corresponding, arrange in the first application and show text scale, according to text scale, the position of the text in the first application can be obtained quickly and accurately.
Such as, text scale denotes row and column in the first application, can obtain the position of the text of positional information " the third line the 3rd in the first application arranges to fifth line the 5th row " correspondence of phonetic order institute instruction according to text scale quickly and accurately.
Step S205, selects the text of described position.
According to the position of the text that step S204 determines, select the text of this position.
Step S206, according to the first operation information of described phonetic order institute instruction, is copied to the described text chosen in internal memory.
According to the first operation information of phonetic order institute instruction, as being exemplified as " copying " in the present embodiment, then the text selected in step S205 is copied to internal memory.This replicate run is performed by background program, and terminal device does not exit the operation of current first application.
Step S207, according to the second operation information of described phonetic order institute instruction, calls described second and applies and make described second application running background.
According to the second operation information of phonetic order institute instruction, the operation that this second operation information is corresponding has been applied by second, and therefore, call this second application, but make this second be applied in running background, terminal device does not exit the operation of current first application.As in the citing of the present embodiment, this second is applied as microblogging.
Step S208, described text is read from internal memory, and described text is sent in described second application of running background, to perform operation corresponding to described second operation information to the position of described text in described second application that described destination locations information is corresponding; Wherein, paste operation is operating as described in.
According to step S206, the text chosen is copied to internal memory, in this step, from internal memory, read the text, the text is sent to the second application of running background, in the second application, determines the position that destination locations information is corresponding, as " blank space of microblogging " in the citing of the present embodiment, perform operation corresponding to the second operation information in the position determined to the text chosen, this is operating as and carries out paste operation, the text is pasted onto the blank space of microblogging.
Step S209, terminates.
In this step, terminal device terminates the operation of phonetic order institute instruction to the text in the first application.
A kind of method operating text provided according to a further embodiment of the invention, by the instruction of phonetic order, can carry out the operation of text without the need to exiting current application program in other application program, this is simple, convenient, and Consumer's Experience is good.
Fig. 3 is a kind of structural representation operating an embodiment of the device of text provided by the invention.As shown in Figure 3, this device comprises:
Choosing unit 101, for when receiving phonetic order, according to the source location information of described phonetic order institute instruction, in the first application of current operation, choosing text corresponding to described source location information.
First operating unit 102, for the first operation information according to the instruction of described phonetic order institute, performs operation corresponding to described first operation information to described text.
In the present embodiment, the terminal devices such as mobile phone front stage operation be the program of the first application, namely current operation is the program of the first application, what show in the program of this first application is text etc., and in the terminal devices such as now more and more intelligent mobile phone, all be provided with voice assistant class software, such running software is on backstage.
User intends the text of certain position in the first application to be sent in the second application to process, but do not exit the first application of current operation, therefore, user starts voice assistant class software, send phonetic order, this phonetic order comprises the source location information of the text chosen, destination locations information, the text chosen is carried out to the first operation information of which kind of operation in the first application of current operation and the text chosen carried out to the second operation information of which kind of operation in the second application.
When terminal device receives this phonetic order, choose unit 101 and in the first application of current operation, choose text corresponding to this source location information according to the source location information of this phonetic order institute instruction, and the first operating unit 102 performs operation corresponding to first operation information to the text according to the first operation information of this phonetic order institute instruction in the first application of current operation.
Second operating unit 103, for for according to the destination locations information of described phonetic order institute instruction and the second operation information, call the second application and operation corresponding to described second operation information is performed to the position of described text in described second application that described destination locations information is corresponding.
Second operating unit 103 is according to the destination locations information of phonetic order institute instruction and the second operation information, call the second application, operated in backstage, in the second application, determine the position that destination locations information is corresponding, in the position determined, operation corresponding to the second operation information is performed to the text chosen.Terminal device is current still operates in the first application.
According to a kind of device operating text that one embodiment of the invention provides, by the instruction of phonetic order, obtain the result to the operation of text in other application program without the need to exiting current application program, this is simple, convenient, and Consumer's Experience is good.
Fig. 4 is a kind of structural representation operating another embodiment of the device of text.As shown in Figure 4, this device comprises:
Recognition unit 201, for identifying the phonetic order received, obtains the source location information of described phonetic order institute instruction, destination locations information, the first operation information and the second operation information.
In the present embodiment, the terminal devices such as mobile phone front stage operation be the program of the first application, namely current operation is the program of the first application, what show in the program of this first application is text etc., user just reads the text on the interface of this first application, such as, user wants partial content interested in the text to paste in second application such as microblogging, therefore, the voice assistant class software installed in the terminal devices such as user's starting hand-set, such running software is on backstage, user sends phonetic order to this voice assistant software: " please choose from the third line the 3rd row to the content of fifth line the 5th row and copy the text ", " please the text is pasted the blank space of microblogging ", this phonetic order can once send, also can divide and develop.
Voice assistant software receives this phonetic order from the microphone etc. of the terminal devices such as mobile phone.
The phonetic order sent due to user ununified form, so need this phonetic order identification, obtain key message wherein, namely the source location information of this phonetic order institute instruction, destination locations information, the first operation information and the second operation information is obtained, such as, according to the phonetic order that user sends, obtain that source location information be " the third line the 3rd in the first application arrange to fifth line the 5th arrange ", destination locations information be " blank space of microblogging ", the first operation information be " copying " and the second operation information is " stickup ".
Detecting unit 202, for detecting the instruction authority of the sender of described phonetic order.
What user read on the terminal devices such as mobile phone is text etc.; and the text often has copyright protection; the program of current first application needs the instruction authority of the sender of sense terminals equipment and phonetic order as copied etc. the text; restriction disabled user copy etc. text; therefore; detecting unit 202 requires that the sender of phonetic order is provided in login account and password etc. in the program of the first application, to detect its instruction authority.
Judging unit 203, for judging whether the sender of described phonetic order possesses instruction authority, if the sender of described phonetic order possesses instruction authority, then performs the operation that described first operation information is corresponding.
The login account in the program of the first application provided according to the sender of phonetic order and password etc., judging unit 203 judges that whether this login account and password etc. be correct, to determine whether the sender of this phonetic order possesses instruction authority.If the sender of described phonetic order possesses instruction authority, then perform the operation that described first operation information is corresponding.
Choosing unit 204, for when receiving phonetic order, according to the source location information of described phonetic order institute instruction, in the first application of current operation, choosing text corresponding to described source location information.In order to the text that the positional information choosing the instruction of phonetic order institute is quickly and accurately corresponding, this is chosen unit 204 and comprises determining unit 2041 and selection unit 2042.
Determining unit 2041, for according to the text scale in described first application, determines the position of text in described first application that the source location information of described phonetic order institute instruction is corresponding.
In order to the text that the source location information choosing the instruction of phonetic order institute is quickly and accurately corresponding, arrange and show text scale in the first application, determining unit 2041, according to text scale, can obtain the position of the text in the first application quickly and accurately.
Such as, text scale denotes row and column in the first application, can obtain the position of the text of source location information " the third line the 3rd in the first application arranges to fifth line the 5th row " correspondence of phonetic order institute instruction according to text scale quickly and accurately.
Selection unit 2042, for selecting the text of described position.
According to the position of the text that determining unit 2041 is determined, selection unit 2042 selects the text of this position.
Copied cells 205, for the first operation information according to the instruction of described phonetic order institute, is copied to the described text chosen in internal memory.
According to the first operation information of phonetic order institute instruction, as being exemplified as " copying " in the present embodiment, then copied cells 205 is copied to internal memory by choosing the text that unit 204 chooses.This replicate run is performed by background program, and terminal device does not exit the operation of current first application.
Second operating unit 206, for according to the destination locations information of described phonetic order institute instruction and the second operation information, call the second application and operation corresponding to described second operation information is performed to the position of described text in described second application that described destination locations information is corresponding.Particularly, the second operating unit 206 comprises: call unit 2061, reading unit 2062, transmitting element 2063, application unit 2064.
Call unit 2061, for the second operation information according to the instruction of described phonetic order institute, calls described second and applies and make described second application running background.
According to the second operation information of phonetic order institute instruction, the operation that this second operation information is corresponding has been applied by second, and therefore, call unit 2061 calls this second application, but make this second be applied in running background, terminal device does not exit the operation of current first application.
Reading unit 2062, for reading described text from internal memory.
Transmitting element 2063, for being sent to described text in described second application of running background.
Application unit 2064, for performing operation corresponding to described second operation information to the position of described text in described second application that described destination locations information is corresponding; Wherein, paste operation is operating as described in.
Reading unit 2062 reads the text that copied cells 205 is copied to internal memory from internal memory, by transmitting element 2063, the text is sent to the second application of running background, then operation corresponding to the second operation information is performed by application unit 2064, namely paste, such as, text is sent to the blank space of microblogging by transmitting element 2063, and text is pasted onto this blank space by application unit 2064.
A kind of device operating text provided according to a further embodiment of the invention, by the instruction of phonetic order, can carry out the operation of text without the need to exiting current application program in other application program, this is simple, convenient, and Consumer's Experience is good.
Above disclosedly be only present pre-ferred embodiments, certainly can not limit the interest field of the present invention with this, therefore according to the equivalent variations that the claims in the present invention are done, still belong to the scope that the present invention is contained.