Configuration method and device, and component rendering method, device and system

CN113760269BActive Publication Date: 2025-03-18BEIJING WODONG TIANJUN INFORMATION TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202010693704.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-07-17
Publication Date
2025-03-18
Estimated Expiration
2040-07-17

AI Technical Summary

Technical Problem

The prior art requires updating stored general view templates when updating component content, resulting in cumbersome methods and high consumption of server resources.

Method used

By receiving the client's interface request, view data is dynamically obtained, including component identification, layout attributes, layout attribute values ​​and content attributes, and configure the value of content attributes based on the configuration data, and generate the configured view data and feed it back to the client.

Benefits of technology

It realizes dynamic configuration of component content, reduces resource consumption, does not need to update stored universal view templates, and improves component rendering efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113760269B_ABST
    Figure CN113760269B_ABST
Patent Text Reader

Abstract

The present invention discloses a configuration method and device as well as a component rendering method, device and system, and relates to the field of computer technology. A specific implementation of the method includes: receiving an interface request sent by a client; obtaining view data from a configuration end according to the interface request; wherein the view data includes: a first component identifier, a layout attribute corresponding to the first component identifier, a value of the layout attribute and a content attribute corresponding to the first component identifier; configuring the value of the content attribute to obtain the configured view data; and feeding back the configured view data to the client. This implementation can dynamically configure the content of a component while reducing resource consumption.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a configuration method and device, and a component rendering method, device and system. Background Art

[0002] In order to attract users' attention and improve their experience, the layout of components on the page and the content displayed by the components need to be updated regularly.

[0003] In the existing method, the server stores the universal view template corresponding to the template identifier, and feeds back the corresponding universal view template to the client according to the template identifier carried in the request sent by the client.

[0004] However, if the content of the component is updated, the stored universal view template needs to be updated to meet the needs of the client. Therefore, this method is relatively cumbersome, and storing the universal view template consumes a lot of resources on the server side. Summary of the invention

[0005] In view of this, embodiments of the present invention provide a configuration method and device, as well as a component rendering method, device and system, which can dynamically configure the content of a component while reducing resource consumption.

[0006] In a first aspect, an embodiment of the present invention provides a configuration method, including:

[0007] Receive the interface request sent by the client;

[0008] According to the interface request, obtaining view data from the configuration end; wherein the view data includes: a first component identifier, a layout attribute corresponding to the first component identifier, a value of the layout attribute, and a content attribute corresponding to the first component identifier;

[0009] Configure the value of the content attribute to obtain the configured view data;

[0010] Feedback the configured view data to the client. In a second aspect, an embodiment of the present invention provides a configuration method, including:

[0011] Determining a number of content attributes based on the configuration data;

[0012] determining a first component identifier;

[0013] Determine a layout attribute corresponding to the first component identifier and a value of the layout attribute;

[0014] displaying the plurality of content attributes;

[0015] In response to a first configuration instruction of the page, determining a content attribute corresponding to the first component identifier;

[0016] View data is generated according to the first component identifier, the layout attribute, the value of the layout attribute, and the content attribute.

[0017] Preferably,

[0018] Determining several content attributes according to the configuration data includes:

[0019] Determine whether the configuration data satisfies the JSON (JavaScript Object Notation) data format. If so, parse the configuration data to obtain data in a Map structure; wherein the key value in the data in the Map structure is the content attribute.

[0020] Preferably,

[0021] The determining the first component identifier includes:

[0022] displaying a plurality of second component logos;

[0023] In response to a second configuration instruction of the page, the first component identifier is determined among the plurality of second component identifiers.

[0024] Preferably,

[0025] The method further includes:

[0026] Acquire a first component according to the first component identifier;

[0027] Displaying the first component in the effect display area according to the layout attribute and its value;

[0028] Determine the size of the effect display area;

[0029] The generating view data according to the first component identifier, the layout attribute, the value of the layout attribute and the content attribute comprises:

[0030] View data is generated according to the first component identifier, the size of the effect display area, the layout attributes, the values ​​of the layout attributes, and the content attributes.

[0031] In a third aspect, an embodiment of the present invention provides a component rendering method, including:

[0032] Send an interface request to the server;

[0033] receiving the configured view data fed back by the server in response to the interface request; wherein the configured view data includes: a first component identifier, a layout attribute corresponding to the first component identifier, a value of the layout attribute, a content attribute corresponding to the first component identifier, and a value of the content attribute;

[0034] Acquire a first component according to the first component identifier;

[0035] The first component is rendered according to the layout attribute, the value of the layout attribute, the content attribute, and the value of the content attribute.

[0036] Preferably,

[0037] The acquiring the first component according to the first component identifier includes:

[0038] The first component is obtained from the components of React Native according to the first component identifier.

[0039] Preferably,

[0040] The rendering of the first component according to the layout attribute, the value of the layout attribute, the content attribute, and the value of the content attribute includes:

[0041] Rendering the first component according to the content attribute and the value of the content attribute;

[0042] The rendered first component is laid out according to the layout attributes and the values ​​of the layout attributes.

[0043] Preferably,

[0044] The configured view data further includes: the size of the effect display area;

[0045] The step of laying out the rendered first component according to the layout attribute and the value of the layout attribute includes:

[0046] Determine the adjustment ratio based on the size of the effect display area and the size of the display screen;

[0047] The rendered first component is laid out according to the adjustment ratio, the layout attribute, and the value of the layout attribute.

[0048] Preferably,

[0049] The method further includes:

[0050] Create pure components with React Native;

[0051] The acquiring the first component according to the first component identifier includes:

[0052] Acquire a first component according to the pure component and the first component identifier;

[0053] The rendering of the first component according to the layout attribute, the value of the layout attribute, the content attribute, and the value of the content attribute includes:

[0054] The first component is rendered according to the pure component, the layout attribute, the value of the layout attribute, the content attribute, and the value of the content attribute.

[0055] In a fourth aspect, an embodiment of the present invention provides a server, including:

[0056] A receiving module, configured to receive an interface request sent by a client;

[0057] an acquisition module, configured to acquire view data from a configuration end according to the interface request; wherein the view data includes: a first component identifier, a layout attribute corresponding to the first component identifier, a value of the layout attribute, and a content attribute corresponding to the first component identifier;

[0058] A configuration module configured to configure the value of the content attribute to obtain configured view data;

[0059] The sending module is configured to feed back the configured view data to the client.

[0060] In a fifth aspect, an embodiment of the present invention provides a configuration terminal, including:

[0061] A layout determination module is configured to determine a number of content attributes according to the configuration data; determine a first component identifier; determine a layout attribute corresponding to the first component identifier and its value;

[0062] A display module, configured to display the plurality of content attributes;

[0063] A content determination module configured to determine a content attribute corresponding to the first component identifier in response to the first configuration instruction of the page;

[0064] The generating module is configured to generate view data according to the first component identifier, the layout attribute, the value of the layout attribute and the content attribute.

[0065] In a sixth aspect, an embodiment of the present invention provides a client, including:

[0066] A sending module, configured to send an interface request to the server;

[0067] a receiving module configured to receive the configured view data fed back by the server in response to the interface request; wherein the configured view data includes: a first component identifier, a layout attribute corresponding to the first component identifier, a value of the layout attribute, and a content attribute corresponding to the first component identifier and a value of the content attribute;

[0068] An acquisition module, configured to acquire a first component according to the first component identifier;

[0069] A rendering module is configured to render the first component according to the layout attribute, the value of the layout attribute, the content attribute and the value of the content attribute.

[0070] In a seventh aspect, an embodiment of the present invention provides a component rendering system, comprising: a server as described in any one of the above embodiments, a configuration end as described in any one of the above embodiments, and a client as described in any one of the above embodiments.

[0071] In an eighth aspect, an embodiment of the present invention provides an electronic device, including:

[0072] one or more processors;

[0073] a storage device for storing one or more programs,

[0074] When the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any of the above embodiments.

[0075] In a ninth aspect, an embodiment of the present invention provides a computer-readable medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the method described in any of the above embodiments.

[0076] An embodiment of the above invention has the following advantages or beneficial effects: the value of the content attribute in the view data can be configured, and if the content of the component needs to be updated, the value of the configured content attribute can be changed, without changing the stored general view template as in the prior art. In addition, the method does not require the server to store a large number of general view templates, which can reduce the consumption of server resources.

[0077] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with specific implementation examples. BRIEF DESCRIPTION OF THE DRAWINGS

[0078] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention.

[0079] Figure 1 is a flow chart of a configuration method applied to a server provided by an embodiment of the present invention;

[0080] Figure 2 is a flow chart of a configuration method applied to a configuration terminal provided by an embodiment of the present invention;

[0081] Figure 3is a flowchart of a component rendering method provided by an embodiment of the present invention;

[0082] Figure 4 is a flowchart of a component rendering method provided by another embodiment of the present invention;

[0083] Figure 5 is a schematic diagram of a server provided by an embodiment of the present invention;

[0084] Figure 6 is a schematic diagram of a configuration terminal provided by an embodiment of the present invention;

[0085] Figure 7 is a schematic diagram of a client provided by an embodiment of the present invention;

[0086] Figure 8 is an exemplary system architecture diagram to which embodiments of the present invention may be applied;

[0087] Fig. 9 It is a schematic diagram of the structure of a computer system of a terminal device or a server suitable for implementing an embodiment of the present invention. DETAILED DESCRIPTION

[0088] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and conciseness, the description of well-known functions and structures is omitted in the following description.

[0089] like Figure 1 As shown, an embodiment of the present invention provides a configuration method, including:

[0090] Step 101: Receive an interface request sent by a client.

[0091] This method can be applied to the configuration end, which generates view data through configuration. Both the client and the configuration end can be installed in devices such as mobile phones and computers. In actual application scenarios, the configuration end is provided to merchants, and the client is provided to consumers. Merchants can determine the page layout through the configuration end, and consumers can browse or click on the page. Merchants can attract consumers by adjusting the page layout.

[0092] Step 102: Obtain view data from the configuration end according to the interface request; wherein the view data includes: a first component identifier, a layout attribute corresponding to the first component identifier and its value, and a content attribute corresponding to the first component identifier.

[0093] If the configuration end includes only one view data, the interface request may not include the identifier of the view data. If the configuration end includes multiple view data and is distinguished by the identifier of the view data, the interface request may include the identifier of the requested view data.

[0094] The component identifier (first component identifier and second component identifier) ​​can be information such as the number and name of the component, such as Text, Image, etc. The layout attributes include layout information such as the width of the component, the height of the component, the spacing between the component and the upper component, and the spacing between the component and the right component. For example, the width of Text is 1 and the height of the component is 2.

[0095] In the embodiment of the present invention, the value of the content attribute of the component is variable, that is, configurable.

[0096] The view data may include multiple component identifiers, and the processing process for each component identifier is the same. Therefore, the view data may be used to configure the content of only one component in the page, or may be used to configure the content of multiple components in the page.

[0097] Step 103: Configure the value of the content attribute to obtain the configured view data.

[0098] The configuration end can store content attributes and their values ​​in the form of key-value pairs, where the content attribute is the key and its value is the value. The configuration end can determine the corresponding value according to the content attribute key in the view data.

[0099] Step 104: Feedback the configured view data to the client.

[0100] The client can render the component according to the configured view data.

[0101] The embodiment of the present invention can configure the value of the content attribute in the view data. If the content of the component needs to be updated, the value of the configured content attribute can be changed without changing the stored general view template as in the prior art. In addition, the method does not require the server to store a large number of general view templates, which can reduce the consumption of server resources.

[0102] In one embodiment of the present invention, the view data also includes: the size of the effect display area; for example, the width and height of the effect display area.

[0103] The configuration end can display the components in the effect display area according to the layout attributes and values ​​of the components, so that the display effect of the components meets the needs of the configuration personnel. The embodiment of the present invention provides the size of the effect display area to the client, so that the client adjusts the layout of the components according to the size of the effect display area, and then adapts the layout of the components to the size of the display screen. The display screen can be the screen size of the terminal device where the client is located. The embodiment of the present invention can make the display effect of the components consistent under different screen sizes.

[0104] In this embodiment of the present invention, the view data includes:

[0105]

[0106]

[0107] Among them, "width:750" is the width of the effect display area and its value, and "height:2500" is the height of the effect display area and its value. The view data includes two components, one component is named picture, and the other component is named text. "width:20", "height:30", "left:10" and "top:14" are the layout attributes and values ​​of the picture component. The content attribute of the picture component is imgUrl. "width:40", "height:20", "left:20" and "top:14" are the layout attributes and values ​​of the text component. The content attribute of the text component is txtContent, among which data.imgUrl and data.text are used to indicate the hierarchy of the content.

[0108] The server can configure the content attributes in the above view data. The configured view data includes:

[0109]

[0110]

[0111] Among them, "aaaaa" and "bbbbb" are the values ​​of the content attributes configured by the server for the image component and the text component.

[0112] like Figure 2 As shown, an embodiment of the present invention provides a configuration method, including:

[0113] Step 201: Determine a number of content attributes according to configuration data.

[0114] This method is applied to the configuration end. In order to ensure that the content attributes in the view data have corresponding values ​​in the server end, the configuration data can be uploaded by the server end or obtained by the configuration end from the server end. In the embodiment of the present invention, multiple content attributes and their values, and multiple key-value pairs may be obtained through the configuration data. However, the embodiment of the present invention only focuses on the content attributes in the configuration data, and the values ​​of the content attributes are configured by the server end.

[0115] Step 202: Determine a first component identifier.

[0116] The configuration end can configure the components displayed on the page. The number of the first component identifiers can be one or more. The processing for each component identifier is the same, so only one component identifier is used as an example for explanation.

[0117] Step 203: Determine the layout attribute corresponding to the first component identifier and its value.

[0118] In the embodiment of the present invention, the configuration personnel may input the layout attribute and its value, and the configuration terminal may also display several layout attributes and their values, so that the configuration personnel may select the layout attribute and its value corresponding to the first component identifier.

[0119] Step 204: Display several content attributes.

[0120] The displayed content attributes are the content attributes whose values ​​can be configured by the server.

[0121] Step 205: In response to the first configuration instruction of the page, determine the content attribute corresponding to the first component identifier.

[0122] When the page receives an operation such as a click or a slide, the page may generate a first configuration instruction, and the configuration personnel may select a content attribute corresponding to the first component identifier from a plurality of content attributes through operations such as a click or a slide.

[0123] Step 206: Generate view data according to the first component identifier, layout attributes and their values, and content attributes.

[0124] The configuration personnel can configure the components to be displayed in the page, the layout of the components, etc. based on the embodiment of the present invention to improve the user experience. The embodiment of the present invention determines the layout of the components through the configuration end, but does not limit the content displayed by the components. Through the view data provided by the configuration end, the server end can realize dynamic configuration of the component content to meet the different display requirements of the configuration personnel.

[0125] In one embodiment of the present invention, several content attributes are determined based on the configuration data, including:

[0126] Determine whether the configuration data meets the JSON data format. If yes, parse the configuration data to obtain data of a Map structure, wherein the key value in the data of the Map structure is a content attribute.

[0127] Considering the validity of the configuration data, before determining the content attributes, it is first determined whether the configuration data meets the JSON data format. If so, it means that the configuration data is valid and can be parsed. The embodiments of the present invention can filter out invalid configuration data to avoid wasting server resources.

[0128] The first component identifier may be input by a configuration personnel. However, considering that the input is less convenient and the input first component identifier may not be supported by the configuration end, in one embodiment of the present invention, determining the first component identifier includes:

[0129] displaying a plurality of second component logos;

[0130] In response to a second configuration instruction of the page, a first component identifier is determined among several second component identifiers.

[0131] The second configuration instruction of the page is similar to the first configuration instruction of the page, and the page may generate the second configuration instruction when the page receives an operation such as a click or a slide. The configuration personnel may select one or more component identifiers from the displayed multiple second component identifiers as the first component identifier.

[0132] In one embodiment of the present invention, the method further comprises:

[0133] According to the first component identifier, obtain the first component;

[0134] According to the layout attributes and their values, the first component is displayed in the effect display area;

[0135] Determine the size of the effect display area;

[0136] Generate view data according to the first component identifier, the layout attribute and its value, and the content attribute, including:

[0137] View data is generated according to the first component identifier, the size of the effect display area, layout attributes and their values, and content attributes.

[0138] The configuration end can pre-store components corresponding to component identifiers, and through the first component identifier, the first component can be obtained from multiple components. In actual application scenarios, after obtaining the first component, the first component can be displayed in the effect display area according to the preset layout attributes and their values, and then the first component displayed in the effect display area can be adjusted according to the layout attributes and their values ​​determined later. It can also be determined after the configuration personnel determine the layout attributes and their values ​​corresponding to the first component identifier, and then display the first component in the effect display area.

[0139] The configuration personnel can view the display effect of the component through the effect display area, and adjust the layout attributes and values ​​corresponding to the first component identifier based on the display effect.

[0140] At the same time, the size of the effect display area can be provided to the client via the server, and the client can adapt the display of the component to various screen sizes based on the size of the effect display area.

[0141] In one embodiment of the present invention, the method further comprises:

[0142] If a reset instruction is received, the configuration data and view data are deleted.

[0143] Configuration data and view data that are no longer used can be deleted, which can reduce resource usage and facilitate the configuration personnel to perform the next configuration. In actual application scenarios, a reset button can be displayed to the configuration personnel, and the configuration personnel can click the reset button to trigger the configuration end to delete the corresponding data.

[0144] like Figure 3 As shown, an embodiment of the present invention provides a component rendering method, including:

[0145] Step 301: Send an interface request to the server.

[0146] Step 302: receiving the configured view data fed back by the server in response to the interface request; wherein the configured view data includes: a first component identifier, layout attributes corresponding to the first component identifier and their values, and content attributes corresponding to the first component identifier and their values.

[0147] Step 303: Obtain the first component according to the first component identifier.

[0148] Step 304: Render the first component according to the layout attributes and their values ​​and the content attributes and their values.

[0149] In the embodiment of the present invention, if the content of the component changes, the server can simply change the value of the configured content attribute without changing the stored general view template as in the prior art. Based on this, the server can feedback the configured view data to the client more quickly, thereby improving the rendering efficiency of the client.

[0150] In one embodiment of the present invention, obtaining the first component according to the first component identifier includes:

[0151] Get the first component from the React Native components according to the first component identifier.

[0152] Since the React Native framework provides a component library including a large number of components, the embodiment of the present invention can obtain the first component based on React Native to speed up the rendering efficiency of the component. In other application scenarios, Flutter can also be used instead of React Native to implement the method provided by the embodiment of the present invention.

[0153] In one embodiment of the present invention, rendering the first component according to the layout attributes and their values ​​and the content attributes and their values ​​includes:

[0154] Render the first component based on the content attribute and its value;

[0155] Lay out the first component after rendering according to the layout properties and their values.

[0156] In actual application scenarios, the first component may be laid out first, and then the laid out first component may be rendered.

[0157] Considering that different screen sizes may lead to inconsistent display effects of components on different terminal devices, in one embodiment of the present invention, the configured view data further includes: the size of the effect display area;

[0158] According to the layout attributes and their values, the first component after rendering is laid out, including:

[0159] Determine the adjustment ratio based on the size of the effect display area and the size of the display screen;

[0160] Lay out the first component after rendering according to the adjustment scale and layout properties and their values.

[0161] The embodiments of the present invention can enable components to adapt to different screens according to adjustment ratios, thereby achieving the same display effect on different screens.

[0162] In one embodiment of the present invention, the method further comprises:

[0163] Create pure components with React Native;

[0164] Acquiring the first component according to the first component identifier includes:

[0165] According to the pure component and the first component identifier, obtain the first component;

[0166] Rendering the first component according to the layout attributes and their values ​​and the content attributes and their values ​​includes:

[0167] Renders the first component based on the pure component, the layout properties and their values, and the content properties and their values.

[0168] In the embodiment of the present invention, both the layout and rendering processes are implemented through pure components, which can ensure the performance of the client.

[0169] like Figure 4 As shown, the embodiment of the present invention takes the component rendering system composed of the configuration end, the server end and the client end as an example to explain the component rendering method in detail, and the method includes:

[0170] Step 401: The configuration end determines several content attributes according to the configuration data.

[0171] Step 402: The configuration terminal displays a plurality of second component identifiers.

[0172] Step 403: The configuration end determines the first component identifier among the plurality of second component identifiers in response to the second configuration instruction of the page.

[0173] Step 404: The configuration end determines the layout attribute corresponding to the first component identifier and its value.

[0174] Step 405: The configuration terminal displays several content attributes.

[0175] Step 406: The configuration end determines the content attribute corresponding to the first component identifier in response to the first configuration instruction of the page.

[0176] Step 407: The configuration end determines the size of the effect display area.

[0177] Step 408: The configuration end generates view data according to the first component identifier, the size of the effect display area, layout attributes and their values, and content attributes.

[0178] Step 409: The client sends an interface request to the server.

[0179] Step 410: The server obtains view data from the configuration end according to the interface request.

[0180] The view data includes: the first component identifier, the size of the effect display area, the layout attribute corresponding to the first component identifier and its value, and the content attribute corresponding to the first component identifier.

[0181] Step 411: The server configures the value of the content attribute and obtains the configured view data.

[0182] Step 412: The server feeds back the configured view data to the client.

[0183] The configured view data includes: the first component identifier, the layout attribute corresponding to the first component identifier and its value, and the content attribute corresponding to the first component identifier and its value.

[0184] Step 413: The client obtains the first component according to the first component identifier.

[0185] If the configured view data is not in JSON format, the client converts the configured view data into JSON format.

[0186] Step 414: The client renders the first component according to the layout attributes and their values ​​and the content attributes and their values.

[0187] In the embodiment of the present invention, the configuration personnel can configure the components displayed on the page through the configuration end according to their own needs. For components with variable content, the server can configure them according to the corresponding key values, and the client can render the components based on the view data configured by the server. The configuration personnel can update the displayed components and their layout in a timely manner through the configuration end to provide a better experience for the client user. If the content displayed by the component needs to be updated, the value of the content attribute can be adjusted through the server without re-editing the general view template, thereby improving the efficiency of component rendering.

[0188] like Figure 5 As shown, an embodiment of the present invention provides a server, including:

[0189] The receiving module 501 is configured to receive an interface request sent by a client;

[0190] The acquisition module 502 is configured to acquire view data from the configuration end according to the interface request; wherein the view data includes: a first component identifier, a layout attribute corresponding to the first component identifier and its value, and a content attribute corresponding to the first component identifier;

[0191] Configuration module 503, configured to configure the value of the content attribute, and obtain the configured view data;

[0192] The sending module 504 is configured to feed back the configured view data to the client.

[0193] In one embodiment of the present invention, the view data further includes: the size of the effect display area.

[0194] like Figure 6 As shown, an embodiment of the present invention provides a configuration terminal, including:

[0195] The layout determination module 601 is configured to determine a number of content attributes according to the configuration data; determine a first component identifier; determine a layout attribute corresponding to the first component identifier and its value;

[0196] A display module 602 configured to display a number of content attributes;

[0197] The content determination module 603 is configured to determine a content attribute corresponding to the first component identifier in response to a first configuration instruction of the page;

[0198] The generating module 604 is configured to generate view data according to the first component identifier, the layout attributes and their values, and the content attributes.

[0199] In one embodiment of the present invention, the layout determination module 601 is configured to determine whether the configuration data satisfies the JSON data format, and if so, parse the configuration data to obtain data of a Map structure; wherein the key value in the data of the Map structure is a content attribute.

[0200] In one embodiment of the present invention, the layout determination module 601 is configured to display a plurality of second component identifiers; and determine a first component identifier among the plurality of second component identifiers in response to a second configuration instruction of the page.

[0201] In one embodiment of the present invention, the layout determination module 601 is configured to obtain the first component according to the first component identifier; determine the size of the effect display area; the display module 602 is configured to display the first component in the effect display area according to the layout attributes and their values; the generation module 604 is configured to generate view data according to the first component identifier, the size of the effect display area, the layout attributes and their values, and the content attributes.

[0202] In one embodiment of the present invention, the configuration end further includes: a deletion module; the deletion module is configured to delete the configuration data and the view data if a reset instruction is received.

[0203] like Figure 7 As shown, an embodiment of the present invention provides a client, including:

[0204] The sending module 701 is configured to send an interface request to the server;

[0205] The receiving module 702 is configured to receive the configured view data fed back by the server in response to the interface request; wherein the configured view data includes: the first component identifier, the layout attribute corresponding to the first component identifier and its value, and the content attribute corresponding to the first component identifier and its value;

[0206] The acquisition module 703 is configured to acquire the first component according to the first component identifier;

[0207] The rendering module 704 is configured to render the first component according to the layout attributes and their values ​​and the content attributes and their values.

[0208] In one embodiment of the present invention, the acquisition module 703 is configured to acquire the first component from the components of ReactNative according to the first component identifier.

[0209] In one embodiment of the present invention, the rendering module 704 is configured to render the first component according to the content attributes and their values; and to layout the rendered first component according to the layout attributes and their values.

[0210] In one embodiment of the present invention, the configured view data further includes: the size of the effect display area; a rendering module 704, configured to determine the adjustment ratio according to the size of the effect display area and the size of the display screen; and layout the rendered first component according to the adjustment ratio and layout attributes and their values.

[0211] In one embodiment of the present invention, the acquisition module 703 is configured to create a pure component through React Native; obtain the first component according to the pure component and the first component identifier; the rendering module 704 is configured to render the first component according to the pure component, layout attributes and their values, and content attributes and their values.

[0212] An embodiment of the present invention provides an electronic device, including:

[0213] one or more processors;

[0214] a storage device for storing one or more programs,

[0215] When one or more programs are executed by one or more processors, the one or more processors implement the method of any of the above embodiments.

[0216] Figure 8 An exemplary system architecture 800 to which the configuration method or server of the embodiment of the present invention can be applied is shown.

[0217] like Figure 8 As shown, system architecture 800 may include terminal devices 801, 802, 803, a network 804, and a server 805. Network 804 is used to provide a medium for communication links between terminal devices 801, 802, 803 and server 805. Network 804 may include various connection types, such as wired, wireless communication links, or optical fiber cables, etc.

[0218] Users can use terminal devices 801, 802, and 803 to interact with server 805 through network 804 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 801, 802, and 803, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only examples).

