CN113591436A - Program text processing method and device - Google Patents

Program text processing method and device Download PDF

Info

Publication number
CN113591436A
CN113591436A CN202010367063.6A CN202010367063A CN113591436A CN 113591436 A CN113591436 A CN 113591436A CN 202010367063 A CN202010367063 A CN 202010367063A CN 113591436 A CN113591436 A CN 113591436A
Authority
CN
China
Prior art keywords
text
object model
picture
fragment
document object
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010367063.6A
Other languages
Chinese (zh)
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.)
Xian Novastar Electronic Technology Co Ltd
Original Assignee
Xian Novastar Electronic 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 Xian Novastar Electronic Technology Co Ltd filed Critical Xian Novastar Electronic Technology Co Ltd
Priority to CN202010367063.6A priority Critical patent/CN113591436A/en
Publication of CN113591436A publication Critical patent/CN113591436A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/12Use of codes for handling textual entities
    • G06F40/151Transformation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/40Information retrieval; Database structures therefor; File system structures therefor of multimedia data, e.g. slideshows comprising image and additional audio data
    • G06F16/44Browsing; Visualisation therefor

Abstract

The embodiment of the invention provides a program text processing method and device. The method for example comprises the steps of: acquiring a text component of a program; accessing a text-to-picture server and sending the text component to the text-to-picture server; converting the text component into at least one text picture by using the text-to-picture server; and replacing the text component with the at least one text picture. According to the embodiment, the text component is converted into the text picture, the problem of high concurrency performance is solved, the response rate is improved, and the user experience is greatly improved.

Description

