CN111142863A - Page generation method and device - Google Patents

Page generation method and device Download PDF

Info

Publication number
CN111142863A
CN111142863A CN201911320047.5A CN201911320047A CN111142863A CN 111142863 A CN111142863 A CN 111142863A CN 201911320047 A CN201911320047 A CN 201911320047A CN 111142863 A CN111142863 A CN 111142863A
Authority
CN
China
Prior art keywords
data
task
page
unit
template
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201911320047.5A
Other languages
Chinese (zh)
Other versions
CN111142863B (en
Inventor
杨云鹏
周山明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Kingdom Technology Co ltd
Original Assignee
Shenzhen Kingdom Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Kingdom Technology Co ltd filed Critical Shenzhen Kingdom Technology Co ltd
Priority to CN201911320047.5A priority Critical patent/CN111142863B/en
Publication of CN111142863A publication Critical patent/CN111142863A/en
Application granted granted Critical
Publication of CN111142863B publication Critical patent/CN111142863B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

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

Abstract

The application is applicable to the technical field of computer data processing, and provides a page generation method and device, which comprise the following steps: task information used for generating a target page is obtained, and the task information comprises a task type and task data; acquiring a component template and example data corresponding to the task type; respectively generating view data corresponding to the task data through the task data and the example data; generating a page assembly through the view data and the assembly template; and generating the target page according to all the page components. The method can ensure that the repeated utilization rate of the generated codes of the required page is high when the system is developed, and reduce the development workload.

Description

Page generation method and device
Technical Field
The application belongs to the technical field of computer data processing, and particularly relates to a page generation method and device.
Background
With the progress of science and technology, the internet technology is also rapidly developed, more and more business processes are carried out on various platforms of the internet, and the manual operation is less and less. For example, the existing counter audit platform generally operates on a web platform, displays the contents of different services to be audited in the form of web pages, and confirms whether the service passes or is rejected after the audit of the audit post staff. Although the services are various in types and the flow of each service is different, the types of data are different, and most of the audited contents are displayed in the forms of text key value pairs, tables and the like. Therefore, in the process of developing a business process platform, many places where the same is communicated, such as data formats, display hierarchies, rendering components, etc., occur, and this results in many repeated processes, repeated operations, and repeated codes.
In the prior art, when a service platform system is developed, in order to meet customized requirements of different users for pages, different codes need to be generated according to different user requirements during development, and due to human factors such as coding habits, coding modes, data processing modes, process processing modes and the like of developers, the structures of page data can be different, so that the code structure of the whole system becomes very complex and is difficult to understand, and the development is inconvenient for the developers to maintain.
Disclosure of Invention
The embodiment of the application provides a page generation method and device, and solves the problems that in the prior art, the service platform system code reuse rate is low, and the development workload is large.
In a first aspect, an embodiment of the present application provides a method for generating a page, including:
task information used for generating a target page is obtained, and the task information comprises a task type and task data;
acquiring a component template for constructing a target page and example data corresponding to the task type in the task information;
respectively generating view data corresponding to the task data through the task data and the example data;
generating a page assembly through the view data and the assembly template;
and generating the target page according to all the page components.
In a possible implementation manner of the first aspect, if a rendering manner of each page component of the target page is to be changed, only the component template needs to be changed; and if the display mode of each page component of the target page is required to be changed, only the example data is required to be changed.
It should be understood that the example data is determined based on the task type of the task information of the target page, the component template may be determined separately or based on the task type, and both are preset before the task information is obtained, and may be changed based on the respective different page generation requirements.
In a second aspect, an embodiment of the present application provides an apparatus for page generation, including:
the task obtaining module is used for obtaining task information generated by a target page, and the task information comprises a task type and task data;
the template acquisition module is used for acquiring a component template for constructing a target page and example data corresponding to the task type in the task information;
the data conversion module is used for generating view data corresponding to each task data in the task information through the task data and the example data;
the component generation module is used for generating a page component through the view data and the component template;
and the page generating module is used for generating the target page according to all the page components.
In a third aspect, an embodiment of the present application provides a terminal device, including: a memory, a processor and a computer program stored in the memory and executable on the processor, the processor implementing the method of any of the above first aspects when executing the computer program.
In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, including: the computer readable storage medium stores a computer program which, when executed by a processor, implements the method of any of the first aspects described above.
In a fifth aspect, the present application provides a computer program product, which when run on a terminal device, causes the terminal device to execute the method of any one of the above first aspects.
It is understood that the beneficial effects of the second aspect to the fifth aspect can be referred to the related description of the first aspect, and are not described herein again.
Compared with the prior art, the embodiment of the application has the advantages that:
compared with the prior art, the method for generating the target page adopts the same component template to generate the corresponding page component, can unify the code structure of each page component of the target page, and develops each page component of each page based on the same component template library, so that the code reuse rate of the page component code is high; and the task data and the page components are associated through the example data and the component templates, when the requirements for generating the pages are different, only the codes corresponding to the example data or the component templates need to be changed, the codes of all the page components do not need to be changed, and the maintenance is easy.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
Fig. 1 is a flowchart of an implementation of a page generation method according to a first embodiment of the present application.
Fig. 2 is a schematic view of an application scenario provided in an embodiment of the present application.
Fig. 3 is a flowchart of an implementation of a page generation method according to a second embodiment of the present application.
Fig. 4 is a flowchart of an implementation of the page generating method S103 according to the third embodiment of the present application.
Fig. 5 is a flowchart of an implementation of the page generating method S402 according to the fourth embodiment of the present application.
Fig. 6 is a flowchart of an implementation of the page generating method S5022 according to the fifth embodiment of the present application.
Fig. 7 is a flowchart of an implementation of the page generating method S104 according to the sixth embodiment of the present application.
Fig. 8 is a diagram illustrating an effect of a specific application scenario according to another embodiment of the present application.
Fig. 9 is a schematic structural diagram of a page generation apparatus according to an embodiment of the present application.
Fig. 10 is a schematic structural diagram of a terminal device according to an embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It should also be understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
As used in this specification and the appended claims, the term "if" may be interpreted contextually as "when", "upon" or "in response to" determining "or" in response to detecting ". Similarly, the phrase "if it is determined" or "if a [ described condition or event ] is detected" may be interpreted contextually to mean "upon determining" or "in response to determining" or "upon detecting [ described condition or event ]" or "in response to detecting [ described condition or event ]".
Furthermore, in the description of the present application and the appended claims, the terms "first," "second," "third," and the like are used for distinguishing between descriptions and not necessarily for describing or implying relative importance.
Reference throughout this specification to "one embodiment" or "some embodiments," or the like, means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the present application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," or the like, in various places throughout this specification are not necessarily all referring to the same embodiment, but rather "one or more but not all embodiments" unless specifically stated otherwise. The terms "comprising," "including," "having," and variations thereof mean "including, but not limited to," unless expressly specified otherwise.
In the embodiment of the invention, the execution subject of the process is the terminal equipment. The terminal devices include but are not limited to: the device comprises a server, a computer, a smart phone, a tablet computer and the like, and can execute the method. Fig. 1 shows a flowchart of an implementation of a page generation method according to a first embodiment of the present application, which is detailed as follows:
in S101, task information including a task type and task data for generating a target page is acquired.
In this embodiment, the task information includes a task type and task data. The task type represents personalized demand information for generating a target page, and exemplarily, the task type obtained according to the target page required by the customer profile change service indicates that a target page capable of displaying the specific situation of the customer profile change needs to be generated. The task type may be represented by a corresponding task identifier, which may be an identifier encoded by an integer int type or a character string char type. The task data includes various data required for generating the target page, and for example, for generating the corresponding target page based on the customer profile change service, the task data includes the customer profile before the change and the customer profile after the change, specifically, the customer profile includes the customer profile such as the name, sex, and contact telephone of the customer, and the task data may further include the reason of the change of the customer profile.
In this embodiment, the manner of acquiring the task information may specifically be: the method comprises the steps that a terminal device generates a corresponding task information input page, a service person inputs task information on the task information input page, specifically, the service person inputs a task type on the task information input page, the terminal device generates an input page used for collecting task data based on the task type, and the service person inputs task data corresponding to the task information on the task data input page. Or, the terminal device may send a request for acquiring task information to the database, and acquire the task information from the database; the database may be a local database or a network database. The terminal equipment can also send a request to a database, obtain original data corresponding to the task information, generate an original data display page based on the original data, and the business staff determines the task data of the task information based on the display page and the task type of the task information so as to determine the task information, and then inputs the task information into the terminal equipment.
In S102, a component template for constructing a target page and example data corresponding to the task type in the task information are acquired.
In this embodiment, the example data is stored in association with the task types, and one example data may correspond to one task type. The example data includes data processing logic corresponding to the task data, and the data processing logic is configured to determine a display manner of each task data in generating the target page, for example: in the "customer profile change" target page, the contact call of the field "customer page three" in the task data is to be changed from '18888888888' to the customer name "page three" in '17777777777' "is displayed in the area for displaying the customer name in the target page, and the contact call '18888888888' before the customer change and the contact call '17777777777' after the customer change are displayed in the area for displaying the specifically changed contents of the customer profile in the target page.
Illustratively, before the component templates and the example data corresponding to the task types are obtained, the component templates for constructing the target pages are further configured, and associated example data are configured for each task type, so that when the target pages with the same task types are generated, different task data generate the target pages based on the same example data and the same component templates, and then the code specifications of the target pages corresponding to the different task data are unified, so that the code repeat utilization rate is high. The example data represents the personalized requirements of the task of generating the target page corresponding to the task type and the data processing logic of the task data, and the example data can be changed along with different requirements of generating the target page.
In S103, view data corresponding to each task data is generated according to the task data and the example data.
In the present embodiment, the data type of each piece of data of the above-described example data corresponds to the data type of each piece of data of the above-described task data. Each piece of data of the above example data has a certain data processing logic, and S103 is to give each piece of task data the corresponding data processing logic of the task data in the example data to obtain the view data.
Illustratively, in the task generated by the target page of the customer profile change, two items of task data are "contact phone before customer profile change: 18888888888 "and" contact call after customer profile change: 17777777777 ", the two items of task data correspond to example data" tel-bef ═ 12345678900 "and" tel-las ═ 12345678901 ", then the two items of task data correspond to view data" tel-bef ═ 18888888888 "and" tel-las ═ 17777777777 ", in which view data there is data processing logic: "tel-bef ═ 18888888888" indicates that the value of the 3 rd data "tel-bef" of the customer data before change is "18888888888" (the first two items are the name and sex of the customer), and "tel-las ═ 17777777777" indicates that the value of the 3 rd data "tel-las" of the customer data after change is "17777777777".
It should be understood that in the view data described above, there may be another data processing logic: traversing the client data before and after the change, comparing the values of the data corresponding to the data types of the two parties, for example, comparing the 3 rd data 'tel-bef' of the client data before the change with the 3 rd data 'tel-las' of the client data after the change, and if the values of the data corresponding to the data types of the two parties are the same, not displaying the data corresponding to the data types of the two parties; and if the values of the data corresponding to the data types of the two parties are different, displaying the data corresponding to the data types of the two parties.
In S104, a page component is generated through the view data and the component template.
In this embodiment, at least one tag data exists in the view data, at least one data group data exists in each tag data, and at least one data unit data exists in each data group data; rendering each tag data, data group data and data unit data in the view data based on each tag data, data group data and data unit data in the view data and rendering logic corresponding to each tag data, data group data and data unit data in the view data to obtain the page component. The rendering refers to the personalized setting of various aspects such as background, size, font size and color of each data for the rendering object.
Illustratively, in a task generated by a target page of client material change, the view data has two label data of client material change and sponsor information, the label data of the client material change represents the change condition of the material b of all clients, and the label data of the client material change is rendered to obtain a label component of the client material change based on rendering logic corresponding to the label data of the client material change, specifically, the title of the label data is set to be three with a small font size, a font song body and an oval frame; the client data change label data comprises at least one client data change data group data, wherein the data group represents the data change condition of a client, the data group data is rendered to obtain a client data change data group component based on rendering logic corresponding to the data group data, specifically, the title of the data group data is set to be a font number four and a font style body, and the data group component is packaged in the client data change label component; the data cluster has data unit data of 'information modified by client', the data unit data identifies a specific data table of the client, for example, the contact telephone number is changed from '18888888888' to '17777777777', the data unit data is rendered to obtain a 'information modified by client' data unit component based on rendering logic corresponding to the data unit data, specifically, 18888888888 is set as a character size five and a font regular script, 17777777777 is set as a character size five and a font regular script, and the data unit component is packaged in the 'data modified by client' data cluster component.
It should be understood that the above exemplary description describes only a portion of the process of this step, not the entire process, and is not intended to limit this step.
In S105, the target page is generated according to all the page components.
In this embodiment, all the page components are displayed on the target page. Each page component comprises position information of the page component on a target page, and each page component is arranged on the target page according to a certain rule based on the position information.
It should be understood that the page generation method provided by the present application may be implemented based on a Uni-App application, and the page generation method provided by the present application is implemented based on the Uni-App, and the page generation method may be applicable to different platforms (an android system, an IOS system, a web, and the like), that is, a target page may be generated on different platforms, that is, a code constituting the target page automatically adapts to different platforms based on the Uni-App.
In the embodiment, based on the example data and the component template, the code structure of each component of the target page can be unified, so that the code reuse rate of the page component code is high. And based on the rendering logic corresponding to the view data corresponding to the task data, the dynamic rendering of the page component can be realized. According to different requirements of target page generation, different requirements of target page generation can be met by modifying example data or component templates, specific page component codes do not need to be modified, maintenance is easy, and workload is reduced.
Fig. 2 shows a schematic diagram of an application scenario provided in an embodiment of the present application, which is detailed as follows:
in this embodiment, referring to fig. 2, the target page includes a page component, and the page component includes two tab components, where the "client profile change" tab component includes a data group component, and the data group component includes three data unit modules, where the "client modified information" data unit component includes sub data unit components corresponding to respective task data, and specifically includes information about "contact call before client profile change: 18888888888 "and" contact call after customer profile change: 17777777777' of two task data, the two task data generate view data through example data, the view data corresponding to the two task data are "tel-bef ═ 18888888888" and "tel-las ═ 17777777777", the view data have data processing logic, including: traversing the client data before and after the change, comparing the values of the data corresponding to the data types of the two parties, and if the values of the data corresponding to the data types of the two parties are the same, not displaying the data corresponding to the data types of the two parties; and if the values of the data corresponding to the data types of the two parties are different, displaying the data corresponding to the data types of the two parties. Illustratively, specifically, the customer profile is different before and after the change only in contact, i.e., the data processing logic determines that the "changed profile" of the customer is "contact phone", "the value before the change of the contact phone" is "18888888888", and the value after the change is "17777777777", and specifically, highlights "17777777777" (in fig. 2, the highlighting is replaced by a bold font).
Fig. 3 shows a flowchart of an implementation of a page generation method according to a second embodiment of the present application, and referring to fig. 1, before S103, the page generation method according to this embodiment further includes: s301 to S302 are described in detail as follows:
further, before generating view data corresponding to each task data respectively through the task data and the example data, the method further includes:
in S301, it is determined whether a value corresponding to each data type in the example data is legal.
In this embodiment, in order to prevent errors, before the view data is generated, the example data is checked, specifically, whether values corresponding to respective data types in the example data are legal is determined, for example, the character length of the contact phone is not more than 12, values corresponding to contact phone data types in the example data are "12345678900" and "12345678901", and a condition that the character length is not more than 12 is met, so that a value corresponding to a contact phone data type in the example data is determined to be legal.
It should be understood that before judging whether the value corresponding to each data type in the example data is legal, a checking algorithm for presetting the value corresponding to each data type may be preset, specifically, the terminal device may configure a corresponding checking algorithm for each data type, and the checking algorithm may be used to detect data length, data type, sensitive word identification, and the like, and may also be used to detect whether the display data of the example data is matched with the current display time. The terminal device may obtain a corresponding verification algorithm from the sample data according to the data type, and output a verification result of the sample data through the verification algorithm.
In S302, if the determination result of the values corresponding to all the data types in the example data is legal, the view data corresponding to each task data in the task information is generated by executing the task data and the example data.
In this embodiment, if the determination result of the value corresponding to each data type in the example data is legal, S103 is executed, and if the determination result of the value corresponding to at least one data type in the example data is illegal, error reporting information is generated based on the illegal value corresponding to the data type, so as to remind an operator that the example data is illegal, and instruct the operator to perform corresponding modification.
In this embodiment, the above example data is checked before S103 is executed, so that a target page with an error caused by an error of the example data can be prevented from being generated, and the target page is ensured to meet the generation requirement.
Fig. 4 shows a flowchart of an implementation of the page generating method S103 according to the third embodiment of the present application. Referring to fig. 4, with respect to the embodiment shown in fig. 1, the page generation method S103 provided in this embodiment includes S401 to S403, which are detailed as follows:
further, the generating, by the task data and the example data, view data corresponding to each task data included in the task information includes:
in S401, a template data group corresponding to each task data group in the example data in the task data is respectively searched.
In this embodiment, the task data includes at least one task data group, and each data type in the task data can find a corresponding data type in the example data. Illustratively, the task data includes a task data group including data types such as a group header, a group display identifier, and a group name identifier, and an example data group included in the example data also includes data types such as a group header, a group display identifier, and a group name identifier, and the example data group is the template data group.
In S402, a target data group is generated according to the task data group and the corresponding template data group.
In this embodiment, the task data group corresponds to each data type in the template data group, and a target data group is obtained by overwriting a value of each data type of each task data group with a value of a corresponding data type in the corresponding template data group.
In S403, view data is generated from all the target data groups.
In this embodiment, the view data is obtained by encapsulating the target data group corresponding to each task data group in the task data.
It should be understood that the number of data groups in the task data is the same as the number of target data groups.
In this embodiment, by overwriting the value of each data type of each task data group in the task data with the value of the corresponding data type of the corresponding template data group in the example data, view data is obtained, in which the data processing logic is the same as the example data and the value of each data type is the same as the task data, so as to generate a page component in the following.
Fig. 5 shows a flowchart of an implementation of the page generating method S402 according to the fourth embodiment of the present application. Referring to fig. 5, in comparison with the embodiment shown in fig. 4, the page generation method S402 provided in this embodiment includes S501 to S502, which are detailed as follows:
further, the generating the target data group according to the task data group and the corresponding template data group includes:
in S501, the template data group is initialized to obtain an initialized data group.
In this embodiment, the task data group includes a group display identifier and at least one task data unit, and the data type of the task data unit is a data unit. Illustratively, the task data group includes data types such as a group title, a group display identifier, a group name identifier, and a data unit, and the template data group also includes data types such as a group title, a group display identifier, a group name identifier, and a data unit.
In this embodiment, the template data group is initialized, specifically, values corresponding to data types such as a group title, a group display identifier, a group name identifier, and a data unit in the template data group are replaced with null values, and the initialized data group is obtained.
In S502, the task data group is assigned to the initialization data group, and the target data group is generated.
In this embodiment, for example, values corresponding to data types such as a group header, a group display identifier, a group name identifier, and a data unit in the task data group are assigned to data types corresponding to respective data types in the task data group in the initialization data group, so as to obtain the target data group.
Further, S502 includes: s5021 to S5022 are specifically described as follows:
and if the group display identifier of the task data group is true, executing S5021-S5022.
In S5021, a template data unit corresponding to each task data unit of the task data group in the example data is searched.
In this embodiment, only when the group display identifier of the task data group is judged to be true, the value of the task data unit (data type is data unit) in the task data group is assigned to the value corresponding to the data type in the initialization data group.
In this embodiment, a template data unit corresponding to the task data unit is supposed to be included in the example data, and the template data unit includes data processing logic corresponding to the task data unit. Illustratively, the task data unit contains a unit title, a unit name identifier, and the like data types, and the template data unit also contains a unit title, a unit name identifier, and the like data types.
In S5022, a target data unit is generated according to the task data unit and the template data unit.
In this embodiment, the task data unit corresponds to each data type in the template data unit, and the target data unit is obtained by overwriting a value of each data type of each task data unit with a value of a corresponding data type in the corresponding template data unit.
In this embodiment, by assigning the same data processing logic as the template data group corresponding to the task data group to the value of each data type of the task data group, a target data group is obtained, in which the data processing logic is the same as the template data group in the example view and the value of each data type is the same as the task data group, so as to generate view data in the following.
Fig. 6 shows a flowchart of an implementation of the page generating method S5022 according to the fifth embodiment of the present application. Referring to fig. 6, in comparison with the embodiment shown in fig. 5, the page generation method S5022 provided in this embodiment includes S601-S602, which are detailed as follows:
further, the generating a target data unit according to the task data unit and the template data unit includes:
in S601, the template data unit is initialized to obtain an initialized data unit.
In this embodiment, the task data unit includes a unit display identifier, a repeated rendering identifier, and one or more task delivery data. Illustratively, the task data unit contains data types such as a unit title, a unit display identifier, a unit name identifier, a repeated rendering identifier, and delivery data, and the template data group also contains data types such as a unit title, a unit display identifier, a unit name identifier, a repeated rendering identifier, and delivery data.
In this embodiment, the template data unit is initialized, specifically, values corresponding to data types such as a unit title, a unit display identifier, a unit name identifier, a repeated rendering identifier, and task delivery data in the template data unit are replaced with null values, to obtain the initialized data unit.
In S602, assigning the task data unit to the initialization data unit to generate the target data unit.
In this embodiment, for example, values corresponding to data types such as a unit title, a unit display identifier, a unit name identifier, a repeated rendering identifier, and transfer data in the task data unit are assigned to data types corresponding to data types in the task data unit in the initialization data unit, so as to obtain the target data unit.
Further, S602 includes: s6021 to S6023 are specifically described as follows:
and if the unit display identification of the task data unit is true, executing S6021-S6022.
In S6021, the template transmission data corresponding to the task transmission data in the template data unit of the task data unit is searched respectively.
In this embodiment, only when the unit display identifier of the task data unit is judged to be true, the value of the task transfer data (the data type is the transfer data) in the task data unit is assigned to the value corresponding to the data type in the initialization data unit.
In this embodiment, the template transfer data corresponding to the task transfer data is supposed to be included in the example data, and the template transfer data includes data processing logic corresponding to the task transfer data.
In S6022, target transfer data is generated from the task transfer data and the template transfer data.
In this embodiment, the task delivery data corresponds to each data type in the template delivery data, and the target delivery data is obtained by overwriting a value of each data type of each task delivery data with a value of a corresponding data type in the corresponding template delivery data.
In S6023, a sub-target data unit corresponding to a sub-task data unit of the task data unit is determined based on the repeated rendering identifier of the task data unit.
In this embodiment, if the repeated rendering flag is true, it indicates that the task data unit includes at least one subtask data unit. And if the repeated rendering identifier is false, indicating that the task data unit does not contain the subtask data unit. And covering the value of each data type of the subtask data unit with the value of the data type of the sub-template data unit in the template data unit corresponding to each data type of the subtask data unit to obtain the sub-target data unit.
It should be understood that in this embodiment, the specific implementation of obtaining the sub-target data unit may refer to the step related to obtaining the target data unit in S502 above, and the specific implementation of obtaining the sub-target data unit is compared with the specific implementation of obtaining the target data unit, and data with a data type of data unit does not exist in the sub-target data unit.
Further, S6023 includes: s60231 to S60233 are specifically described as follows:
if the repeated rendering flag of the task data unit is true, executing S60231-S60233.
In S60231, a location of the subtask data unit of the task data unit is determined based on a data type of the task transfer data of the task data unit.
In this embodiment, if the data type of the task transfer data is a data unit, the subtask data unit is in the task transfer data. If the data type of the task transfer data is a field, the subtask data unit is within the task data unit and outside the task transfer data.
In S60232, sub-template data units corresponding to the sub-task data units of the task data unit in the template data unit are respectively searched.
In this embodiment, the sub-template data unit corresponding to the sub-task data unit should be included in the template data unit in the template data group in the example data.
In S60233, the sub-target data unit is generated according to the sub-task data unit and the sub-template data unit.
In this embodiment, the subtask data unit corresponds to each data type in the sub-template data unit, and the sub-target data unit is obtained by overwriting a value of each data type of each subtask data unit with a value of a corresponding data type in the corresponding sub-template data unit.
In this embodiment, a target data group, in which the data processing logic is the same as the template data unit in the template data group in the example view and the value of each data type is the same as the task data unit, is obtained by assigning the value of each data type of the task data unit to the data processing logic that is the same as the template data unit corresponding to the task data unit, so as to generate view data in the following.
Fig. 7 shows a flowchart of an implementation of the page generating method S104 according to the sixth embodiment of the present application. Referring to fig. 7, with respect to the embodiment shown in fig. 1, the page generation method S104 provided in this embodiment includes S701 to S703, which are detailed as follows:
further, generating a page component by the view data and the component template, including:
in S701, a tag rendering logic corresponding to each of the view data is obtained based on the component template.
In this embodiment, the component template should include the tag rendering logic corresponding to the view data, which is used to instruct how to render the view data, so as to obtain the page component.
In S702, rendering the view data based on the tag rendering logic to obtain a tag rendering component.
In this embodiment, the tag rendering logic illustratively has a data processing logic: the title font of the label is set to be three small in font size, Song style font and frame with ellipse.
In S703, all the tag rendering components are encapsulated to obtain the page component.
In this embodiment, the page component includes at least one tag rendering component. Illustratively, the page component includes two tag rendering components, namely "customer profile change" and "sponsor information", the title of the tag rendering component being displayed by the page component is highlighted and displayed in blue, and the title of the tag rendering component that is not displayed by the page component is displayed in gray.
Further, S702 includes S7021 to S7023, which are detailed as follows:
in S7021, data group rendering logic corresponding to each target data group is obtained based on the component template.
In this embodiment, the component template should include the data group rendering logic corresponding to the target data group, which is used to instruct how to render the target data group, so as to obtain the tag rendering component.
In S7022, the target data group is rendered based on the data group rendering logic, and a data group rendering component is obtained.
In the present embodiment, the title of the target data group is set to a font size of four and a font style of song.
In S7023, all the data group rendering components are encapsulated in the tag rendering component corresponding to each data group rendering component.
In this embodiment, the tag rendering component includes at least one data group rendering component.
Further, S7022 includes S70221 to S70223, which are detailed as follows:
in S70221, data unit rendering logic corresponding to each target data unit is obtained based on the unit type of the target data unit and the component template.
In this embodiment, the component template should include the data unit rendering logic corresponding to the target data unit, and is used to instruct how to render the target data unit, so as to obtain the data group rendering component.
In S70222, the target data unit is rendered based on the data unit rendering logic, resulting in a data unit rendering component.
In this embodiment, the title in the data unit rendering component is set as font size four and font style, the content is set as font size five and font style, and the special content is highlighted, specifically, in the target page generating task of the client profile change, the title "client modified information" is set as font size four and font style in the data unit rendering component of "client modified information", and the contact phone before client change "18888888888" and the contact phone after client change "17777777777" are set as font size five and font style, wherein the contact phone after client change "17777777777" is highlighted, and the display color is orange.
In S70223, all the data unit rendering components are encapsulated in the data group rendering component corresponding to each data unit rendering component.
In this embodiment, the data group rendering component includes at least one data unit rendering component.
In this embodiment, based on the method of this embodiment, the display mode of each task data in the target page can meet the personalized requirement of generating the target page task. If the display mode of the task data of a certain data type in the target page needs to be changed, only the corresponding component template needs to be changed, so that the code of the target page is easy to maintain, and the development workload is reduced.
Fig. 8 shows a specific application scenario effect diagram provided in another embodiment of the present application, which is detailed as follows:
in the new destination page creation task, specifically, in the new "customer details change" destination page creation task, it is required to change the display mode of the information modified by the customer so as to more emphasize the change of the customer details.
Referring to fig. 8, compared to fig. 2, illustratively, modules of "operation types" are added in fig. 8, and the operation types are not limited to modification. In contrast, the transition between fig. 2 to fig. 8 is based on the page generation method provided by the present application, only the corresponding example data or component template needs to be modified (for example, in this embodiment, the corresponding example data or component template refers to the example data or component template corresponding to the same task type whose task type is the client profile change), and the code of the page does not need to be specifically modified, thereby reducing the development workload.
Fig. 9 shows a schematic structural diagram of a page generation apparatus provided in an embodiment of the present application, and for convenience of description, only a part related to the embodiment of the present application is shown, corresponding to the page generation method described in the foregoing embodiment.
Referring to fig. 9, the apparatus includes: the task obtaining module is used for obtaining task information generated by a target page, and the task information comprises a task type and task data; the template acquisition module is used for acquiring a component template for constructing a target page and example data corresponding to the task type in the task information; the data conversion module is used for generating view data corresponding to each task data in the task information through the task data and the example data; the component generation module is used for generating a page component through the view data and the component template; and the page generating module is used for generating the target page according to all the page components.
It should be noted that, for the information interaction, the execution process, and other contents between the above-mentioned apparatuses, the specific functions and the technical effects of the embodiments of the method of the present application are based on the same concept, and specific reference may be made to the section of the embodiments of the method, which is not described herein again.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
Fig. 10 shows a schematic structural diagram of a terminal device according to an embodiment of the present application. As shown in fig. 10, the terminal device 10 of this embodiment includes: at least one processor 100 (only one shown in fig. 10), a memory 101, and a computer program 102 stored in the memory 101 and executable on the at least one processor 100, wherein the processor 100 executes the computer program 102 to implement the steps in any of the above-mentioned embodiments of the method for determining a shared service indicator based on a communication credential sharing service.
The terminal device 10 may be a computing device such as a desktop computer, a notebook, a palm computer, and a cloud server. The terminal device may include, but is not limited to, a processor 100, a memory 101. Those skilled in the art will appreciate that fig. 10 is merely an example of the terminal device 10, and does not constitute a limitation of the terminal device 10, and may include more or less components than those shown, or combine some of the components, or different components, such as an input-output device, a network access device, etc.
The Processor 100 may be a Central Processing Unit (CPU), and the Processor 100 may be other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, a discrete hardware component, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 101 may in some embodiments be an internal storage unit of the terminal device 10, such as a hard disk or a memory of the terminal device 10. In other embodiments, the memory 101 may also be an external storage device of the terminal device 10, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), or the like provided on the terminal device 10. Further, the memory 101 may also include both an internal storage unit and an external storage device of the terminal device 10. The memory 101 is used for storing an operating system, an application program, a BootLoader (BootLoader), data, and other programs, such as program codes of the computer program. The memory 101 may also be used to temporarily store data that has been output or is to be output.
The embodiments of the present application further provide a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the computer program implements the steps in the above-mentioned method embodiments.
The embodiments of the present application provide a computer program product, which when running on a mobile terminal, enables the mobile terminal to implement the steps in the above method embodiments when executed.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, all or part of the processes in the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium and can implement the steps of the embodiments of the methods described above when the computer program is executed by a processor. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer readable medium may include at least: any entity or device capable of carrying computer program code to a photographing apparatus/terminal apparatus, a recording medium, computer Memory, Read-Only Memory (ROM), random-access Memory (RAM), an electrical carrier signal, a telecommunications signal, and a software distribution medium. Such as a usb-disk, a removable hard disk, a magnetic or optical disk, etc. In certain jurisdictions, computer-readable media may not be an electrical carrier signal or a telecommunications signal in accordance with legislative and patent practice.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/terminal device and method may be implemented in other ways. For example, the above-described embodiments of the apparatus/terminal device are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.

Claims (10)

1. A method for page generation, comprising:
task information used for generating a target page is obtained, and the task information comprises a task type and task data;
acquiring a component template for constructing a target page and example data corresponding to the task type in the task information;
respectively generating view data corresponding to the task data through the task data and the example data;
generating a page assembly through the view data and the assembly template;
and generating the target page according to all the page components.
2. The method of claim 1, prior to the obtaining component templates for building a target page and example data corresponding to the task type within the task information, further comprising:
configuring the component template for constructing a target page;
associated example data is configured for each of the task types.
3. The method according to claim 1, further comprising, before generating, from the task data and the example data, view data corresponding to each of the task data included in the task information, the method further comprising:
judging whether the value corresponding to each data type in the example data is legal or not;
and if the judgment results of the values corresponding to all the data types in the example data are legal, executing the task data and the example data to generate view data corresponding to all the task data in the task information.
4. The method of claim 3, wherein the task data comprises at least one task data group;
generating view data corresponding to each task data in the task information through the task data and the example data includes:
respectively searching template data groups corresponding to the task data groups in the example data in the task data;
generating a target data group according to the task data group and the corresponding template data group;
and generating view data according to all the target data groups.
5. The method of claim 4, wherein the task data group comprises a group display identifier and at least one task data unit; generating the target data group according to the task data group and the corresponding template data group includes:
initializing the template data group to obtain an initialized data group;
assigning the task data group to the initialization data group to generate the target data group, including:
if the group display identifier of the task data group is true, respectively searching a template data unit corresponding to each task data unit of the task data group in the example data; and
and generating a target data unit according to the task data unit and the template data unit.
6. The method of claim 5, wherein the task data unit includes a unit display identifier, a repeat render identifier, and one or more task delivery data; generating a target data unit according to the task data unit and the template data unit includes:
initializing the template data unit to obtain an initialized data unit;
assigning the task data unit to the initialization data unit to generate the target data unit, including:
if the unit display identification of the task data unit is true, respectively searching template transmission data corresponding to the task transmission data of the task data unit in the template data unit; and
generating target transmission data according to the task transmission data and the template transmission data; and
and determining sub-target data units corresponding to the sub-task data units of the task data units based on the repeated rendering identifiers of the task data units.
7. The method of claim 5, wherein the target data unit comprises a unit type; generating a page component by the view data and the component template, wherein the generating of the page component comprises:
acquiring label rendering logic corresponding to each view data based on the component template;
rendering the view data based on the tag rendering logic to obtain a tag rendering component;
acquiring data group rendering logic corresponding to each target data group based on the component template;
rendering the target data group based on the data group rendering logic to obtain a data group rendering component;
acquiring data unit rendering logic corresponding to each target data unit based on the unit type of the target data unit and the component template;
rendering the target data unit based on the data unit rendering logic to obtain a data unit rendering component;
and packaging all the data unit rendering components in the data group rendering components corresponding to the data unit rendering components, packaging all the data group rendering components in the tag rendering components corresponding to the data group rendering components, and packaging all the tag rendering components to obtain the page component.
8. An apparatus for page generation, comprising:
the task obtaining module is used for obtaining task information generated by a target page, and the task information comprises a task type and task data;
the template acquisition module is used for acquiring a component template for constructing a target page and example data corresponding to the task type in the task information;
the data conversion module is used for generating view data corresponding to each task data in the task information through the task data and the example data;
the component generation module is used for generating a page component through the view data and the component template;
and the page generating module is used for generating the target page according to all the page components.
9. A terminal device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the method according to any of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1 to 7.
CN201911320047.5A 2019-12-19 2019-12-19 Page generation method and device Active CN111142863B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911320047.5A CN111142863B (en) 2019-12-19 2019-12-19 Page generation method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911320047.5A CN111142863B (en) 2019-12-19 2019-12-19 Page generation method and device

Publications (2)

Publication Number Publication Date
CN111142863A true CN111142863A (en) 2020-05-12
CN111142863B CN111142863B (en) 2023-06-30

Family

ID=70518934

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911320047.5A Active CN111142863B (en) 2019-12-19 2019-12-19 Page generation method and device

Country Status (1)

Country Link
CN (1) CN111142863B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113378059A (en) * 2021-06-30 2021-09-10 北京字节跳动网络技术有限公司 Page display method and device, computer equipment and storage medium
US11861303B2 (en) 2021-01-06 2024-01-02 Coupang Corp. Electronic apparatus for providing information and data providing method thereof

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103051684A (en) * 2012-12-07 2013-04-17 百度在线网络技术(北京)有限公司 Method, system and device for converting website into Web App for displaying
US20140282218A1 (en) * 2013-03-14 2014-09-18 Wixpress Ltd. Device, system, and method of website building by utilizing data lists
CN106682120A (en) * 2016-12-09 2017-05-17 北京深思数盾科技股份有限公司 Method and system for page generation
CN107085415A (en) * 2016-02-12 2017-08-22 费希尔-罗斯蒙特系统公司 Regular composer in process control network
CN107562467A (en) * 2017-07-26 2018-01-09 阿里巴巴集团控股有限公司 Page rendering method, apparatus and equipment
CN107807913A (en) * 2017-11-16 2018-03-16 金航数码科技有限责任公司 A kind of form design system and method based on web
CN109542543A (en) * 2017-09-21 2019-03-29 腾讯科技(深圳)有限公司 Application page surface treatment method, apparatus, storage medium and computer equipment
CN109614565A (en) * 2018-04-04 2019-04-12 北京京东金融科技控股有限公司 Webpage generating method and device

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103051684A (en) * 2012-12-07 2013-04-17 百度在线网络技术(北京)有限公司 Method, system and device for converting website into Web App for displaying
US20140282218A1 (en) * 2013-03-14 2014-09-18 Wixpress Ltd. Device, system, and method of website building by utilizing data lists
CN107085415A (en) * 2016-02-12 2017-08-22 费希尔-罗斯蒙特系统公司 Regular composer in process control network
CN106682120A (en) * 2016-12-09 2017-05-17 北京深思数盾科技股份有限公司 Method and system for page generation
CN107562467A (en) * 2017-07-26 2018-01-09 阿里巴巴集团控股有限公司 Page rendering method, apparatus and equipment
CN109542543A (en) * 2017-09-21 2019-03-29 腾讯科技(深圳)有限公司 Application page surface treatment method, apparatus, storage medium and computer equipment
CN107807913A (en) * 2017-11-16 2018-03-16 金航数码科技有限责任公司 A kind of form design system and method based on web
CN109614565A (en) * 2018-04-04 2019-04-12 北京京东金融科技控股有限公司 Webpage generating method and device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11861303B2 (en) 2021-01-06 2024-01-02 Coupang Corp. Electronic apparatus for providing information and data providing method thereof
CN113378059A (en) * 2021-06-30 2021-09-10 北京字节跳动网络技术有限公司 Page display method and device, computer equipment and storage medium

