CN103324667B - A kind of method generating adaptively selected text on webpage - Google Patents

A kind of method generating adaptively selected text on webpage Download PDF

Info

Publication number
CN103324667B
CN103324667B CN201310186839.4A CN201310186839A CN103324667B CN 103324667 B CN103324667 B CN 103324667B CN 201310186839 A CN201310186839 A CN 201310186839A CN 103324667 B CN103324667 B CN 103324667B
Authority
CN
China
Prior art keywords
indicator
text
user
flag bit
webpage
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201310186839.4A
Other languages
Chinese (zh)
Other versions
CN103324667A (en
Inventor
吴涛军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Individual
Original Assignee
Individual
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Individual filed Critical Individual
Priority to CN201310186839.4A priority Critical patent/CN103324667B/en
Publication of CN103324667A publication Critical patent/CN103324667A/en
Application granted granted Critical
Publication of CN103324667B publication Critical patent/CN103324667B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention discloses a kind of method generating adaptively selected text on webpage, when user selects effective text occur for the first time in content on webpage, before and after selecting first word of content, two indicators are set, one of them indicator is fixed, another indicator is followed user and is selected action to move, by the currently displayed movement indicator that between two indicators, the length value of content of text can be real-time.When user selects the length of text to exceed restriction length, this indicator stops mobile, is fixed on the other end of the adaptively selected text limiting length.Meeting adaptively selected text less than limiting on the premise of length, user can drag the first indicator and the second indicator in left and right.This method gets rid of non-text elements by the way of detecting or pre-read when indicator moves.

Description

A kind of method generating adaptively selected text on webpage
Technical field
The invention belongs to web page technical field, be specifically related to a kind of method generating adaptively selected text on webpage.
Background technology
Prior art is when carrying out selection operation to the content on webpage, the web page contents frame that can be unconditionally streaked by mouse is selected into selection region, and in some certain applications, need the content selecting region is carried out limit for length's operation, or some non-text elements is isolated selection region.Prior art cannot go out some special web page element by Computer Automatic Recognition and be isolated selection region, cannot control selecting the text in region within certain finite length simultaneously.
Summary of the invention
The technical problem to be solved is the defect for background technology, it is provided that a kind of avoiding selects non-text elements and less than the method limiting length text.
The present invention solves above-mentioned technical problem by the following technical solutions:
A kind of method generating adaptively selected text on webpage, when for the first time effective text occurring in the region that user is selected on webpage, two indicators are set before and after first word of this effective text, one of them indicator fixing end near user's range of choice is fixed, another indicator is followed the selection action of user and is moved, when user selects the length of text to exceed restriction length, the indicator of the described selection action following user and movement stops mobile, and it is fixed on the other end of the adaptively selected text limiting length, will be located in the text between two indicators as self adaptation text, described effective text is the text not comprising non-text elements.
A kind of further prioritization scheme of method generating adaptively selected text on webpage as the present invention: described in follow the selection action of user and time the indicator that moves moves every time, first on acquisition webpage, indicator limits the content of length along user action moving direction since then, then judge the most whether comprise non-text elements, if comprised, then flag bit is set at the non-text elements nearest apart from this indicator, when user selects range of text to exceed this flag bit, this indicator is fixed on the position before crossing flag bit.
A kind of further prioritization scheme of method generating adaptively selected text on webpage as the present invention: before the indicator moved in the selection action of the described user of following moves every time, judge itself and user select range of text to terminate between content whether comprise non-text elements, if comprised, then flag bit is set at the non-text elements nearest apart from this indicator, when user selects range of text to exceed this flag bit, and the text size between this flag bit and another fixing indicator is less than when limiting length, this indicator is fixed on the position before crossing flag bit.
A kind of further prioritization scheme of method generating adaptively selected text on webpage as the present invention: described in follow the selection action of user and time the indicator that moves moves every time, calculate the text size between two indicators in real time, and this text size information is shown in real time by the indicator following the selection action of user and movement.
nullA kind of further prioritization scheme of method generating adaptively selected text on webpage as the present invention: said two indicator is the first indicator、Second indicator,When the described selection action following user, the indicator of movement stops mobile,Meeting adaptively selected text less than limiting on the premise of length,Described first indicator and the second indicator are individually moved left and right,When the indicator moved moves and causes adaptively selected range of text to expand,First obtain the indicator moved since then on webpage and limit the content of length along moving direction,Then judge the most whether comprise non-text elements,If comprised,Then flag bit is set at the non-text elements that the indicator moved apart from this is nearest,When the indicator moved is beyond this flag bit,The indicator this moved is fixed on the position before crossing flag bit.
A kind of further prioritization scheme of method generating adaptively selected text on webpage as the present invention: said two indicator is the first indicator, second indicator, when when the described selection action following user, the indicator of movement stops mobile, meeting adaptively selected text less than limiting on the premise of length, described first indicator and the second indicator are moved left and right respectively, when the indicator moved moves and causes self adaptation range of text to expand every time, judge whether the content expanded comprises non-text elements, if comprised, then flag bit is set at the non-text elements that the indicator moved apart from this is nearest, when the indicator moved is beyond this flag bit, the indicator this moved is fixed on the position before crossing flag bit.
A kind of further prioritization scheme of method generating adaptively selected text on webpage as the present invention: described in follow the selection action of user and time the indicator that moves stops mobile, after user makes affirming conduct, computer system will be located in being highlighted after the content of text between two indicators stores and be converted into logical block, and described logical block is less than limiting length and not comprising the text of non-text elements.
A kind of further prioritization scheme of method generating adaptively selected text on webpage as the present invention: the hardware terminal corresponding to described webpage is: PC or mobile device.
The present invention uses above technical scheme compared with prior art, has following technical effect that
1, can intelligently non-text elements in special webpage be excluded selection region;
2, can be by adaptively selected context limits in certain length.
Use the technical program, can make that user is more convenient, select core words and phrases in webpage more targetedly with user's real-time interaction.Follow-up these core words and phrases can be processed further, store after creating logical block, highlighted, make user open-and-shut can see the focus of oneself in webpage, to obtain more preferable Consumer's Experience.By the way of this logical block creating the effective text of limit for length, redundancy can be filtered during the information of carrying out exchange, and improve efficiency and the speed of information retrieval of information exchange.
Accompanying drawing explanation
Fig. 1 is the flow chart of adaptively selected text generation.
Detailed description of the invention
Below in conjunction with the accompanying drawings technical scheme is described in detail:
As it is shown in figure 1, the invention discloses a kind of method producing adaptively selected text on webpage, specifically divide the following steps:
The first step, user selects content on webpage;
Second step, arranges two indicators before and after selecting first word of content;
3rd step, the distance users range of choice fix end nearer indicator fix, another indicator is followed the selection action of user and is moved;
4th step, when each indicator follow user select action to move time, make the following judgment:
A) judge whether the length selecting text exceedes restriction length, if beyond limiting length, then the indicator of movement being fixed on the other end of the adaptively selected text limiting length;
B) judge to select whether text comprises non-text elements, if comprising non-text elements, then flag bit is set at the non-text elements that the indicator of distance movement is nearest, and this indicator is fixed on the position before crossing flag bit;
5th step, user selects release, will be located in the adaptively selected text of the text generation between two indicators.
Effective text in the application refers to word (the polyglot character such as Chinese character, English, punctuation mark and the combination of digit symbol), does not include the non-text elements such as picture, audio frequency, video;Restriction length is all set to 5 characters by following example.
Embodiment 1:
nullAssume webpage comprises the head portrait picture of an author and is positioned at the Word message " sky of cyan " on this picture side,When user presses left mouse button before the head portrait picture of author on webpage,Select content from left to right,Select there is no word content in content this time,Two indicators all occur without,Mouse continues to move backward,Select that first character " blue or green " occurs in content,First indicator and the second indicator then occur before and after " blue or green " word,Wherein the first indicator is motionless,Second indicator current adaptively selected text size " 1 " displayed above,And move to right with mouse and mobile,When mouse moves to after " sky of cyan " when,Second indicator current adaptively selected text size " 5 " displayed above,System judges that 5 characters expired by adaptively selected text,When mouse continues to move backward,Second indicator moves the most backward.Adaptively selected text is " sky of cyan ".The method step realizing this function is: when user selects content on webpage, when selecting not include word in content, occurs without the first indicator and the second indicator;When selecting content first word to occur, before and after first word occurred, the first indicator and the second indicator are set, wherein the first indicator is fixed, second indicator is followed user and is selected action to move, and at the second indicator current adaptively selected text size displayed above, when user selects the length of text to exceed restriction length, this indicator stops mobile, is fixed on the other end of the adaptively selected text limiting length.
Embodiment 2:
Assume that webpage has two smiling face's pictures, having word on the right side of smiling face's picture is " Wu Tse-tien ", when user on webpage in article " my god " press left mouse button after word, select content from right to left, at this moment " my god " the first indicator and the second indicator occur about word, wherein the second indicator is motionless, first indicator moves to left with mouse and mobile, and pre-read the content from the first indicator 5 character lengths to the left, find that the 4th and the 5th position are two smiling face's pictures the most from right to left, belong to non-textual content, at the smiling face that the first indicator is close together, flag bit is set;Mouse continues to move to left, and the first indicator moves to left and again pre-reads;The when that mouse moving to before smiling face, the first indicator is fixing after identifier, no longer moves to left.Adaptively selected text is " Wu Tse-tien ".The method step realizing this function is: follows user and selects action and time the indicator of movement moves every time, on acquisition webpage, indicator limits the content of length along user action moving direction since then, judge the most whether comprise non-text elements, if comprised, then flag bit is set at the non-text elements nearest apart from this indicator, when user selects range of text to exceed flag bit, this indicator is fixed on the position before crossing flag bit.
Embodiment 3:
Assume that having a word in webpage is " not mature ", it it is a picture on the right of " not mature ", when user presses left mouse button after " blue or green " word in article on webpage, select content from left to right, at this moment first indicator and the second indicator occur about " blue or green " word, wherein the first indicator is motionless, second indicator moves to right with mouse and mobile, when on the right of user's range of choice expands " puckery " word to, second indicator judge before moving to right end indicator and user's range of choice terminate between content be text element, second indicator moves on the right of " puckery " word;When user's range of choice expand to " not mature " the right picture time, the second indicator judge before moving to right the second indicator and user's range of choice terminate between content be non-text elements, the second indicator is fixed, and no longer moves to right.Adaptively selected text is " not mature ".The method step realizing this function is: before following user and select action and the indicator of movement moves every time, judge itself and user select range of text to terminate between content whether comprise non-text elements, if comprised, then flag bit is set at the non-text elements nearest apart from this indicator, when user selects range of text to exceed flag bit, and the text size between this flag bit and another fixing indicator is less than when limiting length, and this indicator is fixed on the position before crossing flag bit.
Embodiment 4:
Assume that webpage has two smiling face's pictures, having word on the right side of smiling face's picture is " Wu Tse-tien ", user generated adaptively selected text " my god " and drag the first indicator toward moving to left, now system pre-reads the content from the first indicator 5 character lengths to the left, find that the 4th and the 5th position are two smiling face's pictures the most from right to left, belong to non-textual content, flag bit is set at the smiling face that the first indicator is close together;First indicator continues to move to left, and system pre-reads the most again;The when that first indicator moving to before smiling face, fixing no longer move to left.Adaptively selected text is changed to " Wu Tse-tien ".The method step realizing this function is: meeting adaptively selected text less than limiting on the premise of length, described first indicator and the second indicator are individually moved left and right, when the indicator moved moves and causes adaptively selected range of text to expand, first obtain the indicator moved since then on webpage and limit the content of length along moving direction, then judge the most whether comprise non-text elements, if comprised, then flag bit is set at the non-text elements that the indicator moved apart from this is nearest, when the indicator moved is beyond this flag bit, the indicator this moved is fixed on the position before crossing flag bit.
Embodiment 5:
Assume that having a word in webpage is " not mature ", it it is a picture on the right of " not mature ", user has generated adaptively selected text " blue or green " and has dragged the second indicator toward moving to right, when the second indicator is moved to after " puckery " word, system judges that " puckery " word belongs to text element, confirms that the second indicator moves on the right of " puckery " word;When the second indicator is moved to after the picture on " not mature " the right, system judges to comprise non-text elements in the content expanded, and arranges flag bit, and the second indicator is fixed to the position before crossing flag bit at this picture.Adaptively selected text is changed to " not mature ".The method step realizing this function is: meeting adaptively selected text less than limiting on the premise of length, first indicator and the second indicator are moved left and right respectively, when the indicator moved moves and causes adaptively selected range of text to expand every time, judge whether the content expanded comprises non-text elements, if comprised, then flag bit is set at the non-text elements that the indicator moved apart from this is nearest, when the indicator moved is beyond this flag bit, the indicator this moved is fixed on the position before crossing flag bit.

Claims (7)

1. the method generating adaptively selected text on webpage, it is characterized in that: when for the first time effective text occurring in the region that user is selected on webpage, two indicators are set before and after first word of this effective text, one of them indicator fixing end near user's range of choice is fixed, another indicator is followed the selection action of user and is moved, when user selects the length of text to exceed restriction length, the indicator of the described selection action following user and movement stops mobile, and it is fixed on the other end of the adaptively selected text limiting length, will be located in the text between two indicators as self adaptation text, described effective text is the text not comprising non-text elements;
When the content by the mobile selection of indicator comprises non-text elements, then flag bit is set at the non-text elements that the indicator moved apart from this is nearest, when the indicator moved is beyond this flag bit, the indicator this moved is fixed on the position before crossing flag bit;
Further, described in follow the selection action of user and time the indicator of movement moves every time, calculate the text size between two indicators in real time, and this text size information shown in real time by the indicator following the selection action of user and movement.
A kind of method generating adaptively selected text on webpage the most according to claim 1, it is characterized in that: described in follow the selection action of user and time the indicator of movement moves every time, first on acquisition webpage, indicator limits the content of length along user action moving direction since then, then judge the most whether comprise non-text elements, if comprised, then flag bit is set at the non-text elements nearest apart from this indicator, when user selects range of text to exceed this flag bit, this indicator is fixed on the position before crossing flag bit.
A kind of method generating adaptively selected text on webpage the most according to claim 1, it is characterized in that: before in the selection action of the described user of following, the indicator of movement moves every time, judge itself and user select range of text to terminate between content whether comprise non-text elements, if comprised, then flag bit is set at the non-text elements nearest apart from this indicator, when user selects range of text to exceed this flag bit, and the text size between this flag bit and another fixing indicator is less than when limiting length, this indicator is fixed on the position before crossing flag bit.
nullA kind of method generating adaptively selected text on webpage the most according to claim 1,It is characterized in that: said two indicator is the first indicator、Second indicator,When the described selection action following user, the indicator of movement stops mobile,Meeting adaptively selected text less than limiting on the premise of length,Described first indicator and the second indicator are individually moved left and right,When the indicator moved moves and causes adaptively selected range of text to expand,First obtain the indicator moved since then on webpage and limit the content of length along moving direction,Then judge the most whether comprise non-text elements,If comprised,Then flag bit is set at the non-text elements that the indicator moved apart from this is nearest,When the indicator moved is beyond this flag bit,The indicator this moved is fixed on the position before crossing flag bit.
A kind of method generating adaptively selected text on webpage the most according to claim 1, it is characterized in that: said two indicator is the first indicator, second indicator, when when the described selection action following user, the indicator of movement stops mobile, meeting adaptively selected text less than limiting on the premise of length, described first indicator and the second indicator are moved left and right respectively, when the indicator moved moves and causes adaptively selected range of text to expand every time, judge whether the content expanded comprises non-text elements, if comprised, then flag bit is set at the non-text elements that the indicator moved apart from this is nearest, when the indicator moved is beyond this flag bit, the indicator this moved is fixed on the position before crossing flag bit.
A kind of method generating adaptively selected text on webpage the most according to claim 1, it is characterized in that: described in follow the selection action of user and time the indicator of movement stops mobile, after user makes affirming conduct, computer system will be located in being highlighted after the content of text between two indicators stores and be converted into logical block, and described logical block is less than limiting length and not comprising the text of non-text elements.
A kind of method generating adaptively selected text on webpage the most according to claim 1, it is characterised in that: the hardware terminal corresponding to described webpage is: PC or mobile device.
CN201310186839.4A 2013-05-20 2013-05-20 A kind of method generating adaptively selected text on webpage Active CN103324667B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310186839.4A CN103324667B (en) 2013-05-20 2013-05-20 A kind of method generating adaptively selected text on webpage

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310186839.4A CN103324667B (en) 2013-05-20 2013-05-20 A kind of method generating adaptively selected text on webpage

