CN115756692A - Method for automatically combining and displaying pages based on style attributes and related equipment thereof - Google Patents

Method for automatically combining and displaying pages based on style attributes and related equipment thereof Download PDF

Info

Publication number
CN115756692A
CN115756692A CN202211430922.7A CN202211430922A CN115756692A CN 115756692 A CN115756692 A CN 115756692A CN 202211430922 A CN202211430922 A CN 202211430922A CN 115756692 A CN115756692 A CN 115756692A
Authority
CN
China
Prior art keywords
style
style set
target display
display card
attribute
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.)
Pending
Application number
CN202211430922.7A
Other languages
Chinese (zh)
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.)
Ping An Property and Casualty Insurance Company of China Ltd
Original Assignee
Ping An Property and Casualty Insurance Company of China 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 Ping An Property and Casualty Insurance Company of China Ltd filed Critical Ping An Property and Casualty Insurance Company of China Ltd
Priority to CN202211430922.7A priority Critical patent/CN115756692A/en
Publication of CN115756692A publication Critical patent/CN115756692A/en
Pending legal-status Critical Current

Links

Images

Abstract

The embodiment of the application belongs to the field of U I design and medical application, is applied to the field of rapid editing of page files, and relates to a method for automatically combining and displaying pages based on style attributes and related equipment thereof, wherein the method comprises the steps of acquiring an integral style set of a public style library and a target display card; acquiring an initialized original style set; selecting corresponding basic components from a style library by taking the whole style set of the target display card as a reference style, operating the original style set, and generating the target display card according to a final operation result of the original style set; and performing page typesetting on each used target display card according to a preset typesetting format to generate an interface display page. According to the method and the device, the target display cards are sequentially generated by performing combination control from the attributes of the minimum interface forming units, and then the interface display pages are generated by the target display cards, so that the conversion between similar cards can be automatically controlled more accurately without modifying the original code logic.

Description

Method for automatically combining and displaying pages based on style attributes and related equipment thereof
Technical Field
The application relates to the technical field of UI design and rapid editing of page files, in particular to a method for automatically combining and displaying pages based on style attributes and related equipment thereof.
Background
For similar page composition units (sub-cards), a certain card is converted into an attribute style of a target similar card, the existing method is to modify the original logic, and the problems can be solved by a large amount of reference control display, but the method is complicated to operate, cannot be reused and is not universal.
Taking medical epidemic prevention as an example, in the epidemic prevention process, the emergence of various epidemic prevention small procedures effectively helps people to prevent, for example: in the newly released interface, if more style variations exist, such as controlling the color of an assistant title, controlling a background, controlling the color of a newly-added text, the size of the text and the like, how to achieve more accurate control on conversion between similar cards without modifying the original code logic can be achieved.
Disclosure of Invention
The embodiment of the application aims to provide a method for automatically combining and displaying pages based on style attributes and related equipment thereof, so that conversion between similar cards can be controlled more accurately under the condition of not modifying original code logic.
In order to solve the above technical problem, an embodiment of the present application provides a method for automatically combining and displaying pages based on style attributes, which adopts the following technical solutions:
a method for automatically combining and displaying pages based on style attributes comprises the following steps:
acquiring an integral style set of a preset public style library and a target display card, wherein the public style library comprises all preset basic components;
acquiring an initialized original style set;
selecting a corresponding basic component from the public style library by taking the whole style set of the target display card as a reference style according to a page generation instruction, operating the original style set, and generating the target display card according to a final operation result of the original style set;
and performing page typesetting on each used target display card according to a preset typesetting format to generate an interface display page.
Further, the step of operating the original style set includes:
and judging the relationship between the elements in the original style set and the whole style set of the target display card, and carrying out optimization operation on the elements in the original style set according to the judgment result.
Further, the overall style set comprises the attribute names and attribute values of the basic components constituting the styles of the lower-level constituent units of the target presentation card; the step of judging the relationship between the elements in the original style set and the whole style set of the target display card and carrying out optimization operation on the elements in the original style set according to the judgment result comprises the following steps:
comparing the attribute names in the original style set with the attribute names in the overall style set of the target display card, and judging whether all the attribute names in the original style set are contained in the overall style set of the target display card;
if all the attribute names in the original style set are contained in the overall style set of the target display card, judging whether the attribute values corresponding to the attribute names in the original style set are the same as the corresponding attribute values in the overall style set of the target display card;
if not, acquiring a corresponding attribute value to perform replacement operation;
if the attribute names are the same, acquiring the attribute names which do not belong to the original style set in the whole style set of the target display card, and acquiring corresponding basic components from the public style library according to the attribute names to add to the original style set.
Further, after the step of determining whether all the attribute names in the original style set are contained in the overall style set of the target display card, the method further includes:
if the attribute names in the original style set are not all contained in the whole style set of the target display card, deleting corresponding distinguishing elements, wherein the distinguishing elements represent the attribute names contained in the original style set but not contained in the whole style set of the target display card and the attribute values corresponding to the attribute names;
identifying the attribute name in the original style set, which is the same as the attribute name in the whole style set of the target display card, and judging whether the attribute value corresponding to the attribute name in the original style set is the same as the attribute value corresponding to the attribute name in the whole style set of the target display card;
if not, acquiring a corresponding attribute value to perform replacement operation;
if the attribute names are the same, acquiring the attribute names which do not belong to the original style set in the whole style set of the target display card, and acquiring corresponding basic components from the public style library according to the attribute names to add the basic components into the original style set.
Further, the step of obtaining the corresponding attribute value to perform the replacement operation specifically includes:
acquiring an attribute value corresponding to the attribute name from the overall style set of the target display card;
and replacing the attribute value to the attribute value corresponding to the attribute name in the original style set.
Further, the step of obtaining an attribute name, which does not belong to the original style set, in the whole style set of the target display card, and obtaining a corresponding basic component from the public style library according to the attribute name to add the basic component to the original style set specifically includes:
acquiring attribute names which do not belong to the original style set in the overall style set of the target display card;
according to the attribute names and a preset adding sequence, sequentially acquiring basic components corresponding to each attribute name from the public style library and adding the basic components to the original style set;
and according to the attribute names and the adding sequence, sequentially acquiring attribute values corresponding to the current attribute names from the whole style set of the target display card and adding the attribute values into the original style set until the number of elements in the original style set is the same as that of elements in the whole style set of the target display card, and finishing the adding operation of the original style set.
Further, the step of obtaining the attribute value corresponding to the current attribute name from the overall style set of the target display card and adding the attribute value to the original style set specifically includes:
and searching an attribute value corresponding to the current attribute name by taking the current attribute name as a retrieval key field and the public style library as a retrieval source, and adding the attribute value into the original style set.
In order to solve the above technical problem, an embodiment of the present application further provides a device for automatically combining and displaying pages based on style attributes, which adopts the following technical solutions:
an apparatus for automatically assembling a presentation page based on style properties, comprising:
the system comprises a reference style acquisition module, a reference style acquisition module and a target display card, wherein the reference style acquisition module is used for acquiring an integral style set of a preset public style library and a target display card, and the public style library comprises all preset basic components;
the original style acquisition module is used for acquiring an initialized original style set;
the target display card generation module is used for selecting a corresponding basic component from the public style library by taking the whole style set of the target display card as a reference style according to a page generation instruction, operating the original style set and generating a target display card according to a final operation result of the original style set;
and the interface display page generation module is used for performing page typesetting on each target display card used according to a preset typesetting format to generate an interface display page.
In order to solve the above technical problem, an embodiment of the present application further provides a computer device, which adopts the following technical solutions:
a computer device comprising a memory and a processor, wherein the memory stores computer readable instructions, and the processor implements the steps of the method for automatically combining presentation pages based on style attributes when executing the computer readable instructions.
In order to solve the above technical problem, an embodiment of the present application further provides a computer-readable storage medium, which adopts the following technical solutions:
a computer readable storage medium having computer readable instructions stored thereon which, when executed by a processor, implement the steps of a method of automatically assembling presentation pages based on style attributes as described above.
Compared with the prior art, the embodiment of the application mainly has the following beneficial effects:
the method for automatically combining the display pages based on the style attributes comprises the steps of obtaining an overall style set of a target display card, wherein the overall style set comprises style sets of all subordinate constituent units forming the target display card, and the style sets comprise attribute names and attribute values of basic components forming styles of all subordinate constituent units of the target display card; acquiring a style library comprising all preset basic components, wherein the style library comprises all the preset basic components; acquiring an initialized original style set; according to a page generation instruction, taking the whole style set of the target display card as a reference style, selecting a corresponding basic component from the style library, operating the original style set, and generating the target display card according to a final operation result of the original style set; and performing page typesetting on each used target display card according to a preset typesetting format to generate an interface display page. According to the method and the device, the target display cards are sequentially generated through combination control from the attributes of the minimum interface forming units, and then the interface display pages are generated through the target display cards, so that the conversion among similar cards can be automatically controlled more accurately under the condition that the original code logic is not modified.
Drawings
In order to more clearly illustrate the solution of the present application, the drawings used in the description of the embodiments of the present application will be briefly described below, and it is obvious that the drawings in the description below are some embodiments of the present application, and that other drawings may be obtained by those skilled in the art without inventive effort.
FIG. 1 is an exemplary system architecture diagram in which the present application may be applied;
FIG. 2 is a flow diagram of one embodiment of a method for automatically assembling presentation pages based on style properties according to the present application;
FIG. 3 is a block diagram illustrating an embodiment of an apparatus for automatically assembling presentation pages based on style attributes according to the present application;
FIG. 4 is a schematic diagram of the structure of one embodiment of 303 of FIG. 3;
FIG. 5 is a schematic diagram of the structure of one embodiment of 401 shown in FIG. 4;
FIG. 6 is a schematic block diagram of one embodiment of 402 of FIG. 4;
FIG. 7 is a schematic block diagram of one embodiment of a computer device according to the present application.
Detailed Description
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs; the terminology used in the description of the application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application; the terms "including" and "having," and any variations thereof, in the description and claims of this application and the description of the above figures are intended to cover non-exclusive inclusions. The terms "first," "second," and the like in the description and claims of this application or in the above-described drawings are used for distinguishing between different objects and not for describing a particular order.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein may be combined with other embodiments.
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings.
As shown in fig. 1, the system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. Network 104 is the medium used to provide communication links between terminal devices 101, 102, 103 and server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
A user may use terminal devices 101, 102, 103 to interact with a server 105 over a network 104 to receive or send messages or the like. The terminal devices 101, 102, 103 may have various communication client applications installed thereon, such as a web browser application, a shopping application, a search application, an instant messaging tool, a mailbox client, social platform software, and the like.
The terminal devices 101, 102, 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, e-book readers, MP3 players (Moving Picture experts Group Audio Layer III, mpeg compression standard Audio Layer 3), MP4 players (Moving Picture experts Group Audio Layer IV, mpeg compression standard Audio Layer 4), laptop portable computers, desktop computers, and the like.
The server 105 may be a server providing various services, such as a background server providing support for pages displayed on the terminal devices 101, 102, 103.
It should be noted that, the method for automatically combining the presentation pages based on the style attributes provided in the embodiments of the present application is generally executed by a server/terminal device, and accordingly, an apparatus for automatically combining the presentation pages based on the style attributes is generally disposed in the server/terminal device.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
With continued reference to FIG. 2, a flow diagram of one embodiment of a method for automatically assembling presentation pages based on style properties is shown, in accordance with the present application. The method for automatically combining and displaying the pages based on the style attributes comprises the following steps:
step 201, acquiring a preset public style library and an overall style set of a target display card.
In this embodiment, the entire style set includes style sets of lower constituent units that constitute the target display card.
The style set of each lower-level component unit forming the target display card comprises pictures and picture stacking styles, display texts and display text stacking styles, lists and list stacking styles, carousel styles of pictures or texts in a page and the like.
By acquiring the whole style set of the target display card, the stacking style reference is conveniently provided for the conversion from the initial display card to the target display card, so that the initial display card is gradually converted into the target display card according to the reference style during the conversion, the initial display card is a certain card in the background technology, and the target display card is a target similar card in the background technology.
In this embodiment, the style set includes attribute names and attribute values of basic components constituting a style of each lower-level constituent unit of the target presentation card.
The attribute names and attribute values of the basic components forming the styles of the lower-level constituent units of the target display card take a certain lower-level constituent picture in the target display card as an example, and the basic components forming the styles of the pictures can be understood as the attribute names and attribute values of the stack styles corresponding to the pictures, for example: the attribute name "src" corresponding to the acquisition path of the picture and the specific address as the attribute value point, such as the attribute name "height" corresponding to the height of the picture and the specific height value as the attribute value, and such as the attribute name "width" corresponding to the width of the picture and the specific width value as the attribute value.
By storing the attribute name and the attribute value in a key pair value format in the set, the corresponding attribute name is used as an index in the process of converting the initial display card into the target display card, whether attribute value updating or attribute name supplementing and deleting operation is needed or not is quickly determined, and the searching operation is conveniently carried out by using the attribute name in the automatic combination process.
In this embodiment, the common style library includes all preset basic components.
In this embodiment, the common style library may default to a platform library including all attribute names in the cascading style, which ensures the diversity of the basic components and the multi-selectivity of the target attribute style.
Step 202, obtaining the initialized original style set.
In this embodiment, each of the individual elements in the public style library and the original style set is key-value pair format data, where the key-value pair is formed by an attribute name of a page content style and an attribute value corresponding to the attribute name, and the specific format is [ attribute name: attribute value ].
In this embodiment, the attribute name and the attribute value corresponding thereto are represented by a key: value formats are set in pairs, in another embodiment of this embodiment, attribute names and corresponding attribute values in the style library may also be in a { key: [ value1, value2,. So, value ] } format, selectable attribute values are enumerated in an attribute value sequence, so that an interface developer can freely select according to preset requirements when stacking styles are automatically combined, and by setting single elements in the style library and the original style set as key value pair format data, the interface developer can conveniently and freely select, and target value sufficiency when selecting attribute values is ensured.
Step 203, according to a page generation instruction, taking the whole style set of the target display card as a reference style, selecting a corresponding basic component from the public style library, operating the original style set, and generating the target display card according to a final operation result of the original style set.
In this embodiment, the step of operating the original style set includes: and judging the relationship between the elements in the original style set and the whole style set of the target display card, and carrying out optimization operation on the elements in the original style set according to the judgment result.
The method comprises the steps of judging the relationship between an original style set and elements in the whole style set of the target display card, optimizing the elements in the original style set, avoiding that a source logic code is directly changed in a code development mode when an interface is developed, circularly searching different attribute names and attribute values between the original style set and the source logic code under the condition of not changing the source logic code directly through a comparison principle, and then carrying out configuration replacement, avoiding a large amount of source logic codes from being changed, ensuring repeated multiplexing of the source logic code, and simultaneously circularly multiplexing a style library in a comparison combination mode when the source logic code is updated later, so that the workload of developers is reduced.
In this embodiment, the step of determining a relationship between elements in the original style set and the entire style set of the target display card, and performing an optimization operation on the elements in the original style set according to a determination result includes: comparing the attribute names in the original style set with the attribute names in the overall style set of the target display card, and judging whether all the attribute names in the original style set are contained in the overall style set of the target display card; if all the attribute names in the original style set are contained in the overall style set of the target display card, judging whether the attribute values corresponding to the attribute names in the original style set are the same as the corresponding attribute values in the overall style set of the target display card; if not, acquiring a corresponding attribute value to perform replacement operation; if the attribute names are the same, acquiring the attribute names which do not belong to the original style set in the whole style set of the target display card, and acquiring corresponding basic components from the public style library according to the attribute names to add the basic components into the original style set.
In this embodiment, the step of determining a relationship between elements in the original style set and the entire style set of the target display card, and performing optimization operation on the elements in the original style set according to a determination result further includes: if the attribute names in the original style set are not all contained in the overall style set of the target display card, deleting corresponding distinguishing elements, wherein the distinguishing elements represent the attribute names contained in the original style set but not contained in the overall style set of the target display card and the attribute values corresponding to the attribute names; identifying the attribute name in the original style set, which is the same as the attribute name in the whole style set of the target display card, and judging whether the attribute value corresponding to the attribute name in the original style set is the same as the corresponding attribute value in the whole style set of the target display card; if not, acquiring a corresponding attribute value to perform replacement operation; if the attribute names are the same, acquiring the attribute names which do not belong to the original style set in the whole style set of the target display card, and acquiring corresponding basic components from the public style library according to the attribute names to add the basic components into the original style set.
In this embodiment, the step of obtaining the corresponding attribute value to perform the replacement operation specifically includes: acquiring an attribute value corresponding to the attribute name from the overall style set of the target display card; and replacing the attribute value to the attribute value corresponding to the corresponding attribute name in the original style set.
In this embodiment, the step of obtaining an attribute name, which does not belong to the original style set, in the entire style set of the target display card, and obtaining a corresponding basic component from the public style library according to the attribute name to add to the original style set specifically includes: acquiring attribute names which do not belong to the original style set in the overall style set of the target display card; sequentially acquiring basic components corresponding to each attribute name from the style library according to the attribute names and a preset adding sequence, and adding the basic components to the original style set; and according to the attribute names and the adding sequence, sequentially acquiring attribute values corresponding to the current attribute names from the whole style set of the target display card and adding the attribute values into the original style set until the number of elements in the original style set is the same as that of elements in the whole style set of the target display card, and finishing the adding operation of the original style set.
In this embodiment, the step of obtaining an attribute value corresponding to a current attribute name from the entire style set of the target display card and adding the attribute value to the original style set specifically includes: searching an attribute value corresponding to the current attribute name by taking the current attribute name as a retrieval key field and the public style library as a retrieval source, and adding the attribute value into the original style set
And finishing the adding operation of the elements in the original style set by a cyclic adding mode until the number of the elements in the original style set is the same as that of the elements in the whole style set of the target display card, namely finishing the conversion from the original style set to the whole style set of the target display card.
And 204, performing page typesetting on each used target display card according to a preset typesetting format to generate an interface display page.
The method comprises the steps of obtaining an overall style set of a target display card, wherein the overall style set comprises style sets of all lower-level constituent units forming the target display card, and the style sets comprise attribute names and attribute values of basic components forming styles of all lower-level constituent units of the target display card; acquiring a style library comprising all preset basic components, wherein the style library comprises all the preset basic components; acquiring an initialized original style set; according to a page generation instruction, taking the whole style set of the target display card as a reference style, selecting a corresponding basic component from the style library, operating the original style set, and generating the target display card according to a final operation result of the original style set; and performing page typesetting on each used target display card according to a preset typesetting format to generate an interface display page. According to the method and the device, the target display cards are sequentially generated through combination control from the attributes of the minimum interface forming units, and then the interface display pages are generated through the target display cards, so that the conversion among similar cards can be automatically controlled more accurately under the condition that the original code logic is not modified.
The embodiment of the application can acquire and process related data based on an artificial intelligence technology. Among them, artificial Intelligence (AI) is a theory, method, technique and application system that simulates, extends and expands human Intelligence using a digital computer or a machine controlled by a digital computer, senses the environment, acquires knowledge and uses the knowledge to obtain the best result.
The artificial intelligence base technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technologies, operation/interaction systems, mechatronics, and the like. The artificial intelligence software technology mainly comprises a computer vision technology, a robot technology, a biological recognition technology, a voice processing technology, a natural language processing technology, machine learning/deep learning and the like.
In the embodiment of the application, the front-end UI display units can be finely controlled in an intelligent hosting model mode, specifically, an integral style set of a target display card is pre-input into the intelligent hosting model, the public style library is used as a search library of the model, the initial style set is used as an input value, and stacked style updating is carried out through a comparison and screening mode and a preset updating and replacing condition until the number of elements in the initial style set is the same as that of the elements in the style set of the target display card, model output is carried out, the updated initial style set is output, a machine model is used for replacing manual updating, and the workload of interface developers and later-stage interface operators is reduced.
With further reference to fig. 3, as an implementation of the method shown in fig. 2, the present application provides an embodiment of an apparatus for automatically combining presentation pages based on style attributes, where the embodiment of the apparatus corresponds to the embodiment of the method shown in fig. 2, and the apparatus may be specifically applied to various electronic devices.
As shown in fig. 3, the apparatus 300 for automatically combining presentation pages based on style attributes according to this embodiment includes: a reference style obtaining module 301, an original style obtaining module 302, a target display card generating module 303 and an interface display page generating module 304. Wherein:
a reference style obtaining module 301, configured to obtain a preset public style library and an entire style set of a target display card, where the public style library includes all preset basic components;
an original style acquisition module 302, configured to acquire an initialized original style set;
a target display card generation module 303, configured to select a corresponding basic component from the public style library by using the entire style set of the target display card as a reference style according to a page generation instruction, perform an operation on the original style set, and generate a target display card according to a final operation result on the original style set;
the interface display page generating module 304 is configured to perform page layout on each used target display card according to a preset layout format, and generate an interface display page.
With continuing reference to fig. 4, fig. 4 is a schematic structural diagram of an embodiment of the target display card generating module 303 shown in fig. 3, where the target display card generating module 303 includes: a decision sub-module 401 and an optimization sub-module 402. Wherein:
the judging sub-module 401 is configured to judge a relationship between elements in the original style set and an entire style set of the target display card.
And the optimization submodule 402 is configured to perform optimization operation on elements in the original style set according to the determination result.
With continuing reference to fig. 5, fig. 5 is a schematic structural diagram of an embodiment 401 shown in fig. 4, where the determining sub-module 401 includes: a first judgment unit 501, a second judgment unit 502 and a third judgment unit 503. Wherein:
a first determining unit 501, configured to compare the attribute names in the original style set with the attribute names in the entire style set of the target display card, and determine whether all the attribute names in the original style set are included in the entire style set of the target display card;
a second determining unit 502, configured to determine whether an attribute value corresponding to the attribute name in the original style set is the same as a corresponding attribute value in the entire style set of the target display card if all the attribute names in the original style set are included in the entire style set of the target display card;
a third determining unit 503, configured to delete the corresponding distinguishing element if all the attribute names in the original style set are not included in the entire style set of the target display card, identify an attribute name in the original style set that is the same as the attribute name in the entire style set of the target display card, and determine whether an attribute value of the attribute name in the original style set is the same as an attribute value in the entire style set of the target display card.
With continuing reference to fig. 6, fig. 6 is a schematic structural diagram of an embodiment of the optimization submodule 402 shown in fig. 4, where the optimization submodule 402 includes: a first optimization unit 601 and a second optimization unit 602.
Wherein:
a first optimizing unit 601, configured to, if the attribute value corresponding to the attribute name in the original style set is different from the attribute value corresponding to the entire style set of the target display card, obtain the corresponding attribute value to perform a replacement operation, which specifically includes: and acquiring the attribute value corresponding to the attribute name from the overall style set of the target display card, and replacing the attribute value to the attribute value corresponding to the attribute name in the original style set.
A second optimizing unit 602, configured to, if the attribute value corresponding to the attribute name in the original style set is the same as the corresponding attribute value in the entire style set of the target display card, obtain an attribute name that does not belong to the original style set in the entire style set of the target display card, and obtain a corresponding basic component from the public style library according to the attribute name and add the basic component to the original style set.
The conversion between similar cards is automatically controlled more accurately by the plurality of judging subunits and the optimizing subunit.
The method comprises the steps of obtaining an overall style set of a target display card, wherein the overall style set comprises style sets of all lower-level constituent units forming the target display card, and the style sets comprise attribute names and attribute values of basic components forming styles of all lower-level constituent units of the target display card; acquiring a style library comprising all preset basic components, wherein the style library comprises all the preset basic components; acquiring an initialized original style set; according to a page generation instruction, taking the whole style set of the target display card as a reference style, selecting a corresponding basic component from the style library, operating the original style set, and generating the target display card according to a final operation result of the original style set; and performing page typesetting on each used target display card according to a preset typesetting format to generate an interface display page. According to the method and the device, the target display cards are sequentially generated through combination control from the attributes of the minimum interface forming units, and then the interface display pages are generated through the target display cards, so that the conversion among similar cards can be automatically controlled more accurately under the condition that the original code logic is not modified.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware associated with computer readable instructions, which can be stored in a computer readable storage medium, and when executed, the programs can include the processes of the embodiments of the methods described above. The storage medium may be a non-volatile storage medium such as a magnetic disk, an optical disk, a Read-Only Memory (ROM), or a Random Access Memory (RAM).
It should be understood that, although the steps in the flowcharts of the figures are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and may be performed in other orders unless explicitly stated herein. Moreover, at least a portion of the steps in the flow chart of the figure may include multiple sub-steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of execution is not necessarily sequential, but may be performed alternately or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
In order to solve the technical problem, an embodiment of the present application further provides a computer device. Referring to fig. 7 in particular, fig. 7 is a block diagram of a basic structure of a computer device according to the embodiment.
The computer device 7 comprises a memory 71, a processor 72, a network interface 73, which are communicatively connected to each other via a system bus. It is noted that only a computer device 7 having components 71-73 is shown in the figure, but it is to be understood that not all of the shown components are required to be implemented, and that more or less components may alternatively be implemented. As will be understood by those skilled in the art, the computer device is a device capable of automatically performing numerical calculation and/or information processing according to instructions set or stored in advance, and the hardware thereof includes but is not limited to a microprocessor, an Application Specific Integrated Circuit (ASIC), a Programmable Gate Array (FPGA), a Digital Signal Processor (DSP), an embedded device, and the like.
The computer device can be a desktop computer, a notebook, a palm computer, a cloud server and other computing devices. The computer equipment can carry out man-machine interaction with a user through a keyboard, a mouse, a remote controller, a touch panel or voice control equipment and the like.
The memory 71 includes at least one type of readable storage medium including flash memory, hard disks, multimedia cards, card-type memory (e.g., SD or DX memory, etc.), random Access Memory (RAM), static Random Access Memory (SRAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), programmable Read Only Memory (PROM), magnetic memory, magnetic disks, optical disks, etc. In some embodiments, the storage 71 may be an internal storage unit of the computer device 7, such as a hard disk or a memory of the computer device 7. In other embodiments, the memory 71 may also be an external storage device of the computer device 7, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the computer device 7. Of course, the memory 71 may also comprise both an internal storage unit of the computer device 7 and an external storage device thereof. In this embodiment, the memory 71 is generally used for storing an operating system and various types of application software installed on the computer device 7, such as computer readable instructions of a method for automatically assembling presentation pages based on style attributes. Further, the memory 71 may also be used to temporarily store various types of data that have been output or are to be output.
The processor 72 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor, or other data Processing chip in some embodiments. The processor 72 is typically used to control the overall operation of the computer device 7. In this embodiment, the processor 72 is configured to execute computer readable instructions stored in the memory 71 or process data, for example, execute computer readable instructions of the method for automatically assembling presentation pages based on style attributes.
The network interface 73 may comprise a wireless network interface or a wired network interface, and the network interface 73 is generally used for establishing a communication connection between the computer device 7 and other electronic devices.
The embodiment provides computer equipment, and belongs to the technical field of UI design. The method comprises the steps of obtaining an overall style set of a target display card, wherein the overall style set comprises style sets of all lower-level constituent units forming the target display card, and the style sets comprise attribute names and attribute values of basic components forming styles of all lower-level constituent units of the target display card; acquiring a style library comprising all preset basic components, wherein the style library comprises all the preset basic components; acquiring an initialized original style set; according to a page generation instruction, taking the whole style set of the target display card as a reference style, selecting a corresponding basic component from the style library, operating the original style set, and generating the target display card according to a final operation result of the original style set; and performing page typesetting on each used target display card according to a preset typesetting format to generate an interface display page. According to the method and the device, the target display cards are sequentially generated by performing combination control from the attributes of the minimum interface forming units, and then the interface display pages are generated by the target display cards, so that the conversion between similar cards can be automatically controlled more accurately without modifying the original code logic.
The present application provides yet another embodiment, which provides a computer-readable storage medium storing computer-readable instructions executable by a processor to cause the processor to perform the steps of the method for automatically assembling presentation pages based on style properties as described above.
The embodiment provides a computer-readable storage medium, and belongs to the technical field of UI design. The method comprises the steps of obtaining an overall style set of a target display card, wherein the overall style set comprises style sets of all lower-level constituent units forming the target display card, and the style sets comprise attribute names and attribute values of basic components forming styles of all lower-level constituent units of the target display card; acquiring a style library comprising all preset basic components, wherein the style library comprises all the preset basic components; acquiring an initialized original style set; according to a page generation instruction, taking the whole style set of the target display card as a reference style, selecting a corresponding basic component from the style library, operating the original style set, and generating the target display card according to a final operation result of the original style set; and performing page typesetting on each used target display card according to a preset typesetting format to generate an interface display page. According to the method and the device, the target display cards are sequentially generated through combination control from the attributes of the minimum interface forming units, and then the interface display pages are generated through the target display cards, so that the conversion among similar cards can be automatically controlled more accurately under the condition that the original code logic is not modified.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present application.
It should be understood that the above-described embodiments are merely exemplary of some, and not all, embodiments of the present application, and that the drawings illustrate preferred embodiments of the present application without limiting the scope of the claims appended hereto. This application is capable of embodiments in many different forms and the embodiments are provided so that this disclosure will be thorough and complete. Although the present application has been described in detail with reference to the foregoing embodiments, it will be apparent to one skilled in the art that modifications can be made to the embodiments described in the foregoing detailed description, or equivalents can be substituted for some of the features described therein. All equivalent structures made by using the contents of the specification and the drawings of the present application are directly or indirectly applied to other related technical fields, and all the equivalent structures are within the protection scope of the present application.