Program text processing method and device
Technical Field
The present invention relates to the field of multimedia control playing technologies, and in particular, to a program text processing method and a program text processing apparatus.
Background
In the LED display industry, a user generally adds a text when making a program, and in the prior art, a WEB front end cuts the text according to a scrolling manner (for example, page turning or still) and a preset text preview size when publishing the program, but when the text is too long or the text is too many, a problem of high concurrency performance occurs, which results in a long waiting time and affects user experience.
Disclosure of Invention
Therefore, to overcome at least some of the defects and shortcomings in the prior art, embodiments of the present invention provide a program text processing method and a program text processing apparatus, so as to solve the problem of high concurrency performance during program text processing, reduce the waiting time, and improve the user experience.
In one aspect, a method for processing a program text provided in an embodiment of the present invention includes: acquiring a text component of a program; accessing a text-to-picture server and sending the text component to the text-to-picture server; converting the text component into at least one text picture by using the text-to-picture server; and replacing the text component with the at least one text picture.
In the program text processing method provided by this embodiment, the text component of the program is acquired, the text-to-picture server generates at least one text picture according to the text component, and the text component is replaced by the at least one text picture, so that the text component is converted into the text picture, the problem of high concurrency is solved, the response rate is increased, and the user experience is improved.
In an embodiment of the present invention, the converting the text component into at least one text picture by using the text-to-picture server specifically includes: generating a text object model text fragment array according to the text component by using the text-to-picture server, wherein the text object model text fragment array comprises at least one document object model text fragment, loading at least one tab page through a headless browser, distributing the at least one document object model text fragment to the at least one tab page to generate corresponding fragment text on the at least one tab page, and performing screenshot operation on the fragment text to generate the at least one text picture corresponding to the text component.
In an embodiment of the present invention, the generating a text fragment array of the text object model according to the text component by using the text-to-picture server specifically includes: and generating a plurality of text object model text fragments according to a text component by using the text-to-picture server, and sequentially generating the text object model text fragment arrays by using the text object model text fragments according to a generation sequence.
In one embodiment of the invention, the text component comprises a text box and text content; the generating at least one document object model text fragment according to the text component by using the text-to-picture server specifically includes: and cutting the text content according to the width and the height of the text box through the text-to-picture server to obtain the at least one document object model text fragment, wherein the width and the height of the at least one document object model text fragment are consistent with the width and the height of the text box.
In one embodiment of the invention, the at least one document object model text segment comprises a first document object model text segment; the at least one tab page comprises a first tab page; the dispatching the at least one document object model text fragment to the at least one tab page to generate a corresponding fragment text on the at least one tab page, and performing a screenshot operation on the fragment text to generate the at least one text picture corresponding to the text component specifically includes: dispatching the first document object model text segment to the first tab page to generate a first segment text on the first tab page; and performing screenshot operation on the first section of text to generate a first text picture.
In one embodiment of the invention, the at least one document object model text segment further comprises a second document object model text segment; the dispatching the at least one document object model text fragment to the at least one tab page to generate a corresponding fragment text on the at least one tab page, and performing a screenshot operation on the fragment text to generate the at least one text picture corresponding to the text component, further comprises: judging whether the first text picture is generated or not; in response to generating a first text picture, serving the second document object model text segment to the first tab page to generate a second segment text on the first tab page; and performing screenshot operation on the second fragment text to generate a second text picture.
On the other hand, an apparatus for processing a program text provided in an embodiment of the present invention includes: the acquisition module is used for acquiring a text component of a program; the access module is used for accessing a text-to-picture server and sending the text component to the text-to-picture server; the generating module is used for converting the text component into at least one text picture by using the text-to-picture server; and the replacing module is used for replacing the text component into the at least one text picture.
The program text processing device of the embodiment is provided with the acquisition module, the access module, the generation module and the replacement module, so that at least one text picture can be generated according to the text component through the text component of the acquired program and the text-to-picture server, the text component is replaced by the at least one text picture, the text component is converted into the text picture, the problem of high concurrency performance is solved, the response speed is improved, and the user experience is improved.
In an embodiment of the present invention, the generating module is specifically configured to: generating a text object model text fragment array according to the text component by using the text-to-picture server, wherein the text object model text fragment array comprises at least one document object model text fragment, loading at least one tab page through a headless browser, distributing the at least one document object model text fragment to the at least one tab page to generate corresponding fragment text on the at least one tab page, and performing screenshot operation on the fragment text to generate the at least one text picture corresponding to the text component.
In one embodiment of the invention, the text component comprises a text box and text content; the generating module specifically includes: and the first generating unit is used for cutting the text content according to the width and the height of the text box through the text-to-picture server to obtain the at least one document object model text fragment, wherein the width and the height of the at least one document object model text fragment are consistent with the width and the height of the text box.
In one embodiment of the invention, the at least one document object model text segment comprises a first document object model text segment; the at least one tab page comprises a first tab page; the generating module specifically includes: the first dispatching unit is used for dispatching the first document object model text segment to the first tab page so as to generate a first segment text on the first tab page; and the second generation unit is used for carrying out screenshot operation on the first section of text to generate a first text picture.
In one embodiment of the invention, the at least one document object model text segment further comprises a second document object model text segment; the generation module further comprises: the judging unit is used for judging whether to generate the first text picture; the second dispatching unit is used for responding to the generation of the first text picture and dispatching the second document object model text fragment to the first tab page so as to generate a second fragment text on the first tab page; and the third generating unit is used for carrying out screenshot operation on the second fragment text to generate a second text picture.
In another aspect, a program text processing system provided in an embodiment of the present invention includes: the system comprises a memory and a processor connected with the memory, wherein the processor stores a computer program, and executes the program text processing method when the processor runs the computer program.
In another aspect, an embodiment of the present invention provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when executed by a processor, the stored computer program can implement the program text processing method described above.
One or more of the above technical solutions may have the following advantages or beneficial effects: by acquiring the text component of the program, generating at least one text picture according to the text component through the text-to-picture server, and replacing the text component with the at least one text picture, the text component is converted into the text picture, so that the problem of high concurrency is solved, the response speed is improved, and the user experience is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a flowchart illustrating a program text processing method according to a first embodiment of the present invention.
Fig. 2 is a partial schematic flow chart of step S30 in fig. 1.
Fig. 3 is a partial flowchart of step S30 in fig. 1.
Fig. 4 is another schematic flow chart of step S30 in fig. 1.
Fig. 5 is a system architecture diagram of an application of the program text processing method according to the first embodiment of the present invention.
Fig. 6 is a block diagram of a program text processing apparatus according to a second embodiment of the present invention.
Fig. 7 is a partial flow diagram of the generation module of fig. 6.
FIG. 8 is a partial flow diagram of the generation module of FIG. 6.
FIG. 9 is another flow diagram of the generation module of FIG. 6.
Fig. 10 is a schematic structural diagram of a program text processing system according to a third embodiment of the present invention.
Fig. 11 is a schematic structural diagram of a computer-readable storage medium according to a fourth 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.
[ first embodiment ] A method for manufacturing a semiconductor device
As shown in fig. 1, a program text processing method according to a first embodiment of the present invention includes the following steps:
s10, acquiring a text component of the program;
s20, accessing a text-to-picture server and sending the text component to the text-to-picture server;
s30, converting the text component into at least one text picture by using the text-to-picture server;
s40, replacing the text component with the at least one text picture.
Wherein, step S30 specifically includes: generating a text object model text fragment array according to the text component by using the text-to-picture server, wherein the text object model text fragment array comprises at least one document object model text fragment, loading at least one tab page through a headless browser, distributing the at least one document object model text fragment to the at least one tab page to generate corresponding fragment text on the at least one tab page, and performing screenshot operation on the fragment text to generate the at least one text picture corresponding to the text component. The step of generating a text fragment array of the text object model according to the text component by using the text-to-picture server specifically comprises the following steps: and generating a plurality of text object model text fragments according to a text component by using the text-to-picture server, and sequentially generating the text object model text fragment arrays by using the text object model text fragments according to a generation sequence.
Referring to fig. 2, the text component includes a text box and text content; in step S30, the generating at least one document object model text fragment according to the text component by using the text-to-picture server specifically includes:
s31, the text content is cut by the text-to-picture server according to the width and the height of the text box to obtain the at least one document object model text fragment, wherein the width and the height of the at least one document object model text fragment are consistent with the width and the height of the text box.
Referring to fig. 3, the at least one document object model text segment includes a first document object model text segment; the at least one tab page comprises a first tab page; in step S30, the dispatching the at least one document object model text fragment to the at least one tab page to generate a corresponding fragment text on the at least one tab page, and performing a screenshot operation on the fragment text to generate the at least one text picture corresponding to the text component specifically includes:
s32, dispatching the first document object model text segment to the first tab page to generate a first segment text on the first tab page;
and S33, performing screenshot operation on the first text fragment to generate a first text picture.
Referring to fig. 4, the at least one document object model text segment further includes a second document object model text segment; in step S30, the dispatching the at least one document object model text fragment to the at least one tab page to generate a corresponding fragment text on the at least one tab page, and performing a screenshot operation on the fragment text to generate the at least one text picture corresponding to the text component further includes:
s34, judging whether the first text picture is generated or not;
s35, responding to the generation of the first text picture, dispatching the second document object model text segment to the first tab page to generate a second segment text on the first tab page;
and S36, performing screenshot operation on the second segment text to generate a second text picture.
The program text processing method provided in this embodiment may be implemented by, for example, a backend server, and for convenience of understanding the embodiment more clearly, the program text processing method of this embodiment is described in detail below with reference to fig. 5.
Specifically, referring to fig. 5, a user may edit a program editing page of the WEB client 110, i.e., a personal computer browser software, and issue or save the program after the program editing is completed, the WEB client 110 sends the program to the backend server 120 connected to the WEB client 110 via a network, and the backend server 120 may be, for example, a PHP server. The back-end server 120 obtains the text component of the program, calls the text-to-picture server 130, and sends the text component to the text-to-picture server 130. The text-to-picture server 130 may be, for example, connected to the back-end server 120 via a network, and the back-end server 120 may call the text-to-picture server 130, for example, by calling a function, so as to convert the text component into a text picture. The text-to-picture server 130 may be, for example, a node server, configured to convert a text into a picture, and may also be other servers capable of converting a text into a picture, which is not limited in the embodiment of the present invention.
As described above, the text component of the program may include, for example, a text box and text content, where the text box has a width and a height, specifically, a width and a height of a text display of the program, and the height and the width of the text box may be adjusted by parameter adjustment or drag adjustment, for example, by a user on a program editing page of the WEB client 110. After receiving the program component, the text-to-picture server 130 may, for example, crop the text content according to the width and the height of the text box to generate a document object model text fragment array, where the document object model text fragment array includes two document object model text fragments (i.e., DOM text fragments), where the two document object model text fragments are taken as an example, and may be one or more, which is not limited in this embodiment of the present invention. Specifically, for example, the text content may be clipped according to the width and height of the text box, and the clipping may be performed from top to bottom, two DOM text fragments generated by the clipping sequentially generate DOM text fragment arrays according to the generation sequence, specifically, for example, a DOM text fragment generated first (i.e., a DOM text fragment corresponding to the uppermost text content) may be placed in front of the DOM text fragment array, the generated document object model text fragment may be generated into a document object model text fragment array according to such sequence, the unique identifier, such as an ID, of the text component is used as a key (key), the document object model text fragment array, i.e., the DOM text fragment array is used as a value (value), a text object is formed, and the document object model text fragment may specifically exist in the form of a text object, for example. Of course, the embodiments of the present invention are only illustrated and not limited thereto.
The text-to-picture server 130 may load one tab page, for example, by opening a headless browser, where the headless browser is a browser without a graphical user interface, and here, only one tab page is loaded by the headless browser as an example, and certainly, multiple tab pages may also be loaded, which is not limited in this embodiment of the present invention. The two document object model text segments generated above may, for example, comprise a first document object model text segment and a second document object model text segment, and the tab page may, for example, comprise a first tab page. The text-to-picture server 130 may, for example, serve a first document object model text segment to a first tab page to generate a corresponding first segment text on the first tab page, specifically, the first document object model text segment may, for example, include a display width, a height, a text segment content, a text attribute, and the like, and the text segment content is displayed on the first tab page according to the display width, the height, the text attribute, and the like to form the first segment text; the text-to-picture server 130 performs screenshot operation on the first segment of text on the first tab page to generate a corresponding first text picture. The screenshot operation here can be implemented by using a screenshot method in the prior art, and for example, screenshot can be implemented by using canvas technology, which is not described here again. And judging whether the first text picture is generated, when the first text picture is generated, the text-to-picture server 130 continuously sends a second document object model text fragment to the first tab page to generate a corresponding second fragment text on the first tab page, and the text-to-picture server 130 performs screenshot operation on the second fragment text on the first tab page to generate a corresponding second text picture. Through the above steps, that is, the text component is converted into the text picture, the text-to-picture server 130 may, for example, return the generated first text picture and the second text picture to the back-end server 120, and the back-end server 130 replaces the text component with the received two text pictures, and may, for example, perform identification through the unique identifier, i.e., ID, of the text component to replace the text component with the received two text pictures, so as to perform delivery and play.
In a specific implementation manner of the embodiment of the present invention, the text-to-image server 130 may load five tab pages, for example, through a headless browser, for example, when the number of DOM text segments is large, for example, greater than five, first assign one DOM text segment number to each tab page to generate a text image, determine which tab page generates the text image first, and then assign a new DOM text segment to the tab page until all DOM text segments generate corresponding text images. And the performance can be improved by loading five tab pages through a headless browser, and the stability of the server is ensured. Of course, the number of tab pages may also be one or more, which satisfies the performance, and the embodiment of the present invention is not limited thereto.
In summary, in the program text processing method of the embodiment, the text component of the program is acquired, the text-to-picture server generates the at least one text picture according to the text component, and the text component is replaced by the at least one text picture, so that the text component is converted into the text picture, the problem of high concurrency performance is solved, the response rate is increased, and the user experience is improved. In addition, the browser started by the text-to-picture server is a headless browser, so that the problem of user experience of starting a plurality of pages at a WEB client under the condition that a user does not operate is solved, and the user experience can be provided.
[ second embodiment ]
As shown in fig. 6, a second embodiment of the present invention provides a program text processing apparatus 200. The program text processing apparatus 200 includes, for example, an acquisition module 210, an access module 220, a generation module 230, and a replacement module 240.
The obtaining module 210 is configured to obtain a text component of the program.
And the access module 220 is configured to access the text-to-picture server and send the text component to the text-to-picture server.
A generating module 230, configured to convert the text component into at least one text picture by using the text-to-picture server.
A replacing module 240, configured to replace the text component with the at least one text picture.
Wherein the generating module 230 is specifically configured to: generating a text object model text fragment array according to the text component by using the text-to-picture server, wherein the text object model text fragment array comprises at least one document object model text fragment, loading at least one tab page through a headless browser, distributing the at least one document object model text fragment to the at least one tab page to generate corresponding fragment text on the at least one tab page, and performing screenshot operation on the fragment text to generate the at least one text picture corresponding to the text component.
Referring to fig. 7, the text component includes a text box and text content; the generating module 230 specifically includes:
the first generating unit 231 is configured to crop the text content according to the width and the height of the text box through the text-to-picture server to obtain the at least one document object model text fragment, where the width and the height of the at least one document object model text fragment are consistent with the width and the height of the text box.
Referring to fig. 8, the at least one document object model text segment includes a first document object model text segment; the at least one tab page comprises a first tab page; the generating module 230 specifically includes:
a first dispatch unit 232, configured to dispatch the first document object model text segment to the first tab page to generate a first segment text on the first tab page.
A second generating unit 233, configured to perform a screenshot operation on the first section of text to generate a first text picture.
Referring to fig. 9, the at least one document object model text segment further includes a second document object model text segment; the generating module 230 further comprises:
a judging unit 234, configured to judge whether to generate the first text picture;
a second dispatching unit 235, configured to dispatch the second document object model text segment to the first tab page to generate a second segment text on the first tab page in response to generating the first text picture.
A third generating unit 236, configured to perform a screenshot operation on the second text fragment to generate a second text picture.
For specific working processes and technical effects among the modules in the program text processing apparatus 200 in this embodiment, reference is made to the description of the foregoing first embodiment, and details are not repeated here.
[ third embodiment ]
As shown in fig. 10, a third embodiment of the present invention provides a program text processing system 300. The program text processing system 300 includes, for example, a memory 320 and a processor 310 coupled to the memory 320. The memory 320 may be, for example, a non-volatile memory, on which the computer program 321 is stored. The processor 310 may be, for example, an embedded processor. The processor 310 executes the program text processing method in the foregoing first embodiment when running the computer program 321.
The specific operation and technical effects of the program text processing system 300 in this embodiment are described in the foregoing first embodiment.
[ fourth example ] A
As shown in fig. 11, a fourth embodiment of the present invention provides a computer-readable storage medium 400. The computer-readable storage medium 400 is, for example, a nonvolatile memory, which is, for example: magnetic media (e.g., hard disks, floppy disks, and magnetic tape), optical media (e.g., CDROM disks and DVDs), magneto-optical media (e.g., optical disks), and hardware devices specially constructed for storing and executing computer-executable instructions (e.g., Read Only Memories (ROMs), Random Access Memories (RAMs), flash memories, etc.). The computer-readable storage medium 400 has stored thereon computer-executable instructions 410. The computer-readable storage medium 400 may execute the computer-executable instructions 410 by one or more processors or processing devices to implement the program text processing method in the foregoing first embodiment.
In addition, it should be understood that the foregoing embodiments are merely exemplary illustrations of the present invention, and the technical solutions of the embodiments can be arbitrarily combined and collocated without conflict between technical features and structural contradictions, which do not violate the purpose of the present invention.
In the embodiments provided in the present invention, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, a division of a unit is merely a division of one logic function, and an actual implementation may have another division, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may also be distributed on multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, each functional unit/module in the embodiments of the present invention may be integrated into one processing unit/module, or each unit/module may exist alone physically, or two or more units/modules may be integrated into one unit/module. The integrated units/modules may be implemented in the form of hardware, or may be implemented in the form of hardware plus software functional units/modules.
The integrated units/modules, which are implemented in the form of software functional units/modules, may be stored in a computer readable storage medium. The software functional unit is stored in a storage medium and includes several instructions for causing one or more processors of a computer device (which may be a personal computer, a server, or a network device) to execute some steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (11)

1. A method for processing program text, comprising:
acquiring a text component of a program;
accessing a text-to-picture server and sending the text component to the text-to-picture server;
converting the text component into at least one text picture by using the text-to-picture server;
and replacing the text component with the at least one text picture.
2. The method for processing program text according to claim 1, wherein said converting the text component into at least one text picture by using the text-to-picture server specifically comprises:
generating a text object model text fragment array according to the text component by using the text-to-picture server, wherein the text object model text fragment array comprises at least one document object model text fragment, loading at least one tab page through a headless browser, distributing the at least one document object model text fragment to the at least one tab page to generate corresponding fragment text on the at least one tab page, and performing screenshot operation on the fragment text to generate the at least one text picture corresponding to the text component.
3. The program text processing method according to claim 2, wherein the generating of the text fragment array of the text object model according to the text component by using the text-to-picture server specifically comprises:
and generating a plurality of text object model text fragments according to a text component by using the text-to-picture server, and sequentially generating the text object model text fragment arrays by using the text object model text fragments according to a generation sequence.
4. The program text processing method of claim 2, wherein the text component includes a text box and text content; the generating at least one document object model text fragment according to the text component by using the text-to-picture server specifically includes:
and cutting the text content according to the width and the height of the text box through the text-to-picture server to obtain the at least one document object model text fragment, wherein the width and the height of the at least one document object model text fragment are consistent with the width and the height of the text box.
5. The program text processing method of claim 2, wherein the at least one document object model text segment comprises a first document object model text segment; the at least one tab page comprises a first tab page; the dispatching the at least one document object model text fragment to the at least one tab page to generate a corresponding fragment text on the at least one tab page, and performing a screenshot operation on the fragment text to generate the at least one text picture corresponding to the text component specifically includes:
dispatching the first document object model text segment to the first tab page to generate a first segment text on the first tab page;
and performing screenshot operation on the first section of text to generate a first text picture.
6. The program text processing method of claim 5, wherein the at least one document object model text segment further comprises a second document object model text segment; the dispatching the at least one document object model text fragment to the at least one tab page to generate a corresponding fragment text on the at least one tab page, and performing a screenshot operation on the fragment text to generate the at least one text picture corresponding to the text component, further comprises:
judging whether the first text picture is generated or not;
in response to generating the first text picture, serving the second document object model text segment to the first tab page to generate a second segment text on the first tab page;
and performing screenshot operation on the second fragment text to generate a second text picture.
7. A program text processing apparatus, comprising:
the acquisition module is used for acquiring a text component of a program;
the access module is used for accessing a text-to-picture server and sending the text component to the text-to-picture server;
the generating module is used for converting the text component into at least one text picture by using the text-to-picture server;
and the replacing module is used for replacing the text component into the at least one text picture.
8. The program text processing apparatus of claim 7, wherein the generating module is specifically configured to:
generating a text object model text fragment array according to the text component by using the text-to-picture server, wherein the text object model text fragment array comprises at least one document object model text fragment, loading at least one tab page through a headless browser, distributing the at least one document object model text fragment to the at least one tab page to generate corresponding fragment text on the at least one tab page, and performing screenshot operation on the fragment text to generate the at least one text picture corresponding to the text component.
9. The program text processing apparatus of claim 8, wherein the text component comprises a text box and text content; the generating module specifically includes:
and the first generating unit is used for cutting the text content according to the width and the height of the text box through the text-to-picture server to obtain the at least one document object model text fragment, wherein the width and the height of the at least one document object model text fragment are consistent with the width and the height of the text box.
10. The program text processing apparatus of claim 8, wherein the at least one document object model text segment comprises a first document object model text segment; the at least one tab page comprises a first tab page; the generating module specifically includes:
the first dispatching unit is used for dispatching the first document object model text segment to the first tab page so as to generate a first segment text on the first tab page;
and the second generation unit is used for carrying out screenshot operation on the first section of text to generate a first text picture.
11. The program text processing apparatus according to claim 10, wherein the at least one document object model text segment further comprises a second document object model text segment; the generation module further comprises:
the judging unit is used for judging whether to generate the first text picture;
the second dispatching unit is used for responding to the generation of the first text picture and dispatching the second document object model text fragment to the first tab page so as to generate a second fragment text on the first tab page;
and the third generating unit is used for carrying out screenshot operation on the second fragment text to generate a second text picture.
CN202010367063.6A 2020-04-30 2020-04-30 Program text processing method and device Pending CN113591436A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010367063.6A CN113591436A (en) 2020-04-30 2020-04-30 Program text processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010367063.6A CN113591436A (en) 2020-04-30 2020-04-30 Program text processing method and device

