Component generation method, component display method, device, equipment, medium and product
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-08
- Publication Date
- 2026-08-11
AI Technical Summary
又比如FloatWindow,虽然FloatWindow是一个开源悬浮窗口框架,但是FloatWindow主要提供的是悬浮窗口的基本管理功能比如悬浮窗口创建、显示、拖动和隐藏等,无法满足复杂的交互场景
[0043]上述组件生成方法、装置、计算机设备、存储介质和计算机程序产品,考虑到不同类别的终端设备会存在不同类型的对象群体,而这些对象群体对于悬停组件的展示偏好是存在差异的。除此之外,还考虑到不同类别的终端设备对于悬停组件的业务需求也是不同的。基于此,在对目标类别的终端设备进行悬停组件创建时,首先确定与该目标类别相匹配的对象群体,并获取对象群体的悬停组件展示偏好、以及与该目标类别相匹配的悬停组件业务需求。从而匹配得到满足悬停组件展示偏好的组件展示参数、以及满足悬停组件业务需求的业务逻辑参数。如此,一方面能够使组件展示参数与对象群体更加贴合,另一方面还能够使业务逻辑参数更加适配各类终端设备,且适配终端设备在各业务场景下的业务需求。最后根据组件展示参数和业务逻辑参数,创建得到最终的目标悬停组件。上述过程中,从对象群体的悬停组件展示偏好和实际的悬停组件业务需求两个角度,分别进行针对性的悬停组件参数匹配,以得到既贴合对象群体偏好又满足实际业务需求的悬停组件参数,提高了悬停组件参数的适配性,如此,基于悬停组件参数创建得到的悬停组件即可具备较高的通用性。
Smart Images

