Query method and apparatus based on configurable search components

By working together with the front-end and back-end search components, the scalability and portability of the search function of the business system have been improved, solving the problem of poor scalability and portability in existing technologies and meeting the needs of users for complex logical judgments.

CN116910080BActive Publication Date: 2026-07-17JD DIGITS HAIYI INFORMATION TECHNOLOGY CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
JD DIGITS HAIYI INFORMATION TECHNOLOGY CO LTD
Filing Date
2023-06-14
Publication Date
2026-07-17

AI Technical Summary

Technical Problem

In existing technologies, the search function module of business systems has poor scalability and portability, which cannot meet the complex logical judgments of users, resulting in an increase in development and maintenance workload.

Method used

The method adopts a configurable search component-based approach. The front-end search component obtains combined search conditions and transmits them to the back-end search component for data querying. The back-end component parses and queries the conditions, and then transmits the results back to the front-end component for display.

Benefits of technology

It improves the scalability and portability of the search function, reduces the workload of subsequent development and maintenance, and meets users' needs for complex logical judgments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116910080B_ABST
    Figure CN116910080B_ABST
Patent Text Reader

Abstract

This disclosure proposes a query method, apparatus, electronic device, and storage medium based on a configurable search component. The method includes: obtaining combined search conditions through a front-end search component; transmitting the combined search conditions to a back-end search component; performing data query on the combined search conditions and transmitting the query results to the front-end search component; and displaying the query results by the front-end search component. Therefore, by using a front-end and back-end search component in this application to query data, different functional modules can be directly adapted, improving the scalability and portability of the search function without requiring redevelopment, thus reducing the workload of subsequent development and dimensionality. Furthermore, the combined search conditions in this application can be logically combined to meet complex user logic judgments.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of data processing technology, and in particular to a query method, apparatus, electronic device, and storage medium based on a configurable search component. Background Technology

[0002] As the number of users continues to increase, the amount of data stored in the business system is also growing. Therefore, it is particularly important to quickly search for the data that users need from massive amounts of data.

[0003] In related technologies, fixed search criteria are provided on business system pages to meet user search needs. For example, if functional module A needs to search for user information, the business requirements stipulate that the search criteria should include name (fuzzy search), phone number, and organization. In this case, developers need to add fixed search criteria to the front-end page and provide corresponding search function interfaces in the back-end service. The query is constructed by checking if the query fields in the search criteria have values; if so, the values ​​are concatenated to form the query statement. However, the logic between search criteria in these technologies is simplistic and cannot satisfy complex user logic judgments (e.g., AND, OR, NOT). Furthermore, if other functional modules also need to search for user information, the front-end and back-end code of module A needs to be copied to other modules or redeveloped, resulting in poor scalability and portability of the search function and increasing the workload for subsequent development and dimensioning. Summary of the Invention

[0004] This disclosure provides a query method, apparatus, electronic device, and storage medium based on a configurable search component, to at least partially solve one of the technical problems in related technologies. The technical solution of this disclosure is as follows:

[0005] According to a first aspect of the present disclosure, a query method based on a configurable search component is provided, the search component including a front-end search component and a back-end search component, the method comprising:

[0006] The combined search criteria are obtained through the aforementioned front-end search component;

[0007] The front-end search component transmits the combined search conditions to the back-end search component;

[0008] The backend search component performs data queries on the combined search conditions and transmits the query results to the frontend search component;

[0009] The front-end search component displays the query results.

[0010] According to a second aspect of the present disclosure, a query apparatus based on a configurable search component is provided, the search component including a front-end search component and a back-end search component, the apparatus comprising:

[0011] The acquisition module is used to acquire combined search conditions through the front-end search component;

[0012] A transmission module is used for the front-end search component to transmit the combined search conditions to the back-end search component;

[0013] The query module is used by the backend search component to perform data query on the combined search conditions and transmit the obtained query results to the frontend search component;

[0014] The display module is used by the front-end search component to display the query results.

[0015] According to a third aspect of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing processor-executable instructions; wherein the processor is configured to execute the instructions to implement a query method based on a configurable search component as described in the above embodiments of the present disclosure.

[0016] According to a fourth aspect of the present disclosure, a computer-readable storage medium is provided that, when instructions in the computer-readable storage medium are executed by a processor of an electronic device, enables the electronic device to perform a query method based on a configurable search component as described in the above embodiments of the present disclosure.

[0017] According to a fifth aspect of the present disclosure, a computer program product is provided, comprising: a computer program that, when executed by a processor, implements a query method based on a configurable search component as described in the above embodiments of the present disclosure.

[0018] The technical solutions provided by the embodiments of this disclosure have at least the following beneficial effects:

[0019] The search functionality involves several steps: First, a front-end search component retrieves combined search criteria. This criteria are then transmitted to a back-end search component. The back-end search component performs a data query based on these criteria and transmits the results back to the front-end search component. Finally, the front-end search component displays the results. This approach, utilizing both front-end and back-end search components, allows for direct adaptation to different functional modules, enhancing the scalability and portability of the search function. It eliminates the need for redevelopment, significantly reducing subsequent development and workload. Furthermore, the combined search criteria in this application allow for customizable query logic, satisfying complex user logic.

[0020] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description

[0021] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure, and are not intended to unduly limit this disclosure.

[0022] Figure 1 This is a flowchart illustrating a query method based on a configurable search component, as shown in the first embodiment of this disclosure.

[0023] Figure 2a This is a flowchart illustrating a query method based on a configurable search component, as shown in the second embodiment of this disclosure.

[0024] Figure 2b This is a schematic diagram illustrating a front-end search criteria page according to a second embodiment of the present disclosure;

[0025] Figure 2c This is a schematic diagram of business scenario parameters in a front-end search criteria page, as an example of the second embodiment of this disclosure;

[0026] Figure 3 This is a flowchart illustrating a query method based on a configurable search component, as shown in the third embodiment of this disclosure.

[0027] Figure 4a This is a flowchart illustrating a query method based on a configurable search component, as shown in the fourth embodiment of this disclosure.

[0028] Figure 4b This is a schematic diagram illustrating the process of a front-end search component obtaining query results, as shown in the fourth embodiment of this disclosure;

[0029] Figure 4c This is a flowchart illustrating the interaction process between a front-end search component and a back-end search component, as shown in the fourth embodiment of this disclosure.

[0030] Figure 5 This is a schematic diagram of the structure of a query device based on a configurable search component as shown in the fourth embodiment of this disclosure;

[0031] Figure 6 This is a schematic diagram of the structure of an electronic device shown in an exemplary embodiment of the present disclosure. Detailed Implementation

[0032] To enable those skilled in the art to better understand the technical solutions of this disclosure, the technical solutions in the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings.

[0033] It should be noted that the terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this disclosure are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.

[0034] The following description, with reference to the accompanying drawings, describes a query method, apparatus, electronic device, and storage medium based on a configurable search component according to embodiments of the present disclosure.

[0035] Figure 1 This is a flowchart illustrating a query method based on a configurable search component, as shown in the first embodiment of this disclosure.

[0036] This disclosure illustrates an example of a query method based on a configurable search component being configured in a query device based on a configurable search component. This query device based on a configurable search component can be applied to any electronic device so that the electronic device can perform queries based on the configurable search component.

[0037] like Figure 1 As shown, this query method based on a configurable search component may include the following steps:

[0038] Step 101: Obtain combined search conditions through the front-end search component.

[0039] In this embodiment of the disclosure, the configurable search component may include a front-end search component and a back-end search component.

[0040] In this embodiment, the front-end search component can display a search criteria interface, and the front-end search component can obtain user-added combined search criteria through the search criteria interface. These combined search criteria can include multiple different combination logics added by the user, such as AND, OR, NOT, etc. Furthermore, each search criterion can support multiple comparison operators, such as equal to, not equal to, greater than, less than, contain, belong to, empty, not empty, etc. Based on this, users can combine query criteria logic themselves to meet their flexible data search needs. This part will be described in detail in subsequent embodiments.

[0041] Furthermore, in this embodiment of the disclosure, the aforementioned backend search component may include a condition generator and a condition parsing processor. Also, in this embodiment of the disclosure, before obtaining the combined search conditions through the frontend search component, the method further includes: obtaining condition configuration parameters through the frontend search component, transmitting the condition configuration parameters to the backend search component, and the backend search component generating a set of filtering conditions based on the condition configuration parameters through the condition generator, so that users can filter conditions from the set based on their business scenarios. This part will be described in detail in subsequent embodiments.

[0042] Step 102: The front-end search component transmits the combined search criteria to the back-end search component.

[0043] In this embodiment of the disclosure, after the front-end search component obtains the combined search conditions, it can transmit the combined search conditions to the back-end search component through the search interface so that the back-end search component can perform data query based on the combined search conditions.

[0044] Step 103: The backend search component performs data query on the combined search conditions and transmits the query results to the frontend search component.

[0045] In this embodiment, after the backend search component obtains the combined search conditions, it can parse the combined search conditions using its condition parsing processor to obtain the parsing result. The condition parsing processor then uses the parsing result to query the database, obtain the query result, and transmits the obtained query result to the frontend search component. This part will be described in detail in subsequent embodiments.

[0046] Step 104: The front-end search component displays the query results.

[0047] In this embodiment, after the front-end search component obtains the query results through the search interface, it can display the query results through the search criteria page. Specifically, in this embodiment, the search criteria page can be written as a Vue dynamic search component, and the page rendering view can be implemented based on a data-driven view pattern. This saves a significant amount of code and facilitates later maintenance and expansion.

[0048] In summary, the process involves: obtaining combined search conditions through a front-end search component; transmitting these combined search conditions to a back-end search component; querying the data based on these combined search conditions and transmitting the results back to the front-end search component; and finally, displaying the results. Therefore, this application utilizes both a front-end and back-end search component within the search module for data querying, allowing direct adaptation to different functional modules. This improves the scalability and portability of the search function, eliminating the need for redevelopment and reducing subsequent development and workload. Furthermore, the combined search conditions in this application allow for the independent combination of query criteria logic, satisfying complex user logic judgments.

[0049] Figure 2a This is a flowchart illustrating a query method based on a configurable search component, as shown in the second embodiment of this disclosure.

[0050] like Figure 2a As shown, this query method based on a configurable search component may include the following steps:

[0051] Step 201a: The front-end search component obtains business scenario parameters.

[0052] In this embodiment of the disclosure, before the front-end search component obtains the above-mentioned business scenario parameters, specific condition groups can be selected, wherein the condition groups can include selection conditions and exclusion conditions.

[0053] For example, in this embodiment of the disclosure, the above-mentioned business scenario parameters are basic information.

[0054] Step 202a: The front-end search component displays the corresponding candidate search conditions in the search condition interface based on the business scenario parameters.

[0055] In this embodiment, after the front-end search component obtains the business parameters, it can transmit the business scenario parameters to the back-end search component. The back-end search component, through a condition generator, determines candidate search conditions from the filter condition set based on the business scenario parameters and transmits the candidate search conditions to the front-end search component. The front-end search component then displays the corresponding candidate search conditions in the search condition interface. The filter condition set is generated by the condition generator in the back-end search component; this will be described in detail in subsequent embodiments.

[0056] Furthermore, in this embodiment of the disclosure, the aforementioned front-end search component can transmit business scenario parameters to the back-end search component through the condition item generation interface to request the corresponding candidate search conditions.

[0057] Step 203a: The front-end search component obtains the target search condition and the corresponding condition parameters from the candidate search conditions.

[0058] In this embodiment of the disclosure, the front-end search component can obtain the target search condition and its corresponding condition parameters from the candidate search conditions selected by the user through the search query page. The condition parameters correspond to the target search condition. Furthermore, the condition parameters may include comparison operator parameters and comparison value parameters.

[0059] The comparison values ​​mentioned above can support multiple data types, including enumerations, numbers, dates, and text. Each data type can support corresponding comparison operator parameters for the user to select. Specifically, when the data type of the comparison value parameter is an enumeration, the corresponding comparison operator parameters can include single-selection equal to or not equal to; multiple-selection belong to or not belong to; empty, not empty; when the data type of the comparison value parameter is a number, the corresponding comparison operator parameters can include equal to, not equal to, greater than, greater than or equal to, less than, less than or equal to, empty, not empty; when the data type of the comparison value parameter is a date, the corresponding comparison operator parameters can include greater than or equal to, less than or equal to, empty, not empty; when the data type of the comparison value parameter is fuzzy text, the corresponding comparison operator parameters can include fuzzy query include or exclude, empty, not empty; when the data type of the comparison value parameter is exact text, the corresponding comparison operator parameters are exact query equal to or not equal to, empty, not empty.

[0060] Step 204a: Repeat the above steps until all target search conditions are obtained, and use all target search conditions as combined search conditions.

[0061] In this embodiment of the disclosure, multiple target search conditions for user conditions can be obtained by repeating the above steps 201a to 203a, and the conditions support AND, OR, and NOT relationships, so that users can freely combine conditions to meet various search conditions scenarios.

[0062] Based on the description of steps 201a to 204a above, this disclosure provides an example of the process for obtaining combined search conditions.

[0063] Figure 2b This is a schematic diagram illustrating a front-end search criteria page according to an embodiment of this disclosure. Figure 2c This is a schematic diagram illustrating business scenario parameters in a front-end search criteria page, as an example of an embodiment of this disclosure. For example... Figure 2b and Figure 2c As shown, the user selects the criteria grouped into selection criteria, and then selects... Figure 2cIn the "Basic Information" parameter of the business scenario, after the front-end search component obtains the business scenario parameter, it displays the corresponding candidate search conditions in the search condition interface, such as user gender and user age. The user can select the corresponding target search condition as "user gender," and confirm that the comparison operator parameter is "equal to" and the comparison value parameter is "male." The above process confirms the addition of a search condition. If the user has other search conditions, they can continue to add other search conditions on the search query page through the above steps, such as... Figure 2b As shown, the target search condition is "product type", the comparison operator parameter is "equal to", and the comparison value parameter is "gold bar". After the user adds all the target search conditions, they can click the query button in the blue box in the lower right corner. The front-end search component will retrieve all the target search conditions added by the user and use all the target search conditions as a combined search condition.

[0064] Step 205a: The front-end search component transmits the combined search criteria to the back-end search component.

[0065] Step 206a: The backend search component performs data query on the combined search conditions and transmits the query results to the frontend search component.

[0066] Step 207a: The front-end search component displays the query results.

[0067] For detailed information on steps 205a-207a, please refer to the relevant descriptions in the above embodiments. This disclosure will not repeat the details here.

