Query result determination method and device, storage medium and electronic device

By identifying interface features and loading target scripts to process target lists, the problems of low query efficiency of huge order data and long interface response time are solved, efficient query and flexible interface processing are realized, and duplicate development is reduced.

CN119003579APending Publication Date: 2024-11-22QINGDAO HAIER TECH +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411146389.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-20
Publication Date
2024-11-22

AI Technical Summary

Technical Problem

In the prior art, the efficiency of querying huge order data is low, resulting in long interface response time, and the needs of different callers lead to many interfaces and serious repeated development.

Method used

By receiving the interface call request of the calling object, determine the target interface characteristics, and load the target script from the preset database. Use the target script to process the target list and obtain query results, including identifying search conditions, finding order primary keys, obtaining detailed data, and data cleaning and compensate for repairs to generate the final query result.

Benefits of technology

It improves the query efficiency of target list data, reduces interface response time, reduces the cost of repeated development, and enhances the flexibility and scalability of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119003579A_ABST
    Figure CN119003579A_ABST
Patent Text Reader

Abstract

The invention discloses a query result determination method and device, a storage medium and an electronic device, and relates to the technical field of smart home / smart home, and the method comprises the steps: determining the interface characteristics of a to-be-called target interface according to an interface calling request under the condition of receiving the interface calling request sent by a calling object; target scripts are loaded from a preset database according to the interface features, the preset database comprises multiple sets of corresponding relations between historical interface features and historical scripts, and the target scripts contain process data of parameter processing and result processing; and under the condition that the calling object initiates the target list query through the target interface, processing the target list through the target script to obtain a target query result. By the adoption of the technical scheme, the problems that the target list data query efficiency is low, and the interface response time is long are solved, then the target list is queried and processed through the target interface and the target script, and the query efficiency of the target list data is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of smart home / intelligent family technology, and more specifically, to a method, device, storage medium and electronic device for determining a query result. Background Art

[0002] In the related art, the order data volume of some large shopping platforms is usually in the tens of millions or even higher. The order data of these platforms includes a large number of fields such as user information, product information, order status, payment information, etc., which need to be frequently queried and analyzed. However, when using the traditional relational database MySQL for querying, due to the large amount of data, the query response time often becomes very long, thus affecting the user experience. In addition, different callers have different requirements for query conditions and required return data, which leads to multiple interfaces and serious duplication of development.

[0003] Therefore, no effective solutions have been proposed for the problems of low efficiency in target list data query and long interface response time in related technologies. Summary of the invention

[0004] The embodiments of the present application provide a method, device, storage medium and electronic device for determining a query result, so as to at least solve the problems in the related art, such as low efficiency of target list data query and long interface response time.

[0005] According to an embodiment of the embodiments of the present application, a method for determining a query result is provided, including: when receiving an interface call request sent by a calling object, determining the interface characteristics of a target interface to be called according to the interface call request; loading a target script from a preset database according to the interface characteristics, wherein the preset database includes a correspondence between multiple groups of historical interface characteristics and historical scripts, and the target script contains process data for parameter processing and result processing; when the calling object initiates a query for a target list through the target interface, processing the target list through the target script to obtain a target query result.

[0006] In an exemplary embodiment, a target list is processed through a target script to obtain a target query result, including: identifying search conditions corresponding to the target list through the target script; using the search conditions to search for multiple order primary keys from an index database associated with a target interface; sending the multiple order primary keys to a source database to obtain detailed data; and determining the target query result based on the results of obtaining the detailed data.

[0007] In an exemplary embodiment, a target script is loaded from a preset database according to interface features, including: obtaining a preset script template instance corresponding to the current target data interface; constructing an executable script using the preset script template instance and interface features; configuring operating parameters in a configuration file associated with the executable script to generate a target script, wherein the operating parameters include: source data information and a storage directory for the script.

[0008] In an exemplary embodiment, before the target list is processed by the target script to obtain the target query result, the above method also includes: monitoring the source data of the target list in real time by running the monitoring function to obtain real-time order data; performing data cleansing on the real-time order data to obtain index pairs stored in the index database, wherein the index pairs include at least the following fields: a first field corresponding to the search condition, a second field corresponding to the order status, a third field corresponding to the order payment status, a fourth field for assisting fuzzy search, and a fifth field corresponding to the extended business; when the real-time order data is stored in the source database, generating the target list according to the association relationship between the index pairs and the data in the source database.

[0009] In an exemplary embodiment, after the source data of the target list is monitored in real time by running the monitoring function and the real-time order data is obtained, the method further includes: determining the running status of the monitoring function in different time periods; when the running status indicates that there is a monitoring omission in the real-time monitoring and / or the synchronization of the real-time order data is abnormal, starting the data comparison between the index pair and the source data; and determining whether to perform data compensation and repair on the real-time order data according to the data comparison result.

[0010] In an exemplary embodiment, whether to perform data compensation and repair on real-time order data is determined based on data comparison results, including: when the data comparison results indicate that the corresponding orders between the index pair and the source data are inconsistent, establishing a compensation task; wherein the compensation task is used to determine the target order whose index is different from that in the source data, and update the target position of the target order in the target list; obtaining the task execution result of the compensation task, and updating the target list based on the task execution result.

[0011] In an exemplary embodiment, when the calling object initiates a query on the target list through the target interface, the target list is processed through the target script to obtain the target query result, and the above method also includes: obtaining an order data set corresponding to the target query result; encapsulating the order data set according to the data display rules of the front-end display interface corresponding to the calling object to obtain a packaged data packet.

[0012] According to another embodiment of the embodiments of the present application, a device for determining a query result is also provided, including: a first determination module, used to determine the interface characteristics of the target interface to be called according to the interface call request when receiving the interface call request sent by the calling object; a loading module, used to load the target script from a preset database according to the interface characteristics, wherein the preset database includes a correspondence between multiple groups of historical interface characteristics and historical scripts, and the target script contains process data for parameter processing and result processing; a processing module, used to process the target list through the target script to obtain the target query result when the calling object initiates a query on the target list through the target interface.

[0013] According to another aspect of the embodiments of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the above-mentioned method for determining the query result when running.

[0014] According to another aspect of an embodiment of the present application, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the method for determining the query result through the computer program.

[0015] According to another embodiment of the present application, a computer program product is provided, including a computer program, which implements the steps in any of the above query result determination method embodiments when the computer program is executed by a processor.

[0016] In an embodiment of the present application, when receiving an interface call request sent by a calling object, the interface features of the target interface to be called are determined according to the interface call request; the target script is loaded from a preset database according to the interface features, wherein the preset database includes a correspondence between multiple groups of historical interface features and historical scripts, and the target script contains process data for parameter processing and result processing; when the calling object initiates a query on the target list through the target interface, the target list is processed through the target script to obtain a target query result. The above technical solution solves the problems of low query efficiency of target list data and long interface response time, and further, the query efficiency of target list data is improved by querying and processing the target list through the target interface and the target script. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0018] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0019] Figure 1 is a hardware environment diagram of a method for determining a query result according to an embodiment of the present application;

[0020] Figure 2 is a flowchart of a method for determining a query result according to an embodiment of the present application;

[0021] Figure 3 This is a flow chart of a dynamic interface quick query method according to an embodiment of the present application;

[0022] Figure 4 is a data synchronization principle diagram for order data search according to an embodiment of the present application;

[0023] Figure 5 is a structural block diagram of a device for determining a query result according to an embodiment of the present application;

[0024] Figure 6 is a block diagram of a computer system structure of an electronic device according to an embodiment of the present application;

[0025] Figure 7 An electronic device is provided for implementing a method for determining a query result according to an embodiment of the present application. DETAILED DESCRIPTION

[0026] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.

[0027] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0028] According to one aspect of an embodiment of the present application, a method for determining a query result is provided. The method for determining a query result is widely used in whole-house intelligent digital control application scenarios such as smart home, smart home, smart home device ecology, and smart residential (Intelli gence House) ecology. Optionally, in this embodiment, the above-mentioned method for determining a query result can be applied to Figure 1 In the hardware environment composed of the terminal device 102 and the server 104 shown in FIG. Figure 1 As shown, the server 104 is connected to the terminal device 102 via a network, and can be used to provide services (such as application services, etc.) for the terminal or a client installed on the terminal. A database can be set on the server or independently of the server to provide data storage services for the server 104. Cloud computing and / or edge computing services can be configured on the server or independently of the server to provide data computing services for the server 104.

[0029] The network may include but is not limited to at least one of the following: wired network, wireless network. The wired network may include but is not limited to at least one of the following: wide area network, metropolitan area network, local area network, and the wireless network may include but is not limited to at least one of the following: WI FI (Wireless Fidelity), Bluetooth. The terminal device 102 may be but is not limited to a PC, a mobile phone, a tablet computer, a smart air conditioner, a smart range hood, a smart refrigerator, a smart oven, a smart stove, a smart washing machine, a smart water heater, a smart washing device, a smart dishwasher, a smart projection device, a smart TV, a smart clothes drying rack, a smart curtain, a smart audio and video, a smart socket, a smart speaker, a smart fresh air device, a smart kitchen and bathroom device, a smart bathroom device, a smart sweeping robot, a smart window cleaning robot, a smart mopping robot, a smart air purification device, a smart steamer, a smart microwave oven, a smart kitchen treasure, a smart purifier, a smart water dispenser, a smart door lock, etc.

[0030] In this embodiment, a method for determining a query result is provided, which can be applied to a computer terminal or an Internet of Things cloud. Figure 2 : is a flowchart of a method for determining a query result according to an embodiment of the present application, the process comprising the following steps:

[0031] Step S202, when receiving an interface calling request sent by a calling object, determining the interface characteristics of the target interface to be called according to the interface calling request;

[0032] Optionally, suppose there is an e-commerce platform where users can obtain product information through an interface call request. The interface call request contains the category and brand information of the product. By parsing the parameters and interface information in the request, the target interface to be called is determined. For example, when a user requests to obtain product information of the mobile phone category, the system will determine to call the mobile phone category product information interface based on the interface information; when a user requests to obtain Apple brand product information, the system will determine to call the Apple brand product information interface based on the interface information. In this way, the interface characteristics of the target interface to be called are determined according to the interface call request, which improves the flexibility and scalability of the system.

[0033] Step S204, loading a target script from a preset database according to the interface features, wherein the preset database includes a correspondence between multiple groups of historical interface features and historical scripts, and the target script contains process data of parameter processing and result processing;

[0034] In simple terms, if you need to write a script to process a user's shopping order, first load the correspondence between the historical order interface features and the historical order processing script from the preset database. Then, based on these correspondences, load the target script into the system. In this way, you can quickly obtain the process data of processing orders, saving the time of writing scripts and improving development efficiency and code quality.

[0035] Step S206, when the calling object initiates a query on the target list through the target interface, the target list is processed through the target script to obtain a target query result.

[0036] Through the above steps, in the case of receiving an interface call request sent by a calling object, the interface features of the target interface to be called are determined according to the interface call request; the target script is loaded from a preset database according to the interface features, wherein the preset database includes a correspondence between multiple groups of historical interface features and historical scripts, and the target script contains process data for parameter processing and result processing; in the case of the calling object initiating a query on the target list through the target interface, the target list is processed through the target script to obtain a target query result. The above technical solution solves the problems of low efficiency in querying target list data and long interface response time, and further, the query efficiency of target list data is improved by querying and processing the target list through the target interface and the target script.

[0037] In an exemplary embodiment, the target list query is processed by the target script to obtain a target query result, including: identifying the search conditions corresponding to the target list by the target script; using the search conditions to search for multiple order primary keys from an index database associated with the target interface; sending the multiple order primary keys to a source database to obtain detailed data; and determining the target query result based on the detailed data acquisition result.

[0038] Optionally, the above search for multiple order primary keys is obtained from ES according to the search conditions, where ES is the abbreviation of Elasticsearch, which is an open source distributed search and analysis engine for real-time search, analysis and visualization of large-scale data. ES is built on the Apache Lucene search engine, provides powerful full-text search capabilities, and supports complex data analysis and visualization.

[0039] Optionally, suppose there is an e-commerce platform that needs to query a user's order information in the past month. Use the target script to process the target list query, identify the user ID (Identification) and time range as the search condition. Then find multiple order primary keys from ES, and send these primary keys to the source database to obtain detailed data, including order number, product information, price, etc. Finally, determine the final query result based on the obtained detailed data and display it to the user. The whole process achieves the advantages of automated processing, accurate search, data integration and complete query results.

[0040] In an exemplary embodiment, a target script is loaded from a preset database according to the interface feature, including: obtaining a preset script template instance corresponding to the current target data interface; constructing an executable script using the preset script template instance and the interface feature; configuring operating parameters in a configuration file associated with the executable script to generate a target script, wherein the operating parameters include: source data information and a storage directory for the script.

[0041] Optionally, assume that the target script needs to be loaded from a data interface named "customer_i nfo", which contains a query function for customer information. First, obtain the preset script template instance corresponding to the interface, and then build an executable script based on the interface characteristics (such as interface name, input parameters, output format, etc.). Next, configure the source data information (such as database connection information) and the storage directory of the script in the configuration file associated with the executable script to generate the final target script. In this way, a script suitable for the "customer_i nfo" interface can be generated quickly and accurately, and relevant parameters can be flexibly configured as needed to achieve a customized script generation process.

[0042] In an exemplary embodiment, before the target list is processed by the target script to obtain the target query result, the method also includes: monitoring the source data of the target list in real time by running a monitoring function to obtain real-time order data; performing data cleansing on the real-time order data to obtain index pairs stored in the index database, wherein the index pairs include at least the following fields: a first field corresponding to the search condition, a second field corresponding to the order status, a third field corresponding to the order payment status, a fourth field for assisting fuzzy search, and a fifth field corresponding to extended business; when the real-time order data is stored in the source database, generating a target list according to the association relationship between the index pair and the data in the source database.

[0043] Optionally, the above monitoring function is to perform binlog monitoring on the source order table, where binlog is the binary log file of the MySQL database, which records all changes to the database, including insert, update, delete, etc. Binlog monitoring refers to real-time monitoring of the database's binlog, which can view the database's change operations in real time and promptly discover and handle abnormal situations in the database. Through binlog monitoring, database administrators can promptly discover problems in the database and ensure the data security and stability of the database.

[0044] Optionally, the real-time order data monitored above will be notified to consumers through MQ (Message Queue). Message queue is a communication mechanism used to transmit messages between different applications. It allows producers to send messages to queues, and then consumers can get messages from the queues and process them. Through message queues, producers and consumers can be decoupled. Even if the consumer is not online or unavailable, the producer can send messages to the queue and wait for the consumer to process them. In addition, asynchronous transmission and processing of monitoring data can be achieved, improving the scalability and stability of the system.

[0045] Optionally, the specific logic of the above data cleaning is: map the field information applied to the search conditions to the corresponding index model, such as order status and payment status, which are one-to-one correspondence and can be directly stored; concatenate the fuzzy search fields, such as order number, mobile phone number, etc., to a field in the index model and define it as a fuzzy search field; map the results calculated by combining multiple conditions with the business scenario to an extended business field in the index model. This effectively improves the efficiency and accuracy of data processing.

[0046] In an exemplary embodiment, after the source data of the target list is monitored in real time by running the monitoring function to obtain the real-time order data, the method further includes: determining the running status of the monitoring function in different time periods; when the running status indicates that there is a monitoring omission in the real-time monitoring and / or the synchronization of the real-time order data is abnormal, starting the data comparison between the index pair and the source data; and determining whether to perform data compensation and repair on the real-time order data according to the data comparison result.

[0047] Optionally, in the case of missing monitoring or abnormal order data, enable a scheduled task to compare the source data and ES index data within a certain time range. If abnormal data is found, data compensation and repair are required. Here, the time levels are 5 minutes, 1 hour, 6 hours, and 24 hours, and the order information and index model information of the past time levels are compared respectively. For example, a 5-minute scheduled task will obtain orders that have changed within 5 minutes of the current time from the order table, and compare these order information with the data in the index model one by one, mainly focusing on the order table, and updating the inconsistent information of the index model data, thereby ensuring the timeliness and accuracy of data repair.

[0048] In an exemplary embodiment, determining whether to perform data compensation and repair on the real-time order data is based on a data comparison result includes: establishing a compensation task when the data comparison result indicates that the orders corresponding to the index pair and the source data are inconsistent; wherein the compensation task is used to determine a target order that is different from the index in the source data, and to update the target position of the target order in the target list; obtaining a task execution result of the compensation task, and updating the target list based on the task execution result.

[0049] It is understandable that when the above data comparison results indicate that there is an order inconsistency between the index pair and the source data, a manual compensation task can be enabled in the management system in order to repair the abnormal data as soon as possible. If it is found that an order is not displayed in the position displayed in the target list in time, it can be manually triggered to synchronize the single order data to the index model in time. This can effectively handle the problems of order inconsistency and delayed display, and ensure the smoothness and accuracy of system operation.

[0050] In an exemplary embodiment, when the calling object initiates a target list query through the target interface, the target list is processed through the target script to obtain a target query result, and the method further includes: obtaining an order data set corresponding to the target query result; and encapsulating the order data set according to a data display rule of a front-end display interface corresponding to the calling object to obtain a packaged data packet.

[0051] For example, there is an e-commerce website that needs to obtain a user's order data and display it on the front-end page. First, the user's order data set is obtained by querying the database, including the order number, product information, price and other contents. Then, according to the rules of the front-end display interface, the order data set is encapsulated, and the order number, product information, price and other contents are organized and formatted according to the page layout requirements, and finally a packaged data packet is obtained. Finally, the packaged data packet is passed to the front-end page for display, and the user can clearly see his or her order information, which improves the user experience.

[0052] In order to better understand the process of the method for determining the above query results, the process of the method for determining the above query results is described below in combination with an optional embodiment, but it is not used to limit the technical solution of the embodiment of the present application.

[0053] In the related technology, the data level of the order table has reached tens of millions and is constantly increasing. The existing MySQL direct query method has a long response time, which affects the user experience; the different demands of the callers lead to multiple interfaces and serious duplication of development.

[0054] In order to solve the above problems, an optional embodiment of the present application proposes a dynamic interface fast query method. Specifically, first, the system calls the interface to send a task query request according to the user request; then, the query parameters are dynamically processed according to the configuration information obtained from the dynamic source; then, a query request is sent to the database according to the processed parameters to obtain the target data; finally, the target data is encapsulated and the unified return order data formatted dynamic data structure is returned to the caller. By dynamically processing query parameters and formatting the return of dynamic data structures, the system can handle different user requests more flexibly, improving the scalability and flexibility of the system, and at the same time can more efficiently obtain target data and uniformly return it to the caller, improving the system's response speed and user experience.

[0055] Optional, Figure 3 The following is a flow chart of a method for fast querying a dynamic interface according to an embodiment of the present application. The overall process of the above technical solution is as follows, including the following steps:

[0056] Step 1: Interface call. The system calls the interface according to the user's request to send a task query request to obtain the data required by the user. Different callers have proprietary source identifiers, which can even be customized into different URLs. For example, define the interface, http: / / open.ehai er.com / … / {source) / getL i st.json.

[0057] Optionally, if different docking parties have different demands, you can use groovy to customize parameters and return data structures, focusing on demand data rather than full data. The main development work is in script writing rather than modifying core logic.

[0058] Step 2: Get the configuration from the dynamic source. The configuration includes the groovy scripts for parameter processing and result processing.

[0059] Step 3: Dynamic parameter processing: Get the groovy script from the configuration, and format the parameters into a unified parameter object through the parameter processing groovy script.

[0060] Step 4: Get order data. Use the processed parameters to initiate a query request to Elasticsearch (ES) and obtain the task ID list from ES based on the search conditions. Use the task ID list to initiate a query request to the MySQL database to obtain the detailed data of the task list. Encapsulate the detailed data into a unified order model data structure.

[0061] Step 5: Encapsulate data; customize and encapsulate the result data through the groovy script for result processing. Customization is to dynamically modify classes and objects at runtime through metaprogramming, dynamically add attributes and methods to realize the customization function of existing classes or objects. The returned order data will be uniformly formatted into a dynamic data structure for data return.

[0062] Step 6: Data return.

[0063] In summary, the above implementation uses dynamic processing and customization of groovy components to make query logic highly cohesive and reduce development and maintenance costs. This avoids the phenomenon of too many open interface entries, high maintenance costs, and repeated reinvention of the wheel in related technologies.

[0064] Optional, such as Figure 4 As shown, Figure 4 This is a data synchronization principle diagram for order data search according to an embodiment of the present application; in the process of synchronizing order data, firstly, canna l is used to perform binlog monitoring on the source order table, and the monitored data is notified to the consumer through MQ. The consumer performs data cleaning on the monitored DML operation and converts it into an order index model and stores it in ES. Secondly, in order to compensate for the lack of canna l monitoring or the failure of MQ consumption, a scheduled task is enabled to compare the source data and ES index data within a certain time range. If abnormal data is found, data compensation and repair are required, and the index model data inconsistency information is updated. In order to repair abnormal data as soon as possible, a manual compensation task is enabled in the management system to synchronize single order data to the index model in a timely manner.

[0065] It is understandable that the above businesses are constantly being added and iterated. New requirements or optimization of business functions may bring up new search conditions. Traditional relational databases cannot make adjustments quickly and need to process the fields in a certain way, such as adding indexes. If the search conditions are complex and require multiple conditions to be jointly judged, a lot of code-level changes are required. By introducing the ES index model, the data can be processed and only one field can be output as the query condition for the business requirements. This can greatly reduce the workload of secondary development and still ensure good query performance.

[0066] In addition, using ES with higher query efficiency for search processing greatly improves the concurrent search capability of orders, shortens the response time, and provides a better user experience. This avoids the problem of too large a database table base and low query efficiency and long interface response time as the order volume surges.

[0067] Optionally, the above DML is the abbreviation of Data Manipulation Language, which is a set of operations used to manage data in a database, including inserting data (INSERT), updating data (UPDATE), deleting data (DELETE), and querying data (SELECT). Through DML operations, users can add, delete, modify, and query data in the database to achieve data management and maintenance.

[0068] It should be noted that when calling the interface, it is necessary to ensure that the interface requested by the user is correct and can be called normally. At the same time, it is necessary to consider the stability and reliability of the interface, as well as possible network delays or request timeouts. In addition, it is necessary to confirm that the groovy script for parameter processing can correctly process the parameters entered by the user and format them into a unified parameter object. At the same time, pay attention to possible exceptions that may occur during parameter processing, such as incorrect or missing parameter formats. Ensure that data can be obtained normally when query requests are made to ES and MySQL using the processed parameters. It is necessary to consider possible data inconsistencies or empty query results during the query process, and how to handle these exceptions. During the customized packaging process, it is necessary to pay attention to possible data format errors or logical errors, and how to handle these problems.

[0069] Through the above solution, query parameters can be dynamically processed according to user requests, which improves query efficiency and flexibility. By dynamically obtaining configuration information, query parameters can be personalized according to different sources, thereby accurately obtaining target data. Encapsulating data and returning it to the caller in a unified format simplifies the caller's processing flow and improves the system's usability and scalability. Overall, the above solution can quickly respond to user requests and provide accurate data query results.

[0070] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods of each embodiment of the present application.

[0071] Figure 5 is a structural block diagram of a device for determining a query result according to an embodiment of the present application; Figure 5 As shown, including:

[0072] A first determining module 52 is used to determine the interface characteristics of the target interface to be called according to the interface calling request when receiving the interface calling request sent by the calling object;

[0073] A loading module 54, configured to load a target script from a preset database according to the interface features, wherein the preset database includes a correspondence between multiple groups of historical interface features and historical scripts, and the target script contains process data of parameter processing and result processing;

[0074] The processing module 56 is used to process the target list through the target script to obtain the target query result when the calling object initiates a query on the target list through the target interface.

[0075] Through the above device, in the case of receiving an interface call request sent by a calling object, the interface features of the target interface to be called are determined according to the interface call request; the target script is loaded from a preset database according to the interface features, wherein the preset database includes a correspondence between multiple groups of historical interface features and historical scripts, and the target script contains process data for parameter processing and result processing; when the calling object initiates a query on the target list through the target interface, the target list is processed through the target script to obtain the target query result. The above technical solution solves the problems of low query efficiency of target list data and long interface response time, and further, the query efficiency of target list data is improved by querying and processing the target list through the target interface and the target script.

[0076] In an exemplary embodiment, the above-mentioned processing module is also used to identify the search conditions corresponding to the target list through the target script; use the search conditions to search for multiple order primary keys from the index database associated with the target interface; send the multiple order primary keys to the source database to obtain detailed data; and determine the target query result based on the acquisition result of the detailed data.

[0077] In an exemplary embodiment, the above-mentioned loading module is also used to obtain a preset script template instance corresponding to the current target data interface; use the preset script template instance and the interface characteristics to construct an executable script; configure operating parameters in a configuration file associated with the executable script to generate a target script, wherein the operating parameters include: source data information and the storage directory of the script.

[0078] In an exemplary embodiment, the above-mentioned device also includes: a monitoring module, which is used to process the target list through the target script, and before obtaining the target query result, monitor the source data of the target list in real time by running the monitoring function to obtain real-time order data; perform data cleaning on the real-time order data to obtain index pairs stored in the index database, wherein the index pairs include at least the following fields: a first field corresponding to the search condition, a second field corresponding to the order status, a third field corresponding to the order payment status, a fourth field for assisting fuzzy search, and a fifth field corresponding to the extended business; when the real-time order data is stored in the source database, a target list is generated according to the association relationship between the index pair and the data in the source database.

[0079] In an exemplary embodiment, the above-mentioned device also includes: a second determination module, which is used to monitor the source data of the target list in real time by running the monitoring function, and after obtaining the real-time order data, determine the operating status of the monitoring function in different time periods; when the operating status indicates that there is a monitoring omission in the real-time monitoring, and / or the synchronization of the real-time order data is abnormal, start the data comparison between the index pair and the source data; determine whether to perform data compensation and repair on the real-time order data according to the data comparison result.

[0080] In an exemplary embodiment, the second determination module is also used to establish a compensation task when the data comparison result indicates that the orders corresponding to the index pair and the source data are inconsistent; wherein the compensation task is used to determine the target order that is different from the index in the source data, and update the target position of the target order in the target list; obtain the task execution result of the compensation task, and update the target list based on the task execution result.

[0081] In an exemplary embodiment, the above-mentioned device also includes: an acquisition module, which is used to process the target list through the target script when the calling object initiates a target list query through the target interface, and after obtaining the target query result, obtain the order data set corresponding to the target query result; encapsulate the order data set according to the data display rules of the front-end display interface corresponding to the calling object to obtain a packaged data packet.

[0082] In the embodiments of the present application, the term "module" or "unit" refers to a computer program or a part of a computer program with a predetermined function, and works together with other related parts to achieve a predetermined goal, and can be implemented in whole or in part by using software, hardware (such as processing circuits or memories) or a combination thereof. Similarly, a processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be part of an overall module or unit that includes the function of the module or unit.

[0083] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.

[0084] An embodiment of the present application further provides a storage medium, which includes a stored program, wherein the program executes any of the above methods when it is run.

[0085] Optionally, in this embodiment, the storage medium may be configured to store program codes for executing the following steps:

