CN113642295B - Page typesetting method, device and computer program product - Google Patents

Page typesetting method, device and computer program product Download PDF

Info

Publication number
CN113642295B
CN113642295B CN202110974146.6A CN202110974146A CN113642295B CN 113642295 B CN113642295 B CN 113642295B CN 202110974146 A CN202110974146 A CN 202110974146A CN 113642295 B CN113642295 B CN 113642295B
Authority
CN
China
Prior art keywords
data
typesetting
typeset
component
dynamic library
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
CN202110974146.6A
Other languages
Chinese (zh)
Other versions
CN113642295A (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.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and 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 Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202110974146.6A priority Critical patent/CN113642295B/en
Publication of CN113642295A publication Critical patent/CN113642295A/en
Application granted granted Critical
Publication of CN113642295B publication Critical patent/CN113642295B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/186Templates

Abstract

The disclosure provides a page typesetting method, a page typesetting device, electronic equipment, a storage medium and a computer program product, relates to the technical field of computers, in particular to an application program technology, and can be used in a page display scene. The specific implementation scheme is as follows: acquiring data to be typeset; analyzing the data to be typeset to obtain a node structure tree representing the association information among various types of data in the data to be typeset; and obtaining typeset data of the data to be typeset through typeset components in a preset program based on the node structure tree, wherein the typeset components are loaded into the preset program based on a dynamic library mechanism. The method and the device improve typesetting performance of the preset program and high efficiency of the typesetting component for releasing the new version.

Description

Page typesetting method, device and computer program product
Technical Field
The disclosure relates to the field of computer technology, in particular to application program technology, and more particularly to a page typesetting method, a page typesetting device, electronic equipment, a storage medium and a computer program product, which can be used in a page display scene.
Background
At present, the data patterns in the library for online sharing of documents by net friends are complex, and the library needs rich typesetting capability. The prior art mainly implements relevant page layout by rich text component rich-text of the applet, or by other native components view or text of the applet.
Disclosure of Invention
The disclosure provides a page typesetting method, a page typesetting device, electronic equipment, a storage medium and a computer program product.
According to a first aspect, there is provided a page typesetting method, comprising: acquiring data to be typeset; analyzing the data to be typeset to obtain a node structure tree representing the association information among various types of data in the data to be typeset; and obtaining typeset data of the data to be typeset through typeset components in a preset program based on the node structure tree, wherein the typeset components are loaded into the preset program based on a dynamic library mechanism.
According to a second aspect, there is provided a page typesetting apparatus comprising: a first acquisition unit configured to acquire data to be typeset; the analysis unit is configured to analyze the data to be typeset to obtain a node structure tree representing the association information among various types of data in the data to be typeset; the typesetting unit is configured to obtain typeset data of the data to be typeset through typesetting components in a preset program based on the node structure tree, wherein the typesetting components are loaded into the preset program based on a dynamic library mechanism.
According to a third aspect, there is provided an electronic device comprising: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform a method as described in any one of the implementations of the first aspect.
According to a fourth aspect, there is provided a non-transitory computer readable storage medium storing computer instructions for causing a computer to perform a method as described in any implementation of the first aspect.
According to a fifth aspect, there is provided a computer program product comprising: a computer program which, when executed by a processor, implements a method as described in any of the implementations of the first aspect.
According to the technology disclosed by the invention, the typesetting component loaded into the preset program based on the dynamic library mechanism is adopted to execute the data to be typeset loaded by the preset program, so that the typesetting performance of the preset program and the efficiency of issuing the typesetting component of a new version are improved.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the disclosure, nor is it intended to be used to limit the scope of the disclosure. Other features of the present disclosure will become apparent from the following specification.
Drawings
The drawings are for a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein:
FIG. 1 is an exemplary system architecture diagram to which an embodiment according to the present disclosure may be applied;
FIG. 2 is a flow chart of one embodiment of a page layout method according to the present disclosure;
fig. 3 is a schematic view of an application scenario of the page composition method according to the present embodiment;
FIG. 4 is a flow chart of yet another embodiment of a page layout method according to the present disclosure;
FIG. 5 is a block diagram of one embodiment of a page typesetting apparatus according to the present disclosure;
FIG. 6 is a schematic diagram of a computer system suitable for use in implementing embodiments of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below in conjunction with the accompanying drawings, which include various details of the embodiments of the present disclosure to facilitate understanding, and should be considered as merely exemplary. Accordingly, one of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
In the technical scheme of the disclosure, the acquisition, storage, application and the like of the related user personal information all conform to the regulations of related laws and regulations, and the public sequence is not violated.
FIG. 1 illustrates an exemplary architecture 100 in which the page layout methods and apparatus of the present disclosure may be applied.
As shown in fig. 1, a system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. The communication connection between the terminal devices 101, 102, 103 constitutes a topology network, the network 104 being the medium for providing the communication link between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
The terminal devices 101, 102, 103 may be hardware devices or software supporting network connections for data interaction and data processing. When the terminal devices 101, 102, 103 are hardware, they may be various electronic devices supporting network connection, information acquisition, interaction, display, processing, etc., including, but not limited to, in-vehicle smart devices, monitoring devices, smartphones, tablets, electronic book readers, laptop and desktop computers, etc. When the terminal devices 101, 102, 103 are software, they can be installed in the above-listed electronic devices. It may be implemented as a plurality of software or software modules, for example, for providing distributed services, or as a single software or software module. The present invention is not particularly limited herein.
The server 105 may be a server providing various services, for example, a server receiving request information sent by a user through the terminal devices 101, 102, 103, and performing data typesetting of pages by using typesetting components in a preset program to present target pages to the user. Wherein, the typesetting component is loaded into a preset program based on a dynamic library mechanism. As an example, the server 105 may be a cloud server.
The server may be hardware or software. When the server is hardware, the server may be implemented as a distributed server cluster formed by a plurality of servers, or may be implemented as a single server. When the server is software, it may be implemented as a plurality of software or software modules (e.g., software or software modules for providing distributed services), or as a single software or software module. The present invention is not particularly limited herein.
It should also be noted that, the page typesetting method provided by the embodiment of the present disclosure may be executed by a server, may be executed by a terminal device, or may be executed by the server and the terminal device in cooperation with each other. Accordingly, each part (for example, each unit) included in the page typesetting device may be all set in the server, all set in the terminal device, or may be set in the server and the terminal device respectively.
It should be understood that the number of terminal devices, networks and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation. When the electronic device on which the page typesetting method is run does not need to perform data transmission with other electronic devices, the system architecture may include only the electronic device (e.g., server or terminal device) on which the page typesetting method is run.
Referring to fig. 2, fig. 2 is a flowchart of a page typesetting method provided in an embodiment of the disclosure, where the flowchart 200 includes the following steps:
step 201, obtaining data to be typeset.
In this embodiment, the execution body of the page typesetting method (for example, the terminal device or the server in fig. 1) may acquire the data to be typeset from a remote location, or from a local location, through a wired network connection manner or a wireless network connection manner.
The data to be typeset is JSON (JavaScript Object Notation, JS object numbered musical notation) data related to a target page to be displayed to a user, and the data includes text, pictures, tables, display styles and other types of data.
Step 202, analyzing the data to be typeset to obtain a node structure tree representing the association information among various types of data in the data to be typeset.
In this embodiment, the execution body may parse the data to be typeset to obtain a node structure tree that characterizes association information between data of each type in the data to be typeset.
And the related information exists among various types of data such as text data, picture data, table data, style data and the like included in the data to be typeset of the same target page, the related information among the various types of data is converted into father-son, brother and other relations among nodes corresponding to the types of data in the node structure tree, and the node structure tree representing the related information among the various types of data in the data to be typeset can be obtained.
In some optional implementations of this embodiment, the executing body may execute the step 202 as follows:
firstly, analyzing data to be typeset, and determining nodes corresponding to various types of data in the data to be typeset.
As an example, the execution subject may parse the data to be typeset through the data parser, and determine a node corresponding to each type of data in the data to be typeset.
Then, association information between the determined nodes is determined, and a node structure tree is generated.
In this implementation manner, the association information between the nodes is represented in the node relationship tree as a relationship such as a parent, a child, a brother, etc. between the nodes.
In this implementation manner, the execution body determines the node structure tree generation manner of the association information between the nodes based on the nodes corresponding to the types of data, thereby improving the generation efficiency of the node structure tree.
And 203, obtaining typeset data of the data to be typeset through a typesetting component in a preset program based on the node structure tree.
In this embodiment, the execution body may obtain typeset data of the data to be typeset through a typesetting component in a preset program based on the node structure tree. Wherein, the typesetting component is loaded into a preset program based on a dynamic library mechanism.
The preset program may be any program related to the typesetting function of the page. Such as various applications. In some optional implementations of this embodiment, the pre-set program is an applet. The applet is an application which can be used without downloading and installing, and a user can open the application by scanning bar code information of the triggering applet or searching the name of the applet. As an example, the applet may be a hundred degree library applet for displaying data in a hundred degree library.
Existing components are typically loaded into the target program based on static library mechanisms. The static library extends under the name. A or. Lib. The static library is directly integrated into the target program during compiling, so that an executable file compiled by the static library is relatively large. Executable files successfully compiled based on the static library can independently run without requiring the reading of the content of the static library to the outside; however, from the aspect of difficulty in upgrading, if the static library is updated, the target program needs to be recompiled, and the update of the static library cannot cover all users of the target program.
The extension of the dynamic library is typically so or dll, and unlike the static library being integrated entirely into the target program, the dynamic library has only one "point" location in the applet at compile time, and the applet will only read the dynamic library for use when the applet's executable files need to use the mechanism of the dynamic library. That is, the executable files of the applet cannot run alone, and must be combined with a dynamic library to run. In this way, from the aspect of product function upgrading, the dynamic library mechanism is adopted to facilitate component upgrading, and only the corresponding dynamic library is replaced and adjusted, so that the whole executable file of the target program does not need to be recompiled.
In this embodiment, the nodes in the node structure tree are read through the typesetting components in the applet in the order from top to bottom and from left to right, and sequentially stored on a virtual conveyor belt. The "box" on the conveyor belt is the node, and the flowing conveyor belt is the document stream. If the read node a belongs to a child node under another node B, then the "box" corresponding to the node a is placed inside the "box" corresponding to the node B in order when the conveyor belt is placed. If there are more children below the child, nesting continues on the conveyor belt inside the "box" of the child level. There is no limitation on the level at which a node can be nested, depending on its structure on the node structure tree. After the document stream is exhausted, CSS (Cascading Style Sheets, cascading style sheet) attributes such as coordinates and size of the nodes are determined as a packaging description of the "box". And finally, placing the boxes in a warehouse one by one to lay out the nodes to the target page, so as to obtain typeset data of the data to be typeset.
It should be noted that, the above process of determining typeset data only determines that each node is located at the target page, but does not visualize the target page.
In some optional implementations of this embodiment, the executing body may execute the step 203 as follows: for each node in the node structure tree, determining typesetting information of the node through a parser corresponding to the node in the typesetting component so as to obtain typeset data of the data to be typeset.
In this implementation, a plurality of resolvers are disposed in the typesetting component, including but not limited to a text resolver, a picture resolver, a table resolver, a formula resolver, an iframe resolver, etc. Nodes corresponding to various types of data such as text data, picture data, table data, style data and the like are analyzed through a type analyzer corresponding to the data of the nodes to obtain typesetting information of the nodes, so that typeset data of the data to be typeset is obtained according to the typesetting information of the nodes. In the implementation mode, the analysis is performed based on the analyzer corresponding to the node, so that the analysis efficiency is improved.
In some optional implementations of the present embodiment, before the executing body executes the step 203, first, a dynamic library of the typesetting component is constructed according to the received dynamic library development operation; then, the dynamic library is loaded into a preset program.
The execution main body supports development of the dynamic library, and receives dynamic library development operation of technicians to construct the dynamic library of the typesetting components. After the development of the dynamic library is completed, the position of the dynamic library is pointed to in the applet when the dynamic library is compiled, and when the executable file of the applet needs to use the mechanism of the dynamic library, the applet reads the dynamic library according to the position of the dynamic library for use. In the implementation manner, the execution main body has the development function of the dynamic library, the dynamic library of the typesetting component can be flexibly developed according to the development operation of the dynamic library, and the typesetting capability of the typesetting component is improved.
In some optional implementations of this embodiment, in an application process of the dynamic library, the execution body may update the dynamic library according to the received dynamic library update operation, so that the preset program executes a subsequent typesetting operation through the updated typesetting component.
The dynamic library updating operation includes, but is not limited to, adding function functions of the dynamic library, deleting function functions of the dynamic library, and adjusting existing function functions in the dynamic library. Based on the dynamic library updating operation of technicians, the execution body can flexibly update the version of the dynamic library. Furthermore, by means of a dynamic library mechanism of the typesetting component, the efficiency of issuing the typesetting component of the new version can be improved.
In some optional implementations of this embodiment, after obtaining the typeset data of the data to be typeset, the execution body may render the typeset data, and generate and display a target page representing the typeset data.
As an example, the execution subject may present the target page through the applet in the terminal device requesting the applet. The typesetting assembly realized based on the dynamic library mechanism has excellent typesetting capability, so that the display effect of the target page is improved, and the experience of a user is improved.
In order to further improve the display effect of the target page and improve the experience of the user, in some optional implementation manners of this embodiment, the execution body receives an interaction operation for the target page; and executing the interactive operation through the typesetting component.
Specifically, the receiving terminal device of the applet has a page event transfer function, and the typesetting component can perform dispatchEvent interaction operation on the rendered target page. Wherein the interaction characterizes the user's interaction with the presentation content in the target page. As an example, the interactive operation includes a zoom operation, a selection operation for a picture, a table, a text.
In some optional implementations of this embodiment, the executing body may further obtain preset index information in a process of obtaining typeset data; and generating monitoring information for the process of obtaining typeset data according to the preset index information.
The preset index information is index information in a life cycle of a typesetting process of the typesetting component, and includes, but is not limited to, typesetting starting time, typesetting ending time, typesetting time and other information. By monitoring the layout process, the entire layout process may be known in detail, providing a data basis for data analysis (e.g., whether specific functions of the layout components are improved) for the layout process.
With continued reference to fig. 3, fig. 3 is a schematic diagram 300 of an application scenario of the page typesetting method according to the present embodiment. In the application scenario of fig. 3, a user 301 requests a preset program to a server 303 through a terminal device 302 to view data in a hundred-degree library. Firstly, obtaining data to be typeset of data to be checked. And then, analyzing the data to be typeset to obtain a node structure tree representing the association information among various types of data in the data to be typeset. Finally, based on the node structure tree, typesetting data of the data to be typeset are obtained through typesetting components in a preset program. Wherein, the typesetting component is loaded into a preset program based on a dynamic library mechanism.
In the embodiment, the typesetting component loaded into the preset program based on the dynamic library mechanism is adopted to execute the data to be typeset loaded by the preset program, so that the typesetting performance of the preset program and the efficiency of issuing the typesetting component of the new version are improved.
With continued reference to fig. 4, there is shown a schematic flow 400 of one page layout method embodiment according to the method of the present disclosure, including the steps of:
step 401, constructing a dynamic library of typesetting components according to the received dynamic library development operation.
Step 402, the dynamic library is loaded into the applet.
Step 403, obtaining the data to be typeset.
And step 404, analyzing the data to be typeset, and determining the nodes corresponding to the data of each type in the data to be typeset.
Step 405, determining association information between the determined nodes, and generating a node structure tree.
Step 406, for each node in the node structure tree, determining the typesetting information of the node through the parser corresponding to the node in the typesetting component, so as to obtain typeset data of the data to be typeset.
And step 407, rendering the typeset data, and generating and displaying a target page representing the typeset data.
As can be seen from this embodiment, compared with the embodiment corresponding to fig. 2, the flow 400 of the page typesetting method in this embodiment specifically illustrates the development process of the dynamic library, the obtaining process of the data to be typeset, and the rendering process of the target page, and the dynamic library of the typesetting component is flexibly developed based on the development and operation of the dynamic library, so that the typesetting performance of the applet loading the typesetting component, the efficiency of the typesetting component for publishing the new version, and the display effect of the target page are improved.
With continued reference to fig. 5, as an implementation of the method shown in the foregoing figures, the present disclosure provides an embodiment of a page typesetting apparatus, where the embodiment of the apparatus corresponds to the embodiment of the method shown in fig. 2, and the apparatus may be specifically applied to various electronic devices.
As shown in fig. 5, the page typesetting apparatus includes: a first obtaining unit 501 configured to obtain data to be typeset; the parsing unit 502 is configured to parse the data to be typeset to obtain a node structure tree representing the association information between the data of each type in the data to be typeset; the typesetting unit 503 is configured to obtain typeset data of the data to be typeset through typesetting components in a preset program based on the node structure tree, wherein the typesetting components are loaded into the preset program based on a dynamic library mechanism.
In some optional implementations of the present embodiment, the parsing unit 502 is further configured to: analyzing the data to be typeset, and determining nodes corresponding to various types of data in the data to be typeset; and determining the determined association information among the nodes, and generating a node structure tree.
In some optional implementations of the present embodiment, the typesetting unit 503 is further configured to: for each node in the node structure tree, determining typesetting information of the node through a parser corresponding to the node in the typesetting component so as to obtain typeset data of the data to be typeset.
In some optional implementations of this embodiment, the apparatus further includes: a construction unit (not shown in the figure) configured to construct a dynamic library of typesetting components according to the received dynamic library development operation; a loading unit (not shown in the figure) configured to load the dynamic library into a preset program.
In some optional implementations of this embodiment, the apparatus further includes: an updating unit (not shown in the figure) configured to update the dynamic library according to the received dynamic library updating operation, so that the preset program performs a subsequent typesetting operation through the updated typesetting component.
In some optional implementations of this embodiment, the apparatus further includes: a rendering and displaying unit (not shown in the figure) configured to render the typeset data, and generate and display a target page representing the typeset data.
In some optional implementations of this embodiment, the apparatus further includes: a receiving unit (not shown in the figure) configured to receive an interactive operation with respect to a target page; an interactive unit (not shown in the figure) configured to perform interactive operations through the composition component.
In some optional implementations of this embodiment, the apparatus further includes: a second acquisition unit (not shown in the figure) configured to acquire preset index information in the process of obtaining the typeset data; a monitoring unit (not shown in the figure) configured to generate monitoring information for a process of obtaining the typeset data based on the preset index information.
In some optional implementations of this embodiment, the pre-set program is an applet.
In the embodiment, the typesetting component loaded into the preset program based on the dynamic library mechanism is adopted to execute the data to be typeset loaded by the preset program, so that the typesetting performance of the preset program and the efficiency of issuing the typesetting component of the new version are improved.
According to an embodiment of the present disclosure, the present disclosure further provides an electronic device including: at least one processor; and a memory communicatively coupled to the at least one processor; the memory stores instructions executable by the at least one processor to enable the at least one processor to implement the page layout method described in any of the embodiments above.
According to an embodiment of the present disclosure, there is also provided a readable storage medium storing computer instructions for enabling a computer to implement the page layout method described in any of the above embodiments when executed.
The disclosed embodiments provide a computer program product which, when executed by a processor, enables the page layout method described in any of the above embodiments to be implemented.
Fig. 6 illustrates a schematic block diagram of an example electronic device 600 that may be used to implement embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 6, the apparatus 600 includes a computing unit 601 that can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM) 602 or a computer program loaded from a storage unit 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the device 600 may also be stored. The computing unit 601, ROM 602, and RAM 603 are connected to each other by a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
Various components in the device 600 are connected to the I/O interface 605, including: an input unit 606 such as a keyboard, mouse, etc.; an output unit 607 such as various types of displays, speakers, and the like; a storage unit 608, such as a magnetic disk, optical disk, or the like; and a communication unit 609 such as a network card, modem, wireless communication transceiver, etc. The communication unit 609 allows the device 600 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The computing unit 601 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of computing unit 601 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 601 performs the respective methods and processes described above, such as a page layout method. For example, in some embodiments, the page layout method may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as storage unit 608. In some embodiments, part or all of the computer program may be loaded and/or installed onto the device 600 via the ROM 602 and/or the communication unit 609. When the computer program is loaded into the RAM 603 and executed by the computing unit 601, one or more steps of the page layout method described above may be performed. Alternatively, in other embodiments, the computing unit 601 may be configured to perform the page composition method in any other suitable way (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for carrying out methods of the present disclosure may be written in any combination of one or more programming languages. These program code may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus such that the program code, when executed by the processor or controller, causes the functions/operations specified in the flowchart and/or block diagram to be implemented. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and pointing device (e.g., a mouse or trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), and the internet.
The computer system may include a client and a server. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called as a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so as to solve the defects of large management difficulty and weak service expansibility in the traditional physical host and virtual special server (VPS, virtual Private Server) service; or may be a server of a distributed system or a server incorporating a blockchain.
According to the technical scheme of the embodiment of the disclosure, the typesetting component loaded into the preset program based on the dynamic library mechanism is adopted to execute the data to be typeset loaded by the preset program, so that the typesetting performance of the preset program and the high efficiency of the typesetting component for issuing a new version are improved.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps recited in the present disclosure may be performed in parallel, sequentially, or in a different order, provided that the desired results of the technical solutions provided by the present disclosure are achieved, and are not limited herein.
The above detailed description should not be taken as limiting the scope of the present disclosure. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present disclosure are intended to be included within the scope of the present disclosure.

Claims (18)

1. A page typesetting method, comprising:
acquiring data to be typeset;
analyzing the data to be typeset to obtain a node structure tree representing the association information among various types of data in the data to be typeset;
obtaining typeset data of the data to be typeset through a typesetting component in a preset program based on the node structure tree, wherein the typesetting component is loaded into the preset program based on a dynamic library mechanism;
acquiring preset index information in the typesetting process of the typeset data, wherein the preset index information is index information in the life cycle of the typesetting process of the typesetting component and comprises typesetting starting time, typesetting ending time and typesetting time;
and generating monitoring information for the process of obtaining the typeset data according to the preset index information.
2. A method according to claim 1, wherein the parsing the data to be typeset to obtain a node structure tree characterizing association information between data of each type in the data to be typeset includes:
analyzing the data to be typeset, and determining nodes corresponding to various types of data in the data to be typeset;
and determining the determined association information among the nodes, and generating the node structure tree.
3. The method according to claim 1, wherein the obtaining, based on the node structure tree, the typeset data of the data to be typeset through a typesetting component in a preset program includes:
and for each node in the node structure tree, determining typesetting information of the node through a parser corresponding to the node in the typesetting component so as to obtain typeset data of the data to be typeset.
4. The method according to claim 1, wherein before the typeset data of the data to be typeset is obtained by a typesetting component in a preset program based on the node structure tree, the method further comprises:
constructing a dynamic library of the typesetting component according to the received dynamic library development operation;
and loading the dynamic library into the preset program.
5. The method of claim 1, further comprising:
and updating the dynamic library according to the received dynamic library updating operation, so that the preset program executes subsequent typesetting operation through the updated typesetting component.
6. The method according to any one of claims 1-5, wherein after the obtaining, based on the node structure tree, the post-typesetting data of the data to be typeset by a typesetting component in a preset program, the method further comprises:
and rendering the typeset data, and generating and displaying a target page representing the typeset data.
7. The method of claim 6, further comprising:
receiving an interaction operation aiming at the target page;
and executing the interactive operation through the typesetting component.
8. The method of any one of claims 1-5, wherein the pre-set program is an applet.
9. A page typesetting apparatus comprising:
a first acquisition unit configured to acquire data to be typeset;
the analysis unit is configured to analyze the data to be typeset to obtain a node structure tree representing the association information among various types of data in the data to be typeset;
the typesetting unit is configured to obtain typeset data of the data to be typeset through a typesetting component in a preset program based on the node structure tree, wherein the typesetting component is loaded into the preset program based on a dynamic library mechanism;
the second acquisition unit is configured to acquire preset index information in the typesetting process of the typeset data, wherein the preset index information is index information in the life cycle of the typesetting process of the typesetting component and comprises typesetting starting time, typesetting ending time and typesetting time;
and the monitoring unit is configured to generate monitoring information for the process of obtaining the typeset data according to the preset index information.
10. The apparatus of claim 9, wherein the parsing unit is further configured to:
analyzing the data to be typeset, and determining nodes corresponding to various types of data in the data to be typeset; and determining the determined association information among the nodes, and generating the node structure tree.
11. The apparatus of claim 9, wherein the typesetting unit is further configured to:
and for each node in the node structure tree, determining typesetting information of the node through a parser corresponding to the node in the typesetting component so as to obtain typeset data of the data to be typeset.
12. The apparatus of claim 9, further comprising:
a construction unit configured to construct a dynamic library of the composition component according to the received dynamic library development operation;
and the loading unit is configured to load the dynamic library into the preset program.
13. The apparatus of claim 9, further comprising:
and the updating unit is configured to update the dynamic library according to the received dynamic library updating operation so that the preset program executes subsequent typesetting operation through the updated typesetting component.
14. The apparatus of any of claims 9-13, further comprising:
the rendering display unit is configured to render the typeset data, and generate and display a target page representing the typeset data.
15. The apparatus of claim 14, further comprising:
a receiving unit configured to receive an interactive operation with respect to the target page;
and the interaction unit is configured to execute the interaction operation through the typesetting component.
16. The apparatus of any of claims 9-13, wherein the pre-set program is an applet.
17. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein, the liquid crystal display device comprises a liquid crystal display device,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-8.
18. A non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the method of any one of claims 1-8.
CN202110974146.6A 2021-08-24 2021-08-24 Page typesetting method, device and computer program product Active CN113642295B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110974146.6A CN113642295B (en) 2021-08-24 2021-08-24 Page typesetting method, device and computer program product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110974146.6A CN113642295B (en) 2021-08-24 2021-08-24 Page typesetting method, device and computer program product

Publications (2)

Publication Number Publication Date
CN113642295A CN113642295A (en) 2021-11-12
CN113642295B true CN113642295B (en) 2023-10-20

Family

ID=78423622

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110974146.6A Active CN113642295B (en) 2021-08-24 2021-08-24 Page typesetting method, device and computer program product

Country Status (1)

Country Link
CN (1) CN113642295B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102622215A (en) * 2011-01-27 2012-08-01 腾讯科技(深圳)有限公司 Method for editing image-text units based on script
CN106708958A (en) * 2016-11-30 2017-05-24 北京小米移动软件有限公司 Typesetting structure display method and device for rendering engine
CN108415702A (en) * 2018-01-22 2018-08-17 北京奇艺世纪科技有限公司 A kind of mobile terminal application interface dynamic rendering intent and device
CN110908738A (en) * 2019-11-29 2020-03-24 百度在线网络技术(北京)有限公司 Method and device for running small program
CN112948018A (en) * 2021-03-01 2021-06-11 北京百度网讯科技有限公司 Dynamic library loading method, device, equipment and medium for small program

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8762330B1 (en) * 2012-09-13 2014-06-24 Kip Cr P1 Lp System, method and computer program product for partially synchronous and partially asynchronous mounts/unmounts in a media library
US10769348B1 (en) * 2019-09-23 2020-09-08 Typetura Llc Dynamic typesetting

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102622215A (en) * 2011-01-27 2012-08-01 腾讯科技(深圳)有限公司 Method for editing image-text units based on script
CN106708958A (en) * 2016-11-30 2017-05-24 北京小米移动软件有限公司 Typesetting structure display method and device for rendering engine
CN108415702A (en) * 2018-01-22 2018-08-17 北京奇艺世纪科技有限公司 A kind of mobile terminal application interface dynamic rendering intent and device
CN110908738A (en) * 2019-11-29 2020-03-24 百度在线网络技术(北京)有限公司 Method and device for running small program
CN112948018A (en) * 2021-03-01 2021-06-11 北京百度网讯科技有限公司 Dynamic library loading method, device, equipment and medium for small program

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
匿名.百度智能小程序 使用动态库_w3cschool.https://www.w3cschool.cn/baiduapp/baiduapp-v61t397u.html.2020,全文. *
曾凯 ; 刘坤 ; 陈宏君 ; 周磊 ; 谭林丰 ; 顾熹 ; .PCS-Studio可视化集成软件设计与实现.工业控制计算机.2020,(06),全文. *
陈志泊 ; 林健 ; .基于DirectUI可扩展应用程序架构的设计与实现.计算机科学.2012,(S3),全文. *

Also Published As

Publication number Publication date
CN113642295A (en) 2021-11-12

Similar Documents

Publication Publication Date Title
US20220308900A1 (en) Method and apparatus of pre-rendering page, electronic device, and storage medium
CN109062563B (en) Method and device for generating page
CN109683998A (en) Internationalize implementation method, device and system
CN112100550A (en) Page construction method and device
CN109558128A (en) Json data analysis method, device and computer readable storage medium
CN109857971A (en) Page rendering method and apparatus
CN113010827A (en) Page rendering method and device, electronic equipment and storage medium
CN116028028A (en) Request function generation method, device, equipment and storage medium
CN115599386A (en) Code generation method, device, equipment and storage medium
CN112506602B (en) Page generation method and device, electronic equipment and computer readable medium
CN108845864A (en) A kind of JVM rubbish recovering method and device based on spring frame
CN109408057B (en) Method, device, medium and computing equipment for automatically generating codes
CN113642295B (en) Page typesetting method, device and computer program product
US20220198153A1 (en) Model training
CN114968235A (en) Page form generation method and device, computer equipment and storage medium
CN114489639A (en) File generation method, device, equipment and storage medium
CN114741294A (en) Page debugging method, device, equipment and storage medium
US11438403B2 (en) Page presentation method and system, computer system, and computer readable medium
CN112817595A (en) Interface rendering method and device, storage medium and electronic equipment
CN112861504A (en) Text interaction method, device, equipment, storage medium and program product
CN113312025A (en) Component library generation method and device, storage medium and electronic equipment
CN110727677A (en) Method and device for tracing blood relationship of table in data warehouse
CN115563183B (en) Query method, query device and program product
CN112632293B (en) Industry map construction method and device, electronic equipment and storage medium
CN117215457A (en) Data processing method, apparatus, computer device, storage medium, and program product

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