CN115587075B - 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
CN115587075B
CN115587075B CN202211545561.0A CN202211545561A CN115587075B CN 115587075 B CN115587075 B CN 115587075B CN 202211545561 A CN202211545561 A CN 202211545561A CN 115587075 B CN115587075 B CN 115587075B
Authority
CN
China
Prior art keywords
data
file
protocol data
field
address information
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
CN202211545561.0A
Other languages
Chinese (zh)
Other versions
CN115587075A (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 device, terminal equipment and a storage medium, comprising the following steps: monitoring a drag event aiming at a target field in the candidate fields; if the target field is monitored to be dragged to the layout customizing region, transcoding the target field to obtain protocol data corresponding to the target field; the protocol data is 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 the file address information fed back by the server side 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 operation interaction, and can also remarkably reduce waiting time required by a user to preview the archive format file, thereby remarkably improving 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, a layout file processing device, 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, OCR (optical character recognition, character recognition) technology, database technology, multimedia technology and storage technology, which converts file resources of various carriers into digitalized file information, and a lot of digitalized file information produces various file format files (such as documents and invoices, etc.), so that related technologies propose that the file format files can be randomly combined and typeset based on file information metadata (interface fields) to generate a customizable file format file, such as a reimbursement bill, a certificate, etc., but the operation interaction of the scheme is complex, and the file format file can be previewed only after waiting for a server side to generate, so that the user time is wasted, and the user experience is poor.
Disclosure of Invention
Accordingly, the present invention is directed to a layout file processing method, apparatus, terminal device, and storage medium, which can effectively simplify operation interaction, and can significantly reduce waiting time required for a user to preview a layout file of an archive, thereby significantly improving user experience.
In a first aspect, an embodiment of the present invention provides a layout file processing method, where a graphical user interface is provided through a terminal, 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 method includes: monitoring a drag event aiming at a target field in the candidate fields; if the target field is monitored to be dragged to the layout customizing region, transcoding the target field to obtain protocol data corresponding to the target field; the protocol data is 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 the file address information fed back by the server side 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 one 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 customizing region, and updating the display content of the graphical user interface by utilizing the preview component.
In one embodiment, the step of sending the protocol data to a server to enable the server to generate a first fixed format file based on the protocol data includes: and saving the protocol data to a designated interface of a server, so that when the server monitors that the designated interface is changed, generating a static page based on the protocol data stored in the designated interface, generating an initial fixed format file corresponding to the static page, and performing page cutting processing on the initial fixed format file to obtain a first fixed format file.
In one embodiment, the method further comprises: if the file address information fed back by the server side is received, 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, dividing the file loading request into byte loading requests with specified parts; and sending each byte loading request to the server to concurrently load the first fixed format file from the file address information of the server.
In one embodiment, the method further comprises: receiving a page preview request under the condition that the loading of the first fixed format file is completed; 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 to display the page corresponding to the target page number.
In one embodiment, after the step of transcoding the target field to obtain the target protocol data corresponding to the target field, the method further includes: storing the protocol data to a designated 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; and 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 protocol data is json schema data.
In a second aspect, an embodiment of the present invention further provides a layout file processing device, where a graphical user interface is provided through a terminal, 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, where the device includes: the event monitoring module is used for monitoring a dragging 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 customizing region; the data sending module is used for sending the protocol data to a server side so that the server side can generate a first fixed format file based on the protocol data and feed 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 if the file address information fed back by the server is not received, and displaying the second fixed format file through the graphical user interface.
In a third aspect, an embodiment of the present invention further provides a terminal device, including 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 according to any one of the first aspects.
In a fourth aspect, embodiments of the present invention also provide a computer-readable storage medium storing computer-executable instructions which, when invoked and executed by a processor, cause the processor to implement the method of any one of the first aspects.
According to the layout file processing method, device, terminal equipment and storage medium, a graphical user interface is provided through a terminal, the graphical user interface at least comprises a layout customization area and a field area, the field area is displayed with a plurality of candidate fields required by layout file configuration, firstly, a drag event of a target field in the candidate fields is monitored, if the target field is monitored to be dragged to the layout customization area, transcoding processing is carried out on the target field to obtain protocol data corresponding to the target field, the protocol data is sent to a server, so that the server generates a first fixed layout file based on the protocol data, feeds back file address information of the first fixed layout file, if file address information fed back by the server is not received, a second fixed layout file is generated based on the protocol data, and the second fixed layout file is displayed through the graphical user interface. According to the method, the terminal provides the visual editing function of the format file for the user, the user can design the required format file by dragging the target field, the operation interaction difficulty is effectively reduced, the operation habit of most users for splicing the format file 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 protocol data, the characteristic of extremely fast preview is achieved, the waiting time required by the user for previewing the file format file can be remarkably reduced, and therefore 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 above objects, features and advantages of the present invention more 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 that are needed in the description of the embodiments or the prior art will be briefly described, and it is obvious that the drawings in the description below are some embodiments of the present invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic flow chart 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 schematic diagram of 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 flowchart of a static HTML generating method according to an embodiment of the present invention;
fig. 6 is a flowchart of a method for generating a second fixed format file according to an embodiment of the present invention;
FIG. 7 is a flowchart illustrating another layout file processing method according to an embodiment of the present invention;
FIG. 8 is a timing chart of 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 device 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
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the present invention will be clearly and completely described in conjunction with the embodiments, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
At present, the existing scheme for processing format files has the following problems: the operation interaction is too complex, and the difficulty of the upper hand is high; (2) Asynchronous waiting is needed in the process of generating the file, such as after data is stored, the service end generates the format file based on the data, and the user cannot immediately fix the format file in the process of generating the format file by the service end; (3) The customized requirement of the service group cannot be met, and functions cannot be independently added because the same set of multi-service lines are used; (4) When the volume of the layout file is too large, the problems of too slow loading, blocking and the like exist.
Based on the above, the embodiment of the invention provides a format file processing method, a format file processing device, terminal equipment and a storage medium, which can effectively simplify operation interaction, and can also remarkably reduce waiting time required by a user for previewing the format file of an archive, thereby remarkably improving user experience.
For the understanding of the present embodiment, first, a layout file processing method disclosed in the embodiment of the present invention is described in detail, a graphical user interface is provided through a terminal, where the graphical user interface includes at least a layout customization area and a field area, the layout customization area is used for displaying a layout file template edited by a user in real time, and the field area displays a plurality of candidate fields required for configuring a layout file, 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 drag event aiming at a target field in the candidate fields. In one embodiment, listening for drag events may be implemented through a native API (Application Programming Interface ) within the terminal.
Step S104, if the target field is monitored to be dragged to the layout customizing region, transcoding the target field to obtain protocol data corresponding to the target field. Wherein the protocol data is json schema data. In one embodiment, the end of the drag event may be responded, if the drag event is ended, the dragged target field is located in the layout customization area, and it may be determined that the target field is dragged to the layout customization area, the user may further continuously drag the target field in the layout customization area to adjust the layout of the file, and the terminal monitors the content edited by the user through dragging and transcodes the content into json schema data.
Step S106, the protocol data is sent to the 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. The first fixed format file, that is, the fixed format file generated by the server, may be a PDF (Portable Document Format, portable file format) file. In one embodiment, json schema data may be stored in a designated interface, and the server may monitor that the designated interface changes, where the server enters a simulation terminal into a designated Web preview page, gives json schema data to the Web preview page, and starts asynchronous generation of the first fixed format file.
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 one 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 visual format file editing function for a user, the user can design the required format file by dragging the target field, the operation interaction difficulty is effectively reduced, the operation habit of most users for splicing the format file is met, and in the case 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 protocol data, the characteristic of extremely fast preview is achieved, the waiting time required by the user for previewing the file format file is remarkably reduced, and therefore the user experience is remarkably improved.
For the understanding of the foregoing embodiments, the embodiment of the present invention provides an overall flowchart of a format file processing method shown in fig. 2, including three processes: (1) drag editing; (2) save json schema data; (3) The server side grabs the template page to generate a first fixed format file. The template page is a layout customizing area, and a layout file template obtained by a user through dragging and editing the target field is displayed in the layout customizing area.
(1) Drag editing: the user drags the editing template through the visual interface, drags the required target field into the template, configures the corresponding template, drags the beautified image into the template, monitors the content of the drag editing of the user, and transcodes the content to obtain json schema data.
In practical application, the field dragging capability of the database is to monitor the dragging event through the native API, save the dragged data, and have the parameters of the corresponding fields in the data and display the data of the table. For ease of understanding, referring to the data structure diagram of one target field shown in fig. 3, taking the data structure of single drag data (i.e. the target field) as an example, the data in the code v.v shown in fig. 3 are all parameters required by the drag field, and according to the parameters in different fields, the parameters in the fields are dynamically changed, and if the target field corresponding to the drag event is chart or picture data, the parameters in the fields further include corresponding coordinate system descriptions.
After the json schema data is obtained through transcoding, before the json schema data is 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 layout customization area. Furthermore, the terminal can edit a rendering format customizing area, and the format customizing area monitors and renders data sources and processes the data sources so that a user can view the current format. For ease of understanding, reference may be made to the following (a) to (d):
(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 the 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 layout customizing region, and updating the display content of the graphical user interface by utilizing the preview component. In one embodiment, the terminal reads a unified json schema data source rendering view, see 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 data attribute parameters; the data source is promoted to be global by using state management and has the capability of updating the view, and when the data is changed, if the corresponding component uses the parameter, the view is correspondingly updated; while some data needs to be converted again, the middle would use a separate function to translate into the format data needed to render the view.
(2) Save json schema data: after monitoring that the user stores the editing data, the terminal stores json schema data to a designated interface.
(3) The server side grabs the template page to generate a first fixed format file: the server monitors that the designated interface changes, at the moment, the server enters the designated web preview page from the simulation terminal, gives json schema data to the web preview page, and starts to asynchronously generate the first fixed format file. Specifically, the method comprises the following steps: static HTML (Hyper Text Markup Language ) files are generated, and fixed layout files are generated. The server receives the interface data change, reads the appointed static html file, and then starts to capture and generate the fixed format file by using the headless browser. When the server monitors that the designated interface changes, the server generates a static page based on protocol data stored in the designated interface, generates an initial fixed format file corresponding to the static page, and performs page cutting processing on the initial fixed format file to obtain a first fixed format file.
When the server executes the step of generating a static page based on the protocol data stored in the designated interface, the technology stack generates the static page mainly by using the next js (server rendering frame) process, and outputs the static file (i.e., the above static HTML) by using the SSG (Static Site Generation, static page generation) package property. Referring to fig. 5, a flow chart of a static HTML generating method mainly includes the following (1) to (7):
(1) The URL is obtained (uniform resource locator, uniform resource locator system). Among them, the URL contains a template ID (Identity document, identification number), such as URL: id=xxx. And (2) SSR server processing. And (3) requesting json schema data by the server. And (4) the server rendering engine analyzes json schema data. And (5) splicing the HTML by the server. (6) the server generates HTML code. (7) the server renders static HTML.
When the step of generating an initial fixed format file corresponding to the static page and performing page cutting processing on the initial fixed format file to obtain a first fixed format file is executed at the server, the pumpeteer headless browser can be utilized to grasp static HTML to generate the fixed format file, the complete re-etching HTML effect generates the fixed format file with 99% reduction degree, and page cutting processing is performed.
In one embodiment, after obtaining the target protocol data corresponding to the target field, the protocol data may be further saved to a designated data source, to obtain the third interface address information corresponding to the protocol data. On the basis, the embodiment of the invention provides an implementation mode of a terminal executing a step of generating a second fixed format file based on standard protocol data, and particularly, the implementation mode is seen in the following steps 1 to 3:
step 1, reading protocol data from a specified data source based on the third interface address information. In one embodiment, json schema data is required to be read from a specified data source during the preview phase.
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, then processes the binding fields in the data, and sequentially reads the corresponding interfaces of the binding fields to obtain the second field data.
And 3, reading second field data from the appointed 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 batch filled into the layout customization area (rows and columns), then the read form data layer is converted into HTML fields, and the second fixed layout file is displayed back on the designated node.
Based on this, in the case that the server side does not generate or feed back the first fixed format file, see a flow chart of a method for generating the second fixed format file shown in fig. 6: (1) acquiring a URL. (2) the terminal requests json schema data. (3) the terminal rendering engine parses json schema data. (4) the terminal renders the page (SPA).
Under the condition that the server side generates the first fixed format file, the url preview file is remotely loaded, and the use strategy under the condition that the file volume is overlarge is as follows:
and (one) opening concurrent loading by using range characteristics, and improving the loading speed of the large file. Specific: generating a file loading request corresponding to the file address information; if the volume of the first fixed format file is greater than the preset threshold, dividing the file loading request into a specified number of byte loading requests, and exemplarily dividing the file loading request into n byte loading requests based on range characteristics, so as to request the first fixed format file according to bytes; and sending each byte loading request to the server to concurrently load the first fixed format file from the file address information of the server.
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 number carried by the page preview request so as to display the page corresponding to the target page number.
For the convenience of understanding the above embodiments, the embodiment of the present invention further provides a flowchart of another format file processing method shown in fig. 7, where the method mainly includes the following steps S702 to S708:
step S702, drag editing, processing drag data, converting the drag data into json schema data, and updating the json schema data to a data source.
Step S704, editing the visual rendering view, monitoring json schema data change, and resolving and converting into component rendering.
Step S706, save operation, obtain the latest json schema data, save to the server interface. The server side asynchronously processes and generates static HTML and regenerates PDF files.
Step S708, a preview layer dynamically analyzes the preview and renders the strategy in different modes according to whether a PDF file is generated or not. If the PDF file has been generated, the PDF file is previewed by the remote address. If the PDF file is not generated, json schema data is acquired, decompilation rendering is dynamically analyzed, and file display is previewed.
For easy understanding, the embodiment of the invention further provides a timing chart of a layout file processing method shown in fig. 8, which is specific to: (1) The terminal responds to the drag event, processes the drag data and converts the drag data into json schema data; (2) The terminal updates json schema data to a data source, and the terminal stores the json schema data to a server; (3) The terminal analyzes 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) the data source feeds back data; (6) The terminal inserts the data into json schema data, analyzes and converts the json schema data into component rendering so as to update the view; (7) The service end generates static HTML based on json schema data, and 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) 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 by the embodiment of the invention has at least the following characteristics:
(1) The visual interaction function is adopted in the user operation format file, and the visual interaction function is simple and easy to learn, and can be directly used only if Excel is available. The teaching cost is lower, and the function of the existing format file is more, but the difficulty of the hand is more, and the teaching cost is also very high.
(2) The method has the capability of faster file preview characteristics, the new format file adopts a double rendering strategy mode, whether the file is edited, the user can preview the file immediately, and the process of waiting for previewing the file is reduced, so that interaction experience is enhanced.
(3) The characteristic capability of quick loading of large files, the new format files adopt range and paging capability, the preview provides some characteristics such as lazy loading, the speed of loading the files is improved, and the files are quickly previewed without jamming. Under the condition of processing large files, the existing format files have the condition of being loaded too slowly and getting stuck too slowly.
(4) The self-research general low-code basic framework can be used for expanding other business forms in the future and has the characteristic of customized function requirements.
For the layout file processing method provided in the foregoing embodiment, the embodiment of the present invention further provides a layout file processing device, where a graphical user interface is provided through a terminal, where the graphical user interface at least includes 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 referring to a schematic structural diagram of a layout file processing device shown in fig. 9, the device includes the following parts:
an event listening module 902, configured to listen for a drag event for a target field in the candidate fields;
the transcoding module 904 is configured to transcode the target field if it is monitored that the target field is dragged to the layout customization area, so as 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 if the file address information fed back by the server is not received, and display the second fixed format file through the graphical user interface.
According to the format file processing device provided by the embodiment of the invention, the terminal provides a visual format file editing function for a user, the user can design the required format file by dragging the target field, the operation interaction difficulty is effectively reduced, the operation habit of most users for splicing the format file is met, and in the case 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 protocol data, the characteristic of extremely fast preview is achieved, the waiting time for the user to preview the file format file is remarkably reduced, and therefore the user experience is remarkably improved.
In one embodiment, the apparatus further includes a view update 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 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 layout customizing region, and updating the display content of the graphical user interface by utilizing the preview component.
In one embodiment, the data transmission module 906 is further configured to: and saving the protocol data to a designated interface of the server, so that when the server monitors that the designated interface is changed, generating a static page based on the protocol data stored in the designated interface, generating an initial fixed format file corresponding to the static page, and performing page cutting processing on the initial fixed format file to obtain a first fixed format file.
In one embodiment, the apparatus further includes a file loading module configured to: if file address information fed back by the server side is received, 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, dividing the file loading request into byte loading requests with specified parts; and sending each byte loading request to the server to concurrently load the first fixed format file from the file address information of the server.
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 format file is completed; 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 to display the page corresponding to the target page number.
In one embodiment, the apparatus further includes a data storage module configured to: storing the protocol data to a designated data source to obtain third interface address information corresponding to the protocol data; the preview module 908 is also for: reading 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; and reading the 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 technical effects as those of the foregoing method embodiment, and for the sake of brevity, reference may be made to the corresponding content in the foregoing method embodiment where the device embodiment is not mentioned.
The embodiment of the invention provides terminal equipment, which specifically 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 embodiments described above.
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: a processor 10, a memory 11, a bus 12 and a communication interface 13, the processor 10, the communication interface 13 and the memory 11 being connected by 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, random Access Memory), and may further include a non-volatile memory (non-volatile memory), such as at least one magnetic disk memory. The communication connection between the system network element and at least one other network element is achieved via at least one communication interface 13 (which may be wired or wireless), the internet, a wide area network, a local network, a metropolitan area network, etc. may be used.
Bus 12 may be an ISA bus, a PCI bus, an EISA bus, or the like. The buses may be classified as address buses, data buses, control buses, etc. For ease of illustration, only one bi-directional arrow is shown in FIG. 10, but not only one bus or 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 for flow defining 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 circuitry in hardware or instructions in software in the processor 10. The processor 10 may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU for short), a network processor (Network Processor, NP for short), etc.; but may also be a digital signal processor (Digital Signal Processing, DSP for short), application specific integrated circuit (Application Specific Integrated Circuit, ASIC for short), off-the-shelf programmable gate array (Field-Programmable Gate Array, FPGA for short), or other programmable logic device, discrete gate or transistor logic device, discrete hardware components. The disclosed methods, steps, and logic blocks 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 embodied directly in the execution of a hardware decoding processor, or in the execution of a combination of hardware and software modules in a decoding processor. The software modules may be located in a random access memory, flash memory, read only memory, programmable read only memory, or electrically erasable programmable memory, registers, etc. as well known in the art. The storage medium is located in a memory 11 and the processor 10 reads the information in the memory 11 and in combination with its hardware performs the steps of the method described above.
The computer program product of the readable storage medium provided by the embodiment of the present invention includes a computer readable storage medium storing a program code, where the program code includes instructions for executing the method described in the foregoing method embodiment, and the specific implementation may refer to the foregoing method embodiment and will not be described herein.
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 this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform 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, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
Finally, it should be noted that: the above examples are only specific embodiments of the present invention, and are not intended to limit the scope of the present invention, but it should be understood by those skilled in the art that the present invention is not limited thereto, and that the present invention is described in detail with reference to the foregoing examples: any person skilled in the art may modify or easily conceive of the technical solution described in the foregoing embodiments, or perform equivalent substitution of some of the technical features, while remaining within the technical scope of the present disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention, and are intended to be included in the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (7)