Claims (10)

1. A method for automatically combining and displaying pages based on style attributes is characterized by comprising the following steps:
acquiring an integral style set of a preset public style library and a target display card, wherein the public style library comprises all preset basic components;
acquiring an initialized original style set;
according to a page generation instruction, taking the whole style set of the target display card as a reference style, selecting a corresponding basic component from the public style library, operating the original style set, and generating the target display card according to a final operation result of the original style set;
and performing page typesetting on each used target display card according to a preset typesetting format to generate an interface display page.
2. The method for automatically assembling presentation pages based on style properties according to claim 1, wherein said step of operating on said original style set comprises:
and judging the relationship between the elements in the original style set and the whole style set of the target display card, and carrying out optimization operation on the elements in the original style set according to the judgment result.
3. The method for automatically composing a presentation page based on style attributes according to claim 2, wherein the entire style set comprises attribute names and attribute values of basic components constituting styles of lower constituent units of the target presentation card; the step of judging the relationship between the elements in the original style set and the whole style set of the target display card and carrying out optimization operation on the elements in the original style set according to the judgment result comprises the following steps:
comparing the attribute names in the original style set with the attribute names in the whole style set of the target display card, and judging whether all the attribute names in the original style set are contained in the whole style set of the target display card;
if all the attribute names in the original style set are contained in the overall style set of the target display card, judging whether the attribute values corresponding to the attribute names in the original style set are the same as the corresponding attribute values in the overall style set of the target display card;
if not, acquiring a corresponding attribute value to perform replacement operation;
if the attribute names are the same, acquiring the attribute names which do not belong to the original style set in the whole style set of the target display card, and acquiring corresponding basic components from the public style library according to the attribute names to add the basic components into the original style set.
4. The method of claim 3, wherein after the step of determining whether all of the attribute names in the original style set are contained in the entire style set of the target display card, the method further comprises:
if the attribute names in the original style set are not all contained in the overall style set of the target display card, deleting corresponding distinguishing elements, wherein the distinguishing elements represent the attribute names contained in the original style set but not contained in the overall style set of the target display card and the attribute values corresponding to the attribute names;
identifying the attribute name in the original style set, which is the same as the attribute name in the whole style set of the target display card, and judging whether the attribute value corresponding to the attribute name in the original style set is the same as the attribute value corresponding to the attribute name in the whole style set of the target display card;
if not, acquiring a corresponding attribute value to perform replacement operation;
if the attribute names are the same, acquiring the attribute names which do not belong to the original style set in the whole style set of the target display card, and acquiring corresponding basic components from the public style library according to the attribute names to add the basic components into the original style set.
5. The method for automatically combining and displaying the pages based on the style attributes according to claim 3 or 4, wherein the step of obtaining the corresponding attribute values for performing the replacement operation specifically comprises:
acquiring an attribute value corresponding to the attribute name from the overall style set of the target display card;
and replacing the attribute value to the attribute value corresponding to the attribute name in the original style set.
6. The method according to claim 3 or 4, wherein the step of obtaining the attribute name in the entire style set of the target display card, which is not in the original style set, and obtaining the corresponding basic component from the public style library according to the attribute name to add to the original style set specifically comprises:
acquiring attribute names which do not belong to the original style set in the overall style set of the target display card;
according to the attribute names and a preset adding sequence, sequentially acquiring basic components corresponding to each attribute name from the public style library and adding the basic components to the original style set;
according to the attribute names and the adding sequence, acquiring attribute values corresponding to the current attribute names from the whole style set of the target display card in sequence and adding the attribute values to the original style set,
and finishing the adding operation of the original style set until the number of the elements in the original style set is the same as the number of the elements in the whole style set of the target display card.
7. The method for automatically assembling presentation pages based on style attributes according to claim 6, wherein the step of obtaining the attribute value corresponding to the current attribute name from the overall style set of the target presentation card and adding the attribute value to the original style set specifically comprises:
and searching an attribute value corresponding to the current attribute name by taking the current attribute name as a retrieval key field and the public style library as a retrieval source, and adding the attribute value into the original style set.
8. An apparatus for automatically assembling presentation pages based on style properties, comprising:
the system comprises a reference style acquisition module, a reference style acquisition module and a target display card display module, wherein the reference style acquisition module is used for acquiring an integral style set of a preset public style library and a target display card, and the public style library comprises all preset basic components;
the original style acquisition module is used for acquiring an initialized original style set;
the target display card generation module is used for selecting a corresponding basic component from the public style library by taking the whole style set of the target display card as a reference style according to a page generation instruction, operating the original style set and generating a target display card according to a final operation result of the original style set;
and the interface display page generation module is used for performing page typesetting on each target display card used according to a preset typesetting format to generate an interface display page.
9. A computer device comprising a memory having computer readable instructions stored therein and a processor which when executed implements the steps of the method of automatically assembling presentation pages based on style attributes according to any one of claims 1 to 7.
10. A computer-readable storage medium, having computer-readable instructions stored thereon, which, when executed by a processor, implement the steps of the method for automatically assembling presentation pages based on style attributes according to any one of claims 1 to 7.
CN202211430922.7A 2022-11-15 2022-11-15 Method for automatically combining and displaying pages based on style attributes and related equipment thereof Pending CN115756692A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211430922.7A CN115756692A (en) 2022-11-15 2022-11-15 Method for automatically combining and displaying pages based on style attributes and related equipment thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211430922.7A CN115756692A (en) 2022-11-15 2022-11-15 Method for automatically combining and displaying pages based on style attributes and related equipment thereof