[0068] In summary, the process involves: obtaining combined search conditions through a front-end search component; transmitting these combined search conditions to a back-end search component; querying the data based on these combined search conditions and transmitting the results back to the front-end search component; and finally, displaying the results. Therefore, this application utilizes both a front-end and back-end search component within the search module for data querying, allowing direct adaptation to different functional modules. This improves the scalability and portability of the search function, eliminating the need for redevelopment and reducing subsequent development and workload. Furthermore, the combined search conditions in this application allow for the independent combination of query criteria logic, satisfying complex user logic judgments.

[0069] Figure 3 This is a flowchart illustrating a query method based on a configurable search component, as shown in the third embodiment of this disclosure.

[0070] like Figure 3 As shown, this query method based on a configurable search component may include the following steps:

[0071] Step 301: Obtain the condition configuration parameters through the front-end search component and transmit the condition configuration parameters to the back-end search component.

[0072] In this embodiment of the disclosure, the above-mentioned condition configuration parameters may include condition grouping codes and service configuration parameters.

[0073] Furthermore, in this embodiment of the disclosure, the front-end search component can obtain the condition configuration parameters input by the user through the front-end page and transmit the condition configuration parameters to the back-end search component so that the back-end search component can generate a set of filtering conditions based on the condition configuration parameters.

[0074] Step 302: The backend search component generates a set of filtering conditions based on the condition configuration parameters through the condition generator.

[0075] In this embodiment of the disclosure, after the backend search component obtains the condition configuration parameters, it can generate a set of filtering conditions based on the obtained condition configuration parameters through the condition generator in the backend search component, so that combined search conditions can be obtained through the set of filtering conditions in the future.

[0076] Specifically, in this embodiment of the disclosure, the method by which the backend search component generates a set of filtering conditions based on condition configuration parameters through a condition generator may include the following steps:

[0077] Step 3021: The condition generator groups different types of conditions based on condition grouping encoding, and marks each condition with a label.

[0078] In this embodiment of the disclosure, the above-mentioned condition grouping encoding can group different types of conditions and mark each condition with a label, thereby supporting the reuse of the same type of conditions in different business scenarios, without the need for the same conditions to exist in each business scenario, which facilitates later maintenance and expansion.

[0079] Step 3022: The condition generator configures the conditions for different services based on the service configuration parameters, and generates a set of filtering conditions by combining the tags corresponding to each condition.

[0080] In this embodiment of the disclosure, the aforementioned business configuration parameters may include a limit on the number of multiple selection conditions, a supported data range for the conditions, and a data format for displaying the conditions. Furthermore, in this embodiment of the disclosure, the aforementioned condition generator can perform fine-grained control over conditions under different business scenarios based on the business configuration parameters, decoupling the business from the search conditions and fulfilling user search needs in different business scenarios.

[0081] Furthermore, in this embodiment, the aforementioned backend search component implements configuration methods for different business scenarios through a condition generator, and configures from multiple dimensions such as scenario and business parameters. Simultaneously, in terms of functional implementation, it uses strategies and factory patterns to generate filtering condition sets, adhering to the open / closed design principle, making it easy to maintain and extend later. It can adapt to different business scenarios; adding new conditions or applying them to new search scenarios only requires adjusting the condition configuration parameters, minimizing the impact on the original logic and requiring minimal changes. This eliminates the need for redevelopment, thus enabling rapid functional expansion or migration at a lower development cost.

[0082] For example, in this embodiment of the disclosure, when the search component is extended from the user information search function scenario to the intelligent product recommendation function scenario, it is necessary to configure the condition configuration parameters required for the intelligent product recommendation scenario in the front-end search component. The original intelligent product recommendation business logic code does not need to be modified, and all development and testing workload is minimal.

[0083] Step 303: The front-end search component obtains business scenario parameters.

[0084] Step 304: The front-end search component transmits the business scenario parameters to the back-end search component.

[0085] Step 305: The backend search component uses the condition generator to determine candidate search conditions from the set of filtering conditions based on business scenario parameters, and then transmits the candidate search conditions to the frontend search component.

[0086] In this embodiment of the disclosure, the filtering condition set corresponding to different business scenarios can be generated through the above step 302. Based on this, after the backend search component obtains the business scenario parameters, the candidate search conditions corresponding to the business scenario parameters can be determined from the filtering condition set through the condition generator, and the candidate search conditions can be transmitted to the frontend search component so that the user can determine the target search conditions from the candidate search conditions.

[0087] Step 306: The front-end search component displays the corresponding candidate search conditions in the search condition interface.

[0088] Step 307: The front-end search component obtains the target search condition and its corresponding condition parameters from the candidate search conditions.

[0089] Step 308: Repeat steps 303 to 307 above until all target search conditions are obtained, and use all target search conditions as combined search conditions.

[0090] Step 309: The front-end search component transmits the combined search criteria to the back-end search component.

[0091] Step 310: The backend search component performs data query on the combined search conditions and transmits the query results to the frontend search component.

[0092] Step 311: The front-end search component displays the query results.

[0093] For details regarding other steps in this embodiment, please refer to the relevant descriptions in the above embodiments. These details will not be repeated here.

[0094] In summary, the process involves: obtaining combined search conditions through a front-end search component; transmitting these combined search conditions to a back-end search component; querying the data based on these combined search conditions and transmitting the results back to the front-end search component; and finally, displaying the results. Therefore, this application utilizes both a front-end and back-end search component within the search module for data querying, allowing direct adaptation to different functional modules. This improves the scalability and portability of the search function, eliminating the need for redevelopment and reducing subsequent development and workload. Furthermore, the combined search conditions in this application allow for the independent combination of query criteria logic, satisfying complex user logic judgments.

[0095] Figure 4a This is a flowchart illustrating a query method based on a configurable search component, as shown in the fourth embodiment of this disclosure.

[0096] like Figure 4a As shown, this query method based on a configurable search component may include the following steps:

[0097] Step 401a: Obtain combined search conditions through the front-end search component.

[0098] Step 402a: The front-end search component transmits the combined search criteria to the back-end search component.

[0099] Step 403a: The backend search component uses the condition parsing processor to parse the combined search conditions and obtain the parsing results.

[0100] In this embodiment of the disclosure, the condition parsing processor includes a parsing layer, a compilation layer, and an execution layer.

[0101] Furthermore, in this embodiment of the disclosure, the method by which the backend search component parses the combined search conditions to obtain the parsing result through the condition parsing processor may include the following steps:

[0102] Step 4031a: The backend search component performs syntax checking and conditional syntax parsing on the combined search conditions through the parsing layer;

[0103] In this embodiment of the disclosure, the parsing layer can perform syntax checks and conditional syntax parsing on the combined search conditions to prevent the database from being queried through illegal query statements, thereby ensuring data security.

[0104] Furthermore, in this embodiment of the disclosure, the parsing layer can perform syntax checking and conditional syntax parsing on the combined search conditions using existing technologies.

[0105] Furthermore, in this embodiment of the present disclosure, if the parsing layer determines that the combined search conditions do not meet the syntax check or conditional syntax parsing after performing syntax check and conditional syntax parsing on the combined search conditions, an alarm is issued and subsequent operations are not performed; if the parsing layer determines that the combined search conditions meet the syntax check or conditional syntax parsing after performing syntax check and conditional syntax parsing on the combined search conditions, subsequent operations are performed.

[0106] Step 4032a: The compilation layer compiles the combined search conditions through syntax checking and conditional syntax parsing to obtain the corresponding data query statement;

[0107] In this embodiment, the compilation layer compiles the combined search conditions through syntax checking and conditional syntax parsing to obtain the corresponding data query statement. This process includes: using a field mapping conversion module to map the query fields in the combined search conditions into the underlying data structure query syntax. This field mapping conversion module supports query syntax for various underlying database structures (such as MySQL and Elasticsearch), allowing developers to shield themselves from differences between different database implementations in the storage layer, thus improving development efficiency. Then, using a comparison operator escaping module, custom annotations are used to dynamically map the query fields to different storage layer fields using reflection. Simultaneously, the logical relationships between comparison value parameters, comparison operator parameters, and dynamic conditions of SpEL expressions of different data types are converted and assembled into a data query statement based on the condition context. Considering reflection performance, the comparison operator escaping module incorporates a caching mechanism to improve parsing performance. Finally, a condition optimization module further optimizes the assembled data query statement (e.g., merging similar conditions or filling with default values) to obtain the corresponding data query statement, thereby improving query response speed.

[0108] Step 4033a: The execution layer expands the data query statement based on the conditional execution template, and the expanded result is determined as the parsed result.

[0109] In this embodiment of the disclosure, after the execution layer obtains the data query statement, it can determine the conditional execution template corresponding to the data query statement based on the business scenario parameters corresponding to the combined search conditions. The data query statement is then expanded based on this conditional execution module, and the expanded result is determined as the parsing result. For example, assuming the business scenario parameter is product recommendation, the conditional execution template corresponding to the data query statement may contain a default sorting data statement. Based on this, the data query statement can be expanded to add a sorting statement to obtain the corresponding parsing result.

[0110] Step 404a: The condition parsing processor uses the parsing results to query data from the database and obtain the query results.

[0111] In this embodiment of the disclosure, after the condition parsing processor obtains the parsing result, it can use the parsing result to perform a data query from the database and obtain the query result.

[0112] Step 405a: The backend search component transmits the obtained query results to the frontend search component.

[0113] Based on the description of steps 403a to 405a above, this embodiment of the present disclosure provides an example of the process by which the front-end search component obtains query results.

[0114] Figure 4b This is a schematic diagram illustrating the process of a front-end search component obtaining query results, as shown in an embodiment of this disclosure. Figure 4b As shown, after the backend search component obtains the combined search conditions transmitted by the frontend search component, it uses the parsing layer to perform syntax checks and conditional syntax parsing on the combined search conditions, and then transmits the combined search conditions that have passed the syntax checks and conditional syntax parsing to the compilation layer. The compilation layer sequentially uses the field mapping conversion module, the comparison operator escaping module, and the condition optimization module to compile the combined search conditions, obtain the corresponding data query statement, and transmits the obtained data query to the execution layer. The execution layer expands the data query statement based on the conditional execution template, and determines the expanded result as the parsing result. Using the parsing result, it performs data querying from the database, obtains the query result, and transmits the query result to the frontend search component.

[0115] Step 406a: The front-end search component displays the query results.

[0116] In summary, the process involves: obtaining combined search conditions through a front-end search component; transmitting these combined search conditions to a back-end search component; querying the data based on these combined search conditions and transmitting the results back to the front-end search component; and finally, displaying the results. Therefore, this application utilizes both a front-end and back-end search component within the search module for data querying, allowing direct adaptation to different functional modules. This improves the scalability and portability of the search function, eliminating the need for redevelopment and reducing subsequent development and workload. Furthermore, the combined search conditions in this application allow for the independent combination of query criteria logic, satisfying complex user logic judgments.

[0117] Based on the above steps, this embodiment of the disclosure provides an example of the interaction process between the front-end search component and the back-end search component.

[0118] Figure 4cThis is a flowchart illustrating the interaction process between a front-end search component and a back-end search component, as shown in an embodiment of this disclosure. Figure 4c As shown, after the front-end search component obtains the condition configuration parameters, it transmits the condition configuration parameters to the back-end search component. The back-end search component generates a set of filtering conditions based on the condition configuration parameters using a condition generator. The front-end search component displays the search conditions using the condition generator and obtains combined search conditions, transmitting the combined search conditions to the back-end search component. The back-end search component parses the combined search conditions using a condition parsing processor to obtain the parsing results. The condition parsing processor uses the parsing results to query data from the database to obtain the query results, and transmits the obtained query results to the front-end search component. The front-end search component then displays the query results.

[0119] With the above Figures 1 to 4c Corresponding to the query method based on a configurable search component provided in the embodiments, this disclosure also provides a query device based on a configurable search component. Since the query device based on a configurable search component provided in the embodiments of this disclosure is similar to the one described above... Figures 1 to 4c The embodiment provides a query method based on a configurable search component. Therefore, the implementation of a query method based on a configurable search component is also applicable to the query device based on a configurable search component provided in this disclosure embodiment, and will not be described in detail in this disclosure embodiment.

[0120] Figure 5 This is a schematic diagram of the structure of a query device based on a configurable search component, as shown in the fifth embodiment of this disclosure.

[0121] like Figure 5 As shown, the query device 500 based on configurable search components may include: an acquisition module 501, a transmission module 502, a query module 503, and a display module 504.

[0122] Module 501 is used to obtain combined search conditions through the front-end search component;

[0123] Transmission module 502 is used by the front-end search component to transmit combined search conditions to the back-end search component;

[0124] The query module 503 is used by the backend search component to perform data queries on combined search conditions and transmit the query results to the frontend search component.

[0125] The display module 504 is used by the front-end search component to display query results.

[0126] Optionally, the backend search component includes a condition generator; the above-described apparatus is also used for:

[0127] The condition configuration parameters are obtained through the front-end search component and then transmitted to the back-end search component.

[0128] The backend search component generates a set of filtering conditions based on the condition configuration parameters through a condition generator.

[0129] Optionally, the conditional configuration parameters include conditional grouping codes and service configuration parameters; the above-mentioned device is specifically used for:

[0130] The condition generator groups different types of conditions based on condition grouping encoding and labels each condition.

[0131] The condition generator configures conditions for different services based on service configuration parameters.

[0132] Optionally, the aforementioned acquisition module 501 is specifically used for:

[0133] The front-end search component retrieves parameters related to the business scenario.

[0134] The front-end search component displays corresponding candidate search conditions in the search condition interface based on business scenario parameters;

[0135] The front-end search component retrieves the target search condition and its corresponding condition parameters from the candidate search conditions.

[0136] Repeat the above steps until all target search conditions are obtained, and then use all target search conditions as combined search conditions.

[0137] Optionally, the aforementioned acquisition module 501 is also used for:

[0138] The front-end search component transmits business scenario parameters to the back-end search component;

[0139] The backend search component uses a condition generator to determine candidate search conditions from the set of filtering conditions based on business scenario parameters, and then transmits the candidate search conditions to the frontend search component.

[0140] The front-end search component displays the corresponding candidate search criteria in the search criteria interface.

[0141] Optionally, the backend search component also includes a condition parsing processor; the aforementioned query module 503 is specifically used for:

[0142] The backend search component uses a condition parsing processor to parse the combined search conditions and obtain the parsing results;

[0143] The condition parsing processor uses the parsing results to query data from the database and obtain the query results;