Publications (1)

Publication Number Publication Date
CN113591436A true CN113591436A (en) 2021-11-02

Family

ID=78237561

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010367063.6A Pending CN113591436A (en) 2020-04-30 2020-04-30 Program text processing method and device

Country Status (1)

Country Link
CN (1) CN113591436A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160007083A1 (en) * 2010-11-07 2016-01-07 Symphony Advanced Media, Inc. Audience Content Exposure Monitoring Apparatuses, Methods and Systems
CN106354700A (en) * 2016-08-11 2017-01-25 广州爱九游信息技术有限公司 Page text conversion method and system
CN107454147A (en) * 2017-07-06 2017-12-08 北京潘达互娱科技有限公司 Information processing method and device
CN109408777A (en) * 2018-10-15 2019-03-01 南京中孚信息技术有限公司 Document processing method, device and archive server based on fast browsing
CN110210400A (en) * 2019-06-03 2019-09-06 上海眼控科技股份有限公司 A kind of form document detection method and equipment
CN110222695A (en) * 2019-06-19 2019-09-10 拉扎斯网络科技(上海)有限公司 A kind of certificate image processing method and device, medium, electronic equipment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160007083A1 (en) * 2010-11-07 2016-01-07 Symphony Advanced Media, Inc. Audience Content Exposure Monitoring Apparatuses, Methods and Systems
CN106354700A (en) * 2016-08-11 2017-01-25 广州爱九游信息技术有限公司 Page text conversion method and system
CN107454147A (en) * 2017-07-06 2017-12-08 北京潘达互娱科技有限公司 Information processing method and device
CN109408777A (en) * 2018-10-15 2019-03-01 南京中孚信息技术有限公司 Document processing method, device and archive server based on fast browsing
CN110210400A (en) * 2019-06-03 2019-09-06 上海眼控科技股份有限公司 A kind of form document detection method and equipment
CN110222695A (en) * 2019-06-19 2019-09-10 拉扎斯网络科技(上海)有限公司 A kind of certificate image processing method and device, medium, electronic equipment

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
S. WACHENFELD .ETAL: "Recognition of Screen-Rendered Text", IEEE, pages 1 - 4 *
刘小峰 著: "Director 8和Lingo程序设计", 31 July 2000, 清华大学出版社, pages: 12 - 13 *
吕何新 等编: "FrontPage网页设计与制作", 31 August 2000, 高等教育出版社, pages: 152 *
老万: ""榨取"PDF中的图片", 电脑爱好者, pages 48 *

