[go: up one dir, main page]

CN102646089B - Text hiding and displaying method and device for electronic reader - Google Patents

Text hiding and displaying method and device for electronic reader Download PDF

Info

Publication number
CN102646089B
CN102646089B CN201110039120.9A CN201110039120A CN102646089B CN 102646089 B CN102646089 B CN 102646089B CN 201110039120 A CN201110039120 A CN 201110039120A CN 102646089 B CN102646089 B CN 102646089B
Authority
CN
China
Prior art keywords
characters
hiding
character
rule
hidden
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
CN201110039120.9A
Other languages
Chinese (zh)
Other versions
CN102646089A (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.)
Hanwang Technology Co Ltd
Original Assignee
Hanwang Technology Co Ltd
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 Hanwang Technology Co Ltd filed Critical Hanwang Technology Co Ltd
Priority to CN201110039120.9A priority Critical patent/CN102646089B/en
Publication of CN102646089A publication Critical patent/CN102646089A/en
Application granted granted Critical
Publication of CN102646089B publication Critical patent/CN102646089B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • User Interface Of Digital Computer (AREA)
  • Document Processing Apparatus (AREA)

Abstract

The invention belongs to the field of an electronic reader, and discloses a text hiding and displaying method and device for an electronic reader, designed for hiding and displaying the content of each part in different types of texts. The text hiding method comprises the following steps of: firstly, setting at least one character hiding rule for a document displayed currently according to user need; secondly, finding all the characters which accord with the hiding rule according to the character hiding rule, and computing a rectangular region formed by all the characters which accord with the hiding rule; and finally, hiding the rectangular region. The character hiding rule is defined by the user, so that partial hiding and displaying of the content displayed in the electronic reader can be accurately controlled, therefore, the electronic reader is more flexibly adapted to the hiding and the displaying of the content of each part of various texts.

Description

