CN112861504A - Text interaction method, device, equipment, storage medium and program product - Google Patents
Text interaction method, device, equipment, storage medium and program product Download PDFInfo
- Publication number
- CN112861504A CN112861504A CN202110171011.6A CN202110171011A CN112861504A CN 112861504 A CN112861504 A CN 112861504A CN 202110171011 A CN202110171011 A CN 202110171011A CN 112861504 A CN112861504 A CN 112861504A
- Authority
- CN
- China
- Prior art keywords
- target
- keyword
- coordinate
- text
- click
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 48
- 230000003993 interaction Effects 0.000 title claims abstract description 44
- 230000004044 response Effects 0.000 claims description 36
- 230000006870 function Effects 0.000 claims description 28
- 238000004590 computer program Methods 0.000 claims description 16
- 238000007667 floating Methods 0.000 claims description 4
- 230000009191 jumping Effects 0.000 claims description 3
- 238000012545 processing Methods 0.000 abstract description 9
- 230000002452 interceptive effect Effects 0.000 abstract description 3
- 238000010586 diagram Methods 0.000 description 9
- 238000004891 communication Methods 0.000 description 8
- 241000209094 Oryza Species 0.000 description 6
- 235000007164 Oryza sativa Nutrition 0.000 description 6
- 235000009566 rice Nutrition 0.000 description 6
- 238000004364 calculation method Methods 0.000 description 5
- 230000004048 modification Effects 0.000 description 3
- 238000012986 modification Methods 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 3
- 230000008569 process Effects 0.000 description 3
- 238000003491 array Methods 0.000 description 1
- 238000013473 artificial intelligence Methods 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000010801 machine learning Methods 0.000 description 1
- 238000007726 management method Methods 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 230000001953 sensory effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/10—Text processing
- G06F40/189—Automatic justification
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0481—Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
- G06F3/0483—Interaction with page-structured environments, e.g. book metaphor
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0484—Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
- G06F3/04845—Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range for image manipulation, e.g. dragging, rotation, expansion or change of colour
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/10—Text processing
- G06F40/103—Formatting, i.e. changing of presentation of documents
- G06F40/106—Display of layout of documents; Previewing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/10—Text processing
- G06F40/103—Formatting, i.e. changing of presentation of documents
- G06F40/109—Font handling; Temporal or kinetic typography
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Health & Medical Sciences (AREA)
- Artificial Intelligence (AREA)
- Audiology, Speech & Language Pathology (AREA)
- Computational Linguistics (AREA)
- General Health & Medical Sciences (AREA)
- Human Computer Interaction (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
The application discloses a text interaction method, a text interaction device, text interaction equipment, a storage medium and a program product, and relates to the field of text processing and text readers. The specific implementation scheme is as follows: acquiring a target text; displaying a target text in a picture format, wherein keywords in the target text are displayed in a first mode, other characters except the keywords in the target text are displayed in a second mode, and the first mode is different from the second mode; and when the click operation is received, responding to the click operation to display other function pages corresponding to the target keyword if the click coordinate corresponding to the click operation is matched with the coordinate of the target keyword in the keywords. The method realizes interactive operation on the text in the picture format.
Description
Technical Field
The embodiment of the application relates to a text processing technology, in particular to a text interaction method, a text interaction device, text interaction equipment, a text interaction storage medium and a text interaction program product, which can be used in the field of text readers.
Background
The text reader is an Application program (APP) capable of providing page reading of texts, and the text reader can improve reading experience of users through standard typesetting.
When typesetting a text, a text reader usually draws the text into pictures, displays the text in a picture format, and when a user reads the text, pages browsed by turning pages are a page of picture. Under the picture format, a user cannot perform effective click interaction operation on texts in the pictures.
Disclosure of Invention
The application provides a text interaction method, a text interaction device, text interaction equipment, a storage medium and a program product for realizing text interaction in a picture format.
According to an aspect of the present application, there is provided a text interaction method, including:
acquiring a target text;
displaying the target text in a picture format, wherein keywords in the target text are displayed in a first mode, and other characters except the keywords in the target text are displayed in a second mode, wherein the first mode is different from the second mode;
and when a click operation is received, if a click coordinate corresponding to the click operation is matched with a coordinate of a target keyword in the keywords, responding to the click operation to display other function pages corresponding to the target keyword.
According to another aspect of the present application, there is provided a text interaction apparatus, including:
the acquisition module is used for acquiring a target text;
the display module is used for displaying the target text in a picture format, wherein keywords in the target text are displayed in a first mode, other characters except the keywords in the target text are displayed in a second mode, and the first mode is different from the second mode;
and the response module is used for responding to the click operation to display other functional pages corresponding to the target keyword if the click coordinate corresponding to the click operation is matched with the coordinate of the target keyword in the keywords when the click operation is received.
According to still another aspect of the present application, there is provided an electronic apparatus including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of the first aspect.
According to yet another aspect of the present application, there is provided a non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of the first aspect.
According to yet another aspect of the present application, there is provided a computer program product comprising: a computer program, stored in a readable storage medium, from which at least one processor of an electronic device can read the computer program, execution of the computer program by the at least one processor causing the electronic device to perform the method of the first aspect.
According to the technical scheme, the click interaction of the text displayed in the picture format is realized.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present application, nor do they limit the scope of the present application. Other features of the present application will become apparent from the following description.
Drawings
The drawings are included to provide a better understanding of the present solution and are not intended to limit the present application. Wherein:
FIG. 1 is a flow chart diagram of a text interaction method provided according to an embodiment of the application;
FIG. 2 is a diagram illustrating keywords in a target text provided in accordance with an embodiment of the present application;
FIG. 3 is a first diagram illustrating a keyword clicking operation and response provided according to an embodiment of the present application;
FIG. 4 is a diagram illustrating a keyword clicking operation and a response provided according to an embodiment of the present application;
FIG. 5 is a schematic structural diagram of a text interaction device provided in an embodiment of the present application;
FIG. 6 is a schematic block diagram of an electronic device for implementing a text interaction method according to an embodiment of the present application.
Detailed Description
The following description of the exemplary embodiments of the present application, taken in conjunction with the accompanying drawings, includes various details of the embodiments of the application for the understanding of the same, which are to be considered exemplary only. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present application. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
The text reader is an application program installed in the terminal, and through the application program, texts can be drawn into pictures, and the texts are displayed to a user in a picture format for browsing and reading. The text reader may also be called an e-reader, for example, a common text reader has an e-novel reader, which lays out a novel as a plurality of pages of pictures, and displays the pictures page by page as the user browses the pictures. Under the text reader, the text browsed by the user is actually a page of picture, and the user cannot effectively click and interact certain words in the picture.
The application provides a text interaction method which can be applied to the fields of text processing and text readers. The method provides that for the text displayed in the picture format, keywords in the text are displayed in a mode different from other words, and the display mode prompts a user that the keywords are words capable of being clicked and interacted. Meanwhile, when the user clicks the text displayed in the picture format, whether the text clicked by the user is the keyword is determined in a manner of matching the click coordinates, and if the text clicked by the user is determined to be the keyword, interactive response can be performed on the click operation of the user, so that click interaction of the text displayed in the picture format is realized.
Hereinafter, the text method provided in the present application will be described in detail by specific examples. It is to be understood that the following detailed description may be combined with other embodiments, and that the same or similar concepts or processes may not be repeated in some embodiments.
Fig. 1 is a schematic flowchart of a text interaction method provided in an embodiment of the present application. The execution subject of the method is a text interaction device, and the device can be realized by software and/or hardware. For example, the text interaction device is a terminal. As shown in fig. 1, the method includes:
and S101, acquiring a target text.
The target text is the text to be displayed of the current page of the terminal. For example, taking an electronic novel reader in the terminal as an example, when a user reads a novel, clicking a first chapter in a novel directory, the target text is the content of a first page in the first chapter, and when the user continues to click a next page after browsing the first page, the target text is the content of a second page in the first chapter. The content displayed on each page may be determined according to the size of the terminal screen, the font set by the user, and the like.
S102, displaying the target text in a picture format, wherein keywords in the target text are displayed in a first mode, and other characters except the keywords in the target text are displayed in a second mode, wherein the first mode is different from the second mode.
And drawing the target text into a picture and displaying the picture, wherein the keywords in the target text can be preset characters, words, sentences and the like which can be clicked and interacted by a user. The target text can be screened according to preset keywords, the keywords in the target text are determined, and the keywords are displayed in a first mode different from other words. For example, the first way may be highlighting and the second way non-highlighting; or the first mode is red font display, and the second mode is black font display; in addition, the first mode is a bold font display, the second mode is a non-bold font display, and the present embodiment is not limited to this, and for example, fig. 2 illustrates that the keyword "rice" is displayed in italics, and other characters are displayed in non-italics.
For example, the keyword may be a difficult word, a commodity name, a specialized term of a specific field, and the like, the type of the keyword is not specifically limited in this embodiment, and in practical application, the keyword may be set as needed.
S103, when the click operation is received, if the click coordinate corresponding to the click operation is matched with the coordinate of the target keyword in the keywords, responding to the click operation to display other function pages corresponding to the target keyword.
When a user browses a target text, the user clicks the target text, and since the target text is displayed in a picture format, whether the user clicks an interactive keyword needs to be determined according to a coordinate clicked by the user. When the terminal receives the click operation, the click coordinate corresponding to the click operation is determined firstly, and then whether the click coordinate is matched with the coordinate of the keyword or not can be determined.
Illustratively, the keywords are difficult words, and when a user clicks the keywords, functional pages such as paraphrases and annotations of the difficult words are displayed; or, the keyword is a name of the commodity, for example, a word in the target text is a commodity, and when the user clicks the keyword, a function page for purchasing the commodity is displayed; or, the keyword is a specialized term in a specific field, and when the user clicks the keyword, a functional page of the content related to the specialized term is displayed.
According to the interaction method provided by the embodiment, for the text displayed in the picture format, the keywords are displayed in a mode different from other words, the display mode prompts the user that the keywords are words capable of click interaction, when the user clicks the target text, the click coordinates are matched with the coordinates of the keywords, if the user clicks the keywords, the user can interactively respond to the click operation, and therefore click interaction of the text displayed in the picture format is achieved.
In addition to the above embodiments, a description will be given of a step of responding to the click operation in S103 if the click coordinate corresponding to the click operation matches the coordinate of the target keyword among the keywords.
And when judging whether the click coordinate is matched with the coordinate of the keyword or not, the terminal determines that the click coordinate is matched with the coordinate of the target keyword by judging whether the click coordinate is in the coordinate range of the target keyword in the keyword or not, and responds to the click operation if the click coordinate is in the coordinate range of the target keyword. The coordinate range of the target keyword may be a coordinate range of an area covered by the target keyword. This process can be implemented in two ways, which are described separately below.
In one implementation mode, when the terminal displays the target text, the coordinate range of each character in the target text is determined, so that after a user clicks, the terminal obtains the coordinate range of each character in the target text, and matches the click coordinate with the coordinate range of each character in the target text to determine whether the click coordinate is in the coordinate range of the target keyword. Therefore, the accurate positioning of the click coordinates of the user is realized through matching of the character coordinates in the target text.
In another implementation mode, when the terminal displays the target text, only the coordinate range of the keywords in the target text is determined, so that after the user clicks, the terminal obtains the coordinate range of each keyword in the target text, and matches the click coordinate with the coordinate range of each keyword to determine whether the click coordinate is in the coordinate range of the target keyword. By adopting the method, the terminal does not need to determine the coordinate range of each character in the target text, thereby reducing the data storage amount and the calculation amount and improving the calculation efficiency.
How the coordinate range of the keyword is determined in another implementation described above is described below.
After acquiring a target text, a terminal acquires a start-stop range of a keyword in a target paragraph, wherein the target paragraph is the paragraph in which the keyword in the target text is located; and determining the coordinate range of the key according to the starting and stopping range of the key in the target paragraph and the font style of the target paragraph.
Illustratively, the target text has two paragraphs, wherein a keyword exists in the first paragraph, and the terminal determines the start-stop range of the keyword in the first paragraph, for example, the keyword is the 10 th to 12 th characters in the first paragraph; and determining the coordinate range of the key word according to the starting and stopping range and the font style of the first paragraph, such as the font size, the line spacing and other information.
Optionally, determining a target line where the keyword is located according to a starting-stopping range of the keyword in the target paragraph and a font style of the target paragraph; and determining the coordinate range of the key word according to the start-stop range of the target line and the key word in the target paragraph.
For example, the total line number of the target paragraph is determined according to the font size of the target paragraph and the start-stop range of the target paragraph, and the start-stop range of each line can also be determined; and determining the target line where the key is located according to the starting and stopping range of the key in the target paragraph. Or, determining the target line where the keyword is located according to the font size of the target paragraph and the starting and ending range of the keyword in the target paragraph. The coordinate range of the keyword can be determined according to the target line, the font size, the line spacing, the starting and stopping range of the keyword in the target paragraph and the like.
For example, after a target text is obtained, the content of the target text is queried through a preset keyword regular expression, keywords in the target text are determined and highlighted, and a start-stop position NSRange value of the keywords in a target paragraph is recorded; then calculating a coordinate range CGRect value of the keyword by using the NSRange value of the keyword and CoreText; when a user clicks a target text, a click coordinate CGRect value corresponding to a click operation is obtained by adopting a locationinView method, the click coordinate CGRect value is compared with a CGRect value of a keyword through CGRectContainsPoint, whether a matched target keyword exists or not is determined, and if the matched target keyword exists, the click operation is responded. By adopting the mode, the terminal only needs to calculate and store a small amount of data, and the response speed is improved.
On the basis of the above-described embodiment, the response to the click operation is explained.
Optionally, after the user clicks the target keyword, the terminal may directly display the functional page corresponding to the target keyword. Or in another scenario, a plurality of function pages corresponding to the target keyword may be provided, so that after the user clicks the target keyword, a plurality of response options corresponding to the target keyword are displayed, and different response options are used for displaying different function pages; and receiving an input response option selection instruction, and displaying a function page corresponding to the target keyword indicated by the response option selection instruction. Therefore, various other function pages corresponding to the keywords can be preset, the diversity of the interaction functions is increased, and the user experience is improved.
For example, as shown in fig. 3, after the user clicks the target keyword "rice", two response options corresponding to "rice" are displayed, one of the two response options is a paraphrase link, and the other is a purchase link of a commodity; and after the user selects the purchase link, displaying a function page where the purchase link of the rice is positioned.
Optionally, when the terminal displays other function pages corresponding to the target keyword, the terminal may jump from the current target text page to other function pages corresponding to the target keyword, and the other function pages corresponding to the target keyword may be displayed more clearly through the jump, or the other function pages corresponding to the target keyword may be displayed in the current target text page in a floating frame, so that the user may view the target text page and the other function pages at the same time. For example, as shown in fig. 4, after clicking the target keyword "rice", the user directly jumps to the function page where the commodity link of "rice" is located.
Fig. 5 is a schematic structural diagram of a text interaction device provided in an embodiment of the present application. As shown in fig. 5, the text interaction apparatus 500 includes:
an obtaining module 501, configured to obtain a target text;
a display module 502, configured to display a target text in a picture format, where a keyword in the target text is displayed in a first manner, and other characters except the keyword in the target text are displayed in a second manner, where the first manner is different from the second manner;
the response module 503 is configured to, when the click operation is received, respond to the click operation to display other function pages corresponding to the target keyword if the click coordinate corresponding to the click operation matches the coordinate of the target keyword in the keywords.
Optionally, the response module 503 includes:
the judging unit is used for judging whether the click coordinates are in the coordinate range of the target keywords in the keywords or not;
and the response unit is used for responding to the click operation if the click coordinate is in the coordinate range of the target keyword.
Optionally, the determining unit includes:
the first acquisition unit is used for acquiring the coordinate range of each keyword in the target text;
and the first determining unit is used for matching the click coordinate with the coordinate range of each keyword so as to determine whether the click coordinate is in the coordinate range of the target keyword.
Optionally, the text interaction apparatus 500 further includes:
the second acquisition unit is used for acquiring a start-stop range of the keywords in a target paragraph, wherein the target paragraph is a paragraph in which the keywords in the target text are located;
and the second determining unit is used for determining the coordinate range of the key according to the starting and stopping range of the key in the target paragraph and the font style of the target paragraph.
Optionally, the second determining unit includes:
the first determining subunit is used for determining a target line where the keyword is located according to the starting and ending range of the keyword in the target paragraph and the font style of the target paragraph;
and the second determining subunit is used for determining the coordinate range of the keyword according to the start-stop range of the target line and the keyword in the target paragraph.
Optionally, the response module 503 includes:
the third acquisition unit is used for acquiring the coordinate range of each character in the target text;
and the third determining unit is used for matching the click coordinate with the coordinate range of each character in the target text so as to determine whether the click coordinate is in the coordinate range of the target keyword.
Optionally, the response module 503 includes:
the first display unit is used for displaying a plurality of response options corresponding to the target keywords, and different response options are used for displaying different function pages;
and the second display unit is used for receiving the input response option selection instruction and displaying the function page corresponding to the target keyword indicated by the response option selection instruction.
Optionally, the response module 503 includes:
and the third display unit is used for jumping to other functional pages corresponding to the target keywords or displaying the other functional pages corresponding to the target keywords by using the floating frame.
The text interaction device provided in the embodiment of the present application can be used to execute the text interaction method in any of the above method embodiments, and the implementation principle and the calculation effect are similar, which are not described herein again.
The present application also provides an electronic device and a non-transitory computer-readable storage medium storing computer instructions according to embodiments of the present application.
There is also provided, in accordance with an embodiment of the present application, a computer program product, including: a computer program, stored in a readable storage medium, from which at least one processor of the electronic device can read the computer program, the at least one processor executing the computer program causing the electronic device to perform the solution provided by any of the embodiments described above.
FIG. 6 is a schematic block diagram of an electronic device for implementing a text interaction method according to an embodiment of the present application. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 6, the electronic device 600 includes a computing unit 601, which can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM)602 or a computer program loaded from a storage unit 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the device 600 can also be stored. The calculation unit 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
A number of components in the device 600 are connected to the I/O interface 605, including: an input unit 606 such as a keyboard, a mouse, or the like; an output unit 607 such as various types of displays, speakers, and the like; a storage unit 608, such as a magnetic disk, optical disk, or the like; and a communication unit 609 such as a network card, modem, wireless communication transceiver, etc. The communication unit 609 allows the device 600 to exchange information/data with other devices via a computer network such as the internet and/or various telecommunication networks.
The computing unit 601 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of the computing unit 601 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various dedicated Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, and so forth. The calculation unit 601 performs the respective methods and processes described above, such as the text interaction method. For example, in some embodiments, the text interaction method may be implemented as a computer software program tangibly embodied in a machine-readable medium, such as storage unit 608. In some embodiments, part or all of the computer program may be loaded and/or installed onto the device 600 via the ROM 602 and/or the communication unit 609. When the computer program is loaded into the RAM 603 and executed by the computing unit 601, one or more steps of the text interaction method described above may be performed. Alternatively, in other embodiments, the computing unit 601 may be configured to perform the text interaction method by any other suitable means (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), system on a chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the program codes, when executed by the processor or controller, cause the functions/operations specified in the flowchart and/or block diagram to be performed. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), Wide Area Networks (WANs), and the Internet.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The Server can be a cloud Server, also called a cloud computing Server or a cloud host, and is a host product in a cloud computing service system, so as to solve the defects of high management difficulty and weak service expansibility in the traditional physical host and VPS service ("Virtual Private Server", or simply "VPS"). The server may also be a server of a distributed system, or a server incorporating a blockchain.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present application may be executed in parallel, sequentially, or in different orders, and the present invention is not limited thereto as long as the desired results of the technical solutions disclosed in the present application can be achieved.
The above-described embodiments should not be construed as limiting the scope of the present application. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims (19)
1. A text interaction method, comprising:
acquiring a target text;
displaying the target text in a picture format, wherein keywords in the target text are displayed in a first mode, and other characters except the keywords in the target text are displayed in a second mode, wherein the first mode is different from the second mode;
and when a click operation is received, if a click coordinate corresponding to the click operation is matched with a coordinate of a target keyword in the keywords, responding to the click operation to display other function pages corresponding to the target keyword.
2. The method according to claim 1, wherein responding to the click operation if the click coordinate corresponding to the click operation matches the coordinate of the target keyword among the keywords comprises:
judging whether the click coordinates are in the coordinate range of a target keyword in the keywords or not;
and if the click coordinate is in the coordinate range of the target keyword, responding to the click operation.
3. The method of claim 2, the determining whether the click coordinate is within a coordinate range of a target one of the keywords, comprising:
acquiring the coordinate range of each keyword in the target text;
and matching the click coordinate with the coordinate range of each keyword to determine whether the click coordinate is in the coordinate range of the target keyword.
4. The method of claim 3, the coordinate range of the keyword being determined based on the steps of:
acquiring a start-stop range of the keyword in a target paragraph, wherein the target paragraph is a paragraph in the target text where the keyword is;
and determining the coordinate range of the key according to the starting and stopping range of the key in the target paragraph and the font style of the target paragraph.
5. The method of claim 4, wherein determining the coordinate range of the keyword according to the starting and ending range of the keyword in the target paragraph and the font style of the target paragraph comprises:
determining a target line where the keyword is located according to the starting and stopping range of the keyword in a target paragraph and the font style of the target paragraph;
and determining the coordinate range of the keyword according to the starting and stopping range of the target line and the keyword in the target paragraph.
6. The method of claim 2, the determining whether the click coordinate is within a coordinate range of a target one of the keywords, comprising:
acquiring the coordinate range of each character in the target text;
and matching the click coordinate with the coordinate range of each character in the target text to determine whether the click coordinate is in the coordinate range of the target keyword.
7. The method of any of claims 1-6, the displaying other function pages corresponding to the target keyword, comprising:
displaying a plurality of response options corresponding to the target keywords, wherein different response options are used for displaying different function pages;
and receiving an input response option selection instruction, and displaying a function page corresponding to the target keyword and indicated by the response option selection instruction.
8. The method of any of claims 1-6, the displaying other function pages corresponding to the target keyword, comprising:
and jumping to other functional pages corresponding to the target keywords, or displaying the other functional pages corresponding to the target keywords by using a floating frame.
9. A text interaction device, comprising:
the acquisition module is used for acquiring a target text;
the display module is used for displaying the target text in a picture format, wherein keywords in the target text are displayed in a first mode, other characters except the keywords in the target text are displayed in a second mode, and the first mode is different from the second mode;
and the response module is used for responding to the click operation to display other functional pages corresponding to the target keyword if the click coordinate corresponding to the click operation is matched with the coordinate of the target keyword in the keywords when the click operation is received.
10. The apparatus of claim 9, the response module comprising:
the judging unit is used for judging whether the click coordinates are in the coordinate range of a target keyword in the keywords or not;
and the response unit is used for responding to the clicking operation if the clicking coordinate is in the coordinate range of the target keyword.
11. The apparatus according to claim 10, the judging unit comprising:
the first acquisition unit is used for acquiring the coordinate range of each keyword in the target text;
and the first determining unit is used for matching the click coordinate with the coordinate range of each keyword so as to determine whether the click coordinate is in the coordinate range of the target keyword.
12. The apparatus of claim 11, further comprising:
a second obtaining unit, configured to obtain a start-stop range of the keyword in a target paragraph, where the target paragraph is a paragraph in the target text where the keyword is located;
and the second determining unit is used for determining the coordinate range of the key according to the starting and stopping range of the key in the target paragraph and the font style of the target paragraph.
13. The apparatus of claim 12, the second determination unit comprising:
a first determining subunit, configured to determine, according to a start-stop range of the keyword in a target paragraph and a font style of the target paragraph, a target line in which the keyword is located;
and the second determining subunit is used for determining the coordinate range of the keyword according to the start-stop range of the target line and the keyword in the target paragraph.
14. The apparatus of claim 10, the response module comprising:
the third acquisition unit is used for acquiring the coordinate range of each character in the target text;
and the third determining unit is used for matching the click coordinate with the coordinate range of each character in the target text to determine whether the click coordinate is in the coordinate range of the target keyword.
15. The apparatus of any of claims 9-14, the response module comprising:
the first display unit is used for displaying a plurality of response options corresponding to the target keyword, and different response options are used for displaying different function pages;
and the second display unit is used for receiving an input response option selection instruction and displaying a function page which is indicated by the response option selection instruction and corresponds to the target keyword.
16. The apparatus of any of claims 9-14, the response module comprising:
and the third display unit is used for jumping to other functional pages corresponding to the target keywords or displaying the other functional pages corresponding to the target keywords by using a floating frame.
17. An electronic device, comprising:
at least one processor; and a memory communicatively coupled to the at least one processor;
wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-8.
18. A non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of any one of claims 1-8.
19. A computer program product comprising a computer program which, when executed by a processor, implements the method of any one of claims 1-8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110171011.6A CN112861504A (en) | 2021-02-08 | 2021-02-08 | Text interaction method, device, equipment, storage medium and program product |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110171011.6A CN112861504A (en) | 2021-02-08 | 2021-02-08 | Text interaction method, device, equipment, storage medium and program product |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112861504A true CN112861504A (en) | 2021-05-28 |
Family
ID=75989089
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110171011.6A Pending CN112861504A (en) | 2021-02-08 | 2021-02-08 | Text interaction method, device, equipment, storage medium and program product |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112861504A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113515221A (en) * | 2021-07-30 | 2021-10-19 | 长城计算机软件与系统有限公司 | Picture and character comparison display method and device based on electronic document |
Citations (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH03260768A (en) * | 1990-03-09 | 1991-11-20 | Fuji Electric Co Ltd | Key word emphasis display device |
CN101656024A (en) * | 2009-09-08 | 2010-02-24 | 成都时代诺亚舟教育软件有限公司 | Electronic learning device and realizing method thereof |
CN102799573A (en) * | 2012-06-27 | 2012-11-28 | 北京经舆典网络科技有限公司 | Method and system for annotating webpage |
CN102902661A (en) * | 2012-10-24 | 2013-01-30 | 广东欧珀移动通信有限公司 | Method for realizing hyperlinks of electronic books |
CN105243885A (en) * | 2015-10-26 | 2016-01-13 | 广东佳学信息科技有限公司 | Touch reading method based on intelligent device and system |
CN105302466A (en) * | 2015-10-31 | 2016-02-03 | 深圳市金立通信设备有限公司 | Text operation method and terminal |
CN105631051A (en) * | 2016-02-29 | 2016-06-01 | 华南理工大学 | Character recognition based mobile augmented reality reading method and reading system thereof |
CN106202098A (en) * | 2015-05-05 | 2016-12-07 | 阿里巴巴集团控股有限公司 | The method and apparatus of click location in record and reduction webpage |
CN107765939A (en) * | 2017-09-08 | 2018-03-06 | 广州视源电子科技股份有限公司 | Interaction method and system of presentation document, readable storage medium and terminal equipment |
CN108334608A (en) * | 2018-02-02 | 2018-07-27 | 广东欧珀移动通信有限公司 | Link generation method, device, storage medium and the electronic equipment of five application page |
CN108363792A (en) * | 2018-02-13 | 2018-08-03 | 广东欧珀移动通信有限公司 | Link generation method, device, storage medium and the electronic equipment of five application page |
CN109120781A (en) * | 2018-08-03 | 2019-01-01 | Oppo广东移动通信有限公司 | Information cuing method, electronic device and computer readable storage medium |
CN110471599A (en) * | 2019-08-14 | 2019-11-19 | 广东小天才科技有限公司 | Screen word-selecting searching method, device, electronic equipment and storage medium |
-
2021
- 2021-02-08 CN CN202110171011.6A patent/CN112861504A/en active Pending
Patent Citations (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH03260768A (en) * | 1990-03-09 | 1991-11-20 | Fuji Electric Co Ltd | Key word emphasis display device |
CN101656024A (en) * | 2009-09-08 | 2010-02-24 | 成都时代诺亚舟教育软件有限公司 | Electronic learning device and realizing method thereof |
CN102799573A (en) * | 2012-06-27 | 2012-11-28 | 北京经舆典网络科技有限公司 | Method and system for annotating webpage |
CN102902661A (en) * | 2012-10-24 | 2013-01-30 | 广东欧珀移动通信有限公司 | Method for realizing hyperlinks of electronic books |
CN106202098A (en) * | 2015-05-05 | 2016-12-07 | 阿里巴巴集团控股有限公司 | The method and apparatus of click location in record and reduction webpage |
CN105243885A (en) * | 2015-10-26 | 2016-01-13 | 广东佳学信息科技有限公司 | Touch reading method based on intelligent device and system |
CN105302466A (en) * | 2015-10-31 | 2016-02-03 | 深圳市金立通信设备有限公司 | Text operation method and terminal |
CN105631051A (en) * | 2016-02-29 | 2016-06-01 | 华南理工大学 | Character recognition based mobile augmented reality reading method and reading system thereof |
CN107765939A (en) * | 2017-09-08 | 2018-03-06 | 广州视源电子科技股份有限公司 | Interaction method and system of presentation document, readable storage medium and terminal equipment |
CN108334608A (en) * | 2018-02-02 | 2018-07-27 | 广东欧珀移动通信有限公司 | Link generation method, device, storage medium and the electronic equipment of five application page |
CN108363792A (en) * | 2018-02-13 | 2018-08-03 | 广东欧珀移动通信有限公司 | Link generation method, device, storage medium and the electronic equipment of five application page |
CN109120781A (en) * | 2018-08-03 | 2019-01-01 | Oppo广东移动通信有限公司 | Information cuing method, electronic device and computer readable storage medium |
CN110471599A (en) * | 2019-08-14 | 2019-11-19 | 广东小天才科技有限公司 | Screen word-selecting searching method, device, electronic equipment and storage medium |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113515221A (en) * | 2021-07-30 | 2021-10-19 | 长城计算机软件与系统有限公司 | Picture and character comparison display method and device based on electronic document |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110309475B (en) | Page display method and device, terminal equipment and storage medium | |
CN111209374A (en) | Data query display method and device, computer system and readable storage medium | |
CN113434755A (en) | Page generation method and device, electronic equipment and storage medium | |
CN114218890A (en) | Page rendering method and device, electronic equipment and storage medium | |
CN115578486A (en) | Image generation method and device, electronic equipment and storage medium | |
CN113836462A (en) | Page description file generation method, device, equipment and storage medium | |
CN113407745B (en) | Data labeling method, device, electronic equipment and computer readable storage medium | |
CN113553123B (en) | Data processing method, device, electronic equipment and storage medium | |
US10769372B2 (en) | Synonymy tag obtaining method and apparatus, device and computer readable storage medium | |
CN110647327A (en) | Method and device for dynamic control of user interface based on card | |
CN113837194A (en) | Image processing method, image processing apparatus, electronic device, and storage medium | |
CN113626441A (en) | Text management method, device and equipment based on scanning equipment and storage medium | |
CN110852057A (en) | Method and device for calculating text similarity | |
CN112861504A (en) | Text interaction method, device, equipment, storage medium and program product | |
CN111651969B (en) | style migration | |
CN114077371B (en) | Information display method, device, electronic equipment and storage medium | |
CN113344620A (en) | Method, device and storage medium for issuing welfare information | |
CN113515210A (en) | Display method, display device, electronic equipment and storage medium | |
CN113221035A (en) | Method, apparatus, device, medium, and program product for determining an abnormal web page | |
CN113961672A (en) | Information labeling method and device, electronic equipment and storage medium | |
CN113051504A (en) | Document preview method, apparatus, device, storage medium and program product | |
CN113641933A (en) | Abnormal webpage identification method, abnormal site identification method and device | |
CN111488537A (en) | Page display method and device | |
CN113672223B (en) | Data display method, device, equipment and storage medium | |
CN113239296B (en) | Method, device, equipment and medium for displaying small program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |