Page configuration method and device and electronic equipment

By parsing XML style files with a configuration engine and visually configuring functional components in the configuration page, the problem of low page development efficiency is solved, and convenient and efficient page development is achieved.

CN113391808BActive Publication Date: 2026-02-13BEIJING WODONG TIANJUN INFORMATION TECH CO LTD +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202110772507.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-07-08
Publication Date
2026-02-13
Estimated Expiration
2041-07-08

AI Technical Summary

Technical Problem

Current technologies result in low page development efficiency, requiring extensive manual coding and modification, which makes development inconvenient.

Method used

The configuration engine parses XML style files to generate functional element styles, and displays the configuration visually on the configuration page, allowing users to directly input style data to generate client-side pages.

Benefits of technology

It improves page development efficiency, shortens development time, increases development productivity, and makes page development more convenient.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113391808B_ABST
    Figure CN113391808B_ABST
Patent Text Reader

Abstract

The present disclosure provides a page configuration method and device and electronic equipment, and belongs to the technical field of software development. The method comprises: in the case of receiving an identification input of a first XML style file, displaying a first style at a first position of a configuration page, the first XML style file being configured in a configuration engine, the configuration page being used for configuring a page of a client, the first style being a style of a first functional element obtained by parsing the first XML style file; configuring the first functional element at the first position according to the first style and input first style data, the first style data comprising at least one of business data and style attribute data; and generating a page adapted to the client according to the functional elements configured at each position of the configuration page. The page configuration method provided by the present disclosure can solve the problem that the development of the page is not convenient.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present disclosure belongs to the technical field of software development, and particularly relates to a page configuration method and device and electronic equipment. BACKGROUND

[0002] With the rapid development of software development technology, more and more application programs need to support more functions, and developers need to develop adaptive pages in time.

[0003] Currently, when developing a mobile terminal project, for example, a commodity-related project, for a page order category page, an order detail page, a commodity detail page, a settlement page, a search page, a login page, a floor, etc., a user interface design draft is first obtained, and then a developer uses Cascading Style Sheets (CSS) to manually write style code to output a user interface (UI) that is the same as the design draft.

[0004] However, the above page development method is usually manually written code, and the development efficiency is slow. If the code needs to be modified, for example, according to the business needs, the text, font color, font size, etc. on the page are modified, the developer needs to manually modify a large amount of code in the project engineering, which wastes manpower, and thus the development of the page is not convenient. SUMMARY

[0005] An object of the embodiments of the present disclosure is to provide a page configuration method, device and electronic equipment, which can solve the problem that the development of the page is not convenient.

[0006] To solve the above technical problems, the present disclosure is implemented as follows:

[0007] In a first aspect, the embodiments of the present disclosure provide a page configuration method, which comprises: in the case of receiving an identification input of a first extensible markup language (XML) style file, displaying a first style at a first position of a configuration page; the first XML file is configured in a configuration engine, the configuration page is used to configure a page of a client, and the first style is a style of a first functional element obtained by parsing the first XML style file; according to the first style and input first style data, configuring the first functional element at the first position, the first style data comprising at least one of style attribute data of business data; according to the functional elements configured at each position in the configuration page, generating a page adapted to the client.

[0008] In a second aspect, the embodiments of the present disclosure provide a page configuration apparatus, comprising a display module, a configuration module and a generation module; the display module is configured to display a first style at a first position of a configuration page in response to receiving an identification input of a first XML style file; the first XML style file is configured in a configuration engine, the configuration page is used for configuring a page of a client, and the first style is a style of a first functional element obtained by parsing the first XML style file; the configuration module is configured to configure the first functional element at the first position according to the first style displayed by the display module and first style data input by a user, wherein the first style data comprises at least one of business data and style attribute data; and the generation module is configured to generate the page adapted to the client according to the functional elements configured at the positions of the configuration page.

[0009] In a third aspect, the embodiments of the present disclosure provide an electronic device, comprising a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction is executed by the processor to implement the steps of the method according to the first aspect.

[0010] In a fourth aspect, the embodiments of the present disclosure provide a readable storage medium, wherein the readable storage medium stores a program or instruction, and the program or instruction is executed by a processor to implement the steps of the method according to the first aspect.

[0011] In a fifth aspect, the embodiments of the present disclosure provide a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is configured to execute a program or instruction to implement the method according to the first aspect.

[0012] In the embodiments of the present disclosure, first, the electronic device can display a first style at a first position in the configuration page in a case where an identification input of a first XML style file is received, the first style being a style of a first functional element obtained by parsing the first XML style file; then, the electronic device can configure the first functional element at the first position according to the first style and input first style data, the first style data including an indication of one of service data and style attribute data; finally, the electronic device can generate a page of the adaptation client according to the functional elements configured at each position in the configuration page. Since the configuration engine configures the XML style file of the functional element, and the configuration interface is used to display the page of the configured client, the electronic device can obtain the style of each functional element parsed according to each XML style file through the configuration engine, display the style of each functional element at the corresponding position in the configuration page, and configure the functional element related to the service at the corresponding position of the page to be developed by inputting the style data of each functional element. In the development process of the page, the page development is realized by configuration, and the developer no longer needs to write the code of the functional element to realize the page development, so that the efficiency of the page development can be improved, the development time of the page can be shortened, the productivity of the page development can be improved, and the development of the page is more convenient. BRIEF DESCRIPTION OF DRAWINGS

[0013] Figure 1 A flowchart of a page configuration method provided by the embodiments of the present disclosure is shown;

[0014] Figure 2 A schematic diagram of a configuration page provided by the embodiments of the present disclosure is shown;

[0015] Figure 3 A logic diagram of page configuration provided by the embodiments of the present disclosure is shown;

[0016] Figure 4 A data flow diagram of page configuration provided by the embodiments of the present disclosure is shown;

[0017] Figure 5 A schematic diagram of page rendering provided by the embodiments of the present disclosure is shown;

[0018] Figure 6 A flowchart of conversion of a functional element into an XML style file provided by the embodiments of the present disclosure is shown;

[0019] Figure 7 A possible structural diagram of a page configuration apparatus provided by the embodiments of the present disclosure is shown;

[0020] Figure 8 A possible structural diagram of an electronic device provided by the embodiments of the present disclosure is shown;

[0021] Figure 9 A hardware schematic diagram of an electronic device is provided for the embodiments of the present disclosure. DETAILED DESCRIPTION

[0022] The technical solutions in the embodiments of the present disclosure will be described clearly and completely below with reference to the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, rather than all the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by a person of ordinary skill in the art without creative labor fall within the protection scope of the present disclosure.

[0023] The terms "first", "second", and the like in the specification and claims of the present disclosure are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments of the present disclosure can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first", "second", etc. are generally of a kind and do not limit the number of objects, for example, the first object can be one or more. In addition, "and / or" in the specification and claims indicates at least one of the connected objects, and the character " / ", generally indicates that the front and rear associated objects are in an "or" relationship.

[0024] The embodiments of the present disclosure provide a configuration engine in which an XML style file of a functional element is configured. In the embodiments of the present disclosure, the XML style file of the functional element can include an XML style file of a commonly used function stored in advance, and can also include an XML style file of a function customized by a programmer. A developer can quickly develop a page based on the configuration method of the page provided by the configuration engine and the embodiments of the present disclosure, through the corresponding XML style file of each functional element.

[0025] It should be noted that the functional element can map elements of the front-end layout, and one functional element can map block-level elements or line-level elements, or can map multiple elements of different levels.

[0026] In the embodiments of the present disclosure, the commonly used functional elements can include: a block-level element (view), a carousel (swiper), an image (image), a text (text), an iteration (iterate), a button (button), and a custom element.

[0027] Exemplarily, the names of the commonly used functional elements can be defined as corresponding HyperText Markup Language tags (HTML).

[0028] For example, for block-level elements, in the HTML5 development framework, the block-level elements are mapped to div tags; in the RN (React Native) and Taro (a multi-end unified development framework based on NodeJS) development frameworks, the block-level elements are mapped to view tags. For text in the line-level element, the text is mapped to a Span tag in the HTML5 framework, and can be mapped to a text tag in the RN and Taro. The RN is an open source cross-platform mobile application development framework.

[0029] The page configuration method provided by the embodiments of the present disclosure will be described in detail below in combination with the drawings, specific embodiments and application scenarios.

[0030] Figure 1 A flowchart of a page configuration method provided by the embodiments of the present disclosure is shown in Figure 1 The method can include the following S101-S103:

[0031] S101, the electronic device displays the first style at the first position of the configuration page in a case where an identification input of the first XML style file is received.

[0032] The configuration page is used for configuring a page of a client, and the first style is a style of a first functional element obtained by parsing the first XML style file.

[0033] For example, the configuration page can be a display page of a configuration engine, and styles corresponding to different XML style files can be added in the configuration page for page configuration. The effect of a page generated by the configuration page is the same as that of a page displayed by an actual client.

[0034] It should be noted that one style corresponds to a configuration component of one functional element in page development. One configuration component can be understood as a functional code template, which reserves business data fields and style attribute data fields and can bind events.

[0035] It can be understood that the identification of the first XML style file indicates the first XML style file.

[0036] Optionally, the first XML file can be obtained by parsing the first XML style file by a server, or can be obtained by downloading and parsing the first XML style file by the electronic device.

[0037] For example, after receiving the input of selecting the first XML style file, the electronic device can call an interface of the server through the configuration engine, download and parse the first XML file, and then call the first style to display the first style at the first position selected by the developer in the configuration page.

[0038] S102, the electronic device configures the first functional element at the first position of the configuration page according to the first style and the input first style data.

[0039] The first style data includes at least one of business data and style attribute data.

[0040] For example, the business data indicates data related to the business in a functional element. For example, the title of a commodity page, the business data can include: the name of the commodity, the price of the commodity, the delivery location, the delivery time and other data related to the business. The style attribute data indicates data related to the specific parameters of the style of a functional element. For example, a box is a style, and the style attribute data can be data related to the specific parameters of the length, width, pattern, color, etc. of the box.

[0041] For example, the first style is a picture of a box. After inputting the style data of the size of the box as size 1 and the color as color 1, a picture of a box with a size of size 1 and a color of color 1 can be displayed in the configuration page.

[0042] Optionally, the electronic device can display an input area of the style data for inputting the style data and the style ID in the case of displaying the first style; or the electronic device can not display the input area of the style data in the case of displaying the first style, and can display the input area of the style data after receiving an input of selecting the first style, so that the developer can configure the style data and the style ID for the style according to different business needs.

[0043] S103, the electronic device generates a page of the adaptation client according to the functional elements configured at each position of the configuration page.

[0044] It should be noted that in software development, the configuration engine is located in the B end (the device facing the developer), which is usually in the PC end and can be used to develop the C end interface. The C end is a client facing users.

[0045] It can be understood that in the software development process, the commonly used functional elements can be configured in the configuration page in the above manner.

[0046] For example, the developer needs to develop an order page of a commodity. The developer can drag the picture element to the position of the commodity picture in the configuration page according to the position designed in the UI design draft, add a specific commodity picture, drag the commodity title element to the position of the commodity title in the configuration page, add the commodity title and modify the business data such as the commodity name and the commodity price in the commodity title, and drag the payment button to the position of the payment button in the configuration page to add the payment button.

[0047] For example,Figure 2 A configuration page provided by an embodiment of the present disclosure is shown in the following figure: Figure 2 As shown in the figure, the configuration page can include a button 21 for displaying an XML style file, and a style can be added to the configuration page through the button 21. The right area of the configuration page displays basic information of the style, Mock data (business fields bound by the style), and style information (i.e., style attributes). A developer can input Mock data and style attribute data to configure a functional element at this position. After the developer adds a style to the left area and configures style data, a generated UI can be displayed in a floating interface 22 on the configuration page.

[0048] It should be noted that, Figure 2 The UI in the figure is only an example for illustration. During page development, various styles can be quickly added through an XML style file according to user needs, and various functional elements on the configuration page can be configured.

[0049] For example, Figure 3 A logic diagram of page configuration provided by an embodiment of the present disclosure is shown in the following figure. After receiving an input of an XML style file input by a developer, a server interface can be requested to obtain the XML style file. Then, the XML style file is parsed to generate a style component (i.e., obtain a style), and the style is displayed in a UI. Then, the style component can be called so that the developer can input a style identifier and style data. Finally, a C-end interface can be generated according to the style identifier (indicated style) and the style data.

[0050] It should be noted that in an actual development scenario, a developer can determine components required by a page based on a UI design draft, and then configure the page according to the required components. Figure 4 A data flow diagram of page configuration provided by an embodiment of the present disclosure is shown in the following figure. Taking an order page as an example, the page can include the following components: a style, a commodity detail, an order, a scaffold (a UI and a network), a login component, and other components. A configuration engine can call a commodity detail component and an order component through a server, and call a style component of the server to obtain an XML style file. A style parser of the configuration engine performs style data processing, and a data parser performs business data processing. The style parser can perform XML style file parsing, configuration parsing, and style rendering. The data parser can perform node selection, logic processing, and data assembly. After the configuration engine performs data processing, page rendering is performed to implement a UI, for example, large image preview, button processing, pop-up windows, and pop-up layers in the page can be implemented. Finally, in order to adapt to multiple ends, a page configured through a configuration manner can be adapted to multiple ends through compiling and packaging.

[0051] The method for configuring a page provided in the embodiments of the present disclosure first displays a first style at a first position in a configuration page in a case where the electronic device receives an identification input of a first XML style file, the first style being a style of a first functional element obtained by parsing the first XML style file; then the electronic device can configure the first functional element at the first position according to the first style and input first style data, the first style data including an indication of one of service data and style attribute data; finally, the electronic device can generate a page of an adaptation client according to the functional elements configured at each position in the configuration page. Since the configuration engine configures the XML style file of the functional element, and the configuration interface is used to display the page of the configured client, the electronic device can obtain the style of each functional element parsed according to each XML style file through the configuration engine, display the style of each functional element at the corresponding position in the configuration page, and configure the functional element related to the service at the corresponding position of the page to be developed by inputting the style data for each functional element. In the development process of the page, the page can be developed by visual configuration in the configuration page, and the developer no longer needs to write the code of the functional element to develop the page, so that the efficiency of page development can be improved, the page development time can be shortened, the productivity of page development can be improved, and the development of the page is more convenient.

[0052] Optionally, in the method for configuring a page provided in the embodiments of the present disclosure, S103 can be implemented through the following steps.

[0053] The electronic device obtains the style identifier of each functional element configured in the configuration page and the input style data, and then generates a page of an adaptation client in a case where each style identifier matches the style data.

[0054] It can be understood that the process of generating a page can be referred to as page rendering.

[0055] It should be noted that in the embodiments of the present disclosure, the page rendering method provided can be applied in the process of page rendering and generating a page after the configuration engine configures each functional element in the configuration page, or can be applied in the process of page rendering and generating a page before the client displays the page. Figure 5 Taking the case of displaying a page by a client as an example, the client pulls a development template, requests a server interface, then obtains service data, parses each style ID in the page and the version of the page, matches the styles, and generates a page in a case where each style and each style data are matched. If there is a case where the style and the style data are not matched, the style is reacquired and saved locally, and then the style and the style data are re-matched. Among them, Figure 5 The process in the dashed box in the middle is the process of page rendering in the embodiments of the present disclosure.

