CN110990008A - Method, device, storage medium and electronic equipment for updating page - Google Patents

Method, device, storage medium and electronic equipment for updating page Download PDF

Info

Publication number
CN110990008A
CN110990008A CN201911195089.0A CN201911195089A CN110990008A CN 110990008 A CN110990008 A CN 110990008A CN 201911195089 A CN201911195089 A CN 201911195089A CN 110990008 A CN110990008 A CN 110990008A
Authority
CN
China
Prior art keywords
component
data
page
configuration data
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201911195089.0A
Other languages
Chinese (zh)
Other versions
CN110990008B (en
Inventor
王宇欢
蒋吉兵
肖旭东
何蔷
王咏
孙宇立
陈文�
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Sankuai Online Technology Co Ltd
Original Assignee
Beijing Sankuai Online Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Sankuai Online Technology Co Ltd filed Critical Beijing Sankuai Online Technology Co Ltd
Priority to CN201911195089.0A priority Critical patent/CN110990008B/en
Publication of CN110990008A publication Critical patent/CN110990008A/en
Application granted granted Critical
Publication of CN110990008B publication Critical patent/CN110990008B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The present disclosure relates to a method, apparatus, storage medium, and electronic device for updating a page, the method comprising: receiving a page updating instruction; acquiring first component configuration data corresponding to the component identification from a data manager; updating first component configuration data corresponding to the target page according to the first component filling data; the target component corresponding to the component identifier is determined from the page component library, the target component is rendered according to the first component filling data and the updated first component configuration data, the target component is converted from function or class data into view data to update a target page, and the target component does not need to be updated and is regenerated when the first component configuration data is changed because the first component configuration data is not in the target component, so that the data processing amount is effectively reduced, and the operation efficiency is improved.

Description

Method, device, storage medium and electronic equipment for updating page
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method and an apparatus for updating a page, a storage medium, and an electronic device.
Background
The existing method for generating a page through a component generally obtains component configuration data included in a target page, and searches the component in a preset component set according to the component configuration data to serve as a target component; and updating the target component according to the component configuration data, and generating a target page based on the updated target component.
However, with the existing method for generating a page by using a component, the target component needs to be regenerated every time the configuration data of the component is changed, and the data processing amount is large.
Disclosure of Invention
The invention aims to provide a method, a device, a storage medium and an electronic device for updating pages, which aim to solve the problem that target components cannot be reused when configuration data is different.
To achieve the above object, a first aspect of the present disclosure provides a method of updating a page, including:
receiving a page updating instruction, wherein the page updating instruction is used for indicating to update a target page and comprises a component identifier of a component in the target page and first component filling data input by a user;
acquiring first component configuration data corresponding to the component identification from a configuration data manager;
updating first component configuration data corresponding to the target page according to the first component filling data;
and determining a target component corresponding to the component identifier from a page component library, and rendering the target component according to the component filling data and the updated first component configuration data so as to update the target page.
Optionally, the first component configuration data comprises component static configuration data and component dynamic configuration data;
the updating of the first component configuration data corresponding to the target page according to the first component filling data includes: and updating the dynamic configuration data of the components corresponding to the target page according to the first component filling data.
Optionally, before the target component is rendered according to the first component filling data and the updated first component configuration data to update the target page, the method further includes:
determining an association component associated with the target component;
updating second component fill data for the associated component in accordance with the first component fill data;
updating second component configuration data of the associated component according to the updated second component filling data;
correspondingly, the rendering the target component according to the component filling data and the updated first component configuration data to update the target page includes:
rendering the target component according to the first component filling data and the updated first component configuration data, and rendering the associated component according to the updated second component filling data and the updated second component configuration data to update the target page.
Optionally, before updating the first component configuration data corresponding to the target page according to the first component filling data, the method further includes:
determining whether the first component fill data is non-transient state data;
correspondingly, the updating the first component configuration data corresponding to the target page according to the first component filling data includes:
and if the first component filling data are non-temporary data, updating first component configuration data corresponding to the target page according to the first component filling data.
Optionally, before receiving the page update instruction, the target page is generated by:
acquiring a page configuration file corresponding to the target page, and analyzing the page configuration file into page configuration data, wherein the page configuration data comprises at least one component identifier, first component configuration data corresponding to the component identifier and preset initial data;
and rendering the component corresponding to the component identifier in the target component library according to the first component configuration data and the preset initial data to generate the target page.
A second aspect of the present disclosure provides an apparatus for updating a page, including:
the updating instruction receiving module is used for receiving a page updating instruction, wherein the page updating instruction is used for indicating to update a target page and comprises a component identifier of a component in the target page and first component filling data input by a user;
the component configuration data acquisition module is used for acquiring first component configuration data corresponding to the component identifier from a configuration data manager;
the component configuration data updating module is used for updating first component configuration data corresponding to the target page according to the first component filling data;
and the target page updating module is used for determining a target component corresponding to the component identifier from a page component library, and rendering the target component according to the first component filling data and the updated first component configuration data so as to update the target page.
Optionally, the first component configuration data comprises component static configuration data and component dynamic configuration data;
the component configuration data update module is to:
and updating the dynamic configuration data of the components corresponding to the target page according to the first component filling data.
Optionally, the apparatus further comprises:
an association component determination module for determining an association component associated with the target component;
updating second component fill data for the associated component in accordance with the first component fill data;
updating second component configuration data of the associated component according to the updated second component filling data;
accordingly, the target page update module is configured to:
rendering the target component according to the first component filling data and the updated first component, and rendering the associated component according to the updated second component filling data and the updated second component configuration data to update the target page.
Optionally, the apparatus further comprises:
a non-transient state data determination module, configured to determine whether the first component padding data is non-transient state data;
accordingly, the component configuration data update module is to:
and if the first component filling data are non-temporary data, updating first component configuration data corresponding to the target page according to the first component filling data.
Optionally, the apparatus further comprises: a target page generation module to:
acquiring a page configuration file corresponding to the target page, and analyzing the page configuration file into page configuration data, wherein the page configuration data comprises at least one component identifier, first component configuration data corresponding to the component identifier and preset initial data;
and rendering the component corresponding to the component identifier in the target component library according to the first component configuration data and the preset initial data to generate the target page.
A third aspect of the present disclosure provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the method of any one of the first aspects.
A fourth aspect of the present disclosure provides an electronic device, comprising:
a memory having a computer program stored thereon;
a processor for executing the computer program in the memory to implement the steps of the method of any one of the first aspect.
Through the technical scheme, the first component configuration data corresponding to the component identifier can be acquired from the data manager; updating first component configuration data corresponding to the target page according to the first component filling data; and determining a target component corresponding to the component identifier from a page component library, rendering the target component according to the first component filling data and the updated first component configuration data, and converting the target component from function or class data into view data to update the target page.
Additional features and advantages of the disclosure will be set forth in the detailed description which follows.
Drawings
The accompanying drawings, which are included to provide a further understanding of the disclosure and are incorporated in and constitute a part of this specification, illustrate embodiments of the disclosure and together with the description serve to explain the disclosure without limiting the disclosure. In the drawings:
FIG. 1 is a flow diagram illustrating a method of updating a page in accordance with an exemplary embodiment;
FIG. 2 is a flow diagram illustrating another method of updating a page in accordance with an illustrative embodiment;
FIG. 3 is a flow diagram illustrating a method of generating a page in accordance with an exemplary embodiment;
FIG. 4 is a block diagram illustrating an apparatus for updating a page in accordance with an exemplary embodiment;
FIG. 5 is a block diagram illustrating another apparatus for updating a page in accordance with an illustrative embodiment;
FIG. 6 is a block diagram illustrating an electronic device in accordance with an example embodiment.
Detailed Description
The following detailed description of specific embodiments of the present disclosure is provided in connection with the accompanying drawings. It should be understood that the detailed description and specific examples, while indicating the present disclosure, are given by way of illustration and explanation only, not limitation.
First, an application scenario of the present disclosure is explained, and the present disclosure is applied to a process of generating a page by a component. Such as generating a registration page via a username and password entry box component, generating a search page via a keyword entry box component, and so on.
In the prior art, component configuration data included in a target page is generally obtained, where the component configuration data includes a component type, a component type value, and an attribute value of a component corresponding to the component type value; searching a component in a preset component set as a target component according to the component type value; and updating the corresponding attribute and attribute value of the target component according to the attribute and attribute value of the component corresponding to the component type value, and generating a target page based on the updated target component.
However, with the prior art, since the component configuration data, such as the attribute and the attribute value of the component, is part of the data of the target component itself, each time the component configuration data, such as the attribute and the attribute value of the component, is changed, the target component needs to be updated again according to the attribute and the attribute value of the component, so as to generate a new target component, which results in a large data processing amount; in the disclosure, first component configuration data corresponding to the component identifier is obtained from the data manager; updating first component configuration data corresponding to the target page according to the first component filling data; and determining a target component corresponding to the component identifier from a page component library, rendering the target component according to the first component filling data and the updated first component configuration data, and converting the target component from function or class data into view data to update the target page.
The following describes a method for updating a page in the present disclosure with reference to specific embodiments.
FIG. 1 is a flowchart illustrating a method of updating a page in accordance with an exemplary embodiment. As shown in fig. 1, the execution subject of the method may be a browser, and the method includes:
s101, receiving a page updating instruction, wherein the page updating instruction is used for indicating to update a target page and comprises component identification of components in the target page and first component filling data input by a user.
Wherein, the first component filling data is the data to be filled into the components in the target page.
In this step, receiving the page update instruction may include the following two scenarios:
scene one: if the first component filling data input by the user is data which is temporarily created by the user and is not persistent (namely temporary data), in order to avoid errors of the data temporarily created by the user, after the first component filling data input by the user is received, a confirmation operation needs to be performed by the user, and after the user confirms through the confirmation operation, the page updating instruction is triggered, so that the page updating instruction triggered by the user is received.
For example, when a user registers, the target page is a registration page, the registration page includes an input box component for inputting a user name and a password, and a "registration" button for confirming input information, the user name and the password input by the user in the input box component are data created temporarily by the user, the data can be changed according to the will of the user before the user clicks the "registration" button, and after the user confirms to input a correct user name and a correct password, the "registration" button on the registration page is clicked (i.e. a confirmation operation is performed) to trigger the page update instruction, so that the page update instruction triggered by the user is received.
For another example, when a user searches, the target page is a search page, the search page includes an input box component for inputting a search keyword and a "search" button for confirming input information, the keyword to be retrieved, which is input in the input box component of the keyword by the user, is data temporarily created by the user, similarly, the data may be changed according to the will of the user before the user clicks the "search" button, and after the user confirms to input a correct keyword, the "search" button on the search page is clicked (i.e., a confirmation operation is performed) to trigger the page update instruction, so that the page update instruction triggered by the user is received.
Scene two: if the first component filling data input by the user is data which is already persistent (namely non-temporary data), the page updating instruction can be obtained after the first filling data input by the user is acquired, and the user does not need to confirm.
For example, when a user performs online shopping, the target page is a shopping page, the shopping page includes an input frame component for inputting color information of an item to be purchased (such as clothes and the like), because the color of the item to be purchased provided by a merchant is fixed, that is, preset persistent data, on the shopping page, one or more pieces of color information corresponding to the item to be purchased are displayed, the user can only select a favorite color from the displayed color information to input the input frame component, and cannot input an undisplayed color on the shopping page at will, at this time, the color information input by the user is the persistent data, and after the user inputs the color information, the user triggers the page update instruction, thereby receiving the page update instruction triggered by the user.
S102, acquiring first component configuration data corresponding to the component identification from a configuration data manager.
Wherein the first component configuration data may include component static configuration data and component dynamic configuration data. Component static data is data that does not change with the first component fill data. For example, the component static configuration data may be the style of the component, the address of the component in communication with the server. The component dynamic configuration data is data that changes with the first component fill data, and may be, for example, pop-up information that pops up based on a user name and password entered by the user.
S103, updating the first component configuration data corresponding to the target page according to the first component filling data.
In this step, the first component configuration data may be updated according to the first component padding data through a pre-established association relationship, where the association relationship includes an association relationship between the first component padding data and the first component configuration data.
For example, when the target page is a registration page, the registration page includes an input box component for inputting a user name and a password and popup prompt data, where the popup prompt data is first component configuration data corresponding to the registration page, and the user name and the password input by the user in the input box component are first component padding data. And establishing an association relation between the user name and the password and the popup prompt data in advance, and updating the popup prompt data according to the association relation between the user name and the password and the popup prompt data when the user inputs the user name and the password in the input box component. For example, after the user inputs the user name and the password, if the user name is determined to be repeated, the popup prompt data is updated into popup prompt data for prompting the user name to be repeated according to the incidence relation between the user name and the password and the popup prompt data; if the password is determined not to be in accordance with the preset password rule (for example, the password contains letters, numbers and special characters at the same time and is not less than 6 bits), the popup prompt data is updated to be popup prompt data for prompting that the password is not in accordance with the specification according to the association relationship between the user name and the password and the popup prompt data.
For another example, when the target page is a search page, the search page includes an input frame component for inputting a keyword to be searched and data to be displayed related to the keyword, where the data to be displayed is first component configuration data corresponding to the search page, and the keyword to be searched, which is input by a user at the input frame component, is first component filling data. And establishing an incidence relation between the keywords to be searched and the data to be displayed in advance, and updating the data to be displayed according to the incidence relation between the keywords to be searched and the data to be displayed when the user inputs the keywords to be searched in the input frame assembly. For example, when a keyword to be searched input by a user is "component", updating the data to be displayed into the data to be displayed related to the "component" according to the incidence relation between the keyword to be searched and the data to be displayed; and when the keyword to be searched input by the user is the page, updating the data to be displayed into the data to be displayed related to the page according to the incidence relation between the keyword to be searched and the data to be displayed.
It should be noted that, because the first component filling data may be temporary state data, and the user may change the temporary state data, if the first component configuration data corresponding to the target page is updated according to the temporary state data, after the user changes the first component filling data, the first component configuration data corresponding to the target page needs to be updated again, which may cause a large data processing amount and affect the operation efficiency. Therefore, before the first component filling data updates the first component configuration data corresponding to the target page, it is determined whether the first component filling data is non-temporary data, and if it is determined that the first component filling data is non-temporary data, the first component configuration data corresponding to the target page is updated according to the non-temporary data. If the first component filling data is determined to be temporary data, the first component filling data needs to be converted into non-temporary data, and after the first filling data is converted into the non-temporary data, the first component configuration data corresponding to the target page is updated, so that the problem that the first component configuration data corresponding to the target page needs to be updated again after a user changes the temporary data, the data processing amount is large, and the operation efficiency is affected is solved.
For example, whether the first component filling data is non-temporary data may be determined by the identification information of the first component filling data. In this embodiment, the page update instruction further includes identification information of the first component padding data, where the identification information may be a character string, and if the identification information of the first component padding data is a character string "state", it is determined that the first component padding data is non-temporary data. And if the identification information of the first component filling data is a character string 'stash', determining that the first component filling data is temporary data. If the first component filling data is determined to be temporary state data, the temporary state data is stored in a filling data manager so as to be convenient for converting the temporary state data into non-temporary state data in the following process.
In a possible implementation manner, if it is determined that the first component padding data is temporary state data, after receiving a conversion instruction sent by a user, the temporary state data may be converted into non-temporary state data according to the conversion instruction, and then the first component configuration data corresponding to the target page is updated according to the converted non-temporary state data.
In this embodiment, the conversion of the temporary state data into non-temporary state data may be implemented by changing the identification information of the temporary state data from "state" to "state" according to the conversion instruction.
For example, the user name and password entered by the user in the input box component of the user name and password of the registration page are temporary data, and the user can change the user name and password at any time before the user clicks the "registration" button. After the user clicks the 'register' button, the user name and the password are converted into non-temporary data and sent to the server, and the user name and the password are verified by the server, and therefore the user clicks the 'register' button, and the user name and the password are converted into the non-temporary data. Further, the user clicks a "register" button, which is a conversion instruction sent by the user.
For another example, the keyword to be searched, which is input by the user in the input box component of the keyword of the search page, is temporary data, after the user clicks the "search" button, the keyword to be searched is sent to the server, and the server searches for data related to the keyword, and the keyword to be searched cannot be changed any more, so that the user clicks the "search" button, that is, the keyword to be searched is converted into non-temporary data. Further, the user clicks a "search" button, which is a conversion instruction sent by the user.
In this embodiment, since the dynamic configuration data of the component may change with the first component filling data, and the static configuration data of the component may not change with the first component filling data, the dynamic configuration data of the component may be updated according to the first component filling data.
For example, the association between the first component filling data and the component dynamic configuration data may be established in advance, and then the component dynamic configuration data may be updated according to the association relationship between the first component filling data and the component dynamic configuration data.
For example, taking the first component padding data as the user name and password input by the user as an example, after the user enters the user name and password in the user name and password entry box component of the registration page, if it is determined that the user name is repeated, generating popup prompt data for prompting the user to repeat the user name according to the association relationship between the user name and the password and the popup prompt data, if the password is determined not to conform to the password rule according to a preset password rule (for example, the password contains letters, numbers and special characters at the same time and is not less than 6 bits), generating popup prompt data for prompting the user that the password is not in accordance with the specification according to the association relationship between the user name and the password and the popup prompt data, therefore, the generated popup prompt data may be different when the user inputs different user names and passwords, and therefore, the popup prompt data is the component dynamic configuration data.
For another example, after the user inputs a keyword to be searched in the keyword input box component of the search page, the data to be displayed related to the keyword is generated according to the association relationship between the keyword to be searched and the keyword and the data to be displayed. For example, a user entering a "component" in the keyword entry box component of a search page will generate data to be presented that is related to the "component". The user inputs the page in the keyword input frame of the search page, the data to be displayed related to the page is generated, and therefore, the data to be displayed obtained by inputting different keywords to be searched by the user is different, and the data to be displayed is the dynamic configuration data of the component.
S104, determining a target component corresponding to the component identifier from the page component library, and rendering the target component according to the first component filling data and the updated first component configuration data to update the target page.
In this embodiment, the target component is rendered according to the first component filling data, the component static configuration data and the updated component dynamic configuration data to update the target page.
For example, taking the target page as a registration page as an example, the user name and password input by the user, the component dynamic configuration data (pop-up data), and the component static configuration data (style data of the input box component of the user name and password) are rendered to update the registration page.
For another example, taking the target page as a search page as an example for explanation, the input box of the keyword is rendered according to the keyword to be searched, the dynamic configuration data of the component (data to be displayed), and the static configuration data of the component (style data of the input box component of the keyword) input by the user, so as to update the search page.
By adopting the scheme, the first component configuration data corresponding to the component identifier can be acquired from the data manager; updating first component configuration data corresponding to the target page according to the first component filling data; and determining a target component corresponding to the component identifier from a page component library, rendering the target component according to the first component filling data and the updated first component configuration data, and converting the target component from function or class data into view data to update the target page.
How to refresh the target page when multiple components are included in the target page is described below with reference to the embodiment shown in fig. 2.
FIG. 2 is a flow diagram illustrating another method of updating a page in accordance with an exemplary embodiment. As shown in fig. 2, the method includes:
s201, receiving a page updating instruction, wherein the page updating instruction is used for indicating to update a target page and comprises component identification of components in the target page and first component filling data input by a user.
S202, first component configuration data corresponding to the component identification is obtained from the configuration data manager.
S203, updating the first component configuration data corresponding to the target page according to the first component filling data.
S201 to S203 provided in this embodiment are similar to S101 to S103 provided in the embodiment of fig. 1, and this embodiment is not described herein again.
And S204, determining the associated component associated with the target component.
In this step, the association component associated with the target component can be determined by the component identification of the target component and the component identification of the association component and the association relationship between the target component and the association component.
For example, when the target page is a shopping page, the target component may be an input box component of a color attribute of a purchase item (clothes), and an associated component associated with the target component is a picture component of the purchase item (clothes).
And S205, updating the second component filling data of the associated component according to the first component filling data.
Illustratively, association is established in advance between the first component filling data of the target component and the second component filling data of the associated component, and then the second component filling data is updated according to the association relationship between the first component filling data and the second component filling data of the associated component.
For example, the first component fill data is used as an example of the color attribute value of the clothes input by the user in the input box component of the color attribute. And after the user inputs the color attribute value of the clothes in the input box component of the color attribute on the shopping page, updating the image data of the image component according to the incidence relation between the color attribute value and the image data of the image component. For example, if the color attribute value of the garment input by the user is red, the image data of the picture assembly is updated to the image data of the red garment. For example, if the color attribute value of the clothes input by the user is white, the image data of the picture assembly is updated to the image data of the white clothes. When the user inputs different color attribute values, image data corresponding to the different color attribute values can be generated, and the image data is the second filling data of the image component associated with the input frame component of the color attribute.
S206, updating the second component configuration data of the associated component according to the updated second component filling data.
For example, after the second component filling data of the associated component is updated, the second component configuration data of the associated component is updated according to the updated second component filling data.
For example, it may be preset that the second component padding data and the second component configuration data establish an association, and then update the second component configuration data according to the association relationship between the second component padding data and the second component configuration data.
The process of updating the second component configuration data of the associated component according to the updated second component padding data is similar to the process of updating the component configuration data of the target component according to the first component padding data of the target component, and details of this embodiment are not repeated here.
S207, rendering the target component according to the first component filling data and the updated first component configuration data, and rendering the associated component according to the updated second component filling data and the updated second component configuration data to update the target page.
Illustratively, when the destination page is a shopping page, the input frame component of the color attribute is rendered according to first component filling data (color attribute value of the purchase item) input by the user and first component configuration data (the popped inventory of the purchase item corresponding to the color attribute value and the style of the input frame component of the color attribute) of the input frame component of the color attribute, and the picture component is rendered according to updated second component filling data (image data of the purchase item corresponding to the color attribute value) and second component configuration data (the popped price of the purchase item and the style of the picture component) of the picture component to update the shopping page.
By adopting the scheme, the first component configuration data of the target component can be updated according to the first component filling data, and the second component filling data of the associated component can be updated according to the first component filling data; updating second component configuration data of the associated component according to the updated second component filling data; the target component is rendered according to the first component filling data and the updated first component configuration data, the associated component is rendered according to the updated second component filling data and the updated second component configuration data, and the target component is converted from function or class data into view data to update the target page.
How to generate the target page before receiving the page update instruction is described below with reference to the embodiment shown in fig. 3.
FIG. 3 is a flow diagram illustrating a method of generating a page in accordance with an exemplary embodiment. As shown in fig. 3, the method includes:
s301, obtaining a page configuration file corresponding to a target page, and analyzing the page configuration file into page configuration data, wherein the page configuration data comprises at least one component identifier, first component configuration data corresponding to the component identifier, and first component configuration data of preset initial data.
Illustratively, the first component configuration data is used to configure the behavior of the component identifying the corresponding component. Such as the address of the component interacting with the server, the style of the component, and pop-up hints data, etc.
In this embodiment, the preset initial data is data to be filled into the component corresponding to the component identifier. For example, when the target page to be generated is a registration page, the acquired page configuration data corresponding to the target page includes a preset initial data preset initial user name and a preset password, where the preset initial user name and the preset password may be null characters, characters of "000000", and the like, and this embodiment is not limited here.
Illustratively, the page configuration data includes first component configuration data that also includes the username and password entry box component and components of the username and password entry box component.
It should be noted that the page configuration data further includes style data and page layout data of the target page.
For example, the color distribution of the registration page, the location of the user name and password input box components in the page, and the layout information of the registration page.
S302, rendering the component corresponding to the component identifier in the target component library according to the first component configuration data and the preset initial data, and generating a target page.
Exemplarily, the user name and password input box component corresponding to the component identifier in the target component library is rendered according to the first component configuration data of the user name and password input box component and the preset initial data of the user name and password input box component, and a registration page is generated.
In this embodiment, the target component library may be a component library such as exact and vue. The act is a component library applicable to a computer, and vue is a component library applicable to a mobile terminal such as a mobile phone. Optionally, the page configuration data may be adapted to a corresponding terminal through a driver, and then a component corresponding to the component identifier in the target component library is rendered, so as to generate a target page.
By adopting the scheme, the page configuration file can be obtained, the page configuration file corresponding to the target page is analyzed into page configuration data, and the page configuration data comprises at least one component identifier, first component configuration data corresponding to the component identifier and preset initial data; the components corresponding to the component identifiers in the target component library are rendered according to the first component configuration data and the preset initial data, so that the target components are converted from function or class data into view data, and a target page is generated.
Fig. 4 is a block diagram illustrating an apparatus for updating a page according to an example embodiment. As shown in fig. 4, the apparatus 40 includes:
an update instruction receiving module 401, configured to receive a page update instruction, where the page update instruction is used to instruct to update a target page, and the page update instruction includes a component identifier of a component in the target page and first component filling data input by a user;
a component configuration data obtaining module 402, configured to obtain first component configuration data corresponding to the component identifier from the configuration data manager;
a component configuration data updating module 403, configured to update the first component configuration data corresponding to the target page according to the first component filling data;
and a target page updating module 404, configured to determine a target component corresponding to the component identifier from a page component library, and render the target component according to the first component filling data and the updated first component configuration data, so as to update the target page.
Optionally, the first component configuration data comprises component static configuration data and component dynamic configuration data;
the component configuration data update module 403 is configured to:
and updating the component dynamic configuration data corresponding to the target page according to the first component filling data.
Alternatively, fig. 5 is a block diagram illustrating an apparatus for updating a page according to the embodiment of fig. 4. As shown in fig. 5, the apparatus 40 further includes:
an association component determination module 405 for determining an association component associated with the target component;
updating second component fill data for the associated component in accordance with the first component fill data;
updating second component configuration data of the associated component according to the updated second component filling data;
accordingly, the target page update module 404 is configured to:
rendering the target component according to the first component filling data and the updated first component configuration data, and rendering the associated component according to the updated second component filling data and the updated second component configuration data to update the target page.
Optionally, the apparatus further comprises:
a non-transient state data determination module 406, configured to determine whether the first component padding data is non-transient state data;
accordingly, the component configuration data update module 403 is configured to:
and if the first component filling data is non-temporary data, updating first component configuration data corresponding to the target page according to the first component filling data.
Optionally, the apparatus 40 further comprises: a target page generating module 407, configured to:
acquiring a page configuration file corresponding to the target page, and analyzing the page configuration file into page configuration data, wherein the page configuration data comprises at least one component identifier, first component configuration data corresponding to the component identifier and preset initial data;
and rendering the component corresponding to the component identifier in the target component library according to the first component configuration data and the preset initial data to generate the target page.
By the device, a page updating instruction can be received, wherein the page updating instruction is used for indicating the updating of a target page and comprises the component identification of the component in the target page and first component filling data input by a user; acquiring first component configuration data corresponding to the component identification from a data manager; updating first component configuration data corresponding to the target page according to the first component filling data; and determining a target component corresponding to the component identifier from a page component library, rendering the target component according to the first component filling data and the updated first component configuration data, and converting the target component from function or class data into view data to update the target page.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
Fig. 6 is a block diagram illustrating an electronic device 600 according to an example embodiment. Referring to fig. 6, the electronic device 600 includes a processor 622, which may be one or more in number, and a memory 632 for storing computer programs executable by the processor 622. The computer program stored in memory 632 may include one or more modules that each correspond to a set of instructions. Further, the processor 622 may be configured to execute the computer program to perform the above-described method of updating a page.
Additionally, electronic device 600 may also include a power component 626 that may be configured to perform power management of electronic device 600 and a communication component 650 that may be configured to enable communication, e.g., wired or wireless communication, of electronic device 600. The electronic device 600 may also include input/output (I/O) interfaces 658. The electronic device 600 may operate based on an operating system stored in the memory 632, such as Windows Server, Mac OSXTM, UnixTM, LinuxTM, and the like.
In another exemplary embodiment, a computer readable storage medium comprising program instructions which, when executed by a processor, implement the steps of the above-described method of updating a page is also provided. For example, the computer readable storage medium may be the memory 632 described above that includes program instructions that are executable by the processor 622 of the electronic device 600 to perform the method for updating pages described above.
In another exemplary embodiment, a computer program product is also provided, which comprises a computer program executable by a programmable apparatus, the computer program having code portions for performing the above-mentioned method of updating pages when executed by the programmable apparatus.
The preferred embodiments of the present disclosure are described in detail with reference to the accompanying drawings, however, the present disclosure is not limited to the specific details of the above embodiments, and various simple modifications may be made to the technical solution of the present disclosure within the technical idea of the present disclosure, and these simple modifications all belong to the protection scope of the present disclosure. It should be noted that the various features described in the above embodiments may be combined in any suitable manner without departing from the scope of the invention. In order to avoid unnecessary repetition, various possible combinations will not be separately described in this disclosure.
In addition, any combination of various embodiments of the present disclosure may be made, and the same should be considered as the disclosure of the present disclosure, as long as it does not depart from the spirit of the present disclosure.

Claims (12)

1. A method of updating a page, comprising:
receiving a page updating instruction, wherein the page updating instruction is used for indicating to update a target page and comprises a component identifier of a component in the target page and first component filling data input by a user;
acquiring first component configuration data corresponding to the component identification from a configuration data manager;
updating first component configuration data corresponding to the target page according to the first component filling data;
and determining a target component corresponding to the component identifier from a page component library, and rendering the target component according to the first component filling data and the updated first component configuration data so as to update the target page.
2. The method of claim 1, wherein the first component configuration data comprises component static configuration data and component dynamic configuration data;
the updating of the first component configuration data corresponding to the target page according to the first component filling data includes:
and updating the dynamic configuration data of the components corresponding to the target page according to the first component filling data.
3. The method of claim 1, wherein prior to rendering the target component according to the first component fill data and the updated first component configuration data to update the target page, the method further comprises:
determining an association component associated with the target component;
updating second component fill data for the associated component in accordance with the first component fill data;
updating second component configuration data of the associated component according to the updated second component filling data;
correspondingly, the rendering the target component according to the component filling data and the updated first component configuration data to update the target page includes:
rendering the target component according to the first component filling data and the updated first component configuration data, and rendering the associated component according to the updated second component filling data and the updated second component configuration data to update the target page.
4. The method of claim 1, prior to updating the first component configuration data corresponding to the target page according to the first component fill data, the method further comprising:
determining whether the first component fill data is non-transient state data;
correspondingly, the updating the first component configuration data corresponding to the target page according to the first component filling data includes:
and if the first component filling data are non-temporary data, updating first component configuration data corresponding to the target page according to the first component filling data.
5. The method according to any of claims 1 to 4, wherein, prior to receiving the page update instruction, the target page is generated by:
acquiring a page configuration file corresponding to the target page, and analyzing the page configuration file into page configuration data, wherein the page configuration data comprises at least one component identifier, first component configuration data corresponding to the component identifier and preset initial data;
and rendering the component corresponding to the component identifier in the target component library according to the first component configuration data and the preset initial data to generate the target page.
6. An apparatus for updating a page, comprising:
the updating instruction receiving module is used for receiving a page updating instruction, wherein the page updating instruction is used for indicating to update a target page and comprises a component identifier of a component in the target page and first component filling data input by a user;
the component configuration data acquisition module is used for acquiring first component configuration data corresponding to the component identifier from a configuration data manager;
the component configuration data updating module is used for updating first component configuration data corresponding to the target page according to the first component filling data;
and the target page updating module is used for determining a target component corresponding to the component identifier from a page component library, and rendering the target component according to the component filling data and the updated first component configuration data so as to update the target page.
7. The apparatus of claim 6, wherein the first component configuration data comprises component static configuration data and component dynamic configuration data;
the component configuration data update module is to:
and updating the dynamic configuration data of the components corresponding to the target page according to the first component filling data.
8. The apparatus of claim 6, further comprising:
an association component determination module for determining an association component associated with the target component;
updating second component fill data for the associated component in accordance with the first component fill data;
updating second component configuration data of the associated component according to the updated second component filling data;
accordingly, the target page update module is configured to:
rendering the target component according to the first component filling data and the updated first component configuration data, and rendering the associated component according to the updated second component filling data and the updated second component configuration data to update the target page.
9. The apparatus of claim 6, further comprising:
a non-transient state data determination module, configured to determine whether the first component padding data is non-transient state data;
accordingly, the component configuration data update module is to:
and if the first component filling data are non-temporary data, updating first component configuration data corresponding to the target page according to the first component filling data.
10. The apparatus of any one of claims 6 to 9, further comprising: a target page generation module to:
acquiring a page configuration file corresponding to the target page, and analyzing the page configuration file into page configuration data, wherein the page configuration data comprises at least one component identifier, first component configuration data corresponding to the component identifier and preset initial data;
and rendering the component corresponding to the component identifier in the target component library according to the first component configuration data and the preset initial data to generate the target page.
11. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 5.
12. An electronic device, comprising:
a memory having a computer program stored thereon;
a processor for executing the computer program in the memory to carry out the steps of the method of any one of claims 1 to 5.
CN201911195089.0A 2019-11-28 2019-11-28 Page updating method and device, storage medium and electronic equipment Active CN110990008B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911195089.0A CN110990008B (en) 2019-11-28 2019-11-28 Page updating method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911195089.0A CN110990008B (en) 2019-11-28 2019-11-28 Page updating method and device, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN110990008A true CN110990008A (en) 2020-04-10
CN110990008B CN110990008B (en) 2023-06-30

Family

ID=70087922

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911195089.0A Active CN110990008B (en) 2019-11-28 2019-11-28 Page updating method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN110990008B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111782314A (en) * 2020-05-22 2020-10-16 北京达佳互联信息技术有限公司 Method and device for processing webpage form, electronic equipment and storage medium
CN113268234A (en) * 2021-05-17 2021-08-17 北京三快在线科技有限公司 Page generation method, device, terminal and storage medium
CN113609421A (en) * 2021-08-10 2021-11-05 平安科技(深圳)有限公司 Page data updating method and device, computer equipment and storage medium
CN117435836A (en) * 2023-10-25 2024-01-23 上海宽睿信息科技有限责任公司 Front-end page splicing method and system based on centralized management of database

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016015432A1 (en) * 2014-07-28 2016-02-04 百度在线网络技术(北京)有限公司 Page construction method, apparatus, system and device, and nonvolatile computer storage medium
CN108664296A (en) * 2017-03-31 2018-10-16 阿里巴巴集团控股有限公司 A kind of page rendering method and apparatus, a kind of page processing method and device
CN109460276A (en) * 2018-10-25 2019-03-12 北京字节跳动网络技术有限公司 The page and page configuration document generating method, device, terminal device and medium
CN109542543A (en) * 2017-09-21 2019-03-29 腾讯科技(深圳)有限公司 Application page surface treatment method, apparatus, storage medium and computer equipment
CN109710328A (en) * 2018-08-20 2019-05-03 深圳壹账通智能科技有限公司 Page configuration method, apparatus, equipment and readable storage medium storing program for executing
CN110362308A (en) * 2019-06-20 2019-10-22 平安科技(深圳)有限公司 Page generation method, device, computer equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016015432A1 (en) * 2014-07-28 2016-02-04 百度在线网络技术(北京)有限公司 Page construction method, apparatus, system and device, and nonvolatile computer storage medium
CN108664296A (en) * 2017-03-31 2018-10-16 阿里巴巴集团控股有限公司 A kind of page rendering method and apparatus, a kind of page processing method and device
CN109542543A (en) * 2017-09-21 2019-03-29 腾讯科技(深圳)有限公司 Application page surface treatment method, apparatus, storage medium and computer equipment
CN109710328A (en) * 2018-08-20 2019-05-03 深圳壹账通智能科技有限公司 Page configuration method, apparatus, equipment and readable storage medium storing program for executing
CN109460276A (en) * 2018-10-25 2019-03-12 北京字节跳动网络技术有限公司 The page and page configuration document generating method, device, terminal device and medium
CN110362308A (en) * 2019-06-20 2019-10-22 平安科技(深圳)有限公司 Page generation method, device, computer equipment and storage medium

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111782314A (en) * 2020-05-22 2020-10-16 北京达佳互联信息技术有限公司 Method and device for processing webpage form, electronic equipment and storage medium
CN113268234A (en) * 2021-05-17 2021-08-17 北京三快在线科技有限公司 Page generation method, device, terminal and storage medium
CN113609421A (en) * 2021-08-10 2021-11-05 平安科技(深圳)有限公司 Page data updating method and device, computer equipment and storage medium
CN117435836A (en) * 2023-10-25 2024-01-23 上海宽睿信息科技有限责任公司 Front-end page splicing method and system based on centralized management of database
CN117435836B (en) * 2023-10-25 2024-08-13 上海宽睿信息科技有限责任公司 Front-end page splicing method and system based on centralized management of database

Also Published As

Publication number Publication date
CN110990008B (en) 2023-06-30

Similar Documents

Publication Publication Date Title
CN110750442B (en) Test case generation method, device, equipment and storage medium
CN110221872B (en) Page jump method and device, electronic equipment and storage medium
CN110990008B (en) Page updating method and device, storage medium and electronic equipment
CN106406844B (en) Method and device for realizing public number menu of communication interaction platform
CN110275831B (en) Mock data verification method and device of protocol interface
CN107145784B (en) Vulnerability scanning method and device and computer readable medium
CN110321284B (en) Test data entry method, device, computer equipment and storage medium
CN107807841B (en) Server simulation method, device, equipment and readable storage medium
CN112887451B (en) Domain name resolution method and device and computer equipment
CN110941779A (en) Page loading method and device, storage medium and electronic equipment
CN112214714A (en) Request processing method, device and equipment based on configuration file and storage medium
CN111857803A (en) Page updating method, device, server and storage medium
CN111949262A (en) Front-end project construction method and device, computer equipment and storage medium
CN108733468A (en) Timed task Dynamic Configuration and device, storage medium and server cluster
CN106302011B (en) Multi-terminal-based test method and terminal
CN117009248A (en) Machine learning model testing method and device, electronic equipment and storage medium
CN115543324B (en) Method, device, equipment and medium for generating interactive interface
CN109740074B (en) Method, device and equipment for processing parameter configuration information
CN112083925A (en) Data acquisition method, device, equipment and storage medium based on H5 page development
KR102023999B1 (en) Method and apparatus for generating web pages
CN105739717A (en) Information input method and device
CN114756183A (en) Data printing method, device, equipment and storage medium
CN106202289B (en) Webpage positioning method and electronic equipment
CN109635175B (en) Page data splicing method and device, readable storage medium and electronic equipment
CN110389754B (en) Service processing method, system, server, terminal, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant