CN113655973B - Page segmentation method and device, electronic equipment and storage medium - Google Patents

Page segmentation method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN113655973B
CN113655973B CN202110807364.0A CN202110807364A CN113655973B CN 113655973 B CN113655973 B CN 113655973B CN 202110807364 A CN202110807364 A CN 202110807364A CN 113655973 B CN113655973 B CN 113655973B
Authority
CN
China
Prior art keywords
segmented
sub
image
page
user
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110807364.0A
Other languages
Chinese (zh)
Other versions
CN113655973A (en
Inventor
马英峰
冯政元
冯冉
刘富强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Valueonline Technology Co ltd
Original Assignee
Shenzhen Valueonline Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Valueonline Technology Co ltd filed Critical Shenzhen Valueonline Technology Co ltd
Priority to CN202110807364.0A priority Critical patent/CN113655973B/en
Publication of CN113655973A publication Critical patent/CN113655973A/en
Application granted granted Critical
Publication of CN113655973B publication Critical patent/CN113655973B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/12Digital output to print unit, e.g. line printer, chain printer
    • G06F3/1201Dedicated interfaces to print systems
    • G06F3/1223Dedicated interfaces to print systems specifically adapted to use a particular technique
    • G06F3/1237Print job management
    • G06F3/1242Image or content composition onto a page
    • G06F3/1243Variable data printing, e.g. document forms, templates, labels, coupons, advertisements, logos, watermarks, transactional printing, fixed content versioning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/12Digital output to print unit, e.g. line printer, chain printer
    • G06F3/1201Dedicated interfaces to print systems
    • G06F3/1202Dedicated interfaces to print systems specifically adapted to achieve a particular effect
    • G06F3/1203Improving or facilitating administration, e.g. print management
    • G06F3/1208Improving or facilitating administration, e.g. print management resulting in improved quality of the output result, e.g. print layout, colours, workflows, print preview

Abstract

The application is applicable to the technical field of computers, and provides a page segmentation method, a page segmentation device, electronic equipment and a storage medium, wherein the page segmentation method comprises the following steps: acquiring an image to be segmented; the image to be segmented comprises content to be segmented; responding to the segmentation operation of a user on the content to be segmented, and segmenting the image to be segmented into a plurality of sub-images; generating a target file according to the plurality of sub-images; the target file comprises a plurality of first sub-pages, and each first sub-page in the plurality of first sub-pages corresponds to each sub-image in the plurality of sub-images one by one. By responding to the segmentation operation of a user aiming at the image to be segmented, the image to be segmented is segmented, and the target file is generated, so that the content layout of the generated target file meets the requirement of the user on the page layout, and the problems that the picture is cut off due to forced paging according to the page height, or the content is incoherent due to improper paging of characters are avoided.

Description

Page segmentation method and device, electronic equipment and storage medium
Technical Field
The application belongs to the technical field of computers, and particularly relates to a page segmentation method, a page segmentation device, electronic equipment and a storage medium.
Background
At present, when a user browses a webpage by using a computer browser, if the user needs to print the webpage, a printing program generally calls a printing control of the browser to realize printing.
However, the page layout of the file printed by the browser's own print control may have a problem that the user's needs cannot be satisfied.
Disclosure of Invention
The embodiment of the application provides a page segmentation method, a page segmentation device, electronic equipment and a storage medium. The problem that the page layout of the file cannot meet the requirements of users can be solved.
In a first aspect, an embodiment of the present application provides a page segmentation method, including:
acquiring an image to be segmented; the image to be segmented comprises content to be segmented;
responding to the segmentation operation of a user on the content to be segmented, and segmenting the image to be segmented into a plurality of sub-images;
generating a target file according to the plurality of sub-images; the target file comprises a plurality of first sub-pages, and each first sub-page in the plurality of first sub-pages corresponds to each sub-image in the plurality of sub-images one by one.
It is understood that by responding to the segmentation operation of the user for the image to be segmented, the image to be segmented is segmented, and the target file is generated, so that the content layout of the generated target file meets the requirement of the user on the page layout, and the problems that the picture is cut off due to forced paging according to the page height, or the content is incoherent due to improper paging of characters are avoided.
In a second aspect, an embodiment of the present application provides a page splitting apparatus, including:
the image segmentation module is used for obtaining images to be segmented; the image to be segmented comprises content to be segmented;
the image segmentation module is used for responding to the segmentation operation of a user on the content to be segmented and segmenting the image to be segmented into a plurality of sub-images;
the generation target file module is used for generating a target file according to the plurality of sub-images; the target file comprises a plurality of first sub-pages, and each sub-page in the plurality of first sub-pages corresponds to each sub-image in the plurality of first sub-images one by one.
In a third aspect, an embodiment of the present application provides an electronic device, including:
a memory, a processor and a computer program stored in the memory and executable on the processor, which when executed by the processor, performs the method steps of the first aspect described above.
In a fourth aspect, embodiments of the present application provide a computer-readable storage medium, comprising: the computer-readable storage medium stores a computer program which, when executed by a processor, implements the method steps of the first aspect described above.
In a fifth aspect, embodiments of the present application provide a computer program product for causing an electronic device to carry out the method steps of the first aspect described above when the computer program product is run on the electronic device.
It will be appreciated that the advantages of the second to fifth aspects may be found in the relevant description of the first aspect, and are not described here again.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required for the embodiments or the description of the prior art will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a page splitting method according to an embodiment of the present disclosure;
FIG. 2 is a flow chart of a page splitting method according to another embodiment of the present disclosure;
FIG. 3 is a schematic diagram of a page splitting method according to an embodiment of the present disclosure;
FIG. 4 is a flowchart illustrating a page splitting method according to another embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of a page dividing device according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system configurations, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
It should be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It should also be understood that the term "and/or" as used in this specification and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes such combinations.
As used in this specification and the appended claims, the term "if" may be interpreted as "when..once" or "in response to a determination" or "in response to detection" depending on the context. Similarly, the phrase "if a determination" or "if a [ described condition or event ] is detected" may be interpreted in the context of meaning "upon determination" or "in response to determination" or "upon detection of a [ described condition or event ]" or "in response to detection of a [ described condition or event ]".
In addition, in the description of the present application and the appended claims, the terms "first," "second," "third," and the like are used merely to distinguish between descriptions and are not to be construed as indicating or implying relative importance.
Reference in the specification to "one embodiment" or "some embodiments" or the like means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," and the like in the specification are not necessarily all referring to the same embodiment, but mean "one or more but not all embodiments" unless expressly specified otherwise. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless expressly specified otherwise.
In some scenarios, when a user browses a web page using a computer browser, if the user needs to print the web page, the printing program generally calls a printing control of the browser to realize printing. If the length of the printed web page exceeds the length of the paper, the browser can only forcefully page the printed control according to the height of the web page. The paging mode is easy to cause the problems that the browser printing plug-in is forced to page according to the height of the webpage, so that pictures in the webpage are cut off, or the content is incoherent due to improper paging of characters. In other scenarios, if a user performs improper paging on a page when generating a file that is not easy to edit, such as a portable document format (Portable Document Format, PDF) file, a problem may occur that a paragraph is split, resulting in content inconsistency.
The embodiment of the application provides a page segmentation method, which enables a user to customize a segmentation position during page printing by responding to segmentation operation of the user, such as paging among paragraphs, paging among media contents and the like, so as to avoid the problems that a print plug-in of a similar browser is forced to page according to the height of a webpage, pictures in the page are cut off, or improper paging of characters leads to incoherence of contents and the like.
Fig. 1 shows a page dividing method provided in an embodiment of the present application, and as shown in fig. 1, the method includes steps S110 to S130. The specific implementation principle of each step is as follows:
s110, acquiring an image to be segmented; the image to be segmented comprises content to be segmented.
The image to be segmented may be image data or an image file. The image data may be image data represented by a multi-dimensional array stored in a memory or other storage medium, although other data structures may be used to store the represented image data. The image file may be a binary file stored in a preset image format. The preset image format includes, but is not limited to, a portable network graphic (Portable Network Graphics, PNG) image, a joint photographic experts group (Joint Photographic Experts Group, JPEG) image, or a Bitmap (Bitmap, BMP) image format.
The content to be segmented can be web page content which is ready to be printed by a user, PDF file content which is unreasonable in layout, or content of other files which are unreasonable in layout.
In some embodiments, the method for obtaining the image to be segmented may be obtaining the image to be segmented obtained by capturing a screenshot of a display interface of a third party application. The third party application may be a browser and the display interface of the third party application may be a display interface of the browser. The step of carrying out screenshot on the display interface of the browser comprises the step of carrying out long screenshot operation on a page displayed on the current interface of the browser by adopting a long screenshot plug-in or third party long screenshot software to obtain an image to be segmented.
In some embodiments, as shown in fig. 2, the manner of acquiring the image to be segmented may include step S210 and step S220.
S210, acquiring a file to be segmented, wherein the file to be segmented comprises a plurality of second sub-pages.
The to-be-segmented text can be a PDF file with page layout which does not meet the requirements of users, an image file with page layout which does not meet the requirements of users, or a file which is not easy to edit and has other page layout which does not meet the requirements of users. For example, the file to be divided is a PDF file containing a plurality of PDF pages (second sub pages).
In some embodiments, the obtaining the file to be segmented may be in response to a printing operation triggered by the user on a display interface of the third party application, and printing the display page to obtain the file to be segmented. In a specific example, the user clicks a print button or presses a print shortcut key of the browser, the browser pops up a print plug-in, the user selects a print to file option in the print plug-in, and the page displayed by the current browser, that is, the content to be segmented, is printed to the file to be segmented. As shown in fig. 3, taking the file 310 to be divided as a PDF, a printing plug-in the browser performs forced paging on the content of the page to be printed according to the default height of the PDF file, and stores the content of the page to be printed in the form of one or more PDF sub-pages in the PDF file. It can be understood that, at this time, since the content of the page to be printed is forced to be paged according to the default height of the PDF file, when one PDF sub-page of the PDF file cannot accommodate the content of the page to be printed, the picture or the media content in the page to be printed is easily forced to be divided into the PDF sub-pages of the two PDF files. Referring to fig. 3, the second picture is divided into two pages 311 and 312 in error in fig. 3.
In some embodiments, the obtaining the file to be segmented may be obtaining the file to be segmented from a target storage medium. In a specific example, the user a prints the web page of the content to be divided to a PDF file by the method of the above example, and saves it in the target storage medium. User a or other users may extract this PDF file in the target storage medium. The target storage medium includes, but is not limited to, an internal storage medium, an external storage medium, a remote storage medium, and a cloud storage medium of an electronic device implementing the page splitting method. The target storage medium is not particularly limited in this application.
And S220, sequentially splicing the to-be-segmented content contained in each second sub-page in the plurality of second sub-pages to obtain the to-be-segmented image.
In some embodiments, the sequentially splicing the to-be-segmented content included in each of the plurality of second sub-pages to obtain the to-be-segmented image may include: acquiring a cut-off position of the content to be segmented contained in each second sub-page of the plurality of second sub-pages; intercepting target areas containing the content to be segmented in each second sub-page according to the cut-off positions; and splicing the cut target areas in sequence according to the sequence of the second sub-page to obtain the image to be segmented. In a specific example, as shown in fig. 3, the left side in fig. 3 is an example of a file 310 to be divided, which may be a PDF file, that is divided by mistake. Taking the file to be divided as a PDF file, the PDF file includes two second sub pages (PDF pages) 311 and 312. When the browser plug-in prints the web page to be printed to the PDF file, the web page to be printed is forcibly divided into two second sub-pages (PDF pages) 311 and 312. The margin from the web page content to the PDF page in the PDF file can be obtained in advance by measuring or referring to the document and the like. And determining the truncated position of the content to be printed in each first sub-page of the PDF according to the margin. The default parameters of the dividing height can be obtained by consulting the file of the plug-in or software for generating the PDF, the cutting position of the content to be divided is determined by the default parameters of the dividing height, and the cutting position can comprise at least one of the upper margin, the lower margin, the left margin and the right margin of the content to be printed from the edge of the PDF page. The truncated position of the image can also be obtained by detecting the distribution of pixels. After acquiring the cutoff positions, the target areas 3111 and 3112 (areas marked with dashed boxes in fig. 3) in the second sub-pages 311 and 312 are determined according to the cutoff positions, and the cut target areas 3111 and 3112 are spliced in the order of the PDF pages 311 and 312, to obtain the image 320 to be segmented.
In a specific example, the file to be divided may be a prestored PDF file containing a plurality of PDF pages. Each PDF page contains part of the content of the web page that the user needs to print. In the embodiment of the application, the partial content of the webpage to be printed by the user in the PDF page can be segmented by providing a browser plug-in or a third party application program, so as to obtain the screenshot of the partial content of the webpage, and each screenshot is spliced in sequence according to the order of the PDF page, so that the image to be segmented is obtained. The image to be segmented may be a long picture containing the content of the page to be printed, and it is understood that the content to be printed contained in the long picture is continuous and non-segmented.
S120, responding to the segmentation operation of the user on the content to be segmented, and segmenting the image to be segmented into a plurality of sub-images.
In some embodiments, in response to a user's splitting operation on the content to be split, splitting the image to be split into a plurality of sub-images may include: responding to the segmentation instruction triggered by the user, and displaying the image to be segmented; if the fact that the user executes the preset operation on the image to be segmented is detected, recording a first position of the user executing the preset operation, and taking the first position as a segmentation position; the image to be segmented is segmented into a plurality of sub-images based on the segmentation locations.
In a specific example, the image to be segmented may be displayed in response to the user-triggered segmentation instruction. In response to the segmentation command triggered by the user, displaying the image to be segmented may provide a button or a shortcut for the user to send the segmentation command, and when the user presses the button for sending the segmentation command or presses the shortcut at the user interface point, displaying an interface containing the image to be segmented, for example, displaying a long screenshot containing the webpage content to be printed, or displaying the image to be segmented obtained by extracting the target content of the PDF file in the above embodiment. At this point, detection of the user's operation on the interface containing the image to be segmented is started. If the user is detected to execute the preset operation on the image to be segmented, recording a first position aimed at by the user to execute the preset operation, and taking the first position as a segmentation position.
The preset operation includes, but is not limited to, single mouse click, double mouse click, matching of a mouse and a track, and matching of a mouse and a keyboard. The cooperation of the mouse and the track may be pressing a left mouse key to draw a line. The cooperation of the mouse and the keyboard can be that the mouse case and the keyboard keys are simultaneously in a pressed state.
Wherein the first position may be the number of rows of the current pixel, e.g. row 120 pixels; or the relative distance of the current user selected position from the top of the image to be segmented, e.g. the image to be segmented is a long screenshot, the current position being located 20% below the top of the long screenshot.
It will be appreciated that the user may select a plurality of first positions which divide the image to be segmented into a number of sub-regions. For example, the image to be segmented is a long graph in which the user has selected a plurality of first positions, which may divide the long graph into a plurality of sub-images.
In a specific example, as shown in fig. 3, the image 320 to be segmented is displayed in response to the user-triggered segmentation instruction. When it is detected that the user performs a mouse double-click operation at the first position 321 in the image to be segmented, the position where the mouse double-clicks is used as a segmentation position, and the image to be segmented is divided into upper and lower sub-images according to the segmentation position.
S130, generating a target file according to the plurality of sub-images; the target file comprises a plurality of first sub-pages, and each first sub-page in the plurality of first sub-pages corresponds to each sub-image in the plurality of sub-images one by one.
In some embodiments, the target file may be generated according to the plurality of sub-images, and each sub-image may be saved to the target file, for example, a PDF file, where each sub-image is the content of a first sub-page of the target file, that is, each page of the PDF file corresponds to one sub-image.
In a specific example, as shown in fig. 3, after the image 320 to be divided is displayed and the image to be divided is divided into a plurality of sub-images in response to a division operation of a user with respect to the content to be divided, the respective sub-images are respectively saved to the first sub-pages 331 and 332 of the target file 330. The target file may be another PDF file, and the first sub-page is a PDF page of the PDF file.
In some embodiments, the methods provided by embodiments of the present application may be implemented using a single electronic device, such as a desktop computer, laptop computer, tablet computer, cell phone, or the like. Multiple communicatively coupled devices may also be employed to implement the methods provided by embodiments of the present application. For example, in response to a segmentation operation of a user for an image to be segmented, the image to be segmented is segmented to generate a target file, the segmentation operation of a terminal developing user for the image to be segmented may be adopted, the image to be segmented and the segmentation position are sent to a server, the server performs segmentation on the image to be segmented according to the segmentation position to obtain the target file, and the server sends the target file back to the terminal.
It can be understood that by responding to the segmentation operation of the user for the image to be segmented, the image to be segmented is segmented, and the target file is generated, so that the content layout of the generated target file meets the requirement of the user on the page layout, and the problems that the picture is cut off due to forced paging according to the page height, or the content is incoherent due to improper paging of characters are avoided.
On the basis of the embodiment of the page splitting method shown in fig. 1, after generating the target file, as shown in fig. 4, steps S410 and S420 are further included:
s410, displaying prompt information, wherein the prompt information comprises information for prompting a user to save the target file or information for prompting the user to print the target file.
In some embodiments, the prompt information is displayed in a manner including but not limited to a popup prompt, an animation prompt and the like, and the content of the prompt information includes but is not limited to characters, images and the like.
And S420, responding to the selection operation triggered by the user according to the prompt information, and storing the target file or printing the target file.
In some embodiments, the target file may be a PDF file or an image file. For example, if the user selects to save the target file, the target file is packaged into a PDF file format and saved to the storage medium. For another example, when the user selects to print the target file, the target file is sent to the printer, and the target file is printed by the printer.
It should be understood that the sequence number of each step in the foregoing embodiment does not mean that the execution sequence of each process should be determined by the function and the internal logic of each process, and should not limit the implementation process of the embodiment of the present application in any way.
Corresponding to the above-mentioned page dividing method shown in fig. 1, fig. 5 shows a page dividing apparatus M100 provided in an embodiment of the present application, including:
the image to be segmented obtaining module M110 is used for obtaining an image to be segmented; the image to be segmented comprises content to be segmented.
The image to be segmented module M120 is configured to segment the image to be segmented into a plurality of sub-images in response to a segmentation operation of the user on the content to be segmented.
A generation target file module M130, configured to generate a target file according to the plurality of sub-images; the target file comprises a plurality of first sub-pages, and each sub-page in the plurality of first sub-pages corresponds to each sub-image in the plurality of first sub-images one by one.
It will be appreciated that various implementations and combinations of implementations and advantageous effects thereof in the above embodiments are equally applicable to this embodiment, and will not be described here again.
Fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application. The electronic device implements the steps of the embodiments described above in software and/or hardware. As shown in fig. 6, the electronic device D10 of this embodiment includes: at least one processor D100 (only one is shown in fig. 6), a memory D101 and a computer program D102 stored in the memory D101 and executable on the at least one processor D100, the processor D100 implementing the steps in any of the various method embodiments described above when executing the computer program D102. Alternatively, the processor D100 may implement the functions of the modules/units in the above-described device embodiments when executing the computer program D102, for example, the functions of the modules shown in fig. 3.
The electronic device D10 may be a computing device such as a desktop computer, a notebook computer, a palm computer, a cloud server, etc. The electronic device may also be a combination of a plurality of electronic devices that are communicatively coupled, for example, a combination of a terminal and a service, where the terminal and the electronic devices together complete the page splitting method provided in the foregoing embodiment. The electronic device may include, but is not limited to, a processor D100, a memory D101. It will be appreciated by those skilled in the art that fig. 6 is merely an example of the electronic device D10 and is not meant to be limiting of the electronic device D10, and may include more or fewer components than shown, or may combine certain components, or different components, such as may also include input-output devices, network access devices, etc.
The processor D100 may be a central processing unit (Central Processing Unit, CPU), the processor D100 may also be other general purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), off-the-shelf programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory D101 may in some embodiments be an internal storage unit of the electronic device D10, such as a hard disk or a memory of the electronic device D10. The memory D101 may also be an external storage device of the electronic device D10 in other embodiments, for example, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash Card (Flash Card) or the like, which are provided on the electronic device D10. Further, the memory D101 may also include both an internal storage unit and an external storage device of the electronic device D10. The memory D101 is used for storing an operating system, an application program, a boot loader (BootLoader), data, other programs, etc., such as program codes of the computer program. The memory D101 may also be used to temporarily store data that has been output or is to be output.
It should be noted that, because the content of information interaction and execution process between the above devices/units is based on the same concept as the method embodiment of the present application, specific functions and technical effects thereof may be referred to in the method embodiment section, and will not be described herein again.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of the functional units and modules is illustrated, and in practical application, the above-described functional distribution may be performed by different functional units and modules according to needs, i.e. the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-described functions. The functional units and modules in the embodiment may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit, where the integrated units may be implemented in a form of hardware or a form of a software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working process of the units and modules in the above system may refer to the corresponding process in the foregoing method embodiment, which is not described herein again.
Embodiments of the present application also provide a computer readable storage medium storing a computer program, which when executed by a processor, may implement the steps in the above-described method embodiments.
Embodiments of the present application provide a computer program product which, when run on an electronic device, causes the electronic device to perform the steps of the method embodiments described above.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the present application implements all or part of the flow of the method of the above embodiments, and may be implemented by a computer program to instruct related hardware, where the computer program may be stored in a computer readable storage medium, where the computer program, when executed by a processor, may implement the steps of each of the method embodiments described above. Wherein the computer program comprises computer program code which may be in source code form, object code form, executable file or some intermediate form etc. The computer readable medium may include at least: any entity or device capable of carrying computer program code to a photographing device/terminal apparatus, recording medium, computer Memory, read-Only Memory (ROM), random access Memory (Random Access Memory, RAM), electrical carrier signals, telecommunications signals, and software distribution media. Such as a U-disk, removable hard disk, magnetic or optical disk, etc. In some jurisdictions, computer readable media may not be electrical carrier signals and telecommunications signals in accordance with legislation and patent practice.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and in part, not described or illustrated in any particular embodiment, reference is made to the related descriptions of other embodiments.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/network device and method may be implemented in other manners. For example, the apparatus/network device embodiments described above are merely illustrative, e.g., the division of the modules or units is merely a logical functional division, and there may be additional divisions in actual implementation, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection via interfaces, devices or units, which may be in electrical, mechanical or other forms.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
The above embodiments are only for illustrating the technical solution of the present application, and are not limiting; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application, and are intended to be included in the scope of the present application.