[0144] The backend search component transmits the query results to the frontend search component.

[0145] Optionally, the condition parsing processor includes a parsing layer, a compilation layer, and an execution layer; the aforementioned query module 503 is specifically used for:

[0146] The backend search component performs syntax checks and conditional syntax parsing on combined search criteria through a parsing layer.

[0147] The compilation layer compiles the combined search conditions through syntax checking and conditional syntax parsing to obtain the corresponding data query statement;

[0148] The execution layer expands the data query statement based on the conditional execution template, and the expanded result is determined as the parsed result.

[0149] The query device based on a configurable search component in this disclosure, as summarized above, obtains combined search conditions through a front-end search component; the front-end search component transmits the combined search conditions to a back-end search component; the back-end search component performs data querying on the combined search conditions and transmits the resulting query results to the front-end search component; and the front-end search component displays the query results. Therefore, by querying data through the front-end and back-end search components in this application, data can be directly adapted to different functional modules, thereby improving the scalability and portability of the search function without requiring redevelopment, thus reducing the workload of subsequent development and dimensional adjustments. Furthermore, the conditions in the combined search conditions in this application can be logically combined to satisfy complex user logic judgments.

[0150] In an exemplary embodiment, an electronic device is also proposed.

[0151] The electronic devices include:

[0152] processor;

[0153] Memory used to store processor-executable instructions;

[0154] The processor is configured to execute instructions to implement a query method based on a configurable search component as proposed in any of the foregoing embodiments.

[0155] As an example, Figure 6 This is a schematic diagram of the structure of an electronic device 600 as shown in an exemplary embodiment of this disclosure, as follows: Figure 6 As shown, the aforementioned electronic device 600 may further include:

[0156] The present invention includes a memory 610 and a processor 620, and a bus 630 connecting different components (including the memory 610 and the processor 620). The memory 610 stores a computer program, which, when executed by the processor 620, implements a query method based on a configurable search component as described in this embodiment of the present disclosure.

[0157] Bus 630 represents one or more of several bus architectures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any of the various bus architectures. For example, these architectures include, but are not limited to, the Industry Standard Architecture (ISA) bus, the Micro Channel Architecture (MAC) bus, the Enhanced ISA bus, the Video Electronics Standards Association (VESA) local bus, and the Peripheral Component Interconnect (PCI) bus.

[0158] Electronic device 600 typically includes a variety of electronic device readable media. These media can be any available media that can be accessed by electronic device 600, including volatile and non-volatile media, removable and non-removable media.

[0159] Memory 610 may also include computer device readable media in the form of volatile memory, such as random access memory (RAM) 640 and / or cache memory 690. Electronic device 600 may further include other removable / non-removable, volatile / non-volatile computer device storage media. By way of example only, storage device 660 may be used to read and write non-removable, non-volatile magnetic media (… Figure 6 Not shown; usually referred to as a "hard drive"). Although Figure 6 As not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk") and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 630 via one or more data media interfaces. Memory 610 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of the embodiments of this disclosure.

[0160] A program / utility 680 having a set (at least one) of program modules 670 may be stored, for example, in memory 610. Such program modules 670 include—but are not limited to—operating devices, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment. Program modules 670 typically perform the functions and / or methods described in the embodiments of this disclosure.

[0161] Electronic device 600 can also communicate with one or more external devices 690 (e.g., keyboard, pointing device, display 861, etc.), and with one or more devices that enable a user to interact with the electronic device 600, and / or with any device that enables the electronic device 600 to communicate with one or more other computing devices (e.g., network card, modem, etc.). This communication can be performed via input / output (I / O) interface 692. Furthermore, electronic device 600 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 693. As shown, network adapter 693 communicates with other modules of electronic device 600 via bus 630. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with electronic device 600, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID devices, tape drives, and data backup storage devices.

[0162] The processor 620 executes various functional applications and data processing by running programs stored in the memory 610.

[0163] It should be noted that the implementation process and technical principles of the electronic device in this embodiment are explained in the foregoing description of a query method based on a configurable search component according to an embodiment of this disclosure, and will not be repeated here.

[0164] In an exemplary embodiment, a computer-readable storage medium including instructions is also provided, such as a memory including instructions that can be executed by a processor of an electronic device to perform the method proposed in any of the above embodiments. Optionally, the computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.

[0165] In an exemplary embodiment, a computer program product is also provided, including a computer program / instructions, characterized in that the computer program / instructions, when executed by a processor, implement the method proposed in any of the above embodiments.

[0166] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the following claims.

[0167] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.

Claims