Figure CN122547348A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a component generation method, a component display method, an apparatus, a computer device, a computer-readable storage medium, and a computer program product. Background Technology
[0002] A page view component is a system component provided by a smart terminal system for displaying web pages, thereby providing richer page services. Since hover effects are a common interactive feedback method in terminal web pages, the requirements for hover components are becoming increasingly sophisticated among various page view components.
[0003] Traditional techniques for generating hover components generally have certain limitations. For example, DraggablePanel is a hover window component, but it's primarily designed for hover window generation in video playback scenarios. Another example is FloatWindow, which, although an open-source hover window framework, mainly provides basic management functions such as creating, displaying, dragging, and hiding hover windows, failing to meet the needs of complex interactive scenarios. Therefore, using traditional techniques suffers from a lack of component versatility. Summary of the Invention
[0004] Therefore, it is necessary to provide a component generation method, component display method, device, computer equipment, computer-readable storage medium, and computer program product that can improve the versatility of components in response to the above-mentioned technical problems.
[0005] Firstly, this application provides a component generation method. The method includes:
[0006] In response to a hover component creation instruction for a terminal device of a target category, a group of objects matching the target category is determined;
[0007] Obtain the hover component display preferences of the target group, as well as the hover component business requirements that match the target category;
[0008] Based on the hover component display preference, component display parameters are matched to obtain component display parameters that match the hover component display preference;
[0009] Based on the business requirements of the hovering component, business logic parameters are matched to obtain business logic parameters that match the business requirements of the hovering component.
[0010] Based on the component display parameters and the business logic parameters, the component is created to obtain the target hover component.
[0011] Secondly, this application provides a component display method. The method includes:
[0012] On the target page of the terminal device used by the target object, the target hover component is displayed, and hover display data is displayed in the hover display area associated with the target hover component;
[0013] In response to a page swipe event triggered by the target object on the target page, the target hover component is continuously displayed if the page display data corresponding to the page swipe event and the hover display data belong to the same target group.
[0014] The execution logic of the target hover component matches the target service supported by the terminal device, and the component display style of the target hover component conforms to the hover component display preferences of the target object group to which the target object belongs; the target object group is a group of objects using the same type of terminal device.
[0015] Thirdly, this application also provides a component generation apparatus. The apparatus includes:
[0016] The object group determination module is used to determine the object group that matches the target category in response to a hover component creation instruction for a terminal device of a target category.
[0017] The information acquisition module is used to acquire the hover component display preferences of the object group and the hover component business requirements that match the target category;
[0018] The component display parameter determination module is used to perform component display parameter matching based on the hover component display preference, and obtain component display parameters that match the hover component display preference;
[0019] The business logic parameter determination module is used to perform business logic parameter matching based on the business requirements of the hovering component, and obtain business logic parameters that match the business requirements of the hovering component.
[0020] The component creation module is used to create a component based on the component display parameters and the business logic parameters, thereby obtaining the target hover component.
[0021] Fourthly, this application also provides a component display device. The device includes:
[0022] The first hover display module is used to display a target hover component on the target page of the terminal device used by the target object, and to display hover display data in the hover display area associated with the target hover component;
[0023] The second hover display module is used to respond to a page swipe event triggered by the target object on the target page, and to continuously display the target hover component when the page display data corresponding to the page swipe event and the hover display data belong to the same target group;
[0024] The execution logic of the target hover component matches the target service supported by the terminal device, and the component display style of the target hover component conforms to the hover component display preferences of the target object group to which the target object belongs; the target object group is a group of objects using the same type of terminal device.
[0025] Fifthly, this application also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to perform the following steps:
[0026] In response to a hover component creation instruction for a terminal device of a target category, a group of objects matching the target category is determined;
[0027] Obtain the hover component display preferences of the target group, as well as the hover component business requirements that match the target category;
[0028] Based on the hover component display preference, component display parameters are matched to obtain component display parameters that match the hover component display preference;
[0029] Based on the business requirements of the hovering component, business logic parameters are matched to obtain business logic parameters that match the business requirements of the hovering component.
[0030] Based on the component display parameters and the business logic parameters, the component is created to obtain the target hover component.
[0031] Sixthly, this application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, performs the following steps:
[0032] In response to a hover component creation instruction for a terminal device of a target category, a group of objects matching the target category is determined;
[0033] Obtain the hover component display preferences of the target group, as well as the hover component business requirements that match the target category;
[0034] Based on the hover component display preference, component display parameters are matched to obtain component display parameters that match the hover component display preference;
[0035] Based on the business requirements of the hovering component, business logic parameters are matched to obtain business logic parameters that match the business requirements of the hovering component.
[0036] Based on the component display parameters and the business logic parameters, the component is created to obtain the target hover component.
[0037] Seventhly, this application also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, performs the following steps:
[0038] In response to a hover component creation instruction for a terminal device of a target category, a group of objects matching the target category is determined;
[0039] Obtain the hover component display preferences of the target group, as well as the hover component business requirements that match the target category;
[0040] Based on the hover component display preference, component display parameters are matched to obtain component display parameters that match the hover component display preference;
[0041] Based on the business requirements of the hovering component, business logic parameters are matched to obtain business logic parameters that match the business requirements of the hovering component.
[0042] Based on the component display parameters and the business logic parameters, the component is created to obtain the target hover component.
[0043] The aforementioned component generation methods, apparatus, computer devices, storage media, and computer program products take into account that different categories of terminal devices will have different types of target groups, and these target groups will have different display preferences for hover components. Furthermore, it also considers that different categories of terminal devices have different business requirements for hover components. Therefore, when creating hover components for a target category of terminal devices, the first step is to identify the target group that matches that target category and obtain the hover component display preferences of that target group, as well as the hover component business requirements that match that target category. This allows for the matching of component display parameters that satisfy the hover component display preferences and business logic parameters that satisfy the hover component business requirements. In this way, on the one hand, the component display parameters are more closely aligned with the target group, and on the other hand, the business logic parameters are more adaptable to various terminal devices and to the business requirements of terminal devices in various business scenarios. Finally, based on the component display parameters and business logic parameters, the final target hover component is created. In the above process, hover component parameters are matched in a targeted manner from two perspectives: the display preferences of the target audience for hover components and the actual business requirements of hover components. This results in hover component parameters that both fit the preferences of the target audience and meet the actual business requirements, thus improving the adaptability of hover component parameters. As a result, hover components created based on hover component parameters can have high versatility. Attached Figure Description
[0044] Figure 1 This is an application environment diagram of the component generation method in one embodiment;
[0045] Figure 2 This is a flowchart illustrating a component generation method in one embodiment;
[0046] Figure 3 This is a schematic diagram illustrating the hover component in one embodiment;
[0047] Figure 4 This is a schematic diagram illustrating the hover display of page data in one embodiment;
[0048] Figure 5 This is a hovering illustration of a page swipe event in one embodiment;
[0049] Figure 6 This is a hovering illustration of a page swipe-down event in one embodiment;
[0050] Figure 7 This is a flowchart illustrating a component display method in one embodiment;
[0051] Figure 8 This is a schematic diagram illustrating the process of component generation and display in a specific embodiment;
[0052] Figure 9This is a structural block diagram of a component generation device in one embodiment;
[0053] Figure 10 This is a structural block diagram of a component display device in one embodiment;
[0054] Figure 11 This is an internal structural diagram of a computer device in one embodiment;
[0055] Figure 12 This is a diagram of the internal structure of a computer device in another embodiment. Detailed Implementation
[0056] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0057] The component generation method and component display method provided in this application embodiment can be applied to, for example, Figure 1 In the application environment shown, terminal device 102 communicates with server 104 via a network. This communication network can be a wired network or a wireless network. Therefore, terminal device 102 and server 104 can be directly or indirectly connected via wired or wireless communication. For example, terminal device 102 can be indirectly connected to server 104 via a wireless access point, or terminal device 102 can be directly connected to server 104 via the Internet; this application does not impose any limitations on this.
[0058] The terminal device 102 can be, but is not limited to, various desktop computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, and smart in-vehicle devices. Portable wearable devices can include smartwatches, smart bracelets, and head-mounted devices. The server 104 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. The data storage system can store the data that the server 104 needs to process. The data storage system can be set up separately, integrated into the server 104, or placed in the cloud or on other servers.
[0059] Specifically, when server 104 receives a hover component creation instruction for a target category of terminal devices, it first identifies the object group matching the target category. This involves obtaining the hover component display preferences of the object group and the hover component business requirements matching the target category. Next, based on the hover component display preferences, it performs component display parameter matching to obtain component display parameters that match the preferences; and based on the hover component business requirements, it performs business logic parameter matching to obtain business logic parameters that match the business requirements. Finally, based on the component display parameters and business logic parameters, it creates the component, thus obtaining the target hover component. The target hover component is then displayed on the target page of the terminal device 102 used by the target object. It can be understood that server 104 can send the target hover component to terminal device 102 for display. Server 104 can also integrate the target hover component into the applications or software installed on the terminal device, allowing the applications or software on terminal device 102 to display the hover component.
[0060] In one embodiment, such as Figure 2 As shown, a component generation method is provided, which can be applied to... Figure 1 Taking server 104 as an example, the following steps are included:
[0061] Step S202: In response to the hover component creation instruction for the terminal device of the target category, determine the object group that matches the target category.
[0062] The category of terminal devices refers to the type of terminal device, such as mobile phones, tablets, laptops, smart TVs, smartwatches, smart bracelets, head-mounted devices, personal computers, and in-vehicle terminals. It should be noted that this terminal device is different from... Figure 1 The terminal device 102 can be the same device. The target category refers to the category of the terminal device for which the hover component needs to be created; it can be one type of terminal device or multiple types of terminal devices.
[0063] A floating component is a component that floats on top of other page elements, allowing it to be displayed over other page elements. It can also be understood as view overlaying, where a newly created component view is placed on top of an existing component view to achieve specific visual effects or interactive functions, thereby providing quick access to features or real-time information to the target user. Taking a mobile phone as an example... Figure 3The diagram illustrates a hover component, showing that it overlays other page elements, which can include, but are not limited to, buttons, text boxes, images, lists, and videos. The hover component creation command refers to creating a hover component applied to a target category of terminal devices. It can be understood that when there are multiple target categories of terminal devices, the hover component creation command can be for each category of terminal devices, requiring the identification of the target group corresponding to each category of terminal devices.
[0064] The target audience refers to the group of people using a specific type of terminal device, such as the elderly, young people, and children. It's understandable that different types of terminal devices correspond to different target audiences. For example, if the terminal device is a mobile phone for seniors, the target audience is primarily the elderly; if it's a children's smartwatch, the target audience is primarily children; and if it's a smart tablet, the target audience is mostly young people. Different target audiences also have different preferences for the display of hover widgets. For instance, the elderly tend to prefer simple and intuitive widget styles, so their preference for hover widgets might be larger sizes and higher contrast. Children tend to prefer cute and childlike widget styles, such as using cartoon or animal images as icons. Young people, on the other hand, seek more personalized and innovative widget designs, so their preference for hover widgets might include dynamic effects such as smooth animations or gradients on hover, widgets that allow for free selection of various colors or styles, and diverse interaction methods such as clicking, dragging, and zooming. Of course, the categories of target groups are not limited to the examples above. In practical applications, the target groups corresponding to various terminal devices can be determined according to the actual situation.
[0065] Specifically, when the server receives a hover component creation instruction for a target category of terminal devices, it can first determine the target group of users of that target category of terminal devices. This target group can be determined by obtaining information about the users or owners of the target category of terminal devices. Based on this information, the users can be categorized to obtain the target group of terminal devices for that target category.
[0066] Step S204: Obtain the hover component display preferences of the target group and the hover component business requirements that match the target category.
[0067] Hover component display preferences can be understood as the target group's preferences or inclinations regarding the display of hover components, such as preferences for hover component display styles, or preferences for hover component operation. Hover component business requirements refer to the business requirements of hover components on target-category terminal devices, such as whether they support click events, drag-and-drop sorting, swipe-to-delete, automatic grouping, etc. Click events can include events that redirect to a page after clicking, events that display a pop-up window after clicking, events that display groups after clicking, etc. Business requirements can be determined based on the target business supported by the terminal device, or in other words, business requirements can be determined based on the business scenarios supported by the terminal device. Target businesses can include, but are not limited to, floating notifications, floating UI (User Interface) elements in game scenarios, floating menus, and fixed list titles on hover. It can be understood that the business requirements corresponding to different categories of terminal devices can also be different, or that the business requirements corresponding to different categories of terminal devices in different business scenarios can be different. These differences in business requirements will lead to different execution logics of hover components on various types of terminal devices. Therefore, considering the business requirements of various types of terminal devices for hovering components when generating hovering components can ensure that hovering components are compatible with various terminal devices, thereby improving the adaptability of hovering components to terminal devices and the versatility of hovering components in various business scenarios.
[0068] Specifically, after determining the target category of terminal devices and the corresponding object group, the server can obtain the object group's preference information for the display of the hover component, as well as the business requirements of the target category of terminal devices when using the hover component.
[0069] In some embodiments, the hover component display preferences of a target group can be analyzed through trigger data related to the hover component, such as click frequency, browsing frequency, and sharing frequency. Alternatively, hover component display preferences can be obtained through surveys. Hover component display preferences can also be collected from forums corresponding to the hover component. Of course, in practical applications, the method for obtaining hover component display preferences can be determined based on the actual situation, and this embodiment does not impose any limitations on this.
[0070] In some embodiments, the business requirements of a hover component can be determined based on the actual business scenario. For example, one business scenario may require the hover component to support click events, while another may not. Alternatively, the business requirements of the hover component can be determined in real-time during its creation.
[0071] Step S206: Based on the hover component display preference, perform component display parameter matching to obtain component display parameters that match the hover component display preference.
[0072] Component display parameter matching refers to the process of obtaining component display parameters that match the display preferences of the hover component. Component display parameters refer to the relevant parameters of the hover component when it is displayed, such as animation effects like transition animations and state change animations, hover display position, color, style, size, contrast, etc. Transition animations, also known as fading animations, can achieve a smooth transition of the hover component. State change animations involve the switching of the hover component between different states. These states may be triggered by certain external events such as click events, or they may simply switch states automatically after a certain period of time.
[0073] Specifically, after obtaining the hover component display preferences of the target group, the server can perform component display parameter matching based on these preferences. This matching can be done within a pre-set parameter library containing multiple candidate display parameters. In other words, a pre-established association can be created between hover component display preferences and display parameters; each hover component display preference can correspond to a set of display parameters. The server can then filter out the display parameters that are associated with the hover component display preferences from the multiple candidate display parameters in the parameter library and use them as the component display parameters.
[0074] Step S208: Based on the business requirements of the hovering component, perform business logic parameter matching to obtain business logic parameters that match the business requirements of the hovering component.
[0075] Among them, business logic parameter matching refers to the process of obtaining business logic parameters that match the business requirements of the hover component. Business logic parameters refer to the logical parameters of the hover component when it is used, such as the address of the page to be navigated to on click, animation speed, hover effect display time, drag speed, scaling ratio, etc.
[0076] Specifically, after obtaining the hover component business requirements of the target category of terminal devices, the server can perform business logic parameter matching based on these requirements. Similar to component display parameters, matching can also be performed from a pre-set parameter library containing multiple candidate logical parameters. That is, a relationship can be pre-established between hover component business requirements and logical parameters, with each hover component business requirement corresponding to a set of logical parameters. The server can then filter out the logical parameters that are related to the hover component business requirements from the multiple candidate logical parameters in the parameter library, and use these as the business logic parameters.
[0077] It should be noted that there is no fixed order for matching component display parameters and matching business logic parameters. That is, component display parameter matching can be performed first, followed by business logic parameter matching; or business logic parameter matching can be performed first, followed by component display parameter matching; or component display parameter matching and business logic parameter matching can be performed simultaneously.
[0078] Step S210: Based on the component display parameters and business logic parameters, create the component to obtain the target hover component.
[0079] Component creation refers to the process of creating a target hover component. A target hover component is a hover component adapted to a target category of terminal devices. It can be understood that different categories of terminal devices can have corresponding target hover components.
[0080] Specifically, after the server obtains the component display parameters and business logic parameters, it adds these parameters to the hover component framework to obtain the final target hover component. The hover component framework is customizable; by adding the component display parameters and business logic parameters to this framework, the final target hover component can meet the hover component display preferences corresponding to the component display parameters, as well as the hover component business requirements corresponding to the business logic parameters.
[0081] In some embodiments, this embodiment is also applicable to the creation of other types of components, such as list components, text components, and icon components. In this case, what is obtained is the display preference of the target group for these components, as well as the business requirements of these components in the target category of terminal devices.
[0082] In the component generation process described above, it was considered that different types of terminal devices would have different target groups, and these target groups would have different display preferences for hover components. Furthermore, the business requirements for hover components also differed across different types of terminal devices. Therefore, when creating hover components for a target category of terminal devices, the process first identifies the target group matching that category and obtains the target group's hover component display preferences and the hover component business requirements matching that category. This allows for the matching of component display parameters that satisfy the hover component display preferences and business logic parameters that satisfy the hover component business requirements. This ensures that the component display parameters are more closely aligned with the target group and that the business logic parameters are more adaptable to various terminal devices and their business needs in different scenarios. Finally, based on the component display parameters and business logic parameters, the final target hover component is created. In the above process, hover component parameters are matched in a targeted manner from two perspectives: the display preferences of the target audience for hover components and the actual business requirements of hover components. This results in hover component parameters that both fit the preferences of the target audience and meet the actual business requirements, thus improving the adaptability of hover component parameters. As a result, hover components created based on hover component parameters can have high versatility.
[0083] In one embodiment, the component generation method further includes: obtaining the target hover component framework.
[0084] The target hover component framework refers to a framework that integrates the target page elements that need to be displayed on hover in the terminal device. It's understandable that a page contains various types of page elements, such as titles, text, and icons. However, not all page elements can be displayed on hover; therefore, it's necessary to select the target page elements for hover display. Integrating these target page elements into the initial hover component framework results in the target hover component framework.
[0085] Specifically, when the server creates a hover component, it first creates an initial hover component framework. This initial framework can be pre-created or created in real-time. The target page element that needs to be displayed on hover is then integrated into this initial hover component framework to obtain the target hover component framework.
[0086] In one embodiment, a component is created based on component display parameters and business logic parameters to obtain a target hover component, including: obtaining the target hover component when both component display parameters and business logic parameters are added to the target hover component framework.
[0087] Specifically, for a target hover component framework that integrates target page elements that require hover display, the server can add both component display parameters and business logic parameters to the target hover component framework, and then bind these parameters to the target page elements respectively. This results in a target page element that satisfies both the hover component display preferences of the target audience and the business requirements of the hover component, while also possessing hover characteristics.
[0088] In the above embodiments, the target hover component is obtained by adding component display parameters and business logic parameters to the target hover component framework. This enables flexible configuration of the hover component framework and improves the versatility of hover components.
[0089] In one embodiment, when both component display parameters and business logic parameters are added to the target hover component framework, the target hover component is obtained by: associating the component display parameters and business logic parameters with the target page element respectively to obtain the hover element; and creating the target hover component based on the hover element.
[0090] In this context, a hover element refers to an element obtained by associating the target page element with both the component's display parameters and its business logic parameters. This association can be understood as a relationship existing between the target page element and both the component's display parameters and its business logic parameters.
[0091] Specifically, for a target hover component framework that integrates target page elements that require hover display, the server can associate component display parameters and business logic parameters with the target page elements. For example, the component display parameters and business logic parameters can be written into the syntax container corresponding to the target page element to establish associations between the target page element and the component display parameters and business logic parameters, thus obtaining the hover element. It can be understood that this hover element can be displayed on the target page of the terminal device while satisfying the hover component display preferences and business requirements of the target audience. It should be noted that this hover element can be considered the target hover component, meaning that the hover element possesses the functionality of hover display.
[0092] In some embodiments, during the process of associating component display parameters and business logic parameters with target page elements, the component display parameters and business logic parameters can be associated with the target page elements one by one, or the component display parameters and business logic parameters can be associated with the target page elements simultaneously.
[0093] In the above embodiments, by associating the component display parameters and business logic parameters with the target page element that needs to be displayed on hover, the hover element, which is also the target hover component, is obtained. In this way, the hover element can be displayed on the target page of the terminal device while satisfying hover component display preferences and business requirements, thus improving the versatility of the hover component.
[0094] In one embodiment, obtaining a target hover component framework includes: obtaining an initial hover component framework; determining a target page on a terminal device where hover components need to be displayed; selecting target page elements that need to be displayed for hovering from multiple candidate page elements on the target page; and adding the element information of the target page elements to the initial hover component framework to obtain the target hover component framework.
[0095] The initial hover component framework can be understood as a basic custom hover component framework. It can be derived from the `View` class, serving as a flexibly configurable basic framework. The `View` class is the base class for all UI components. Derivation from `View` can be achieved through inheritance syntax. This means the new class (the initial hover component framework) is built upon the base class (`View`), containing all the functionalities of the `View` class and allowing for the flexible addition or modification of elements—essentially integrating target page elements into the initial hover component framework. Integrating target page elements into the initial hover component framework means adding the element information of the target page elements to the framework. Element information can be understood as the basic information of the target page elements, such as element name, element identifier, and element type. Target page elements are the page elements on the target page that need to be displayed on hover. Hover display can be understood as the page element hovering on the target page. The target page refers to the page on the terminal device that needs to display the hover component. This can be the page of an application or software installed on the terminal device, a browser page, or even a page on the terminal device itself. A page often contains different types of page elements, which are used as candidate page elements to select the target page element for hover display.
[0096] Specifically, the server first establishes a basic custom hover component framework, or initial hover component framework, based on the View class. This framework, in addition to possessing all the functionalities of the View class, also allows for custom configuration. Next, the server determines the target page on the terminal device where the hover component needs to be displayed; this can be a single page or multiple pages. It then filters out the target page elements from the candidate page elements on the target page that require hover display. It's worth noting that when filtering for target page elements, the server can determine if each candidate page element meets the hover display criteria. For example, if the hover component size defined in the initial hover component framework is relatively small, text / image elements or video elements are not suitable for hover display, as they may be incomplete or blurry. Title items or icon items, on the other hand, display less content and are suitable for hover display in this scenario. Of course, in practical applications, it's also possible to specify which page elements can be hover displayed based on actual needs. After filtering out the target page elements that require hover display, the server further obtains basic information such as the element name, element identifier, and element type of the target page elements and adds this basic information to the previously established initial hover component framework. In this way, the target page element has the hover property, thus enabling a hover effect to be achieved on the target page.
[0097] In some embodiments, the entire process of generating the above-mentioned components can be integrated into an API (Application Programming Interface) or documentation, which can be directly called during the subsequent component development process, thereby shortening the component development cycle and improving component development efficiency.
[0098] In the above embodiments, by creating a basic custom hover component framework and adding page elements that need to be displayed on hover within this framework, the hover component framework can be flexibly configured, which helps to improve the versatility of hover components created based on the hover component framework.
[0099] It should be noted that although a hover element is obtained in the above embodiments, the actual page data is displayed during hovering. Again, taking a mobile phone as an example, such as... Figure 4 As shown, assuming the hover element is a title item, the actual page data displayed on hover should belong to the title item. Since the date is set as a title item, the page data corresponding to the date, "March 3rd," will be displayed on hover. Of course, in practical applications, the title item can also be other page data, such as groups or categories, and is not limited to dates.
[0100] Therefore, in one embodiment, the component generation method further includes: for a target page in a terminal device that needs to display a hover component, obtaining page display data of the target page and the page element type to which the page display data belongs; obtaining the target element type of the hover element that serves as the target hover component; and, if the page element type is consistent with the target element type, displaying the page display data as hover display data.
[0101] Page display data refers to the data that needs to be displayed on the target page, which can be one or more of the following: list data, image data, video data, and text data. Page display data can exist in corresponding page element types. Taking list data as an example, its page element types can be title items and list items. Title items can correspond to date data or group identifier data, and list items can correspond to specific list data. Figure 3 The list data includes list data 1, list data 2, ..., list data n, all of which are list items. The target element type refers to the type of the hover element; the target element type can be consistent with the element's description. Hover display data refers to the page data displayed on hover.
[0102] In some embodiments, when the data displayed on the page is list data, a RecyclerView component can be further created. The RecyclerView component is a high-efficiency scrolling list control that can implement layouts such as lists, grids, and waterfalls to display large amounts of data within limited screen space. The RecyclerView component can recycle and reuse list item views that have scrolled off-screen, thus avoiding the overhead of frequently creating and destroying list item views, and effectively reducing memory usage and lag. This improves the performance and smoothness of list scrolling. It is understood that the server can also flexibly customize the display and behavior of the RecyclerView component. Since the RecyclerView component is a UI component in Android system development, it can be applied to display list data on Android terminal devices.
[0103] During the creation of the RecyclerView component, a corresponding ViewHolder (an object used to cache the view) needs to be created for each list item in the RecyclerView's data adapter, and the list data is bound to the ViewHolder using the onBindViewHolder method. Additionally, the getItemViewType method can be used to assign different ViewHolders to different types of list items (such as title items and regular list items) for differentiation and management. Furthermore, a scroll listener (OnScrollListener) can be attached to the RecyclerView component to enable real-time monitoring during list scrolling.
[0104] Specifically, for a target page on a terminal device that requires a hover component display, the server can automatically obtain the page display data of that target page and determine the page element type to which the display data belongs. This page element type is then compared with the element type of the hover element. If the two element types match, the page display data is considered a match for the hover element, meaning it can be used as hover display data. It should be noted that when page display data is used as hover display data, it is a fixed hover display.
[0105] In the above embodiments, by comparing the consistency between the page element type to which the page display data belongs and the element type of the hover element, page display data that can be displayed on hover is filtered out, thereby ensuring the accuracy of hover display.
[0106] In one embodiment, displaying page display data as hover display data includes: using page display data as hover display data; in response to a page swipe event triggered by a terminal device, obtaining the target position of the hover display data in the target page; determining the target distance between the target position and the hover display area in the target page; and displaying the hover display data in the hover display area when the target distance meets the distance condition.
[0107] Page swipe events refer to swipe events triggered on the target page. These events can include either page swipe-up or page swipe-down events. In practice, they can also include left-swipe or right-swipe events.
[0108] The target position refers to the coordinates of the hover display data (i.e., the page display data) within the target page. It's important to note that each piece of page display data can be considered a page element, and each page element has corresponding element coordinates or a position; this position is the target position of the page display data. The hover display area refers to the area on the target page where the data is displayed, such as the top, bottom, or other locations on the page. The target spacing refers to the distance between the target position of the hover display data and the hover display area; specifically, it can be the distance between the center of the page element corresponding to the hover display data and the center of the hover display area. Spacing conditions refer to the conditions that the distance between the target position of the hover display data and the hover display area must meet. For example, a zero spacing means that when the distance between the target position of the hover display data and the hover display area is zero, the hover display data and the hover display area overlap, and the hover display data can be displayed within the hover display area.
[0109] Specifically, the server can use page display data as hover display data. In response to a page swipe event triggered by a target object via a terminal device, the server can obtain the target position of the hover display data on the target page. Furthermore, it can use the position of the page element corresponding to the hover display data on the target page as this target position. The server then calculates the distance between this target position and the hover display area on the target page. If this distance meets a preset spacing condition, the hover display data is considered to overlap with the hover display area, and the hover display data can be displayed in the hover display area. If the distance does not meet the preset spacing condition, it means that the hover display data and the hover display area do not overlap, and the currently displayed hover display data within the hover display area can be maintained.
[0110] In one embodiment, in response to a page swipe event triggered by a terminal device, obtaining the target position of the hover display data includes: in response to a page swipe event triggered by a terminal device, taking the position of the first hover display data located below the hover display area as the target position; and in response to a page swipe event triggered by a terminal device, taking the position of the first hover display data located above the hover display area as the target position.
[0111] Taking a mobile phone as an example, Figure 5This is a diagram illustrating a page swipe-down event. "March 4th" is the first hover display data located below the hover display area. If "March 4th" swipes into the hover display area (the area currently occupied by "March 3rd"), "March 4th" will be displayed within the hover display area, while "March 3rd" will be moved off-screen. At this point, the first hover display data below the hover display area will change to "March 5th" (not shown in the diagram).
[0112] Taking a mobile phone as an example, Figure 6 This is an illustration of a page scrolling event. When "March 3rd" is displayed on hover, "March 2nd" is the first hovered data point above the hover display area. Similarly, if "March 2nd" scrolls to the hover display area (where "March 3rd" is located), "March 2nd" will be displayed in the hover display area, while "March 3rd" will move downwards.
[0113] In the above embodiments, by obtaining the target position of the hover display data in the target page, the distance between the target position and the hover display area in the target page is determined. When the distance meets the distance condition, the hover display data is displayed in the hover display area, which ensures that the hover display data can be accurately hovered and displayed, improves the smoothness and accuracy of the hover display, and helps to improve the visual display effect of the hover component.
[0114] In one embodiment, the component generation method further includes: determining a target view component that is associated with the target hover component; and updating the component state of the target view component when a hover display event is triggered for the target hover component.
[0115] Here, the target view component refers to a view component that is associated with the target hover component, such as an icon component. The hover display event refers to the event that displays the target hover component on hover. The component state refers to the state of the target view component. Taking the icon component as an example, the component state can be any one or more of the following: icon color state, icon style state, icon size state, etc.
[0116] Specifically, when a target hover component triggers a hover-to-display event (i.e., the target hover component is displayed on hover), the server can first obtain the component identifier of the target hover component, such as its component name or component number. This allows the server to query for view components that match the component identifier; these view components are the ones associated with the target hover component. The server can then synchronously update the component state of these view components. Alternatively, the server can first query for view components associated with the target hover component, and then directly update the component state of those view components when the target hover component is displayed on hover.
[0117] For example, when the target hover component is displayed, update the color of its associated icon component from gray to bright. Or enlarge the icon component.
[0118] In the above embodiments, when the target hover component is displayed, the component state of the target view component that is associated with the target hover component is updated synchronously, which helps to provide a more intuitive and clear visual feedback on the page.
[0119] In one embodiment, the component generation method further includes: performing performance testing on the target hovering component for each target terminal device to obtain the performance test results of the target hovering component in the target terminal device; and optimizing the parameters of the target hovering component if the performance test results do not meet the expected requirements to obtain an optimized hovering component.
[0120] The target category of terminal devices can include different specifications, such as screen size, resolution, and system version. Target terminal devices refer to terminal devices of different specifications. Performance testing refers to the operation of testing the performance of the target hover component. The performance test results can be used to characterize the performance effect of the target hover component, such as display effect and response rate. Expected requirements refer to the desired effect of the performance test of the target hover component. Parameter optimization can be understood as the operation of optimizing and adjusting the component parameters of the target hover component, namely the component display parameters and / or business logic parameters.
[0121] Specifically, to further improve the versatility of the target hover component, performance testing can be conducted on terminal devices with different screen sizes, resolutions, and system versions to ensure that the target hover component functions correctly on these devices. During testing, simulators, real device debugging, and performance analysis tools can be used to more effectively troubleshoot issues. If the performance test results do not meet expectations, the component display parameters and / or business logic parameters of the target hover component can be optimized and adjusted to obtain an optimized hover component.
[0122] In one example, performance tests can be performed on the target hover component under different business scenarios to obtain performance test results. If the performance test results do not meet expectations, parameter tuning of the target hover component can also be performed.
[0123] In one example, usage data and optimization suggestions from trial users after they interact with the target hover component can also be collected to optimize the target hover component.
[0124] In the above embodiments, performance tests are conducted on the target hovering component in terminal devices of different specifications to ensure that the target hovering component can operate stably on various terminal devices. This not only reduces maintenance costs but also expands the application range of the target hovering component, thereby improving its versatility.
[0125] In one embodiment, such as Figure 7 As shown, a component display method is provided, which can be applied to... Figure 1 Taking terminal device 102 as an example, the following steps are included:
[0126] Step S702: On the target page of the terminal device used by the target object, display the target hover component, and display hover display data in the hover display area associated with the target hover component.
[0127] Here, the target object refers to the object using the terminal device. The execution logic of the target hover component matches the target business supported by the terminal device, and the component display style of the target hover component conforms to the hover component display preferences of the target object group to which the target object belongs; the target object group is the group of objects using the same type of terminal device.
[0128] Specifically, when no page swipe event is triggered on the target page of the terminal device, meaning the target page is stationary, or when the target object has just opened the target page, the target hover component can be automatically displayed on the target page. Hover display data will then be shown in the hover display area. This hover display data can be customized. For example, using a date, the hover display data can be the current date; if no corresponding display data exists for the current date, the nearest date can be displayed by default.
[0129] For example, with Figure 4 For example, suppose Figure 4 If the target page is stationary or the target object has just opened the target page, the displayed target hover component is the title item, the top of the page is the hover display area, and the current date is March 3rd, then the hover display data is "March 3rd". If there is no corresponding list data for "March 3rd", "March 4th" can be automatically displayed on the hover.
[0130] Step S704: In response to a page swipe event triggered by the target object on the target page, if the page display data and hover display data corresponding to the page swipe event belong to the same target group, the target hover component is continuously displayed.
[0131] Page swipe events can include either page swipe-up or page swipe-down events. In essence, page swipe events cause the displayed data on the page to move. Visually, the displayed data does indeed pass through the hover display area, but if the displayed data and the hover display data belong to the same target group, the displayed data will not hover. The same target group can be understood as the same set of data.
[0132] Reference Figure 5 "March 3rd" belongs to the same data group as "List Data 1", "List Data 2", ... "List Data n", and "March 4th" belongs to the same data group as "List Data 3" and "List Data 4". Taking "List Data 1" as an example, when the page scrolls, "List Data 1" visually enters the hover display area, which is the area where "March 3rd" is located. However, since "List Data 1" and "March 3rd" belong to the same data group, "List Data 1" will not hover and will not continuously display "March 3rd". In fact, "List Data 1" and "March 3rd" can be considered as different types of page elements: "List Data 1" is a list item, and "March 3rd" is a title item, and title items can be hovered and displayed.
[0133] Specifically, the target object can trigger a page swipe event on the target page. For this swipe event, the server can obtain the corresponding page display data. If the page display data and the hover display data belong to the same data set, or if the element type corresponding to the page display data is not a hoverable element type, the target hover component will continue to be displayed.
[0134] In one embodiment, the component display method further includes: displaying a selected hover component that matches the page display data when the page display data and hover display data do not belong to the same target group; and displaying the page display data in the hover display area associated with the selected hover component.
[0135] The selected hover component can also be considered the target hover component. The selected hover component is the hover component that matches the page display data. The hover display area associated with the selected hover component and the hover display area associated with the target hover component can be the same area.
[0136] Specifically, if the data displayed on the page and the data displayed on hover do not belong to the same set of data, or if the element type corresponding to the data displayed on the page is an element type that can be displayed on hover, then the hover component corresponding to the data displayed on the page will be displayed.
[0137] In the above embodiments, it is considered that different types of terminal devices will have different target groups, and these target groups have different display preferences for hover components. Furthermore, it is also considered that different types of terminal devices have different business requirements for hover components. Therefore, when creating hover components for target type terminal devices, targeted hover component parameter matching is performed from two perspectives: the target group's hover component display preferences and the actual hover component business requirements. This results in hover component parameters that both fit the target group's preferences and meet actual business needs, improving the adaptability of the hover component parameters. Thus, hover components created based on these parameters have high versatility, facilitating their display in various business scenarios and on various terminal devices.
[0138] The following section uses an Android system terminal device and a list data display scenario as examples to provide a detailed introduction to the component generation method and component display method provided in this application. Figure 8 As shown, it includes the following steps:
[0139] Step S801: In response to the hover component creation instruction for the terminal device of the target category, determine the object group that matches the target category.
[0140] The categories of terminal devices include any one or more of the following: mobile phones, tablets, laptops, smart TVs, smartwatches, smart bracelets, head-mounted devices, personal computers, and in-vehicle terminals. The target groups include the elderly, young people, and children.
[0141] Step S802: Obtain the hover component display preferences of the target group and the hover component business requirements that match the target category.
[0142] The hover component display preferences include one or more of the following: animation effects such as transition animations and state change animations; hover display position; color; style; and size. Smooth animation effects can be achieved using property animation (ValueAnimator). The hover component business requirements include one or more of the following: whether it supports click events; whether it supports drag-and-drop sorting; whether it supports swipe deletion; and whether it supports automatic grouping.
[0143] Step S803: Based on the hover component display preference, perform component display parameter matching to obtain component display parameters that match the hover component display preference.
[0144] Step S804: Based on the business requirements of the hovering component, perform business logic parameter matching to obtain business logic parameters that match the business requirements of the hovering component.
[0145] Step S805: Create a basic custom hover component framework as the initial hover component framework.
[0146] The custom hover component framework is derived from the View class.
[0147] Step S806: Determine the target page on the terminal device where the hover component needs to be displayed, and select the target page element, i.e. the title item, from multiple candidate page elements on the target page for hover display.
[0148] Step S807: Integrate the title item into the initial hover component frame to obtain the target hover component frame.
[0149] Step S808: Associate the component display parameters and business logic parameters with the title item to obtain the hover element, and use the hover element as the target hover component.
[0150] Step S809: In response to a page swipe event triggered by the target object on the target page, the position of the first hover display data located below the hover display area is taken as the target position. The distance between the target position and the hover display area is calculated. If the target distance meets the distance condition, the hover display data is displayed in the hover display area.
[0151] Step S810: In response to the page scrolling event triggered by the target object on the target page, the position of the first hover display data located above the hover display area is taken as the target position. The distance between the target position and the hover display area is calculated. If the target distance meets the distance condition, the hover display data is displayed in the hover display area.
[0152] In the above embodiments, hover component parameters are matched in a targeted manner from two perspectives: the hover component display preferences of the target group and the actual hover component business requirements. This results in hover component parameters that both fit the target group's preferences and meet the actual business requirements, thus improving the adaptability of the hover component parameters. As a result, the hover component created based on the hover component parameters can have high versatility.
[0153] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated 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 steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0154] Based on the same inventive concept, this application also provides a component generation apparatus for implementing the component generation method described above. The solution provided by this apparatus is similar to the implementation described in the above method; therefore, the specific limitations in one or more component generation apparatus embodiments provided below can be found in the limitations of the component generation method described above, and will not be repeated here.
[0155] In one embodiment, such as Figure 9 As shown, a component generation device is provided, including: an object group determination module 902, an information acquisition module 904, a component display parameter determination module 906, a business logic parameter determination module 908, and a component creation module 910, wherein:
[0156] The object group determination module 902 is used to determine the object group that matches the target category in response to the hover component creation instruction for the terminal device of the target category;
[0157] The information acquisition module 904 is used to acquire the hover component display preferences of the target group and the hover component business requirements that match the target category;
[0158] The component display parameter determination module 906 is used to match component display parameters based on hover component display preferences to obtain component display parameters that match hover component display preferences.
[0159] The business logic parameter determination module 908 is used to perform business logic parameter matching based on the business requirements of the hovering component, and obtain business logic parameters that match the business requirements of the hovering component.
[0160] The component creation module 910 is used to create components based on component display parameters and business logic parameters, and obtain the target hover component.
[0161] In some embodiments, the component generation apparatus further includes a component frame acquisition module for acquiring a target hover component frame.
[0162] In some embodiments, the component creation module 910 is further configured to obtain the target hover component when both the component display parameters and the business logic parameters are added to the target hover component framework.
[0163] In some embodiments, the target hover component framework includes the target page element that needs to be hovered and displayed on the terminal device;
[0164] The component creation module 910 is also used to: associate the component display parameters and business logic parameters with the target page elements respectively to obtain hover elements; and create target hover components based on the hover elements.
[0165] In some embodiments, the component framework acquisition module is further configured to: acquire an initial hover component framework; determine the target page on the terminal device where hover component display is required, and select the target page element to be hovered from multiple candidate page elements of the target page; add the element information of the target page element to the initial hover component framework to obtain the target hover component framework.
[0166] In some embodiments, the component generation apparatus further includes:
[0167] The information acquisition module is used to acquire the page display data of the target page and the page element type to which the page display data belongs for the target page that needs to display the hover component on the terminal device.
[0168] The element type retrieval module is used to retrieve the target element type of the hover element that serves as the target hover component.
[0169] The hover display module is used to display page display data as hover display data when the page element type and the target element type are the same.
[0170] In some embodiments, the hover display module further includes:
[0171] Define the hover display data unit, which is used to use the page display data as hover display data;
[0172] The location acquisition unit is used to obtain the target position of the hover display data on the target page in response to a page swipe event triggered by the terminal device;
[0173] The spacing determination unit is used to determine the target spacing between the target location and the hover display area on the target page.
[0174] The hover display unit is used to display hover display data in the hover display area when the target spacing meets the spacing conditions.
[0175] In some embodiments, the page swipe event includes either a page swipe event or a page swipe event;
[0176] The location acquisition unit is also used to: in response to a page swipe event triggered by a terminal device, take the location of the first hover display data below the hover display area as the target location; and in response to a page swipe event triggered by a terminal device, take the location of the first hover display data above the hover display area as the target location.
[0177] In some embodiments, the component generation apparatus is further configured to: determine a target view component that is associated with the target hover component; and update the component state of the target view component when a hover display event is triggered for the target hover component.
[0178] In some embodiments, the target category of terminal devices includes target terminal devices of different specifications; the component generation apparatus is further configured to: perform performance testing on the target hovering component for each target terminal device to obtain the performance test results of the target hovering component in the target terminal device; and optimize the parameters of the target hovering component to obtain the optimized hovering component if the performance test results do not meet the expected requirements.
[0179] Based on the same inventive concept, this application also provides a component display device for implementing the component display method described above. The solution provided by this device is similar to the solution described in the above method; therefore, the specific limitations in one or more component display device embodiments provided below can be found in the limitations of the component display method described above, and will not be repeated here.
[0180] In one embodiment, such as Figure 10 As shown, a component display device is provided, including: a first hover display module 1002 and a second hover display module 1004, wherein:
[0181] The first hover display module 1002 is used to display the target hover component on the target page of the terminal device used by the target object, and to display hover display data in the hover display area associated with the target hover component;
[0182] The second hover display module 1004 is used to respond to the page swipe event triggered by the target object on the target page. When the page display data corresponding to the page swipe event and the hover display data belong to the same target group, the target hover component is continuously displayed.
[0183] Among them, the execution logic of the target hover component matches the target service supported by the terminal device, and the component display style of the target hover component conforms to the hover component display preferences of the target object group to which the target object belongs; the target object group is the group of objects using the same type of terminal device.
[0184] In some embodiments, the component display device is further configured to: display a selected hover component that matches the page display data when the page display data and the hover display data do not belong to the same target group; and display the page display data in the hover display area associated with the selected hover component.
[0185] Each module in the aforementioned component generation device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0186] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 11 As shown, the computer device includes a processor, memory, input / output interfaces (I / O), and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage medium. The database stores data generated by the components. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network connection. When the computer program is executed by the processor, it implements the steps of any of the above method embodiments.
[0187] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 12As shown, the computer device includes a processor, memory, input / output interfaces, a communication interface, a display unit, and an input device. The processor, memory, and input / output interfaces are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interfaces. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The input / output interfaces are used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When the computer program is executed by the processor, it implements a component generation method. The display unit of the computer device is used to form a visually visible image. The display screen of the computer device can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs or touchpads set on the casing of the computer device, or external keyboards, touchpads or mice, etc.
[0188] Those skilled in the art will understand that Figure 11 The structure shown in Figure 12 is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. A specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0189] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the above method embodiments.
[0190] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps of any of the above method embodiments.
[0191] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the acquisition, storage, processing, and transmission of the data all comply with relevant laws and regulations.
[0192] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0193] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0194] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. An assembly generation method, characterized by, The method includes: In response to a hover component creation instruction for a terminal device of a target category, a group of objects matching the target category is determined; Obtain the hover component display preferences of the target group, as well as the hover component business requirements that match the target category; Based on the hover component display preference, component display parameters are matched to obtain component display parameters that match the hover component display preference; Based on the business requirements of the hovering component, business logic parameters are matched to obtain business logic parameters that match the business requirements of the hovering component. Based on the component display parameters and the business logic parameters, the component is created to obtain the target hover component.
2. The method of claim 1, wherein, The method further includes: Obtain the target hover component framework; The step of creating a component based on the component display parameters and the business logic parameters to obtain the target hover component includes: The target hover component is obtained when both the component display parameters and the business logic parameters are added to the target hover component framework.
3. The method of claim 2, wherein, The target hover component framework includes the target page elements that need to be hovered and displayed on the terminal device; The process of obtaining the target hover component when both the component display parameters and the business logic parameters are added to the target hover component framework includes: The component display parameters and the business logic parameters are associated with the target page element respectively to obtain the hover element; Create a target hover component based on the hover element.
4. The method of claim 2, wherein, The target hover component framework includes: Obtain the initial hover component framework; Determine the target page on the terminal device where the hover component needs to be displayed, and select the target page element that needs to be displayed on hover from multiple candidate page elements of the target page; The element information of the target page element is added to the initial hover component frame to obtain the target hover component frame.
5. The method of claim 1, wherein, The method further includes: For the target page in the terminal device that requires the display of the hover component, obtain the page display data of the target page and the page element type to which the page display data belongs; Obtain the target element type of the hover element that serves as the target hover component; If the page element type is consistent with the target element type, the page display data will be used as hover display data for hover display.
6. The method of claim 5, wherein, The step of using the page display data as hover display data for hover display includes: Use the page display data as hover display data; In response to a page swipe event triggered by the terminal device, the target position of the hover display data on the target page is obtained; Determine the target distance between the target location and the hover display area on the target page; When the target spacing meets the spacing condition, the hover display data is displayed in the hover display area.
7. The method of claim 6, wherein, The page scrolling event includes either a page scroll-up event or a page scroll-down event; The step of obtaining the target position of the hover display data in response to a page swipe event triggered by the terminal device includes: In response to a page swipe event triggered by the terminal device, the position of the first hover display data located below the hover display area is taken as the target position; In response to a page swipe-down event triggered by the terminal device, the position of the first hover display data located above the hover display area is taken as the target position.
8. The method of claim 1, wherein, The method further includes: Identify the target view component that is associated with the target hover component; When a hover display event is triggered for the target hover component, the component state of the target view component is updated.
9. The method of claim 1, wherein, The target category of terminal devices includes target terminal devices of different specifications; the method further includes: For each target terminal device, a performance test is performed on the target hovering component to obtain the performance test results of the target hovering component in the target terminal device. If the performance test results do not meet the expected requirements, the parameters of the target hovering component are optimized to obtain an optimized hovering component.
10. An assembly display method characterized by comprising: The method includes: On the target page of the terminal device used by the target object, the target hover component is displayed, and hover display data is displayed in the hover display area associated with the target hover component; In response to a page swipe event triggered by the target object on the target page, the target hover component is continuously displayed if the page display data corresponding to the page swipe event and the hover display data belong to the same target group. The execution logic of the target hover component matches the target service supported by the terminal device, and the component display style of the target hover component conforms to the hover component display preferences of the target object group to which the target object belongs; the target object group is a group of objects using the same type of terminal device.
11. The method of claim 10, wherein, The method further includes: If the data displayed on the page and the data displayed on the hover do not belong to the same target group, the selected hover component that matches the data displayed on the page will be displayed. The page display data is shown in the hover display area associated with the selected hover component.
12. An assembly generation device, characterized by The device includes: The object group determination module is used to determine the object group that matches the target category in response to a hover component creation instruction for a terminal device of a target category. The information acquisition module is used to acquire the hover component display preferences of the object group and the hover component business requirements that match the target category; The component display parameter determination module is used to perform component display parameter matching based on the hover component display preference, and obtain component display parameters that match the hover component display preference; The business logic parameter determination module is used to perform business logic parameter matching based on the business requirements of the hovering component, and obtain business logic parameters that match the business requirements of the hovering component. The component creation module is used to create a component based on the component display parameters and the business logic parameters, thereby obtaining the target hover component.
13. An assembly display device, characterized by The device includes: The first hover display module is used to display a target hover component on the target page of the terminal device used by the target object, and to display hover display data in the hover display area associated with the target hover component; The second hover display module is used to respond to a page swipe event triggered by the target object on the target page, and to continuously display the target hover component when the page display data corresponding to the page swipe event and the hover display data belong to the same target group; The execution logic of the target hover component matches the target service supported by the terminal device, and the component display style of the target hover component conforms to the hover component display preferences of the target object group to which the target object belongs; the target object group is a group of objects using the same type of terminal device.
14. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 11.
15. A computer readable storage medium having stored thereon a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 11.