[0056] It should be noted that there is no priority between obtaining the business data and parsing the various style IDs in the page and the version of the page. The obtaining of the business data can also be performed after the various style IDs in the page and the version of the page are parsed.

[0057] It can be understood that one page can include M styles, M being a positive integer, and the page rendering process includes obtaining M styles and M style data of the page. If the M styles can all be matched to the style data, the page rendering is completed. If one of the styles cannot be matched to the style data during the rendering process, the style is reacquired from the server according to the style ID of the style data, and then the style is saved to the local and re-matched.

[0058] Based on the scheme, the styles and the style data of the page are configured in a configured manner, the page can be rendered according to the above page rendering manner, the rendering process is simpler and more convenient, and the rendering is faster.

[0059] Optionally, the first XML style file includes at least one of the following: XML data of the first functional element, a business field bound by the first functional element, a style attribute bound by the first functional element, and an event bound by the first functional element.

[0060] It can be understood that if the first XML style file does not include the data of the bound event, the first functional element is not bound to the event, and if the first XML style file includes the data of the bound event, the first functional element is bound to the event.

[0061] For example, one picture element can be bound to one jump event, and in the rendered page, the jump action can be performed through the user's click input on the picture.

[0062] Based on the scheme, since the first XML style file can include the configurable business field and the style attribute, the page with the business data and the style attribute meeting the business requirements can be quickly configured for different businesses according to different business forms. In the case where some functional elements in the page need to support events, the functional elements bound to the events can be quickly added in the page according to the elements bound to the events in advance, the flexibility is improved, and the page is configured more flexibly and conveniently.

[0063] Optionally, in the page configuration method provided by the embodiment of the disclosure, each functional element configured in the page is configured to correspond to one style identifier. The configuration engine of the electronic device can save the style identifier and the style data of each functional element configured in the configuration page.

[0064] Specifically, after the configuration of each functional element in the configuration page is completed, the electronic device can generate a first configuration file of the page of the client according to the functional elements configured at each position in the configuration page.

[0065] The first configuration file includes a style identifier of each functional element configured in the page of the client, style data of each functional element configured, position information of each functional element in the page, a development version, a development time, and the like.

[0066] Further, in the page configuration method provided in the embodiments of the present disclosure, the developer can also quickly modify the style data of the functional elements in the developed page, that is, after S103, the following steps can also be included:

[0067] First, in the case where the modified configuration file is the first configuration file, the electronic device displays the style identifiers of each functional element included in the first configuration file. Then, the electronic device modifies the style data of the first functional element corresponding to the first style identifier to second style data in response to the modification input. The electronic device displays the first functional element corresponding to the second style data at the first position in the configuration page. Finally, the electronic device can modify the page of the client according to the first functional element after the modification of the style data by the configuration engine.

[0068] For example, the developer can modify the first configuration file selected according to the identifier of the configuration file.

[0069] Optionally, the developer can select the first functional element at the first position in the configuration page or select the first functional element through the style identifier, and then modify the style data of the first functional element.

[0070] It can be understood that the first functional element after the modification of the style data can be displayed in the configuration page, which can facilitate the developer to quickly determine whether the modification meets the requirements.

[0071] Based on the scheme, after the development is completed, if the user needs to modify the style data in the page, such as changing the picture, changing the font, and changing the text content, the developer can quickly modify the style data of the functional elements in the page through the style identifiers of the functional elements in the configuration engine of the electronic device. In the case where the interface style is changed, the process of code development and online can be avoided.

[0072] Optionally, in the page configuration method provided in the embodiments of the present disclosure, before S101, the electronic device can display a list of XML style files in the configuration engine. The first XML style file is an XML style file selected from the list of XML style files.

[0073] In the embodiments of the present disclosure, the XML style file list includes XML style files corresponding to the functional elements in the functional element list. The functional element list includes block-level elements, loops, carousel pictures, pictures, texts, buttons, and custom elements.

[0074] It can be understood that a drag margin can be set between the XML style files, so that it can be distinguished which functional element is dragged by the developer, thereby facilitating the setting of the style attribute.

[0075] Based on the scheme, the developer can quickly find and download the used XML style file by configuring the XML style file list in the configuration engine.

[0076] Optionally, the method for configuring a page provided in the embodiments of the present disclosure can further add the XML style file of the functional element in the configuration engine.

[0077] First, the electronic device parses the second functional element into XML format data. Then, the electronic device binds target data to the XML format data corresponding to the second functional element to generate a second XML style file. The target data includes at least one of a business field, a style attribute, and an event. Finally, the electronic device adds the second XML style file to the XML style file list of the configuration engine.

[0078] The business field facilitates the developer to input specific business data in the page development process, and the style attribute facilitates the developer to fill in specific style attribute data according to the requirement. For example, the fields such as the product name and the product price in the product title can be referred to as business fields. In the process of page development, the developer can input the actual product name and the actual product price, thereby developing a page matching the business requirement. The event facilitates the developer to add a functional element that can perform an action in the development. Exemplarily, the event can be a jump, such as a page turning or opening a new website.

[0079] Specifically, the style data can include attributes used by the functional element when using CSS editing. For example, for the block-level element view, the width, height, layout, positioning, background color, gradient color, and self-alignment of the element can be bound on the view. For example, for the text in the line-level element, the text overflow, outer margin, inner margin, shadow, border, corner, and click event of the text can be bound on the text.

[0080] Exemplarily, Figure 6 A flowchart for converting a functional element into an XML style file is provided in the embodiments of the present disclosure. As shown in Figure 6As shown in the middle, the functional element can be first parsed into XML format data, and a real-time preview effect of the functional element can be previewed in the page. Then, mock data, style attributes, events, and the like can be bound for the XML format data. In the case of editing, the effect of the edited functional element can be previewed in real time. After the binding is completed, an XML style file can be generated.

[0081] Example 1: If it is required to display “How are you?” in a page, the developer currently needs to manually write the following code to implement the requirement by using code:

[0082] How are you?

[0083] The effect of the code rendered in the page is the text “How are you?”. Currently, if the code is used in three projects (or three interfaces), the developer needs to write or copy the code for three times. In the present disclosure, the code can be parsed into an XML style file and stored in the configuration engine. In the case where the developer needs to input the code in a position, the developer can drag the XML style file to the position to automatically add the text “How are you?”.

[0084] Example 2: If it is required to implement a box with a width and a height of 50 pixels (Picture Element, px) and a red background color in a page, the developer currently needs to manually write the following code to implement the requirement by using code:

[0085] <div style=“width:50px;height:50px;background:red;”

[0086] The effect of the code rendered in the page is a red box. If multiple boxes with different sizes and colors need to be implemented in the page, the developer needs to manually write multiple pieces of the above code with different parameters. In the embodiment of the present disclosure, the box, as a functional element, can be parsed into an XML style file, and style data such as the size and the color of the box can be bound and stored in the configuration engine. In the case where the box needs to be rendered in the page, the corresponding XML file can be dragged to the corresponding position in the configuration page, and the required style data can be input, so that the box can be quickly configured in the page.

[0087] Based on the scheme, the configuration engine can configure a functional element into an XML style file and store the XML style file in the configuration engine or a server. In the case where the functional element needs to be used in a developed page subsequently, the functional element can be directly configured in the page by using the XML style file, without the need to input code, so that the development is convenient and efficient.

[0088] Optionally, in the method for configuring a page provided by the embodiment of the disclosure, after S103, an XML style file of a functional element with style data can be added in the configuration engine by including the following steps.

[0089] Specifically, the electronic device can first parse the configured first functional element into a third XML style file, and then store the third XML style file in the XML style file list of the configuration engine based on the first style identifier. The first style identifier is the style identifier of the configured first functional element.

[0090] For example, the identifier of the third XML file in the XML style file list of the configuration engine is the first style identifier, which can be located in the drop-down list of the first functional element.

[0091] It can be understood that the developer can customize some commonly used functional elements with the same style data in the configuration engine.

[0092] It should be noted that the third style file can be uploaded to the server through the configuration engine, so that other developers can also quickly configure the first functional element with the corresponding first style data in the page through the first style identifier.

[0093] Based on this scheme, after the first functional element is configured with style data, the developer can configure a style identifier for the first functional element configured with style data, and then store the functional element with the configured style data in the configuration engine, so that the developer does not need to input the style data again in the subsequent development process if the functional element with the same style data is needed.

[0094] Optionally, in the method for configuring a page provided by the embodiment of the disclosure, after the third XML style file is stored in the XML style file list of the configuration engine, the developer can directly reuse the functional element corresponding to the style file in the configuration page through the configuration engine.

[0095] Specifically, in the case where the input style identifier is the first style identifier, the configured first functional element is obtained according to the third XML style file corresponding to the first style identifier; for example, the electronic device parses the third XML style file corresponding to the first style identifier to obtain the configured first functional element; then the electronic device can display the configured first functional element at a second position of the configuration page according to the input of the developer. It should be noted that the second position is any position selected by the developer.

[0096] Exemplarily, a first style identifier can be selected in a drop-down menu of an XML style file displayed by the configuration engine, and a second position is selected, and then the configuration engine in the electronic device can automatically acquire a third XML style file previously stored by the developer, automatically parse the third XML style file, and display the first functional element configured with the first style data at the second position.

[0097] Based on the scheme, the electronic device directly calls the first style identifier stored in the XML style file list in the configuration engine, so that the functional element with the style data can be quickly reused, the development time is reduced, and the development efficiency is improved.

[0098] It should be noted that the execution subject of the page configuration method provided by the embodiments of the present disclosure can be a page configuration apparatus, or a control module in the page configuration apparatus for executing the page configuration method. The embodiments of the present disclosure take the page configuration apparatus as an example to illustrate the page configuration apparatus provided by the embodiments of the present disclosure.

[0099] Figure 7 A page configuration apparatus is provided in the embodiments of the present disclosure. As shown in Figure 7 The page configuration apparatus 700 includes a display module 701, a configuration module 702, and a generation module 703, a first XML style file, the display module 701 is configured to display a first style at a first position of a configuration page when receiving an input of the first XML style file; the first XML style file is configured in a configuration engine; the configuration page is used for configuring a page of a client, and the first style is a style of a first functional element obtained by parsing the first XML style file; the configuration module 702 is configured to configure the first functional element at the first position according to the first style displayed by the display module 701 and first style data inputted by a user, and the first style data includes at least one of business data and style attribute data; and the generation module 703 is configured to generate a page adapted to the client according to the functional elements configured at each position of the configuration page.

[0100] Optionally, the generation module is further configured to generate a first configuration file of the page adapted to the client according to the functional elements configured at each position of the configuration page; and the first configuration file includes a style identifier of each functional element configured in the page of the client and style data of each functional element configured in the page of the client.

[0101] Optionally, the display module is further configured to display the style identifier of each functional element included in the first configuration file after the generation module generates the first configuration file of the page of the client, and in a case where the modified configuration file is the first configuration file; the configuration module is further configured to modify the style data of the first functional element corresponding to the first style identifier to second style data in response to the modification input; the display module is further configured to display the first functional element corresponding to the second style data at the first position in the configuration page; and the generation module is further configured to modify the page of the client according to the first functional element after the style data is modified.

[0102] Optionally, the first XML style file includes at least one of the following: XML format data of the first functional element, a business field bound by the first functional element, a style attribute bound by the first functional element, and an event bound by the first functional element.

[0103] Optionally, the display module is further configured to display a list of XML style files in the configuration engine before receiving the identification input of the first XML style file; the list of XML style files includes an XML style file corresponding to a functional element in a functional element list; the functional element list includes a block-level element, a loop, a carousel, a picture, a text, a button, and a custom element; and the first XML style file is an XML style file selected from the list of XML style files.

[0104] Optionally, the configuration apparatus of the page further includes a parsing module, a binding module, and an adding module; the parsing module is configured to parse the second functional element into XML format data before displaying the list of XML style files in the configuration engine; the binding module is configured to bind target data to the XML format data of the second functional element to generate a second XML style file; and the adding module is configured to add the second XML style file to the list of XML style files in the configuration engine; wherein the target data includes at least one of a business field, a style attribute, and an event.

[0105] Optionally, the configuration apparatus of the page further includes a storage module; the storage module is configured to store the third XML style file in the list of XML style files in the configuration engine based on the first style identifier; wherein the first style identifier is a style identifier of the configured first functional element.

[0106] Optionally, the configuration apparatus of the page further includes an obtaining module, which is further configured to obtain the configured first functional element according to the third XML style file corresponding to the first style identifier after the storage module stores the third XML style file in the list of XML style files in the configuration engine based on the first style identifier, in a case where the input style identifier is the first style identifier; and the display module is further configured to display the configured first functional element at the second position in the configuration page.

[0107] Optionally, the generating module is specifically configured to: acquire the style identifier of each functional element configured in the configuration page and the input style data; and generate the page adapted to the client in a case where each style identifier matches the style data.

[0108] The page configuration apparatus provided in the embodiments of the present disclosure can first display a first style at a first position in a configuration page in a case where an identification input of a first XML style file is received, the first style being a style of a first functional element obtained by parsing the first XML style file; then, the page configuration apparatus can configure the first functional element at the first position according to the first style and input first style data, the first style data including an indication of one of service data and style attribute data; finally, the page configuration apparatus can generate a page adapted to a client according to the functional elements configured at each position in the configuration page. Since the configuration engine configures the XML style file of the functional element, and the configuration interface is used to display the page of the configured client, the page configuration apparatus can acquire the styles of the functional elements parsed from each XML style file as needed through the configuration engine, and display the styles of the functional elements at the corresponding positions in the configuration page, and the functional elements related to the service can be configured at the corresponding positions in the page to be developed by inputting the style data for each functional element. In the development process of the page, the page can be developed by configuration, and the developer no longer needs to write the code of the functional element to develop the page, so that the efficiency of the page development can be improved, the development time of the page can be shortened, the productivity of the page development can be improved, and the development of the page is more convenient.

[0109] The page configuration apparatus in the embodiments of the present disclosure can be an apparatus, or a component, an integrated circuit or a chip in a terminal. The apparatus can be a mobile electronic device or a non-mobile electronic device. Exemplarily, the mobile electronic device can be a mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook or a personal digital assistant (PDA), etc., and the non-mobile electronic device can be a server, a network attached storage (NAS), a personal computer (PC), a television (TV), a teller machine or a self-service machine, etc., and the embodiments of the present disclosure are not limited in this regard.

[0110] The page configuration apparatus in the embodiments of the present disclosure can be an apparatus with an operating system. The operating system can be an Android operating system, an iOS operating system, or other possible operating systems, which are not limited in the embodiments of the present disclosure.

[0111] The page configuration apparatus provided in the embodiments of the present disclosure can realize Figures 1 to 6 The method embodiments realize various processes, which will not be repeated here to avoid repetition.

[0112] Optionally, as shown in Figure 8 The embodiments of the present disclosure also provide an electronic device 800, which includes a processor 801, a memory 802, a program or instruction stored in the memory 802 and executable on the processor 801. When the processor 801 executes the program or instruction, various processes of the above-mentioned page configuration method embodiments are realized, and the same technical effects are achieved. To avoid repetition, these will not be repeated here.

[0113] It should be noted that the electronic device in the embodiments of the present disclosure includes the mobile electronic device and the non-mobile electronic device described above.

[0114] Figure 9 To realize the hardware structure of an electronic device in the embodiments of the present disclosure.

[0115] The electronic device 900 includes but is not limited to a radio frequency unit 901, a network module 902, an audio output unit 903, an input unit 904, a sensor 905, a display unit 906, a user input unit 907, an interface unit 908, a memory 909, and a processor 910, etc.

[0116] Those skilled in the art can understand that the electronic device 900 can also include a power supply (such as a battery) for supplying power to various components. The power supply can be logically connected to the processor 910 through a power management system, so as to realize the functions of power management, such as charging, discharging, and power consumption management, through the power management system. Figure 9 The electronic device structure shown in the embodiments of the present disclosure does not constitute a limitation on the electronic device. The electronic device can include more or fewer components than those shown, or combine certain components, or arrange different components, which will not be repeated here.

[0117] The electronic device provided in the embodiments of the present disclosure can first display a first style at a first position in a configuration page, the first style being a style of a first function element obtained by parsing a first XML style file, in a case where an identification input of the first XML style file is received; then, the electronic device can configure the first function element at the first position according to the first style and input first style data, the first style data including an indication of one of service data and style attribute data; and finally, the electronic device can generate a page of an adaptation client according to the function elements configured at each position in the configuration page. Since the configuration engine configures the XML style file of the function element, and the configuration interface is used to display the page of the configured client, the electronic device can obtain the style of each function element parsed according to each XML style file through the configuration engine, display the style of each function element at the corresponding position in the configuration page, and configure the function element related to the service at the corresponding position of the page to be developed by inputting the style data of each function element. In the development process of the page, the page development is realized through configuration, and the developer no longer needs to write the code of the function element to realize the page development, so that the efficiency of the page development can be improved, the development time of the page can be shortened, the productivity of the page development can be improved, and the development of the page is more convenient.

[0118] It should be understood that, in the embodiments of the present disclosure, the input unit 904 can include a graphics processing unit (GPU) 941 and a microphone 942. The graphics processing unit 941 processes image data of a still picture or a video obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The display unit 906 can include a display panel 961, which can be configured in the form of a liquid crystal display, an organic light-emitting diode, and the like. The user input unit 907 includes a touch panel 971 and other input devices 972. The touch panel 971 is also called a touch screen. The touch panel 971 can include two parts of a touch detection device and a touch controller. The other input devices 972 can include, but are not limited to, a physical keyboard, function keys (such as volume control keys, on-off keys, and the like), a trackball, a mouse, a joystick, and the like, which are not described herein again. The memory 909 can be used to store software programs and various data, including but not limited to application programs and an operating system. The processor 910 can integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, the user interface, and the application programs, and the modem processor mainly processes wireless communication. It can be understood that the above-mentioned modem processor can also not be integrated into the processor 910.

[0119] The embodiment of the present disclosure further provides a readable storage medium, which stores a program or instructions, and the program or instructions are executed by a processor to realize each process of the page configuration method embodiment and achieve the same technical effects. To avoid repetition, details are not described herein.

[0120] The processor is the processor in the electronic device in the above embodiments. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0121] The embodiment of the present disclosure further provides a chip, which includes a processor and a communication interface. The communication interface is coupled with the processor. The processor is configured to run a program or instructions to realize each process of the page configuration method embodiment and achieve the same technical effects. To avoid repetition, details are not described herein.

[0122] It should be understood that the chip mentioned in the embodiment of the present disclosure can also be referred to as a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.

[0123] It should be noted that, in this document, the term "comprising" or "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such a process, method, article or device. Without more limitations, the element defined by the statement "comprising a" does not exclude the presence of additional identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the method and device in the embodiment of the present disclosure is not limited to the order of performing the functions as shown or discussed, but can also include performing the functions in a substantially simultaneous manner or in a reverse order, for example, the described method can be performed in an order different from that described, and various steps can also be added, omitted or combined. In addition, the features described with reference to certain examples can be combined in other examples.

[0124] Those skilled in the art can clearly understand the above-mentioned embodiment method can be realized by means of software and the necessary general hardware platform, of course, it can also be realized by hardware, but in many cases, the former is a better embodiment. Based on such understanding, the technical solutions of the present disclosure can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes a plurality of instructions for making a terminal (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) execute the method described in various embodiments of the present disclosure.

[0125] The embodiments of the present disclosure are described above in combination with the drawings, but the present disclosure is not limited to the specific embodiments described above, and the specific embodiments described above are only illustrative, not limiting, and those of ordinary skill in the art can make many forms without departing from the purpose of the present disclosure and the scope protected by the claims under the inspiration of the present disclosure, which all belong to the protection of the present disclosure.

