Web page control method, device, computer equipment and storage medium
By obtaining and updating the configuration files of the web pages, generating the configuration interface for attribute modification, the problem of slow web page modification speed in the existing technology is solved, and low-cost and high-efficiency web page control is achieved to adapt to the business needs of frequent updates.
Patent Information
- Application Number
- CN202111448094.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-30
- Publication Date
- 2024-12-20
- Estimated Expiration
- 2041-11-30
AI Technical Summary
In the frequently updated web page scenarios, the speed of modifying multiple web pages by modifying the underlying code is slow, resulting in high production costs and later maintenance costs and low business expansion efficiency.
By obtaining multiple configuration files of the web page, generating a configuration interface, and receiving target attributes, modifying the default attributes in the configuration interface to generate updated configuration files, and replacing the configuration files in the database, thereby achieving rapid modification and update of the web page .
It reduces production and post-maintenance costs, improves business expansion efficiency, makes modifications to any candidate fields of the web page simpler and faster, has low operator requirements, and facilitates adding or deleting fields.
Smart Images

Figure CN114238824B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of web application technology, and in particular to a method, device, computer equipment and storage medium for controlling a web page. Background Art
[0002] Web applications are usually deployed in the background before being put online to display web pages. As the business expands and the number of service projects increases, the display of web pages becomes more flexible and diversified, and web pages are updated more frequently.
[0003] In the prior art, the display of web pages is realized by writing underlying codes. If a web page needs to be modified, the underlying codes corresponding to the web page need to be modified to modify the web page. If multiple web pages of a web application need to be modified, the underlying codes of each web page need to be modified separately. The speed of modifying web pages through underlying codes is slow. In today's application scenarios where web pages need to be updated frequently, the existing technology for generating and modifying web pages leads to high production costs and subsequent maintenance costs, and low business expansion efficiency. Summary of the invention
[0004] Based on this, it is necessary to provide web page controls, devices, computer equipment and storage media with low production costs and subsequent maintenance costs and high business development efficiency in response to the above technical problems.
[0005] A method for controlling a web page, the method comprising:
[0006] Acquire multiple configuration files of the web page to be generated, wherein the multiple configuration files include default attributes of multiple candidate fields;
[0007] Generate a configuration interface based on the multiple configuration files, and receive multiple target attributes, wherein the configuration interface is used to display the default attribute of each candidate field, and the multiple target attributes include several target attributes of each field to be modified;
[0008] For any field to be modified, in the configuration interface, several default attributes of the field to be modified are modified to several target attributes of the field to be modified, so as to obtain a web page.
[0009] In one embodiment, the step of obtaining multiple configuration files of the web pages to be generated includes:
[0010] Acquire multiple candidate fields for generating the web page;
[0011] Get the profile of each candidate field in the database.
[0012] In one embodiment, the step of obtaining multiple configuration files of the web pages to be generated includes:
[0013] Acquire multiple candidate fields for generating the web page, and acquire multiple preset field sets;
[0014] Determining a plurality of target field sets and a plurality of reference fields according to the plurality of preset field sets and the plurality of candidate fields;
[0015] Get a profile for each target field set in the database, and a profile for each reference field.
[0016] In one of the embodiments, determining a plurality of target field sets and a plurality of reference fields according to the plurality of preset field sets and the plurality of candidate fields comprises:
[0017] Determine a target field set corresponding to any preset field set from the multiple candidate fields to obtain a plurality of target field sets;
[0018] Among the multiple candidate fields, candidate fields other than the fields in the target field sets are used as reference fields to obtain a plurality of reference fields.
[0019] In one embodiment, after obtaining multiple configuration files of the web page to be generated, the method further includes:
[0020] Obtain several mapping files of the web pages to be generated;
[0021] Accordingly, generating a configuration interface based on the multiple configuration files includes:
[0022] Determine a number of target configuration files and a number of non-target configuration files according to the number of mapping files and the plurality of configuration files, wherein the number of target configuration files correspond one-to-one to the number of mapping files;
[0023] A configuration interface is generated based on the plurality of mapping files, the plurality of target configuration files, and the plurality of non-target configuration files.
[0024] In one embodiment, the method further comprises:
[0025] For any field to be modified, in the multiple configuration files, a plurality of default attributes of the field to be modified are updated to a plurality of target attributes of the field to be modified, to obtain a plurality of updated configuration files;
[0026] The multiple configuration files in the database are replaced with the updated multiple configuration files.
[0027] A web page control device, the device comprising:
[0028] A configuration file acquisition module, used to acquire multiple configuration files of the web page to be generated, wherein the multiple configuration files include default attributes of multiple candidate fields;
[0029] A configuration interface processing module, used to generate a configuration interface based on the multiple configuration files and receive multiple target attributes, wherein the configuration interface is used to display a default attribute of each candidate field, and the multiple target attributes include several target attributes of each field to be modified;
[0030] The web page generation module is used for modifying, for any field to be modified, several default attributes of the field to be modified into several target attributes of the field to be modified in the configuration interface to obtain a web page.
[0031] In one embodiment, the configuration file acquisition module includes:
[0032] A first acquisition unit, used to acquire a plurality of candidate fields for generating the web page;
[0033] The second acquisition unit is used to acquire a configuration file of each candidate field in the database.
[0034] In one embodiment, the configuration file acquisition module includes:
[0035] A third acquisition unit, used to acquire a plurality of candidate fields for generating the web page, and to acquire a plurality of preset field sets;
[0036] a fourth acquiring unit, configured to determine a plurality of target field sets and a plurality of reference fields according to the plurality of preset field sets and the plurality of candidate fields;
[0037] The fifth acquisition unit is used to acquire the configuration file of each target field set and the configuration file of each reference field in the database.
[0038] In one embodiment, the fourth acquisition unit includes:
[0039] a target field set determining unit, configured to determine a target field set corresponding to any preset field set from the plurality of candidate fields, to obtain a plurality of target field sets;
[0040] The reference field determination unit is used to use the candidate fields among the multiple candidate fields, except the fields in the target field sets, as reference fields to obtain a plurality of reference fields.
[0041] In one embodiment, the device further comprises:
[0042] A mapping file acquisition module is used to acquire several mapping files of the web page to be generated;
[0043] Accordingly, the configuration interface processing module includes:
[0044] a configuration file determining unit, configured to determine a plurality of target configuration files and a plurality of non-target configuration files according to the plurality of mapping files and the plurality of configuration files, wherein the plurality of target configuration files correspond one-to-one to the plurality of mapping files;
[0045] The configuration interface generating unit is used to generate a configuration interface based on the plurality of mapping files, the plurality of target configuration files and the plurality of non-target configuration files.
[0046] In one embodiment, the device further comprises:
[0047] A first updating module is used for updating, for any field to be modified, in the multiple configuration files, a number of default attributes of the field to be modified to a number of target attributes of the field to be modified, so as to obtain a number of updated configuration files;
[0048] The second updating module replaces the multiple configuration files in the database with the updated multiple configuration files.
[0049] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0050] Acquire multiple configuration files of the web page to be generated, wherein the multiple configuration files include default attributes of multiple candidate fields;
[0051] Generate a configuration interface based on the multiple configuration files, and receive multiple target attributes, wherein the configuration interface is used to display the default attribute of each candidate field, and the multiple target attributes include several target attributes of each field to be modified;
[0052] For any field to be modified, in the configuration interface, several default attributes of the field to be modified are modified to several target attributes of the field to be modified, so as to obtain a web page.
[0053] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the following steps:
[0054] Acquire multiple configuration files of the web page to be generated, wherein the multiple configuration files include default attributes of multiple candidate fields;
[0055] Generate a configuration interface based on the multiple configuration files, and receive multiple target attributes, wherein the configuration interface is used to display the default attribute of each candidate field, and the multiple target attributes include several target attributes of each field to be modified;
[0056] For any field to be modified, in the configuration interface, several default attributes of the field to be modified are modified to several target attributes of the field to be modified, so as to obtain a web page.
[0057] A computer program product, comprising a computer program, which, when executed by a processor, implements the following steps:
[0058] Acquire multiple configuration files of the web page to be generated, wherein the multiple configuration files include default attributes of multiple candidate fields;
[0059] Generate a configuration interface based on the multiple configuration files, and receive multiple target attributes, wherein the configuration interface is used to display the default attribute of each candidate field, and the multiple target attributes include several target attributes of each field to be modified;
[0060] For any field to be modified, in the configuration interface, several default attributes of the field to be modified are modified to several target attributes of the field to be modified, so as to obtain a web page.
[0061] The control method, device, computer equipment and storage medium of the web page described above generate a configuration interface through multiple configuration files of the web page to be generated, receive multiple target attributes, and modify the multiple configuration files in the configuration interface according to the multiple target attributes to generate the web page. The present invention does not generate the web page according to the overall code of the web page, but obtains multiple configuration files for generating the web page, generates the configuration interface through multiple modular configuration files, and can receive the target attribute of any field to be modified in the configuration interface, and modify the several default attributes of any field to be modified to the several target attributes of any field to be modified to obtain the web page, that is, the default attribute of any candidate field can be modified, and the modification of the candidate field in the web page can be realized without modifying the overall code of the web page. The control method of the web page is simple to operate, and can quickly modify any candidate field of the web page, with low requirements on operators, reducing production and later maintenance costs, improving work efficiency, and facilitating the addition or deletion of fields of the web page, thereby improving business development efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] Figure 1 A schematic diagram of a flow chart of a method for controlling a web page in one embodiment;
[0063] Figure 2 A schematic diagram of a process for writing a configuration file of a field in one embodiment;
[0064] Figure 3 A schematic diagram of a configuration interface generated in one embodiment;
[0065] Figure 4 A schematic diagram of a web page generated in one embodiment;
[0066] Figure 5 is a structural block diagram of a control device for a web page in one embodiment;
[0067] Figure 6 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0068] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0069] In one embodiment, Figure 1 As shown, a method for controlling a web page is provided. This embodiment takes the method applied to a terminal as an example for explanation. It can be understood that the method can also be applied to a server, and can also be applied to a system including a terminal and a server, and is implemented through the interaction between the terminal and the server. In this embodiment, the method includes the following steps:
[0070] S101, obtaining multiple configuration files of web pages to be generated.
[0071] The multiple configuration files include default attributes of multiple candidate fields, and the multiple candidate fields are multiple fields required for the web page to be generated. The multiple configuration files are obtained from a database.
[0072] Specifically, multiple candidate fields required for the web page to be generated are predetermined, and multiple configuration files are obtained from the database according to the multiple candidate fields. One configuration file includes field information of one candidate field, or one configuration file includes field information of multiple candidate fields.
[0073] The configuration file is a modular file. The implementation method of each field is modularized into a configuration file in advance. The configuration file includes the default attributes of the field, such as Figure 2As shown, the process of writing a field configuration file includes: configuring the name of the field, for example, the name of the field is "customer number"; configuring the default value of the field; configuring the upper limit of the field; configuring the lower limit of the field; configuring whether the field is required; configuring whether the field is read-only; configuring whether the field has a selection range, and obtaining the field configuration file. Figure 2 The process of writing the configuration file shown is only an example process. When in use, the above process can be added, deleted or modified according to the actual needs of the field. The configuration files of all fields written are saved in the database; the configuration files of each field can be saved in the database separately, or the configuration files of multiple fields can be aggregated into one configuration file and saved in the database.
[0074] S102: Generate a configuration interface based on the multiple configuration files, and receive multiple target attributes.
[0075] The configuration interface is used to display the default attributes of each candidate field, the multiple target attributes include several target attributes of each field to be modified, and the field information can be modified through the configuration interface.
[0076] Specifically, the receiving of multiple target attributes may be: the configuration interface receives a selection operation to determine a number of fields to be modified, and receives a number of target attributes for each field to be modified. That is, the user selects a number of fields to be modified from a plurality of candidate fields in the configuration interface, and receives a number of target attributes for each field to be modified. For example, if the plurality of configuration files include a configuration file corresponding to the field custid, the configuration interface may display the default attributes of custid and modify the default attributes of custid.
[0077] After the configuration interface is generated, multiple target attributes input by the user are received, and the multiple target attributes are used to modify the default attributes of multiple fields in the configuration page.
[0078] S103, for any field to be modified, in the configuration interface, modifying several default attributes of the field to be modified into several target attributes of the field to be modified, so as to obtain a web page.
[0079] Among them, the default attributes of any field to be modified correspond one-to-one to the target attributes of any field to be modified.
[0080] Specifically, multiple fields corresponding to multiple target attributes are determined in the configuration interface, and default attributes of the determined multiple fields are modified to target attributes.
[0081] Configuration interface such as Figure 3As shown, the default attributes include: default value, whether it is required, whether it is read-only, whether there is a selection range, unit, upper limit and lower limit, etc. Each candidate field has at least one default attribute, and some default attributes of each candidate field can be modified.
[0082] For example, for the field pinyinname to be modified, at least one default attribute of pinyinname includes: default value, upper limit, lower limit, whether it is required and whether it is read-only. Assuming that the attribute of whether it is required is: not required input, and the target attribute of receiving the attribute of whether it is required is: required input, then the attribute of whether it is required is modified to: required input.
[0083] In the control method of the web page, a configuration interface is generated through multiple configuration files of the web page to be generated, multiple target attributes are received, and multiple configuration files are modified in the configuration interface according to the multiple target attributes to generate the web page. The present invention does not generate the web page according to the overall code of the web page, but obtains multiple configuration files for generating the web page, generates the configuration interface through multiple modular configuration files, and can receive the target attribute of any field to be modified in the configuration interface, and modify the several default attributes of any field to be modified to the several target attributes of any field to be modified to obtain the web page, that is, the default attribute of any candidate field can be modified, and the modification of the candidate field in the web page can be realized without modifying the overall code of the web page. The control method of the web page is simple to operate, and can quickly modify any candidate field of the web page, with low requirements on operators, reducing production and later maintenance costs, improving work efficiency, and facilitating the addition or deletion of fields of the web page, thereby improving business development efficiency.
[0084] In one embodiment, S101 includes:
[0085] S201, obtaining a plurality of candidate fields for generating the web page.
[0086] Specifically, multiple candidate fields required for the web page are determined in advance, and a correspondence between the multiple candidate fields and the page ID of the web page is established. When generating a web page, the page ID of the web page to be generated is determined, and the multiple candidate fields required for the web page to be generated are determined according to the page ID.
[0087] S202, obtaining a configuration file of each candidate field in a database.
[0088] Specifically, configuration files of all fields are stored in a database in advance in units of fields. After a plurality of candidate fields are determined, a plurality of configuration files corresponding to the plurality of candidate fields are obtained from the database.
[0089] For example, the multiple candidate fields used to generate the web page include: costid, custname, pinyinname, and the multiple configuration files include: configuration file p1 of costid, configuration file p2 of custname, and configuration file p3 of pinyinname.
[0090] In one embodiment, S101 includes:
[0091] S211, obtaining a plurality of candidate fields for generating the web page, and obtaining a plurality of preset field sets.
[0092] Specifically, multiple candidate fields required for the web page are determined in advance, and a correspondence between the multiple candidate fields and the page ID of the web page is established. When generating a web page, the page ID of the web page to be generated is determined, and the multiple candidate fields required for the web page to be generated are determined according to the page ID.
[0093] Each preset field set includes at least two preset fields, and the at least two preset fields included in each preset field set may belong to the same category. For example, the preset fields in a preset field set include: costid, custname and pinyinname; costid, custname and pinyinname all belong to the basic information category.
[0094] S212: Determine a plurality of target field sets and a plurality of reference fields according to the plurality of preset field sets and the plurality of candidate fields.
[0095] Specifically, multiple candidate fields are matched with each preset field set respectively to determine multiple target field sets. The fields included in the multiple target field sets are all used as target fields, and the fields other than the livestock target field in the multiple candidate fields are used as reference fields.
[0096] In one embodiment, S212 includes:
[0097] S212A: Determine a target field set corresponding to any preset field set from the multiple candidate fields to obtain a plurality of target field sets.
[0098] Specifically, for any preset field set, a target field set corresponding to the preset field set is determined from the multiple candidate fields, and for the corresponding preset field set and target field set, at least two preset fields included in the preset field set are respectively consistent with at least two target fields included in the target field set. That is, the target field set corresponding to any preset field set means that at least two preset fields in any preset field set are respectively the same as at least two target fields in the target field set.
[0099] For example, the preset fields in the first preset field set are: costid, custname and pinyinname; the preset fields in the second preset field set are: income and balance, and the preset fields in the third preset field set are: profession and address; the multiple candidate fields include: costid, custname, pinyinname, profession, income and balance, then costid, custname and pinyinname are selected from the multiple candidate fields to obtain the first target field set corresponding to the first preset field set, and income and balance are selected from the multiple candidate fields to obtain the second target field set corresponding to the second preset field set.
[0100] S212B: Use candidate fields among the multiple candidate fields, except for the fields in the target field sets, as reference fields.
[0101] Specifically, fields in a target field set are used as target fields, each target field set includes at least two target fields, and each candidate field except all target fields in a plurality of candidate fields is used as a reference field to obtain a plurality of reference fields.
[0102] For example, in the above example, multiple candidate fields include: costid, custname, pinyinname, profession, income and balance, among which the first target field set includes: costid, custname and pinyinname, the second target field set includes: income and balance, and if the target field set corresponding to the third preset field set is not found, profession is used as the reference field.
[0103] S213: Obtain a configuration file of each target field set and a configuration file of each reference field in a database.
[0104] Specifically, configuration files of all fields are saved in a database in advance in units of fields, and configuration files of all preset field sets are saved in a database in units of field sets; after determining several target field sets and each reference field, a configuration file corresponding to each target field set is obtained in the database (a configuration file of a preset field set corresponding to each target field set is obtained), and a configuration file of each reference field is obtained, so as to obtain multiple configuration files of the web page to be generated.
[0105] In the above embodiment, considering that in actual application, many fields appear at the same time, for example, customer name, ID number and gender often appear at the same time, customer name, ID number and gender are used as preset field sets. When obtaining the configuration file, there is no need to obtain the configuration file for each field. The configuration file of the field set can be directly obtained, thereby reducing the time required to obtain the configuration file.
[0106] In one implementation, if the web page to be generated is not generated for the first time, a page configuration file of the web page to be generated is stored in a database. In S101, multiple configuration files of the web page to be generated are obtained, including: determining a page ID of the web page to be generated, and obtaining a page configuration file in a database according to the page ID, wherein the page configuration file includes the multiple configuration files.
[0107] In one embodiment, after S102, the method further includes:
[0108] S221, obtaining several mapping files of the web pages to be generated.
[0109] The mapping file is used to perform special processing on fields. If there are several fields in the web page to be generated that need to be specially processed, a mapping file is written in advance for the web page to be generated. The mapping file can be saved locally or in a database.
[0110] The several fields need to be specially processed, which means that the several fields in the web page to be generated are different from the several fields in other web pages. For example, the field costid is the customer number in other web pages, and the field costid is the order number in the web page to be generated. Then, a mapping file needs to be written for the field costid. Through the mapping file and configuration file of the field costid, the field costid will be used to represent the order number in the web page to be generated.
[0111] Corresponding to S221, generating a configuration interface based on the multiple configuration files in step S102 includes:
[0112] S301, determining a plurality of target configuration files and a plurality of non-target configuration files according to the plurality of mapping files and the plurality of configuration files.
[0113] There are a number of target configuration files corresponding to a number of mapping files. Specifically, a field to be mapped corresponding to each mapping file is obtained, and a target configuration file for each field to be mapped is determined in the plurality of configuration files.
[0114] In one implementation, each mapping file carries a field identifier, each configuration file also carries a field identifier, and the configuration file of the target field set carries the field identifier of each field in the target field set; the field identifier of each mapping file is matched with the field identifier of each configuration file to determine the target configuration file for each field to be mapped; and the configuration files other than the target configuration file among the multiple configuration files are used as non-target configuration files.
[0115] S302: Generate a configuration interface based on the plurality of mapping files, the plurality of target configuration files, and the plurality of non-target configuration files.
[0116] Specifically, each mapping file is run to achieve specialized processing of the target configuration file of each mapping file, and several non-target configuration files are referenced to generate a configuration interface, wherein the configuration interface is used to display the default attributes of each candidate field, and the multiple candidate fields include the fields to be mapped after specialized processing.
[0117] In this embodiment, the configuration files of all fields stored in the database are universal configuration files. When generating a web page, the configuration files of the fields are referenced to generate a configuration interface. For fields that require specialized processing, a mapping file is written for the field. Specialized processing is achieved through the mapping file. There is no need to write a configuration file for each specialized field, which saves database storage space and improves database query efficiency.
[0118] In one embodiment, in S102, after the configuration interface is generated according to the multiple configuration files, multiple target attributes may not be received, that is, the default attributes of multiple candidate fields in the configuration interface do not need to be modified, and a web page is directly generated through the configuration interface (generating a web page through multiple configuration files). Calling the document object model (DOM) interface rendering to generate a web page, the generated web page is as follows Figure 4 shown.
[0119] In one embodiment, after S103, the method further includes:
[0120] S104, for any field to be modified, in the multiple configuration files, updating several default attributes of the field to be modified to several target attributes of the field to be modified, to obtain multiple updated configuration files; and replacing multiple configuration files in the database with the multiple updated configuration files.
[0121] Specifically, after receiving several target attributes of each field to be modified, several default attributes of the field to be modified in the database can be modified, so that the next time the web page is generated, there is no need to modify the field to be modified in the configuration interface again. Other web pages should use the configuration files of the field to be modified, or they can directly obtain the configuration files of the field to be modified from the database.
[0122] In the present invention, a configuration interface is generated through multiple configuration files of the web page to be generated, multiple target attributes are received, and multiple configuration files are modified in the configuration interface according to the multiple target attributes to generate the web page. The present invention does not generate a web page according to the overall code of the web page, but obtains multiple configuration files for generating the web page, generates a configuration interface through multiple modular configuration files, and can modify the default attributes of any candidate field in the configuration interface without modifying the overall code of the web page, so as to realize the modification of the candidate field in the web page;
[0123] Through multiple target attributes, the default attributes in multiple configuration files are modified to update multiple configuration files, and the updated multiple configuration files are used to replace the multiple configuration files in the database, so that when the web page is generated next time, there is no need to modify the fields to be modified in the configuration interface again. Other web pages should use the configuration files of the fields to be modified, or they can directly obtain the configuration files of the fields to be modified from the database;
[0124] For fields that require special processing, a mapping file is written for the field. Special processing is achieved through the mapping file. There is no need to write a configuration file for each special field, which saves database storage space and improves database query efficiency.
[0125] The control method of the web page is simple to operate. As the business becomes more and more diverse, different businesses may need to display different effects. The page is rendered by data-driven, which improves the flexibility of the system. There is no need to develop and deploy again. Only online configuration is required to modify any candidate field of the web page to quickly generate the web page. The requirements for operators are low, the production and subsequent maintenance costs are reduced, the work efficiency is improved, and it is also convenient to add or delete fields of the web page, thereby improving the efficiency of business expansion.
[0126] It should be understood that although Figure 1 and Figure 2 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 1 and Figure 2 At least part of the steps may include multiple steps or multiple stages. These steps or stages are not necessarily performed at the same time, but can be performed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed in turn or alternately with other steps or at least part of the steps or stages in other steps.
[0127] In one embodiment, Figure 5 As shown, a web page control device is provided, comprising: a configuration file acquisition module, a configuration interface processing module and a web page generation module, wherein:
[0128] A configuration file acquisition module, used to acquire multiple configuration files of the web page to be generated, wherein the multiple configuration files include default attributes of multiple candidate fields;
[0129] A configuration interface processing module, used to generate a configuration interface based on the multiple configuration files and receive multiple target attributes, wherein the configuration interface is used to display a default attribute of each candidate field, and the multiple target attributes include several target attributes of each field to be modified;
[0130] The web page generation module is used for modifying, for any field to be modified, several default attributes of the field to be modified into several target attributes of the field to be modified in the configuration interface to obtain a web page.
[0131] In one embodiment, the configuration file acquisition module includes:
[0132] A first acquisition unit, used to acquire a plurality of candidate fields for generating the web page;
[0133] The second acquisition unit is used to acquire a configuration file of each candidate field in the database.
[0134] In one embodiment, the configuration file acquisition module includes:
[0135] A third acquisition unit, used to acquire a plurality of candidate fields for generating the web page, and to acquire a plurality of preset field sets;
[0136] a fourth acquiring unit, configured to determine a plurality of target field sets and a plurality of reference fields according to the plurality of preset field sets and the plurality of candidate fields;
[0137] The fifth acquisition unit is used to acquire the configuration file of each target field set and the configuration file of each reference field in the database.
[0138] In one embodiment, the fourth acquisition unit includes:
[0139] a target field set determining unit, configured to determine a target field set corresponding to any preset field set from the plurality of candidate fields, to obtain a plurality of target field sets;
[0140] The reference field determination unit is used to use the candidate fields among the multiple candidate fields, except the fields in the target field sets, as reference fields to obtain a plurality of reference fields.
[0141] In one embodiment, the device further comprises:
[0142] A mapping file acquisition module is used to acquire several mapping files of the web page to be generated;
[0143] Accordingly, the configuration interface processing module includes:
[0144] a configuration file determining unit, configured to determine a plurality of target configuration files and a plurality of non-target configuration files according to the plurality of mapping files and the plurality of configuration files, wherein the plurality of target configuration files correspond one-to-one to the plurality of mapping files;
[0145] The configuration interface generating unit is used to generate a configuration interface based on the plurality of mapping files, the plurality of target configuration files and the plurality of non-target configuration files.
[0146] In one embodiment, the device further comprises:
[0147] A first updating module is used for updating, for any field to be modified, in the multiple configuration files, a number of default attributes of the field to be modified to a number of target attributes of the field to be modified, so as to obtain a number of updated configuration files;
[0148] The second updating module replaces the multiple configuration files in the database with the updated multiple configuration files.
[0149] For the specific definition of the web page control device, please refer to the definition of the web page control method above, which will not be repeated here. Each module in the above web page control device can be implemented in whole or in part by software, hardware and a combination thereof. Each of the above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.
[0150] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 6 As shown. The computer device includes a processor, a memory and a network interface connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store configuration files of all fields, and can also be used to store mapping files of all fields. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for controlling a web page is implemented.
[0151] Those skilled in the art will understand that Figure 6 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0152] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:
[0153] Acquire multiple configuration files of the web page to be generated, wherein the multiple configuration files include default attributes of multiple candidate fields;
[0154] Generate a configuration interface based on the multiple configuration files, and receive multiple target attributes, wherein the configuration interface is used to display the default attribute of each candidate field, and the multiple target attributes include several target attributes of each field to be modified;
[0155] For any field to be modified, in the configuration interface, several default attributes of the field to be modified are modified to several target attributes of the field to be modified, so as to obtain a web page.
[0156] In one embodiment, the processor further implements the following steps when executing the computer program:
[0157] Acquire multiple candidate fields for generating the web page;
[0158] Get the profile of each candidate field in the database.
[0159] In one embodiment, the processor further implements the following steps when executing the computer program: the step of obtaining multiple configuration files of the web pages to be generated includes:
[0160] Acquire multiple candidate fields for generating the web page, and acquire multiple preset field sets;
[0161] Determining a plurality of target field sets and a plurality of reference fields according to the plurality of preset field sets and the plurality of candidate fields;
[0162] Get a profile for each target field set in the database, and a profile for each reference field.
[0163] In one embodiment, the processor further implements the following steps when executing the computer program:
[0164] The determining, according to the plurality of preset field sets and the plurality of candidate fields, a plurality of target field sets and a plurality of reference fields comprises:
[0165] Determine a target field set corresponding to any preset field set from the multiple candidate fields to obtain a plurality of target field sets;
[0166] Among the multiple candidate fields, candidate fields other than the fields in the target field sets are used as reference fields to obtain a plurality of reference fields.
[0167] In one embodiment, the processor further implements the following steps when executing the computer program:
[0168] After obtaining multiple configuration files of the web pages to be generated, the method further includes:
[0169] Obtain several mapping files of the web pages to be generated;
[0170] Accordingly, generating a configuration interface based on the multiple configuration files includes:
[0171] Determine a number of target configuration files and a number of non-target configuration files according to the number of mapping files and the plurality of configuration files, wherein the number of target configuration files correspond one-to-one to the number of mapping files;
[0172] A configuration interface is generated based on the plurality of mapping files, the plurality of target configuration files, and the plurality of non-target configuration files.
[0173] In one embodiment, the processor further implements the following steps when executing the computer program:
[0174] The method further comprises:
[0175] For any field to be modified, in the multiple configuration files, a plurality of default attributes of the field to be modified are updated to a plurality of target attributes of the field to be modified, to obtain a plurality of updated configuration files;
[0176] The multiple configuration files in the database are replaced with the updated multiple configuration files.
[0177] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0178] Acquire multiple configuration files of the web page to be generated, wherein the multiple configuration files include default attributes of multiple candidate fields;
[0179] Generate a configuration interface based on the multiple configuration files, and receive multiple target attributes, wherein the configuration interface is used to display the default attribute of each candidate field, and the multiple target attributes include several target attributes of each field to be modified;
[0180] For any field to be modified, in the configuration interface, several default attributes of the field to be modified are modified to several target attributes of the field to be modified, so as to obtain a web page.
[0181] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0182] Acquire multiple candidate fields for generating the web page;
[0183] Get the profile of each candidate field in the database.
[0184] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0185] The step of obtaining multiple configuration files of the web pages to be generated includes:
[0186] Acquire multiple candidate fields for generating the web page, and acquire multiple preset field sets;
[0187] Determining a plurality of target field sets and a plurality of reference fields according to the plurality of preset field sets and the plurality of candidate fields;
[0188] Get a profile for each target field set in the database, and a profile for each reference field.
[0189] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0190] The determining, according to the plurality of preset field sets and the plurality of candidate fields, a plurality of target field sets and a plurality of reference fields comprises:
[0191] Determine a target field set corresponding to any preset field set from the multiple candidate fields to obtain a plurality of target field sets;
[0192] Among the multiple candidate fields, candidate fields other than the fields in the target field sets are used as reference fields to obtain a plurality of reference fields.
[0193] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0194] After obtaining multiple configuration files of the web pages to be generated, the method further includes:
[0195] Obtain several mapping files of the web pages to be generated;
[0196] Accordingly, generating a configuration interface based on the multiple configuration files includes:
[0197] Determine a number of target configuration files and a number of non-target configuration files according to the number of mapping files and the plurality of configuration files, wherein the number of target configuration files correspond one-to-one to the number of mapping files;
[0198] A configuration interface is generated based on the plurality of mapping files, the plurality of target configuration files, and the plurality of non-target configuration files.
[0199] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0200] The method further comprises:
[0201] For any field to be modified, in the multiple configuration files, a plurality of default attributes of the field to be modified are updated to a plurality of target attributes of the field to be modified, to obtain a plurality of updated configuration files;
[0202] The multiple configuration files in the database are replaced with the updated multiple configuration files.
[0203] In one embodiment, a computer program product is provided, including a computer program, which, when executed by a processor, implements the following steps:
[0204] Acquire multiple configuration files of the web page to be generated, wherein the multiple configuration files include default attributes of multiple candidate fields;
[0205] Generate a configuration interface based on the multiple configuration files, and receive multiple target attributes, wherein the configuration interface is used to display the default attribute of each candidate field, and the multiple target attributes include several target attributes of each field to be modified;
[0206] For any field to be modified, in the configuration interface, several default attributes of the field to be modified are modified to several target attributes of the field to be modified, so as to obtain a web page.
[0207] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0208] Acquire multiple candidate fields for generating the web page;
[0209] Get the profile of each candidate field in the database.
[0210] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0211] The step of obtaining multiple configuration files of the web pages to be generated includes:
[0212] Acquire multiple candidate fields for generating the web page, and acquire multiple preset field sets;
[0213] Determining a plurality of target field sets and a plurality of reference fields according to the plurality of preset field sets and the plurality of candidate fields;
[0214] Get a profile for each target field set in the database, and a profile for each reference field.
[0215] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0216] The determining, according to the plurality of preset field sets and the plurality of candidate fields, a plurality of target field sets and a plurality of reference fields comprises:
[0217] Determine a target field set corresponding to any preset field set from the multiple candidate fields to obtain a plurality of target field sets;
[0218] Among the multiple candidate fields, candidate fields other than the fields in the target field sets are used as reference fields to obtain a plurality of reference fields.
[0219] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0220] After obtaining multiple configuration files of the web pages to be generated, the method further includes:
[0221] Obtain several mapping files of the web pages to be generated;
[0222] Accordingly, generating a configuration interface based on the multiple configuration files includes:
[0223] Determine a number of target configuration files and a number of non-target configuration files according to the number of mapping files and the plurality of configuration files, wherein the number of target configuration files correspond one-to-one to the number of mapping files;
[0224] A configuration interface is generated based on the plurality of mapping files, the plurality of target configuration files, and the plurality of non-target configuration files.
[0225] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0226] The method further comprises:
[0227] For any field to be modified, in the multiple configuration files, a plurality of default attributes of the field to be modified are updated to a plurality of target attributes of the field to be modified, to obtain a plurality of updated configuration files;
[0228] The multiple configuration files in the database are replaced with the updated multiple configuration files.
[0229] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).
[0230] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0231] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A method for controlling a web page, characterized in that: The method comprises: Acquire multiple configuration files of the web page to be generated, wherein the multiple configuration files include default attributes of multiple candidate fields; Generate a configuration interface based on the multiple configuration files, and receive multiple target attributes, wherein the configuration interface is used to display the default attribute of each candidate field, and the multiple target attributes include several target attributes of each field to be modified; For any field to be modified, in the configuration interface, several default attributes of the field to be modified are modified to several target attributes of the field to be modified, so as to obtain a web page; The step of obtaining multiple configuration files of the web pages to be generated includes: Acquire multiple candidate fields for generating the web page, and acquire multiple preset field sets; Determine a target field set corresponding to any preset field set from the multiple candidate fields to obtain a plurality of target field sets; Taking candidate fields among the multiple candidate fields, except the fields in the target field sets, as reference fields, to obtain a plurality of reference fields; Obtain a profile for each target field set in the database, as well as a profile for each reference field; After obtaining multiple configuration files of the web pages to be generated, the method further includes: Obtain several mapping files of the web pages to be generated; Accordingly, generating a configuration interface based on the multiple configuration files includes: Determine a number of target configuration files and a number of non-target configuration files according to the number of mapping files and the plurality of configuration files, wherein the number of target configuration files correspond one-to-one to the number of mapping files; A configuration interface is generated based on the plurality of mapping files, the plurality of target configuration files, and the plurality of non-target configuration files.
2. The method according to claim 1, characterized in that The step of obtaining multiple configuration files of the web pages to be generated includes: Acquire multiple candidate fields for generating the web page; Get the profile of each candidate field in the database.
3. The method according to claim 1, characterized in that The plurality of default attributes of any field to be modified corresponds one-to-one to the plurality of target attributes of any field to be modified.
4. The method according to any one of claims 1 to 3, characterized in that The method further comprises: For any field to be modified, in the multiple configuration files, a plurality of default attributes of the field to be modified are updated to a plurality of target attributes of the field to be modified, to obtain a plurality of updated configuration files; The multiple configuration files in the database are replaced with the updated multiple configuration files.
5. A web page control device, the device comprising: A configuration file acquisition module, used to acquire multiple configuration files of the web page to be generated, wherein the multiple configuration files include default attributes of multiple candidate fields; A configuration interface processing module, used to generate a configuration interface based on the multiple configuration files and receive multiple target attributes, wherein the configuration interface is used to display a default attribute of each candidate field, and the multiple target attributes include several target attributes of each field to be modified; A web page generation module, for modifying, in the configuration interface, a number of default attributes of any field to be modified into a number of target attributes of any field to be modified, so as to obtain a web page; The configuration file acquisition module includes: A third acquisition unit, used to acquire a plurality of candidate fields for generating the web page, and to acquire a plurality of preset field sets; a target field set determining unit, configured to determine a target field set corresponding to any preset field set from the plurality of candidate fields, to obtain a plurality of target field sets; A reference field determination unit, configured to use candidate fields among the plurality of candidate fields, except for fields in the plurality of target field sets, as reference fields to obtain a plurality of reference fields; a fifth acquisition unit, configured to acquire a configuration file of each target field set and a configuration file of each reference field in a database; The device also includes: A mapping file acquisition module is used to acquire several mapping files of the web page to be generated; Accordingly, the configuration interface processing module includes: a configuration file determining unit, configured to determine a plurality of target configuration files and a plurality of non-target configuration files according to the plurality of mapping files and the plurality of configuration files, wherein the plurality of target configuration files correspond one-to-one to the plurality of mapping files; The configuration interface generating unit is used to generate a configuration interface based on the plurality of mapping files, the plurality of target configuration files and the plurality of non-target configuration files.
6. The device according to claim 5, wherein the configuration file acquisition module comprises: A first acquisition unit, used to acquire a plurality of candidate fields for generating the web page; The second acquisition unit is used to acquire a configuration file of each candidate field in the database.
7. The device according to claim 5, characterized in that The plurality of default attributes of any field to be modified corresponds one-to-one to the plurality of target attributes of any field to be modified.
8. The device according to any one of claims 5 to 7, characterized in that The device also includes: A first updating module is used for updating, for any field to be modified, in the multiple configuration files, a number of default attributes of the field to be modified to a number of target attributes of the field to be modified, so as to obtain a number of updated configuration files; The second updating module replaces the multiple configuration files in the database with the updated multiple configuration files.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 4 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.
11. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.