Publications (2)

Publication Number Publication Date
CN103324667A CN103324667A (en) 2013-09-25
CN103324667B true CN103324667B (en) 2016-08-17

Family

ID=49193410

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310186839.4A Active CN103324667B (en) 2013-05-20 2013-05-20 A kind of method generating adaptively selected text on webpage

Country Status (1)

Country Link
CN (1) CN103324667B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107992740B (en) * 2016-10-27 2021-11-09 腾讯科技(深圳)有限公司 Mask processing method and client
CN113377254B (en) * 2021-06-23 2023-07-11 西安诺瓦星云科技股份有限公司 Input text selection method and device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN201491068U (en) * 2008-03-04 2010-05-26 苹果公司 Portable electronic device and electronic device with touch-sensitive display
CN102937864A (en) * 2012-10-31 2013-02-20 百度在线网络技术(北京)有限公司 Method and device for determining selected texts on touch terminals

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012162895A1 (en) * 2011-06-03 2012-12-06 Google Inc. Gestures for selecting text
EP2535811A1 (en) * 2011-06-15 2012-12-19 Amadeus S.A.S. Improvements in or relating to pasting data

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN201491068U (en) * 2008-03-04 2010-05-26 苹果公司 Portable electronic device and electronic device with touch-sensitive display
CN102937864A (en) * 2012-10-31 2013-02-20 百度在线网络技术(北京)有限公司 Method and device for determining selected texts on touch terminals