Claims (7)

1. A method of page segmentation, comprising:
acquiring an image to be segmented; the image to be segmented comprises content to be segmented;
responding to the segmentation operation of a user on the content to be segmented, and segmenting the image to be segmented into a plurality of sub-images;
generating a target file according to the plurality of sub-images; the target file comprises a plurality of first sub-pages, each first sub-page in the plurality of first sub-pages corresponds to each sub-image in the plurality of sub-images one by one, and each sub-image in the plurality of sub-images serves as the content of one first sub-page;
the obtaining the image to be segmented includes:
obtaining a file to be segmented, wherein the file to be segmented is a PDF file and comprises a plurality of second sub pages;
acquiring a cut-off position of the content to be segmented contained in each second sub-page of the plurality of second sub-pages; intercepting target areas containing the content to be segmented in each second sub-page according to the cut-off positions; sequentially splicing the cut target areas according to the sequence of the second sub-pages to obtain the image to be segmented;
wherein, responding to the segmentation operation of the user for the content to be segmented, the image to be segmented is segmented into a plurality of sub-images, comprising:
responding to a segmentation instruction triggered by a user, and displaying the image to be segmented;
if the fact that the user executes the preset operation on the image to be segmented is detected, recording a first position of the user executing the preset operation, and taking the first position as a segmentation position;
the image to be segmented is segmented into a plurality of sub-images based on the segmentation locations.
2. The page segmentation method as set forth in claim 1, wherein the acquiring the image to be segmented includes:
and acquiring the image to be segmented obtained by capturing the screenshot of the display interface of the third party application.
3. The page splitting method as recited in claim 1, wherein the obtaining the file to be split comprises:
responding to a printing operation triggered by a user on a display interface of a third party application, and printing a display page to obtain the file to be segmented;
or,
and acquiring the file to be segmented from the target storage medium.
4. The page splitting method as recited in claim 1, further comprising, after generating the target file:
displaying prompt information, wherein the prompt information comprises information for prompting a user to save a target file or information for prompting the user to print the target file;
and responding to the selection operation triggered by the user according to the prompt information, and storing the target file or printing the target file.
5. A processing apparatus for a page to be printed, comprising:
the image segmentation module is used for obtaining images to be segmented; the image to be segmented comprises content to be segmented;
the image segmentation module is used for responding to the segmentation operation of a user on the content to be segmented and segmenting the image to be segmented into a plurality of sub-images;
the generation target file module is used for generating a target file according to the plurality of sub-images; the target file comprises a plurality of first sub-pages, each sub-page of the plurality of first sub-pages corresponds to each sub-image of the plurality of first sub-images one by one, and each sub-image of the plurality of sub-images serves as the content of one first sub-page;
the image obtaining module is specifically configured to obtain a file to be segmented, where the file to be segmented is a PDF file and includes a plurality of second sub pages; acquiring a cut-off position of the content to be segmented contained in each second sub-page of the plurality of second sub-pages; intercepting target areas containing the content to be segmented in each second sub-page according to the cut-off positions; sequentially splicing the cut target areas according to the sequence of the second sub-pages to obtain the image to be segmented;
the image segmentation module is specifically configured to respond to a segmentation instruction triggered by a user, display the image to be segmented, record a first position of a user executing a preset operation if the user is detected to execute the preset operation on the image to be segmented, take the first position as a segmentation position, and segment the image to be segmented into a plurality of sub-images based on the segmentation position.
6. An electronic device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the page splitting method of any of claims 1 to 4 when executing the computer program.
7. A computer readable storage medium storing a computer program, wherein the computer program when executed by a processor implements the page splitting method according to any of claims 1 to 4.
CN202110807364.0A 2021-07-16 2021-07-16 Page segmentation method and device, electronic equipment and storage medium Active CN113655973B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110807364.0A CN113655973B (en) 2021-07-16 2021-07-16 Page segmentation method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110807364.0A CN113655973B (en) 2021-07-16 2021-07-16 Page segmentation method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113655973A CN113655973A (en) 2021-11-16
CN113655973B true CN113655973B (en) 2023-12-26

Family

ID=78489550

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110807364.0A Active CN113655973B (en) 2021-07-16 2021-07-16 Page segmentation method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113655973B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115202541A (en) * 2022-07-18 2022-10-18 阿里巴巴(中国)有限公司 Page generation method, device, equipment, storage medium and program product

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1801074A (en) * 2004-12-31 2006-07-12 东友科技股份有限公司 Paging method for printing file
CN101169707A (en) * 2006-10-27 2008-04-30 英业达股份有限公司 Web page printing method and web page printing system
CN105847345A (en) * 2016-03-21 2016-08-10 深圳市茁壮网络股份有限公司 Picture merging display method and device
WO2018036512A1 (en) * 2016-08-26 2018-03-01 北京金山安全软件有限公司 Jigsaw puzzle processing method, device, electronic apparatus, and server
CN109032466A (en) * 2018-06-27 2018-12-18 努比亚技术有限公司 Long screenshot method, mobile terminal and storage medium based on double screen
CN110231919A (en) * 2018-03-06 2019-09-13 株式会社理光 Web page contents print system
CN110598623A (en) * 2019-09-06 2019-12-20 深圳前海环融联易信息科技服务有限公司 Method and device for cutting and extracting picture, computer equipment and storage medium
CN111046313A (en) * 2019-11-21 2020-04-21 深圳前海环融联易信息科技服务有限公司 Intelligent screenshot method and device of webpage, computer equipment and storage medium
CN111880752A (en) * 2020-07-28 2020-11-03 平安科技(深圳)有限公司 Seal printing method and device, electronic equipment and storage medium
CN111899268A (en) * 2020-08-17 2020-11-06 上海商汤智能科技有限公司 Image segmentation method and device, electronic equipment and storage medium
CN112036123A (en) * 2020-08-31 2020-12-04 北京奇虎鸿腾科技有限公司 PDF (Portable document Format) generation method, device and equipment based on webpage and storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101984426B (en) * 2010-10-21 2013-04-10 优视科技有限公司 Method used for character splitting on webpage picture and device thereof
US20140268199A1 (en) * 2013-03-15 2014-09-18 Konica Minolta Laboratory U.S.A., Inc. PDF File Preview Manipulation

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1801074A (en) * 2004-12-31 2006-07-12 东友科技股份有限公司 Paging method for printing file
CN101169707A (en) * 2006-10-27 2008-04-30 英业达股份有限公司 Web page printing method and web page printing system
CN105847345A (en) * 2016-03-21 2016-08-10 深圳市茁壮网络股份有限公司 Picture merging display method and device
WO2018036512A1 (en) * 2016-08-26 2018-03-01 北京金山安全软件有限公司 Jigsaw puzzle processing method, device, electronic apparatus, and server
CN110231919A (en) * 2018-03-06 2019-09-13 株式会社理光 Web page contents print system
CN109032466A (en) * 2018-06-27 2018-12-18 努比亚技术有限公司 Long screenshot method, mobile terminal and storage medium based on double screen
CN110598623A (en) * 2019-09-06 2019-12-20 深圳前海环融联易信息科技服务有限公司 Method and device for cutting and extracting picture, computer equipment and storage medium
CN111046313A (en) * 2019-11-21 2020-04-21 深圳前海环融联易信息科技服务有限公司 Intelligent screenshot method and device of webpage, computer equipment and storage medium
CN111880752A (en) * 2020-07-28 2020-11-03 平安科技(深圳)有限公司 Seal printing method and device, electronic equipment and storage medium
CN111899268A (en) * 2020-08-17 2020-11-06 上海商汤智能科技有限公司 Image segmentation method and device, electronic equipment and storage medium
CN112036123A (en) * 2020-08-31 2020-12-04 北京奇虎鸿腾科技有限公司 PDF (Portable document Format) generation method, device and equipment based on webpage and storage medium