Publications (1)

Publication Number Publication Date
CN115756692A true CN115756692A (en) 2023-03-07

Family

ID=85371451

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211430922.7A Pending CN115756692A (en) 2022-11-15 2022-11-15 Method for automatically combining and displaying pages based on style attributes and related equipment thereof

Country Status (1)

Country Link
CN (1) CN115756692A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116204091A (en) * 2023-05-04 2023-06-02 北京尽微致广信息技术有限公司 Style setting method and device, storage medium and electronic equipment

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116204091A (en) * 2023-05-04 2023-06-02 北京尽微致广信息技术有限公司 Style setting method and device, storage medium and electronic equipment

Similar Documents

Publication Publication Date Title
CN110520859B (en) More intelligent copy/paste
CN104823158A (en) Method and system for simplified knowledge engineering
CN107391535A (en) The method and device of document is searched in document application
CN115756692A (en) Method for automatically combining and displaying pages based on style attributes and related equipment thereof
CN117033249A (en) Test case generation method and device, computer equipment and storage medium
CN116661936A (en) Page data processing method and device, computer equipment and storage medium
CN111143568A (en) Method, device and equipment for buffering during paper classification and storage medium
CN116755688A (en) Component processing method, device, computer equipment and storage medium
CN115185625A (en) Self-recommendation type interface updating method based on configurable card and related equipment thereof
CN111723177B (en) Modeling method and device of information extraction model and electronic equipment
CN114565316A (en) Task issuing method based on micro-service architecture and related equipment
CN115061916A (en) Method for automatically generating interface test case and related equipment thereof
CN114510908A (en) Data export method and device, computer equipment and storage medium
CN114968725A (en) Task dependency relationship correction method and device, computer equipment and storage medium
CN114722787B (en) Tag matching method based on Excel cascading and related equipment thereof
CN114510916B (en) Template loading method and device, computer equipment and storage medium
CN113704593B (en) Operation data processing method and related device
US11688193B2 (en) Interactive structure annotation with artificial intelligence
CN115828018A (en) Electronic magazine interface material replacing method and related equipment thereof
CN115756693A (en) Conversion control method of variable sub-assembly between similar cards and related equipment thereof
CN116933733A (en) Text input display method, device, equipment and storage medium thereof
CN115578050A (en) Approval progress identification method and device, computer equipment and storage medium
US20210081803A1 (en) On-Demand Knowledge Resource Management
CN116611434A (en) Data enhancement method, device, equipment and storage medium thereof
CN117235260A (en) Text labeling method, device, equipment and storage medium based on artificial intelligence

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