Also Published As

Publication number Publication date
CN103324667A (en) 2013-09-25

Similar Documents

Publication Publication Date Title
CN105718448A (en) Method and apparatus for automatically translating input character
CN105278818B (en) Content copying methods and device in a kind of instant message applications
JP6289662B2 (en) Information transmitting method and transmitting apparatus
CN102455857B (en) Method and system for realizing quick links in mobile terminal browser
CN107005458B (en) Unscripted digital media message generation method, device, electronic equipment and readable medium
CN103353886A (en) Method and system for previewing webpage
CN101963888A (en) Electronic terminal and method thereof for controlling page scroll bar
CN105389159A (en) Picture rendering method, device and mobile terminal
CN102841900B (en) page processing method and device
CN103176958B (en) A kind of mobile terminal replicates the method for operating pasted
CN104636029A (en) Display control method and system for control
CN103294748A (en) Method for excerpting and editing Internet contents
CN103324667B (en) A kind of method generating adaptively selected text on webpage
CN105280204B (en) Method for broadcasting multimedia file, apparatus and system
US20170110156A1 (en) System and method for collaborative annotations of streaming videos on mobile devices
CN104391641A (en) Information processing method and device
KR102049141B1 (en) Tethered selection handle
EP2634690A1 (en) Method and apparatus for setting user interface
CN106502680A (en) A kind of method that pel extension is carried out by visualization interface
CN107562450A (en) A kind of cross-platform method for visualizing of local chronicle resource
CN105095285B (en) Digital publication guide to visitors catalogue treating method and apparatus
WO2018046007A1 (en) Instant dynamic text inputting method, system, and device
CN105022737B (en) Micro-blog method for information display and device
CN109933262B (en) GIF screen capturing method and device
CN105700780A (en) Intelligent terminal window data real-time switching method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant