CN115587075A - Layout file processing method and device, terminal equipment and storage medium - Google Patents

Layout file processing method and device, terminal equipment and storage medium Download PDF

Info

Publication number
CN115587075A
CN115587075A CN202211545561.0A CN202211545561A CN115587075A CN 115587075 A CN115587075 A CN 115587075A CN 202211545561 A CN202211545561 A CN 202211545561A CN 115587075 A CN115587075 A CN 115587075A
Authority
CN
China
Prior art keywords
file
protocol data
data
field
server
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.)
Granted
Application number
CN202211545561.0A
Other languages
Chinese (zh)
Other versions
CN115587075B (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 Hesi Information Technology Co Ltd
Original Assignee
Beijing Hesi Information 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 Hesi Information Technology Co Ltd filed Critical Beijing Hesi Information Technology Co Ltd
Priority to CN202211545561.0A priority Critical patent/CN115587075B/en
Publication of CN115587075A publication Critical patent/CN115587075A/en
Application granted granted Critical
Publication of CN115587075B publication Critical patent/CN115587075B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • G06F16/168Details of user interfaces specifically adapted to file systems, e.g. browsing and visualisation, 2d or 3d GUIs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/103Formatting, i.e. changing of presentation of documents
    • G06F40/109Font handling; Temporal or kinetic typography
    • 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
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Artificial Intelligence (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Human Computer Interaction (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a format file processing method, a format file processing device, terminal equipment and a storage medium, wherein the format file processing method comprises the following steps: monitoring a drag event aiming at a target field in the candidate fields; if the target field is dragged to the format customization area, transcoding the target field to obtain protocol data corresponding to the target field; sending the protocol data to a server, so that the server generates a first fixed format file based on the protocol data, and feeds back file address information of the first fixed format file; and if the file address information fed back by the server is not received, generating a second fixed format file based on the protocol data, and displaying the second fixed format file through the graphical user interface. The invention can effectively simplify the operation interaction, and can also obviously reduce the waiting time for the user to preview the archive layout file, thereby obviously improving the user experience.

Description

Layout file processing method and device, terminal equipment and storage medium
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a layout file processing method and apparatus, a terminal device, and a storage medium.
Background
The file paperless and digitalization is a novel file information form generated along with the development of computer technology, scanning technology, optical Character Recognition (OCR) technology, database technology, multimedia technology and storage technology, file resources of various carriers are converted into digitalized file information, and a plurality of digitalized file information generate various file format files (such as receipts, invoices and the like).
Disclosure of Invention
In view of the above, the present invention provides a layout file processing method, an apparatus, a terminal device and a storage medium, which can effectively simplify operation interaction, and can significantly reduce the waiting time required by a user to preview an archive layout file, thereby significantly improving user experience.
In a first aspect, an embodiment of the present invention provides a method for processing a layout file, where a terminal provides a graphical user interface, where the graphical user interface includes at least a layout customization area and a field area, and the field area displays a plurality of candidate fields required for configuring the layout file, and the method includes: monitoring a drag event aiming at a target field in the candidate fields; if the target field is dragged to the format customization region, transcoding the target field to obtain protocol data corresponding to the target field; sending the protocol data to a server, so that the server generates a first fixed format file based on the protocol data, and feeds back file address information of the first fixed format file; and if the file address information fed back by the server is not received, generating a second fixed format file based on the protocol data, and displaying the second fixed format file through the graphical user interface.
In an embodiment, after the step of transcoding the target field to obtain the protocol data corresponding to the target field, the method further includes: analyzing the protocol data to obtain at least one first binding field contained in the protocol data, and determining first interface address information corresponding to each first binding field; reading first field data from a specified data source based on the first interface address information; inserting the first field data into the protocol data, and rendering the protocol data inserted with the first field data to obtain a preview component; and displaying the preview component through the format customization area, and updating the display content of the graphical user interface by using the preview component.
In one embodiment, the step of sending the protocol data to the server, so that the server generates a first fixed-layout file based on the protocol data, includes: and storing the protocol data into a designated interface of a server, so that when the server monitors that the designated interface changes, a static page is generated based on the protocol data stored in the designated interface, an initial fixed layout file corresponding to the static page is generated, and the initial fixed layout file is cut according to pages to obtain a first fixed layout file.
In one embodiment, the method further comprises: if the file address information fed back by the server side is received, a file loading request corresponding to the file address information is generated; if the volume of the first fixed format file is larger than a preset threshold value, the file loading request is divided into a specified number of byte loading requests; and sending each byte loading request to the server so as to load the first fixed format file from the file address information of the server in a concurrent manner.
In one embodiment, the method further comprises: receiving a page preview request under the condition that the first fixed layout file is loaded; wherein the first fixed layout file comprises at least one page; and loading a file stream corresponding to the target page number carried by the page preview request so as to display the page corresponding to the target page number.
In an embodiment, after the step of transcoding the target field to obtain target protocol data corresponding to the target field, the method further includes: storing the protocol data to a specified data source to obtain third interface address information corresponding to the protocol data; the step of generating a second fixed layout file based on the standard protocol data includes: reading the protocol data from the specified data source based on the third interface address information; analyzing the protocol data to obtain at least one second binding field contained in the protocol data, and determining second interface address information corresponding to each second binding field; reading second field data from the specified data source based on the second interface address information to generate a second fixed layout file based on the second field data.
In one embodiment, the protocol data is json schema data.
In a second aspect, an embodiment of the present invention further provides a layout file processing apparatus, where a terminal provides a graphical user interface, where the graphical user interface includes at least a layout customization area and a field area, and the field area displays a plurality of candidate fields required for configuring a layout file, and the apparatus includes: the event monitoring module is used for monitoring a drag event aiming at a target field in the candidate fields; the transcoding module is used for transcoding the target field to obtain protocol data corresponding to the target field if the target field is dragged to the format customization region; the data sending module is used for sending the protocol data to a server so that the server generates a first fixed format file based on the protocol data and feeds back file address information of the first fixed format file; and the preview module is used for generating a second fixed format file based on the protocol data and displaying the second fixed format file through the graphical user interface if the file address information fed back by the server is not received.
In a third aspect, an embodiment of the present invention further provides a terminal device, including a processor and a memory, where the memory stores computer-executable instructions that can be executed by the processor, and the processor executes the computer-executable instructions to implement any one of the methods provided in the first aspect.
In a fourth aspect, embodiments of the present invention also provide a computer-readable storage medium storing computer-executable instructions that, when invoked and executed by a processor, cause the processor to implement any one of the methods provided in the first aspect.
The invention provides a format file processing method, a format file processing device, a terminal device and a storage medium, wherein a graphical user interface is provided through a terminal, the graphical user interface at least comprises a format customization area and a field area, the field area displays a plurality of candidate fields required by format file configuration, firstly, a dragging event of a target field in the candidate fields is monitored, if the target field is dragged to the format customization area, transcoding processing is carried out on the target field to obtain protocol data corresponding to the target field, then the protocol data are sent to a server, so that the server generates a first fixed format file based on the protocol data and feeds back file address information of the first fixed format file, and if file address information fed back by the server is not received, a second fixed format file is generated based on the protocol data and the second fixed format file is displayed through the graphical user interface. According to the method, the terminal provides a visual edition file editing function for the user, the user can design the required layout file by dragging the target field, the operation interaction difficulty is effectively reduced, the operation habit of splicing the layout files by most users is met, and under the condition that the server cannot timely feed back the file address information of the first fixed layout file, the terminal can generate the second fixed layout file based on the protocol data, so that the method has the characteristic of extremely-fast preview, the waiting time required by the user for previewing the archive layout file can be remarkably reduced, and the user experience is remarkably improved.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
In order to make the aforementioned and other objects, features and advantages of the present invention comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a schematic flowchart of a layout file processing method according to an embodiment of the present invention;
fig. 2 is an overall flowchart of a layout file processing method according to an embodiment of the present invention;
FIG. 3 is a diagram illustrating a data structure of a target field according to an embodiment of the present invention;
fig. 4 is a schematic diagram of json schema data provided by an embodiment of the present invention;
fig. 5 is a schematic flowchart of a static HTML generating method according to an embodiment of the present invention;
fig. 6 is a flowchart illustrating a method for generating a second fixed-layout file according to an embodiment of the present invention;
fig. 7 is a schematic flowchart of another layout file processing method according to an embodiment of the present invention;
FIG. 8 is a timing diagram illustrating a layout file processing method according to an embodiment of the present invention;
FIG. 9 is a schematic structural diagram of a layout file processing apparatus according to an embodiment of the present invention;
fig. 10 is a schematic structural diagram of a terminal device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the embodiments, and it is obvious that the described embodiments are some, but not all embodiments of the present invention. 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.
At present, the existing scheme for processing the layout file has the following problems: (1) the operation interaction is too complex, and the difficulty of hands on the device is high; (2) Asynchronous waiting is needed in the file generating process, for example, after data is saved, a format file needs to be generated by a server based on the data, and the format file cannot be fixed immediately by a user in the process of generating the format file by the server; (3) The requirements can not be customized according to the service group, and functions can not be added independently because multiple service lines use the same set; (4) When the format file volume is too large, the problems of too slow loading, blockage and the like exist.
Based on the above, the embodiment of the invention provides a format file processing method, a format file processing device, a terminal device and a storage medium, which can effectively simplify operation interaction, and can also significantly reduce the waiting time required by a user for previewing an archive format file, thereby significantly improving the user experience.
To facilitate understanding of this embodiment, first, a layout file processing method disclosed in the embodiment of the present invention is described in detail, where a graphical user interface is provided through a terminal, the graphical user interface at least includes a layout customization area and a field area, the layout customization area and a layout file template for displaying user edits in real time, and the field area displays a plurality of candidate fields required for configuring layout files, referring to a flow diagram of a layout file processing method shown in fig. 1, the method may include the following steps S102 to S108:
step S102, monitoring a dragging event aiming at a target field in the candidate field. In one embodiment, the listening to the drag event may be implemented through a native API (Application Programming Interface) in the terminal.
And step S104, if the target field is dragged to the format customization area, transcoding the target field to obtain the protocol data corresponding to the target field. The protocol data is also json schema data. In an implementation manner, the end of the drag event can be responded, if the drag event is ended, the dragged target field is located in the format customization region, the target field can be determined to be dragged to the format customization region, the user can also continue to drag the target field in the format customization region to adjust the format of the file, and the terminal monitors the content dragged and edited by the user and transcodes the content into json schema data.
And step S106, sending the protocol data to the server side so that the server side generates a first fixed format file based on the protocol data, and feeding back file address information of the first fixed format file. The first fixed Format file, that is, the fixed Format file generated by the server, may be a PDF (Portable Document Format) file. In an embodiment, json schema data can be stored in a specified interface, a server can monitor that the specified interface changes, at this time, the server enters a specified Web (World Wide Web) preview page through a simulation terminal, gives the json schema data to the Web preview page, and starts to asynchronously generate a first fixed format file.
And step S108, if the file address information fed back by the server is not received, generating a second fixed format file based on the protocol data, and displaying the second fixed format file through the graphical user interface. The second fixed format file, that is, the fixed format file generated by the terminal, may be a PDF file. In an embodiment, if the file address information fed back by the server is not received, in order to meet the requirement of the user for previewing the fixed-format file, the terminal may generate a second fixed-format file based on the protocol data, and display the second fixed-format file through the graphical user interface.
According to the format file processing method provided by the embodiment of the invention, the terminal provides a function of visually editing the format file for the user, the user can design the required format file by dragging the target field, the difficulty of operation interaction is effectively reduced, the operation habit of splicing the format file by most users is met, and under the condition that the server cannot timely feed back the file address information of the first fixed format file, the terminal can generate the second fixed format file based on the protocol data, so that the method has the characteristic of extremely-fast preview, the waiting time required by the user for previewing the file format file can be obviously reduced, and the user experience is obviously improved.
To facilitate understanding of the foregoing embodiments, the embodiment of the present invention provides an overall flowchart of a layout file processing method as shown in fig. 2, which includes three processes: (1) dragging and editing; (2) saving json schema data; (3) And the server side captures a template page to generate a first fixed format file. The template page is also a format customization area, and a format file template obtained by dragging and editing a target field by a user is displayed in the format customization area.
(1) Dragging and editing: the user drags the editing template through the visual interface, drags the required target field into the template, configures the corresponding template, and can also be used for dragging the beautified image into the template, and the terminal monitors the content dragged and edited by the user and transcodes the content to obtain json schema data.
In practical application, the dragging capability of the database field is to monitor a dragging event through a native API, store dragged data, parameters with corresponding fields in the data, and display data of a table. For convenience of understanding, referring to a data structure diagram of a target field shown in fig. 3, taking a data structure of a single drag data (i.e., a target field) as an example, data inside v.v in the code shown in fig. 3 are all parameters required by the drag field, and according to that parameters in different fields are all dynamically changed, if the target field corresponding to a drag event is data of a chart or a picture class, the parameters in the fields further include descriptions of a corresponding coordinate system, and the like.
After the json schema data are obtained through transcoding and before the json schema data are stored, the terminal can obtain field data corresponding to the json schema data and insert the first field data into a preview component displayed in the format customization region. Furthermore, the terminal can also edit a rendering format customization area, and the format customization area monitors and renders data sources and processes the data sources so that a user can check the current format. For ease of understanding, reference may be made to (a) to (d) below:
(a) Analyzing the protocol data to obtain at least one first binding field contained in the protocol data, and determining first interface address information corresponding to each first binding field; (b) Reading first field data from a specified data source based on first interface address information; (c) Inserting the first field data into the protocol data, and rendering the protocol data inserted with the first field data to obtain a preview component; (d) And displaying the preview component through the format customization area, and updating the display content of the graphical user interface by utilizing the preview component. In an embodiment, a terminal reads a uniform json schema data source rendering view, which is shown in a schematic diagram of json schema data shown in fig. 4, where the json schema data is a two-dimensional array, and each array includes a data attribute parameter; the data source is promoted to the global state by using state management and has the capability of updating the view, and when the data change, if the corresponding component uses the parameter, the view is correspondingly updated; and partial data needs to be converted again, and an independent function is used in the middle for translating the partial data into format data required by the rendering view.
(2) Saving json schema data: and after monitoring that the user stores the editing data, the terminal stores the json schema data to a specified interface.
(3) The server side captures a template page to generate a first fixed format file: the server monitors the change of the designated interface, at the moment, the server enters the simulation terminal into the designated web preview page, the json schema data is given to the web preview page, and the first fixed format file is asynchronously generated. The method specifically comprises the following steps: generating a static HTML (Hypertext Markup Language) file and generating a fixed format file. And the server receives the interface data change, reads the specified static html file, and then starts to capture and generate a fixed format file by using a headless browser. In specific implementation, when monitoring that the designated interface changes, the server generates a static page based on protocol data stored in the designated interface, generates an initial fixed layout file corresponding to the static page, and performs page-wise cutting processing on the initial fixed layout file to obtain a first fixed layout file.
When the server executes the step of generating the Static page based on the protocol data stored in the specified interface, the technical stack mainly generates the Static page by using nextJS (server rendering framework), and outputs the Static file (i.e. the above-mentioned Static HTML) by using SSG (Static Site Generation) packing property. Referring to a flow chart of a static HTML generation method shown in fig. 5, the method mainly includes the following (1) to (7):
(1) Obtain URL (uniform resource locator). The URL includes a template ID (Identity document), such as URL: ID = xxx. And (2) SSR server-side processing. And (3) the server side requests json schema data. And (4) the server rendering engine analyzes the json schema data. And (5) splicing HTML by the server side. And (6) the server generates HTML codes. And (7) rendering static HTML by the server side.
When the step of generating the initial fixed format file corresponding to the static page and performing page-based cutting processing on the initial fixed format file to obtain the first fixed format file is executed at the server, the puppeteer headless browser can be used for grabbing the static HTML to generate the fixed format file, the fixed format file with 99% reduction degree is generated by completely repeating the HTML effect, and the page-based cutting processing is performed.
In an embodiment, after the target protocol data corresponding to the target field is obtained, the protocol data may be further stored to a specified data source, so as to obtain third interface address information corresponding to the protocol data. On this basis, an embodiment of the present invention provides an implementation manner in which a terminal executes a step of generating a second fixed layout file based on standard protocol data, specifically, see the following steps 1 to 3:
and step 1, reading protocol data from a specified data source based on the third interface address information. In one embodiment, in the preview phase, json schema data needs to be read from a specified data source.
And 2, analyzing the protocol data to obtain at least one second binding field contained in the protocol data, and determining second interface address information corresponding to each second binding field. In one embodiment, the interface returns json schema data, fills in the rendering engine, processes the binding field in the data, and sequentially reads the corresponding interface of the binding field to obtain the second field data.
And 3, reading second field data from the specified data source based on the second interface address information to generate a second fixed format file based on the second field data. In one embodiment, the read second field data is filled back into the layout customization area (rows and columns) in batch, then the read table data layer is converted into an HTML field, and the playback shows the second fixed layout file on the designated node.
Based on this, in the case that the server does not generate or feed back the first fixed layout file, refer to a flow diagram of a method for generating a second fixed layout file shown in fig. 6: and (1) acquiring the URL. And (2) the terminal requests json schema data. And (3) the terminal rendering engine analyzes the json schema data. And (4) rendering the page (SPA) by the terminal.
Under the condition that a server generates a first fixed format file, a url preview file is remotely loaded, and the strategy is used under the condition that the file volume is too large as follows:
and (I) concurrent loading is opened by using the range characteristic, so that the loading speed of the large file is increased. Specifically, the method comprises the following steps: generating a file loading request corresponding to the file address information; if the volume of the first fixed format file is larger than a preset threshold value, segmenting the file loading request into a specified number of byte loading requests, illustratively segmenting the file loading request into n byte loading requests based on a range characteristic, so as to request the first fixed format file according to bytes; and sending each byte loading request to the server so as to load the first fixed layout file from the file address information of the server concurrently.
And (II) loading part of the file stream according to the specified page number. And under the condition that the loading of the first fixed format file is completed, receiving a page preview request, wherein the first fixed format file comprises at least one page, and loading a file stream corresponding to a target page carried by the page preview request so as to display the page corresponding to the target page.
To facilitate understanding of the foregoing embodiment, the embodiment of the present invention further provides a schematic flowchart of another layout file processing method as shown in fig. 7, where the method mainly includes the following steps S702 to S708:
and S702, dragging and editing, processing the dragged data, converting the dragged data into json schema data, and updating the json schema data to a data source.
Step S704, editing and rendering the viewable image, monitoring the json schema data change, and converting the json schema data change into component rendering.
And step S706, saving operation, acquiring the latest json schema data, and saving the data to the server interface. And (5) asynchronously processing the server side to generate static HTML and then generating a PDF file.
Step S708, the preview layer dynamically analyzes the preview, and renders the strategy in different ways according to whether the PDF file is generated. And if the PDF file is generated, previewing the PDF file through the remote address. And if the PDF file is not generated, acquiring json schema data, dynamically analyzing, decompiling and rendering, and previewing the file display.
For convenience of understanding, an embodiment of the present invention further provides a timing chart of a layout file processing method as shown in fig. 8, specifically: (1) The terminal responds to the dragging event, processes the dragging data and converts the dragging data into json schema data; (2) The terminal updates the json schema data to a data source, and the terminal stores the json schema data to the server side; (3) The terminal analyzes the json schema data to obtain a binding field and determines an interface corresponding to the binding field; (4) the terminal requests data from the data source according to the interface; (5) feeding back data by the data source; (6) The terminal inserts the data into json schema data, and the data is analyzed and converted into component rendering so as to update the view; (7) The server generates static HTML based on the json schema data, and then generates a PDF file based on the static HTML; (8) the terminal requests the address of the PDF file from the server; (9) The server side does not feed back the address of the PDF file to the terminal, and the terminal generates the PDF file based on json schema data; (10) And the server feeds back the address of the PDF file to the terminal, and the terminal requests the PDF file from the server based on the address.
In summary, the layout file processing method provided in the embodiment of the present invention at least has the following characteristics:
(1) The user operation layout file adopts a visual interactive function, is simple and easy to learn, and can be directly used by using the function only by Excel. The teaching cost is low, although the functions of the existing format file are more, the difficulty of starting a hand is larger, and the teaching cost is also very high.
(2) The method has the advantages that the characteristic capability of previewing files is faster, a double-rendering strategy mode is adopted for the new format files, previewing can be immediately carried out after the files are edited no matter how large the files are, and the process of waiting for previewing the files is reduced, so that the interactive experience is enhanced.
(3) The method has the advantages that the characteristic capacity of fast loading of large files is realized, the range and the paging capacity are adopted for new format files, the characteristics of lazy loading and the like are provided for previewing, the speed of loading the files is increased, and the files can be previewed fast without jamming. The existing format file has the condition of too slow loading and too slow card passing under the condition of processing a large file.
(4) The self-developed universal low-code basic framework can be used for expanding other business forms in the future, and has the characteristic of customized function requirements.
As to the format file processing method provided in the foregoing embodiment, an embodiment of the present invention further provides a format file processing apparatus, where a terminal provides a graphical user interface, the graphical user interface at least includes a format customization area and a field area, and the field area displays a plurality of candidate fields required for configuring a format file, see a schematic structural diagram of the format file processing apparatus shown in fig. 9, where the apparatus includes the following components:
an event monitoring module 902, configured to monitor a drag event for a target field in the candidate fields;
a transcoding module 904, configured to, if it is monitored that the target field is dragged to the format customization region, perform transcoding processing on the target field to obtain protocol data corresponding to the target field;
the data sending module 906 is configured to send the protocol data to the server, so that the server generates a first fixed format file based on the protocol data, and feeds back file address information of the first fixed format file;
and the preview module 908 is configured to generate a second fixed format file based on the protocol data and display the second fixed format file through the graphical user interface if the file address information fed back by the server is not received.
According to the format file processing device provided by the embodiment of the invention, the terminal provides a function of visually editing the format file for the user, the user can design the required format file by dragging the target field, the difficulty of operation interaction is effectively reduced, the operation habit of splicing the format file by most users is met, and under the condition that the server cannot feed back the file address information of the first fixed format file in time, the terminal can generate the second fixed format file based on protocol data, so that the format file processing device has the characteristic of extremely fast preview, the waiting time required by the user for previewing the file format file can be obviously reduced, and the user experience is obviously improved.
In an embodiment, the apparatus further includes a view updating module, configured to: analyzing the protocol data to obtain at least one first binding field contained in the protocol data, and determining first interface address information corresponding to each first binding field; reading first field data from a specified data source based on first interface address information; inserting the first field data into the protocol data, and rendering the protocol data inserted with the first field data to obtain a preview component; and displaying the preview component through the format customization area, and updating the display content of the graphical user interface by utilizing the preview component.
In one embodiment, the data sending module 906 is further configured to: the protocol data are stored in an appointed interface of the server, so that when the server monitors that the appointed interface changes, a static page is generated based on the protocol data stored in the appointed interface, an initial fixed format file corresponding to the static page is generated, and the initial fixed format file is cut according to pages to obtain a first fixed format file.
In an embodiment, the apparatus further includes a file loading module, configured to: if the file address information fed back by the server is received, a file loading request corresponding to the file address information is generated; if the volume of the first fixed format file is larger than a preset threshold value, dividing the file loading request into a specified number of byte loading requests; and sending each byte loading request to the server so as to load the first fixed layout file from the file address information of the server in a concurrent manner.
In one embodiment, the file loading module is further configured to: receiving a page preview request under the condition that the loading of the first fixed layout file is completed; wherein the first fixed layout file comprises at least one page; and loading the file stream corresponding to the target page carried by the page preview request to display the page corresponding to the target page.
In an embodiment, the apparatus further includes a data saving module, configured to: storing the protocol data to a specified data source to obtain third interface address information corresponding to the protocol data; the preview module 908 is further configured to: reading protocol data from a specified data source based on the third interface address information; analyzing the protocol data to obtain at least one second binding field contained in the protocol data, and determining second interface address information corresponding to each second binding field; and reading second field data from the specified data source based on the second interface address information to generate a second fixed layout file based on the second field data.
In one embodiment, the protocol data is json schema data.
The device provided by the embodiment of the present invention has the same implementation principle and the same technical effects as those of the foregoing method embodiments, and for the sake of brief description, reference may be made to corresponding contents in the foregoing method embodiments for the parts of the device embodiments that are not mentioned.
The embodiment of the invention provides terminal equipment, which particularly comprises a processor and a storage device; the storage means has stored thereon a computer program which, when executed by the processor, performs the method of any of the above described embodiments.
Fig. 10 is a schematic structural diagram of a terminal device according to an embodiment of the present invention, where the terminal device 100 includes: the system comprises a processor 10, a memory 11, a bus 12 and a communication interface 13, wherein the processor 10, the communication interface 13 and the memory 11 are connected through the bus 12; the processor 10 is arranged to execute executable modules, such as computer programs, stored in the memory 11.
The Memory 11 may include a high-speed Random Access Memory (RAM) and may also include a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. The communication connection between the network element of the system and at least one other network element is realized through at least one communication interface 13 (which may be wired or wireless), and the internet, a wide area network, a local network, a metropolitan area network, and the like can be used.
The bus 12 may be an ISA bus, a PCI bus, an EISA bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one double-headed arrow is shown in FIG. 10, but this does not indicate only one bus or one type of bus.
The memory 11 is configured to store a program, and the processor 10 executes the program after receiving an execution instruction, and the method executed by the apparatus defined by the flow process disclosed in any of the foregoing embodiments of the present invention may be applied to the processor 10, or implemented by the processor 10.
The processor 10 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 10. The Processor 10 may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the device can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components. The various methods, steps, and logic blocks disclosed in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present invention may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in the memory 11, and the processor 10 reads the information in the memory 11 and completes the steps of the method in combination with the hardware thereof.
The computer program product of the readable storage medium provided in the embodiment of the present invention includes a computer readable storage medium storing a program code, where instructions included in the program code may be used to execute the method described in the foregoing method embodiment, and specific implementation may refer to the foregoing method embodiment, which is not described herein again.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
Finally, it should be noted that: the above-mentioned embodiments are only specific embodiments of the present invention, which are used for illustrating the technical solutions of the present invention and not for limiting the same, and the protection scope of the present invention is not limited thereto, although the present invention is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: those skilled in the art can still make modifications or changes to the embodiments described in the foregoing embodiments, or make equivalent substitutions for some features, within the scope of the disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the embodiments of the present invention, and they should be construed as being included therein. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. A layout file processing method is characterized in that a graphical user interface is provided through a terminal, the graphical user interface at least comprises a layout customization area and a field area, and the field area displays a plurality of candidate fields required by configuration of a layout file, and the method comprises the following steps:
monitoring a drag event aiming at a target field in the candidate fields;
if the target field is dragged to the format customization area, transcoding the target field to obtain protocol data corresponding to the target field;
sending the protocol data to a server side so that the server side generates a first fixed format file based on the protocol data and feeds back file address information of the first fixed format file;
and if the file address information fed back by the server is not received, generating a second fixed format file based on the protocol data, and displaying the second fixed format file through the graphical user interface.
2. The method according to claim 1, wherein after the step of transcoding the target field to obtain the protocol data corresponding to the target field, the method further comprises:
analyzing the protocol data to obtain at least one first binding field contained in the protocol data, and determining first interface address information corresponding to each first binding field;
reading first field data from a specified data source based on the first interface address information;
inserting the first field data into the protocol data, and rendering the protocol data inserted with the first field data to obtain a preview component;
and displaying the preview component through the format customization area, and updating the display content of the graphical user interface by using the preview component.
3. The method of claim 1, wherein the step of sending the protocol data to a server, so that the server generates a first fixed-layout file based on the protocol data, comprises:
the protocol data are stored in an appointed interface of a server, so that when the server monitors that the appointed interface changes, a static page is generated based on the protocol data stored in the appointed interface, an initial fixed layout file corresponding to the static page is generated, and the initial fixed layout file is cut according to pages to obtain a first fixed layout file.
4. The method of claim 1, further comprising:
if the file address information fed back by the server side is received, a file loading request corresponding to the file address information is generated;
if the volume of the first fixed format file is larger than a preset threshold value, the file loading request is divided into a specified number of byte loading requests;
and sending each byte loading request to the server so as to load the first fixed format file from the file address information of the server in a concurrent manner.
5. The method of claim 4, further comprising:
receiving a page preview request under the condition that the first fixed layout file is loaded completely; wherein the first fixed layout file comprises at least one page;
and loading a file stream corresponding to the target page carried by the page preview request so as to display the page corresponding to the target page.
6. The method according to claim 1, wherein after the step of transcoding the target field to obtain target protocol data corresponding to the target field, the method further comprises:
storing the protocol data to a specified data source to obtain third interface address information corresponding to the protocol data;
the step of generating a second fixed layout file based on the standard protocol data includes:
reading the protocol data from the specified data source based on the third interface address information;
analyzing the protocol data to obtain at least one second binding field contained in the protocol data, and determining second interface address information corresponding to each second binding field;
reading second field data from the specified data source based on the second interface address information to generate a second fixed layout file based on the second field data.
7. The method of claim 1, wherein the protocol data is json schema data.
8. A layout file processing apparatus for providing a graphic user interface through a terminal, the graphic user interface including at least a layout customization area and a field area, the field area displaying a plurality of candidate fields required for configuring a layout file, the apparatus comprising:
the event monitoring module is used for monitoring a drag event aiming at a target field in the candidate fields;
the transcoding module is used for transcoding the target field to obtain protocol data corresponding to the target field if the target field is monitored to be dragged to the format customization area;
the data sending module is used for sending the protocol data to a server so that the server generates a first fixed format file based on the protocol data and feeds back file address information of the first fixed format file;
and the preview module is used for generating a second fixed format file based on the protocol data and displaying the second fixed format file through the graphical user interface if the file address information fed back by the server is not received.
9. A terminal device comprising a processor and a memory, the memory storing computer-executable instructions executable by the processor, the processor executing the computer-executable instructions to implement the method of any one of claims 1 to 7.
10. A computer-readable storage medium having computer-executable instructions stored thereon which, when invoked and executed by a processor, cause the processor to implement the method of any of claims 1 to 7.
CN202211545561.0A 2022-12-05 2022-12-05 Layout file processing method and device, terminal equipment and storage medium Active CN115587075B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211545561.0A CN115587075B (en) 2022-12-05 2022-12-05 Layout file processing method and device, terminal equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211545561.0A CN115587075B (en) 2022-12-05 2022-12-05 Layout file processing method and device, terminal equipment and storage medium

Publications (2)

Publication Number Publication Date
CN115587075A true CN115587075A (en) 2023-01-10
CN115587075B CN115587075B (en) 2023-07-04

Family

ID=84783387

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211545561.0A Active CN115587075B (en) 2022-12-05 2022-12-05 Layout file processing method and device, terminal equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115587075B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116126348A (en) * 2023-04-17 2023-05-16 函子科技(杭州)有限公司 File compiling method for low-code application program of real-time preview

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
FR2929024A1 (en) * 2008-03-18 2009-09-25 Noel Pampagnin METHOD FOR PUBLICATION OF SECURE ONLINE DOCUMENTS AND PUBLICATION PLATFORM.
CN109446490A (en) * 2018-09-13 2019-03-08 杭州索骥数据科技有限公司 Method for previewing, generation method and the processing method of pdf document
CN109710902A (en) * 2018-08-17 2019-05-03 深圳壹账通智能科技有限公司 Generation method, device, equipment and the computer readable storage medium of PDF document
CN111881650A (en) * 2020-07-20 2020-11-03 北京百度网讯科技有限公司 PDF document generation method and device and electronic equipment
CN115017867A (en) * 2022-04-19 2022-09-06 上海华客信息科技有限公司 PDF automatic generation method, system, equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
FR2929024A1 (en) * 2008-03-18 2009-09-25 Noel Pampagnin METHOD FOR PUBLICATION OF SECURE ONLINE DOCUMENTS AND PUBLICATION PLATFORM.
CN109710902A (en) * 2018-08-17 2019-05-03 深圳壹账通智能科技有限公司 Generation method, device, equipment and the computer readable storage medium of PDF document
CN109446490A (en) * 2018-09-13 2019-03-08 杭州索骥数据科技有限公司 Method for previewing, generation method and the processing method of pdf document
CN111881650A (en) * 2020-07-20 2020-11-03 北京百度网讯科技有限公司 PDF document generation method and device and electronic equipment
CN115017867A (en) * 2022-04-19 2022-09-06 上海华客信息科技有限公司 PDF automatic generation method, system, equipment and storage medium

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
MARÍA JESÚS LOBO等: "Flex-ER: A Platform to Evaluate Interaction Techniques for Immersive Visualizations", PROCEEDINGS OF THE ACM ON HUMAN-COMPUTER INTERACTION *
胡荣磊等: "版式文档OFD签章模块的研究与实现", 《信息技术》 *
胡荣磊等: "版式文档OFD签章模块的研究与实现", 《信息技术》, no. 08, 25 August 2016 (2016-08-25) *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116126348A (en) * 2023-04-17 2023-05-16 函子科技(杭州)有限公司 File compiling method for low-code application program of real-time preview
CN116126348B (en) * 2023-04-17 2023-07-07 函子科技(杭州)有限公司 File compiling method for low-code application program of real-time preview

Also Published As

Publication number Publication date
CN115587075B (en) 2023-07-04

Similar Documents

Publication Publication Date Title
US20220171915A1 (en) Automated augmentation of text, web and physical environments using multimedia content
CN106575298B (en) Rapid presentation of web sites containing dynamic content and stale content
US8549395B2 (en) Method and system for transforming an integrated webpage
US7908344B2 (en) Methods, apparatus, and systems for providing local and online data services
CN110020329B (en) Method, device and system for generating webpage
US9729672B2 (en) Collaborative editing
JP4771915B2 (en) Apparatus, method, and program for converting HTML text
WO2023093673A1 (en) Information processing method, apparatus and system, and storage medium
CN110765284A (en) Method, system, computing device and storage medium for generating presentation
CN113382083A (en) Webpage screenshot method and device
CN115587075B (en) Layout file processing method and device, terminal equipment and storage medium
CN114297544A (en) Remote browsing method, device, equipment and storage medium
CN114417226A (en) Page generation method, display method, device, electronic equipment and storage medium
JP4451925B1 (en) Guideline management device and guideline management program
CN102087653B (en) Method and device for issuing website information
CN116578795A (en) Webpage generation method and device, storage medium and electronic equipment
CN109002557B (en) Method and electronic equipment for optimizing webpage loading speed based on browser caching mechanism
KR101975111B1 (en) Mass webpage document transforming method, and system thereof
US8156428B1 (en) Method and apparatus for merging digital content
CN115114556A (en) Method and device for creating page
KR20160002163A (en) System for creation electronic mail and method for creation electronic mail
US20170031884A1 (en) Automated dependency management based on page components
US20160012028A1 (en) Content management system
CN112528184A (en) Sending method and device of rich text mail, computer equipment and storage medium
CN111179164A (en) Method and device for generating thumbnail

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