[go: up one dir, main page]

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
original
display card
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
CN202211430922.7A
Other languages
Chinese (zh)
Other versions
CN115756692B (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.)
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/CN115756692B/en
Publication of CN115756692A publication Critical patent/CN115756692A/en
Application granted granted Critical
Publication of CN115756692B publication Critical patent/CN115756692B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • User Interface Of Digital Computer (AREA)

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

技术领域technical field

本申请涉及UI设计及页面文件快速编辑技术领域,尤其涉及一种基于样式属性自动组合展示页面的方法及其相关设备。The present 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.

背景技术Background technique

对于相似的页面组成单元(子卡片),由某一个卡片转变为其目标相似卡片的属性样式,现有的做法为修改原有逻辑,通过大量传参控制展示,可以解决上面的问题,但是该方式操作繁复,无法复用,也不通用。For similar page components (sub-cards), the existing method is to modify the original logic and control the display by passing a large number of parameters to control the display from a certain card, but the above problem can be solved. The method is complicated to operate, cannot be reused, and is not universal.

以医疗防疫为例,在防疫过程中,各种防疫小程序的出现有效帮助了人们进行预防,例如:最新发布界面,如果存在更多的样式变种,比如要控制助手标题的颜色,控制背景,控制新增确诊的文本颜色,文本大小等等,如何才能在不修改原有代码逻辑,也能做到对相似卡片间的转换做到更为精确的控制。Taking medical epidemic prevention as an example, in the process of epidemic prevention, the emergence of various epidemic prevention applets has effectively helped people prevent. For example, if there are more style variants in the latest release interface, such as controlling the color of the assistant title and background, Control the text color, text size, etc. of the newly diagnosed diagnosis. How can we achieve more precise control of the conversion between similar cards without modifying the original code logic.

发明内容Contents of the invention

本申请实施例的目的在于提出一种基于样式属性自动组合展示页面的方法及其相关设备,以便于在不修改原有代码逻辑的情况下,也能自动对相似卡片间的转换做到更为精确的控制。The purpose of the embodiment of this application is to propose a method for automatically combining and displaying pages based on style attributes and related equipment, so that the conversion between similar cards can be automatically done more efficiently without modifying the original code logic. precise control.

为了解决上述技术问题,本申请实施例提供一种基于样式属性自动组合展示页面的方法,采用了如下所述的技术方案:In order to solve the above technical problems, the embodiment of the present application provides a method for automatically combining and displaying pages based on style attributes, and adopts the following technical solutions:

一种基于样式属性自动组合展示页面的方法,包括下述步骤:A method for automatically combining and displaying pages based on style attributes, comprising the following steps:

获取预设公共样式库和目标展示卡的整体样式集合,其中,所述公共样式库中包含了所有预设基本组件;Obtaining a preset public style library and an overall style collection of target display cards, wherein the public style library includes all preset basic components;

获取初始化的原始样式集合;Get the initialized original style collection;

根据页面生成指令,以所述目标展示卡的整体样式集合为参考样式,从所述公共样式库中选择相应的基本组件,对所述原始样式集合进行操作,根据对所述原始样式集合的最终操作结果生成目标展示卡;According to the page generation instruction, using the overall style set of the target display card as a reference style, select the corresponding basic components from the public style library, and operate on the original style set, according to the final result of the original style set The operation result generates a target display card;

根据预设排版格式对使用到的各个目标展示卡进行页面排版,生成界面展示页。According to the preset layout format, perform page layout for each target display card used to generate an interface display page.

进一步的,所述对所述原始样式集合进行操作的步骤,包括:Further, the step of operating the original style collection includes:

判断所述原始样式集合和所述目标展示卡的整体样式集合中元素的关系,并根据判断结果对所述原始样式集合中元素进行优化操作。Judging the relationship between the original style set and the elements in the overall style set of the target display card, and optimizing the elements in the original style set according to the judgment result.

进一步的,所述整体样式集合包括组成所述目标展示卡的各下级组成单元的样式的基本组件的属性名称和属性值;所述判断所述原始样式集合和所述目标展示卡的整体样式集合中元素的关系,并根据判断结果对所述原始样式集合中元素进行优化操作的步骤,包括:Further, the overall style set includes the attribute names and attribute values of the basic components of the style of each subordinate component unit of the target display card; the judgment of the original style set and the overall style set of the target display card The relationship between the elements in the original style set, and the step of optimizing the elements in the original style set according to the judgment result, including:

根据所述原始样式集合中的属性名称和所述目标展示卡的整体样式集合中属性名称,进行对比,判断所述原始样式集合中属性名称是否全部被包含于所述目标展示卡的整体样式集合中;According to the attribute names in the original style set and the attribute names in the overall style set of the target display card, compare and judge whether all the attribute names in the original style set are included in the overall style set of the target display card middle;

若所述原始样式集合中属性名称全部被包含于所述目标展示卡的整体样式集合中,则判断所述原始样式集合中属性名称对应的属性值是否与所述目标展示卡的整体样式集合中相对应的属性值相同;If all the attribute names in the original style set are included in the overall style set of the target display card, then judge whether the attribute value corresponding to the attribute name in the original style set is in the overall style set of the target display card The corresponding attribute values are the same;

若不相同,则获取相对应的属性值进行替换操作;If they are not the same, get the corresponding attribute value to perform the replacement operation;

若相同,则获取所述目标展示卡的整体样式集合中不属于所述原始样式集合中的属性名称,并根据所述属性名称从所述公共样式库中获取相对应的基础组件添加到所述原始样式集合中。If they are the same, obtain the attribute names in the overall style collection of the target display card that do not belong to the original style collection, and obtain the corresponding basic components from the public style library according to the attribute names and add them to the Original style collection.

进一步的,所述判断所述原始样式集合中属性名称是否全部被包含于所述目标展示卡的整体样式集合中的步骤之后,还包括:Further, after the step of judging whether the attribute names in the original style set are all included in the overall style set of the target display card, it also includes:

若所述原始样式集合中属性名称未全部被包含于所述目标展示卡的整体样式集合中,则删除对应区别元素,其中,所述区别元素表示所述原始样式集合中包含而所述目标展示卡的整体样式集合中未包含的属性名称及所述属性名称对应的属性值;If the attribute names in the original style set are not all included in the overall style set of the target display card, then delete the corresponding difference element, wherein the difference element indicates that the original style set contains and the target display Attribute names not included in the overall style set of the card and the attribute values corresponding to the attribute names;

识别所述原始样式集合中与所述目标展示卡的整体样式集合中相同的属性名称,并判断所述属性名称在所述原始样式集合中对应的属性值是否与所述目标展示卡的整体样式集合中相对应的属性值相同;identifying the same attribute name in the original style set as in the overall style set of the target display card, and judging whether the attribute value corresponding to the attribute name in the original style set is consistent with the overall style of the target display card The corresponding attribute values in the collection are the same;

若不相同,则获取相对应的属性值进行替换操作;If they are not the same, get the corresponding attribute value to perform the replacement operation;

若相同,则获取所述目标展示卡的整体样式集合中不属于所述原始样式集合中的属性名称,并根据所述属性名称从所述公共样式库中获取相对应的基础组件添加到所述原始样式集合中。If they are the same, obtain the attribute names in the overall style collection of the target display card that do not belong to the original style collection, and obtain the corresponding basic components from the public style library according to the attribute names and add them to the Original style collection.

进一步的,所述获取相对应的属性值进行替换操作的步骤,具体包括:Further, the step of obtaining the corresponding attribute value to perform the replacement operation specifically includes:

从所述目标展示卡的整体样式集合中获取与所述属性名称相对应的属性值;Obtain the attribute value corresponding to the attribute name from the overall style set of the target display card;

并将所述属性值替换到所述原始样式集合中对应属性名称所对应的属性值处。And replace the attribute value with the attribute value corresponding to the attribute name in the original style set.

进一步的,所述获取所述目标展示卡的整体样式集合中不属于所述原始样式集合中的属性名称,并根据所述属性名称从所述公共样式库中获取相对应的基础组件添加到所述原始样式集合中的步骤,具体包括:Further, the acquisition of attribute names in the overall style set of the target display card that do not belong to the original style set, and the corresponding basic components are obtained from the public style library according to the attribute names and added to the Describe the steps in the original style collection, including:

获取所述目标展示卡的整体样式集合中不属于所述原始样式集合中的属性名称;Acquiring attribute names in the overall style set of the target presentation card that do not belong to the original style set;

根据所述属性名称和预设添加顺序,从所述公共样式库中依次获取每一个属性名称相对应的基础组件添加到所述原始样式集合;According to the attribute name and the preset adding order, sequentially obtain the basic components corresponding to each attribute name from the public style library and add them to the original style collection;

根据所述属性名称和所述添加顺序,依次从所述目标展示卡的整体样式集合中获取当前属性名称对应的属性值添加到所述原始样式集合,直到所述原始样式集合中的元素数量与所述目标展示卡的整体样式集合中元素数量相同,对所述原始样式集合的添加操作完成。According to the attribute name and the adding sequence, the attribute value corresponding to the current attribute name is sequentially obtained from the overall style set of the target display card and added to the original style set until the number of elements in the original style set is equal to The number of elements in the overall style set of the target display card is the same, and the addition operation to the original style set is completed.

进一步的,所述从所述目标展示卡的整体样式集合中获取当前属性名称对应的属性值添加到所述原始样式集合的步骤,具体包括:Further, the step of acquiring the attribute value corresponding to the current attribute name from the overall style set of the target display card and adding it to the original style set specifically includes:

以所述当前属性名称为检索关键字段,以所述公共样式库为检索源,查找所述当前属性名称对应的属性值,并将所述属性值添加到所述原始样式集合中。Using the current attribute name as a retrieval key field and the public style library as a retrieval source, search for an attribute value corresponding to the current attribute name, and add the attribute value to the original style set.

为了解决上述技术问题,本申请实施例还提供一种基于样式属性自动组合展示页面的装置,采用了如下所述的技术方案:In order to solve the above technical problems, the embodiment of the present application also provides a device for automatically combining and displaying pages based on style attributes, which adopts the following technical solutions:

一种基于样式属性自动组合展示页面的装置,包括:A device for automatically combining and displaying pages based on style attributes, including:

参照样式获取模块,用于获取预设公共样式库和目标展示卡的整体样式集合,其中,所述公共样式库中包含了所有预设基本组件;The reference style acquisition module is used to acquire the preset public style library and the overall style collection of the target display card, wherein the public style library includes all preset basic components;

原始样式获取模块,用于获取初始化的原始样式集合;The original style acquisition module is used to obtain the initialized original style collection;

目标展示卡生成模块,用于根据页面生成指令,以所述目标展示卡的整体样式集合为参考样式,从所述公共样式库中选择相应的基本组件,对所述原始样式集合进行操作,根据对所述原始样式集合的最终操作结果生成目标展示卡;The target display card generating module is configured to use the overall style set of the target display card as a reference style according to the page generation instruction, select corresponding basic components from the public style library, and operate on the original style set, according to Generate a target display card for the final operation result of the original style set;

界面展示页生成模块,用于根据预设排版格式对使用到的各个目标展示卡进行页面排版,生成界面展示页。The interface display page generation module is used to perform page layout for each used target display card according to a preset layout format, and generate an interface display page.

为了解决上述技术问题,本申请实施例还提供一种计算机设备,采用了如下所述的技术方案:In order to solve the above technical problems, the embodiment of the present application also provides a computer device, which adopts the following technical solution:

一种计算机设备,包括存储器和处理器,所述存储器中存储有计算机可读指令,所述处理器执行所述计算机可读指令时实现上述所述的基于样式属性自动组合展示页面的方法的步骤。A computer device, comprising a memory and a processor, wherein computer-readable instructions are stored in the memory, and when the processor executes the computer-readable instructions, the steps of the above-mentioned method for automatically combining and displaying pages based on style attributes are realized .

为了解决上述技术问题,本申请实施例还提供一种计算机可读存储介质,采用了如下所述的技术方案:In order to solve the above technical problems, the embodiment of the present application also provides a computer-readable storage medium, which adopts the following technical solution:

一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机可读指令,所述计算机可读指令被处理器执行时实现如上述所述的基于样式属性自动组合展示页面的方法的步骤。A computer-readable storage medium, where computer-readable instructions are stored on the computer-readable storage medium, and when the computer-readable instructions are executed by a processor, the method for automatically combining and displaying pages based on style attributes as described above is implemented step.

与现有技术相比,本申请实施例主要有以下有益效果:Compared with the prior art, the embodiments of the present application mainly have the following beneficial effects:

本申请实施例所述基于样式属性自动组合展示页面的方法,通过获取目标展示卡的整体样式集合,其中,所述整体样式集合中包括组成所述目标展示卡的各下级组成单元的样式集合,其中,所述样式集合包括组成所述目标展示卡的各下级组成单元的样式的基本组件的属性名称和属性值;获取包括所有预设基本组件的样式库,其中,所述样式库中包含了所有预设基本组件;获取初始化的原始样式集合;根据页面生成指令,以所述目标展示卡的整体样式集合为参考样式,从所述样式库中选择相应的基本组件,对所述原始样式集合进行操作,根据对所述原始样式集合的最终操作结果生成目标展示卡;根据预设排版格式对使用到的各个目标展示卡进行页面排版,生成界面展示页。本申请通过从界面最小构成单元的属性进行组合控制,依次生成目标展示卡,再通过目标展示卡生成界面展示页,保证了在不修改原有代码逻辑的情况下,也能自动对相似卡片间的转换做到更为精确的控制。The method for automatically combining and displaying pages based on style attributes described in the embodiment of the present application obtains the overall style set of the target display card, wherein the overall style set includes the style sets of the lower-level components that make up the target display card, Wherein, the style collection includes the attribute names and attribute values of the basic components of the style of each lower-level component unit of the target display card; obtain a style library including all preset basic components, wherein the style library includes All preset basic components; obtain the initialized original style set; according to the page generation instruction, take the overall style set of the target display card as a reference style, select the corresponding basic component from the style library, and set the original style set Perform an operation to generate a target display card according to the final operation result of the original style set; perform page layout for each target display card used according to a preset typesetting format to generate an interface display page. This application combines and controls the attributes of the smallest constituent unit of the interface, generates target display cards in turn, and then generates interface display pages through the target display cards, ensuring that similar cards can be automatically compared without modifying the original code logic. conversion to achieve more precise control.

附图说明Description of drawings

为了更清楚地说明本申请中的方案,下面将对本申请实施例描述中所需要使用的附图作一个简单介绍,显而易见地,下面描述中的附图是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to illustrate the solution in this application more clearly, a brief introduction will be given below to the accompanying drawings that need to be used in the description of the embodiments of the application. Obviously, the accompanying drawings in the following description are some embodiments of the application. Ordinary technicians can also obtain other drawings based on these drawings on the premise of not paying creative work.

图1是本申请可以应用于其中的示例性系统架构图;FIG. 1 is an exemplary system architecture diagram to which the present application can be applied;

图2根据本申请的基于样式属性自动组合展示页面的方法的一个实施例的流程图;FIG. 2 is a flowchart of an embodiment of a method for automatically combining and displaying pages based on style attributes according to the present application;

图3根据本申请的基于样式属性自动组合展示页面的装置的一个实施例的结构示意图;FIG. 3 is a schematic structural diagram of an embodiment of a device for automatically combining and displaying pages based on style attributes according to the present application;

图4是图3所示303的一种具体实施方式的结构示意图;Fig. 4 is a structural schematic diagram of a specific implementation manner of 303 shown in Fig. 3;

图5是图4所示401的一种具体实施方式的结构示意图;Fig. 5 is a structural schematic diagram of a specific implementation manner of 401 shown in Fig. 4;

图6是图4所示402的一种具体实施方式的结构示意图;FIG. 6 is a schematic structural diagram of a specific implementation manner of 402 shown in FIG. 4;

图7根据本申请的计算机设备的一个实施例的结构示意图。FIG. 7 is a schematic structural diagram of an embodiment of a computer device according to the present application.

具体实施方式Detailed ways

除非另有定义,本文所使用的所有的技术和科学术语与属于本申请的技术领域的技术人员通常理解的含义相同;本文中在申请的说明书中所使用的术语只是为了描述具体的实施例的目的,不是旨在于限制本申请;本申请的说明书和权利要求书及上述附图说明中的术语“包括”和“具有”以及它们的任何变形,意图在于覆盖不排他的包含。本申请的说明书和权利要求书或上述附图中的术语“第一”、“第二”等是用于区别不同对象,而不是用于描述特定顺序。Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the technical field of the application; the terms used herein in the description of the application are only to describe specific embodiments The purpose is not to limit the present application; the terms "comprising" and "having" and any variations thereof in the specification and claims of the present application and the description of the above drawings are intended to cover non-exclusive inclusion. The terms "first", "second" and the like in the description and claims of the present application or the above drawings are used to distinguish different objects, rather than to describe a specific 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 present application. The occurrences of this 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 understood explicitly and implicitly by those skilled in the art that the embodiments described herein can be combined with other embodiments.

为了使本技术领域的人员更好地理解本申请方案,下面将结合附图,对本申请实施例中的技术方案进行清楚、完整地描述。In order to enable those skilled in the art to better understand the solutions of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings.

如图1所示,系统架构100可以包括终端设备101、102、103,网络 104和服务器105。网络104用以在终端设备101、102、103和服务器105 之间提供通信链路的介质。网络104可以包括各种连接类型,例如有线、无线通信链路或者光纤电缆等等。As shown in FIG. 1 , a system architecture 100 may include terminal devices 101 , 102 , 103 , a network 104 and a server 105 . The network 104 is used as a medium for providing communication links between the terminal devices 101 , 102 , 103 and the server 105 . Network 104 may include various connection types, such as wires, wireless communication links, or fiber optic cables, among others.

用户可以使用终端设备101、102、103通过网络104与服务器105交互,以接收或发送消息等。终端设备101、102、103上可以安装有各种通讯客户端应用,例如网页浏览器应用、购物类应用、搜索类应用、即时通信工具、邮箱客户端、社交平台软件等。Users can use terminal devices 101 , 102 , 103 to interact with server 105 via network 104 to receive or send messages and the like. Various communication client applications can be installed on the terminal devices 101, 102, 103, such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, and the like.

终端设备101、102、103可以是具有显示屏并且支持网页浏览的各种电子设备,包括但不限于智能手机、平板电脑、电子书阅读器、MP3播放器(Moving PictureExpertsGroup Audio Layer III,动态影像专家压缩标准音频层面3)、MP4(MovingPictureExperts Group Audio Layer IV,动态影像专家压缩标准音频层面4)播放器、膝上型便携计算机和台式计算机等等。Terminal devices 101, 102, 103 can be various electronic devices with display screens and support for web browsing, including but not limited to smartphones, tablet computers, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III, Motion Picture Experts Compression standard audio layer 3), MP4 (MovingPictureExperts Group Audio Layer IV, moving picture experts compression standard audio layer 4) player, laptop portable computer and desktop computer, etc.

服务器105可以是提供各种服务的服务器,例如对终端设备101、102、 103上显示的页面提供支持的后台服务器。The server 105 may be a server that provides various services, such as a background server that provides support for pages displayed on the terminal devices 101 , 102 , and 103 .

需要说明的是,本申请实施例所提供的基于样式属性自动组合展示页面的方法一般由服务器/终端设备执行,相应地,基于样式属性自动组合展示页面的装置一般设置于服务器/终端设备中。It should be noted that the method for automatically combining and displaying pages based on style attributes provided by the embodiment of the present application is generally executed by a server/terminal device, and correspondingly, the device for automatically combining and displaying pages based on style attributes is generally set in the server/terminal device.

应该理解,图1中的终端设备、网络和服务器的数目仅仅是示意性的。根据实现需要,可以具有任意数目的终端设备、网络和服务器。It should be understood that the numbers of terminal devices, networks and servers in Fig. 1 are only illustrative. According to the implementation needs, there can be any number of terminal devices, networks and servers.

继续参考图2,示出了根据本申请的基于样式属性自动组合展示页面的方法的一个实施例的流程图。所述的基于样式属性自动组合展示页面的方法,包括以下步骤:Continuing to refer to FIG. 2 , it shows a flow chart of an embodiment of a method for automatically combining and displaying pages based on style attributes according to the present application. The method for automatically combining and displaying pages based on style attributes includes the following steps:

步骤201,获取预设公共样式库和目标展示卡的整体样式集合。Step 201, acquire the preset public style library and the overall style collection of the target display card.

本实施例中,所述整体样式集合中包括组成所述目标展示卡的各下级组成单元的样式集合。In this embodiment, the overall style set includes a style set of each lower-level component unit that makes up the target display card.

所述组成所述目标展示卡的各下级组成单元的样式集合,包括图片及图片层叠样式、展示文字及展示文字层叠样式、列表及列表层叠样式、页面内图片或者文字的轮播样式等。The style set of each subordinate component unit that makes up the target display card includes pictures and picture stacking styles, display text and display text stacking styles, lists and list stacking styles, picture or text carousel styles in pages, and the like.

通过获取目标展示卡的整体样式集合,便于为初始展示卡转换为目标展示卡提供层叠样式参照,使得转换时初始展示卡遵循参照样式进行逐步转换为目标展示卡,上述初始展示卡即背景技术中“某一个卡片”,上述目标展示卡即背景技术中“目标相似卡片”。By obtaining the overall style collection of the target display card, it is convenient to provide a stacked style reference for the conversion of 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 conversion. The above initial display card is the one in the background technology. "A certain card", the above-mentioned target display card is the "target similar card" in the background technology.

本实施例中,所述样式集合包括组成所述目标展示卡的各下级组成单元的样式的基本组件的属性名称和属性值。In this embodiment, the style set includes attribute names and attribute values of basic components that form the styles of each lower-level component unit of the target presentation card.

所述组成所述目标展示卡的各下级组成单元的样式的基本组件的属性名称和属性值,以目标展示卡中某个下级组成图片为例,组成图片的样式的基本组件可以理解为图片对应的层叠样式的属性名称和属性值,例如:图片的获取途径对应的属性名称“src”及作为属性值的具体地址指向,再比如图片的高度对应的属性名称“height”及作为属性值的具体高度值,再比如图片的宽度对应的属性名称“width”及作为属性值的具体宽度值。The attribute names and attribute values of the basic components of the style of each lower-level component unit that make up the target display card, taking a certain lower-level component picture in the target display card as an example, the basic components that make up the style of the picture can be understood as corresponding to the picture. The attribute name and attribute value of the cascading style, for example: the attribute name "src" corresponding to the acquisition method of the image and the specific address pointing to the attribute value, and the attribute name "height" corresponding to the height of the image and the specific address as the attribute value Height value, another example is the attribute name "width" corresponding to the width of the image and the specific width value as the attribute value.

