CN110837336B - Information insertion method and device - Google Patents
Information insertion method and device Download PDFInfo
- Publication number
- CN110837336B CN110837336B CN201810940484.6A CN201810940484A CN110837336B CN 110837336 B CN110837336 B CN 110837336B CN 201810940484 A CN201810940484 A CN 201810940484A CN 110837336 B CN110837336 B CN 110837336B
- Authority
- CN
- China
- Prior art keywords
- information
- underline
- document
- input box
- information input
- 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
Links
Images
Classifications
-
- 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/0487—Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
- G06F3/0489—Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using dedicated keyboard keys or combinations thereof
- G06F3/04892—Arrangements for controlling cursor position based on codes indicative of cursor displacements from one discrete location to another, e.g. using cursor control keys associated to different directions or using the tab key
Landscapes
- Engineering & Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
The embodiment of the invention provides an information insertion method and device, and relates to the technical field of computer office, wherein the method comprises the following steps: detecting underlines of information to be inserted in the document; inserting an information input box at the position of the underline; and acquiring the information input by the user in the information input box, and realizing the insertion of the acquired information in the document. By applying the scheme provided by the embodiment of the invention to insert information, the process of inserting information in the document can be simplified.
Description
Technical Field
The invention relates to the technical field of computer office work, in particular to an information insertion method and device.
Background
With the enhancement of environmental awareness of people, the continuous upgrading of office mode requirements of various industries and the promotion of informatization construction, paperless office work is more and more popularized by virtue of the advantages of convenience, high efficiency and resource conservation. For example, documents that require a user to fill in and feedback, such as forms of application forms, questionnaires, and the like, have been increasingly electronic.
In the prior art, when a user fills in an electronic document and inserts information into the document, the user is required to manually insert an information input box at an information insertion position and then input the information to be inserted into the information input box. If information needs to be inserted at multiple positions of a document, a user needs to insert an information input box at each position where information needs to be inserted in sequence. This makes the process of inserting information in the document cumbersome.
Disclosure of Invention
The embodiment of the invention aims to provide an information inserting method and device so as to simplify the process of inserting information into a document. The specific technical scheme is as follows:
the embodiment of the invention provides an information insertion method, which comprises the following steps:
detecting underlines of information to be inserted in the document;
inserting an information input box at the position of the underline;
and acquiring the information input by the user in the information input box, and realizing the insertion of the acquired information in the document.
In an implementation manner of the present invention, before detecting an underline of information to be inserted in a document, the method further includes:
acquiring a click position of a user for clicking the document content;
the detecting the underline of the document needing to be inserted with information comprises the following steps:
and detecting underlines of information to be inserted in the document according to the click positions.
In an implementation manner of the present invention, the detecting, according to the click position, an underline in which information needs to be inserted in a document includes:
determining the position of a first preset number of characters before the click position as a first position;
determining the position of a second preset number of characters after the click position as a second position;
and detecting underlines of the information needing to be inserted in the range of [ first position, second position ] in the document.
In an implementation manner of the present invention, the detecting, according to the click position, an underline in which information needs to be inserted in a document includes:
obtaining a document screenshot containing the click position and with a preset size;
and detecting underlines of information required to be inserted in the document screenshot by adopting an image recognition technology.
In an implementation manner of the present invention, the inserting an information input box at a position where the underline is located includes:
determining the width of an information input box according to the third position and the right end position of the underline, wherein the third position is as follows: the left end position of the underline is a position with a preset distance to the right;
and inserting the information input box with the width at the third position.
An embodiment of the present invention further provides an information inserting apparatus, where the apparatus includes:
the underline detection module is used for detecting underlines of information needing to be inserted in the document;
the input box inserting module is used for inserting an information input box at the position of the underline;
and the information insertion module is used for acquiring the information input by the user in the information input box and realizing the insertion of the acquired information in the document.
In an implementation manner of the present invention, the apparatus further includes:
the position obtaining module is used for obtaining the clicking position of the content of the document clicked by the user before the detection module detects the underline of the information to be inserted in the document;
the underline detection module, comprising:
and the underline detection submodule is used for detecting underlines of information required to be inserted in the document according to the click position.
In one implementation manner of the present invention, the underline detection sub-module includes:
the first position determining unit is used for determining that the position of a first preset number of characters before the click position is a first position;
the second position determining unit is used for determining that the position of a second preset number of characters after the clicking position is a second position;
and the first underline detection unit is used for detecting underlines needing to insert information in the range of [ the first position and the second position ] in the document.
In one implementation manner of the present invention, the underline detection sub-module includes:
a screenshot obtaining unit, configured to obtain a document screenshot of a preset size that includes the click position;
and the second underline detection unit is used for detecting underlines of information required to be inserted in the document screenshot by adopting an image recognition technology.
In one implementation manner of the present invention, the input box insertion module includes:
a width determination submodule, configured to determine a width of the information input box according to a third position and a right end position of the underline, where the third position is: the left end position of the underline is a position with a preset distance to the right;
and the input box inserting sub-module is used for inserting the information input box with the width at the third position.
The embodiment of the invention also provides electronic equipment which comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus;
a memory for storing a computer program;
and a processor for implementing any of the steps of the information insertion method described above when executing the program stored in the memory.
In yet another aspect of the present invention, the present invention also provides a computer-readable storage medium, which stores instructions that, when executed on a computer, cause the computer to perform any of the steps of the information insertion method described above.
In yet another aspect of the present invention, the present invention further provides a computer program product containing instructions, which when run on a computer, causes the computer to execute any one of the above-mentioned information insertion methods.
When the scheme provided by the embodiment of the invention is applied to inserting information, underlines of the information to be inserted in the document can be detected, the information input box is inserted at the underlines, the input information is acquired, the information input box is not required to be manually inserted at the information insertion position by a user, and the process of inserting the information in the document can be simplified.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a flowchart of an information insertion method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram illustrating an effect of information insertion according to an embodiment of the present invention;
FIG. 3 is a schematic structural diagram of an information insertion apparatus according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The embodiment of the invention provides an information insertion method and device, and concepts related to the embodiment of the invention are explained first.
The underlining that needs to insert the information is: and a continuous single underline, wherein no characters or pictures can be arranged on the underline and a blank is left. As shown in fig. 2, before "mr. lii" is added, the underline between "name of australian relatives" and the comma on the same line, and the underline between "certificate number of lines" and the comma on the same line are all the underlines for which information insertion is required.
The information input box is a container for characters, figures and tables. Clicking in the information input box will cause the insertion point cursor to appear, and the user can directly input text information, draw a graph or establish a table in the information input box. Specifically, the information input box may be movable, and in addition, the size of the information input box may be adjustable.
The following describes the information insertion method provided by the embodiment of the present invention in detail by using specific embodiments.
Referring to fig. 1, fig. 1 is a flowchart of an information insertion method according to an embodiment of the present invention, including the following steps:
step S101, detecting underlines of information needing to be inserted in the document.
When underlines of information to be inserted in a document are detected, all document contents in a currently displayed page of the document may be detected as detection objects, or part of document contents in the currently displayed page of the document may be detected as detection objects, for example, the detection objects are detected by a preset number of behaviors each time according to a row arrangement sequence of the contents, where the preset number may be 1, 2, 3, and so on.
In addition, each time the underline requiring information insertion is detected, all the underlines requiring information insertion included in the detection target may be detected, or after one of the underlines requiring information insertion in the detection target is detected, the detection may be stopped, and the information insertion step may be performed after the detected underline, in which case, after the information insertion is completed at the detected underline, the underline may be continuously detected with the remaining portion of the detection target being a new detection target.
As can be seen from the above, the underline detected in this step may be one place or multiple places, and this application does not limit this.
In addition, how to detect the underline of the information to be inserted in the document is detailed in the following embodiments, which is not repeated herein.
In an embodiment of the present invention, the document may be a PDF format document, a doc format document, an html format document, or the like.
Step S102, insert the information input box at the position of the underline.
Specifically, the inserted information input box may be rectangular in shape.
In one implementation of the present invention, the inserted information input box is movable and adjustable in size. The user can click the inside of the inserted information input box to drag, so that the position where the information is required to be inserted is adjusted. The user can click the four corners or four sides of the inserted rectangular information input box to drag, so that the size of the information input box is adjusted.
When the information input box is inserted at the position of the underline, the insertion may be performed in accordance with information such as the length of the underline, the start position and the end position of the underline. For example, an information input box or the like having a length not larger than the underline length is inserted with the center position of the underline as the center.
And step S103, acquiring the information input by the user in the information input box, and realizing the insertion of the acquired information in the document.
The information input by the user in the information input box may be characters input by the user through a keyboard, a soft keyboard displayed by a touch screen, or the like, may be pictures input by the user through a paste manner, may also be drawn table data, or the like, and the form of the information input by the user in the information input box is not limited in the present application.
Regardless of what type of information the user enters in the information input box, it can be understood as information that needs to be inserted.
It will be appreciated by those skilled in the art that, for a document, the storage format is limited, and in some cases, the document may be an editable document, and in other cases, the document may not be editable.
When the document is an editable document, the step S102 may insert the information input box at the position of the underline, which may be understood as inserting the information input box in the cache file of the document, that is, inserting the information input box in the content of the document. Similarly, in step S103, the user inputs information in the information input box, which may also be understood as inserting the information input by the user into the cache file of the document, so that in this case, after acquiring the information input by the user in the information input box, the information is inserted into the document.
When the document is an uneditable document, after the information input box is inserted at the position of the underline in the step S102, the information input box is not cached in the cache file of the document because the document is the uneditable document, and thus the user does not cache in the cache file of the document after inputting information in the information input box. In order to ensure that information can be inserted into a document, in one implementation, a new document formed by superimposing the aforementioned document, an information input box, and user input information according to a display position can be generated, thereby realizing the insertion of information into the document.
The effect of the information displayed in the information insertion box may be a display effect of the information inserted after the information is inserted in the document. The inserted information input box is positioned at the position of the underline, and after the information insertion is completed, a blank underline is left above the original underline and can be used as the underline of the inserted character or picture information.
When the scheme provided by the embodiment of the invention is applied to inserting information, underlines of the information to be inserted in the document can be detected, the information input box is inserted at the underlines, the input information is acquired, the information input box is not required to be manually inserted at the information insertion position by a user, and the process of inserting the information in the document can be simplified.
When information is required to be inserted at a plurality of positions in a document and the scheme provided by the embodiment of the invention is applied to inserting the information, the manual insertion of the information input box by a user can be omitted for a plurality of times, and further, the process of inserting the information in the document can be greatly simplified.
In an implementation manner of the present invention, before the step S101, a click position where the user clicks the content of the document may be obtained, and when an underline that needs to insert information in the document is detected in the step S101, the underline that needs to insert information in the document may be detected according to the click position.
For an electronic device operated by using a mouse, the click in the embodiment may be a click of a left button of the mouse, and for an electronic device operated by using a touch screen, the click in the embodiment may be a click of the touch screen.
The obtained click position may be a relative position on the document page with respect to the edge of the document page, or may be a display position in the display area of the device.
In this implementation, the information is inserted according to the position where the user clicks, and the clicked position is generally located near the position where the user wants to insert the information. Therefore, when a plurality of positions needing to insert information exist in the document, the information insertion can be realized according to the personalized information insertion sequence of the user.
Based on the foregoing implementation manner, in another implementation manner of the present invention, when detecting an underline that needs to insert information in a document according to the click position, the position where a first preset number of characters are located before the click position may be determined as a first position, the position where a second preset number of characters are located after the click position may be determined as a second position, and then the underline that needs to insert information in a [ first position, second position ] range in the document may be detected.
Specifically, the click position is expressed before: before the character position corresponding to the click position in the document, the click position is followed by the following expression: after the character position corresponding to the click position in the document, that is, the determined first position and the determined second position, relative to the click position, may span the character line. If the number of characters before the click position within a row of characters is smaller than a first preset number, the last characters of the previous row will be involved. If the number of characters after the click position within a row of characters is smaller than a second preset number, then a number of characters at the beginning of the next row will be involved.
In one implementation, the position before the click position may be limited to the position before the character position corresponding to the click position in the currently displayed page of the document, and the position after the click position may be limited to the position after the character position corresponding to the click position in the currently displayed page of the document.
In one implementation, if the number of characters before the click position within the currently displayed page of the document is less than a first preset number, the position of the first character within the currently displayed page is determined as the first position. And if the number of the characters behind the clicking position in the clicked page is less than a second preset number, determining the position of the last character in the current display page as a second position.
The first and second preset numbers may be set to 5, 10, etc., because the user may be used to click on the middle of the underline where the information needs to be inserted, the first and second preset numbers may be set to be equal for easy detection.
During detection, the number of the continuous underline characters reaching the fourth preset number can be identified in the characters in the range of the [ first position and the second position ], and at the position of the underline, only the underline character exists, no other character exists, and the identified continuous underline characters reaching the fourth preset number are the underlines needing to insert information. Wherein the fourth preset number may be set to 5, 10, 15, etc.
In this implementation, when underlines of information to be inserted in a document are detected, the detection objects are a certain number of characters before and after the click position. When the information is inserted according to the position clicked by the user, the user does not need to accurately click the underline needing to insert the information, and the scheme provided by the implementation mode can enable the user needing to insert the information to still insert the information when the underline needing to insert the information is not accurately clicked.
In another implementation manner of the present invention, when detecting an underline of information to be inserted in a document according to the click position, a document screenshot of a preset size including the click position may also be obtained first, and then an image recognition technology is employed to detect the underline of information to be inserted in the document screenshot.
Specifically, the document screenshot is an image recognition area, and may be a screenshot in a shape of a rectangle with a preset size, which is captured by taking a click position as a central point in document content, for example: the image recognition area is a rectangular area which takes the click position as the center, is 300 pixels long in the text reading direction and is 50 pixels wide in the vertical text reading direction.
The document screenshot is an image recognition area, or may be a circular screenshot in which a click position is taken as a center of a circle in document content and a capture radius is a preset radius length, for example: the image recognition area is a circular area with a radius of 30 pixels and a click position as a center.
In the implementation mode, the underline needing to be inserted with information is identified in an image identification mode, and when the current document is a non-editable document, the underline needing to be inserted with information can be accurately determined by adopting the scheme provided by the implementation mode.
In an implementation manner of the present invention, when the information input box is inserted into the position of the underline in step S102, the width of the information input box may be determined according to the third position and the right end position of the underline, and then the information input box with the width may be inserted into the third position.
The third position is a position at which the left end position of the underline is a preset distance to the right. The preset distance may be set to 2 characters wide or 0.75 cm, etc. For the underline needing to insert information, the inserted information is inserted in the middle or the inserted information is close to the left end of the underline, so that the underline is attractive. The information to be inserted can be inserted in the middle or left position of the area where the information insertion frame is located, so that the information input frame located on the underline and with the left end close to the left end of the underline can enable the inserted information to be inserted in the middle or enable the inserted information to be close to the left end of the underline.
The width of the information input box may be a distance between the right end position of the underline and the third position, or a distance between a position at which the right end position of the underline is a preset distance to the left and the third position. The position in this implementation may be represented by page coordinates, and the distance in this implementation is the distance between the page coordinates. If the width of the information input frame is the distance between the position of the left preset distance of the right end of the underline and the third position, the left end of the information input frame is the preset distance from the left end of the underline, the right end of the information input frame is the preset distance from the right end of the underline, the information input frame is symmetrical left and right, and the display effect is attractive.
Fig. 2 is a schematic diagram illustrating the effect of information insertion according to an embodiment of the present invention, and the information input box shown in fig. 2 is "mr. li" and is close to the left end of the underline, and the right end is symmetrical to the left end.
In the implementation mode, the position and the width of the inserted information input box are determined according to the underlining condition and the preset data, and the inserted information is inserted according to the position and the size of the information input box, so that the scheme provided by the implementation mode can be applied to properly and beautifully insert the information at the position where the information is required to be inserted.
Based on the same inventive concept, according to the information insertion method provided by the above embodiment of the present invention, correspondingly, an embodiment of the present invention further provides an information insertion apparatus, a schematic structural diagram of which is shown in fig. 3, and the method specifically includes:
an underline detection module 301, configured to detect an underline in the document where information needs to be inserted;
an input box inserting module 302, configured to insert an information input box at a position where the underline is located;
and an information inserting module 303, configured to obtain information input by the user in the information input box, and implement inserting the obtained information into the document.
When the scheme provided by the embodiment of the invention is applied to inserting information, underlines of the information to be inserted in the document can be detected, the information input box is inserted at the underlines, the input information is acquired, the information input box is not required to be manually inserted at the information insertion position by a user, and the process of inserting the information in the document can be simplified.
In an implementation manner of the present invention, the apparatus further includes:
the position obtaining module is used for obtaining the clicking position of the content of the document clicked by the user before the detection module detects the underline of the information to be inserted in the document;
the underline detection module 301, comprising:
and the underline detection submodule is used for detecting underlines of information required to be inserted in the document according to the click position.
In this implementation, the information is inserted according to the position where the user clicks, and the clicked position is generally located near the position where the user wants to insert the information. Therefore, when a plurality of positions needing to insert information exist in the document, the information insertion can be realized according to the personalized information insertion sequence of the user.
In one implementation manner of the present invention, the underline detection sub-module includes:
the first position determining unit is used for determining that the position of a first preset number of characters before the click position is a first position;
the second position determining unit is used for determining that the position of a second preset number of characters after the clicking position is a second position;
and the first underline detection unit is used for detecting underlines needing to insert information in the range of [ the first position and the second position ] in the document.
In this implementation, when underlines of information to be inserted in a document are detected, the detection objects are a certain number of characters before and after the click position. When the information is inserted according to the position clicked by the user, the user does not need to accurately click the underline needing to insert the information, and the scheme provided by the implementation mode can enable the user needing to insert the information to still insert the information when the underline needing to insert the information is not accurately clicked.
In one implementation manner of the present invention, the underline detection sub-module includes:
a screenshot obtaining unit, configured to obtain a document screenshot of a preset size that includes the click position;
and the second underline detection unit is used for detecting underlines of information required to be inserted in the document screenshot by adopting an image recognition technology.
In the implementation mode, the underline needing to be inserted with information is identified in an image identification mode, and when the current document is a non-editable document, the underline needing to be inserted with information can be accurately determined by adopting the scheme provided by the implementation mode.
In an implementation manner of the present invention, the input box inserting module 302 includes:
a width determination submodule, configured to determine a width of the information input box according to a third position and a right end position of the underline, where the third position is: the left end position of the underline is a position with a preset distance to the right;
and the input box inserting sub-module is used for inserting the information input box with the width at the third position.
In the implementation mode, the position and the width of the inserted information input box are determined according to the underlining condition and the preset data, and the inserted information is inserted according to the position and the size of the information input box, so that the scheme provided by the implementation mode can be applied to properly and beautifully insert the information at the position where the information is required to be inserted.
Based on the same inventive concept, according to the information inserting method provided by the above embodiment of the present invention, correspondingly, the embodiment of the present invention further provides an electronic device, as shown in fig. 4, comprising a processor 401, a communication interface 402, a memory 403 and a communication bus 404, wherein the processor 401, the communication interface 402 and the memory 403 complete mutual communication through the communication bus 404,
a memory 403 for storing a computer program;
the processor 401 is configured to implement the steps of any of the information insertion methods in the above embodiments when executing the program stored in the memory 403.
The communication bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
When the scheme provided by the embodiment of the invention is applied to inserting information, underlines of the information to be inserted in the document can be detected, the information input box is inserted at the underlines, the input information is acquired, the information input box is not required to be manually inserted at the information insertion position by a user, and the process of inserting the information in the document can be simplified.
In yet another embodiment of the present invention, a computer-readable storage medium is further provided, which has instructions stored therein, and when the instructions are executed on a computer, the instructions cause the computer to perform the steps of any one of the above-mentioned information insertion methods.
In yet another embodiment, a computer program product containing instructions is provided, which when run on a computer causes the computer to perform any of the above-described information insertion methods.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the apparatus, the electronic device, the computer-readable storage medium, and the computer program product embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and in relation to them, reference may be made to the partial description of the method embodiments.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.
Claims (8)
1. An information insertion method, characterized in that the method comprises:
obtaining a click position of a user for clicking document content, wherein the document is a non-editable document;
determining the position of a first preset number of characters before the click position as a first position; determining the position of a second preset number of characters after the click position as a second position; identifying continuous underline characters reaching a fourth preset number within the [ first position, second position ] range in the document as underlines of the insertion information, wherein the continuous underline characters reaching the fourth preset number only comprise the underline characters;
determining the width of an information input box according to the width of the underline, and inserting the information input box with the width at the position of the underline;
and acquiring information input by a user in the information input box, and generating a new document formed by overlapping the document, the information input box and the input information according to a display position.
2. The method according to claim 1, wherein the manner of detecting the underline of the inserted information in the document further comprises:
obtaining a document screenshot containing the click position and with a preset size;
and detecting underlines of the inserted information in the document screenshot by adopting an image recognition technology.
3. The method according to claim 1 or 2, wherein the determining the width of the information input box according to the width of the underline, and inserting the information input box with the width at the position of the underline comprises:
determining the width of an information input box according to the third position and the right end position of the underline, wherein the third position is as follows: the left end position of the underline is a position with a preset distance to the right;
and inserting the information input box with the width at the third position.
4. An information insertion apparatus, characterized in that the apparatus comprises:
the position obtaining module is used for obtaining the clicking position of the content of the document clicked by the user, wherein the document is a non-editable document;
the underline detection module is used for determining that the position of a first preset number of characters before the click position is a first position; determining the position of a second preset number of characters after the click position as a second position; identifying continuous underline characters reaching a fourth preset number within the [ first position, second position ] range in the document as underlines of the insertion information, wherein the continuous underline characters reaching the fourth preset number only comprise the underline characters;
the input box inserting module is used for determining the width of the information input box according to the width of the underline and inserting the information input box at the position of the underline;
and the information insertion module is used for acquiring the information input by the user in the information input box and generating a new document formed by superposing the document, the information input box and the input information according to the display position.
5. The apparatus of claim 4, wherein the underline detection module further comprises:
a screenshot obtaining unit, configured to obtain a document screenshot of a preset size that includes the click position;
and the second underline detection unit is used for detecting underlines of the inserted information in the document screenshot by adopting an image recognition technology.
6. The apparatus of claim 4 or 5, wherein the input box insertion module comprises:
a width determination submodule, configured to determine a width of the information input box according to a third position and a right end position of the underline, where the third position is: the left end position of the underline is a position with a preset distance to the right;
and the input box inserting sub-module is used for inserting the information input box with the width at the third position.
7. An electronic device is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing mutual communication by the memory through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any one of claims 1-3 when executing a program stored on a memory.
8. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method steps of any one of claims 1-3.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810940484.6A CN110837336B (en) | 2018-08-17 | 2018-08-17 | Information insertion method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810940484.6A CN110837336B (en) | 2018-08-17 | 2018-08-17 | Information insertion method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110837336A CN110837336A (en) | 2020-02-25 |
CN110837336B true CN110837336B (en) | 2021-08-20 |
Family
ID=69574431
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810940484.6A Active CN110837336B (en) | 2018-08-17 | 2018-08-17 | Information insertion method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110837336B (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1984408A (en) * | 2005-11-29 | 2007-06-20 | Lg电子株式会社 | Method and terminal for displaying character capacity |
CN103366109A (en) * | 2013-08-14 | 2013-10-23 | 德讯科技股份有限公司 | XWindow substitution filling method based on digital image recognition algorithm |
CN103383629A (en) * | 2013-06-27 | 2013-11-06 | 广州市动景计算机科技有限公司 | Input method and device based on HTML5 |
CN104267804A (en) * | 2014-09-15 | 2015-01-07 | 联想(北京)有限公司 | Information input method and electronic device |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP4408039B2 (en) * | 2003-11-13 | 2010-02-03 | キヤノン株式会社 | Information processing apparatus, printing system, information processing method, and printing method |
-
2018
- 2018-08-17 CN CN201810940484.6A patent/CN110837336B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1984408A (en) * | 2005-11-29 | 2007-06-20 | Lg电子株式会社 | Method and terminal for displaying character capacity |
CN103383629A (en) * | 2013-06-27 | 2013-11-06 | 广州市动景计算机科技有限公司 | Input method and device based on HTML5 |
CN103366109A (en) * | 2013-08-14 | 2013-10-23 | 德讯科技股份有限公司 | XWindow substitution filling method based on digital image recognition algorithm |
CN104267804A (en) * | 2014-09-15 | 2015-01-07 | 联想(北京)有限公司 | Information input method and electronic device |
Non-Patent Citations (1)
Title |
---|
wps文字里怎么在下划线上打字;东北林子;《https://zhidao.***.com/question/201138607.html?fr=iks&word=%CF%C2%BB%AE%CF%DF%C9%CF%B2%E5%C8%EB%CE%C4%B1%BE%BF%F2%BD%F8%D0%D0%CE%C4%D7%D6%CA%E4%C8%EB&ie=gbk》;20150413;正文第1-2页 * |
Also Published As
Publication number | Publication date |
---|---|
CN110837336A (en) | 2020-02-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106484266B (en) | Text processing method and device | |
JP2012059248A (en) | System, method, and program for detecting and creating form field | |
WO2020125345A1 (en) | Electronic book note processing method, handwriting reading device, and storage medium | |
CN111444750B (en) | PDF document identification method and device and electronic equipment | |
US20210072880A1 (en) | Method and electronic device for generating at least one data item from screenshot | |
US20200019805A1 (en) | Data processing method and device for electronic book, and mobile terminal | |
TW201501016A (en) | Data searching method and electronic apparatus thereof | |
CN111414727B (en) | Editing method and device for PDF document header footer and electronic equipment | |
CN110990010A (en) | Software interface code generation method and device | |
CN109992750B (en) | Table object screening method and device, electronic equipment and storage medium | |
EP3256937A1 (en) | Responsive course design system and method | |
CN112417899A (en) | Character translation method, device, computer equipment and storage medium | |
US8756494B2 (en) | Methods and systems for designing documents with inline scrollable elements | |
CN103279275B (en) | Analyze method and the portable electric device of document content | |
CN108415890B (en) | Method for setting top display unit cell, terminal equipment and computer readable storage medium | |
CN113139371A (en) | Visual chart construction method, device and system and storage medium | |
US20170017370A1 (en) | Device and method for processing data | |
CN111428452B (en) | Annotation data storage method and device | |
CN110837336B (en) | Information insertion method and device | |
CN113762235A (en) | Method and device for detecting page overlapping area | |
CN110363189B (en) | Document content restoration method and device, electronic equipment and readable storage medium | |
CN111199136B (en) | Document content display method, device and equipment | |
CN109992759B (en) | Table object editing method and device, electronic equipment and storage medium | |
US20150347376A1 (en) | Server-based platform for text proofreading | |
TWI489370B (en) | System and method for rendering widget |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |