Data Processing Method and Device for Web Pages, Electronic Device, Medium
By configuring the corresponding data types for the components of the web page function module, the problem of inconvenient configuration in the prior art is solved, and data type configuration is realized based on business needs, improving user experience.
Patent Information
- Application Number
- CN201911362097.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-12-25
- Publication Date
- 2025-06-13
- Estimated Expiration
- 2039-12-25
AI Technical Summary
In the prior art, it is not convenient to configure the corresponding data types for components of the web page function module, and the range of selection of data types is relatively large, which is inconvenient to configure.
By determining the target web page to be generated and its functional modules, according to the mapping relationship between the predefined functional modules and the data type, the components of each functional module are configured with the corresponding data type, and the components are assigned based on the assignment information input by the user.
It realizes business requirements-oriented, determines the scope of data types that can be configured for components in the functional module, simplifies the configuration process of component data types and improves user experience.
Smart Images

Figure CN113031945B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technologies, and more particularly, to a data processing method and apparatus for web pages, an electronic device, and a computer-readable storage medium. Background Art
[0002] With the continuous development of Internet technologies, the functions that can be carried on web pages have gradually increased. Therefore, the functions on web pages have become more and more flexible, and function configurability and data configurability have gradually become common functions on web pages. JSON (JavaScript Object Notation) is a configurable web editing solution. According to the data types defined by JSON, the functions of a web page can be rendered and data for the presentation effect of the web page can be input. From the perspective of computer languages, JSON is a syntax for storing and exchanging information and is a lightweight data exchange format, similar to XML (Extensible Markup Language), but the strings used in JSON encoding are fewer than those in XML, the encoding is more flexible, and it is more conducive to parsing. JSON is independent of various programming language platforms, and almost all mainstream programming languages can support the JSON data format. In related technologies, a data format can be defined for JSON data by using JSON Schema (i.e., a JSON data type editor), and JSON data can be input by using a JSON data editor.
[0003] In the process of implementing the concept of the present disclosure, the inventors found that there are at least the following problems in related technologies: After defining multiple data types for the function components of a web page in advance through a JSON data type editor, it is necessary to select one data type from all the data types to configure each function component, and the range of data type selection is large, which is not convenient for configuring the corresponding data type for the function components. Summary of the Invention
[0004] In view of this, embodiments of the present disclosure provide a data processing method and apparatus for web pages, which solve the problem in related technologies that it is not convenient to configure the corresponding data type for the components of a function module.
[0005] One aspect of the embodiments of the present disclosure provides a data processing method for web pages, including: determining a target web page to be generated; determining at least one first functional module and at least one first component that each first functional module needs to include, where the at least one first functional module is a functional module that needs to be included in the target web page; determining at least one first data type corresponding to each first functional module according to a predefined mapping relationship between functional modules and data types; configuring the at least one first component that each first functional module needs to include with the corresponding first data type based on the determined at least one first data type corresponding to each first functional module; and assigning values to the first components that have been configured based on the assignment information input by the user, so as to generate the target web page.
[0006] According to an embodiment of the present disclosure, the configuring the at least one first component that each first functional module needs to include with the corresponding first data type based on the determined at least one first data type corresponding to each first functional module includes: for each first functional module, grouping the components that the current functional module needs to include according to the inheritance relationship corresponding to the components in the structure tree; determining at least one second data type corresponding to each group of components from the first data types corresponding to the current functional module; and for each component in each group of components, selecting a corresponding sub-data type from the determined second data types for configuration.
[0007] According to an embodiment of the present disclosure, the set of second data types is a subset of the set of first data types.
[0008] According to an embodiment of the present disclosure, each of the above first data types includes multiple sub-data types; the method further includes: defining a new data type including multiple sub-data types; defining a new mapping relationship between the new data type and the functional module; and updating the predefined mapping relationship between the functional module and the data type based on the new mapping relationship.
[0009] According to an embodiment of the present disclosure, each of the above first data types includes multiple sub-data types; the assigning values to the first components that have been configured based on the assignment information input by the user includes: for the first components that have been configured, sequentially assigning values to the sub-data types included in the configured data types in a predetermined order.
[0010] According to an embodiment of the present disclosure, the method further includes: after assigning values to the first component with the configuration completed based on the assignment information input by the user, determining whether an assignment modification operation needs to be performed on the first component with the values already assigned; in response to the need to perform an assignment modification operation on the first component with the values already assigned, writing the modified assignment at a specified position; and reading the modified assignment from the specified position to update the assignment result of the first component with the values already assigned.
[0011] Another aspect of the embodiments of the present disclosure provides a data processing device for a web page, including: a first determination module, configured to determine a target web page to be generated; a second determination module, configured to determine at least one first functional module and at least one first component that each first functional module needs to include, where the at least one first functional module is a functional module that needs to be included in the target web page; a third determination module, configured to determine at least one first data type corresponding to each first functional module according to a mapping relationship between predefined functional modules and data types, and each first data type in the at least one first data type includes multiple sub-data types; a configuration module, configured to configure corresponding first data types for at least one first component that each first functional module needs to include based on the determined at least one first data type corresponding to each first functional module; and an assignment module, configured to assign values to the first component with the configuration completed based on the assignment information input by the user, so as to generate the target web page.
[0012] According to an embodiment of the present disclosure, the above configuration module includes: a grouping module, configured to group the components that each first functional module needs to include according to the inheritance relationship corresponding to the components in the structure tree for each first functional module; a determination module, configured to determine at least one second data type corresponding to each group of components from the first data type corresponding to the current functional module; and a selection module, configured to select a corresponding sub-data type for configuration from the determined second data types for each component in each group of components.
[0013] Another aspect of the embodiments of the present disclosure provides an electronic device, including one or more processors and a storage device, where the storage device is configured to store executable instructions, and when the executable instructions are executed by the processor, the method of the embodiments of the present disclosure is implemented.
[0014] Another aspect of the embodiments of the present disclosure provides a computer-readable storage medium, storing computer-executable instructions, and the instructions are used to implement the method of the embodiments of the present disclosure when executed by a processor.
[0015] Another aspect of the embodiments of the present disclosure provides a computer program, where the computer program includes computer-executable instructions, and the instructions are used to implement the method of the embodiments of the present disclosure when executed.
[0016] According to an embodiment of the present disclosure, each functional module of a target web page is mapped to a data type defined according to service requirements, and corresponding data types are configured for each component in each functional module by using the mapping relationship between the data type and the functional module, which can at least partially solve the problem in the related art that it is inconvenient to configure data types for components in a functional module, and thus can implement determining the range of data types that can be configured for components in a functional module oriented by service requirements. The components in the functional module select data types within the determined range of data types, facilitating the technical effect of configuring data types for components in the functional module. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Through the following description of embodiments of the present disclosure with reference to the drawings, the above and other objects, features, and advantages of the present disclosure will become clearer. In the drawings:
[0018] Figure 1 Schematically shows the system architecture of a JSON platform for editing web pages according to an embodiment of the present disclosure;
[0019] Figure 2 Schematically shows a flowchart of a data processing method for a web page according to an embodiment of the present disclosure;
[0020] Figure 3 Schematically shows a flowchart of configuring data types for a functional module according to an embodiment of the present disclosure;
[0021] Figure 4 Schematically shows a flowchart of adding data types for a functional module according to an embodiment of the present disclosure;
[0022] Figure 5 Schematically shows a flowchart of modifying component assignment according to an embodiment of the present disclosure;
[0023] Figure 6 Schematically shows a block diagram of a data processing device according to an embodiment of the present disclosure;
[0024] Figure 7 Schematically shows a block diagram of a configuration module according to an embodiment of the present disclosure; and
[0025] Figure 8 Schematically shows a block diagram of an electronic device suitable for implementing a data processing method for a web page according to an embodiment of the present disclosure. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0026] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are merely exemplary and are not intended to limit the scope of the present disclosure. In the following detailed description, for the sake of explanation, numerous specific details are set forth in order to provide a comprehensive understanding of the embodiments of the present disclosure. However, it is obvious that one or more embodiments can also be implemented without these specific details. In addition, in the following description, descriptions of well-known structures and technologies are omitted to avoid unnecessarily obscuring the concepts of the present disclosure.
[0027] The terms used herein are merely for the purpose of describing specific embodiments and are not intended to limit the present disclosure. The terms "including", "comprising", etc. used herein indicate the presence of features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.
[0028] All terms (including technical and scientific terms) used herein have the meanings commonly understood by those of ordinary skill in the art, unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification and should not be interpreted in an idealized or overly rigid manner.
[0029] In cases where expressions such as "at least one of A, B, and C, etc." are used, generally, it should be interpreted according to the meaning commonly understood by those of ordinary skill in the art (for example, "a system having at least one of A, B, and C" should include, but not be limited to, a system having only A, only B, only C, having A and B, having A and C, having B and C, and / or having A, B, and C, etc.). In cases where expressions such as "at least one of A, B, or C, etc." are used, generally, it should be interpreted according to the meaning commonly understood by those of ordinary skill in the art (for example, "a system having at least one of A, B, or C" should include, but not be limited to, a system having only A, only B, only C, having A and B, having A and C, having B and C, and / or having A, B, and C, etc.). Those of ordinary skill in the art should also understand that substantially any disjunctive conjunction and / or phrase representing two or more alternative items, whether in the specification, claims, or drawings, should be understood as presenting the possibility of including one of these items, either of these items, or both items. For example, the phrase "A or B" should be understood as including the possibility of "A" or "B", or "A and B".
[0030] The terms "first" and "second" are used only for descriptive purposes and should not be construed as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, features defined with "first" and "second" may explicitly or implicitly include one or more features.
[0031] Embodiments of the present disclosure provide a data processing method for web pages, which may include the following operations. Determine a target web page to be generated. Determine at least one first functional module and at least one first component that each first functional module needs to include, where the at least one first functional module is a functional module that needs to be included in the target web page. According to the predefined mapping relationship between the functional module and the data type, determine at least one first data type corresponding to each first functional module. Based on the determined at least one first data type corresponding to each first functional module, configure the corresponding first data type for at least one first component that each first functional module needs to include. Assign values to the first components that have been configured based on the assignment information input by the user, so as to generate the target web page.
[0032] Figure 1 Schematically shows a system architecture 100 of a JSON platform for editing web pages according to an embodiment of the present disclosure. It should be noted that, Figure 1 The shown is only an example of the system architecture to which the embodiments of the present disclosure can be applied, to help those skilled in the art understand the technical content of the present disclosure, but it does not mean that the embodiments of the present disclosure cannot be used in other devices, systems, environments or scenarios.
[0033] As Figure 1 shown, the system architecture 100 according to this embodiment may include a JSON data type editor 101 and a JSON data editor 102. The JSON data type editor 101 can configure the data type of the JSON data. The JSON data editor 102 can assign specific values to the JSON data according to the data type configured by the JSON data type editor 101. Finally, a target web page P can be generated according to the assigned JSON data.
[0034] The user can define one or more root components in the JSON data type editor 101, and generate multiple descendant components of the root component based on each root component. Each root component and its descendant components are in a tree-like relationship, and the components on the same tree constitute a functional module. Define multiple data types according to business requirements, then determine one or more defined data types mapped to the functional module, and select a data type from the one or more data types to configure each component in the functional module. Then assign values to the components with the configured data type, and the functional module after assignment can generate the target web page. For example, from a business requirement perspective, a web page can be divided into three major functional modules, namely a function setting module, a style setting module, and a data setting module. Therefore, starting from function setting, style setting, and data setting, three root components can be defined respectively in the JSON data type editor 101.
[0035] It should be noted that the data processing method for web pages provided in the embodiments of the present disclosure can generally be executed by a server. Correspondingly, the data processing device for web pages provided in the embodiments of the present disclosure can generally be set in the server. The data processing method for web pages provided in the embodiments of the present disclosure can also be executed by a server or a server cluster that is different from the server and can communicate with the terminal device and / or the server. Correspondingly, the data processing device for web pages provided in the embodiments of the present disclosure can also be set in a server or a server cluster that is different from the server and can communicate with the terminal device and / or the server. Alternatively, the data processing method for web pages provided in the embodiments of the present disclosure can also be executed by the terminal device. Correspondingly, the data processing device for web pages provided in the embodiments of the present disclosure can also be set in the terminal device. The data processing method for web pages provided in the embodiments of the present disclosure can also be executed by a terminal device or a terminal device cluster that is different from the terminal device and can communicate with the terminal device and / or the server. Correspondingly, the data processing device for web pages provided in the embodiments of the present disclosure can also be set in a terminal device or a terminal device cluster that is different from the terminal device and can communicate with the terminal device and / or the server.
[0036] Figure 2 Schematically shows a flowchart of the data processing method for web pages according to an embodiment of the present disclosure.
[0037] As Figure 2 shown, the method may include the following operations S201 to S205.
[0038] In operation S201, determine the target web page to be generated.
[0039] In the embodiments of the present disclosure, the target web page may be composed of multiple functional modules. After being configured, the functional modules can display the target web page in the format required by the business. Each functional module may be composed of one or more components, that is, a functional module includes at least one component. The component may be a functional function, a program segment, etc.
[0040] Then, in operation S202, determine at least one first functional module and at least one first component that each first functional module needs to include, where at least one first functional module is a functional module that needs to be included in the target web page.
[0041] In the embodiments of the present disclosure, each functional module can implement one of the functions such as text input function, color selection function, font change function, date selection function, number input function, single option selection function, multiple option selection function, unit selection function, value dragging selection function, etc.
[0042] In the embodiments of the present disclosure, components can be classified into corresponding functional modules in terms of function implementation. For example, components can be divided into function setting components, style setting components, and data setting components. For function setting components, a root component can be defined first, and descendant components of the root component can be generated through inheritance. The root component and its descendant components form function setting components. Similarly, style setting components and data setting components can be formed.
[0043] Next, in operation S203, according to the mapping relationship predefined between functional modules and data types, at least one first data type corresponding to each first functional module is determined.
[0044] In the embodiments of the present disclosure, multiple data types can be defined according to business needs, and at least one data type can be selected from the multiple data types as at least one first data type. For example, the data types defined according to business needs can include: single text, color, date, time, date and time, multi-line text, number, data, interval number, radio, checkbox, unit, and event, etc. One or more data types can be selected from these data types as the first data type. For example, the first data type can include single text, color, date, and time, etc.
[0045] Then, in operation S204, based on the at least one first data type determined to correspond to each first functional module, the corresponding first data type is configured for at least one first component that each first functional module needs to include.
[0046] In the embodiments of the present disclosure, one first data type is selected for each first component from the at least one first data type. For example, if the first data type includes single text, color, date, and time types, then the first data type corresponding to the first component can only be selected from the single text type, color type, date type, and time type.
[0047] Then, in operation S205, the first component that has completed configuration is assigned a value based on the assignment information input by the user, so as to generate a target web page.
[0048] In the embodiments of the present disclosure, after the data type of the first component is determined, the first component can be assigned a value through a JSON data editor. Specifically, the JSON data editor traverses the data types of each first component in the JSON data type editor. After determining the data types of all first components, each first component is assigned a value.
[0049] In an embodiment of the present disclosure, the first component generally has an initial value, and assigning a value to the first component may be to modify the initial value of the first component. For example, if the data type corresponding to the first component is single text, the JSON data editor presents a text box, and the initial value of the first component is an empty text box, and the user can enter a string in this text box. For example, if the data type corresponding to the first component is color, the JSON data editor presents a color palette, and the initial value of the first component is white, and the user can select a color for the first component from the color palette, and the selected color will replace the initial color (white) of the first component. For example, if the data type corresponding to the first component is interval number, the JSON data editor presents a numeric drag button, and the initial value of the first component is the middle value of the numeric interval, and the user can drag the numeric drag button to determine a value for the first component within the numeric interval. For example, if the data type corresponding to the first component is time, the JSON data editor presents a time drop-down button, and the initial value of the first component is 12:00, and the user can click the drop-down button to select a definite time value for the first component.
[0050] In an alternative embodiment of the present invention, each first data type respectively includes multiple sub-data types. The operation S205 of assigning a value to the first component that has been configured based on the assignment information input by the user may include the following operations: for the first component that has been configured, assign values to the sub-data types included in the configured data type in a predetermined order in sequence.
[0051] In an embodiment of the present disclosure, the JSON data editor traverses the data types configured for each component in the JSON data type editor, and can start from the root component in the JSON data editor according to the inheritance relationship, and assign values to each component according to the data type of each component. At this time, the data type of each component is uniquely determined, and the component must be assigned a value according to the data type of the component. For example, for a component with a data type of single text, only text information can be input in the JSON data editor; for a component with a data type of radio selection, only one option can be selected from the given options in the JSON data editor; for a component with a data type of event, only a title can be input in the title text box, and content can be input in the content text box.
[0052] In an embodiment of the present disclosure, at least one root component can be defined in a JSON data type editor according to business requirements. For a root component, at least one data type corresponding to the root component can be determined. Based on the root component, descendant components are generated, and the generated descendant components inherit the data type corresponding to the root component. The root component and its descendant components can form a functional module, and the data type corresponding to the root component is also the data type having a mapping relationship with the functional module. One data type can be selected from at least one data type to configure a component in the functional module, that is, the data type of each component in the functional module can only be selected from the data types having a mapping relationship with the functional module. After the JSON data editor reads the data types configured for each component in the JSON data type editor, the components can be assigned values according to the data types of each component in the JSON data editor. After the components in the functional module are assigned values, these functional modules can be compiled to generate a target web page. Multiple data types can be defined according to business requirements, and the functional module is mapped to some or all of the defined data types. Only one data type having a mapping relationship with the functional module needs to be selected to configure the components in the functional module, that is, the data type of the components in the functional module can only be selected from the data types having a mapping relationship with the functional module, and the selection range of the data type is clear, and the user experience is high.
[0053] The following refers to Figures 3 to 5 , and further illustrates the Figure 2 method shown in combination with specific embodiments.
[0054] Figure 3 FIG. schematically shows a flowchart of data type configuration for a functional module according to an embodiment of the present disclosure.
[0055] Specifically, as an optional embodiment, as shown in Figure 3 , the operation S204 in Figure 2 configures the corresponding first data type for at least one first component that each first functional module needs to include based on at least one first data type determined for each first functional module, and may include the following operations S3041 to S3043.
[0056] In operation S3041, the components that the current functional module needs to include are grouped according to the inheritance relationship corresponding to the components in the structure tree.
[0057] In an embodiment of the present disclosure, one or more root components are defined in a JSON data type editor according to business requirements. For each root component, descendant components are constructed based on the root component. Each root component and its descendant components form a component tree, and the components on one component tree can be used as a component group. For example, three root components can be defined in the JSON data type editor according to function setting services, style setting services, and data setting services, denoted as the first root component, the second root component, and the third root component. Then, based on the first root component, multiple descendant components of the first root component are generated. Based on the second root component, multiple descendant components of the second root component are generated. Based on the third root component, multiple descendant components of the third root component are generated. The first root component and its descendant components can form a component tree. The second root component and its descendant components can form a component tree. The third root component and its descendant components can form a component tree.
[0058] Next, in operation S3042, at least one second data type corresponding to each group of components is determined from the first data type corresponding to the current function module.
[0059] In an embodiment of the present disclosure, the set of second data types is a subset of the set of first data types. Multiple first data types can be defined according to business needs. The first data type can be a single data type or a composite data type, and the composite data type can be composed of multiple single data types. For example, single data types can include single text, color, date, time, multi-line text, number, interval number, radio, checkbox, and unit, etc. Composite data types can include data and event, where data can be composed of color and number, and event can be composed of multi-line text, single-line text, and radio. Appropriate composite data types can be formed according to business needs. If a composite data type is configured for a component, the component can have multiple single data types at the same time to meet business needs. The second data type corresponding to each group of components can be selected from multiple first data types. The second data type can include one first data type or multiple first data types.
[0060] In an embodiment of the present disclosure, each group of components forms a component tree. The root component in the component tree can be corresponded with the second data type, and the descendant components in the component tree can inherit the second data type of the root component. Therefore, both the root component and its descendant components are corresponded with the second data type. At this time, the component group formed by the root component and its descendant components has a corresponding relationship with the second data type. If it is necessary to modify the second data type having a mapping relationship with the component group, only the second data type corresponding to the root component needs to be modified. Since there is an inheritance relationship between the root component and the descendant components, the descendant components of the root component inherit the modified second data type, thereby modifying the second data types corresponding to all components in the component tree.
[0061] Then, in operation S3043, for each component in each group of components, select a corresponding sub-data type from the determined second data type for configuration.
[0062] In an embodiment of the present disclosure, the second data type may include multiple data types, and these data types may be used as sub-data types. Select one sub-data type from the second data type to configure each component, that is, select one data type from the second data type as the data type of one component.
[0063] In an embodiment of the present disclosure, components are configured according to the inheritance relationship to form a component tree. After defining the corresponding data type for the root component in the component tree, the descendant components in the component tree can inherit the data type of the root component as their own corresponding data type. The descendant components of the root component do not need to separately define the corresponding data type and can directly inherit the data type of the root component, realizing the sharing of data types and high code reuse rate. In addition, after modifying the data type corresponding to the root component, the data types inherited by the descendant components will change accordingly, which is convenient for modifying the data types mapped by each group of components.
[0064] Figure 4 Schematically shows a flowchart of adding a data type of a function module according to an embodiment of the present disclosure.
[0065] Specifically, as an optional embodiment, as Figure 4 shown, each first data type contains multiple sub-data types respectively. After operation S203, the data processing method for the web page may further include the following operations S401 - S403.
[0066] In operation S401, define a new data type that contains multiple sub-data types.
[0067] In an embodiment of the present disclosure, the multiple sub-data types may be basic data types, and the basic data types may be types such as single text, color, date, time, multi-line text, number, data, interval number, radio, checkbox, and unit. The first data type is composed of sub-data types, that is, the first data type may be a composite data type. For example, date and time may form a date-time data type, and single text and multi-line text form an event data type.
[0068] In an embodiment of the present disclosure, the new data type may be composed of multiple sub-data types, that is, the new data type is a composite data type. It is possible to determine which sub-data types the composite data type is composed of according to business needs. For example, for a font format-related business, the new data type may be composed of a font color type, a font size type, and a font type.
[0069] In other embodiments of the present disclosure, the newly added data type may also be a basic data type, and the present disclosure is not limited thereto. For example, for a service with only font size requirements, the newly added data type may be a font size type.
[0070] Next, in operation S402, define a new mapping relationship between the newly added data type and the function module.
[0071] In the embodiments of the present disclosure, the data types mapped by the function module include the original data type and the newly added data type. That is, in addition to maintaining the original mapping relationship with the original data type, the function module also needs to establish a new mapping relationship with the newly added data type. The new mapping relationship established between the function module and the newly added data type is the newly added mapping relationship.
[0072] Then, in operation S403, update the mapping relationship between the predefined function module and the data type based on the newly added mapping relationship.
[0073] In the embodiments of the present disclosure, while maintaining the mapping relationship between the function module and the original data type, the mapping relationship between the function module and the new data type can be added. At this time, the function module has a mapping relationship with both the original data type and the newly added data type, so that the mapping relationship between the function module and the data type can be updated to meet the requirements of specific services. For example, for an original service with only font size requirements, according to the business development needs, it is necessary to change the font color and font type, then the font color and font type need to be newly added.
[0074] In other embodiments of the present disclosure, the data types mapped to the function module can also be reduced. For example, the data types corresponding to the root components in the function module can be reduced, and the descendant components in the function module inherit the data types corresponding to the root components, that is, the data types corresponding to the descendant components are all reduced accordingly, so as to achieve the reduction of the data types mapped to the function module.
[0075] In the embodiments of the present disclosure, the data types having a mapping relationship with the function module can be increased or decreased according to business requirements. Specifically, since the descendant components in the function module can inherit the data types corresponding to the root components in the function module, therefore, modifying the data types corresponding to the root components of the function module will correspondingly modify the data types corresponding to the descendant components in the function module, and finally result in the modification of the data types having a mapping relationship with the function module. That is, modifying the data types corresponding to the root components of the function module can modify the data types having a mapping relationship with the function module, which is easy to operate. Figure 5 Schematically shows a flowchart of modifying component assignment according to an embodiment of the present disclosure.
[0076] Specifically, as an alternative embodiment, as Figure 5 shown, after operation S205 assigns values to the first component that has been configured, the method may further include the following operations S501 to S503.
[0077] In operation S501, determine whether a value modification operation needs to be performed on the first component that has been assigned values.
[0078] In the embodiments of the present disclosure, according to the display requirements of the target web page, the value assignment of the component can be modified in the memory of the JSON platform. For example, for a component with a data type of color, if the component has been assigned the value red and the memory reads the value assignment of the component, then the value assignment of the component can be modified to yellow in the memory.
[0079] Next, in operation S502, in response to the need to perform a value modification operation on the first component that has been assigned values, write the modified value assignment to the specified location.
[0080] In the embodiments of the present disclosure, the memory of the JSON platform can read the value assignment of the component in the JSON data editor and display the value assignment of the component on the display screen of the JSON platform. The user can modify the value assignment in the memory. For example, for a component with a data type of time type, modify the value assignment of the component. Specifically, the minutes in the value assignment can be modified. At this time, the value assignment in the memory is the modified minutes.
[0081] Then, in operation S503, read the modified value assignment from the specified location to update the value assignment result of the first component that has been assigned values.
[0082] In the embodiments of the present disclosure, by triggering the save button displayed on the display screen of the JSON platform, the value assignment in the memory can be updated to the JSON data editor. Since the value assignment in the memory is the modified value assignment at this time, the modified value assignment can be finally updated to the JSON data editor. For example, for a component with a data type of date, modify the value assignment of the component. Specifically, the year in the value assignment can be modified. At this time, the value assignment in the memory is the modified year. Triggering the save button can update the modified year to the JSON data editor.
[0083] In the embodiments of the present disclosure, the value assignment of the component is read from the JSON data editor through the memory of the JSON platform. According to the display requirements of the target web page, the value assignment of the component can be directly modified in the memory, and then by triggering the save button, the value assignment in the memory can be updated to the corresponding component. At this time, the value assignment in the memory is already the modified value assignment. When modifying the value assignment of the component, it is not necessary for the JSON data editor to read the data type of the component in the JSON data type editor. The value assignment of the component can be directly modified through the memory, which is convenient to operate.
[0084] Figure 6 A block diagram of a data processing device according to an embodiment of the present disclosure is schematically shown.
[0085] As Figure 6 shown, the device can be used to implement the method described in the above embodiments. The data processing device 600 may include a first determination module 610, a second determination module 620, a third determination module 630, a configuration module 640, and an assignment module 650.
[0086] Among them, the first determination module 610 is used to determine the target web page to be generated.
[0087] The second determination module 620 is used to determine at least one first functional module and at least one first component that each first functional module needs to include, where the at least one first functional module is a functional module that needs to be included in the target web page.
[0088] The third determination module 630 is used to determine at least one first data type corresponding to each first functional module according to the mapping relationship between the predefined functional module and the data type. Each first data type in the at least one first data type includes multiple sub-data types.
[0089] The configuration module 640 is used to configure the corresponding first data type for at least one first component that each first functional module needs to include based on the determined at least one first data type corresponding to each first functional module.
[0090] The assignment module 650 is used to assign values to the first components that have been configured based on the assignment information input by the user, so as to generate the target web page.
[0091] It should be noted that in the embodiments of the present disclosure, the embodiments of the device part are the same or similar to the embodiments of the method part, and will not be repeated here.
[0092] Figure 7 A block diagram of the configuration module according to an embodiment of the present disclosure is schematically shown.
[0093] As Figure 7 shown, the device can be used to implement the method described in the above embodiments. The configuration module 640 may include a grouping sub-module 641, a determination sub-module 642, and a selection sub-module 643.
[0094] The grouping sub-module 641 is used to group the components that the current functional module needs to include for each first functional module according to the inheritance relationship corresponding to the components in the structure tree.
[0095] The determining sub-module 642 is configured to determine at least one second data type corresponding to each group of components from the first data type corresponding to the current functional module.
[0096] The selecting sub-module 643 is configured to select a corresponding sub-data type from the determined second data types for configuration for each component in each group of components.
[0097] It should be noted that in the embodiments of the present disclosure, the embodiments of the apparatus part and the embodiments of the method part are correspondingly the same or similar, and will not be described in detail here.
[0098] According to the embodiments of the present disclosure, any plurality of modules and sub-modules, or at least part of the functions of any plurality of them, can be implemented in one module. Any one or more of the modules and sub-modules according to the embodiments of the present disclosure can be split into multiple modules for implementation. Any one or more of the modules and sub-modules according to the embodiments of the present disclosure can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on chip, a system on substrate, a system on package, an application specific integrated circuit (ASIC), or can be implemented by any other reasonable way of integrating or packaging the circuit in hardware or firmware, or implemented in any one of the three implementation manners of software, hardware, and firmware, or in an appropriate combination of any several of them. Alternatively, one or more of the modules and sub-modules according to the embodiments of the present disclosure can be at least partially implemented as a computer program module, and when the computer program module is run, the corresponding functions can be executed.
[0099] For example, any combination of the first determination module 610, the second determination module 620, the third determination module 630, the configuration module 640, and the assignment module 650 may be combined and implemented in one module, or any one of them may be split into multiple modules. Alternatively, at least some functions of one or more of these modules may be combined with at least some functions of other modules and implemented in one module. According to an embodiment of the present disclosure, at least one of the first determination module 610, the second determination module 620, the third determination module 630, the configuration module 640, and the assignment module 650 may be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on chip, a system on a substrate, a system in a package, an application specific integrated circuit (ASIC), or any other reasonable manner of integrating or packaging circuits, etc., implemented by hardware or firmware, or implemented in any one of the three implementation manners of software, hardware, and firmware, or in any suitable combination of several of them. Alternatively, at least one of the first determination module 610, the second determination module 620, the third determination module 630, the configuration module 640, and the assignment module 650 may be at least partially implemented as a computer program module, which can perform corresponding functions when the computer program module is run.
[0100] Figure 8 FIG. schematically shows a block diagram of an electronic device suitable for implementing a data processing method for a web page according to an embodiment of the present disclosure. Figure 8 The illustrated electronic device is merely an example and should not impose any limitation on the functions and usage scope of the embodiments of the present disclosure.
[0101] As Figure 8 shown, the electronic device 800 according to an embodiment of the present disclosure includes a processor 801, which can perform various appropriate actions and processes according to a program stored in a read only memory (ROM) 802 or a program loaded from a storage section 808 into a random access memory (RAM) 803. The processor 801 may include, for example, a general microprocessor (such as a CPU), an instruction set processor, and / or a related chipset, and / or a dedicated microprocessor (such as an application specific integrated circuit (ASIC)), etc. The processor 801 may also include on-board memory for caching purposes. The processor 501 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present disclosure.
[0102] In the RAM 803, various programs and data required for the operation of the electronic device 800 are stored. The processor 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. The processor 801 performs various operations of the method flow according to the embodiments of the present disclosure by executing programs in the ROM 802 and / or the RAM 803. It should be noted that the programs can also be stored in one or more memories other than the ROM 802 and the RAM 803. The processor 801 can also perform various operations of the method flow according to the embodiments of the present disclosure by executing programs stored in one or more memories.
[0103] According to an embodiment of the present disclosure, the electronic device 800 may further include an input / output (I / O) interface 805, and the input / output (I / O) interface 805 is also connected to the bus 804. The electronic device 800 may further include one or more of the following components connected to the I / O interface 805: an input portion 806 including a keyboard, a mouse, etc.; an output portion 807 including, for example, a cathode ray tube (CRT), a liquid crystal display (LCD), etc. and a speaker, etc.; a storage portion 808 including a hard disk, etc.; and a communication portion 809 including a network interface card such as a LAN card, a modem, etc. The communication portion 809 performs communication processing via a network such as the Internet. A drive 810 is also connected to the I / O interface 805 as needed. A removable medium 811, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 810 as needed so that a computer program read from it can be installed into the storage portion 808 as needed.
[0104] According to an embodiment of the present disclosure, the method flow according to the embodiments of the present disclosure can be implemented as a computer software program. For example, embodiments of the present disclosure include a computer program product that includes a computer program carried on a computer-readable storage medium, and the computer program includes program codes for performing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via the communication portion 809, and / or installed from the removable medium 811. When the computer program is executed by the processor 801, the above-described functions defined in the electronic device according to the embodiments of the present disclosure are performed. According to an embodiment of the present disclosure, the above-described electronic devices, devices, apparatuses, modules, etc. can be implemented by computer program modules.
[0105] The present disclosure also provides a computer-readable storage medium, which can be included in the device / device / system described in the above embodiments; or can exist separately without being assembled into the device / device / system. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the method according to the embodiments of the present disclosure is implemented.
[0106] According to an embodiment of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, for example, it may include but is not limited to: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above. In the present disclosure, the computer-readable storage medium may be any tangible medium that contains or stores a program, and this program can be used by or in combination with an instruction execution system, device, or device. For example, according to an embodiment of the present disclosure, the computer-readable storage medium may include one or more memories other than the ROM 802 and / or RAM 803 and / or ROM 802 and RAM 803 described above.
[0107] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagram may represent a module, a program segment, or a part of code, and the above module, program segment, or part of code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the block may occur in a different order than marked in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram or flowchart, and the combination of blocks in the block diagram or flowchart, can be implemented by a dedicated hardware-based system for performing the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.
[0108] Those skilled in the art can understand that the features recited in the various embodiments and / or claims of the present disclosure can be combined or combined in various ways, even if such combinations or combinations are not explicitly recited in the present disclosure. In particular, without departing from the spirit and teachings of the present disclosure, the features recited in the various embodiments and / or claims of the present disclosure can be combined and combined in various ways. All such combinations and / or combinations fall within the scope of the present disclosure.
[0109] The embodiments of the present disclosure have been described above. However, these embodiments are for illustrative purposes only and are not intended to limit the scope of the present disclosure. Although the embodiments have been described separately above, this does not mean that the measures in each embodiment cannot be used advantageously in combination. The scope of the present disclosure is defined by the appended claims and their equivalents. Without departing from the scope of the present disclosure, those skilled in the art can make various substitutions and modifications, and these substitutions and modifications should fall within the scope of the present disclosure.
Claims
1. A method for processing data for a web page, comprising: determining a target web page to be generated; determining at least one first functional module and at least one first component that each first functional module needs to include, wherein the at least one first functional module is a functional module that needs to be included in the target web page; determining at least one first data type corresponding to each of the first functional modules according to a predefined mapping relationship between the functional module and the data type, wherein the data type is predefined according to the function settings, style settings, and data settings of the target web page; configuring a corresponding first data type for at least one first component that each first functional module needs to include based on the determined at least one first data type corresponding to each first functional module; and assigning values to the first components that have been configured based on the value assignment information input by the user so as to generate the target web page, wherein the value assignment information input by the user is determined based on the content presented by the JOSN data editor according to the first data type corresponding to the first component.
2. The method according to claim 1, wherein, the configuring a corresponding first data type for at least one first component that each first functional module needs to include based on the determined at least one first data type corresponding to each first functional module includes: for each first functional module, grouping the components that the current functional module needs to include according to the inheritance relationship corresponding to the components in the structure tree; determining at least one second data type corresponding to each group of components from the first data types corresponding to the current functional module; and selecting a corresponding sub-data type from the determined second data types for configuration for each component in each group of components.
3. The method according to claim 2, wherein, the set of second data types is a subset of the set of first data types.
4. The method according to claim 1, wherein, each of the first data types contains multiple sub-data types; the method further includes: defining a new data type containing multiple sub-data types; defining a new mapping relationship between the new data type and the functional module; and updating the predefined mapping relationship between the functional module and the data type based on the new mapping relationship.
5. The method according to claim 1, wherein, each of the first data types contains multiple sub-data types; the assigning values to the first components that have been configured based on the value assignment information input by the user includes: for the first components that have been configured, sequentially assigning values to the sub-data types included in the configured data types in a predetermined order.
6. After the assigning values to the first components that have been configured based on the value assignment information input by the user in the method according to claim 1, the method further includes: determining whether a value assignment modification operation needs to be performed on the first components for which values have been assigned; in response to the need to perform a value assignment modification operation on the first components for which values have been assigned, writing the modified value assignment at a specified position; and Read the modified assignment from the specified location to update the assignment result of the first component of the completed assignment.
7. A data processing device for a web page, comprising: A first determination module for determining a target web page to be generated; A second determination module for determining at least one first functional module and at least one first component that each first functional module needs to include, wherein the at least one first functional module is a functional module to be included in the target web page; A third determination module for determining at least one first data type corresponding to each of the first functional modules according to a mapping relationship between pre-defined functional modules and data types, each first data type in the at least one first data type includes a plurality of sub-data types, wherein the data type is pre-defined according to the function settings, style settings and data settings of the target web page; A configuration module for configuring corresponding first data types for at least one first component that each first functional module needs to include based on the determined at least one first data type corresponding to each first functional module; and An assignment module for assigning values to the first components that have been completed in configuration based on the assignment information input by the user, so as to generate the target web page, wherein the assignment information input by the user is determined based on the content presented by the JOSN data editor according to the first data type corresponding to the first component.
8. The device according to claim 7, wherein, The configuration module includes: A grouping sub-module for grouping the components that each first functional module needs to include according to the inheritance relationship corresponding to the components in the structure tree for each first functional module; A determination sub-module for determining at least one second data type corresponding to each group of components from the first data type corresponding to the current functional module; and A selection sub-module for selecting corresponding sub-data types for configuration from the determined second data types for each component in each group of components.
9. An electronic device, comprising: One or more processors; A storage device for storing executable instructions, which when executed by the processor, implement the method according to any one of claims 1 to 6.
10. A computer-readable storage medium, on which executable instructions are stored, and the instructions when executed by the processor implement the method according to any one of claims 1 to 6.
11. A computer program product, including a computer program, the computer program includes computer-executable instructions, and the instructions when executed by the processor implement the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Method and apparatus for generating user interfaces based upon automation with full flexibility
CN1704900A