通过在集合中以键对值格式保存属性名称和属性值,便于将初始展示卡转换为目标展示卡过程中,以相应的属性名称为索引,快速确定是否需要进行属性值更新或属性名称的增补删除操作,方便自动组合时以属性名称进行查找操作。By saving the attribute name and attribute value in the key pair value format in the collection, it is convenient to use the corresponding attribute name as an index during the process of converting the initial display card to the target display card to quickly determine whether it is necessary to update the attribute value or add the attribute name The delete operation is convenient for the search operation by the attribute name during automatic combination.

本实施例中,所述公共样式库中包含了所有预设基本组件。In this embodiment, the public style library includes all preset basic components.

本实施例中,所述公共样式库可以默认为包含了层叠样式中所有属性名称的平台库,保证了基本组件的多样性和目标属性样式的多选择性。In this embodiment, the public style library may default to a platform library that includes all attribute names in the cascading style, which ensures the diversity of basic components and the multiple selectivity of target attribute styles.

步骤202,获取初始化的原始样式集合。Step 202, acquire an initialized original style set.

本实施例中,所述公共样式库和所述原始样式集合中单个元素都为键值对格式数据,其中,所述键值对由页面内容样式的属性名称和所述属性名称对应属性值构成,具体格式为[属性名称:属性值]。In this embodiment, the individual elements in the public style library and the original style collection are data in key-value pair format, wherein the key-value pair is composed of the attribute name of the page content style and the attribute value corresponding to the attribute name , the specific format is [property name: property value].

本实施例中,所述属性名称和其对应属性值以key:value格式成对设置,在本实施例的另一实施例中所述样式库中属性名称和其对应属性值,也可以以{key:[value1,value2,...,valuen]}格式,在属性值序列内对可选择的属性值进行枚举,供界面开发人员在层叠样式自动组合时按照预设要求进行自由挑选,通过将所述样式库和所述原始样式集合中单个元素都设置为键值对格式数据,便于界面开发人员进行自由选择,保证了属性值选择时的目标值充足性。In this embodiment, the attribute names and their corresponding attribute values are set in pairs in the key:value format. In another embodiment of this embodiment, the attribute names and their corresponding attribute values in the style library can also be represented by { key:[value1,value2,...,valuen]} format, enumerates selectable attribute values in the attribute value sequence, for interface developers to freely select according to preset requirements when cascading styles are automatically combined, through Setting individual elements in the style library and the original style collection as key-value pair format data is convenient for interface developers to choose freely, and ensures the sufficiency of target values when selecting attribute values.

步骤203,根据页面生成指令,以所述目标展示卡的整体样式集合为参考样式,从所述公共样式库中选择相应的基本组件,对所述原始样式集合进行操作,根据对所述原始样式集合的最终操作结果生成目标展示卡。Step 203, according to the page generation instruction, using the overall style set of the target display card as a reference style, select the corresponding basic components from the public style library, and operate on the original style set, according to the original style The final operation result of the collection generates a target display card.

本实施例中,所述对所述原始样式集合进行操作的步骤,包括:判断所述原始样式集合和所述目标展示卡的整体样式集合中元素的关系,并根据判断结果对所述原始样式集合中元素进行优化操作。In this embodiment, the step of operating the original style set includes: judging the relationship between the elements in the original style set and the overall style set of the target display card, and evaluating the original style according to the judgment result The elements in the collection are optimized.

通过判断原始样式集合和所述目标展示卡的整体样式集合中元素的关系,对原始样式集合中元素进行优化操作,避免了界面开发时,直接通过代码开发的形式更改源逻辑代码,而是通过对比原则,直接在不更改源逻辑代码的情况下,循环检索出两者间不相同的属性名称和属性值,再进行配置替换,避免大量的更改源逻辑代码,保证了对源逻辑代码的多次复用,同时,也能在此后更新时以对比组合的方式循环复用样式库,减少开发人员的工作量。By judging the relationship between the original style set and the elements in the overall style set of the target display card, the elements in the original style set are optimized, which avoids changing the source logic code directly through code development during interface development, but through The principle of comparison, directly without changing the source logic code, recursively retrieves the attribute names and attribute values that are different between the two, and then performs configuration replacement, avoiding a large number of changes to the source logic code, and ensuring multiple source logic codes At the same time, the style library can be reused in the way of comparison and combination in subsequent updates, reducing the workload of developers.

本实施例中,所述判断所述原始样式集合和所述目标展示卡的整体样式集合中元素的关系,并根据判断结果对所述原始样式集合中元素进行优化操作的步骤,包括:根据所述原始样式集合中的属性名称和所述目标展示卡的整体样式集合中属性名称,进行对比,判断所述原始样式集合中属性名称是否全部被包含于所述目标展示卡的整体样式集合中;若所述原始样式集合中属性名称全部被包含于所述目标展示卡的整体样式集合中,则判断所述原始样式集合中属性名称对应的属性值是否与所述目标展示卡的整体样式集合中相对应的属性值相同;若不相同,则获取相对应的属性值进行替换操作;若相同,则获取所述目标展示卡的整体样式集合中不属于所述原始样式集合中的属性名称,并根据所述属性名称从所述公共样式库中获取相对应的基础组件添加到所述原始样式集合中。In this embodiment, the step of judging the relationship between the elements in the original style set and the overall style set of the target display card, and optimizing the elements in the original style set according to the judgment result includes: Compare the attribute names in the original style set with the attribute names in the overall style set of the target display card, and judge whether all the attribute names in the original style set are included in the overall style set of the target display card; If all the attribute names in the original style set are included in the overall style set of the target display card, then judge whether the attribute value corresponding to the attribute name in the original style set is in the overall style set of the target display card The corresponding attribute values are the same; if they are not the same, the corresponding attribute values are obtained for replacement; if they are the same, the attribute names in the overall style collection of the target display card that do not belong to the original style collection are obtained, and According to the attribute name, the corresponding basic component is obtained from the public style library and added to the original style collection.

本实施例中,所述判断所述原始样式集合和所述目标展示卡的整体样式集合中元素的关系,并根据判断结果对所述原始样式集合中元素进行优化操作的步骤,还包括:若所述原始样式集合中属性名称未全部被包含于所述目标展示卡的整体样式集合中,则删除对应区别元素,其中,所述区别元素表示所述原始样式集合中包含而所述目标展示卡的整体样式集合中未包含的属性名称及所述属性名称对应的属性值;识别所述原始样式集合中与所述目标展示卡的整体样式集合中相同的属性名称,并判断所述属性名称在所述原始样式集合中对应的属性值是否与所述目标展示卡的整体样式集合中相对应的属性值相同;若不相同,则获取相对应的属性值进行替换操作;若相同,则获取所述目标展示卡的整体样式集合中不属于所述原始样式集合中的属性名称,并根据所述属性名称从所述公共样式库中获取相对应的基础组件添加到所述原始样式集合中。In this embodiment, the step of judging the relationship between the elements in the original style set and the overall style set of the target display card, and optimizing the elements in the original style set according to the judgment result further includes: if If the attribute names in the original style set are not all included in the overall style set of the target display card, then delete the corresponding difference element, wherein the difference element indicates that the target display card is included in the original style set attribute names not included in the overall style set of the target display card and attribute values corresponding to the attribute names; identifying the same attribute names in the original style set and the overall style set of the target display card, and judging that the attribute names are in the Whether the corresponding attribute value in the original style set is the same as the corresponding attribute value in the overall style set of the target display card; if not, obtain the corresponding attribute value for replacement; if the same, obtain the attribute names in the overall style set of the target display card that do not belong to the original style set, and obtain corresponding basic components from the public style library according to the attribute names and add them to the original style set.

本实施例中,所述获取相对应的属性值进行替换操作的步骤,具体包括:从所述目标展示卡的整体样式集合中获取与所述属性名称相对应的属性值;并将所述属性值替换到所述原始样式集合中对应属性名称所对应的属性值处。In this embodiment, the step of obtaining the corresponding attribute value to perform the replacement operation specifically includes: obtaining the attribute value corresponding to the attribute name from the overall style set of the target display card; The value is replaced with the attribute value corresponding to the corresponding attribute name in the original style collection.

本实施例中,所述获取所述目标展示卡的整体样式集合中不属于所述原始样式集合中的属性名称,并根据所述属性名称从所述公共样式库中获取相对应的基础组件添加到所述原始样式集合中的步骤,具体包括:获取所述目标展示卡的整体样式集合中不属于所述原始样式集合中的属性名称;根据所述属性名称和预设添加顺序,从所述样式库中依次获取每一个属性名称相对应的基础组件添加到所述原始样式集合;根据所述属性名称和所述添加顺序,依次从所述目标展示卡的整体样式集合中获取当前属性名称对应的属性值添加到所述原始样式集合,直到所述原始样式集合中的元素数量与所述目标展示卡的整体样式集合中元素数量相同,对所述原始样式集合的添加操作完成。In this embodiment, the attribute names in the overall style set of the target display card that do not belong to the original style set are obtained, and the corresponding basic components are obtained from the public style library according to the attribute names to add The step of entering the original style collection specifically includes: obtaining the attribute names in the overall style collection of the target display card that do not belong to the original style collection; according to the attribute names and preset adding order, from the Acquire the basic components corresponding to each attribute name in the style library and add them to the original style collection; according to the attribute name and the adding order, obtain the current attribute name corresponding to the overall style collection of the target display card in sequence The attribute value of is added to the original style set until the number of elements in the original style set is the same as the number of elements in the overall style set of the target presentation card, and the adding operation to the original style set is completed.

本实施例中,所述从所述目标展示卡的整体样式集合中获取当前属性名称对应的属性值添加到所述原始样式集合的步骤,具体包括:以所述当前属性名称为检索关键字段,以所述公共样式库为检索源,查找所述当前属性名称对应的属性值,并将所述属性值添加到所述原始样式集合中In this embodiment, the step of acquiring the attribute value corresponding to the current attribute name from the overall style set of the target display card and adding it to the original style set specifically includes: using the current attribute name as the retrieval key field , using the public style library as the search source, find the attribute value corresponding to the current attribute name, and add the attribute value to the original style collection

通过循环添加的方式,直到所述原始样式集合中的元素数量与所述目标展示卡的整体样式集合中元素数量相同,则对原始样式集合中的元素添加操作完成,即完成由原始样式集合转化为目标展示卡的整体样式集合。By means of circular addition, until the number of elements in the original style collection is the same as the number of elements in the overall style collection of the target display card, then the addition of elements in the original style collection is completed, that is, the conversion from the original style collection is completed An overall style collection for target presentation cards.

步骤204,根据预设排版格式对使用到的各个目标展示卡进行页面排版,生成界面展示页。Step 204 , according to the preset typesetting format, perform page typesetting for each used target display card to generate an interface display page.

本申请通过获取目标展示卡的整体样式集合,其中,所述整体样式集合中包括组成所述目标展示卡的各下级组成单元的样式集合,其中,所述样式集合包括组成所述目标展示卡的各下级组成单元的样式的基本组件的属性名称和属性值;获取包括所有预设基本组件的样式库,其中,所述样式库中包含了所有预设基本组件;获取初始化的原始样式集合;根据页面生成指令,以所述目标展示卡的整体样式集合为参考样式,从所述样式库中选择相应的基本组件,对所述原始样式集合进行操作,根据对所述原始样式集合的最终操作结果生成目标展示卡;根据预设排版格式对使用到的各个目标展示卡进行页面排版,生成界面展示页。本申请通过从界面最小构成单元的属性进行组合控制,依次生成目标展示卡,再通过目标展示卡生成界面展示页,保证了在不修改原有代码逻辑的情况下,也能自动对相似卡片间的转换做到更为精确的控制。The present application acquires the overall style set of the target display card, wherein the overall style set includes the style set of each lower-level component unit that makes up the target display card, wherein the style set includes the style sets that make up the target display card The attribute names and attribute values of the basic components of the style of each subordinate component unit; obtain the style library including all the preset basic components, wherein, the style library contains all the preset basic components; obtain the initialized original style collection; according to The page generation instruction uses the overall style set of the target display card as a reference style, selects the corresponding basic component from the style library, operates the original style set, and according to the final operation result on the original style set Generate the target display card; according to the preset typesetting format, perform page layout for each target display card used, and generate the interface display page. This application combines and controls the attributes of the smallest constituent unit of the interface, generates target display cards in turn, and then generates interface display pages through the target display cards, ensuring that similar cards can be automatically compared without modifying the original code logic. conversion to achieve more precise control.

本申请实施例可以基于人工智能技术对相关的数据进行获取和处理。其中,人工智能(Artificial Intelligence,AI)是利用数字计算机或者数字计算机控制的机器模拟、延伸和扩展人的智能,感知环境、获取知识并使用知识获得最佳结果的理论、方法、技术及应用系统。The embodiments of the present application may acquire and process relevant data based on artificial intelligence technology. Among them, artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. .

人工智能基础技术一般包括如传感器、专用人工智能芯片、云计算、分布式存储、大数据处理技术、操作/交互系统、机电一体化等技术。人工智能软件技术主要包括计算机视觉技术、机器人技术、生物识别技术、语音处理技术、自然语言处理技术以及机器学习/深度学习等几大方向。Artificial intelligence basic technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation/interaction systems, and mechatronics. Artificial intelligence software technology mainly includes computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning/deep learning.

本申请实施例中,可利用智能托管模型的方式进行前端UI展示单元间的精细化控制,具体的在所述智能托管模型中预先录入目标展示卡的整体样式集合,以所述公共样式库为模型的检索库,以所述初始样式集合为输入值,通过对比筛选的方式和预设更新替换条件进行层叠样式更新,直到初始样式集合中元素数量与所述目标展示卡的样式集合中元素数量相同,进行模型输出,输出更新后的初始样式集合,采用机器模型代替人工更新,减少了界面开发人员和后期界面运营人员的工作量。In the embodiment of the present application, the smart hosting model can be used to carry out refined control between the front-end UI display units. Specifically, the overall style set of the target display card is pre-entered in the smart hosting model, and the public style library is used as the The retrieval library of the model, using the initial style set as an input value, performs cascading style updates by comparing and filtering methods and preset update and replacement conditions until the number of elements in the initial style set is the same as the number of elements in the style set of the target display card Similarly, the model output is performed, the updated initial style set is output, and the machine model is used instead of manual updating, which reduces the workload of interface developers and later interface operators.

进一步参考图3,作为对上述图2所示方法的实现,本申请提供了一种基于样式属性自动组合展示页面的装置的一个实施例,该装置实施例与图2所示的方法实施例相对应,该装置具体可以应用于各种电子设备中。Further referring to FIG. 3 , as an implementation of the above-mentioned method shown in FIG. 2 , the present application provides an embodiment of a device for automatically combining and displaying pages based on style attributes. This device embodiment is similar to the method embodiment shown in FIG. 2 Correspondingly, the device can be specifically applied to various electronic devices.

如图3所示,本实施例所述的基于样式属性自动组合展示页面的装置 300包括:参照样式获取模块301、原始样式获取模块302、目标展示卡生成模块303和界面展示页生成模块304。其中:As shown in FIG. 3 , the device 300 for automatically combining display pages based on style attributes in this embodiment includes: a reference style acquisition module 301 , an original style acquisition module 302 , a target display card generation module 303 and an interface display page generation module 304 . in:

参照样式获取模块301,用于获取预设公共样式库和目标展示卡的整体样式集合,其中,所述公共样式库中包含了所有预设基本组件;The reference style acquisition module 301 is used to acquire the preset public style library and the overall style set of the target display card, wherein the public style library includes all preset basic components;

原始样式获取模块302,用于获取初始化的原始样式集合;An original style acquisition module 302, configured to acquire an initialized original style set;

目标展示卡生成模块303,用于根据页面生成指令,以所述目标展示卡的整体样式集合为参考样式,从所述公共样式库中选择相应的基本组件,对所述原始样式集合进行操作,根据对所述原始样式集合的最终操作结果生成目标展示卡;The target display card generation module 303 is configured to select the corresponding basic components from the public style library by using the overall style set of the target display card as a reference style according to the page generation instruction, and operate on the original style set, generating a target presentation card according to the final operation result on the original style set;

界面展示页生成模块304,用于根据预设排版格式对使用到的各个目标展示卡进行页面排版,生成界面展示页。The interface display page generating module 304 is configured to perform page layout for each used target display card according to a preset typesetting format to generate an interface display page.

继续参考图4,图4是图3所示303的一种具体实施方式的结构示意图,所述的目标展示卡生成模块303包括:判断子模块401和优化子模块 402。其中:Continue to refer to FIG. 4, which is a schematic structural diagram of a specific implementation of 303 shown in FIG. in:

判断子模块401,用于判断所述原始样式集合和所述目标展示卡的整体样式集合中元素的关系。The judging sub-module 401 is configured to judge the relationship between elements in the original style set and the overall style set of the target display card.

优化子模块402,用于根据判断结果对所述原始样式集合中元素进行优化操作。The optimization sub-module 402 is configured to optimize the elements in the original style set according to the judgment result.

继续参考图5,图5是图4所示401的一种具体实施方式的结构示意图,所述的判断子模块401包括:第一判断单元501、第二判断单元502 和第三判断单元503。其中:Continuing to refer to FIG. 5 , FIG. 5 is a schematic structural diagram of a specific implementation manner of 401 shown in FIG. 4 , and the judging submodule 401 includes: a first judging unit 501 , a second judging unit 502 and a third judging unit 503 . in:

第一判断单元501,用于根据所述原始样式集合中的属性名称和所述目标展示卡的整体样式集合中属性名称,进行对比,判断所述原始样式集合中属性名称是否全部被包含于所述目标展示卡的整体样式集合中;The first judging unit 501 is used to compare the attribute names in the original style set with the attribute names in the overall style set of the target display card, and judge whether all the attribute names in the original style set are included in the target presentation card. In the overall style set of the target display card described above;

第二判断单元502,用于若所述原始样式集合中属性名称全部被包含于所述目标展示卡的整体样式集合中,则判断所述原始样式集合中属性名称对应的属性值是否与所述目标展示卡的整体样式集合中相对应的属性值相同;The second judging unit 502 is configured to judge whether the attribute value corresponding to the attribute name in the original style set is consistent with the The corresponding attribute values in the overall style collection of the target display card are the same;

第三判断单元503,用于若所述原始样式集合中属性名称未全部被包含于所述目标展示卡的整体样式集合中,则删除对应区别元素,识别所述原始样式集合中与所述目标展示卡的整体样式集合中相同的属性名称,并判断所述属性名称在所述原始样式集合中对应的属性值是否与所述目标展示卡的整体样式集合中相对应的属性值相同。The third judging unit 503 is configured to delete the corresponding distinguishing element if the attribute names in the original style set are not all included in the overall style set of the target display card, and identify the original style set that is different from the target displaying the same attribute name in the overall style set of the 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 overall style set of the target display card.

继续参考图6,图6是图4所示402的一种具体实施方式的结构示意图,所述的优化子模块402包括:第一优化单元601和第二优化单元602。Continuing to refer to FIG. 6 , FIG. 6 is a schematic structural diagram of a specific implementation of 402 shown in FIG. 4 , and the optimization submodule 402 includes: a first optimization unit 601 and a second optimization unit 602 .

其中:in:

第一优化单元601,用于若所述属性名称在所述原始样式集合中对应的属性值与所述目标展示卡的整体样式集合中相对应的属性值不相同,则获取相对应的属性值进行替换操作,具体包括:从所述目标展示卡的整体样式集合中获取与所述属性名称相对应的属性值,并将所述属性值替换到所述原始样式集合中对应属性名称所对应的属性值处。The first optimization unit 601 is configured to obtain the corresponding attribute value if the attribute value corresponding to the attribute name in the original style set is different from the corresponding attribute value in the overall style set of the target presentation card Performing a replacement operation specifically includes: obtaining the attribute value corresponding to the attribute name from the overall style collection of the target display card, and replacing the attribute value with the corresponding attribute name in the original style collection attribute value.

第二优化单元602,用于若所述属性名称在所述原始样式集合中对应的属性值与所述目标展示卡的整体样式集合中相对应的属性值相同,则获取所述目标展示卡的整体样式集合中不属于所述原始样式集合中的属性名称,并根据所述属性名称从所述公共样式库中获取相对应的基础组件添加到所述原始样式集合中。The second optimization unit 602 is configured to obtain the target display card if the attribute value corresponding to the attribute name in the original style set is the same as the corresponding attribute value in the overall style set of the target display card attribute names in the overall style set that do not belong to the original style set, and obtain corresponding basic components from the public style library according to the attribute names and add them to the original style set.

通过多个判断子单元和优化子单元做到自动对相似卡片间的转换做到更为精确的控制。Through multiple judging sub-units and optimization sub-units, more precise control can be achieved on the conversion between similar cards automatically.

本申请通过获取目标展示卡的整体样式集合,其中,所述整体样式集合中包括组成所述目标展示卡的各下级组成单元的样式集合,其中,所述样式集合包括组成所述目标展示卡的各下级组成单元的样式的基本组件的属性名称和属性值;获取包括所有预设基本组件的样式库,其中,所述样式库中包含了所有预设基本组件;获取初始化的原始样式集合;根据页面生成指令,以所述目标展示卡的整体样式集合为参考样式,从所述样式库中选择相应的基本组件,对所述原始样式集合进行操作,根据对所述原始样式集合的最终操作结果生成目标展示卡;根据预设排版格式对使用到的各个目标展示卡进行页面排版,生成界面展示页。本申请通过从界面最小构成单元的属性进行组合控制,依次生成目标展示卡,再通过目标展示卡生成界面展示页,保证了在不修改原有代码逻辑的情况下,也能自动对相似卡片间的转换做到更为精确的控制。The present application acquires the overall style set of the target display card, wherein the overall style set includes the style set of each lower-level component unit that makes up the target display card, wherein the style set includes the style sets that make up the target display card The attribute names and attribute values of the basic components of the style of each subordinate component unit; obtain the style library including all the preset basic components, wherein, the style library contains all the preset basic components; obtain the initialized original style collection; according to The page generation instruction uses the overall style set of the target display card as a reference style, selects the corresponding basic component from the style library, operates the original style set, and according to the final operation result on the original style set Generate the target display card; according to the preset typesetting format, perform page layout for each target display card used, and generate the interface display page. This application combines and controls the attributes of the smallest constituent unit of the interface, generates target display cards in turn, and then generates interface display pages through the target display cards, ensuring that similar cards can be automatically compared without modifying the original code logic. conversion to achieve more precise control.

本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机可读指令来指令相关的硬件来完成,该计算机可读指令可存储于计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,前述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)等非易失性存储介质,或随机存储记忆体(Random Access Memory,RAM)等。Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be implemented by instructing related hardware through computer-readable instructions, and the computer-readable instructions can be stored in a computer-readable storage medium. When the program is executed, it may include the procedures of the embodiments of the above-mentioned methods. Wherein, the aforementioned storage medium may be a nonvolatile storage medium such as a magnetic disk, an optical disk, a read-only memory (Read-Only Memory, ROM), or a random access memory (Random Access Memory, RAM).

应该理解的是,虽然附图的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,其可以以其他的顺序执行。而且,附图的流程图中的至少一部分步骤可以包括多个子步骤或者多个阶段,这些子步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,其执行顺序也不必然是依次进行,而是可以与其他步骤或者其他步骤的子步骤或者阶段的至少一部分轮流或者交替地执行。It should be understood that although the various steps in the flow chart of the accompanying drawings are displayed sequentially according to the arrows, these steps are not necessarily executed sequentially in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some of the steps in the flowcharts of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but may be executed at different times, and the order of execution is also It is not necessarily performed sequentially, but may be performed alternately or alternately with at least a part of other steps or sub-steps or stages of other steps.

为解决上述技术问题,本申请实施例还提供计算机设备。具体请参阅图7,图7为本实施例计算机设备基本结构框图。In order to solve the above technical problems, the embodiment of the present application further provides computer equipment. Please refer to FIG. 7 for details. FIG. 7 is a block diagram of the basic structure of the computer device in this embodiment.

所述计算机设备7包括通过系统总线相互通信连接存储器71、处理器 72、网络接口73。需要指出的是,图中仅示出了具有组件71-73的计算机设备7,但是应理解的是,并不要求实施所有示出的组件,可以替代的实施更多或者更少的组件。其中,本技术领域技术人员可以理解,这里的计算机设备是一种能够按照事先设定或存储的指令,自动进行数值计算和/ 或信息处理的设备,其硬件包括但不限于微处理器、专用集成电路 (ApplicationSpecific Integrated Circuit,ASIC)、可编程门阵列(Field -Programmable GateArray,FPGA)、数字处理器(Digital Signal Processor,DSP)、嵌入式设备等。The computer device 7 includes a memory 71, a processor 72, and a network interface 73 connected to each other through a system bus. It should be noted that only the computer device 7 with components 71-73 is shown in the figure, but it should be understood that it is not required to implement all the components shown, and more or fewer components may be implemented instead. Among them, those skilled in the art can understand that the computer device here is a device that can automatically perform numerical calculation and/or information processing according to preset or stored instructions, and its hardware includes but is not limited to microprocessors, dedicated Integrated circuit (Application Specific Integrated Circuit, ASIC), programmable gate array (Field-Programmable GateArray, FPGA), digital processor (Digital Signal Processor, DSP), embedded devices, etc.

所述计算机设备可以是桌上型计算机、笔记本、掌上电脑及云端服务器等计算设备。所述计算机设备可以与用户通过键盘、鼠标、遥控器、触摸板或声控设备等方式进行人机交互。The computer equipment may be computing equipment such as a desktop computer, a notebook, a palmtop computer, and a cloud server. The computer device can perform human-computer interaction with the user through keyboard, mouse, remote controller, touch panel or voice control device.

所述存储器71至少包括一种类型的可读存储介质,所述可读存储介质包括闪存、硬盘、多媒体卡、卡型存储器(例如,SD或DX存储器等)、随机访问存储器(RAM)、静态随机访问存储器(SRAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、可编程只读存储器(PROM)、磁性存储器、磁盘、光盘等。在一些实施例中,所述存储器71可以是所述计算机设备7的内部存储单元,例如该计算机设备7的硬盘或内存。在另一些实施例中,所述存储器71也可以是所述计算机设备7的外部存储设备,例如该计算机设备7上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(FlashCard) 等。当然,所述存储器71还可以既包括所述计算机设备7的内部存储单元也包括其外部存储设备。本实施例中,所述存储器71通常用于存储安装于所述计算机设备7的操作系统和各类应用软件,例如基于样式属性自动组合展示页面的方法的计算机可读指令等。此外,所述存储器71还可以用于暂时地存储已经输出或者将要输出的各类数据。The memory 71 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, 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 Disk, Optical Disk, etc. In some embodiments, the memory 71 may be an internal storage unit of the computer device 7 , such as a hard disk or memory of the computer device 7 . In some other embodiments, the memory 71 can also be an external storage device of the computer device 7, such as a plug-in hard disk equipped on the computer device 7, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, flash memory card (FlashCard), etc. Of course, the memory 71 may also include both the internal storage unit of the computer device 7 and its external storage device. In this embodiment, the memory 71 is generally used to store the operating system and various application software installed on the computer device 7, such as computer-readable instructions for the method of automatically combining and displaying pages based on style attributes. In addition, the memory 71 can also be used to temporarily store various types of data that have been output or will be output.

所述处理器72在一些实施例中可以是中央处理器(Central Processing Unit,CPU)、控制器、微控制器、微处理器、或其他数据处理芯片。该处理器72通常用于控制所述计算机设备7的总体操作。本实施例中,所述处理器72用于运行所述存储器71中存储的计算机可读指令或者处理数据,例如运行所述基于样式属性自动组合展示页面的方法的计算机可读指令。The processor 72 may be a central processing unit (Central Processing Unit, CPU), controller, microcontroller, microprocessor, or other data processing chips in some embodiments. This processor 72 is generally used to control the general operation of said 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 combining and displaying pages based on style attributes.

所述网络接口73可包括无线网络接口或有线网络接口,该网络接口 73通常用于在所述计算机设备7与其他电子设备之间建立通信连接。The network interface 73 may include a wireless network interface or a wired network interface, and the network interface 73 is generally used to establish a communication connection between the computer device 7 and other electronic devices.

本实施例提出的计算机设备,属于UI设计技术领域。本申请通过获取目标展示卡的整体样式集合,其中,所述整体样式集合中包括组成所述目标展示卡的各下级组成单元的样式集合,其中,所述样式集合包括组成所述目标展示卡的各下级组成单元的样式的基本组件的属性名称和属性值;获取包括所有预设基本组件的样式库,其中,所述样式库中包含了所有预设基本组件;获取初始化的原始样式集合;根据页面生成指令,以所述目标展示卡的整体样式集合为参考样式,从所述样式库中选择相应的基本组件,对所述原始样式集合进行操作,根据对所述原始样式集合的最终操作结果生成目标展示卡;根据预设排版格式对使用到的各个目标展示卡进行页面排版,生成界面展示页。本申请通过从界面最小构成单元的属性进行组合控制,依次生成目标展示卡,再通过目标展示卡生成界面展示页,保证了在不修改原有代码逻辑的情况下,也能自动对相似卡片间的转换做到更为精确的控制。The computer equipment proposed in this embodiment belongs to the technical field of UI design. The present application acquires the overall style set of the target display card, wherein the overall style set includes the style set of each lower-level component unit that makes up the target display card, wherein the style set includes the style sets that make up the target display card The attribute names and attribute values of the basic components of the style of each subordinate component unit; obtain the style library including all the preset basic components, wherein, the style library contains all the preset basic components; obtain the initialized original style collection; according to The page generation instruction uses the overall style set of the target display card as a reference style, selects the corresponding basic component from the style library, operates the original style set, and according to the final operation result on the original style set Generate the target display card; according to the preset typesetting format, perform page layout for each target display card used, and generate the interface display page. This application combines and controls the attributes of the smallest constituent unit of the interface, generates target display cards in turn, and then generates interface display pages through the target display cards, ensuring that similar cards can be automatically compared without modifying the original code logic. conversion to achieve more precise control.

本申请还提供了另一种实施方式,即提供一种计算机可读存储介质,所述计算机可读存储介质存储有计算机可读指令,所述计算机可读指令可被处理器执行,以使所述处理器执行如上述的基于样式属性自动组合展示页面的方法的步骤。The present application also provides another implementation manner, which is to provide a computer-readable storage medium, the computer-readable storage medium stores computer-readable instructions, and the computer-readable instructions can be executed by a processor, so that all The processor executes the steps of the above-mentioned method for automatically combining and displaying pages based on style attributes.

本实施例提出的计算机可读存储介质,属于UI设计技术领域。本申请通过获取目标展示卡的整体样式集合,其中,所述整体样式集合中包括组成所述目标展示卡的各下级组成单元的样式集合,其中,所述样式集合包括组成所述目标展示卡的各下级组成单元的样式的基本组件的属性名称和属性值;获取包括所有预设基本组件的样式库,其中,所述样式库中包含了所有预设基本组件;获取初始化的原始样式集合;根据页面生成指令,以所述目标展示卡的整体样式集合为参考样式,从所述样式库中选择相应的基本组件,对所述原始样式集合进行操作,根据对所述原始样式集合的最终操作结果生成目标展示卡;根据预设排版格式对使用到的各个目标展示卡进行页面排版,生成界面展示页。本申请通过从界面最小构成单元的属性进行组合控制,依次生成目标展示卡,再通过目标展示卡生成界面展示页,保证了在不修改原有代码逻辑的情况下,也能自动对相似卡片间的转换做到更为精确的控制。The computer-readable storage medium proposed in this embodiment belongs to the technical field of UI design. The present application acquires the overall style set of the target display card, wherein the overall style set includes the style set of each lower-level component unit that makes up the target display card, wherein the style set includes the style sets that make up the target display card The attribute names and attribute values of the basic components of the style of each subordinate component unit; obtain the style library including all the preset basic components, wherein, the style library contains all the preset basic components; obtain the initialized original style collection; according to The page generation instruction uses the overall style set of the target display card as a reference style, selects the corresponding basic component from the style library, operates the original style set, and according to the final operation result on the original style set Generate the target display card; according to the preset typesetting format, perform page layout for each target display card used, and generate the interface display page. This application combines and controls the attributes of the smallest constituent unit of the interface, generates target display cards in turn, and then generates interface display pages through the target display cards, ensuring that similar cards can be automatically compared without modifying the original code logic. conversion to achieve more precise control.

通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本申请各个实施例所述的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus a necessary general-purpose hardware platform, and of course also by hardware, but in many cases the former is better implementation. Based on such an understanding, the technical solution of the present application can be embodied in the form of a software product in essence or the part that contributes to the prior art, and the computer software product is stored in a storage medium (such as ROM/RAM, disk, CD) contains several instructions to make a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) execute the methods described in the various embodiments of the present application.

