Methods, apparatus, equipment and media for generating time selectors
By generating a time selector, obtaining the target selector parameters and identifier, and using a container library and selector container to render the initial selector component, the problem of insufficient universality and flexibility of time selectors in the existing technology is solved, and flexible time dimension selection is realized.
Patent Information
- Application Number
- CN202210935152.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-04
- Publication Date
- 2026-11-17
- Estimated Expiration
- 2042-08-04
AI Technical Summary
Existing time selectors lack versatility and flexibility when facing complex and highly customized data analysis scenarios, and cannot meet the diverse and complex needs for selecting time dimensions.
By generating a time selector, the target selector parameters and identifier are obtained, the target selector container is determined from the container library, and an initial selector component is generated on the display interface. The initial selector component is then rendered using the target selector container to generate the target time selector.
It improves the configuration flexibility of the time selector, enabling it to meet the needs of diverse, complex, and customized time dimension selection scenarios, and overcomes the problems of insufficient versatility and flexibility in related technologies.
Smart Images

Figure CN115309488B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the fields of computer technology and finance, and more specifically, to a time selector generation method, a time selector generation apparatus, an electronic device, and a storage medium. Background Technology
[0002] As the value of data becomes increasingly apparent, more and more users hope to use the results of data analysis to assist them in making judgments and decisions. In the data analysis process, dimensions represent the user's perspective on analyzing data, and time, as one of the most commonly used dimensions, appears in most data analysis scenarios.
[0003] In related technologies, time selectors are often used to select a specific point in time or a range of time. However, with the increase in data volume and time span, time selection scenarios in data analysis have become increasingly complex. Due to their poor versatility and lack of flexibility, time selectors in related technologies can no longer meet the needs of highly customized time selection scenarios. Summary of the Invention
[0004] In view of the above, this disclosure provides a time selector generation method, a time selector generation apparatus, an electronic device, a readable storage medium, and a computer program product.
[0005] One aspect of this disclosure provides a time selector generation method, comprising: in response to a time selector generation request, obtaining a target selector parameter and a selector identifier carried in the time selector generation request; determining a target selector container from a container library based on the selector identifier; generating an initial selector component on a display interface based on the target selector container; and loading the target selector parameter into the target selector container to render the initial selector component using the target selector container to obtain a target time selector.
[0006] According to embodiments of this disclosure, the initial selector component includes a text box component and a dropdown component, and the target selector parameters include target echo parameters, a target filter panel array, and target button configuration parameters. The step of rendering the initial selector component using the target selector container to obtain a target time selector includes: determining a target filter panel associated with the target selector container based on the target filter panel array; configuring the echo content of the text box component based on the target echo parameters; and rendering the dropdown component based on the target button configuration parameters and the target filter panel.
[0007] According to embodiments of this disclosure, the dropdown component includes a first operation area, a second operation area, and a display area, wherein the display area includes display panels, and the number of display panels is equal to the number of target filter panels; wherein rendering the dropdown component based on the target button configuration parameters and the target filter panels includes: rendering operation buttons in the first operation area based on the target button configuration parameters; rendering toggle buttons in the second operation area based on the number of target filter panels, wherein the toggle buttons are related to the display panels; determining the target panel type of the target filter panels; and rendering the target filter panels on the display panels based on the target panel type of the target filter panels.
[0008] According to an embodiment of this disclosure, the method further includes: in response to listening to a mouse movement event, determining a target switching button in the second operation area associated with the mouse movement event, wherein the mouse movement event indicates that the user moves the mouse to the target switching button; and switching the display panel of the display area to the target display panel associated with the target switching button.
[0009] According to embodiments of this disclosure, the method further includes: generating at least one time node in response to a user's click operation on the target display panel; and adjusting the echo content in the text box component based on the panel type and data type of the filter panel associated with the target display panel.
[0010] According to embodiments of this disclosure, the elements of the target filter panel array are characterized as target filter panel identifiers; determining the target filter panel associated with the target selector container based on the target filter panel array includes: obtaining a plurality of filter panels through a preset interface, wherein the filter panels have filter panel identifiers; and matching the target filter panel identifiers with the filter panel identifiers of the plurality of filter panels to determine the target filter panel from the plurality of filter panels.
[0011] According to an embodiment of this disclosure, the method further includes: receiving a user's filter panel configuration operation, wherein the filter panel configuration operation carries a panel type, a data type, and a label; and loading the panel type, the data type, and the label into an initial filter panel object to obtain the filter panel.
[0012] According to embodiments of this disclosure, the method further includes: in response to a selector container generation request, obtaining selector parameters carried in the selector container generation request, wherein the selector parameters include echo parameters, a filter panel array, and button configuration parameters; creating an initial text box component and an initial dropdown component; configuring the structure of the initial dropdown component based on the filter panel array and the button configuration parameters; configuring the echo logic of the initial text box component based on the echo parameters and the filter panel array; generating a selector container based on the configured initial text box component and the configured initial dropdown component; and storing the selector container in the container library.
[0013] Another aspect of this disclosure provides a time selector generation apparatus, comprising: a first acquisition module, configured to acquire, in response to a time selector generation request, a target selector parameter and a selector identifier carried in the time selector generation request; a first determination module, configured to determine a target selector container from a container library based on the selector identifier; a first generation module, configured to generate an initial selector component on a display interface based on the target selector container; and a first processing module, configured to load the target selector parameter into the target selector container, and render the initial selector component using the target selector container to obtain a target time selector.
[0014] Another aspect of this disclosure provides an electronic device, including: one or more processors; and a memory for storing one or more instructions, wherein when the one or more instructions are executed by the one or more processors, the one or more processors cause the one or more processors to perform the method as described above.
[0015] Another aspect of this disclosure provides a computer-readable storage medium storing computer-executable instructions, which, when executed, are used to implement the method described above.
[0016] Another aspect of this disclosure provides a computer program product including computer-executable instructions that, when executed, implement the method described above.
[0017] According to embodiments of this disclosure, the selector container can be pre-configured based on user-inputted container parameters. When generating a time selector, the target selector container can be determined from the container library based on the time selector identifier carried in the request. The target selector parameters carried in the request are then loaded into the target selector container, allowing it to render the initial selector component on the display interface using these parameters, thereby generating the target time selector on the display interface. Through the above technical means, the technical problems of poor versatility and flexibility of time selectors in related technologies are at least partially overcome, effectively improving the flexibility of time selector configuration and meeting the needs of diversified, complex, and customized time dimension selection scenarios. Attached Figure Description
[0018] The above and other objects, features and advantages of this disclosure will become clearer from the following description of embodiments with reference to the accompanying drawings, in which:
[0019] Figure 1 The illustration schematically depicts an exemplary system architecture for which a time selector generation method and apparatus can be applied according to embodiments of the present disclosure.
[0020] Figure 2 A flowchart illustrating a time selector generation method according to an embodiment of the present disclosure is shown schematically.
[0021] Figure 3 A flowchart illustrating a selector container generation method according to an embodiment of the present disclosure is shown schematically.
[0022] Figure 4 A flowchart illustrating a method for generating a filter panel according to an embodiment of the present disclosure is shown schematically.
[0023] Figure 5 A schematic diagram of an initial selector component according to an embodiment of the present disclosure is shown.
[0024] Figure 6A A schematic diagram of a target time selector according to an embodiment of the present disclosure is shown.
[0025] Figure 6B A schematic diagram of a target time selector after switching according to an embodiment of the present disclosure is shown.
[0026] Figure 7 A schematic diagram of a target time selector according to another embodiment of the present disclosure is shown.
[0027] Figure 8 A block diagram of a time selector generation apparatus according to an embodiment of the present disclosure is shown schematically.
[0028] Figure 9 A block diagram of an electronic device suitable for implementing a time selector generation method according to an embodiment of the present disclosure is shown schematically. Detailed Implementation
[0029] The embodiments of the present disclosure will now be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the disclosure. In the following detailed description, numerous specific details are set forth to provide a thorough understanding of the embodiments of the present disclosure for ease of explanation. However, it will be apparent that one or more embodiments may be practiced without these specific details. Furthermore, descriptions of well-known structures and techniques are omitted in the following description to avoid unnecessarily obscuring the concepts of the present disclosure.
[0030] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit this disclosure. The terms “comprising,” “including,” etc., as used herein indicate the presence of the stated features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.
[0031] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein are to be interpreted in a manner consistent with the context of this specification, and not in an idealized or overly rigid way.
[0032] When using expressions such as "among A, B, and C, etc.", they should generally be interpreted in accordance with the meaning commonly understood by a person skilled in the art (e.g., "a system having A, B, and C" should include, but is not limited to, systems having A alone, having B alone, having C alone, having A and B, having A and C, having B and C, and / or systems having A, B, and C, etc.). When using expressions such as "among A, B, or C, etc.", they should generally be interpreted in accordance with the meaning commonly understood by a person skilled in the art (e.g., "a system having A, B, or C" should include, but is not limited to, systems having A alone, having B alone, having C alone, having A and B, having A and C, having B and C, and / or systems having A, B, and C, etc.).
[0033] As the value of data becomes increasingly apparent, more and more users hope to use the results of data analysis to assist them in making judgments and decisions. In the data analysis process, dimensions represent the user's perspective on analyzing data, and time, as one of the most commonly used dimensions, appears in most data analysis scenarios.
[0034] In related technologies, time pickers are often used to select a specific point in time or a range of time. Many time or date picker components exist on the market, such as time pickers implemented based on UI design frameworks and native browser date pickers. The main way to implement date and time pickers in these technologies relies on the user defining and passing in enumerated variables, which are then matched within the component to render and display one of the preset selectors of different types.
[0035] As data volume increases and time spans widen, time filtering scenarios in data analysis become increasingly complex. For date and time selectors in related technologies, their coverage of scenarios is limited because their predefined enumeration values are finite. Users of date and time selectors can only pass in one valid enumeration value through configuration options, thus preventing customized use.
[0036] For example, in traffic statistics scenarios, users have diverse needs regarding the time dimension of traffic statistics. During a major e-commerce promotion, users want to see traffic statistics for that specific day; at the end of the month, they want to see the traffic statistics for that month; and even for a specific week, quarter, or year, users want to see data statistics for that specific time dimension. In such complex and highly variable scenarios, existing time selectors cannot cover all time dimensions. Therefore, there is no universal, simple, and configurable solution in related technologies that can cover complex and highly customized date and time selection scenarios.
[0037] In view of this, embodiments of the present disclosure provide a time selector generation method. The user can pass in a selector panel to be rendered through configuration, and the panel is rendered in a container. This allows the generated time selector to avoid the limitations of determining the selector type by enumeration in related technologies, meet the diverse, complex, and customized time dimension selection needs, and make up for the lack of the ability to quickly select the time dimension in complex and customized scenarios in related technologies.
[0038] Specifically, embodiments of this disclosure provide a time selector generation method, apparatus, electronic device, readable storage medium, and computer program product. The method includes: in response to a time selector generation request, obtaining target selector parameters and a selector identifier carried in the time selector generation request; determining a target selector container from a container library based on the selector identifier; generating an initial selector component on a display interface based on the target selector container; and loading the target selector parameters into the target selector container to render the initial selector component using the target selector container to obtain a target time selector.
[0039] It should be noted that, unless it is explicitly stated that there is a sequential order of execution between different operations, or that there is a sequential order of execution between different operations in terms of technical implementation, the execution order between multiple operations may not be significant, and multiple operations may be executed simultaneously.
[0040] Figure 1 The illustration schematically depicts an exemplary system architecture to which the time selector generation method and apparatus can be applied according to embodiments of this disclosure. It should be noted that... Figure 1 The examples shown are merely examples of system architectures that can be applied to the embodiments of this disclosure, in order to help those skilled in the art understand the technical content of this disclosure, but do not mean that the embodiments of this disclosure cannot be used in other devices, systems, environments or scenarios.
[0041] like Figure 1 As shown, the system architecture 100 according to this embodiment may include terminal devices 101, 102, and 103, a network 104, and a server 105.
[0042] Terminal devices 101, 102, and 103 can be various electronic devices with displays, including but not limited to smartphones, tablets, laptops, and desktop computers. Users can directly or indirectly initiate a time selector generation request by inputting information on terminal devices 101, 102, and 103, and the final generated target time selector can be displayed on the displays of terminal devices 101, 102, and 103.
[0043] Network 104 is a medium used to provide a communication link between terminal devices 101, 102, 103 and server 105. Network 104 may include various connection types, such as wired and / or wireless communication links.
[0044] Server 105 can be a server that provides various services, such as a background management server that supports time selector generation requests initiated by users using terminal devices 101, 102, and 103. The background management server can respond to the request, call relevant containers and static resources to generate the target time selector, and then send the generated target time selector back to the terminal device.
[0045] It should be noted that the time selector generation method provided in this embodiment can generally be executed by server 105. Correspondingly, the time selector generation device provided in this embodiment can generally be located in server 105. The time selector generation method provided in this embodiment can also be executed by a server or server cluster that is different from server 105 and capable of communicating with terminal devices 101, 102, 103 and / or server 105. Correspondingly, the time selector generation device provided in this embodiment can also be located in a server or server cluster that is different from server 105 and capable of communicating with terminal devices 101, 102, 103 and / or server 105. Alternatively, the time selector generation method provided in this embodiment can also be executed by terminal devices 101, 102, or 103, or by other terminal devices different from terminal devices 101, 102, or 103. Accordingly, the time selector generation device provided in this embodiment may also be disposed in terminal device 101, 102, or 103, or in other terminal devices different from terminal device 101, 102, or 103.
[0046] For example, terminal device 101 may respond to a user's information input operation by generating a time selector generation request and locally execute the time selector generation method provided in this embodiment of the disclosure to generate a target time selector. Alternatively, terminal device 101 may send the request to other terminal devices, servers, or server clusters, and the other terminal devices, servers, or server clusters receiving the request may execute the time selector generation method provided in this embodiment of the disclosure. Afterward, the other terminal devices, servers, or server clusters receiving the request may return the generated target time selector to terminal device 101.
[0047] It should be understood that Figure 1 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.
[0048] Figure 2 A flowchart illustrating a time selector generation method according to an embodiment of the present disclosure is shown schematically.
[0049] like Figure 2 As shown, the method includes operations S201 to S204.
[0050] In operation S201, in response to the time selector generation request, the target selector parameter and selector identifier carried in the time selector generation request are obtained.
[0051] In operation S202, the target selector container is determined from the container library based on the selector identifier.
[0052] In operation S203, an initial selector component is generated on the display interface based on the target selector container.
[0053] In operation S204, the target selector parameters are loaded into the target selector container so that the target selector container can be used to render the initial selector component to obtain the target time selector.
[0054] According to embodiments of this disclosure, the time selector generation request can be generated directly or indirectly based on information input operations by the user on the terminal device. For example, when a user queries 5G data usage costs using a mobile service hall client on their phone, the client application can generate a time selector generation request based on the query behavior, thereby generating a time selector on the phone's display interface so that the user can select the query period.
[0055] According to embodiments of this disclosure, the target selector parameters can be set according to specific application scenarios. For example, the target selector parameters can be set according to the time dimension requirements in the application scenario, without limitation. In some embodiments, the target selector parameters can be matched with the parameters used when creating the selector container.
[0056] According to embodiments of this disclosure, the selector identifier can be an identifier used to uniquely identify the selector container. The selector identifier can be represented as a string or a set of numbers, and its form is not limited herein.
[0057] According to embodiments of this disclosure, a container library can be used to store and manage selector containers. The container library can be a container engine, such as Docker (an application container engine) or Kubernetes (a container cluster management system), or it can be a storage medium for storing selector containers, such as a code repository or database; no limitation is made herein.
[0058] According to embodiments of this disclosure, a target selector container may have a corresponding component template, which can be used to represent the types, quantities, and positional relationships of components contained in an initial selector component generated based on the target selector container.
[0059] According to embodiments of this disclosure, the selector container can be pre-configured based on user-inputted container parameters. When generating a time selector, the target selector container can be determined from the container library based on the time selector identifier carried in the request. The target selector parameters carried in the request are then loaded into the target selector container, allowing it to render the initial selector component on the display interface using these parameters, thereby generating the target time selector on the display interface. Through the above technical means, the technical problems of poor versatility and flexibility of time selectors in related technologies are at least partially overcome, effectively improving the flexibility of time selector configuration and meeting the needs of diversified, complex, and customized time dimension selection scenarios.
[0060] The following is for reference. Figures 3-5 , Figure 6A , Figure 6B and Figure 7 In conjunction with specific embodiments, Figure 2 The method shown will be further explained.
[0061] Figure 3 A flowchart illustrating a selector container generation method according to an embodiment of the present disclosure is shown schematically.
[0062] like Figure 3 As shown, the method includes operations S301 to S305.
[0063] In operation S301, in response to the selector container generation request, the selector parameters carried in the selector container generation request are obtained. The selector parameters include echo parameters, filter panel array, and button configuration parameters.
[0064] In operation S302, create the initial text box component and the initial drop-down box component.
[0065] In operation S303, the structure of the initial drop-down box component is configured based on the filter panel array and button configuration parameters.
[0066] In operation S304, the echo logic of the initial text box component is configured based on the echo parameters and the filter panel array.
[0067] In operation S305, a selector container is generated based on the initial text box component and the initial drop-down box component that have been configured.
[0068] According to embodiments of this disclosure, the filter panel array can be an array-type parameter, where each element can contain a field key and a field label. The field key can be an identifier for the filter panel, and each field key can uniquely correspond to a filter panel. The field label can serve as the name of the filter panel.
[0069] According to embodiments of this disclosure, the echo parameter can be an object-type parameter, and its value can be used to determine the display format of the echo content in the initial text box component. In different application scenarios, the same date can be displayed in different formats by selecting the value of the echo parameter. Taking year, month, and day as an example, the echo parameter can select values including CN, EU, and US. For the same date, January 2, 2000, when the echo parameter is "CN", the echo content can be represented as "2000 / 01 / 02"; when the echo parameter is "EU", the echo content can be represented as "02 / 01 / 2000"; and when the echo parameter is "US", the echo content can be represented as "01 / 02 / 2000".
[0070] According to embodiments of this disclosure, the button configuration parameter can be a Boolean parameter. There can be multiple button configuration parameters in the selector parameters, and each button configuration parameter can have a corresponding operation button. The value of the button configuration parameter can be used to control the display or hiding of the corresponding operation button. The operation button can include buttons such as "Clear," "OK," and "Cancel." The "Clear" button can be used to clear the selected content in the filter panel; the "OK" button can send the currently selected content in the filter panel to the initial text box component; and the "Cancel" button can be used to close the initial dropdown component.
[0071] According to embodiments of this disclosure, the initial text box component and the initial dropdown component can be two parts of a single React component (JavaScript framework). The initial text box component can be used to display the echo content of the selector, and the initial dropdown component can be used to host a filter panel and implement other functionalities.
[0072] According to embodiments of this disclosure, after creating a React component, the name and default value corresponding to the selector parameter can also be declared inside the React component.
[0073] According to embodiments of this disclosure, configuring the structure of the initial dropdown component can involve configuring the positions of each area within the initial dropdown component, and configuring the positions of the parameters to be displayed in the selector parameters within each area of the initial dropdown component. For example, based on the selector parameters used when configuring the selector container, it can be determined that the initial dropdown component has three areas: a tab list, an operation area, and a display area. When configuring the structure of the dropdown component, the tab list can be placed to the left of the display area and the operation area below the display area based on the user's dragging operation of the pattern on the display interface. Furthermore, the name of each item in the tab list can be configured as the label field of each element in the filter panel array.
[0074] According to embodiments of this disclosure, configuring the echo logic of the initial text box component may include configuring the display format of the echo content of the initial text box component and configuring the relationship between the echo content and the values selected in each filter panel. Configuring the display format of the echo content of the initial text box component can be directly determined based on the values of the echo parameters, and will not be elaborated further here. When configuring the relationship between the echo content and the values selected in each filter panel, a function can be created and passed as a parameter to the initial dropdown component. When a filter panel within the initial dropdown component changes, the function is triggered, causing the function to receive the selection value returned by the filter panel. The output result of the function based on the selection value can be used to adjust the echo content of the initial text box component.
[0075] According to embodiments of this disclosure, the generated selector container can be stored in a container library for later invocation when generating a time selector.
[0076] According to embodiments of this disclosure, by generating a selector container in a configurable manner, the time selector can be customized, which is simple and easy to maintain. At the same time, by encapsulating it as a component, the selector container can be used in a variety of products with date and time selection requirements, covering customized and complex time selection scenarios.
[0077] Figure 4 A flowchart illustrating a method for generating a filter panel according to an embodiment of the present disclosure is shown schematically.
[0078] like Figure 4 As shown, the method includes operations S401 to S402.
[0079] In operation S401, the user's filter panel configuration operation is received. The filter panel configuration operation carries the panel type, data type, and label.
[0080] In operation S402, the panel type, data type, and label are loaded into the initial filter panel object to obtain the filter panel.
[0081] According to embodiments of this disclosure, the panel type can be used to represent the type of the selected filter panel, such as date type, clock type, etc. The panel type can be determined based on the time dimension required by the filter panel.
[0082] According to embodiments of this disclosure, data types can be used to determine the processing logic of values in the filter panel, such as formatting logic, internationalization multilingual logic, etc.
[0083] According to embodiments of this disclosure, a label may refer to a field labeled in the corresponding filter panel.
[0084] According to embodiments of this disclosure, the render (functional component) method can be used to return an initial filter panel object. Then, the panel type, data type, and tags can be loaded into the initial filter panel object to realize the development of a customized logical structure for the filter panel. Finally, the developed DOM (Document Object Model) template structure is returned in the return value object of the render function to obtain the filter panel.
[0085] According to embodiments of this disclosure, after obtaining the filter panel, the filter panel object corresponding to the filter panel can be exposed to the outside world, so that the filter panel can be called by the selector container or other filter panels through a preset interface.
[0086] Figure 5 A schematic diagram of an initial selector component according to an embodiment of the present disclosure is shown.
[0087] like Figure 5 As shown, the initial selector component 500 may include a text box component 510 and a drop-down box component 520.
[0088] According to an embodiment of this disclosure, when generating an initial selector component 500 on a display interface, a static resource file corresponding to the target selector container can be called, and the static resource file can be rendered on the display interface to obtain the initial selector component 500.
[0089] According to embodiments of this disclosure, the target selector parameters may include target echo parameters, target filter panel array, and target button configuration parameters.
[0090] According to embodiments of this disclosure, rendering the initial selector component 500 using the target selector container may include the following operations:
[0091] Based on the target filter panel array, determine the target filter panel associated with the target selector container; configure the echo content of the text box component 510 based on the target echo parameters; and render the drop-down component 520 based on the target button configuration parameters and the target filter panel.
[0092] According to embodiments of this disclosure, the elements of the target filter panel array can be characterized as target filter panel identifiers.
[0093] According to embodiments of this disclosure, determining the target filter panel associated with the target selector container based on the target filter panel array may include the following operations:
[0094] Multiple filter panels are obtained through a preset interface, wherein each filter panel has a filter panel identifier; and the target filter panel identifier is matched with the filter panel identifiers of the multiple filter panels to determine the target filter panel from the multiple filter panels.
[0095] According to embodiments of this disclosure, such as Figure 5 As shown, the dropdown component 520 may include a first operation area 521, a second operation area 522, and a display area 523. The positional relationship between the first operation area 521, the second operation area 522, and the display area 523 can be determined based on the target selector.
[0096] In some embodiments, the drop-down component 520 may also include other areas, such as an area for displaying week numbers, an area for displaying day-of-the-week information, etc., which are not limited here.
[0097] According to embodiments of this disclosure, the display area 523 may include multiple overlapping display panels, the number of which may be equal to the number of target filtering panels.
[0098] According to embodiments of this disclosure, rendering the dropdown component based on the target button configuration parameters and the target filter panel may include the following operations:
[0099] Based on the target button configuration parameters, operation buttons are rendered and generated in the first operation area 521; based on the number of target filter panels, switching buttons are rendered and generated in the second operation area 522, wherein the switching buttons are related to the display panel; the target panel type of the target filter panel is determined; and based on the target panel type of the target filter panel, the target filter panel is rendered on the display panel.
[0100] According to embodiments of this disclosure, when rendering target filter panels, different rendering types can be defined based on the target panel type of each target filter panel for differentiated rendering. When iterating through each rendering type and rendering them one by one, the target filter panel can be treated as a Recat element and passed to the render function. The render function can then recognize and render the Recat element in the area to be displayed, i.e., on the display panel corresponding to the target filter panel.
[0101] According to embodiments of this disclosure, when rendering the first operation area 521, it can be determined whether to display operation buttons based on the value of the target button configuration parameter. When the value of the target button configuration parameter is "true", the operation button corresponding to the target button configuration parameter can be displayed in the first operation area 521.
[0102] According to an embodiment of this disclosure, when rendering the second operation area 522, switching buttons can be generated in the second operation area 522, and the number of switching buttons can be equal to the number of target filter panels; then, the label field of each element in the target filter panel array can be added to the switching buttons in sequence.
[0103] According to embodiments of this disclosure, after configuring the initial selector component 500, the process may further include establishing data communication between the target selector container and the target filter panel. Specifically, this process may include: listening to change events in the target filter panel; when a change event is detected, notifying the target selector container; and the target selector container may pass the selected value from the change event to the text box component 510 to achieve data display.
[0104] Figure 6A A schematic diagram of a target time selector according to an embodiment of the present disclosure is shown.
[0105] like Figure 6A As shown, the target time selector can be rendered based on the initial selector component 500. The first operation area of the target time selector can include a "clear" button and an "OK" button, and the second operation area can include toggle buttons for day, week, month, etc., indicating that the target time selector can achieve multi-dimensional time filtering by day, week, etc. The display area corresponding to each toggle button can include two filter panels. The filter panel on the left can be used to indicate the start time of time selection, and the filter panel on the right can be used to indicate the end time of time selection.
[0106] According to embodiments of this disclosure, the filter panel displayed in the display area of the target time selector can change in response to a mouse-in event. Specifically, this can include the following operations: in response to listening to a mouse-in event, determining a target switching button in the second operation area associated with the mouse-in event, wherein the mouse-in event is characterized by the user moving the mouse to the target switching button; and switching the display panel of the display area to the target display panel associated with the target switching button.
[0107] Figure 6B A schematic diagram of a target time selector after switching according to an embodiment of the present disclosure is shown.
[0108] like Figure 6B As shown, the text box component of the target time selector can be used to display an echo value determined based on the user's selection, which can be determined based on the user's selection value in all display panels.
[0109] According to embodiments of this disclosure, the user's selection value in all display panels can be determined by: generating at least one time point in response to the user's click operation on the target display panel; and adjusting the echo content in the text box component based on the panel type and data type of the filter panel associated with the target display panel.
[0110] For example, such as Figure 6A The target time selector's display panel shows selection values from 2000 to 2020, as shown. Figure 6B If the selected value in the display panel of the target time selector is January to May, then the displayed value can be represented as 2000-01 to 2020-05.
[0111] Figure 7 A schematic diagram of a target time selector according to another embodiment of the present disclosure is shown.
[0112] like Figure 7 As shown, the positional relationship between the first operation area, the second operation area, and the display area can change depending on the target selector container used. For example, the display area, the first operation area, and the second operation area can be arranged in a top-down order.
[0113] Figure 8 A block diagram of a time selector generation apparatus according to an embodiment of the present disclosure is shown schematically.
[0114] like Figure 8 As shown, the time selector generation device 800 includes a first acquisition module 810, a first determination module 820, a first generation module 830, and a first processing module 840.
[0115] The first acquisition module 810 is used to acquire the target selector parameter and selector identifier carried in the time selector generation request in response to the time selector generation request.
[0116] The first determining module 820 is used to determine the target selector container from the container library based on the selector identifier.
[0117] The first generation module 830 is used to generate an initial selector component on the display interface based on the target selector container.
[0118] The first processing module 840 is used to load the target selector parameters into the target selector container, so as to use the target selector container to render the initial selector component and obtain the target time selector.
[0119] According to embodiments of this disclosure, the selector container can be pre-configured based on user-inputted container parameters. When generating a time selector, the target selector container can be determined from the container library based on the time selector identifier carried in the request. The target selector parameters carried in the request are then loaded into the target selector container, allowing it to render the initial selector component on the display interface using these parameters, thereby generating the target time selector on the display interface. Through the above technical means, the technical problems of poor versatility and flexibility of time selectors in related technologies are at least partially overcome, effectively improving the flexibility of time selector configuration and meeting the needs of diversified, complex, and customized time dimension selection scenarios.
[0120] According to embodiments of this disclosure, the initial selector component includes a text box component and a drop-down box component, and the target selector parameters include target echo parameters, a target filter panel array, and target button configuration parameters.
[0121] According to embodiments of this disclosure, the first processing module 840 includes a first processing unit, a second processing unit, and a third processing unit.
[0122] The first processing unit is used to determine the target filter panel associated with the target selector container based on the target filter panel array.
[0123] The second processing unit is used to configure the echo content of the text box component based on the target echo parameters.
[0124] The third processing unit is used to render the dropdown component based on the target button configuration parameters and the target filter panel.
[0125] According to embodiments of this disclosure, the dropdown component includes a first operation area, a second operation area, and a display area, wherein the display area includes display panels, and the number of display panels is equal to the number of target filter panels.
[0126] According to embodiments of this disclosure, the third processing unit includes a first processing subunit, a second processing subunit, a third processing subunit, and a fourth processing subunit.
[0127] The first processing subunit is used to render and generate operation buttons in the first operation area based on the target button configuration parameters.
[0128] The second processing subunit is used to render and generate switching buttons in the second operation area based on the number of target filter panels, wherein the switching buttons are related to the display panel.
[0129] The third processing subunit is used to determine the target panel type of the target filter panel.
[0130] The fourth processing subunit is used to render the target filter panel on the display panel based on the target panel type of the target filter panel.
[0131] According to embodiments of this disclosure, the time selector generation apparatus 800 further includes a second determining module and a second processing module.
[0132] The second determining module is used to determine the target switching button in the second operation area associated with the mouse movement event in response to the mouse movement event, wherein the mouse movement event is characterized by the user moving the mouse to the target switching button.
[0133] The second processing module is used to switch the display panel of the display area to the target display panel associated with the target switching button.
[0134] According to embodiments of this disclosure, the time selector generation apparatus 800 further includes a second generation module and a third processing module.
[0135] The second generation module is used to generate at least one time node in response to the user's click operation on the target display panel.
[0136] The third processing module is used to adjust the echo content in the text box component based on the panel type and data type of the filter panel associated with the target display panel.
[0137] According to embodiments of this disclosure, the elements of the target filter panel array are represented as target filter panel identifiers.
[0138] According to embodiments of this disclosure, the first processing unit includes a fifth processing subunit and a sixth processing subunit.
[0139] The fifth processing subunit is used to obtain multiple filter panels through a preset interface, wherein each filter panel has a filter panel identifier.
[0140] The sixth processing subunit is used to match the target filter panel identifier with the filter panel identifiers of multiple filter panels to determine the target filter panel from the multiple filter panels.
[0141] According to embodiments of this disclosure, the time selector generation apparatus 800 further includes a second acquisition module and a loading module.
[0142] The second acquisition module is used to receive the user's filter panel configuration operation, wherein the filter panel configuration operation carries the panel type, data type and label.
[0143] The loading module is used to load the panel type, data type, and labels into the initial filter panel object to obtain the filter panel.
[0144] According to embodiments of this disclosure, the time selector generation device 800 further includes a third acquisition module, a third generation module, a fourth processing module, a fifth processing module, a fourth generation module, and a storage module.
[0145] The third acquisition module is used to respond to the selector container generation request and acquire the selector parameters carried in the selector container generation request. The selector parameters include echo parameters, filter panel array and button configuration parameters.
[0146] The third generation module is used to create the initial text box component and the initial dropdown component.
[0147] The fourth processing module is used to configure the structure of the initial drop-down box component based on the filter panel array and button configuration parameters.
[0148] The fifth processing module is used to configure the echo logic of the initial text box component based on the echo parameters and the filter panel array.
[0149] The fourth generation module is used to generate a selector container based on the initial text box component and the initial drop-down box component that have been configured.
[0150] The storage module is used to store selector containers into the container library.
[0151] Any one or more of the modules, submodules, units, and subunits according to embodiments of the present disclosure, or at least part of the functions of any one or more of them, can be implemented in one module. Any one or more of the modules, submodules, units, and subunits according to embodiments of the present disclosure can be implemented by dividing them into multiple modules. Any one or more of the modules, submodules, units, and subunits according to embodiments of the present disclosure can be at least partially implemented as hardware circuitry, such as Field Programmable Gate Arrays (FPGAs), Programmable Logic Arrays (PLAs), Systems-on-Chip, Systems-on-Substrate, Systems-on-Package, Application-Specific Integrated Circuits (ASICs), or implemented in hardware or firmware by any other reasonable means of integrating or packaging circuitry, or implemented in software, hardware, or firmware, or in any suitable combination of any of these three implementation methods. Alternatively, one or more of the modules, submodules, units, and subunits according to embodiments of the present disclosure can be at least partially implemented as computer program modules, which, when run, can perform corresponding functions.
[0152] For example, any plurality of the first acquisition module 810, the first determination module 820, the first generation module 830, and the first processing module 840 can be combined into one module / unit / subunit, or any one of these modules / units / subunits can be split into multiple modules / units / subunits. Alternatively, at least part of the functionality of one or more of these modules / units / subunits can be combined with at least part of the functionality of other modules / units / subunits and implemented in one module / unit / subunit. According to embodiments of this disclosure, the first acquisition module 810, the first determination module 820, the first generation module 830, and the first processing module 840 can be at least partially implemented as hardware circuits, such as field-programmable gate arrays (FPGAs), programmable logic arrays (PLAs), systems-on-a-chip, systems-on-a-substrate, systems-on-package, application-specific integrated circuits (ASICs), or implemented by any other reasonable means of integrating or packaging circuits, or implemented in software, hardware, or firmware, or in any appropriate combination of any of these three implementation methods. Alternatively, one of the first acquisition module 810, the first determination module 820, the first generation module 830, and the first processing module 840 can be at least partially implemented as a computer program module, which can perform corresponding functions when the computer program module is run.
[0153] It should be noted that the time selector generation device part in the embodiments of this disclosure corresponds to the time selector generation method part in the embodiments of this disclosure. For a detailed description of the time selector generation device part, please refer to the time selector generation method part, which will not be repeated here.
[0154] Figure 9 A block diagram of an electronic device suitable for implementing a time selector generation method according to an embodiment of the present disclosure is shown schematically. Figure 9 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.
[0155] like Figure 9 As shown, a computer electronic device 900 according to an embodiment of the present disclosure includes a processor 901, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 902 or a program loaded from a storage portion 908 into a random access memory (RAM) 903. The processor 901 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or an associated chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 901 may also include onboard memory for caching purposes. The processor 901 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present disclosure.
[0156] RAM 903 stores various programs and data required for the operation of electronic device 900. Processor 901, ROM 902, and RAM 903 are interconnected via bus 904. Processor 901 performs various operations of the method flow according to embodiments of the present disclosure by executing programs in ROM 902 and / or RAM 903. It should be noted that the programs may also be stored in one or more memories other than ROM 902 and RAM 903. Processor 901 may also perform various operations of the method flow according to embodiments of the present disclosure by executing programs stored in said one or more memories.
[0157] According to embodiments of this disclosure, the electronic device 900 may further include an input / output (I / O) interface 905, which is also connected to a bus 904. The electronic device 900 may also include one or more of the following components connected to the I / O interface 905: an input section 906 including a keyboard, mouse, etc.; an output section 907 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 908 including a hard disk, etc.; and a communication section 909 including a network interface card such as a LAN card, modem, etc. The communication section 909 performs communication processing via a network such as the Internet. A drive 910 is also connected to the I / O interface 905 as needed. A removable medium 911, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 910 as needed so that computer programs read from it can be installed into the storage section 908 as needed.
[0158] According to embodiments of this disclosure, the method flow according to embodiments of this disclosure can be implemented as a computer software program. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable storage medium, the computer program containing program code for performing the methods shown in the flowchart. In such embodiments, the computer program can be downloaded and installed from a network via communication section 909, and / or installed from removable medium 911. When the computer program is executed by processor 901, it performs the functions defined in the system of embodiments of this disclosure. According to embodiments of this disclosure, the systems, devices, apparatuses, modules, units, etc., described above can be implemented by computer program modules.
[0159] This disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or it may exist independently and not assembled into the device / apparatus / system. The computer-readable storage medium carries one or more programs that, when executed, implement the method according to the embodiments of this disclosure.
[0160] According to embodiments of this disclosure, the computer-readable storage medium can be a non-volatile computer-readable storage medium. Examples include, but are not limited to: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this disclosure, the computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0161] For example, according to embodiments of this disclosure, a computer-readable storage medium may include the ROM 902 and / or RAM 903 described above and / or one or more memories other than ROM 902 and RAM 903.
[0162] Embodiments of this disclosure also include a computer program product comprising a computer program containing program code for performing the methods provided in the embodiments of this disclosure. When the computer program product is run on an electronic device, the program code is used to enable the electronic device to implement the time selector generation method provided in the embodiments of this disclosure.
[0163] When the computer program is executed by the processor 901, it performs the functions defined in the system / apparatus of this disclosure embodiments. According to embodiments of this disclosure, the systems, apparatuses, modules, units, etc., described above can be implemented by computer program modules.
[0164] In one embodiment, the computer program may rely on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may also be transmitted and distributed in the form of signals over a network medium, and downloaded and installed via the communication section 909, and / or installed from a removable medium 911. The program code contained in the computer program can be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination thereof.
[0165] According to embodiments of this disclosure, program code for executing the computer programs provided in embodiments of this disclosure can be written in any combination of one or more programming languages. Specifically, these computational programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, languages such as Java, C++, Python, "C", or similar programming languages. The program code can execute entirely on the user's computing device, partially on the user's device, partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0166] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions. Those skilled in the art will understand that the features recited in the various embodiments and / or claims of this disclosure can be combined and / or combined in various ways, even if such combinations or combinations are not expressly described in this disclosure. In particular, the features described in the various embodiments and / or claims of this disclosure may be combined and / or combined in various ways without departing from the spirit and teachings of this disclosure. All such combinations and / or combinations fall within the scope of this disclosure.
[0167] The embodiments of this disclosure have been described above. However, these embodiments are for illustrative purposes only and are not intended to limit the scope of this disclosure. Although various embodiments have been described above, this does not mean that the measures in the various embodiments cannot be used advantageously in combination. The scope of this disclosure is defined by the appended claims and their equivalents. Various substitutions and modifications can be made by those skilled in the art without departing from the scope of this disclosure, and all such substitutions and modifications should fall within the scope of this disclosure.
Claims
1. A method for generating a time selector, comprising: In response to a time selector generation request, the target selector parameters and selector identifier carried in the time selector generation request are obtained. The target selector parameters include target echo parameters, target filter panel array, and target button configuration parameters. Based on the selector identifier, determine the target selector container from the container library; Based on the target selector container, an initial selector component is generated on the display interface, the initial selector component including a text box component and a drop-down box component; as well as The target selector parameters are loaded into the target selector container to render the initial selector component using the target selector container, resulting in a target time selector, including: Based on the target filter panel array, a target filter panel associated with the target selector container is determined. The drop-down box component includes a first operation area, a second operation area, and a display area. The display area includes display panels, and the number of display panels is equal to the number of target filter panels. Configure the echo content of the text box component based on the target echo parameters; Based on the target button configuration parameters and the target filter panel, the dropdown component is rendered, including: Based on the target button configuration parameters, operation buttons are rendered and generated in the first operation area; Based on the number of target filter panels, a switching button is rendered and generated in the second operation area, wherein the switching button is related to the display panel; Determine the target panel type of the target filter panel; and Based on the target panel type of the target filter panel, the target filter panel is rendered on the display panel.
2. The method according to claim 1, further comprising: In response to a detected mouse ingress event, a target switching button in the second operation area associated with the mouse ingress event is determined, wherein the mouse ingress event is characterized by the user moving the mouse to the target switching button; and Switch the display panel of the display area to the target display panel associated with the target switching button.
3. The method according to claim 2, further comprising: In response to the user's click operation on the target display panel, at least one time node is generated; as well as Adjust the echo content within the text box component based on the panel type and data type of the filter panel associated with the target display panel.
4. The method of claim 1, wherein, The elements of the target filter panel array are represented as target filter panel identifiers; The step of determining the target filter panel associated with the target selector container based on the target filter panel array includes: Multiple filter panels are obtained through a preset interface, wherein each filter panel has a filter panel identifier; and The target filter panel identifier is matched with the filter panel identifiers of the plurality of filter panels to determine the target filter panel from the plurality of filter panels.
5. The method according to claim 4, further comprising: Receive user's filter panel configuration operation, wherein the filter panel configuration operation carries panel type, data type, and label; and The panel type, the data type, and the label are loaded into the initial filter panel object to obtain the filter panel.
6. The method according to claim 1, further comprising: In response to a selector container generation request, the selector parameters carried in the selector container generation request are obtained, wherein the selector parameters include echo parameters, filter panel array and button configuration parameters; Create the initial text box component and the initial dropdown component; Configure the structure of the initial dropdown component based on the filter panel array and the button configuration parameters; Configure the echo logic of the initial text box component based on the echo parameters and the filter panel array; Based on the configured initial text box component and the configured initial dropdown component, a selector container is generated; and The selector container is stored in the container library.
7. A time selector generating apparatus, comprising: The first acquisition module is used to respond to the time selector generation request and acquire the target selector parameters and selector identifier carried in the time selector generation request. The target selector parameters include target echo parameters, target filter panel array and target button configuration parameters. The first determining module is used to determine the target selector container from the container library based on the selector identifier; The first generation module is used to generate an initial selector component on the display interface based on the target selector container. The initial selector component includes a text box component and a drop-down box component. as well as A first processing module is configured to load the target selector parameters into the target selector container, and then use the target selector container to render the initial selector component to obtain a target time selector, including: Based on the target filter panel array, a target filter panel associated with the target selector container is determined. The drop-down box component includes a first operation area, a second operation area, and a display area. The display area includes display panels, and the number of display panels is equal to the number of target filter panels. Configure the echo content of the text box component based on the target echo parameters; Based on the target button configuration parameters and the target filter panel, the dropdown component is rendered, including: Based on the target button configuration parameters, operation buttons are rendered and generated in the first operation area; Based on the number of target filter panels, a switching button is rendered and generated in the second operation area, wherein the switching button is related to the display panel; Determine the target panel type of the target filter panel; and Based on the target panel type of the target filter panel, the target filter panel is rendered on the display panel.
8. An electronic device, comprising: One or more processors; Memory, used to store one or more instructions. When the one or more instructions are executed by the one or more processors, the one or more processors cause the one or more processors to implement the method of any one of claims 1 to 6.
9. A computer-readable storage medium having stored thereon executable instructions that, when executed by a processor, cause the processor to perform the method of any one of claims 1 to 6.
10. A computer program product comprising computer-executable instructions, which, when executed, are used to implement the method of any one of claims 1 to 6.
Citation Information
Patent Citations
Page loading method and device, computer equipment and storage medium
CN109871500A
Page rendering method and device, rendering server and storage medium
CN111814089A