Claims

1. A method of configuring a page, characterized by, The method comprises: In the case of receiving an identification input of a first extensible markup language (XML) style file, displaying a first style at a first position of a configuration page; the first XML style file is configured in a configuration engine, the configuration page is used for configuring a page of a client, the first style is a style of a first functional element obtained by parsing the first XML style file; the first XML style file comprises at least one of the following: XML format data of the first functional element, a business field bound by the first functional element, a style attribute bound by the first functional element, and an event bound by the first functional element; one style corresponds to a configuration component of one functional element in page development, the configuration component is a functional code template, the code template reserves fields of business data and style attribute data, and is bound with events; According to the first style and input first style data, configuring the first functional element at the first position, the first style data comprises at least one of business data and style attribute data; the business data comprises data associated with a business, and the style attribute data is specific parameter related data indicating a functional element style; According to the functional elements configured at each position in the configuration page, generating a page adapted to the client; The method further comprises: According to the functional elements configured at each position in the configuration page, generating a first configuration file of a page adapted to the client; The first configuration file comprises: a style identifier of each functional element configured in the page of the client and style data of each functional element configured; After generating the first configuration file of the page adapted to the client, the method further comprises: In the case that the modified configuration file is the first configuration file, displaying the style identifiers of the functional elements included in the first configuration file; In response to a modification input, modifying the style data of the first functional element corresponding to the first style identifier to second style data; In the first position in the configuration page, displaying the first functional element corresponding to the second style data; According to the first functional element after modifying the style data, modifying the page of the client.

2. The method of claim 1, wherein, The method further comprises: Before receiving an identification input of a first extensible markup language (XML) style file, displaying a list of XML style files in the configuration engine; The list of XML style files comprises XML style files corresponding to functional elements in a functional element list; the functional element list comprises: block-level elements, loops, carousel pictures, pictures, texts, buttons, and custom elements; the first XML style file is an XML style file selected from the list of XML style files.

3. The method of claim 2, wherein, Before displaying the list of XML style files in the configuration engine, the method further comprises: Parsing a second functional element into XML format data; Binding target data to the XML format data of the second functional element to generate a second XML style file; Adding the second XML style file to the list of XML style files; The target data includes at least one of a business field, a style attribute and an event.

4. The method of claim 2, wherein, After the first functional element is configured at the first position, the method further includes: parsing the configured first functional element into a third XML style file; storing the third XML style file in the XML style file list based on a first style identifier; The first style identifier is the style identifier of the configured first functional element.

5. The method of claim 4, wherein, After the third XML style file is stored in the XML style file list, the method further includes: In the case that the input style identifier is the first style identifier, the configured first functional element is obtained according to the third XML style file corresponding to the first style identifier; The configured first functional element is displayed at the second position of the configuration page.

6. The method of claim 1, wherein, Generating a page adapted to the client according to the functional elements configured at each position in the configuration page includes: obtaining the style identifier of each functional element configured in the configuration page and the input style data; In the case that each style identifier matches the style data, generating a page adapted to the client.

7. An apparatus for page configuration, characterized by The page configuration device includes a download module, a parsing module, a display module, a configuration module and a generation module. The display module is configured to display a first style at a first position of a configuration page in the case that an identifier of a first Extensible Markup Language (XML) style file is input, the first XML style file is configured in a configuration engine, the configuration page is used to configure a page of a client, and the first style is a style of a first functional element obtained by parsing the first XML style file; the first XML style file includes at least one of XML format data of the first functional element, a business field bound to the first functional element, a style attribute bound to the first functional element and an event bound to the first functional element; one style corresponds to a configuration component of one functional element in page development, the configuration component is a functional code template, fields of business data and style attribute data are reserved in the code template, and events are bound; The configuration module is configured to configure the first functional element at the first position according to the first style displayed by the display module and input first style data, the first style data includes at least one of business data and style attribute data; the business data includes data associated with a business, and the style attribute data is specific parameter related data indicating a style of a functional element; The generation module is configured to generate a page adapted to the client according to the functional elements configured at each position in the configuration page. The device is further configured to: generate a first configuration file of a page adapted to the client according to the functional elements configured at each position in the configuration page; The first configuration file includes a style identifier of each functional element configured in the page of the client and style data of each functional element configured. After the first configuration file of the page adapted to the client is generated, the apparatus is further configured to: in the case that the modified configuration file is the first configuration file, display the style identifier of each functional element included in the first configuration file; in response to the modification input, modify the style data of the first functional element corresponding to the first style identifier to second style data; in the first position in the configuration page, display the first functional element corresponding to the second style data; modify the page of the client according to the first functional element after the modification of the style data.

8. An electronic device, comprising: comprise a processor, a memory, and a program or instructions stored on the memory and executable on the processor, and the program or instructions are executed by the processor to implement the steps of the page configuration method according to any one of claims 1 to 6.

9. A readable storage medium, characterized by, the program or instructions stored on the readable storage medium are executed by the processor to implement the steps of the page configuration method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Webpage generation method and device and electronic equipment

    CN112507273A