[0219] The terminal devices 801 , 802 , and 803 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and the like.

[0220] The server 805 may be a server that provides various services, such as a backend management server (only an example) that provides support for shopping websites browsed by users using the terminal devices 801, 802, and 803. The backend management server may analyze and process the received data such as product information query requests, and feed back the processing results (such as target push information, product information - only an example) to the terminal device.

[0221] It should be noted that the configuration method provided in the embodiment of the present invention is generally executed by the server 805 , and accordingly, the service end is generally set in the server 805 .

[0222] It should be understood that Figure 8 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.

[0223] Reference below Fig. 9 , which shows a schematic diagram of the structure of a computer system 900 of a terminal device suitable for implementing an embodiment of the present invention. Fig. 9 The terminal device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0224] like Fig. 9 As shown, the computer system 900 includes a central processing unit (CPU) 901, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 902 or a program loaded from a storage part 908 into a random access memory (RAM) 903. In the RAM 903, various programs and data required for the operation of the system 900 are also stored. The CPU 901, the ROM 902, and the RAM 903 are connected to each other via a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904.

[0225] The following components are connected to the I / O interface 905: an input section 906 including a keyboard, a mouse, etc.; an output section 907 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 908 including a hard disk, etc.; and a communication section 909 including a network interface card such as a LAN card, a modem, etc. The communication section 909 performs communication processing via a network such as the Internet. A drive 910 is also connected to the I / O interface 905 as needed. A removable medium 911, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 910 as needed, so that a computer program read therefrom is installed into the storage section 908 as needed.

[0226] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 909, and / or installed from the removable medium 911. When the computer program is executed by the central processing unit (CPU) 901, the above-mentioned functions defined in the system of the present invention are executed.

[0227] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0228] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0229] The modules involved in the embodiments of the present invention may be implemented in software or hardware. The modules described may also be set in a processor. For example, they may be described as: a processor includes a sending module, an acquisition module, a determination module, and a first processing module. The names of these modules do not, in some cases, constitute limitations on the modules themselves. For example, the sending module may also be described as a "module for sending a picture acquisition request to the connected server."

[0230] As another aspect, the present invention further provides a computer-readable medium, which may be included in the device described in the above embodiment; or may exist independently without being assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device includes:

[0231] Receive the interface request sent by the client;

[0232] According to the interface request, obtaining view data from the configuration end; wherein the view data includes: a first component identifier, a layout attribute corresponding to the first component identifier and its value, and a content attribute corresponding to the first component identifier;

[0233] configuring the value of the content attribute;

[0234] The configured view data is fed back to the client.

[0235] According to the technical solution of the embodiment of the present invention, the value of the content attribute in the view data can be configured. If the content of the component needs to be updated, the value of the configured content attribute can be changed without changing the stored general view template as in the prior art. In addition, the method does not require the server to store a large number of general view templates, which can reduce the consumption of server resources.

[0236] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A configuration method, characterized in that: Applied to the server, including: Receive the interface request sent by the client; According to the interface request, obtaining view data from the configuration end; wherein the view data includes: a first component identifier, a layout attribute corresponding to the first component identifier, a value of the layout attribute, and a content attribute corresponding to the first component identifier; Configure the value of the content attribute to obtain the configured view data; The configured view data is fed back to the client, so that the client renders the first component corresponding to the first component identifier.

2. A configuration method, characterized in that: Applied to the configuration end, including: Determining a number of content attributes according to configuration data, wherein the configuration data is uploaded by the server or obtained by the configuration terminal from the server; determining a first component identifier; Determine a layout attribute corresponding to the first component identifier and a value of the layout attribute; displaying the plurality of content attributes; In response to a first configuration instruction of the page, determining a content attribute corresponding to the first component identifier; Generate view data according to the first component identifier, the layout attributes, the values ​​of the layout attributes and the content attributes, provide the view data to a server, enable the server to configure the values ​​of the content attributes for the view data, and enable the server to send the configured view data to a client, so that the client renders the component.

3. The method according to claim 2, characterized in that Determining several content attributes according to the configuration data includes: Determine whether the configuration data satisfies the JS object notation JSON data format. If yes, parse the configuration data to obtain data of a Map structure; wherein the key value in the data of the Map structure is the content attribute.

4. The method according to claim 2, characterized in that The determining the first component identifier includes: displaying a plurality of second component logos; In response to a second configuration instruction of the page, the first component identifier is determined among the plurality of second component identifiers.