1. A query method based on a configurable search component, characterized in that, The search component includes a front-end search component and a back-end search component, and the method includes: The combined search criteria are obtained through the aforementioned front-end search component; The front-end search component transmits the combined search conditions to the back-end search component; The backend search component performs data queries on the combined search conditions and transmits the query results to the frontend search component; The front-end search component displays the query results; The step of obtaining combined search conditions through the front-end search component includes: The front-end search component obtains business scenario parameters; The front-end search component transmits the business scenario parameters to the back-end search component; The backend search component uses a condition generator to determine candidate search conditions from the set of filtering conditions based on the business scenario parameters, and then transmits the candidate search conditions to the frontend search component. The front-end search component displays corresponding candidate search conditions in the search condition interface; The front-end search component obtains the target search condition and the corresponding condition parameters from the candidate search conditions; Repeat the above steps until all target search conditions are obtained, and use all target search conditions as combined search conditions. The backend search component includes the condition generator; before obtaining the combined search conditions through the frontend search component, the process includes: The condition configuration parameters are obtained through the front-end search component and then transmitted to the back-end search component. The backend search component generates a set of filtering conditions based on the condition configuration parameters through the condition generator.

2. The method according to claim 1, characterized in that, The condition configuration parameters include condition grouping codes and service configuration parameters; The backend search component generates a set of filtering conditions based on the condition configuration parameters through the condition generator, including: The condition generator groups different types of conditions based on the condition grouping code, and labels each condition with a tag; The condition generator configures the conditions for different services based on the service configuration parameters, and generates a set of filtering conditions by combining the tags corresponding to each condition.

3. The method according to claim 1, characterized in that, The backend search component further includes a condition parsing processor; the backend search component performs data queries on the combined search conditions and transmits the obtained query results to the frontend search component, including: The backend search component uses the condition parsing processor to parse the combined search conditions to obtain the parsing result; The condition parsing processor uses the parsing results to perform data queries from the database and obtain query results; The backend search component transmits the obtained query results to the frontend search component.

4. The method according to claim 3, characterized in that, The condition parsing processor includes a parsing layer, a compilation layer, and an execution layer; The backend search component, through the condition parsing processor, parses the combined search conditions to obtain the parsing results, including: The backend search component performs syntax checks and conditional syntax parsing on the combined search conditions through the parsing layer. The compilation layer compiles the combined search conditions through syntax checking and conditional syntax parsing to obtain the corresponding data query statement; The execution layer expands the data query statement based on the conditional execution template, and the expanded result is determined as the parsing result.

5. A query device based on a configurable search component, characterized in that, The search component includes a front-end search component and a back-end search component, and the device includes: The acquisition module is used to acquire combined search conditions through the front-end search component; A transmission module is used for the front-end search component to transmit the combined search conditions to the back-end search component; The query module is used by the backend search component to perform data query on the combined search conditions and transmit the obtained query results to the frontend search component; The display module is used by the front-end search component to display the query results; The acquisition module is specifically used for: The front-end search component obtains business scenario parameters; The front-end search component transmits the business scenario parameters to the back-end search component; The backend search component uses a condition generator to determine candidate search conditions from the set of filtering conditions based on the business scenario parameters, and then transmits the candidate search conditions to the frontend search component. The front-end search component displays corresponding candidate search conditions in the search condition interface; The front-end search component obtains the target search condition and the corresponding condition parameters from the candidate search conditions; Repeat the above steps until all target search conditions are obtained, and use all target search conditions as combined search conditions. The backend search component includes the condition generator; the device is further configured to: The condition configuration parameters are obtained through the front-end search component and then transmitted to the back-end search component. The backend search component generates a set of filtering conditions based on the condition configuration parameters through the condition generator.

6. The apparatus according to claim 5, characterized in that, The condition configuration parameters include condition grouping codes and service configuration parameters; the device is specifically used for: The condition generator groups different types of conditions based on the condition grouping code, and labels each condition with a tag; The condition generator configures the conditions for different services based on the service configuration parameters, and generates a set of filtering conditions by combining the tags corresponding to each condition.

7. The apparatus according to claim 5, characterized in that, The backend search component further includes a condition parsing processor; the query module is specifically used for: The backend search component uses the condition parsing processor to parse the combined search conditions to obtain the parsing result; The condition parsing processor uses the parsing results to perform data queries from the database and obtain query results; The backend search component transmits the obtained query results to the frontend search component.

8. The apparatus according to claim 7, characterized in that, The condition parsing processor includes a parsing layer, a compilation layer, and an execution layer; the query module is specifically used for: The backend search component performs syntax checks and conditional syntax parsing on the combined search conditions through the parsing layer. The compilation layer compiles the combined search conditions through syntax checking and conditional syntax parsing to obtain the corresponding data query statement; The execution layer expands the data query statement based on the conditional execution template, and the expanded result is determined as the parsing result.

9. An electronic device, characterized in that, include: processor; Memory used to store the processor's executable instructions; The processor is configured to execute the instructions to implement the query method based on a configurable search component as described in any one of claims 1 to 4.

10. A computer-readable storage medium, wherein instructions in the computer-readable storage medium, when executed by a processor of an electronic device, enable the electronic device to perform a query method based on a configurable search component as described in any one of claims 1 to 4.

11. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the query method based on a configurable search component as described in any one of claims 1 to 4.