[0086] S1, when receiving an interface call request sent by a calling object, determining the interface characteristics of a target interface to be called according to the interface call request;

[0087] S2, loading a target script from a preset database according to the interface feature, wherein the preset database includes a correspondence between multiple groups of historical interface features and historical scripts, and the target script contains process data of parameter processing and result processing;

[0088] S3, when the calling object initiates a query on the target list through the target interface, the target list is processed through the target script to obtain a target query result.

[0089] An embodiment of the present application further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0090] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0091] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:

[0092] S1, when receiving an interface call request sent by a calling object, determining the interface characteristics of a target interface to be called according to the interface call request;

[0093] S2, loading a target script from a preset database according to the interface feature, wherein the preset database includes a correspondence between multiple groups of historical interface features and historical scripts, and the target script contains process data of parameter processing and result processing;

[0094] S3, when the calling object initiates a query on the target list through the target interface, the target list is processed through the target script to obtain a target query result.

[0095] Optionally, in this embodiment, the above-mentioned storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store program codes.

[0096] Figure 6 The computer system structure block diagram for implementing the electronic device of the embodiment of the present application is schematically shown. It should be noted that: Figure 6 The computer system 600 of the electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application. Figure 6 As shown, the computer system 600 includes a central processing unit 601 (CPU), which can perform various appropriate actions and processes according to the program stored in the read-only memory 602 (ROM) or the program loaded from the storage part 608 to the random access memory 603 (RAM). In the random access memory 603, various programs and data required for system operation are also stored. The central processing unit 601, the read-only memory 602 and the random access memory 603 are connected to each other through a bus 604. The input / output interface 606 (I nput / Output interface, i.e., I / O interface) is also connected to the bus 604.

[0097] The following components are connected to the input / output interface 606: an input section 606 including a keyboard, a mouse, etc.; an output section 607 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 608 including a hard disk, etc.; and a communication section 609 including a network interface card such as a local area network card, a modem, etc. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the input / output interface 606 as needed. A removable medium 611, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 610 as needed so that a computer program read therefrom is installed into the storage section 608 as needed.

[0098] In particular, according to an embodiment of the present application, the process described in each method flow chart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer readable medium, and the computer program contains a program code for executing the method shown in the flow chart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 609, and / or installed from the removable medium 611. When the computer program is executed by the central processor 601, various functions defined in the system of the present application are executed.

[0099] According to another aspect of the embodiment of the present application, an electronic device for implementing the calling of the above data target is also provided. Figure 7 As shown, the electronic device includes a memory 702 and a processor 704. The memory 702 stores a computer program, and the processor 704 is configured to execute the steps in any of the above method embodiments through the computer program.

[0100] Optionally, in this embodiment, the electronic device may be located in at least one of a plurality of network devices of a computer network. A person skilled in the art may understand that Figure 7 The structure shown is for illustration only, and the electronic device may also be a device including the above-mentioned flash memory. Figure 7 The structure of the electronic device is not limited. Figure 7 More or fewer components (such as network interfaces, etc.) as shown in, or with Figure 7 Different configurations shown.

[0101] Among them, the memory 702 can be used to store software programs and modules, such as the call of the data target in the embodiment of the present application and the program instructions / modules corresponding to the device. The processor 704 executes various functional applications and data processing by running the software programs and modules stored in the memory 702, that is, realizing the call of the above-mentioned data target. The memory 702 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 702 may further include a memory remotely arranged relative to the processor 704, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof. Among them, the memory 702 can be specifically, but not limited to, used for information such as logs containing modeling data. As an example, such as Figure 7 As shown, the memory 702 may include but is not limited to the modules in the calling device of the data target. In addition, it may also include but is not limited to other module units in the calling device of the data target, which will not be described in detail in this example.

[0102] Optionally, the transmission device 707 is used to receive or send data via a network. Specific examples of the network may include wired networks and wireless networks. In one example, the transmission device 707 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices and routers via a network cable so as to communicate with the Internet or a local area network. In one example, the transmission device 707 is a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0103] In addition, the electronic device further includes: a display 708; and a connection bus 710, which is used to connect various module components in the electronic device.

[0104] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps in any one of the above method embodiments are implemented.

[0105] An embodiment of the present application further provides another computer program product, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.

[0106] The embodiments of the present application also provide a computer program, which includes computer instructions stored in a computer-readable storage medium; a processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the steps of any one of the above method embodiments.

[0107] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation modes, and this embodiment will not be described in detail here.