Method and device for hiding and displaying characters of electronic reader
Technical Field
The invention relates to the field of electronic readers, in particular to a method and a device for hiding and displaying characters of an electronic reader.
Background
When a user uses an electronic reader, particularly when the user reads a Chinese bilingual reference or a quiz reader with answer answers, some readers expect to hide some paragraphs in a document for self-investigation, and then designate the reader to display hidden parts when the user deems appropriate. However, there are various contents that a user reads using an electronic reader, and there are also various texts that the user wants to hide. The conventional electronic reader has a single control mode on the text content, can only realize simple extracting or hiding operation on the content of partial text, and cannot support the hiding operation in comparison documents and intelligence-benefitting reading materials with answer answers.
Disclosure of Invention
In view of the above problems, the technical problem to be solved by the present invention is to provide a method and a system for hiding and displaying text on an electronic reader, so as to meet the requirements of users for hiding and displaying partial contents of different types of documents.
In order to achieve the purpose, the method for hiding the characters of the electronic reader comprises the following steps:
setting at least one text hiding rule of the current displayed document according to the user requirements;
finding out all characters according with the character hiding rule, and calculating a rectangular area formed by all the characters according with the hiding rule;
and hiding the rectangular area.
Particularly, the word hiding rule comprises the steps of determining an anchor point, delimiting a matching search range and specifying a target hidden text; wherein,
the anchor point is determined, and the text content selected by the user is described based on the regular expression;
the range of matching search is defined, and the range of matching search is defined by taking the anchor point as a search starting point;
and the specified target hidden text describes the target character content to be hidden by the user in the matching search range based on the regular expression.
Furthermore, when a word hiding rule of at least one current display document is formulated according to user requirements, anchor points, matching search ranges and target hidden texts are determined according to partial contents sequentially specified by the user requirements or selected by a mouse device on a current page frame.
Further, the hiding method further comprises: and storing the formulated character hiding rule into a database corresponding to the current displayed document for direct calling when the document is opened next time.
Furthermore, all characters which accord with the hiding rule are found out according to the character hiding rule, and a rectangular area which is formed by all the characters which accord with the hiding rule is calculated, and the specific implementation steps are as follows:
s1: extracting all character characters on the current page and a rectangular area where each character is located, and analyzing paragraph structures formed by all characters on the current page or determining the paragraph structures formed by all characters on the current page according to the size of line feed characters, line spacing and/or the indentation values of line head characters;
s2: reading one un-called character hiding rule in the established character hiding rules of the current display document, calling a regular expression engine to search all characters which accord with anchor points in the currently read character hiding rules in the current display page according to a paragraph structure formed by all characters on the current page, and if the characters can be found, performing step S3; if not, go to step S4; invoking NDUA
S3: continuously searching all characters matched with the target hidden text in all paragraphs in a matching search range specified by the currently read word hiding rule; if the characters can be found out, calculating the rectangular areas occupied by all the characters matched with the target hidden text in each paragraph, and calculating the specific positions of the rectangular areas; then, recording the position and size of each rectangular area in a hidden area list corresponding to the current page, and continuing to perform step S4; if not, go to step S4;
s4: judging whether an un-called character hiding rule still exists, if so, returning to the step S2; otherwise, ending.
The method for displaying the text content hidden by the method of claim 1 comprises the following steps:
receiving a trigger signal of a keyboard or a touch screen, and judging whether the trigger signal is in a rectangular area where the hidden text content is located, wherein the electronic reader displays the text content hidden in the rectangular area; otherwise, it is not displayed.
The invention discloses a hiding device of characters of an electronic reader, which comprises: the device comprises a character hiding rule making module, a rule matching calculation module and a hiding execution module; wherein,
the character hiding rule making module is used for making at least one character hiding rule of the current display document according with the requirements of a user;
the rule matching calculation module is used for matching and searching all characters which accord with the character hiding rule specified by the character hiding rule formulation module and calculating a rectangular area formed by all matched characters;
and the hidden execution module is used for hiding the rectangular area calculated by the rule matching calculation module.
Furthermore, the word hiding rule making module comprises an anchor point determining unit, a matching search range defining unit and a target-appointed hidden text unit; wherein,
the anchor point determining unit is used for describing the text content selected by the user based on the regular expression;
the range defining matching search unit defines the range of matching search by taking the anchor point determined by the anchor point determining unit as a search starting point;
and the specified target hidden text unit is used for specifying target character contents to be hidden by the user in the range defined by the defined matching search range unit based on the regular expression description.
Further, the rule matching calculation module includes the following units:
an extraction and analysis unit: extracting all character characters on the current page and a rectangular area where each character is located, and analyzing paragraph structures formed by all characters on the current page or determining the paragraph structures formed by all characters on the current page according to the size of line feed characters, line spacing and/or the indentation values of line head characters;
calling a search unit: calling a regular expression engine to find out all characters which accord with anchor points in the currently read character hiding rules and all characters which are matched with the target hidden text in all sections in a matching and searching range in a current display page; and the number of the first and second groups,
a rectangular region calculation unit: calculating rectangular areas occupied by all characters matched with the target hidden text in each paragraph, and calculating specific positions of the rectangular areas; then, the position and size of each rectangular area are recorded in a hidden area list corresponding to the current page.
Further, the hiding device further comprises:
and the hidden rule storage module is used for storing the formulated character hidden rule into a database corresponding to the current displayed document so as to be directly called when the document is opened next time.
The invention discloses a display device for displaying the text content hidden by the method of claim 1, which comprises: the display device comprises a receiving judgment module and a display execution module; wherein,
the receiving and judging module is used for receiving a trigger signal of a keyboard or a touch screen and judging whether the trigger signal is in a rectangular area where the hidden text content is located;
and the display execution module is used for displaying the triggered hidden text content in the rectangular area.
The invention has the beneficial effects that: the invention accurately controls the partial hiding and displaying of the displayed content in the electronic reader by the user-defined character hiding rule, so that the electronic reader is more flexibly suitable for the hiding and displaying of the contents of all the parts of various texts.
Drawings
FIG. 1 is a flow chart of a text hiding method for an electronic reader according to the present invention;
FIG. 2 is a flow chart of the present invention for finding all the characters according to the established character hiding rules and calculating the rectangular area occupied by the characters;
FIG. 3 is a schematic structural diagram of a text hiding device of an electronic reader according to the present invention;
fig. 4 is a schematic structural diagram of a display device for displaying text content using the text content hiding method of the present invention.
Fig. 5 is a schematic view illustrating that part of the currently displayed content of the electronic reader is not hidden according to embodiment 1 of the present invention;
fig. 6 is a schematic diagram illustrating an electronic reader invoking a text hiding function module to formulate a text hiding rule according to embodiment 1 of the present invention;
FIG. 7 is a schematic diagram of an embodiment 1 of the present invention showing all Chinese characters hidden in a hidden manner in the currently displayed content of an electronic reader;
FIG. 8 is a schematic diagram illustrating that all Chinese characters in the currently displayed content of the electronic reader are hidden in an inverted form according to embodiment 1 of the present invention;
FIG. 9 is a diagram illustrating a portion of content not hidden in currently displayed content of an electronic reader according to embodiment 2 of the present invention;
FIG. 10 is a diagram illustrating the determination of an anchor point by mouse device frame selection according to embodiment 2 of the present invention;
fig. 11 is a schematic diagram illustrating the establishment of text hiding rules according to embodiment 2 of the present invention;
FIG. 12 is a schematic diagram illustrating an electronic reader according to embodiment 2 hiding all characters in the currently displayed content according to the hiding rule;
fig. 13 is a schematic view of a part of the electronic reader displaying hidden contents according to embodiment 2 of the present invention.
Detailed Description
The following detailed description of embodiments of the invention refers to the accompanying drawings.
Fig. 1 is a flow chart of a text hiding and displaying method of an electronic reader according to the present invention. The method disclosed by the invention comprises the following specific steps:
setting at least one text hiding rule of the current displayed document according to the user requirements;
finding out all characters according with the character hiding rule, and calculating a rectangular area formed by all the characters according with the hiding rule;
and hiding the rectangular area.
The character hiding rule comprises determining an anchor point, delimiting a matching search range and specifying a target hidden text; the anchor point is determined, and the text content selected by the user is described based on the regular expression; the range of matching search is defined, and the range of matching search is defined by taking the anchor point as a search starting point; and the specified target hidden text describes the target character content to be hidden by the user in the matching search range based on the regular expression.
The above-mentioned text hiding rules are usually converted into a description in the form of a triple < P, R, M > when called for execution or saved. Wherein, p (pattern), which is an anchor point, represents the text content selected by the user; r is a matching range and represents in which ranges M is searched; m (match) is the target hidden text, which represents the target text content to be hidden by the user. Both P and M are described using regular expressions, for example: the regular expression describing the English word is "[ A-Za-z ] +"; the regular expression describing Chinese characters is "[ \ u4e00- \ u9fa5 ]". When R takes different values, this means that M needs to be searched out and hidden at different positions of the page or document, for example: r may take a paragraph or the whole document etc. immediately after or before the position where the anchor P appears or after the position where the anchor P appears. When the value of P in a text hiding rule is any character (i.e. the regular expression is described as "-"), R of the rule can only be specified as a whole page, and the meaning of the rule is to search for the occurrence of M in the range of the whole page and hide it; when the value of M in a character hiding rule is any character, all characters in the range specified by R are hidden.
When a word hiding rule of at least one current display document is formulated according to user requirements, anchor points, matching search ranges and target hidden texts are determined according to partial contents sequentially specified by the user requirements or selected by a mouse device on a current page frame.
When the mouse device selects part of the content to formulate a character hiding rule, the electronic reader searches all rules which can be matched with the selected content in the current character rule base, and the searched rules and the selected content in the frame jointly form an optional set of the anchor point, the matching search range and/or the target hidden text, so that a user can select a rule from the set as a matching rule of the selected content in the frame.
As shown in fig. 2, a flowchart of finding out all characters that meet the hiding rule according to the text hiding rule and calculating a rectangular area formed by all characters that meet the hiding rule is described as follows:
s1: extracting all character characters and a rectangular area where each character is located on a current page, analyzing paragraph structures formed by all characters on the current page, and if the current document analysis software cannot analyze the paragraph structures formed by the characters on the current page, determining the paragraph structures of all characters on the page according to line feed characters, line spacing and/or the size of the indentation value of line head characters;
s2: reading one un-called character hiding rule in the established character hiding rules of the current display document, calling a regular expression engine to search all characters which accord with anchor points in the currently read character hiding rules in the current display page according to a paragraph structure formed by all characters on the current page, and if the characters can be found, performing step S3; if not, go to step S4; invoking NDUA
S3: continuously searching all characters matched with the target hidden text in all paragraphs in a matching search range specified by the currently read word hiding rule; if the characters can be found out, calculating the rectangular areas occupied by all the characters matched with the target hidden text in each paragraph, and calculating the specific positions of the rectangular areas; then, recording the position and size of each rectangular area in a hidden area list corresponding to the current page, and continuing to perform step S4; if not, go to step S4;
s4: judging whether an un-called character hiding rule still exists, if so, returning to the step S2; otherwise, ending.
Further, in order to avoid that the electronic reader needs to reformulate the character hiding rule when the same document is reloaded and opened next time, the character hiding method of the electronic reader further comprises the following steps: and storing the formulated character hiding rule into a database corresponding to the current displayed document for direct calling when the document is opened next time.
The method for displaying the character content hidden by the method comprises the following steps:
receiving a trigger signal of a keyboard or a touch screen, and judging whether the trigger signal is in a rectangular area where the hidden text content is located, wherein the electronic reader displays the text content hidden in the rectangular area; otherwise, it is not displayed.
As shown in fig. 3, the device for hiding characters of an electronic reader of the present invention comprises: a character hiding rule making module 101, a rule matching calculation module 102 and a hiding execution module 103; wherein,
the text hiding rule making module 101 is configured to make a text hiding rule of at least one currently displayed document meeting the user requirement;
the rule matching calculation module 102 is configured to match and find all characters that meet the text hiding rule specified by the text hiding rule formulation module, and calculate a rectangular area formed by all matched characters;
the hiding execution module 103 hides the rectangular area calculated by the rule matching calculation module.
Further, the word hiding rule making module 101 includes an anchor point determining unit, a matching search range defining unit and a target-designated hidden text unit; wherein,
the anchor point determining unit is used for describing the text content selected by the user based on the regular expression;
the range defining matching search unit defines the range of matching search by taking the anchor point determined by the anchor point determining unit as a search starting point;
and the specified target hidden text unit is used for specifying target character contents to be hidden by the user in the range defined by the defined matching search range unit based on the regular expression description.
The rule matching calculation module 102 includes the following units:
an extraction and analysis unit: extracting all character characters on the current page and a rectangular area where each character is located, and analyzing paragraph structures formed by all characters on the current page or determining the paragraph structures formed by all characters on the current page according to the size of line feed characters, line spacing and/or the indentation values of line head characters;
calling a search unit: calling a regular expression engine to find out all characters which accord with anchor points in the currently read character hiding rules and all characters which are matched with the target hidden text in all sections in a matching and searching range in a current display page; and the number of the first and second groups,
a rectangular region calculation unit: calculating rectangular areas occupied by all characters matched with the target hidden text in each paragraph, and calculating specific positions of the rectangular areas; then, the position and size of each rectangular area are recorded in a hidden area list corresponding to the current page.
As a further embodiment of the present invention, the device for hiding characters of an electronic reader further includes: and a hiding rule storage module (not shown in the figure) for storing the formulated character hiding rule into a database corresponding to the current displayed document so as to be directly called when the document is opened next time.
As shown in fig. 4, the display system for displaying the text content hidden by the text hiding method of the electronic reader of the present invention includes: a reception determination module 201 and a display execution module 202.
The receiving and determining module 201 is configured to receive a trigger signal of a keyboard or a touch screen, and determine whether the trigger signal is in a rectangular area where the hidden text content is located;
the display execution module 202 is configured to display the text content hidden in the triggered rectangular area.
The hiding and displaying method of the electronic reader text according to the present invention is further described with reference to the following specific embodiments.
Example 1
In this embodiment, the electronic reader loads and opens a chinese-english comparison reading (as shown in fig. 5), and the current page contains chinese characters, english characters and pictures.
Firstly, a character hiding rule is formulated according to user requirements and stored in a corresponding database. When the electronic reader receives a hiding request that a user needs to hide a certain part of the content of the current page, the electronic reader calls a text hiding function module (as shown in fig. 6). The function module reads the text hiding rules stored in the database for the user to select. In this embodiment, a user selects and determines a rule of "hide all chinese characters" in a current page, and an electronic reader converts the rule into a triple description, where the description specifically includes: the anchor point P is an arbitrary position; matching the search range R to the whole page; the target hidden text M is a Chinese character; and describing the anchor point P, the matching search range R and the target hidden text M by adopting a regular expression.
Then, according to the rule of 'hiding all Chinese characters' in the current page, all characters which accord with the rule are found out, and a rectangular area formed by all characters which accord with the hidden rule is calculated, and the specific implementation is as follows:
s1: the electronic reader calls a text content accessor of document analysis software, extracts all text characters on a current page (a display page shown in figure 5) and a rectangular area where each character is located, and analyzes a paragraph structure formed by all the characters; if the current document analysis software cannot analyze the paragraph structure formed by the characters on the current page, the paragraph structures of all characters on the page are determined according to the line feed character, the line spacing and/or the size of the indentation value of the head character, and all the English characters and the Chinese characters in the embodiment have only one paragraph.
S2: reading the rule of hiding all the Chinese characters in the current page, and calling a regular expression engine to search all the characters which accord with the anchor point P in the description of the currently read character hiding rule triple according to a paragraph structure formed by all the characters on the current page, wherein the anchor point P is at any position in the embodiment. Invoking NDUA
S3: searching all characters matched with the target hidden text M, namely Chinese characters, in all paragraphs in the whole page in a matching search range R in the description of the currently read character hiding rule triple, wherein all Chinese characters in the upper right-hand paragraph in the display page are matched with the target hidden text M in the embodiment; after the search is completed, calculating the rectangular area occupied by all the Chinese characters in the paragraph according to the rectangular area where each character extracted in step S1 is located, and calculating the specific position where the rectangular area is located; and recording the position and the size of each rectangular area in a hidden area list corresponding to the current page, wherein the position of each rectangular area can be represented by the coordinate of the upper left corner of the rectangular area. Then, it is determined whether there is an un-invoked text hiding rule, and if there is no un-invoked text hiding rule as shown in fig. 6, the rectangular area is calculated.
Finally, hiding the rectangular area calculated in the above steps, wherein the text hiding may take various forms, as shown in fig. 7, which is a schematic diagram of hiding in the form of hiding in this embodiment; fig. 8 is a schematic diagram illustrating the embodiment of hiding in a text inversion manner.
When the electronic reader receives a trigger instruction in the rectangular area which is hidden or reversely displayed through the keyboard or the touch screen, the electronic reader displays the text content which is hidden in the rectangular area or rotates the text content which is reversely displayed in the rectangular area back to the forward direction.
It should be noted that, in this embodiment, the pictures displayed in the document cannot be hidden and displayed by applying the method of the present invention, and the method of the present invention is only applied to characters.
Example 2
In this embodiment, the e-reader loads and opens a Chinese chess problem set document (as shown in FIG. 9), where the problem part and the answer part are located too close to each other, which may easily affect the independent thinking of the user. If the user needs to hide the solution part, and at the moment, when the character hiding rules stored in the electronic reader do not meet the hiding rules of the requirement, the user can create a hiding rule in a self-defined mode to hide the solution part in the chess manual.
First, when an instruction of a user to create a New text hiding Rule is received, for example, when an "Add New Rule" function key in a text hiding function module window shown in fig. 6 is received, the electronic reader may call a corresponding function module for creating the New Rule to prompt the user how to create the New Rule. Wherein, the anchor point and the target hidden text can be determined by selecting a designated mode through a mouse or a touch screen frame. As shown in fig. 10, the anchor point in this embodiment is boxed as a display character "[ answer ] on the current page; reading resolver software extracts the content "answer" "selected by the frame, retrieves all character rules which can be matched with the character" "answer" "in a current character rule base, and combines all the retrieved character rules which are matched with the character" "answer" "with the text" "[ answer" "selected by the user frame to form a selectable set of anchor points, namely, the selectable set is used as a waiting item in a drop-down list when the anchor points appear, in the embodiment, the user designates the character" "[ answer" "as a matching rule in the drop-down list, and the character" [ answer "" is indicated as the anchor points.
As shown in fig. 11, the matching range is designated as "after anchor"; the target hidden text is designated as "all words". The matching range and the target hidden text can also be determined by a frame selection designation method, and if the frame selection designation method is adopted, the determination method is the same as the anchor point determination method. The electronic reader converts the established hiding rule into description in a triple < P, R, M > form, and the description specifically includes: p: "[ answer ]; r: after the anchor point [ answer ]; m: all the characters.
Then, the electronic reader calls a text content accessor of document analysis software, extracts all text characters on the current page and a rectangular area where each character is located, and analyzes a paragraph structure formed by the characters.
Reading the character hiding rules formulated in the steps, and calling a regular expression engine to find out characters which accord with anchor points P (answers) in the triple description of the currently read character hiding rules in the current display page according to a paragraph structure formed by all characters on the current page;
after the characters matched with the anchor points are found, calling NDUA, and then, searching the target hidden text M, namely all characters, in all paragraphs behind the anchor points (answers) in the description of the currently read character hidden rule triple; then, according to the rectangular area where each character extracted by the accessor is located, calculating the rectangular area occupied by each paragraph after the anchor point (answer), and calculating the specific position of each rectangular area; recording the position and the size of each rectangular area in a hidden area list corresponding to the current page; finally, whether the un-called character hiding rule exists is judged, and only one character hiding rule is formulated in the embodiment, so that the rectangular area is calculated.
The positions of the rectangular areas can be represented by coordinates at the upper left corner of the rectangular areas, and then the relative positions of the rectangular areas in the horizontal direction and the vertical direction can be judged.
Finally, corresponding to each rectangular area in the hidden area list, the corresponding area of the current page is respectively hidden, and each rectangular area is hidden, as shown in fig. 12.
When the electronic reader receives a triggering instruction of the keyboard or the touch screen in the hidden rectangular area, the electronic reader displays the text content hidden in the rectangular area, as shown in fig. 13. When the electronic reader receives a trigger instruction in the rectangular area where the first section is located, the electronic reader displays the content of the section. In addition, when the user selects to trigger the hidden rectangular area through the direction key on the keyboard, the electronic reader reads the position of each rectangular area stored in the hidden area list corresponding to the current page to determine the position of the hidden rectangular area specifically specified by the trigger instruction input by the current direction key.
The invention provides a method for hiding and displaying the text content in the electronic reader, which is convenient for a user to carry out self-investigation and independent thinking during reading and improves the convenience of the user when using the electronic reader.
In addition, the adding, storing and matching processes of the character hiding rules of the invention are used as independent modules to be used by each analyzer, thereby reducing the workload of various analyzer software for realizing hiding and displaying functions in the invention at an application layer.
The above description is only for the preferred embodiment of the present invention, but the scope of the present invention is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present invention are also included in the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope defined by the claims.

Claims (5)

1. A method for hiding characters of an electronic reader is characterized by comprising the following steps:
setting at least one character hiding rule of the current display document according to the user requirement, and storing the set character hiding rule into a database corresponding to the current display document for direct calling when the document is opened next time; the character hiding rule comprises determining an anchor point, delimiting a matching search range and specifying a target hidden text; wherein,
the anchor point is determined, and the text content selected by the user is described based on the regular expression;
the range of matching search is defined, and the range of matching search is defined by taking the anchor point as a search starting point;
the specified target hidden text describes target character contents to be hidden by the user in the matching search range based on a regular expression;
finding out all characters according with the character hiding rule, and calculating a rectangular area formed by all the characters according with the hiding rule;
and hiding the rectangular area.
2. The method for hiding characters of an electronic reader as claimed in claim 1, wherein when a character hiding rule of at least one currently displayed document is formulated according to user requirements, anchor points, matching search ranges and target hidden texts are determined according to partial contents sequentially specified by the user requirements or selected by a mouse device on a current page.
3. The method for hiding characters on an electronic reader as recited in claim 1, wherein all characters conforming to the hiding rule are found out according to the character hiding rule, and a rectangular area formed by all characters conforming to the hiding rule is calculated, and the method comprises the following steps:
s1: extracting all character characters on the current page and a rectangular area where each character is located, and analyzing paragraph structures formed by all characters on the current page or determining the paragraph structures formed by all characters on the current page according to the size of line feed characters, line spacing and/or the indentation values of line head characters;
s2: reading one un-called character hiding rule in the established character hiding rules of the current display document, calling a regular expression engine to search all characters which accord with anchor points in the currently read character hiding rules in the current display page according to a paragraph structure formed by all characters on the current page, and if the characters can be found, performing step S3; if not, go to step S4;
s3: continuously searching all characters matched with the target hidden text in all paragraphs in a matching search range specified by the currently read word hiding rule; if the characters can be found out, calculating the rectangular areas occupied by all the characters matched with the target hidden text in each paragraph, and calculating the specific positions of the rectangular areas; then, recording the position and size of each rectangular area in a hidden area list corresponding to the current page, and continuing to perform step S4; if not, go to step S4;
s4: judging whether an un-called character hiding rule still exists, if so, returning to the step S2; otherwise, ending.
4. A device for hiding characters of an electronic reader is characterized by comprising: the device comprises a character hiding rule making module, a rule matching calculation module and a hiding execution module; wherein,
the character hiding rule making module is used for making at least one character hiding rule of the current display document according with the requirements of a user; the character hiding rule making module comprises an anchor point determining unit, a matching search range defining unit and a target-appointed hidden text unit; the anchor point determining unit is used for describing the text content selected by the user based on the regular expression; the range defining matching search unit defines the range of matching search by taking the anchor point determined by the anchor point determining unit as a search starting point; the specified target hidden text unit is used for specifying target character contents to be hidden by the user in the range defined by the defined matching search range unit based on the regular expression description;
the hidden rule storage module is used for storing the formulated character hidden rule into a database corresponding to the current displayed document so as to be directly called when the document is opened next time;
the rule matching calculation module is used for matching and searching all characters which accord with the character hiding rule specified by the character hiding rule formulation module and calculating a rectangular area formed by all matched characters;
and the hidden execution module is used for hiding the rectangular area calculated by the rule matching calculation module.
5. The device for hiding characters of an electronic reader as claimed in claim 4, wherein said rule matching calculation module comprises the following units:
an extraction and analysis unit: extracting all character characters on the current page and a rectangular area where each character is located, and analyzing paragraph structures formed by all characters on the current page or determining the paragraph structures formed by all characters on the current page according to the size of line feed characters, line spacing and/or the indentation values of line head characters;
calling a search unit: calling a regular expression engine to find out all characters which accord with anchor points in the currently read character hiding rules and all characters which are matched with the target hidden text in all sections in a matching and searching range in a current display page; and the number of the first and second groups,
a rectangular region calculation unit: calculating rectangular areas occupied by all characters matched with the target hidden text in each paragraph, and calculating specific positions of the rectangular areas; then, the position and size of each rectangular area are recorded in a hidden area list corresponding to the current page.
CN201110039120.9A 2011-02-16 2011-02-16 Text hiding and displaying method and device for electronic reader Active CN102646089B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110039120.9A CN102646089B (en) 2011-02-16 2011-02-16 Text hiding and displaying method and device for electronic reader

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110039120.9A CN102646089B (en) 2011-02-16 2011-02-16 Text hiding and displaying method and device for electronic reader

Publications (2)

Publication Number Publication Date
CN102646089A CN102646089A (en) 2012-08-22
CN102646089B true CN102646089B (en) 2014-08-27

Family

ID=46658913

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110039120.9A Active CN102646089B (en) 2011-02-16 2011-02-16 Text hiding and displaying method and device for electronic reader

Country Status (1)

Country Link
CN (1) CN102646089B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103034468B (en) * 2012-12-18 2016-02-24 小米科技有限责任公司 A kind of method and device showing text
CN104317520B (en) * 2014-10-23 2017-08-01 小米科技有限责任公司 Viewing area content processing method and device
CN104866785B (en) * 2015-05-18 2018-12-18 上海交通大学 In conjunction with eye-tracking based on non-congested window information security system and method
CN108132746B (en) * 2016-12-01 2021-02-05 腾讯科技(北京)有限公司 Picture display method, device and equipment
CN111274765A (en) * 2019-06-01 2020-06-12 向英 Text processing method, software and equipment
CN112100981B (en) * 2020-09-24 2024-08-02 维沃移动通信有限公司 Document display method, device and electronic device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5999177A (en) * 1997-07-07 1999-12-07 International Business Machines Corporation Method and system for controlling content on a display screen in a computer system
US7479968B2 (en) * 2006-01-31 2009-01-20 Microsoft Corporation Semi-transparent highlighting of selected objects in electronic documents
CN101626451A (en) * 2008-07-10 2010-01-13 富士施乐株式会社 Image processing system and image processing program

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5999177A (en) * 1997-07-07 1999-12-07 International Business Machines Corporation Method and system for controlling content on a display screen in a computer system
US7479968B2 (en) * 2006-01-31 2009-01-20 Microsoft Corporation Semi-transparent highlighting of selected objects in electronic documents
CN101626451A (en) * 2008-07-10 2010-01-13 富士施乐株式会社 Image processing system and image processing program

Also Published As

Publication number Publication date
CN102646089A (en) 2012-08-22

Similar Documents

Publication Publication Date Title
CN102646089B (en) Text hiding and displaying method and device for electronic reader
US9996522B2 (en) Dictionary device for determining a search method based on a type of a detected touch operation
US8065601B2 (en) System and method for tagging data
EP2713255A1 (en) Method and electronic device for prompting character input
EP2871563A1 (en) Electronic device, method and storage medium
KR101522375B1 (en) Input method editor
CN105335052B (en) Information processing method and terminal device
US9507516B2 (en) Method for presenting different keypad configurations for data input and a portable device utilizing same
US9152712B2 (en) Method and system for performing a web search via a client-side module
JP6426417B2 (en) Electronic device, method and program
US9405558B2 (en) Display-independent computerized guidance
EP3029567B1 (en) Method and device for updating input method system, computer storage medium, and device
CN109740041B (en) Webpage crawling method and device, storage medium and computer equipment
US20240220090A1 (en) Text display method and text display apparatus
US9619562B2 (en) Method and system for performing a web search
US9135246B2 (en) Electronic device with a dictionary function and dictionary information display method
EP2897059A1 (en) User interface device, search method, and program
CN114518824A (en) Note recording method and device and electronic equipment
CN112051946B (en) Document data display method, device, system, electronic equipment and storage medium
CN113709322A (en) Scanning method and related equipment thereof
CN107609001A (en) Intelligent terminal and its mark display methods, the device with store function
CN109145241B (en) Browser and content display management method of browser
CN116775982A (en) Search methods, apparatus, equipment and media
JP2023002827A (en) Information processing apparatus, information processing method, and information processing program
US9411885B2 (en) Electronic apparatus and method for processing documents

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