1. A layout file processing method, wherein a graphical user interface is provided through a terminal, the graphical user interface at least comprises a layout customization area and a field area, the field area displays a plurality of candidate fields required for configuring a layout file, the method comprises:
monitoring a drag event aiming at a target field in the candidate fields;
if the target field is monitored to be dragged to the layout customizing region, transcoding the target field to obtain protocol data corresponding to the target field;
the protocol data is 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;
if the file address information fed back by the server side 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;
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;
displaying the preview component through the format customizing region, and updating the display content of the graphical user interface by utilizing the preview component;
after the step of transcoding the target field to obtain the protocol data corresponding to the target field, the method further includes:
storing the protocol data to a designated data source to obtain third interface address information corresponding to the protocol data, wherein the protocol data is json schema 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 in a preview stage;
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 appointed data source based on the second interface address information to generate a second fixed format file based on the second field data, filling the read second field data in a layout customizing area in batches, converting a read form data layer into an HTML field, and displaying the second fixed format file on an appointed node in a displaying mode.
2. The method of claim 1, wherein the step of sending the protocol data to a server to cause the server to generate a first fixed layout file based on the protocol data comprises:
and saving the protocol data to a designated interface of a server, so that when the server monitors that the designated interface is changed, generating a static page based on the protocol data stored in the designated interface, generating an initial fixed format file corresponding to the static page, and performing page cutting processing on the initial fixed format file to obtain a first fixed format file.
3. The method according to claim 1, wherein the method further comprises:
if the file address information fed back by the server side is received, 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, dividing the file loading request into byte loading requests with specified parts;
and sending each byte loading request to the server to concurrently load the first fixed format file from the file address information of the server.
4. A method according to claim 3, characterized in that the method further comprises:
receiving a page preview request under the condition that the loading of the first fixed format file is completed; 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 to display the page corresponding to the target page number.
5. A layout file processing apparatus, wherein a graphic user interface is provided 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 dragging 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 customizing region;
the data sending module is used for sending the protocol data to a server side so that the server side can generate a first fixed format file based on the protocol data and feed back file address information of the first fixed format file;
the preview module is used for generating a second fixed format file based on the protocol data if the file address information fed back by the server is not received, and displaying the second fixed format file through the graphical user interface;
the system also comprises a view updating module for:
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;
displaying the preview component through the format customizing region, and updating the display content of the graphical user interface by utilizing the preview component;
the system also comprises a data storage module for:
storing the protocol data to a designated data source to obtain third interface address information corresponding to the protocol data, wherein the protocol data is json schema data;
the preview module is also used for:
reading the protocol data from the specified data source based on the third interface address information in a preview stage;
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 appointed data source based on the second interface address information to generate a second fixed format file based on the second field data, filling the read second field data in a layout customizing area in batches, converting a read form data layer into an HTML field, and displaying the second fixed format file on an appointed node in a displaying mode.
6. 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 4.
7. A computer readable storage medium storing computer executable instructions which, when invoked and executed by a processor, cause the processor to implement the method of any one of claims 1 to 4.
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 CN115587075A (en) 2023-01-10
CN115587075B true 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)

Families Citing this family (1)

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

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
FR2929024B1 (en) * 2008-03-18 2012-03-09 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
CN109446490B (en) * 2018-09-13 2023-07-21 杭州索骥数据科技有限公司 Previewing method, generating method and processing method of PDF (portable document format) file
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 (1)

* Cited by examiner, † Cited by third party
Title
Flex-ER: A Platform to Evaluate Interaction Techniques for Immersive Visualizations;María Jesús Lobo等;Proceedings of the ACM on Human-Computer Interaction;全文 *

Also Published As

Publication number Publication date
CN115587075A (en) 2023-01-10

Similar Documents

Publication Publication Date Title
CN106575298B (en) Rapid presentation of web sites containing dynamic content and stale content
US10289649B2 (en) Webpage advertisement interception method, device and browser
US7908344B2 (en) Methods, apparatus, and systems for providing local and online data services
CN111752899B (en) Environment report generation method and device, electronic equipment and storage medium
CN113382083B (en) Webpage screenshot method and device
CN110020329B (en) Method, device and system for generating webpage
CN108595697B (en) Webpage integration method, device and system
CN106951270B (en) Code processing method, system and server
CN115587075B (en) Layout file processing method and device, terminal equipment and storage medium
CN110765284A (en) Method, system, computing device and storage medium for generating presentation
CN112114787A (en) Report generation method and device and storage medium
CN113655999A (en) Rendering method, device and equipment of page control and storage medium
CN105550179A (en) Webpage collection method and browser plug-in
Paternò et al. Automatically adapting web sites for mobile access through logical descriptions and dynamic analysis of interaction resources
CN115065945B (en) Short message link generation method and device, electronic equipment and storage medium
CN109002557B (en) Method and electronic equipment for optimizing webpage loading speed based on browser caching mechanism
JP4451925B1 (en) Guideline management device and guideline management program
CN116578795A (en) Webpage generation method and device, storage medium and electronic equipment
US11843679B2 (en) Automated dependency management based on page components
CN115935909A (en) File generation method and device and electronic equipment
CN115114556A (en) Method and device for creating page
CN114417226A (en) Page generation method, display method, device, electronic equipment and storage medium
CN112528184A (en) Sending method and device of rich text mail, computer equipment and storage medium
CN111179164A (en) Method and device for generating thumbnail
CN115062255B (en) Website adaptation method and device, electronic equipment and computer readable storage medium

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