[0108] Optionally, the method for determining the query result is also widely used in smart home (Smart Home), smart home, smart home device ecology, smart residential (Intelligence House) ecology and other whole-house intelligent digital control application scenarios. The above network may include but is not limited to at least one of the following: wired network, wireless network. The above wired network may include but is not limited to at least one of the following: wide area network, metropolitan area network, local area network, and the above wireless network may include but is not limited to at least one of the following: WI FI (Wireless Fidelity, Wireless Fidelity), Bluetooth. The terminal device may be but is not limited to a PC, mobile phone, tablet computer, smart air conditioner, smart range hood, smart refrigerator, smart oven, smart stove, smart washing machine, smart water heater, smart washing equipment, smart dishwasher, smart projection equipment, smart TV, smart clothes drying rack, smart curtains, smart audio and video, smart sockets, smart speakers, smart speakers, smart fresh air equipment, smart kitchen and bathroom equipment, smart bathroom equipment, smart sweeping robot, smart window cleaning robot, smart mopping robot, smart air purification equipment, smart steamer, smart microwave oven, smart kitchen treasure, smart purifier, smart water dispenser, smart door locks, etc.

[0109] Obviously, those skilled in the art should understand that the above modules or steps of the present application can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, and optionally, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order from that herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.

[0110] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A method for determining a query result, characterized in that: include: In the case of receiving an interface call request sent by a calling object, determining the interface characteristics of the target interface to be called according to the interface call request; Loading a target script from a preset database according to the interface features, wherein the preset database includes a correspondence between multiple groups of historical interface features and historical scripts, and the target script contains process data of parameter processing and result processing; When the calling object initiates a query on the target list through the target interface, the target list is processed through the target script to obtain a target query result.

2. The method for determining the query result according to claim 1, characterized in that: The target list is processed by the target script to obtain a target query result, including: Identify the search condition corresponding to the target list through the target script; Using the search condition, searching for multiple order primary keys from an index database associated with the target interface; Sending the multiple order primary keys to a source database to obtain detailed data; The target query result is determined according to the acquisition result of the detailed data.

3. The method for determining a query result according to claim 1, characterized in that: Loading a target script from a preset database according to the interface characteristics includes: Get the preset script template instance corresponding to the current target data interface; Construct an executable script using the preset script template instance and the interface features; The operating parameters are configured in the configuration file associated with the executable script to generate a target script, wherein the operating parameters include: source data information and a storage directory of the script.

4. The method for determining a query result according to claim 1, characterized in that: Before the target list is processed by the target script to obtain the target query result, the method further includes: By running a monitoring function, the source data of the target list is monitored in real time to obtain real-time order data; Performing data cleaning on the real-time order data to obtain an index pair stored in an index database, wherein the index pair includes at least the following fields: a first field corresponding to a search condition, a second field corresponding to an order status, a third field corresponding to an order payment status, a fourth field for assisting fuzzy search, and a fifth field corresponding to an extended business; In the case where the real-time order data is stored in a source database, a target list is generated according to the association relationship between the index pair and the data in the source database.

5. The method for determining the query result according to claim 4, characterized in that: After real-time monitoring of the source data of the target list by running the monitoring function and obtaining the real-time order data, the method further includes: Determining the operating status of the monitoring function in different time periods; When the operation status indicates that there is a monitoring deficiency in the real-time monitoring and / or an abnormality occurs in the synchronization of the real-time order data, starting a data comparison between the index pair and the source data; Determine whether to perform data compensation and repair on the real-time order data based on the data comparison result.

6. The method for determining the query result according to claim 5, characterized in that: Determining whether to perform data compensation and repair on the real-time order data according to the data comparison result includes: In the case where the data comparison result indicates that the orders corresponding to the index pair and the source data are inconsistent, a compensation task is established; wherein the compensation task is used to determine the target order that is different from the index in the source data, and update the target position of the target order in the target list; The task execution result of the compensation task is obtained, and the target list is updated based on the task execution result.

7. The method for determining a query result according to claim 1, characterized in that: In the case where the calling object initiates a query on the target list through the target interface, after the target list is processed by the target script to obtain a target query result, the method further includes: Obtaining an order data set corresponding to the target query result; The order data set is encapsulated according to the data display rule of the front-end display interface corresponding to the calling object to obtain an encapsulated data packet.

8. A device for determining a query result, characterized in that: include: A first determining module is used to determine the interface characteristics of the target interface to be called according to the interface calling request when receiving the interface calling request sent by the calling object; A loading module, used to load a target script from a preset database according to the interface features, wherein the preset database includes a correspondence between multiple groups of historical interface features and historical scripts, and the target script contains process data of parameter processing and result processing; The processing module is used for processing the target list through the target script to obtain the target query result when the calling object initiates a query on the target list through the target interface.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein the program executes the method described in any one of claims 1 to 7 when executed.

10. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to execute the method according to any one of claims 1 to 7 through the computer program.