5. The method according to claim 2, characterized in that Further including: Acquire a first component according to the first component identifier; Displaying the first component in the effect display area according to the layout attribute and its value; Determine the size of the effect display area; The generating view data according to the first component identifier, the layout attribute, the value of the layout attribute and the content attribute comprises: View data is generated according to the first component identifier, the size of the effect display area, the layout attributes, the values ​​of the layout attributes, and the content attributes.

6. A component rendering method, characterized in that: Applied to the client, including: Send an interface request to the server; Receive the configured view data fed back by the server in response to the interface request; wherein the configured view data includes: a first component identifier, a layout attribute corresponding to the first component identifier, a value of the layout attribute, a content attribute corresponding to the first component identifier, and a value of the content attribute, wherein the first component identifier, the layout attribute corresponding to the first component identifier, the value of the layout attribute, and the content attribute corresponding to the first component identifier are derived from the view data obtained by the server from the configuration end, and the value of the content attribute is derived from the configuration of the content attribute by the server; Acquire a first component according to the first component identifier; The first component is rendered according to the layout attribute, the value of the layout attribute, the content attribute, and the value of the content attribute.

7. The method according to claim 6, characterized in that The acquiring the first component according to the first component identifier includes: The first component is obtained from the components of React Native according to the first component identifier.

8. The method according to claim 6, characterized in that The rendering of the first component according to the layout attribute, the value of the layout attribute, the content attribute, and the value of the content attribute includes: Rendering the first component according to the content attribute and the value of the content attribute; The rendered first component is laid out according to the layout attributes and the values ​​of the layout attributes.

9. The method according to claim 8, characterized in that The configured view data further includes: the size of the effect display area; The step of laying out the rendered first component according to the layout attribute and the value of the layout attribute includes: Determine the adjustment ratio based on the size of the effect display area and the size of the display screen; The rendered first component is laid out according to the adjustment ratio, the layout attribute, and the value of the layout attribute.

10. The method according to any one of claims 6 to 9, characterized in that: Further including: Create pure components with React Native; The acquiring the first component according to the first component identifier includes: Acquire a first component according to the pure component and the first component identifier; The rendering of the first component according to the layout attribute, the value of the layout attribute, the content attribute, and the value of the content attribute includes: The first component is rendered according to the pure component, the layout attribute, the value of the layout attribute, the content attribute, and the value of the content attribute.

11. A server, characterized in that: include: A receiving module, configured to receive an interface request sent by a client; an acquisition module, configured to acquire view data from a configuration end according to the interface request; wherein the view data includes: a first component identifier, a layout attribute corresponding to the first component identifier, a value of the layout attribute, and a content attribute corresponding to the first component identifier; A configuration module configured to configure the value of the content attribute to obtain configured view data; The sending module is configured to feed back the configured view data to the client, so that the client renders the first component corresponding to the first component identifier.

12. A configuration terminal, characterized in that: include: a layout determination module configured to determine a number of content attributes based on the configuration data; determining a first component identifier; Determine a layout attribute and a value thereof corresponding to the first component identifier, wherein the configuration data is uploaded by a server or obtained by a configuration terminal from a server; A display module, configured to display the plurality of content attributes; A content determination module configured to determine a content attribute corresponding to the first component identifier in response to the first configuration instruction of the page; A generation module is configured to generate view data according to the first component identifier, the layout attributes, the values ​​of the layout attributes and the content attributes, provide the view data to a server, enable the server to configure the values ​​of the content attributes for the view data, and enable the server to send the configured view data to a client, so that the client renders the component.

13. A client, characterized in that: include: A sending module, configured to send an interface request to the server; a receiving module configured to receive the configured view data fed back by the server in response to the interface request; wherein the configured view data includes: a first component identifier, a layout attribute corresponding to the first component identifier, a value of the layout attribute, and a content attribute corresponding to the first component identifier and a value of the content attribute, wherein the first component identifier, the layout attribute corresponding to the first component identifier, the value of the layout attribute, and the content attribute corresponding to the first component identifier are derived from the view data obtained by the server from the configuration end, and the value of the content attribute is derived from the configuration of the content attribute by the server; An acquisition module, configured to acquire a first component according to the first component identifier; A rendering module is configured to render the first component according to the layout attribute, the value of the layout attribute, the content attribute and the value of the content attribute.

14. A component rendering system, characterized in that: include: The server as claimed in claim 11, the configuration end as claimed in claim 12, and the client as claimed in claim 13.

15. An electronic device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 10.

16. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 10 is implemented.

Citation Information

Patent Citations

  • Client interface and content instant management method

    CN110457027A

  • Webpage generation method and device and electronic equipment

    CN110781423A