Also Published As

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

Similar Documents

Publication Publication Date Title
CN110601880B (en) Cloud platform, service processing method, command interface and computer equipment
CN111143087A (en) Interface calling method and device, storage medium and server
CN109684008A (en) Card rendering method, device, terminal and computer readable storage medium
CN114116065B (en) Method and device for acquiring topological graph data object and electronic equipment
CN112667415B (en) Data calling method and device, readable storage medium and electronic equipment
CN112070608B (en) Information processing method, device, medium and electronic equipment
CN111142863B (en) Page generation method and device
CN113626223A (en) Interface calling method and device
CN115599386A (en) Code generation method, device, equipment and storage medium
CN114995859A (en) Page hot updating method, device, equipment and storage medium
CN112650804B (en) Big data access method, device, system and storage medium
CN113382017A (en) Permission control method and device based on white list, electronic equipment and storage medium
CN112416784A (en) Interface checking method, system and device based on configuration center and storage medium
CN115357286B (en) Program file comparison method and device, electronic equipment and storage medium
CN113535565B (en) Interface use case generation method, device, equipment and medium
US20210279362A1 (en) Systems and methods for semantic context enrichment and data masking
CN114186958A (en) Method, computing device and storage medium for exporting list data as spreadsheet
CN114443990A (en) URL (Uniform resource locator) normalization method and device
CN113849158A (en) JSON-based interface factory system, interface generation method and medium thereof
CN112395575A (en) Authority management method, device, equipment and storage medium
CN117472372B (en) Responsive form construction method and system
CN115604000B (en) Override detection method, device, equipment and storage medium
CN111258628A (en) Rule file comparison method and device, readable storage medium and terminal equipment
US20230093225A1 (en) Annotating a log based on log documentation
CN114168599A (en) Data summarizing method and device and terminal equipment

Legal Events

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