Also Published As

Publication number Publication date
CN113655973A (en) 2021-11-16

Similar Documents

Publication Publication Date Title
US10432820B2 (en) Image processing apparatus, image processing system, control method for image processing apparatus, and non-transitory computer readable medium
US11574489B2 (en) Image processing system, image processing method, and storage medium
US7738702B2 (en) Image processing apparatus and image processing method capable of executing high-performance processing without transmitting a large amount of image data to outside of the image processing apparatus during the processing
US10574839B2 (en) Image processing apparatus, method and storage medium for acquiring character information from scanned image
US9866725B2 (en) Image processing system, information processing apparatus, and recordable medium
KR102090973B1 (en) Information processing apparatus, information processing method, and storage medium
US11030447B2 (en) On-device partial recognition systems and methods
US11341733B2 (en) Method and system for training and using a neural network for image-processing
US9558433B2 (en) Image processing apparatus generating partially erased image data and supplementary data supplementing partially erased image data
US8248665B2 (en) Information processing device, printing device, information processing system, method, computer-readable medium, and computer data signal
US10049097B1 (en) Systems and methods for creating multi-layered optical character recognition (OCR) documents
CN111950557A (en) Error problem processing method, image forming apparatus and electronic device
CN115543238B (en) Browser page printing method, device, equipment and storage medium
CN113655973B (en) Page segmentation method and device, electronic equipment and storage medium
CN110245570B (en) Scanned text segmentation method and device, computer equipment and storage medium
CN108989704B (en) Image generation method and device and terminal equipment
JP2017212575A (en) Image reading device and program
CN112395529B (en) Page loading method, device, equipment and storage medium
JP2008092451A (en) Scanner system
CN113223117A (en) Image processing method and related device
US20200272688A1 (en) Information processing apparatus and non-transitory computer readable medium
WO2023236614A1 (en) Cloud computing technology-based image recognition method, apparatus, and related device
US20110157658A1 (en) Imaging processing apparatus, method for controlling the same, and program
KR101718877B1 (en) Method for driving universal printer driver based on label printer
JP7342518B2 (en) Image processing device and image processing 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
GR01 Patent grant
GR01 Patent grant