Similar Documents

Publication Publication Date Title
CN109032521B (en) Storage volume creation method, device, server and storage medium
CN111045655B (en) Page rendering method and device, rendering server and storage medium
WO2018054200A1 (en) Method and device for reading file
CN108228188A (en) A kind of view component processing method, electronic equipment and readable storage medium storing program for executing
CN110008195B (en) Method, device and system for dynamically configuring html (hypertext markup language) to pdf (pdf)
CN109672902A (en) A kind of video takes out frame method, device, electronic equipment and storage medium
CN110377391B (en) Picture display method and device, mobile terminal and storage medium
CN111400246B (en) Asynchronous file import method, device, computer equipment and storage medium
WO2023284295A1 (en) Method and system for processing webpage video background of mobile end, and storage medium
CN110012338A (en) A kind of method, apparatus, computer equipment and storage medium showing barrage data
CN115510347A (en) Presentation file conversion method and device, electronic equipment and storage medium
CN112003976A (en) Hard-coding and hard-decoding test method and device
CN111857700A (en) Template marketing activity publishing method and system
WO2022033354A1 (en) Hand-drawn draft loading method
CN113591436A (en) Program text processing method and device
CN112135056A (en) Shooting method, shooting device, electronic equipment and storage medium
CN112632917B (en) Online document processing method and device, electronic equipment and storage medium
CN111488731A (en) File generation method and device, computer equipment and storage medium
CN111931708A (en) Form generation method and device
CN115086752B (en) Recording method, system and storage medium for browser page content
CN113111281A (en) DWG drawing preview service method, system and storage medium
CN111273903A (en) Webpage making method and device, computer equipment and computer storage medium
CN116110065A (en) Method, device, computer equipment and storage medium for generating question card data
CN109474643A (en) Data analysis method, device, equipment and storage medium
CN115878247A (en) Front-end element adaptive display method, device, storage medium and system

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