显然,以上所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例,附图中给出了本申请的较佳实施例,但并不限制本申请的专利范围。本申请可以以许多不同的形式来实现,相反地,提供这些实施例的目的是使对本申请的公开内容的理解更加透彻全面。尽管参照前述实施例对本申请进行了详细的说明,对于本领域的技术人员来而言,其依然可以对前述各具体实施方式所记载的技术方案进行修改,或者对其中部分技术特征进行等效替换。凡是利用本申请说明书及附图内容所做的等效结构,直接或间接运用在其他相关的技术领域,均同理在本申请专利保护范围之内。Apparently, the embodiments described above are only some of the embodiments of the present application, not all of them. The drawings show preferred embodiments of the present application, but do not limit the patent scope of the present application. The present application can be implemented in many different forms, on the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present application more thorough and comprehensive. Although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing specific embodiments, or perform equivalent replacements for some of the technical features . All equivalent structures made using the contents of the description and drawings of this application, directly or indirectly used in other related technical fields, are also within the scope of protection of this 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 A method for automatically combining and displaying pages based on style attributes and related equipment Active CN115756692B (en)

Priority Applications (1)

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

Applications Claiming Priority (1)

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

Publications (2)

Publication Number Publication Date
CN115756692A true CN115756692A (en) 2023-03-07
CN115756692B CN115756692B (en) 2025-12-23

Family

ID=85371451

Family Applications (1)

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

Country Status (1)

Country Link
CN (1) CN115756692B (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

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105373567A (en) * 2014-09-01 2016-03-02 北京奇虎科技有限公司 Page generation method and client
CN111783015A (en) * 2020-06-30 2020-10-16 掌阅科技股份有限公司 Display method of shared display elements in page, electronic equipment and storage medium
CN112596845A (en) * 2020-12-29 2021-04-02 百果园技术(新加坡)有限公司 Page switching method, device, server and storage medium
CN112925520A (en) * 2021-03-30 2021-06-08 平安科技(深圳)有限公司 Method and device for building visual page and computer equipment
CN113608737A (en) * 2021-01-18 2021-11-05 腾讯科技(深圳)有限公司 Page generation method, device, equipment and medium
CN114401154A (en) * 2022-03-24 2022-04-26 华控清交信息科技(北京)有限公司 Data processing method and device, ciphertext calculation engine and device for data processing

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105373567A (en) * 2014-09-01 2016-03-02 北京奇虎科技有限公司 Page generation method and client
CN111783015A (en) * 2020-06-30 2020-10-16 掌阅科技股份有限公司 Display method of shared display elements in page, electronic equipment and storage medium
CN112596845A (en) * 2020-12-29 2021-04-02 百果园技术(新加坡)有限公司 Page switching method, device, server and storage medium
CN113608737A (en) * 2021-01-18 2021-11-05 腾讯科技(深圳)有限公司 Page generation method, device, equipment and medium
CN112925520A (en) * 2021-03-30 2021-06-08 平安科技(深圳)有限公司 Method and device for building visual page and computer equipment
CN114401154A (en) * 2022-03-24 2022-04-26 华控清交信息科技(北京)有限公司 Data processing method and device, ciphertext calculation engine and device for data processing

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

Also Published As

Publication number Publication date
CN115756692B (en) 2025-12-23

Similar Documents

Publication Publication Date Title
CN112099790B (en) Methods, devices, equipment and storage media for determining page themes
CN117033249B (en) Test case generation method and device, computer equipment and storage medium
CN113918194B (en) A method, device, electronic device and storage medium for displaying page components
CN117690002A (en) Information interaction methods, devices, electronic equipment and storage media
CN118964649A (en) Artificial intelligence-based manuscript generation method, device, computer equipment and medium
JP2022091686A (en) Data annotation methods, devices, electronic devices and storage media
CN115756692A (en) Method for automatically combining and displaying pages based on style attributes and related equipment thereof
CN116842011B (en) Blood relation analysis methods, apparatus, computer equipment and storage media
CN113704593B (en) Operation data processing method and related device
CN115828018A (en) Electronic magazine interface material replacing method and related equipment thereof
CN115222545B (en) Message modular processing method, device, computer equipment and storage medium
CN113806596B (en) Operation data management method and related device
CN115061916B (en) Method for automatically generating interface test case and related equipment thereof
CN115630123A (en) Cross-system tree structure data synchronization method and related equipment
CN116467145A (en) Page performance data collection method, device, computer equipment and storage medium
CN111723177B (en) Modeling method and device of information extraction model and electronic equipment
CN115471582A (en) Map generation method and device, computer equipment and storage medium
CN115525192A (en) User-oriented quotation and billing method, device, computer equipment and storage medium
CN115687704A (en) Information display method and device, electronic equipment and computer readable storage medium
CN113706209B (en) Operation data processing method and related device
CN115756693B (en) Conversion control method of variable sub-assemblies between similar cards and related equipment thereof
CN117289869B (en) Data processing method, device, equipment and storage medium
CN115080045A (en) Link generation method, apparatus, computer equipment and storage medium
CN115905224A (en) A working time data processing method, device, computer equipment and storage medium
CN116662418A (en) Report realization method, device and equipment based on configuration and storage medium thereof

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