CN111414207A - Page construction method, device and equipment - Google Patents

Page construction method, device and equipment Download PDF

Info

Publication number
CN111414207A
CN111414207A CN202010169159.1A CN202010169159A CN111414207A CN 111414207 A CN111414207 A CN 111414207A CN 202010169159 A CN202010169159 A CN 202010169159A CN 111414207 A CN111414207 A CN 111414207A
Authority
CN
China
Prior art keywords
page
configuration data
target page
target
page configuration
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010169159.1A
Other languages
Chinese (zh)
Inventor
余季平
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alipay Hangzhou Information Technology Co Ltd
Original Assignee
Alipay Hangzhou 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 Alipay Hangzhou Information Technology Co Ltd filed Critical Alipay Hangzhou Information Technology Co Ltd
Priority to CN202010169159.1A priority Critical patent/CN111414207A/en
Publication of CN111414207A publication Critical patent/CN111414207A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • G06F9/4451User profiles; Roaming
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the specification discloses a page construction method, a device and equipment, wherein the page construction method can respond to construction operation of a user for a target page and store page configuration data of the target page into a local cache; rendering the target page based on the locally cached page configuration data of the target page; and responding to the saving operation of the user for the target page, and saving the page configuration data of the target page to a server.

Description

Page construction method, device and equipment
Technical Field
The application relates to the technical field of computers, in particular to a page building method, device and equipment.
Background
With the development of network technology and the popularization of terminals, more and more organizations and individuals rely on web pages or other client pages to promote products or information, so that the demand of page development is continuously increased. In order to solve the contradiction between limited page development human resources and infinitely increased page development requirements, an automatic page building application (page building tool) facing users without development technology background is produced.
In the page building application, a user can generate a desired page only by dragging a page element (or a functional module) provided in the application and configuring an attribute for the corresponding page element, and the operation is simple. When a user builds a page by using a page building application, page configuration data is generated every operation step, and the page configuration data is used for rendering and generating the page, so that the page configuration data needs to be accurately stored. However, the page building application in the related art has a disadvantage in storing page configuration data.
Disclosure of Invention
The embodiment of the specification provides a page building method, a page building device and page building equipment, so as to overcome the defect of page building application in the related technology in page configuration data storage.
In order to solve the above technical problem, the embodiments of the present specification are implemented as follows:
in a first aspect, a page building method is provided, which is applied to a page building device, and includes:
responding to the construction operation of a user for a target page, and storing the page configuration data of the target page into a local cache;
rendering the target page based on the locally cached page configuration data of the target page;
and responding to the saving operation of the user for the target page, and saving the page configuration data of the target page to a server.
In a second aspect, a page building device is provided, which is applied to a page building device, and comprises:
the first storage module is used for responding to the building operation of a user for a target page and storing the page configuration data of the target page into a local cache;
the rendering module is used for rendering the target page based on the locally cached page configuration data of the target page;
and the second storage module is used for responding to the storage operation of the user for the target page and storing the page configuration data of the target page to a server.
In a fourth aspect, an electronic device is provided, including:
a processor; and
a memory arranged to store computer executable instructions that, when executed, cause the processor to:
responding to the construction operation of a user for a target page, and storing the page configuration data of the target page into a local cache;
rendering the target page based on the locally cached page configuration data of the target page;
and responding to the saving operation of the user for the target page, and saving the page configuration data of the target page to a server.
In a fifth aspect, a computer-readable storage medium is presented, the computer-readable storage medium storing one or more programs that, when executed by an electronic device comprising a plurality of application programs, cause the electronic device to:
responding to the construction operation of a user for a target page, and storing the page configuration data of the target page into a local cache;
rendering the target page based on the locally cached page configuration data of the target page;
and responding to the saving operation of the user for the target page, and saving the page configuration data of the target page to a server.
As can be seen from the technical solutions provided in the embodiments of the present specification, the solutions provided in the embodiments of the present specification have at least one of the following technical effects: because the page configuration data correspondingly generated by each step of building operation can be stored in the local cache, and the page building application renders the target page based on the page configuration data of the local cache, and interacts with the server only when the user performs the storage operation, on one hand, the server and the database thereof are prevented from being subjected to large access and storage burden, and the stability of the server is improved; on the other hand, the page configuration data can be stored under the offline condition, and the rendering of the target page is realized, so that the dependence on a server is reduced, the data storage is safe and reliable, and the user experience is better; in addition, even if the user closes the page building application by mistake, the page configuration data cannot be lost, and the user can still read the latest page configuration data from the local cache when opening the application again.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
fig. 1 is one of flow diagrams of a page building method provided in an embodiment of the present specification.
Fig. 2 is a second schematic flowchart of a page building method provided in the embodiment of the present specification.
Fig. 3 is a third schematic flow chart of a page building method provided in the embodiment of the present specification.
Fig. 4 is a schematic structural diagram of an electronic device provided in an embodiment of the present specification.
Fig. 5 is one of the schematic structural diagrams of a page building apparatus provided in the embodiments of the present specification.
Fig. 6 is a second schematic structural diagram of a page building apparatus provided in the embodiment of the present specification.
Fig. 7 is a third schematic structural diagram of a page building apparatus provided in an embodiment of the present specification.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the technical solutions of the present application will be described in detail and completely with reference to the following specific embodiments of the present application and the accompanying drawings. It should be apparent that the described embodiments are only some of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
In the related art, page building applications often rely solely on server-side storage of page data. The server-side storage only has at least the following defects: frequent interaction with the server brings great burden to the server and the database thereof, resulting in the reduction of the stability of the server; the storage of page configuration data cannot be realized under the offline condition, so that page rendering cannot be performed; when the user closes the page building application by misoperation, the unsaved page configuration data can be lost, and the like.
In order to overcome the above disadvantages, embodiments of the present specification provide a page building method and apparatus, which may be executed by an electronic device, such as a terminal device or a server device. In other words, the method may be performed by software (e.g., a page building application) or hardware installed in the terminal device or the server device. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, and the like. The terminal devices include but are not limited to: any one of smart terminal devices such as a smart phone, a Personal Computer (PC), a notebook computer, a tablet computer, an electronic reader, a web tv, and a wearable device.
The page building applications include visual page building applications that exist in the related art and may appear in the future. The visual construction means that a page is generated by moving page elements based on operations such as dragging and configuring corresponding attributes for the page elements, and a what you see is what you get page construction mode is realized.
A page building method provided in the embodiments of the present specification is described below.
Fig. 1 is a schematic implementation flow diagram of a page building method provided in an embodiment of the present specification. The method can be applied to a page building application, as shown in fig. 1, and the method can include:
and 102, responding to the building operation of a user for a target page, and storing the page configuration data of the target page into a local cache.
The target page comprises a partially built page or a newly built page which is opened by a user in the page building application. When a user newly builds a target page in a page building application or opens a partially built target page, the user performs one-step building operation on the target page, and the generated page configuration data is stored in a local cache. The building operation includes, but is not limited to, any operation of dragging a page element and configuring an attribute for the page element.
Local caching refers to a storage area or database that is opened up locally on the device running the page building application, similar to the browser database IndexedDB.
And 104, rendering the target page based on the locally cached page configuration data of the target page.
As an example, the page building application may read the latest page configuration data of the target page stored in the local cache, and accordingly render the target page in the operation page of the page building application.
And 106, responding to the saving operation of the user for the target page, and saving the page configuration data of the target page to a server.
When receiving an operation of saving a target page by a user, the page construction application saves page configuration data generated when the construction operation is executed on the target page to a server.
According to the page construction method provided by the embodiment of the specification, the page configuration data correspondingly generated in each construction operation is stored in the local cache, the page construction application renders the target page based on the page configuration data of the local cache, and the target page is interacted with the server only when the user executes the storage operation, so that on one hand, a large access and storage burden on the server and a database thereof can be avoided, and the stability of the server is improved; on the other hand, the page configuration data can be stored under the offline condition, and the rendering of the target page is realized, so that the dependence on a server is reduced, the data storage is safe and reliable, and the user experience is better; in addition, even if the user closes the page building application by mistake, the page configuration data cannot be lost, and the user can still read the latest page configuration data from the local cache when opening the application again.
The following describes in detail the configuration data storage process of the new page and the partially built page of the target page respectively through the schematic page building method implementation flow diagrams shown in fig. 2 and fig. 3.
Fig. 2 is a schematic flow chart of an implementation of a page building method provided in another embodiment of the present specification, where the method may be applied to a page building application. As shown in fig. 2, the method may include:
step 201, responding to the operation of a user for building a page in the page building application, and building a target page.
Step 202, receiving the operation of the user on the target page, and determining the type of the user operation.
In this step, the types of user operations include, but are not limited to, a set-up operation, a save operation, an operation of closing the page set-up application, and an operation of closing the target page. When the user operation is a building operation, executing step 203; when the user operation is a save operation, step 205 is executed; when the user operation is an operation of closing the page building application or an operation of closing the target page, the flow is ended.
Step 203, responding to the building operation of the user for the target page, and storing the page configuration data of the target page into a local cache.
And step 204, rendering the target page based on the locally cached page configuration data of the target page.
Step 205, responding to the saving operation of the user for the target page, saving the page configuration data of the target page to a server.
After step 204 or step 205 is performed, step 202 may continue to be performed until the user closes the page building application or target page.
As with the page construction method shown in fig. 1, in the page construction method provided in the embodiment of the present specification, since the page configuration data correspondingly generated in each construction operation is stored in the local cache, and the page construction application renders the target page based on the page configuration data of the local cache, the target page interacts with the server only when the user performs the storage operation, on one hand, a large access and storage burden on the server and a database thereof can be avoided, thereby improving the stability of the server; on the other hand, the page configuration data can be stored under the offline condition, and the rendering of the target page is realized, so that the dependence on a server is reduced, the data storage is safe and reliable, and the user experience is better; in addition, even if the user closes the page building application by mistake, the page configuration data cannot be lost, and the user can still read the latest page configuration data from the local cache when opening the application again.
Fig. 3 is a schematic flow chart of an implementation of a page building method provided in another embodiment of the present specification, where the method may be applied to a page building application. As shown in fig. 2, the method may include:
step 301, responding to an operation of opening a target page by a user, and determining whether page configuration data of the target page cached locally is consistent with page configuration data of the target page stored by a server; if not, go to step 302; if so, go to step 304.
And the target page is a page which is partially built in advance.
In this step, it may be compared whether the page configuration data of the target page cached locally is consistent with the page configuration data of the target page stored by the server by comparing Message Digest Algorithm fifth version (md 5) values, for example, if the md5 values of the two are the same, the page configuration data of the target page cached locally is consistent, and if the md5 values of the two are different, the page configuration data of the target page cached locally is inconsistent. The page configuration data of the target page of the local cache and the md5 value thereof can be read from the local cache, and the page configuration data of the target page stored by the server can be read from the server.
Step 302, determining whether the page configuration data of the target page cached locally is newer than the page configuration data of the target page stored by the server; if the server stores the update, step 303 is executed first, and then step 304 is executed; if the local cache is more recent, go to step 304.
Generally speaking, the version number of the target page cached locally can be compared with the version number of the target page cached locally to determine which is newer, and if the version number of the page configuration data of the target page cached locally is smaller than the page configuration data of the target page stored by the server, the page configuration data of the target page stored by the server is newer; and if the version number of the page configuration data of the target page of the local cache is greater than the page configuration data of the target page stored by the server, the page configuration data of the target page of the local cache is newer.
And step 303, updating the page configuration data of the target page cached locally based on the page configuration data of the target page stored by the server.
Specifically, the configuration data of the target page of the local cache may be cleared, and the page configuration data of the target page stored by the server may be stored in the local cache, so as to update the page configuration data of the target page of the local cache.
And step 304, rendering the target page based on the page configuration data of the target page cached locally.
And 305, receiving the operation of the user on the target page, and determining the type of the user operation.
In this step, the types of user operations include, but are not limited to, a set-up operation, a save operation, an operation of closing the page set-up application, and an operation of closing the target page. When the user operation is a building operation, executing step 306; when the user operation is a save operation, step 307 is executed; when the user operation is an operation of closing the page building application or an operation of closing the target page, the flow is ended.
And step 306, responding to the building operation of the user for the target page, storing the page configuration data of the target page into a local cache, and returning to execute the step 304.
Step 307, in response to the saving operation of the user for the target page, saving the page configuration data of the target page to the server; optionally, step 301 is performed again the next time the target page is opened.
Optionally, after step 304 or step 307 is performed, step 305 may continue to be performed until the user closes the page building application or target page.
Optionally, when saving the page configuration data of the target page to the server, the md5 value of the page configuration data may also be saved for determining whether the page configuration data of the server and the locally cached page are consistent.
As with the page construction method shown in fig. 1, in the page construction method provided in the embodiment of the present specification, since the page configuration data correspondingly generated in each construction operation is stored in the local cache, and the page construction application renders the target page based on the page configuration data of the local cache, the target page interacts with the server only when the user performs the storage operation, on one hand, a large access and storage burden on the server and a database thereof can be avoided, thereby improving the stability of the server; on the other hand, the page configuration data can be stored under the offline condition, and the rendering of the target page is realized, so that the dependence on a server is reduced, the data storage is safe and reliable, and the user experience is better; in addition, even if the user closes the page building application by mistake, the page configuration data cannot be lost, and the user can still read the latest page configuration data from the local cache when opening the application again.
Optionally, in any embodiment shown in fig. 1, fig. 2, and fig. 3, when the page configuration data of the target page is stored in the local cache, only the page configuration data (which may be referred to as new page configuration data for short) of the current building operation that changes with respect to the previous building operation may be stored in the local cache, so as to save the local storage space.
Specifically, the storing the page configuration data of the target page in the local cache, that is, any one of the steps 102, 203, and 306 may include: determining first page configuration data and second page configuration data cached locally; determining newly added page configuration data (also called incremental page configuration data) of the current construction operation relative to the previous construction operation based on the first page configuration data and the second page configuration data; storing the configuration data of the newly added page into a local cache; the first page configuration data is generated when the current building operation is executed for the target page, and the second page configuration data is full page configuration data generated when the last building operation is executed for the target page.
Optionally, the local cache stores the page configuration data in a data stack form, and stores the newly added page configuration data in the data stack. Specifically, when the current building operation is a forward operation relative to the previous building operation, adding the newly added page configuration data to the top of a data stack, and adding 1 to the stack position of the data stack; and when the current building operation is a backward operation relative to the previous building operation, deleting the page configuration data stored at the top of the data stack, and subtracting 1 from the stack position of the data stack.
Optionally, the configuration data of the newly added page added to the data stack includes the following fields: the md5 value of the first page configuration data (newData) and the newly added page configuration data (diffData), wherein the md5 value can be used to determine whether the locally cached page configuration data is consistent with the page configuration data stored by the server.
It can be understood that the incremental page configuration data refers to page configuration data in which the current page building operation changes relative to the last page building operation, and the full page configuration data refers to all page configuration data generated by one page building operation correspondingly. The embodiment of the present specification provides an incremental storage scheme, which can save a local storage space compared with a full-page configuration storage scheme, and is described in detail below.
Assuming that when a user opens a target page through a page building application, a piece of basic data of the target page is locally cached, wherein the basic data at least comprises the following fields: md5 value of the page configuration data, version number of the page configuration data, initial full page configuration data, user operation data stack table, user operation data stack position index (index, initial value is 0), and current full page configuration data (currentData), wherein the initial value of the user operation data stack table is [ { md 5: md5, diff: and b, and diff represents configuration data of the new page.
After a user executes the current building operation on a target page, first page configuration data (newData) is generated, and page building application can generate newly added page configuration data (diffData) by using a Myers difference algorithm diff (oldData, newData), wherein the oldData represents second page configuration data; the md5(newData) is used to generate a newmd5 value (md 5 value of the first page configuration data), and the data { md 5: newMD5, diff: diffData is inserted into a user operation data stack, and the position +1 of the data stack is operated to finish the storage of the newly added page configuration data.
Optionally, the page building application saves { md 5: newMD5, diff: diffData and currentData, etc., to prevent the performance of the local device from being affected by frequent operation of the same field within a preset duration, where the preset duration may be flexibly set, for example, to 5 s.
When a user builds a target page, the user carries out one step (new building operation is executed), the stack position of the data stack is added with 1, the user carries out one step (previous building operation is returned), and the stack position of the data stack is subtracted with 1.
Optionally, on the basis of the incremental saving scheme, the rendering the target page based on the page configuration data of the target page cached locally may include: reading second page configuration data (currentData) and the newly added page configuration data (diffData) from a local cache; and determining the full amount of page configuration data required by the rendering of the target page and rendering the target page based on the second page configuration data (currentData) and the newly added page configuration data. That is, it is possible to generate the full amount of page configuration data newData corresponding to the stack position based on reDiff (currentData), and render the target page accordingly.
Thereafter, the second page configuration data in the local cache can be updated to the first page configuration data, that is, newData is assigned to the current full page configuration data (currentData) in the local cache, so as to calculate the full page configuration data required by the rendering target page after the next building operation.
Optionally, in the above scheme for saving incremental page configuration data, and reading currentData and diffData from the data war of the local cache, the process of calculating newData may be executed by a jswerker thread created by a main thread of the page construction application, so as to ensure that the work of the main thread is not affected, improve the work efficiency of the page construction application, and improve the page construction experience of the user.
It is understood that if the data is updated in full amount, for example, the initial data amount is 10KB, and the newly added data amount is 10B, the memory consumption of 10KB + is increased, while the memory space is only 10B for incremental saving, which is negligible.
In summary, the page building method provided in the embodiments of the present specification can achieve at least one of the following technical effects: (1) because the page configuration data correspondingly generated by each step of building operation can be stored in the local cache and only interacts with the server when the user executes the storage operation, the server and the database thereof can be prevented from being subjected to larger access and storage burden, and the stability of the server is improved; (2) according to the scheme for locally caching the page configuration data, the page configuration data can be stored under an offline condition, and accordingly, the rendering of a target page is realized, the dependence on a server is reduced, the data storage is safe and reliable, and the user experience is better; (3) according to the scheme for locally caching the page configuration data, even if a user closes the page building application by mistake, the page configuration data cannot be lost, and the latest page configuration data can still be read from the local cache when the user opens the application again, so that the data loss can be prevented; (4) the incremental-based saving scheme can reduce the consumption of local storage space.
The above is a description of embodiments of the method provided in this specification, and the electronic device provided in this specification is described below.
Fig. 4 is a schematic structural diagram of an electronic device provided in an embodiment of the present specification. Referring to fig. 4, at a hardware level, the electronic device includes a processor, and optionally further includes an internal bus, a network interface, and a memory. The Memory may include a Memory, such as a Random-Access Memory (RAM), and may further include a non-volatile Memory, such as at least 1 disk Memory. Of course, the electronic device may also include hardware required for other services.
The processor, the network interface, and the memory may be connected to each other via an internal bus, which may be an ISA (Industry Standard Architecture) bus, a PCI (peripheral component Interconnect) bus, an EISA (Extended Industry Standard Architecture) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one double-headed arrow is shown in FIG. 4, but that does not indicate only one bus or one type of bus.
And the memory is used for storing programs. In particular, the program may include program code comprising computer operating instructions. The memory may include both memory and non-volatile storage and provides instructions and data to the processor.
The processor reads the corresponding computer program from the nonvolatile memory into the memory and then runs the computer program to form the page building device on the logic level. The processor is used for executing the program stored in the memory and is specifically used for executing the following operations:
responding to the construction operation of a user for a target page, and storing the page configuration data of the target page into a local cache;
rendering the target page based on the locally cached page configuration data of the target page;
and responding to the saving operation of the user for the target page, and saving the page configuration data of the target page to a server.
The page building method disclosed in the embodiment shown in any one of fig. 1 to 3 in this specification may be applied to a processor, or may be implemented by the processor. The processor may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware in a processor or instructions in the form of software. The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components. The various methods, steps and logic blocks disclosed in one or more embodiments of the present specification 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 a method disclosed in connection with one or more embodiments of the present disclosure may be embodied directly in hardware, in a software module executed by a hardware decoding processor, or in a combination of the hardware and software modules executed by a hardware decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in a memory, and a processor reads information in the memory and completes the steps of the method in combination with hardware of the processor.
The electronic device may further execute the page building method provided in any one of fig. 1 to fig. 3, which is not described herein again.
Of course, besides the software implementation, the electronic device in this specification does not exclude other implementations, such as logic devices or a combination of software and hardware, and the like, that is, the execution subject of the following processing flow is not limited to each logic unit, and may also be hardware or logic devices.
Embodiments of the present specification also propose a computer-readable storage medium storing one or more programs, the one or more programs comprising instructions, which when executed by a portable electronic device comprising a plurality of application programs, are capable of causing the portable electronic device to perform the method of the embodiment shown in fig. 1, and in particular to perform the following:
responding to the construction operation of a user for a target page, and storing the page configuration data of the target page into a local cache;
rendering the target page based on the locally cached page configuration data of the target page;
and responding to the saving operation of the user for the target page, and saving the page configuration data of the target page to a server.
The following is a description of the apparatus provided in this specification.
As shown in fig. 5, one embodiment of the present specification provides a page building apparatus 500, and in one software implementation, the apparatus 500 may include: a first saving module 501, a rendering module 502 and a second saving module 503.
The first saving module 501 is configured to, in response to a building operation of a user for a target page, save page configuration data of the target page into a local cache.
A rendering module 502, configured to render the target page based on the locally cached page configuration data of the target page.
A second saving module 503, configured to respond to a saving operation of the user for the target page, and save the page configuration data of the target page to the server.
It should be noted that the page building apparatus 500 can implement the method of fig. 1 and obtain the same technical effect, and the detailed content may refer to the method shown in fig. 1 and is not described again.
As shown in fig. 6, one embodiment of the present specification provides a page building apparatus 600, and in one software implementation, the apparatus 600 may include: a page new building module 601, an operation receiving module 602, a first saving module 603, a rendering module 604 and a second saving module 605.
The page new creation module 601 is configured to respond to a construction operation of a user for a target page, and store page configuration data of the target page in a local cache.
An operation receiving module 602, configured to receive an operation of a user on a target page, and determine a type of the user operation.
The first saving module 603 is configured to, in response to a construction operation of a user for a target page, save page configuration data of the target page into a local cache.
A rendering module 604, configured to render the target page based on the locally cached page configuration data of the target page.
A second saving module 605, configured to respond to a saving operation of the user for the target page, and save the page configuration data of the target page to the server.
It should be noted that the page building apparatus 600 can implement the method of fig. 2 and obtain the same technical effect, and the detailed content may refer to the method shown in fig. 2 and is not described again.
As shown in fig. 7, one embodiment of the present description provides a page building apparatus 700, and in one software implementation, the apparatus 700 may include: a first judging module 701, a second judging module 702, an updating module 703, a rendering module 704, an operation receiving module 705, a first saving module 706 and a second saving module 707.
A first determining module 701, configured to determine, in response to an operation of opening a target page by a user, whether page configuration data of the target page cached locally is consistent with page configuration data of the target page stored by a server; if not, triggering a second judgment module 702; if so, the rendering module 704 is triggered.
A second determining module 702, configured to determine which of the page configuration data of the target page cached locally and the page configuration data of the target page stored by the server is newer; if the server is newer, the update module 703 is triggered first, and then the rendering module 704 is triggered; if the cache is newer, the rendering module 704 is triggered.
The updating module 703 is configured to update the page configuration data of the target page cached locally based on the page configuration data of the target page stored by the server.
A rendering module 704 for rendering the target page based on the locally cached page configuration data of the target page.
The operation receiving module 705 is configured to receive an operation of a user on a target page and determine a type of the user operation.
The first saving module 706 is configured to, in response to a building operation of a user for a target page, save the page configuration data of the target page in the local cache, and trigger the rendering module 704.
A second saving module 707, configured to, in response to a saving operation of a user for a target page, save the page configuration data of the target page to the server; optionally, the first determining module 701 is triggered again when the target page is opened next time.
It should be noted that the page building apparatus 700 can implement the method of fig. 3 and obtain the same technical effect, and the detailed content may refer to the method shown in fig. 3 and is not described again.
Optionally, in the page building apparatus 500, the page building apparatus 600, and the page building apparatus 700, the first saving module may be specifically configured to: determining first page configuration data and second page configuration data cached locally; determining newly added page configuration data (also called incremental page configuration data) of the current construction operation relative to the previous construction operation based on the first page configuration data and the second page configuration data; storing the configuration data of the newly added page into a local cache; the first page configuration data is generated when the current building operation is executed for the target page, and the second page configuration data is full page configuration data generated when the last building operation is executed for the target page.
Optionally, the local cache stores the page configuration data in a form of a data stack, where the first storage module is specifically configured to: and storing the configuration data of the newly added page into the data stack. Specifically, when the current building operation is a forward operation relative to the previous building operation, adding the newly added page configuration data to the top of a data stack, and adding 1 to the stack position of the data stack; and when the current building operation is a backward operation relative to the previous building operation, deleting the page configuration data stored at the top of the data stack, and subtracting 1 from the stack position of the data stack.
Optionally, on the basis of the increment saving scheme, the rendering module may be configured to: reading second page configuration data (currentData) and the newly added page configuration data (diffData) from a local cache; and determining the full amount of page configuration data required by the rendering of the target page and rendering the target page based on the second page configuration data (currentData) and the newly added page configuration data.
Thereafter, the second page configuration data in the local cache can be updated to the first page configuration data, that is, newData is assigned to the current full page configuration data (currentData) in the local cache, so as to calculate the full page configuration data required by the rendering target page after the next building operation.
While certain embodiments of the present disclosure have been described above, other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, as for the apparatus embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
In short, the above description is only a preferred embodiment of the present disclosure, and is not intended to limit the scope of the present disclosure. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of one or more embodiments of the present disclosure should be included in the scope of protection of one or more embodiments of the present disclosure.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. One typical implementation device is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that 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. In the absence of further limitation, the statement "comprises" or "comprising" a specified element does not exclude the presence of other like elements in the process, method, article, or apparatus that comprises the specified element.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.

Claims (13)

1. A page building method comprises the following steps:
responding to the construction operation of a user for a target page, and storing the page configuration data of the target page into a local cache;
rendering the target page based on the locally cached page configuration data of the target page;
and responding to the saving operation of the user for the target page, and saving the page configuration data of the target page to a server.
2. The method of claim 1, wherein the target page is a page that is partially built in advance, and before responding to the building operation of the user on the target page, the method further comprises:
responding to the operation of opening the target page by a user, and determining whether the page configuration data of the target page cached locally is consistent with the page configuration data of the target page stored by the server;
if the target page is consistent with the target page, rendering the target page based on the locally cached page configuration data of the target page;
and if the target page is inconsistent with the target page, rendering the target page by a newer one based on the locally cached page configuration data of the target page and the page configuration data of the target page stored by the server.
3. The method of claim 2, wherein the determining whether the locally cached page configuration data of the target page is consistent with the page configuration data of the target page stored by the server comprises:
determining whether the locally cached page configuration data of the target page is consistent with the page configuration data of the target page stored by the server side or not based on the md5 value of the locally cached page configuration data of the target page and the md5 value of the page configuration data of the target page stored by the server side.
4. The method of claim 2, wherein the rendering the target page based on a newer one of the locally cached page configuration data of the target page and the page configuration data of the target page stored by the server comprises:
if the version of the locally cached page configuration data of the target page is newer than the version of the page configuration data of the target page stored by the server, rendering the target page based on the locally cached page configuration data of the target page;
if the version of the page configuration data of the target page stored by the server is newer than the version of the page configuration data of the target page cached locally, rendering the target page based on the locally cached page configuration data of the target page after updating the locally cached page configuration data of the target page based on the page configuration data of the target page stored by the server.
5. The method of claim 1, wherein the saving the page configuration data of the target page to a local cache comprises:
determining first page configuration data and second page configuration data cached locally, wherein the first page configuration data is generated when the current building operation is executed for the target page, and the second page configuration data is full page configuration data generated when the last building operation is executed for the target page;
determining newly added page configuration data of the current building operation relative to the previous building operation based on the first page configuration data and the second page configuration data;
and storing the configuration data of the newly added page into a local cache.
6. The method of claim 5, wherein the local cache stores the page configuration data in a form of a data stack, and wherein the storing the newly added page configuration data into the local cache comprises:
and storing the configuration data of the newly added page into the data stack.
7. The method of claim 6, wherein the saving the newly added page configuration data to the data stack comprises:
when the current building operation is a forward operation relative to the previous building operation, adding the newly added page configuration data at the top of the data stack, and adding 1 to the stack position of the data stack;
and when the construction operation is a backward operation relative to the previous construction operation, deleting the page configuration data stored at the top of the data stack, and subtracting 1 from the stack position of the data stack.
8. The method of claim 7, wherein the first and second light sources are selected from the group consisting of,
the configuration data of the newly added page added into the data stack comprises the following fields: and the md5 value of the first page configuration data and the newly added page configuration data, wherein the md5 value is used for determining whether the locally cached page configuration data is consistent with the page configuration data stored by the server.
9. The method of any of claims 5-8, wherein the rendering the target page based on the locally cached page configuration data of the target page comprises:
reading the second page configuration data and the newly added page configuration data from a local cache;
and determining the total page configuration data required by rendering the target page and rendering the target page based on the second page configuration data and the newly added page configuration data.
10. The method of claim 5, further comprising:
and updating the second page configuration data in the local cache into the first page configuration data.
11. A page building apparatus comprising:
the first storage module is used for responding to the building operation of a user for a target page and storing the page configuration data of the target page into a local cache;
the rendering module is used for rendering the target page based on the locally cached page configuration data of the target page;
and the second storage module is used for responding to the storage operation of the user for the target page and storing the page configuration data of the target page to a server.
12. An electronic device, comprising:
a processor; and
a memory arranged to store computer executable instructions that, when executed, cause the processor to:
responding to the construction operation of a user for a target page, and storing the page configuration data of the target page into a local cache;
rendering the target page based on the locally cached page configuration data of the target page;
and responding to the saving operation of the user for the target page, and saving the page configuration data of the target page to a server.
13. A computer-readable storage medium storing one or more programs that, when executed by an electronic device including a plurality of application programs, cause the electronic device to:
responding to the construction operation of a user for a target page, and storing the page configuration data of the target page into a local cache;
rendering the target page based on the locally cached page configuration data of the target page;
and responding to the saving operation of the user for the target page, and saving the page configuration data of the target page to a server.
CN202010169159.1A 2020-03-12 2020-03-12 Page construction method, device and equipment Pending CN111414207A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010169159.1A CN111414207A (en) 2020-03-12 2020-03-12 Page construction method, device and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010169159.1A CN111414207A (en) 2020-03-12 2020-03-12 Page construction method, device and equipment

Publications (1)

Publication Number Publication Date
CN111414207A true CN111414207A (en) 2020-07-14

Family

ID=71491051

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010169159.1A Pending CN111414207A (en) 2020-03-12 2020-03-12 Page construction method, device and equipment

Country Status (1)

Country Link
CN (1) CN111414207A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112507263A (en) * 2021-02-05 2021-03-16 平安普惠企业管理有限公司 Page loading updating method and device, electronic equipment and storage medium
CN112685487A (en) * 2021-01-15 2021-04-20 金现代信息产业股份有限公司 Method and apparatus for simulating relational database through IndexDB in browser environment
WO2023245368A1 (en) * 2022-06-20 2023-12-28 北京小米移动软件有限公司 Application control method and apparatus, electronic device, and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106202179A (en) * 2016-06-27 2016-12-07 北京奇虎科技有限公司 A kind of page loading method and device
CN107360168A (en) * 2017-07-17 2017-11-17 环球智达科技(北京)有限公司 The page generates system
CN108255898A (en) * 2017-02-20 2018-07-06 平安科技(深圳)有限公司 Page display method and device
CN109325205A (en) * 2018-09-25 2019-02-12 中国建设银行股份有限公司 A kind of page generation method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106202179A (en) * 2016-06-27 2016-12-07 北京奇虎科技有限公司 A kind of page loading method and device
CN108255898A (en) * 2017-02-20 2018-07-06 平安科技(深圳)有限公司 Page display method and device
CN107360168A (en) * 2017-07-17 2017-11-17 环球智达科技(北京)有限公司 The page generates system
CN109325205A (en) * 2018-09-25 2019-02-12 中国建设银行股份有限公司 A kind of page generation method and device

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112685487A (en) * 2021-01-15 2021-04-20 金现代信息产业股份有限公司 Method and apparatus for simulating relational database through IndexDB in browser environment
CN112685487B (en) * 2021-01-15 2022-09-16 金现代信息产业股份有限公司 Method and apparatus for simulating relational database through IndexDB in browser environment
CN112507263A (en) * 2021-02-05 2021-03-16 平安普惠企业管理有限公司 Page loading updating method and device, electronic equipment and storage medium
WO2023245368A1 (en) * 2022-06-20 2023-12-28 北京小米移动软件有限公司 Application control method and apparatus, electronic device, and storage medium

Similar Documents

Publication Publication Date Title
CN107609198B (en) Recommendation method and device and computer readable storage medium
CN111414207A (en) Page construction method, device and equipment
CN108287708B (en) Data processing method and device, server and computer readable storage medium
CN111897493B (en) Storage space management method and device, electronic equipment and storage medium
CN107479868B (en) Interface loading method, device and equipment
CN107632852B (en) Information updating method and device
CN112258295B (en) Recording processing method, device and equipment
CN109144600B (en) Application program running method and device and computer readable medium
CN106156050B (en) Data processing method and device
CN114268538A (en) Configuration method and device of front-end route
CN111382179B (en) Data processing method and device and electronic equipment
CN111767053A (en) Front-end page data acquisition method and device
CN111046308A (en) Page loading method and device
CN114647411A (en) Programming interface loading method and device, electronic equipment and storage medium
CN112907198B (en) Service state circulation maintenance method and device and electronic equipment
CN114116676A (en) Data migration method and device, electronic equipment and computer readable storage medium
US9477448B2 (en) Screen-oriented computing program refactoring
CN110750271B (en) Service aggregation, method and device for executing aggregated service and electronic equipment
CN111221817B (en) Service information data storage method, device, computer equipment and storage medium
CN113961298A (en) Page switching method, device, equipment and medium
US9069562B2 (en) Mobile computing program slicing and behavior
CN108829732B (en) Data processing method and device
CN111414162B (en) Data processing method, device and equipment thereof
CN114296730A (en) Page information processing method and device and electronic equipment
CN117972242A (en) Page automatic rendering method based on sharing engine and network attached storage device

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
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40033604

Country of ref document: HK

RJ01 Rejection of invention patent application after publication

Application publication date: 20200714

RJ01 Rejection of invention patent application after publication