A data form query method and device, electronic equipment and storage medium
By receiving performance indicators from client terminal query requests and dynamically adjusting the query method, the problem of increased costs in large-scale form queries is solved, achieving low-cost, high-performance query results.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-16
- Publication Date
- 2026-04-07
AI Technical Summary
In the process of querying large amounts of data in forms, existing technologies improve performance by increasing server configuration or optimizing query statements, which leads to increased costs and makes it impossible to achieve low-cost, high-performance queries.
By receiving performance indicators from client terminal query requests, the system determines the query method, selects either database query or search engine query, and dynamically adjusts the query method to obtain form query results, thus avoiding server scaling.
It achieves low-cost, high-performance form queries, improves query efficiency, and reduces hardware and labor costs.
Smart Images

Figure CN117009382B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and more specifically, to a method, apparatus, electronic device, and storage medium for querying data forms. Background Technology
[0002] With the continuous development of computer technology, in order to facilitate user use, no-code technology is now used when generating form pages. This technology can automatically generate pages corresponding to the forms. After the form configuration is published, users can use it directly without the need for code development.
[0003] As various business operations grow significantly, the amount of data in forms also increases dramatically. Typically, form data is retrieved from the server's database. However, the loading process for this form data can be slow, especially on complex query list pages, where it can become extremely slow.
[0004] For large-scale data forms, traditional performance optimization methods involve adding servers, improving server configurations, optimizing query statements, or horizontally splitting data tables. However, this not only increases server costs but also labor costs. Therefore, providing a low-cost, high-performance query form is an urgent problem to be solved. Summary of the Invention
[0005] The purpose of some embodiments of this application is to provide a method, apparatus, electronic device, and storage medium for querying data forms. Through the technical solutions of the embodiments of this application, a data form query request sent by a client terminal is received, wherein the query request includes a performance identifier; the performance identifier is judged, and based on the judgment result, a query method corresponding to the query request is determined; a form query result corresponding to the query request is obtained according to the query method, and the form query result is sent to the client terminal. The embodiments of this application judge the performance identifier of the data form and select different query methods according to different performance identifiers, thereby obtaining the form query result. This eliminates the need for capacity expansion, achieving low-cost, high-performance querying and improving query efficiency.
[0006] In a first aspect, some embodiments of this application provide a method for querying a data form, including: receiving a query request for a data form sent by a client terminal, wherein the query request includes a performance identifier;
[0007] The performance identifier is judged, and based on the judgment result, the query method corresponding to the query request is determined;
[0008] The form query result corresponding to the query request is obtained according to the query method, and the form query result is sent to the client terminal.
[0009] Some embodiments of this application determine the performance indicators of the data form and select different query methods based on different performance indicators to obtain the form query results. This eliminates the need for expansion, achieves low-cost and high-performance queries, and improves query efficiency.
[0010] In some embodiments, determining the performance identifier and, based on the determination result, determining the query method corresponding to the query request includes:
[0011] If the performance identifier is a non-high-performance mode identifier, then the query method corresponding to the non-high-performance mode identifier is determined to be a database query;
[0012] If the performance identifier is a high-performance mode identifier, then the query method corresponding to the high-performance mode identifier is determined to be a search engine query.
[0013] Some embodiments of this application determine whether a high-performance mode is enabled by judging a performance indicator, thereby determining different query methods. In this way, the corresponding query method is determined for different data forms, improving query efficiency.
[0014] In some embodiments, the form query result includes at least the number of data forms and the configuration information of the data forms. When the form query result is returned via a database query, the method further includes:
[0015] Based on the number of data forms and their configuration information, determine whether to set the performance flag of the data form to a high-performance mode flag.
[0016] Some embodiments of this application analyze whether to enable high-performance mode for form query results, so that data can be found faster in subsequent query processes.
[0017] In some embodiments, the configuration information of the data form includes at least one or more of the following: query conditions, form model index information, database type, database version, and database server configuration information where the form is stored.
[0018] The step of determining whether to set the performance flag of the data form to a high-performance mode flag based on the number of data forms and the configuration information of the data forms includes:
[0019] The query score is determined based on the number of data forms, the query conditions, the form model index information, the database type, database version, database server configuration information, and query time.
[0020] Based on the query score and the preset activation threshold, determine whether to set the performance identifier of the data form to a high-performance mode identifier.
[0021] In some embodiments of this application, by obtaining various parameters related to the form and their corresponding weights, a weighted calculation is performed to obtain a query score, and then the high-performance mode is determined based on the query score, which can better adapt to query requests from different forms.
[0022] In some embodiments, determining the query score based on the number of data forms, the query conditions, the form model index information, the database type, database version, database server configuration information, and query time includes:
[0023] The query score is obtained by weighting the data form quantity, query conditions, form model index information, database type, database version, database server configuration information, query time, and corresponding weights.
[0024] In some embodiments of this application, multiple parameters are obtained and weighted calculations are performed. The more parameters obtained, the more accurate the query score after weighted calculation, thus improving the accuracy of the calculation.
[0025] In some embodiments, determining whether to set the performance identifier of the data form to a high-performance mode identifier based on the query score and a preset activation threshold includes:
[0026] If the query score is greater than or equal to the preset activation threshold, then the performance identifier of the data form is set to the high-performance mode identifier.
[0027] If the query score is less than the preset activation threshold, the performance identifier of the data form will be set to a non-high-performance mode identifier.
[0028] In some embodiments of this application, the high-performance mode is determined based on different parameters corresponding to each form, resulting in higher efficiency during queries.
[0029] In some embodiments, when the performance identifier of the data form is set to a high-performance mode identifier, the method further includes:
[0030] Write the data corresponding to the data form into the search engine;
[0031] Once the data entry to the search engine is complete, enable the high-performance mode for the data form.
[0032] In some embodiments of this application, when a data form needs to be set to enable high-performance mode, the data needs to be synchronized to the search engine. After the synchronization is completed, the high-performance mode of the data form is enabled.
[0033] Secondly, some embodiments of this application provide a data form query device, including:
[0034] A receiving module is used to receive query requests for data forms sent by a client terminal, wherein the query request includes a performance identifier;
[0035] The judgment module is used to judge the performance identifier and determine the query method corresponding to the query request based on the judgment result.
[0036] The query module is used to obtain the form query results corresponding to the query request according to the query method, and send the form query results to the client terminal.
[0037] Optionally, the determination module is used to:
[0038] If the performance identifier is a non-high-performance mode identifier, then the query method corresponding to the non-high-performance mode identifier is determined to be a database query;
[0039] If the performance identifier is a high-performance mode identifier, then the query method corresponding to the high-performance mode identifier is determined to be a search engine query.
[0040] Optionally, the form query result includes at least the number of data forms and the configuration information of the data forms. The device further includes a setting module, which is used for:
[0041] Based on the number of data forms and their configuration information, determine whether to set the performance flag of the data form to a high-performance mode flag.
[0042] Optionally, the configuration information of the data form includes at least one or more of the following: query conditions, form model index information, database type, database version, and database server configuration information where the form is stored.
[0043] The setting module is used for:
[0044] The query score is determined based on the number of data forms, the query conditions, the form model index information, the database type, database version, database server configuration information, and query time.
[0045] Based on the query score and the preset activation threshold, determine whether to set the performance identifier of the data form to a high-performance mode identifier.
[0046] Optionally, the setting module is used to:
[0047] The query score is obtained by weighting the data form quantity, query conditions, form model index information, database type, database version, database server configuration information, query time, and corresponding weights.
[0048] Optionally, the setting module is used to:
[0049] If the query score is greater than or equal to the preset activation threshold, then the performance identifier of the data form is set to the high-performance mode identifier.
[0050] If the query score is less than the preset activation threshold, the performance identifier of the data form will be set to a non-high-performance mode identifier.
[0051] Optionally, the setting module is used to:
[0052] Write the data corresponding to the data form into the search engine;
[0053] Once the data entry to the search engine is complete, enable the high-performance mode for the data form.
[0054] Thirdly, some embodiments of this application provide an electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the program, can implement a data form query method as described in any embodiment of the first aspect.
[0055] Fourthly, some embodiments of this application provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, can implement the data form query method as described in any embodiment of the first aspect.
[0056] Fifthly, some embodiments of this application provide a computer program product, the computer program product including a computer program, wherein when the computer program is executed by a processor, it can implement the data form query method as described in any embodiment of the first aspect. Attached Figure Description
[0057] To more clearly illustrate the technical solutions of some embodiments of this application, the accompanying drawings used in some embodiments of this application will be briefly described below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0058] Figure 1 A flowchart illustrating a data form query method provided in an embodiment of this application;
[0059] Figure 2 A schematic diagram illustrating the data writing process provided in this application embodiment;
[0060] Figure 3 A flowchart illustrating another data form query method provided in this application embodiment;
[0061] Figure 4 A schematic diagram of the structure of a data form query device provided in an embodiment of this application;
[0062] Figure 5 This is a schematic diagram of an electronic device provided in an embodiment of this application. Detailed Implementation
[0063] The technical solutions of some embodiments of this application will now be described with reference to the accompanying drawings.
[0064] It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. Furthermore, in the description of this application, terms such as "first," "second," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0065] With the continuous development of computer technology, in order to facilitate user use, no-code technology is now used when generating form pages. This technology can automatically generate pages corresponding to the forms. After the form configuration is published, users can use it directly without the need for code development.
[0066] As various business operations grow significantly, the amount of data in forms also increases dramatically. Typically, form data is retrieved from the server's database. However, the loading process for this form data can be slow, especially on complex query list pages, where it can become extremely slow.
[0067] When optimizing large datasets like these, traditional solutions involve adding servers, improving server configurations, optimizing query statements, or horizontally splitting data tables. However, this not only increases server costs but also labor costs.
[0068] In view of this, some embodiments of this application provide a method for querying a data form. This method involves receiving a query request for a data form sent by a client terminal, wherein the query request includes a performance identifier; judging the performance identifier; determining a query method corresponding to the query request based on the judgment result; obtaining the form query result corresponding to the query request according to the query method; and sending the form query result to the client terminal. This embodiment of the application judges the performance identifier of the data form and selects different query methods based on different performance identifiers, thereby obtaining the form query result. It does not require capacity expansion, achieving low-cost, high-performance querying and improving query efficiency.
[0069] like Figure 1 As shown, an embodiment of this application provides a method for querying a data form, the method comprising:
[0070] S101. Receive a query request for a data form sent by the client terminal, wherein the query request includes a performance identifier;
[0071] Specifically, the client terminal sends a query request for a data form to the server, and the server receives the query request for the data form. The query request for the data form includes at least a performance identifier, which is used to determine the type of query method, such as whether it is obtained from a database or through a search engine.
[0072] S102. Determine the performance identifier and, based on the determination result, determine the query method corresponding to the query request;
[0073] After obtaining the performance identifier, the server judges the performance identifier and determines different query methods based on different judgment results.
[0074] S103. Obtain the form query results corresponding to the query request according to the query method, and send the form query results to the client terminal.
[0075] Specifically, after determining the query method, such as querying through a database or a search engine, the server can use a database query for data forms with small amounts of data, while a search engine query is required for data forms with large amounts of data. In this embodiment, different performance flags are set for different data forms to determine the corresponding query method, and then the obtained form query results are returned to the client terminal. This eliminates the need for server expansion, achieving low-cost, high-performance queries and improving query efficiency.
[0076] Another embodiment of this application further supplements the description of the data form query method provided in the above embodiments.
[0077] Figure 2This is a schematic diagram of the data writing process provided in the embodiments of this application, such as... Figure 2 As shown, the data writing method is as follows:
[0078] S201. When writing data, first write the data into the form;
[0079] S202. Save the form containing the data in the database.
[0080] S203. After the database write is successful, check whether the form is in high-performance mode; if not, proceed to S205; if so, proceed to S204.
[0081] S204. Synchronize the form and the data entered to the search engine.
[0082] S205. After successful synchronization, a write success message is returned.
[0083] After all forms and data have been successfully written, when performing a query, the performance indicators are checked, and based on the results, the query method corresponding to the query request is determined, including:
[0084] If the performance identifier is a non-high-performance mode identifier, then the query method corresponding to the non-high-performance mode identifier is determined to be a database query.
[0085] If the performance identifier is a high-performance mode identifier, then the query method corresponding to the high-performance mode identifier is determined to be a search engine query.
[0086] For example, a performance flag is set for each form. For instance, the high-performance mode flag is represented by "1" and the non-high-performance flag is represented by "0". In this embodiment, the performance flag is used to determine whether the high-performance mode is enabled, and further to determine whether to use a search engine for querying.
[0087] Some embodiments of this application determine whether a high-performance mode is enabled by judging a performance indicator, thereby determining different query methods. In this way, the corresponding query method is determined for different data forms, improving query efficiency.
[0088] In some embodiments, the form query results include at least the number of data forms and the configuration information of the data forms. When the form query results are returned via a database query, the method further includes:
[0089] Based on the number of data forms and their configuration information, determine whether to set the performance flag of the data forms to the high-performance mode flag.
[0090] Some embodiments of this application analyze whether to enable high-performance mode for form query results, so that data can be found faster in subsequent query processes.
[0091] In some embodiments, the configuration information of the data form includes at least one or more of the following: query conditions, form model index information, database type, database version, and database server configuration information where the form is stored.
[0092] Based on the number of data forms and their configuration information, determine whether to set the performance flag of the data forms to a high-performance mode flag, including:
[0093] The query score is determined based on the number of data forms, query conditions, form model index information, database type, database version, database server configuration information, and query time.
[0094] Specifically, the query score is calculated by weighting the number of data forms, query conditions, form model index information, database type, database version, database server configuration information, query time, and corresponding weights. Multiple parameters are obtained and weighted calculations are performed. The more parameters obtained, the more accurate the weighted query score becomes, thus improving the accuracy of the calculation.
[0095] Based on the query score and the preset activation threshold, determine whether to set the performance flag of the data form to the high-performance mode flag.
[0096] This application embodiment obtains various parameters related to the form and their corresponding weights, performs weighted calculations to obtain a query score, and then determines whether to enable high-performance mode based on the query score, which can better adapt to query requests from different forms.
[0097] Optionally, based on the query score and a preset activation threshold, determine whether to set the data form's performance flag to a high-performance mode flag, including:
[0098] If the query score is greater than or equal to the preset threshold, the performance flag of the data form will be set to the high-performance mode flag.
[0099] If the query score is less than the preset threshold, the performance flag of the data form will be set to a non-high-performance mode flag.
[0100] This application embodiment determines whether to enable high-performance mode based on different parameters corresponding to each form, resulting in higher efficiency during queries.
[0101] When the performance flag of the data form is set to a high-performance mode flag, the method further includes:
[0102] Write the data corresponding to the data form into the search engine;
[0103] Once the search engine write is complete, enable high-performance mode for the data form.
[0104] In some embodiments of this application, when a data form needs to be set to enable high-performance mode, the data needs to be synchronized to the search engine. After the synchronization is completed, the high-performance mode of the data form is enabled.
[0105] This application embodiment performs real-time evaluation and calculation of the data volume of no-code forms, comprehensively evaluates the data volume of the form, the current configuration query complexity and other indicators, and calculates a value through comprehensive analysis. If the value exceeds a certain threshold, the high-performance mode of the form is enabled, and the data is synchronized to the search engine.
[0106] When the data volume is small, querying from a database and a professional search engine will have the same performance. To minimize costs and maintenance complexity, dynamic detection is used to synchronize data to the professional search engine only for forms that are truly needed. Therefore, when querying a form, it is first determined whether high-performance mode is enabled. If high-performance mode is enabled, the data is retrieved from the search engine. In this way, the search engine is used only when the data volume is large, reducing the cost of the search engine. This automatically optimizes the form query performance without significantly increasing hardware investment or human intervention.
[0107] Figure 3 A flowchart illustrating another data form query method provided in this application embodiment is shown below. Figure 3 As shown, the query method includes:
[0108] S301, Receive a query request for a data form sent by the client terminal;
[0109] S302. When querying the form interface, determine whether the data form has enabled high-performance mode. This high-performance mode is a switch configuration item for the data form.
[0110] S303. If high-performance mode is not enabled, directly query the database and execute step S305.
[0111] S304. If high-performance mode is enabled, query the search engine and execute step S308.
[0112] S305. Based on a comprehensive analysis of the form query results returned by the database and the query configuration, determine whether to enable high-performance mode.
[0113] The following analysis shows whether to enable high-performance algorithms:
[0114] 1) The query results will include the total amount of data in the form, as well as one or more of the following: query conditions, form model index information, database type, database version, and database server configuration information where the form is stored.
[0115] 2) Based on the index of the form model, the current query conditions, the database type and version, and the total amount of data, roughly analyze the number of data rows to be scanned to retrieve the corresponding results and the estimated execution time, and record it in the system cache.
[0116] 3) At the same time, record the actual time used to execute the query and record it in the system cache, and compare it with the expected value and record the value in the cache.
[0117] 4) Then query the form for the average expected query time and the actual query time over the past few hours.
[0118] 5) Combine the values obtained from the above query with the values obtained from the current query to calculate a weighted score. That is, obtain the number of data forms, the query conditions, the form model index information, the database type, database version, database server configuration information, and query time, and calculate the query score by weighting them.
[0119] If the query score exceeds the preset threshold, the high-performance mode will be enabled. The preset threshold is a critical value that needs to be enabled after calculation based on a large amount of data.
[0120] For example,
[0121] score=f(w1*g1(v1)+w2*g2(v2)+...+wn*gn(vn))
[0122] Here, v1, v2, ..., vn represent index information such as data volume, actual number of rows scanned, estimated execution time, and actual execution time. g1, g2, ..., gn are the transformation functions for the corresponding variables v1, v2, ..., vn, converting the original variable values into the values needed for the calculation. w1, w2, ..., wn represent the weight values of each indicator variable. After summing all weighted values, the final score, i.e., the query score, is obtained through the final transformation function. The variables vn, the transformation function gn, and the weights wn can be defined and implemented in different ways according to actual needs.
[0123] S306. If necessary, begin asynchronously synchronizing all data to the search engine. The executable program on the server's backend terminal will write the data form and all the data stored in the database to the search engine.
[0124] S307. Once the data synchronization with the search engine is complete, high-performance mode will be enabled.
[0125] This application's embodiments achieve low-cost, automatic optimization of form query performance based on form data volume, query configuration, and other factors, reducing the cost of manual intervention and enabling smooth system use even during rapid business growth, without needing to worry about system expansion or other issues.
[0126] It should be noted that each of the implementable methods in this embodiment can be implemented individually or in any combination without conflict. This application does not limit this.
[0127] Another embodiment of this application provides a data form query device for executing the data form query method provided in the above embodiments.
[0128] like Figure 4 The diagram shown is a structural schematic of a data form query device provided in an embodiment of this application. The data form query device includes a receiving module 401, a judging module 402, and a query module 403, wherein:
[0129] The receiving module 401 is used to receive a query request for a data form sent by the client terminal, wherein the query request includes a performance identifier;
[0130] The judgment module 402 is used to judge the performance identifier and determine the query method corresponding to the query request based on the judgment result;
[0131] The query module 403 is used to obtain the form query results corresponding to the query request according to the query method, and send the form query results to the client terminal.
[0132] Regarding the apparatus in this embodiment, the specific manner in which each module performs its operations has been described in detail in the embodiments related to the method, and will not be elaborated upon here.
[0133] According to the data form query device provided in this embodiment, through...
[0134] Another embodiment of this application further supplements the description of the data form query device provided in the above embodiments.
[0135] Optionally, the decision module is used for:
[0136] If the performance identifier is a non-high-performance mode identifier, then the query method corresponding to the non-high-performance mode identifier is determined to be a database query.
[0137] If the performance identifier is a high-performance mode identifier, then the query method corresponding to the high-performance mode identifier is determined to be a search engine query.
[0138] Optionally, the form query results include at least the number of data forms and the configuration information of the data forms. The device also includes a setting module, which is used for:
[0139] Based on the number of data forms and their configuration information, determine whether to set the performance flag of the data forms to the high-performance mode flag.
[0140] Optionally, the configuration information of the data form shall include at least one or more of the following: query conditions, form model index information, database type, database version, and database server configuration information where the form is stored;
[0141] The settings module is used for:
[0142] The query score is determined based on the number of data forms, query conditions, form model index information, database type, database version, database server configuration information, and query time.
[0143] Based on the query score and the preset activation threshold, determine whether to set the performance flag of the data form to the high-performance mode flag.
[0144] Optionally, the settings module is used for:
[0145] The query score is calculated by weighting the number of data forms, query conditions, form model index information, database type, database version, database server configuration information, query time, and corresponding weights.
[0146] Optionally, the settings module is used for:
[0147] If the query score is greater than or equal to the preset threshold, the performance flag of the data form will be set to the high-performance mode flag.
[0148] If the query score is less than the preset threshold, the performance flag of the data form will be set to a non-high-performance mode flag.
[0149] Optionally, the settings module is used for:
[0150] Write the data corresponding to the data form into the search engine;
[0151] Once the search engine write is complete, enable high-performance mode for the data form.
[0152] Regarding the apparatus in this embodiment, the specific manner in which each module performs its operations has been described in detail in the embodiments related to the method, and will not be elaborated upon here.
[0153] It should be noted that each of the implementable methods in this embodiment can be implemented individually or in any combination without conflict. This application does not limit this.
[0154] This application also provides a computer-readable storage medium storing a computer program thereon. When the program is executed by a processor, it can implement the operation of any of the methods corresponding to the data form query methods provided in the above embodiments.
[0155] This application also provides a computer program product, which includes a computer program, wherein when the computer program is executed by a processor, it can implement the operation of any of the methods corresponding to the data form query methods provided in the above embodiments.
[0156] like Figure 5 As shown, some embodiments of this application provide an electronic device 500, which includes: a memory 510, a processor 520, and a computer program stored in the memory 510 and executable on the processor 520. When the processor 520 reads the program from the memory 510 via a bus 530 and executes the program, it can implement any of the methods included in the above-described data form query method.
[0157] Processor 520 can process digital signals and can include various computing architectures. For example, it can be a complex instruction set computer architecture, a reduced instruction set computer architecture, or an architecture that implements multiple instruction set combinations. In some examples, processor 520 can be a microprocessor.
[0158] The memory 510 can be used to store instructions executed by the processor 520 or data related to the execution of instructions. These instructions and / or data may include code for implementing some or all of the functions of one or more modules described in the embodiments of this application. The processor 520 of this disclosure embodiment can be used to execute the instructions in the memory 510 to implement the methods shown above. The memory 510 includes dynamic random access memory, static random access memory, flash memory, optical memory, or other memories well known to those skilled in the art.
[0159] The above are merely embodiments of this application and are not intended to limit the scope of protection of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application. It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.
[0160] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
[0161] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
Claims
1. A method for querying a data form, characterized in that, The method includes: Receive a query request for a data form sent by a client terminal, wherein the query request includes a performance identifier, which is used to determine whether a high-performance mode is enabled and whether a search engine query is used; The performance identifier is judged, and based on the judgment result, the query method corresponding to the query request is determined; The form query results corresponding to the query request are obtained according to the query method, and the form query results are sent to the client terminal. The form query results include at least the number of data forms and the configuration information of the data forms. The configuration information of the data forms includes at least one or more of the following: query conditions, form model index information, database type, database version, and database server configuration information where the forms are stored. Based on the number of data forms and the configuration information of the data forms, determine whether to set the performance identifier of the data forms to a high-performance mode identifier; The step of determining whether to set the performance flag of the data form to a high-performance mode flag based on the number of data forms and the configuration information of the data forms includes: The query score is determined based on the number of data forms, the query conditions, the form model index information, the database type, database version, database server configuration information, and query time. This includes: performing a weighted calculation based on the number of data forms, the query conditions, the form model index information, the database type, database version, database server configuration information, query time, and corresponding weights to obtain the query score. Based on the query score and the preset activation threshold, determine whether to set the performance identifier of the data form to a high-performance mode identifier; If the query score is greater than the preset threshold, the high-performance mode is activated, and all data is asynchronously synchronized to the search engine. The execution program on the server's backend terminal will write the data form and all the data stored in the database into the search engine.
2. The data form query method according to claim 1, characterized in that, The step of judging the performance identifier and determining the query method corresponding to the query request based on the judgment result includes: If the performance identifier is a non-high-performance mode identifier, then the query method corresponding to the non-high-performance mode identifier is determined to be a database query. If the performance identifier is a high-performance mode identifier, then the query method corresponding to the high-performance mode identifier is determined to be a search engine query.
3. The data form query method according to claim 1, characterized in that, The step of determining whether to set the performance identifier of the data form to a high-performance mode identifier based on the query score and a preset activation threshold includes: If the query score is greater than or equal to the preset activation threshold, then the performance identifier of the data form is set to the high-performance mode identifier. If the query score is less than the preset activation threshold, the performance identifier of the data form will be set to a non-high-performance mode identifier.
4. The data form query method according to claim 3, characterized in that, When the performance identifier of the data form is set to a high-performance mode identifier, the method further includes: Write the data corresponding to the data form into the search engine; Once the data entry to the search engine is complete, enable the high-performance mode for the data form.
5. A data form query device, characterized in that, The device includes: The receiving module is used to receive query requests for data forms sent by client terminals. The query request includes a performance indicator, which is used to determine whether high-performance mode is enabled and whether a search engine query is used. The judgment module is used to judge the performance identifier and determine the query method corresponding to the query request based on the judgment result. The query module is used to obtain the form query results corresponding to the query request according to the query method, and send the form query results to the client terminal. The form query results include at least the number of data forms and the configuration information of the data forms. The configuration information of the data forms includes at least one or more of the following: query conditions, form model index information, database type, database version, and database server configuration information where the forms are stored. Based on the number of data forms and the configuration information of the data forms, determine whether to set the performance identifier of the data forms to a high-performance mode identifier; The step of determining whether to set the performance flag of the data form to a high-performance mode flag based on the number of data forms and the configuration information of the data forms includes: The query score is determined based on the number of data forms, the query conditions, the form model index information, the database type, database version, database server configuration information, and query time. This includes: performing a weighted calculation based on the number of data forms, the query conditions, the form model index information, the database type, database version, database server configuration information, query time, and corresponding weights to obtain the query score. Based on the query score and the preset activation threshold, determine whether to set the performance identifier of the data form to a high-performance mode identifier; If the query score is greater than the preset threshold, the high-performance mode is activated, and all data is asynchronously synchronized to the search engine. The execution program on the server's backend terminal will write the data form and all the data stored in the database into the search engine.
6. An electronic device, characterized in that, It includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, it can implement the data form query method according to any one of claims 1-4.
7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, characterized in that, when the program is executed by a processor, it can implement the data form query method according to any one of claims 1-4.
Citation Information
Patent Citations
Data query method and device, computer equipment and computer readable storage medium
CN115237935A