CN115220720A - Form rendering method, device and equipment and storage medium - Google Patents
Form rendering method, device and equipment and storage medium Download PDFInfo
- Publication number
- CN115220720A CN115220720A CN202210899322.9A CN202210899322A CN115220720A CN 115220720 A CN115220720 A CN 115220720A CN 202210899322 A CN202210899322 A CN 202210899322A CN 115220720 A CN115220720 A CN 115220720A
- Authority
- CN
- China
- Prior art keywords
- component
- configuration information
- memory
- component configuration
- browser
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
- G06F8/38—Creation or generation of source code for implementing user interfaces
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/958—Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
- G06F8/36—Software reuse
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/65—Updates
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/70—Software maintenance or management
- G06F8/71—Version control; Configuration management
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Databases & Information Systems (AREA)
- Computer Security & Cryptography (AREA)
- Human Computer Interaction (AREA)
- Data Mining & Analysis (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The application provides a form rendering method, a form rendering device, equipment and a storage medium, which relate to the technical field of form engines, and the method comprises the following steps: acquiring a user access request of a form page; judging whether the component configuration information of the form page is cached in a memory of the browser; the component configuration information comprises a component identifier, a component version number, component update time and component description information; if the component configuration information of the form page is cached in the browser memory, the component configuration information is read from the browser memory, and the form rendering is performed on the form page based on the component configuration information, so that the component information is obtained through the client memory instead of being obtained by a real-time request server, and the reading efficiency and the form rendering efficiency are improved.
Description
Technical Field
The present application relates to the field of form engine technologies, and in particular, to a form rendering method, apparatus, device, and storage medium.
Background
The form engine can be called a form flow, a flow form and a workflow form, and is a form design system based on visual editing on a Web interface. With the low-code or no-code application becoming more and more extensive, the use of a corresponding form engine is inevitable, the form engine is constructed by a plurality of tuple elements, and the update release deployment of the existing market tuple elements, whether centralized deployment or single deployment of cache to improve the reading efficiency, becomes a necessary technical means.
At present, form rendering is performed on a form engine, and each time of form rendering is read on a background server, so that corresponding consumption of network IO resources can be met, time for initiating a request to the server can be increased when the number of components is too large or too large, and form rendering efficiency is greatly reduced.
Disclosure of Invention
In view of this, an object of the embodiments of the present application is to provide a form rendering method, apparatus, device, and storage medium, where when accessing a form page, it is first determined whether component configuration information of the form page is cached in a browser memory, and if the component configuration information is cached, the component configuration information is directly read from the browser memory, and the form rendering is performed based on the component configuration information, so that obtaining component information through a client memory is implemented, instead of requesting a server to obtain the component information in real time, and the reading efficiency is improved, thereby solving the technical problems of "needing to face consumption of corresponding network IO resources, and greatly reducing the form rendering efficiency".
In a first aspect, an embodiment of the present application provides a form rendering method, where the method includes: acquiring a user access request of a form page; judging whether the component configuration information of the form page is cached in a memory of the browser; the component configuration information comprises component identification, component version number, component updating time and component description information; if the component configuration information of the form page is cached in the browser memory, reading the component configuration information from the browser memory, and performing form rendering on the form page based on the component configuration information.
In the implementation process, the configuration information of the components is directly obtained by the memory of the client instead of the real-time request, so that the situation that interaction is required to the server when the page needs the component information is avoided, whether the page is cached in the memory is judged in advance, and then the page is directly read in the memory, a large amount of consumption of network IO resources is avoided, the interaction feeling of a user is improved, the reading efficiency is improved, and meanwhile, the form rendering efficiency is guaranteed.
Optionally, the determining whether the component configuration information of the form page is cached in the browser memory includes: reading a global variable in a memory of the browser; and determining whether the component configuration information of the form page is cached in the memory of the browser or not according to the assignment of the global variable.
In the implementation process, whether the configuration in the browser memory is judged according to whether a global variable has a value or not is convenient and quick, the judgment efficiency is improved, and whether the configuration can be directly read from the memory side or be subsequently updated from the server side is determined more quickly.
Optionally, before determining whether to cache the component configuration information of the form page in the browser memory, the method further includes: the method comprises the steps of training access of a server side to change component configuration information of a component in turn; judging whether the updating time of the component configuration information of the changed component is consistent with the updating time of the corresponding component configuration information in the memory of the browser; and if not, updating the component configuration information of the changed component into the browser memory.
In the implementation process, the configuration update of the directory component at the server side can be detected by the rotation training mechanism through comparing the update time, and when the update exists, the configuration information of the component which is correspondingly changed is returned and updated to the browser memory cache of the client side, so that the real-time update effect of the component in the memory of the client side is improved.
Optionally, the interval time of the round visit is 10s once.
In the implementation process, the requests are not frequent due to the 10s round of training requests, the user perception is moderate, the interaction feeling of the user is improved, and the updating efficiency is improved.
Optionally, the reading the component configuration information from the browser memory, and performing form rendering on the form page based on the component configuration information includes: reading the component configuration information corresponding to a plurality of components from the browser memory; analyzing the styles of the components, the events of the components and the three-way linkage relation of the components from the component configuration information; and performing form rendering on the form page based on the styles of the components, the events of the components and the three-party linkage relation of the components.
In the implementation process, the form is rendered through directly reading the component configuration relations of the multiple components in the memory, and compared with the method of obtaining the component configuration relations by going to a server, the method avoids a large amount of consumption of network IO resources, improves the interactive experience of a user, and further improves the form rendering efficiency. When the multi-component independent deployment is carried out, IO interaction can be greatly reduced, and the reading efficiency of the multi-component is effectively improved.
Optionally, after determining whether the component configuration information of the form page is cached in the browser memory, the method further includes: if the component configuration information of the form page is not cached in the memory of the browser, acquiring updated component configuration information of all components of the form page from a server side; and updating the updated component configuration information to the browser memory.
In the implementation process, the component configuration information is judged not to be cached in the memory, and then the component information is acquired from the server side, so that the server deployment user side of the component can be automatically updated and found, the scope of the component is determined according to the updated information of the component, the local component updating can be realized, necessary conditions are provided for updating and caching of the component configuration information, and the interactive experience of a user is improved.
Optionally, the updating the updated component configuration information to the browser memory includes: arranging the component configuration information in a reverse order according to the size of the version number of the component configuration information; and after the reverse sequence is arranged, updating the configuration information of the first component with the version number in the arrangement into the memory of the browser.
In the implementation process, the first latest version component is acquired in reverse order by using the size of the version number, so that the component updating efficiency is improved.
In a second aspect, an embodiment of the present application provides a form rendering apparatus, where the apparatus includes: the acquisition module is used for acquiring a user access request of a form page; the judging and caching module is used for judging whether the component configuration information of the form page is cached in a memory of the browser; the component configuration information comprises a component identifier, a component version number, component update time and component description information; and the rendering module is used for reading the component configuration information from the browser memory and performing form rendering on the form page based on the component configuration information if the component configuration information of the form page is cached in the browser memory.
In a third aspect, an embodiment of the present application further provides an electronic device, including: a processor, a memory storing machine-readable instructions executable by the processor, the machine-readable instructions being executable by the processor to perform the steps of the method described above when the electronic device is run.
In a fourth aspect, embodiments of the present application provide a computer-readable storage medium, on which a computer program is stored, the computer program, when executed by a processor, performing the steps of the above-mentioned method.
In order to make the aforementioned objects, features and advantages of the present application more comprehensible, embodiments accompanied with figures are described in detail below.
Drawings
To more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments of the present application will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and that those skilled in the art can also obtain other related drawings based on the drawings without inventive efforts.
Fig. 1 is a flowchart of a form rendering method according to an embodiment of the present application;
fig. 2 is a schematic flowchart of a component update and cache method according to an embodiment of the present disclosure;
FIG. 3 is a functional block diagram of a form rendering apparatus according to an embodiment of the present application; and
fig. 4 is a block diagram of an electronic device that provides a form rendering apparatus according to an embodiment of the present application.
Icon: 210-an obtaining module; 220-judging a cache module; 230-a rendering module; 300-an electronic device; 311-a memory; 312 — a storage controller; 313-a processor; 314-a peripheral interface; 315-input-output unit; 316-display unit.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. The components of the embodiments of the present application, as generally described and illustrated in the figures herein, could be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present application, presented in the accompanying drawings, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present application without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures. The terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrases "comprising a," "8230," "8230," or "comprising" does not exclude the presence of additional like elements in a process, method, article, or apparatus that comprises the element. The terms "first," "second," and the like are used solely to distinguish one from another and are not to be construed as indicating or implying relative importance.
Before introducing the present application, a brief introduction will first be made to terms referred to in the present application:
the flow open platform form engine: the configuration information of the form can be edited and generated in a form designer of the flow opening platform by a user, and can also be automatically constructed by a third-party service system according to a protocol of the flow opening platform. Each form is a JSON Schema formed by all components, the output of the form designer is a JSON Schema describing the fields of the form, and the JSON Schema is stored in a database after the form design is completed. And after the form is published, the front-end renderer renders the form according to the JSON Schema. Each component in the form corresponds to an object in the Schema array, and the information of all fields of the component is stored in the object, so that the addition and deletion of the components of the form each time are the objects corresponding to the addition and deletion JSON Schema, and the modification of the attribute of a specific component is the modification of the corresponding object.
A form designer: the method mainly provides a visual interface, so that a user can quickly edit the JSON Schema which can be analyzed and rendered in a what-you-see-is-what-you-get mode.
The inventors of the present application noted that: when a form designer of a form engine performs form rendering, each time of form rendering is read from a background server, corresponding consumption of network IO resources is faced, and when the number of components is too large or too large, the time for initiating a request to the server is increased, so that the form rendering efficiency is greatly reduced. Therefore, based on the above-mentioned defects in the prior art, the position of the form rendering reading is adjusted, and the present application provides a form rendering method, which is specifically introduced as follows:
referring to fig. 1, fig. 1 is a flowchart of a form rendering method according to an embodiment of the present disclosure. The method can comprise the following steps: step 100, step 120, step 1401, and step 1402.
Step 100: acquiring a user access request of a form page;
step 120: judging whether the component configuration information of the form page is cached in a memory of the browser; the component configuration information comprises a component identifier, a component version number, component updating time and component description information;
if the component configuration information of the form page is cached in the browser memory, step 1401 is executed: reading component configuration information from a browser memory; step 1402: and performing form rendering on the form page based on the component configuration information.
Illustratively, a form may be composed of a plurality of user input class components and a base information class component, the user input class components may comprise a plurality of forms: text, numbers, single selection, multiple selection, attachments, details and the like, and the basic information class component can comprise various forms: name, job number, company body, account number, office location, etc. Cached in the browser memory is the component configuration information of the form component, which may specifically include: the unique identification number of each component is identified, the version number information of the component, the updating time of the component, and the attribute information for describing the layout, the style, the linkage and the like of the component.
When a user opens a form page, namely initiates an access request, the page starts initialization, when the page initialization is carried out, page configuration information generated and stored by a configuration engine can be read from a configuration server, and component identification contained in the page is further determined according to the read page configuration information; and when the component configuration information of the form page is cached in the memory of the browser, directly reading the corresponding component configuration information from the memory cache according to each component identifier in the form when the form is initialized, and then rendering the corresponding component configuration information to a dom template or an html page.
By the method, the client-side memory is used for obtaining the configuration information of the components instead of the real-time request, namely, the interaction request to the server side is not needed when the component information is needed in each page, and whether the page is cached in the memory is judged in advance, so that the page is directly read in the memory, the large consumption of network IO resources is avoided, the interaction feeling of a user is improved, the reading efficiency is improved, and the form rendering efficiency is guaranteed.
In one embodiment, step 120 may comprise: step 121, step 122.
Step 121: reading a global variable in a memory of the browser;
step 122: and determining whether the component configuration information of the form page is cached in the memory of the browser or not according to the assignment of the global variable.
Illustratively, the global variable may be a common variable to which all form parameters corresponding to the component contained in the form page belong, for example: components are defined as global variable objects, and then the cache is placed in the global variable components, with all component information in this variable as well. When the form is rendered, the components used by the form are obtained from the global variables components instead of being queried in real time, and the components are obtained from background data only when the global variables are not available. If the components are assigned, the component configuration information of the form page cached in the browser memory is represented, and if the components are not assigned, the component configuration information of the form page temporarily not cached in the browser memory is represented.
Optionally, if the components are directly assigned to the workflow components of the form page, when an operation instruction for the workflow components is monitored in the form page to be displayed, the pre-packaged data acquisition interface is called, and the components are acquired from the memory side, so that the process data which needs to be transmitted to the workflow engine by the form engine can be obtained.
In the process, whether the configuration in the memory of the browser is judged according to whether a global variable has a value or not is convenient and quick, the judgment efficiency is improved, and whether the memory can be directly read or the server can be subsequently updated or not is quickly determined.
In one embodiment, prior to step 120, the method further comprises: step 110, step 111, step 112.
Step 110: the method comprises the steps of training access of a server side to change component configuration information of a component in turn;
step 111: judging whether the updating time of the component configuration information of the change component is consistent with the updating time of the corresponding component configuration information in the memory of the browser;
step 112: and if not, updating the component configuration information of the changed component into the browser memory.
Illustratively, the round-robin pattern may be: the client side sends a long-rotation training http request to the server side, the timeout time is 60 seconds, after the timeout, a 304httpstatus is returned to the client side, the configuration is not changed, the client side continues the step to repeatedly initiate the request, when new configuration is issued, the server side calls a refer result. The change component may be: since each component may have multiple versions in the component library, when a user selects a specific version for installation during form rendering, the component is downloaded to a specific component directory on the server side, and thus, a changed component may refer to a component with a change and an update in the specific component directory on the server side.
The memory has no cache during the first access, and at this time, a user may not access a specific form yet, and the module configuration information can be loaded into the cache in advance by triggering the training through accessing the page, so that the module configuration information can be directly obtained from the memory when the specific form is accessed, and the loading efficiency is improved.
As shown in fig. 2, when the configuration information of the server is obtained by the round training, the latest component update date is compared to be the same as that in the memory, if the latest component update date is the same as that in the memory, no processing is performed, and if the latest component update date is not the same as that in the memory, the memory is updated to ensure that the component information read from the memory next time is the latest. And updating the updating date of the component in the memory when the increment change of the component is acquired during the rotation training, wherein the updating date can be updated to the component catalog when the component information is installed. When the request indicates that the update date of the component information is inconsistent with the browser memory, updating the component configuration information in the memory, which may specifically include: version number information, update date, component identification is in principle unique and there is no overlay component identification at the time of update.
The polling mechanism can detect the version number update of the server-side directory component by comparing the update time, and when the update exists, the latest version number is taken, the component configuration information of the corresponding changed component is returned and updated to the browser memory cache of the client, so that the real-time update effect of the component in the client memory is improved.
In one embodiment, the interval time for the round of visits is 10 s.
Illustratively, the interval of the polling (i.e. periodically refreshing the interface to obtain data) access may be adjustable and may be other than 10s, such as 5s, 6s, 7s, 8s \8230; 15s \823060s, and 60s, and at most does not exceed a preset polling timeout (e.g. 1 minute), and if no data is available within 1 minute, the requesting server responds with a failure and returns without data. The request is not too frequent due to the one-time training request of 10s, the user perception is moderate, the interaction experience of the user is improved, and the updating efficiency is improved.
In one embodiment, step 140 may comprise: step 141, step 142, step 143.
Step 141: reading component configuration information corresponding to a plurality of components from a browser memory;
step 142: analyzing the styles of the multiple components, the events of the multiple components and the three-way linkage relation of the multiple components from the component configuration information;
step 143: and performing form rendering on the form page based on the styles of the components, the events of the components and the three-party linkage relation of the components.
The event can be used for transferring data from a sub-component to a parent component, and any data can be transferred. The linkage relationship may be: the value of one component is changed, and the value of the other component is required to be changed, so that the linkage relationship is realized.
It should be understood that: each form is a JSON Schema formed by all components, the output of the form designer is a JSON Schema describing the fields of the form, and the JSON Schema is stored in a database after the form design is completed. And after the form is published, the front-end renderer renders the form according to the JSON Schema. Each component in the form corresponds to an object in the Schema array, and the information of all fields of the component is stored in the object, so that the addition and deletion of the components of the form each time are the objects corresponding to the addition and deletion JSON Schema, and the modification of the attribute of a specific component is the modification of the corresponding object.
In addition to describing component types, the behavior of the components themselves needs to be described during form rendering. For example: whether the pull-down option of the single selection component is manually added or an interface is set to be pulled; the value of the single line text component is acquired by the interface, or is filled in by the user, whether the filling is necessary, whether the encryption is required, and the like. In some business scenarios, more complex settings may be added, such as the presence or absence of content linkage between components (whether the user needs to automatically fill or modify the content of one component after entering the content in another component), and the presence or absence of explicit linkage (whether the explicit linkage of one component is controlled by one or more other components, and whether the user needs to automatically control the display or hiding of another component after entering the content in one component). After the description of the component types, the component behaviors, the component linkage relations, the component events and the like, the form renderer can render a form meeting the expectation according to the Schema.
Each form is constructed by one or more form components, the display effect of one form depends on the display content of the components, so that component configuration information corresponding to the components can be read from a browser memory, attribute information such as identification, version number information, update time, description component layout, style and linkage and the like of each component is read, the linkage relation, events, styles and component configuration rules among the components are analyzed, corresponding values are given to each component, corresponding component behaviors are created, then a form renderer is used for rendering the components to a dom template or an html page, and finally the form can be displayed on carriers such as an html webpage and the like. If the component is upgraded or unloaded, the rendering of the form is synchronously updated.
The form is rendered by directly reading the component configuration relations of the components in the memory, and compared with the method of obtaining the component configuration relations by a server, the method avoids a large amount of consumption of network IO resources, improves the interactive experience of users, and further improves the form rendering efficiency. The method can greatly reduce IO interaction when multiple components are separately deployed, and effectively improves the reading efficiency of the multiple components.
In one embodiment, after step 120, the method further comprises: step 121, step 122.
Step 121: if the component configuration information of the form page is not cached in the memory of the browser, acquiring updated component configuration information of all components of the form page from a server side;
step 122: and updating the updated component configuration information into the browser memory.
For example, if the component information is stored in a database or the like, the database can be manually modified to operate, the secure downloading and installation of the component cannot be performed, the database can be manually operated to adjust, and the corresponding secure plugging of the component cannot be performed, so that the component can be downloaded to a specified component file directory of a server side after a user selects a specified version component to install during form rendering. Each component in the component file directory has corresponding control of security certificate, use validity and the like, and the file directory contains configuration information of the component. The components of the server side are generated by downloading and installing the components into the specified directory, and the component information of the memory side is data synchronous update of the components of the server side obtained by the browser side of the user.
When the component configuration information of the form page is judged not to be cached in the memory of the browser end temporarily, namely when the global variable components are not assigned, the latest versions of all the components of the form are obtained from the server end, the component configuration information of the corresponding components is returned, the component configuration information is assigned to the global variable, and after the component description is read, the corresponding component configuration information is obtained from the components.
By judging that the configuration information of the components is not cached in the memory and further acquiring the component information from the server side, the server deployment user side of the components can be automatically updated and found, the scope of the component to be published at this time is determined according to the updated information of the components, the local component updating can be realized, necessary conditions are provided for updating and caching of the configuration information of the components, and the interactive experience of users is improved.
In one embodiment, step 122 may specifically include: step 122a, step 122b.
Step 122a: arranging the component configuration information in a reverse order according to the size of the version number of the component configuration information;
step 122b: and after the reverse order is arranged, updating the configuration information of the components with the version numbers arranged in the first order into the memory of the browser.
Illustratively, when the server side obtains the update information of all the components of the form, because each component may have multiple versions in the component file directory of the server side, the component configuration information of the same component should be arranged in reverse order according to the size of the version number, multiple components should be similarly arranged in reverse order, and finally after each component is arranged in reverse order, the component configuration information with the version number arranged at the head of the queue is updated and cached to the global variable in the memory of the browser. The first latest version component is acquired in the reverse order by utilizing the size of the version number, so that the component updating efficiency is improved.
Referring to fig. 3, fig. 3 is a schematic diagram of functional modules of a form rendering apparatus according to an embodiment of the present application, where the apparatus includes: an obtaining module 210, a judgment caching module 220, and a rendering module 230.
An obtaining module 210, configured to obtain a user access request of a form page;
the cache judging module 220 is configured to judge whether component configuration information of the form page is cached in a memory of the browser; the component configuration information comprises component identification, component version number, component updating time and component description information;
a rendering module 230, configured to, if the component configuration information of the form page is cached in the browser memory, read the component configuration information from the browser memory, and perform form rendering on the form page based on the component configuration information.
Optionally, the determination cache module 220 may be configured to:
reading a global variable in a memory of the browser;
and determining whether the component configuration information of the form page is cached in the memory of the browser or not according to the assignment of the global variable.
Optionally, the apparatus may further include a trainee access unit, and the trainee access unit may be configured to:
the method comprises the steps of alternately training and accessing component configuration information of a server side change component;
judging whether the updating time of the component configuration information of the change component is consistent with the updating time of the corresponding component configuration information in the memory of the browser;
and if not, updating the component configuration information of the changed component into the browser memory.
Optionally, the interval time of the round visit is 10s once.
Optionally, the rendering module 230 may be configured to:
reading the component configuration information corresponding to a plurality of components from the browser memory;
analyzing the styles of the plurality of components, the events of the plurality of components and the three-way linkage relationship of the plurality of components from the component configuration information;
and performing form rendering on the form page based on the styles of the components, the events of the components and the three-party linkage relation of the components.
Optionally, the apparatus may further include a server acquisition and update unit, where the server acquisition and update unit may be configured to:
if the component configuration information of the form page is not cached in the memory of the browser, acquiring updated component configuration information of all components of the form page from a server side;
and updating the updated component configuration information to the browser memory.
Optionally, the server-side obtaining and updating unit may be further configured to:
arranging the component configuration information in a reverse order according to the size of the version number of the component configuration information;
and after the reverse sequence is arranged, updating the configuration information of the first component with the version number in the arrangement into the memory of the browser.
Referring to fig. 4, fig. 4 is a block diagram of an electronic device. The electronic device 300 may include a memory 311, a memory controller 312, a processor 313, a peripheral interface 314, an input output unit 315, and a display unit 316. It will be understood by those skilled in the art that the structure shown in fig. 4 is merely illustrative and is not intended to limit the structure of the electronic device 300. For example, electronic device 300 may also include more or fewer components than shown in FIG. 4, or have a different configuration than shown in FIG. 4.
The above-mentioned memory 311, memory controller 312, processor 313, peripheral interface 314, input/output unit 315 and display unit 316 are electrically connected to each other directly or indirectly to implement data transmission or interaction. For example, the components may be electrically connected to each other via one or more communication buses or signal lines. The processor 313 described above is used to execute executable modules stored in memory.
The Memory 311 may be, but is not limited to, a Random Access Memory (RAM), a Read Only Memory (ROM), a Programmable Read-Only Memory (PROM), an Erasable Read-Only Memory (EPROM), an electrically Erasable Read-Only Memory (EEPROM), and the like. The memory 311 is configured to store a program, and the processor 313 executes the program after receiving an execution instruction, and the method executed by the electronic device 300 defined by the process disclosed in any embodiment of the present application may be applied to the processor 313, or implemented by the processor 313.
The processor 313 may be an integrated circuit chip having signal processing capabilities. The Processor 313 may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the Integrated Circuit may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component. The various methods, steps, and logic blocks disclosed in the embodiments of the present application 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 peripheral interface 314 couples various input/output devices to the processor 313 and to the memory 311. In some embodiments, peripheral interface 314, processor 313, and memory controller 312 may be implemented in a single chip. In other examples, they may be implemented separately from each other.
The input/output unit 315 is used for providing input data to a user. The input/output unit 315 may be, but is not limited to, a mouse, a keyboard, and the like.
The display unit 316 provides an interactive interface (e.g., a user interface) between the electronic device 300 and a user for reference by the user. In this embodiment, the display unit 316 may be a liquid crystal display or a touch display. The liquid crystal display or the touch display can display the process of the program executed by the processor.
The electronic device 300 in this embodiment may be configured to perform each step in each method provided in this embodiment.
In addition, an embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and the computer program is executed by a processor to perform the steps in the foregoing method embodiments.
The computer program product of the foregoing method provided in the embodiment of the present application includes a computer-readable storage medium storing a program code, where instructions included in the program code may be used to execute steps in the foregoing method embodiment, which may be referred to specifically in the foregoing method embodiment, and details are not described herein again.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the modules is only one logical division, and there may be other divisions when actually implemented, and for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form. The functional modules in the embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
It should be noted that the functions, if implemented in the form of software functional modules and sold or used as independent products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including 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 application. 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, an optical disk, or other various media capable of storing program codes.
In this document, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions.
The above description is only an example of the present application and is not intended to limit the scope of the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims (10)
1. A method of rendering a form, the method comprising:
acquiring a user access request of a form page;
judging whether the component configuration information of the form page is cached in a memory of the browser; the component configuration information comprises component identification, component version number, component updating time and component description information;
if the component configuration information of the form page is cached in the browser memory, reading the component configuration information from the browser memory, and performing form rendering on the form page based on the component configuration information.
2. The method of claim 1, wherein the determining whether the component configuration information of the form page is cached in the browser memory comprises:
reading a global variable in a memory of the browser;
and determining whether the component configuration information of the form page is cached in the memory of the browser or not according to the assignment of the global variable.
3. The method of claim 1, wherein before determining whether the component configuration information of the form page is cached in the browser memory, the method further comprises:
the method comprises the steps of alternately training and accessing component configuration information of a server side change component;
judging whether the updating time of the component configuration information of the change component is consistent with the updating time of the corresponding component configuration information in the memory of the browser;
and if not, updating the component configuration information of the changed component into the browser memory.
4. The method of claim 3, wherein the interval of the round of visits is 10s once.
5. The method of claim 1, wherein reading the component configuration information from the browser memory and performing form rendering on the form page based on the component configuration information comprises:
reading the component configuration information corresponding to a plurality of components from the browser memory;
analyzing the styles of the components, the events of the components and the three-way linkage relation of the components from the component configuration information;
and performing form rendering on the form page based on the styles of the components, the events of the components and the three-party linkage relation of the components.
6. The method of claim 1, wherein after determining whether the component configuration information of the form page is cached in the browser memory, the method further comprises:
if the component configuration information of the form page is not cached in the memory of the browser, acquiring updated component configuration information of all components of the form page from a server side;
and updating the updated component configuration information to the browser memory.
7. The method of claim 6, wherein updating the updated component configuration information into the browser memory comprises:
arranging the component configuration information in a reverse order according to the size of the version number of the component configuration information;
and after the reverse order is arranged, updating the configuration information of the components with the version numbers arranged in the first order into the memory of the browser.
8. An apparatus for rendering forms, the apparatus comprising:
the acquisition module is used for acquiring a user access request of a form page;
the judging and caching module is used for judging whether the component configuration information of the form page is cached in a memory of the browser; the component configuration information comprises a component identifier, a component version number, component update time and component description information;
and the rendering module is used for reading the component configuration information from the browser memory and performing form rendering on the form page based on the component configuration information if the component configuration information of the form page is cached in the browser memory.
9. An electronic device, comprising: a processor, a memory storing machine-readable instructions executable by the processor, the machine-readable instructions when executed by the processor performing the steps of the method of any of claims 1 to 7 when the electronic device is operated.
10. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, which computer program, when being executed by a processor, performs the steps of the method according to any one of claims 1 to 7.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202210899322.9A CN115220720A (en) | 2022-07-28 | 2022-07-28 | Form rendering method, device and equipment and storage medium |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202210899322.9A CN115220720A (en) | 2022-07-28 | 2022-07-28 | Form rendering method, device and equipment and storage medium |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN115220720A true CN115220720A (en) | 2022-10-21 |
Family
ID=83614588
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202210899322.9A Pending CN115220720A (en) | 2022-07-28 | 2022-07-28 | Form rendering method, device and equipment and storage medium |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN115220720A (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN116501766A (en) * | 2023-04-04 | 2023-07-28 | 中国铁道科学研究院集团有限公司电子计算技术研究所 | Dynamic data processing method and system at the APP terminal of railway employee welfare mall |
-
2022
- 2022-07-28 CN CN202210899322.9A patent/CN115220720A/en active Pending
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN116501766A (en) * | 2023-04-04 | 2023-07-28 | 中国铁道科学研究院集团有限公司电子计算技术研究所 | Dynamic data processing method and system at the APP terminal of railway employee welfare mall |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US8065675B2 (en) | In-page installer | |
| US6674450B1 (en) | Interactive data-bound control | |
| US20090300151A1 (en) | System and method for managing a virtual appliance lifecycle | |
| US20100070566A1 (en) | System and Method for Deploying Customised Web Applications | |
| EP2332074A2 (en) | Editing web pages | |
| CN108319474B (en) | Page information generation method, device and equipment | |
| US20220342644A1 (en) | Branching and merging in a design interface | |
| CN114268828B (en) | Large screen page processing method, device, equipment and storage medium | |
| CN101877716A (en) | Customization method of configuration template, display method of configuration template and server | |
| CN106919406A (en) | A kind of desktop application component issue, update method and device | |
| CN112783494A (en) | Automatic skeleton screen generation method and device and application page updating method and device | |
| US20090307058A1 (en) | End user interface customization and end user behavioral metrics collection and processing | |
| CN115220720A (en) | Form rendering method, device and equipment and storage medium | |
| US20170010764A1 (en) | Pivot-based tile gallery with adapted tile(s) | |
| US20190138577A1 (en) | Providing dynamic web content without flicker | |
| EP2431933A1 (en) | Treatment controller | |
| CN118689465A (en) | Application page processing method, device, electronic device and storage medium | |
| WO2022226241A1 (en) | Branching and merging in a design interface | |
| CN115113874B (en) | Configuration development method, system, equipment and storage medium based on small program | |
| CN113010171A (en) | Application construction method and device | |
| EP2824578A1 (en) | Information processing device, method, and program | |
| US11816307B1 (en) | Method for providing service of configuring UI on a display of an in-vehicle infotainment device and UI configuration server using the same | |
| CN115562670B (en) | Page configuration method, device, electronic equipment and medium | |
| JP2003076552A (en) | Image processing program providing server, image processor on the client side, image processing program creating method, image processing program providing program and image processing program reception program | |
| AU2012200799B2 (en) | In-page installer |
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 |