List query method, terminal device, and storage medium
By obtaining and using the configuration template file set to generate inventory query statements, the problems of low efficiency of inventory query and complex development in the existing technology are solved, and the fast and accurate inventory query function is realized, which reduces the error rate and data dependence during the development process. sex.
Patent Information
- Application Number
- PCT/CN2024/093439
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-06-30
- Filing Date
- 2024-05-15
- Publication Date
- 2025-01-02
AI Technical Summary
When the complexity of the inventory business increases, the query efficiency is low, and the development process is lengthy and cumbersome, prone to errors, and has strong dependence. It requires manual update of the query result code to meet the needs.
By obtaining the configuration template file set, including data storage template files, query condition configuration template files and query result configuration template files, generate list query statements and query in the preset database, it avoids hard-coded methods and reduces the program development process and An error occurred during list query.
It realizes a fast inventory query function without updating the query result code, reduces data dependence, improves query efficiency and accuracy, and simplifies the program development process.
Smart Images

Figure CN2024093439_02012025_PF_FP_ABST
Abstract
Description
Inventory query method, terminal device and storage medium
[0001] Cross-references to related publications
[0002] This disclosure is based on Chinese Patent Publication No. 202310809673.0, filed on June 30, 2023, entitled “Inventory Query Method, Terminal Device and Storage Medium”, and claims the priority of the patent disclosure, and all the contents disclosed therein are incorporated into this disclosure by reference. Technical Field
[0003] The present disclosure relates to the field of communication technology, and in particular to a list query method, terminal equipment, and storage medium. Background Art
[0004] Customer data query is a service provided by telecommunications operators to their users. Users can query detailed information about their service usage and the resulting charges through self-service printing, online business halls, and wireless application protocol (WAP), thereby generating a detailed customer data record (CDR). Customer data query can be a significant convenience for users. However, in existing customer data query systems, as the complexity of the service increases, the query result code must also be updated synchronously with the changes in the service, resulting in low customer data query efficiency.
[0005] Summary of the Invention
[0006] The embodiments of the present disclosure provide a list query method, a terminal device, and a storage medium, aiming to solve the problem of low efficiency of current list queries.
[0007] In a first aspect, an embodiment of the present disclosure provides an inventory query method, comprising: obtaining a configuration template file set, wherein the configuration file set includes a data storage template file, a query condition configuration template file, and a query result configuration template file; obtaining an inventory data set, and based on the data storage template file, storing the inventory data set to a preset database; generating an inventory query statement based on the query condition configuration template file and input query characters; performing an inventory query in the preset database based on the inventory query statement to obtain an inventory query result; and outputting the inventory query result based on the query result configuration template file.
[0008] In a second aspect, an embodiment of the present disclosure further provides a terminal device, comprising a processor, a memory, a computer program stored on the memory and executable by the processor, and a data bus configured to implement connection and communication between the processor and the memory, wherein when the computer program is executed by the processor, any inventory query method provided in the embodiments of the present disclosure is implemented.
[0009] In a third aspect, an embodiment of the present disclosure further provides a storage medium, which is configured as a computer-readable storage, and is characterized in that the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement any inventory query method provided in the embodiment of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] FIG1 is a schematic diagram of a flowchart of a list query method provided by an embodiment of the present disclosure;
[0011] FIG2 is a schematic flow chart of the sub-steps of the inventory query method in FIG1 ;
[0012] FIG3 is a schematic diagram of an interface of a configuration file generator provided by an embodiment of the present disclosure;
[0013] FIG4 is another schematic diagram of an interface of a configuration file generator provided by an embodiment of the present disclosure;
[0014] FIG5 is another schematic diagram of an interface of a configuration file generator provided by an embodiment of the present disclosure;
[0015] FIG6 is another schematic diagram of an interface of a configuration file generator provided by an embodiment of the present disclosure;
[0016] FIG7 is a schematic diagram of a scenario for implementing the inventory query method provided by an embodiment of the present disclosure;
[0017] FIG8 is a schematic block diagram of the structure of a terminal device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0018] The following will clearly and completely describe the technical solutions in the embodiments of the present disclosure in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present disclosure, not all of them. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present disclosure without making any creative efforts shall fall within the scope of protection of the present disclosure.
[0019] The flowcharts shown in the accompanying drawings are for illustrative purposes only and do not necessarily include all contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may be decomposed, combined, or partially merged, so the actual execution order may vary depending on the actual situation.
[0020] It should be understood that the terms used in this disclosure are only for the purpose of describing particular embodiments and are not intended to limit the disclosure. As used in this disclosure and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms unless the context clearly indicates otherwise.
[0021] The traditional inventory query system mainly includes the following two aspects of the development process: First, the inventory storage part: the new inventory is hard-coded and stored in the data storage according to the requirements. If the old inventory changes, the inventory processing program must also change. At the same time, an upgrade script must be provided for compatibility processing. Second, the inventory display part according to the conditional query: 1) Customize the hard-coded development interface UI according to the requirements: constraint judgment of the query conditions, and enter the query business logic layer after legality. 2) The process of customizing and organizing the logical relationship of the query conditions in the business logic layer: customize the query condition fields and query logic. It is okay to develop with fewer conditions and low logic complexity. If the complexity of the inventory business increases, the logic of the query conditions will also become complex, the amount of development coding will increase, and system maintenance will also change with the changes in the demand data. It is highly dependent and prone to errors. 3) The development process of obtaining query results based on query conditions: if the query results change, the query result code must also change.
[0022] As can be seen, the development process of traditional inventory query systems is lengthy and cumbersome. Changes to inventory operations require code changes to meet inventory query requirements, resulting in low inventory query efficiency. Furthermore, the need for manual code changes makes the development process prone to errors, resulting in a high dependency on data and inconvenience for users.
[0023] Based on this, embodiments of the present disclosure provide a list query method, terminal device, and storage medium. The list query method can be applied to terminal devices, such as mobile phones, tablet computers, laptop computers, desktop computers, personal digital assistants, and wearable devices. The list query method provided by the present disclosure enables rapid implementation of list query functionality without requiring update of query result codes, avoiding data-intensive hard-coding methods and reducing errors during program development and list query processes.
[0024] The following describes some embodiments of the present disclosure in detail with reference to the accompanying drawings. In the absence of conflict, the following embodiments and features therein may be combined with each other.
[0025] Please refer to FIG. 1 , which is a schematic flow chart of steps of a list query method provided by an embodiment of the present disclosure.
[0026] As shown in FIG1 , the inventory query method includes steps S101 to S104 .
[0027] Step S101: Acquire a configuration template file set, wherein the configuration file set includes a data storage template file, a query condition configuration template file, and a query result configuration template file.
[0028] The configuration template file set can be used to generate a list query system with list data query capabilities. The data storage template file is used to store a list data set, which can include multiple list data items, such as call record data and work order data. The query condition configuration template file is used to generate a list query statement, which can be used to retrieve list data from a preset database. The query result configuration template file is used to output the list query results, which can be obtained using the list query statement and output to the list query interface.
[0029] In one embodiment, a user-friendly configuration file generator includes multiple configuration items. Based on these configuration items, a data storage template file, a query condition configuration template file, and a query result configuration template file can be quickly configured, thereby obtaining a configuration template file set. The configured configuration items can be saved to different configuration files. During program development, query results can be quickly adjusted based on business needs, thereby achieving configurability and query flexibility.
[0030] In one embodiment, as shown in FIG2 , step S101 includes: sub-steps S1011 to S1014 .
[0031] Sub-step S1011: Acquire multiple target configuration files, where the target configuration files include a data source configuration file, a data template configuration file, a query condition configuration file, and a query result configuration file.
[0032] Among them, the data source configuration file includes the database type of the preset database, the index identifier for storing the inventory data in the inventory data set, and the field type in the inventory data. The preset database includes but is not limited to supporting relational databases and document databases. Supported relational databases include IQ, Postgres, MySQL, Sybase, etc., and document databases include elastisearch. The index identifier of the inventory data can be the prefix name of the data table or index used to store the inventory data in the preset database. After the configuration is completed, it will be stored in the data source configuration file. Each inventory data generally corresponds to an index identifier. The field type in the inventory data can be the specific meaning of the field in the inventory data, and the field type is, for example, the caller and called party in the call record data.
[0033] For example, as shown in Figure 3, a data source configuration file is generated based on the data source configuration interface. The data source configuration interface includes multiple configuration items, such as the database type, data source name, and resource prefix, as shown in Figure 3. The database type can also be referred to as the database type of the preset database, the data source name can also be referred to as the index identifier for storing inventory data in the inventory dataset, and the resource prefix can also be referred to as the field type in the inventory data.
[0034] In one embodiment, the data template configuration file includes multiple field identifiers of the inventory data, and the field identifiers include field name, field type, field length, field description, type identifier, index field, query result field, and aggregate field. The field name can be an English field configured in the data source to store the inventory. The field name is the only field in the inventory data and cannot be repeated. The field type can be automatically provided based on the database type of the preset database. For example, based on the database type of the preset database, a suitable field type can be configured for the inventory data. Field length, index field, result field, and aggregate field can all be used as query conditions. The field description can be used as a query result.
[0035] For example, as shown in FIG4 , a data template configuration file is generated based on a data template configuration interface. The data template configuration interface includes multiple configuration items, such as field name, field type, field length, index field, whether it is an index field, whether it is a result field, whether it can be aggregated, field description, and other attribute configurations as shown in FIG4 .
[0036] In one embodiment, a query condition configuration file includes query fields, query logic, control categories, and control locations for querying inventory data. Query fields, serving as query conditions, can be freely selected. Query logic includes, but is not limited to, AND, OR, NOT, and other custom logical expressions. Control categories are used to configure controls such as text boxes, drop-down boxes, and date types within the inventory query interface. Control locations are used to set the query condition's position within the inventory query interface.
[0037] For example, as shown in Figure 5, the query condition configuration file is generated based on the query condition configuration interface. The query condition configuration interface includes multiple configuration items, such as the query field, logic type, control category, and control position shown in Figure 5. The logic type can also be called query logic.
[0038] In one embodiment, a query result configuration file includes a result field, an escape field, a display field, and a field display location for outputting list data. The result field is used to filter the result fields in the data template configuration file. The escape field indicates whether the field result value should be escaped. The display field indicates whether the field result value should be displayed as a query result on the list query interface. The field display location is used to set the location on the list query interface where the list query result is displayed.
[0039] For example, as shown in Figure 6, the query result configuration file is generated based on the data source configuration interface. The query result configuration interface includes multiple configuration items, such as the result field, whether to escape, whether to display, and the field display position, as shown in Figure 6. Whether to escape can also be understood as escaping the field, whether to display can also be understood as displaying the field, and the result position can also be referred to as the field display position.
[0040] In one embodiment, multiple target configuration files are generated based on multiple inventory data in an inventory dataset. It should be noted that the target configuration files can be automatically generated based on the multiple inventory data, and the generated target configuration files can be different for inventory datasets of different business types. In some examples, the multiple target configuration files can also be configured by the user based on the multiple inventory data in the inventory dataset, which is not specifically limited in the present embodiment.
[0041] Sub-step S1012: Generate a data storage template file for storing the inventory data set according to the data source configuration file and the data template configuration file.
[0042] It should be noted that the data storage template file may be generated based on the data source configuration file and the data template configuration file. For example, the data source configuration file and the data template configuration file may be merged to obtain a data storage template file for storing the inventory dataset.
[0043] Sub-step S1013: Generate a query condition configuration template file for generating a list query statement according to the data template configuration file and the query condition configuration file.
[0044] It should be noted that the query condition configuration file can be quickly generated based on the data template configuration file and the query condition configuration file. For example, the data template configuration file and the query condition configuration file are merged to obtain a query condition configuration template file for generating a list query statement.
[0045] Sub-step S1014: Generate a query result configuration template file for outputting the list query result according to the data template configuration file and the query result configuration file.
[0046] It should be noted that the query result configuration template file can be generated based on the data template configuration file and the query result configuration file. For example, the data template configuration file and the query result configuration file are merged to obtain the query result configuration template file for outputting the list query result.
[0047] In one embodiment, the configuration template file set can be generated by an interface-based configuration file generator, and the configuration file generator can be low-code, so that the generation of the configuration template file set can be completed quickly, and in scenarios such as adding a new inventory business, the development of the inventory query system can be completed quickly, thereby quickly realizing the inventory query function.
[0048] Exemplarily, the interface of the configuration file generator is shown in Figures 3 to 6. Through the configuration file generator shown in Figures 3 to 6, the data source configuration file, data template configuration file, query condition configuration file, and query result configuration file can be quickly configured, and the data storage template file, query condition configuration template file, and query result configuration template file can be generated, thereby quickly realizing the inventory query function.
[0049] Step S102: Acquire an inventory data set, and store the inventory data set in a preset database based on a data storage template file.
[0050] The inventory data set includes multiple inventory data, including call record data, work order data, and other business types. Based on the data storage template file, the inventory data set can be accurately stored in the preset database, thus avoiding slow or unavailable queries due to data storage capacity or other issues, and facilitating rapid query of inventory data.
[0051] In one embodiment, based on the data storage template file, the inventory data set is stored in a preset database, including: based on the data template configuration file, filtering multiple inventory data in the inventory data set to obtain multiple first inventory data; based on the data source configuration file, performing data conversion on the multiple first inventory data to obtain multiple second inventory data; and storing the multiple second inventory data in the preset database.
[0052] It should be noted that the basis for filtering the multiple list data can be pre-set field data, or of course other filtering methods. The data storage template file includes a data source configuration file, which can include data types of a preset database. Therefore, based on the data types of the preset database in the data source configuration file, data conversion can be performed on the multiple first list data, converting the text data into the data types of the preset database, thereby improving the storage reliability and query reliability of the list data.
[0053] Step S103: Generate a list query statement based on the query condition configuration template file and the input query characters.
[0054] It should be noted that the query string can be input by the user through the inventory query interface or by other means, such as being sent by a server or electronic device. The query condition configuration template file includes a data template configuration file and a query condition configuration file. Based on the data template configuration file, the query condition configuration file, and the query string, an inventory query statement that matches a preset database can be conveniently generated.
[0055] In one embodiment, a list query interface is generated based on a query condition configuration template file; corresponding query characters are obtained in response to input operations on the list query interface; and a list query statement is generated based on the query condition configuration template file and the query characters. It should be noted that the list query interface can be displayed on a display screen of a terminal device, and corresponding query characters can be obtained through user input operations on the list query interface, and a list query statement for a preset database can be quickly generated based on the corresponding query characters.
[0056] It should be noted that both the inventory query interface and the inventory query statement can be generated based on the query condition configuration template file. The query condition configuration template file can include a data template configuration file and a query condition configuration file. The data template configuration file can include multiple field identifiers of the inventory data. The field identifier includes the field name, field type, field length, field description, type identifier, index field, query result field, and aggregation field. The query condition configuration file can include the query field, query logic, control category, and control position for querying the inventory data.
[0057] Exemplarily, based on the query condition configuration template file and the query characters, a list query statement is generated, including: based on the data template configuration file, determining the target field identifier that matches the query characters; based on the query condition configuration file, generating the constraint logical relationship of the target field identifier; based on the constraint logical relationship of the target field identifier, generating a list query statement.
[0058] It should be noted that the data template configuration file can quickly determine the target field identifier that matches the query character. Through the query field and query logic lighting data in the query condition configuration file, the constraint logical relationship of the target field identifier can be accurately generated, thereby meeting the diverse flexibility of the query conditions.
[0059] It should be noted that the list query statement may be matched with a preset database. For example, if the preset database is a MySQL database, the list query statement generated according to the constraint logic relationship identified by the target field may be a SQL query statement.
[0060] Step S104: perform a list query in a preset database based on the list query statement to obtain a list query result.
[0061] It should be noted that the list query statement may include a target field identifier and a constraint logic relationship of the target field identifier. According to the list query statement, a list query can be accurately and quickly performed in a preset database to obtain a list query result.
[0062] Step S105: Configure the template file based on the query result and output the list query result.
[0063] After obtaining the inventory query results, you can output the inventory query results based on the query result configuration template file. The query result configuration template file can include a data template configuration file and a query result configuration file. The data template configuration file includes multiple field identifiers for the inventory data, including field name, field type, field length, field description, type identifier, index field, query result field, and aggregation field. The query result configuration file includes the result field, escape field, display field, and field display position for outputting the inventory data.
[0064] In one embodiment, based on a query result configuration template file, the list query results are annotated to obtain a new list query result; the new list query result is then displayed on the list query interface. The annotation method includes, but is not limited to, Spring's annotation technology. It should be noted that by annotating the list query results using information such as escape fields, display fields, and field display positions in the query result configuration template file, a new list query result can be quickly obtained. The new list query result can be displayed on the list query interface for user reference.
[0065] It should be noted that based on the configured query result configuration template file, the query configuration program of the inventory query results can be greatly optimized. By only modifying the query result configuration template file, the inventory query results can be automatically processed according to the query result configuration template file, thereby eliminating the need to update the query result code and reducing errors in the program development process and the inventory query process.
[0066] The inventory query method provided in the above embodiment obtains a configuration template file set, wherein the configuration file set includes a data storage template file, a query condition configuration template file, and a query result configuration template file; obtains an inventory data set and, based on the data storage template file, stores the inventory data set in a preset database; generates an inventory query statement based on the query condition configuration template file and input query characters; performs an inventory query in the preset database based on the inventory query statement to obtain an inventory query result; and outputs the inventory query result based on the query result configuration template file. The disclosed embodiment rapidly implements the inventory query function by setting various configuration files, eliminating the need to update the query result code, thereby reducing errors during program development and inventory query processes.
[0067] In one embodiment, please refer to FIG. 7 , which is a schematic diagram of a scenario for implementing the inventory query method provided by an embodiment of the present disclosure.
[0068] As shown in FIG. 7 , the inventory query system includes a configuration file generator 10 , a search engine processor 20 , a query condition user interface generator 30 , a query condition generator 40 , and a query result generator 50 .
[0069] The configuration file generator 10 is configured to generate four parts: a data source configuration file, a data template configuration file, a query condition configuration file, and a query result configuration file. The configuration file generator 10 is further configured to generate a data storage template file 11 based on the data source configuration file and the data template configuration file, a query condition configuration template file 12 based on the data template configuration file and the query condition configuration file, and a query result configuration template file 13 based on the data template configuration file and the query result configuration file. The search engine processor 20 is configured to obtain a list dataset and, based on the data storage template file 11, store the list dataset in a preset database 21. The query condition user interface generator 30 is configured to generate a list query interface based on the query condition configuration template file 12 and, in response to input operations on the list query interface, obtain corresponding query characters 31. The query condition generator 40 is configured to generate a list query statement based on the query condition configuration template file 12 and the query characters 31, and perform a list query in the preset database 21 based on the list query statement, obtaining list query results 41. The query result generator 50 is configured to annotate the list query results 41 based on the query result configuration template file 13 and display them on the list query interface.
[0070] It should be noted that the inventory query system disclosed herein is applicable to development environments that provide inventory data retrieval services for telecom operators. The software environment for this inventory query system requires JDK 1.8 or higher, the Spring framework dependency package, and various data store dependency packages. The Spring dependency package allows various inspectors to automatically implement the framework's foundational classes using reflection and annotations. The data store dependency package provides the necessary application programming interface (API) for querying various data stores and retrieving data results from them.
[0071] Specifically, the configuration file generator 10 can generate the data storage template file 11, the query condition configuration template file 12, and the query result configuration template file 13 using Java's reflection mechanism. The search engine processor 20, the query condition user interface generator 30, the query condition generator 40, and the query result generator 50 can also be implemented using Spring's annotation technology. By leveraging Java's reflection mechanism and Spring's annotation principles to implement a low-code framework for the inventory query system, the system can quickly implement inventory query functionality by reading configuration items from various configuration files.
[0072] The disclosed embodiments provide an inventory query method, terminal device, and storage medium. The disclosed embodiments obtain a configuration template file set, wherein the configuration file set includes a data storage template file, a query condition configuration template file, and a query result configuration template file; obtain an inventory data set and, based on the data storage template file, store the inventory data set in a preset database; generate an inventory query statement based on the query condition configuration template file and input query characters; perform an inventory query in the preset database based on the inventory query statement to obtain an inventory query result; and output the inventory query result based on the query result configuration template file. The disclosed embodiments quickly implement inventory query functionality by setting various configuration files, eliminating the need to update query result code. This can reduce errors in the program development process and the inventory query process, thereby improving the efficiency and accuracy of inventory queries.
[0073] Please refer to FIG8 , which is a schematic block diagram of the structure of a terminal device provided in an embodiment of the present disclosure.
[0074] As shown in FIG8 , a terminal device 300 includes a processor 301 and a memory 302 . The processor 301 and the memory 302 are connected via a bus 303 , such as an I 2 C (Inter-integrated Circuit) bus.
[0075] Specifically, the processor 301 is configured to provide computing and control capabilities to support the operation of the entire terminal device. The processor 301 can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor.
[0076] Specifically, the memory 302 may be a Flash chip, a read-only memory (ROM) disk, an optical disk, a USB flash drive, or a mobile hard disk.
[0077] Those skilled in the art will understand that the structure shown in Figure 8 is merely a block diagram of a partial structure related to the embodiments of the present disclosure, and does not constitute a limitation on the terminal device to which the embodiments of the present disclosure are applied. The specific terminal device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.
[0078] The processor is configured to run a computer program stored in the memory, and implement any one of the inventory query methods provided by the embodiments of the present disclosure when executing the computer program.
[0079] In one embodiment, the processor is configured to run a computer program stored in the memory, and to perform the following steps when executing the computer program:
[0080] Obtaining a configuration template file set, wherein the configuration file set includes a data storage template file, a query condition configuration template file, and a query result configuration template file;
[0081] Acquire an inventory data set, and store the inventory data set in a preset database based on the data storage template file;
[0082] Generate a list query statement based on the query condition configuration template file and the input query characters;
[0083] Performing a list query in the preset database based on the list query statement to obtain a list query result;
[0084] A template file is configured based on the query result, and the inventory query result is output.
[0085] In one embodiment, when implementing the obtaining of the configuration template file set, the processor is configured to implement:
[0086] Acquire multiple target configuration files, including a data source configuration file, a data template configuration file, a query condition configuration file, and a query result configuration file;
[0087] generating a data storage template file for storing the inventory data set according to the data source configuration file and the data template configuration file;
[0088] generating a query condition configuration template file for generating the inventory query statement according to the data template configuration file and the query condition configuration file;
[0089] A query result configuration template file for outputting the inventory query result is generated according to the data template configuration file and the query result configuration file.
[0090] In one embodiment, the data source configuration file includes a database type of the preset database, an index identifier for storing inventory data in the inventory data set, and a field type in the inventory data;
[0091] The data template configuration file includes multiple field identifiers of the inventory data, and the field identifiers include field name, field type, field length, field description, type identifier, index field, query result field, and aggregation field;
[0092] The query condition configuration file includes query fields, query logic, control categories, and control locations for querying the inventory data;
[0093] The query result configuration file includes a result field, an escape field, a display field, and a field display position for outputting the list data.
[0094] In one embodiment, the plurality of target configuration files are generated based on a plurality of inventory data in the inventory data set.
[0095] In one embodiment, when implementing the storing of the inventory data set in a preset database based on the data storage template file, the processor is configured to implement:
[0096] Based on the data template configuration file, screening multiple inventory data in the inventory data set to obtain multiple first inventory data;
[0097] Based on the data source configuration file, performing data conversion on the plurality of first inventory data to obtain a plurality of second inventory data;
[0098] The plurality of second list data are stored in a preset database.
[0099] In one embodiment, when implementing the generation of the inventory query statement based on the query condition configuration template file and the input query characters, the processor is configured to implement:
[0100] Configuring a template file based on the query conditions to generate a list query interface;
[0101] In response to an input operation on the list query interface, obtaining corresponding query characters;
[0102] A list query statement is generated based on the query condition configuration template file and the query characters.
[0103] In one embodiment, the query condition configuration template file includes a data template configuration file and a query condition configuration file;
[0104] When implementing the generation of a list query statement based on the query condition configuration template file and the query character, the processor is configured to implement:
[0105] Determining a target field identifier that matches the query character based on the data template configuration file;
[0106] Based on the query condition configuration file, generating a constraint logical relationship of the target field identifier;
[0107] The list query statement is generated according to the constraint logical relationship identified by the target field.
[0108] In one embodiment, when implementing the configuration of the template file based on the query result and outputting the inventory query result, the processor is configured to implement:
[0109] Annotate the inventory query result based on the query result configuration template file to obtain a new inventory query result;
[0110] The new list query result is displayed on the list query interface.
[0111] It should be noted that those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the terminal device described above can refer to the corresponding process in the aforementioned inventory query method embodiment, and will not be repeated here.
[0112] An embodiment of the present disclosure further provides a storage medium configured as a computer-readable storage medium, wherein the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of any inventory query method provided in the embodiment of the present disclosure.
[0113] The storage medium may be an internal storage unit of the terminal device described in the aforementioned embodiment, such as a hard disk or memory of the terminal device. The storage medium may also be an external storage device of the terminal device, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the terminal device.
[0114] It will be appreciated by those skilled in the art that all or some of the steps, systems, and functional modules / units in the methods disclosed above may be implemented as software, firmware, hardware, and appropriate combinations thereof. In hardware implementations, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or temporary medium). As is well known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable, and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium that can be configured to store the desired information and can be accessed by a computer. In addition, as is well known to those skilled in the art, communication media typically embodies computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.
[0115] The serial numbers of the embodiments of the present disclosure are for description only and do not represent the advantages or disadvantages of the embodiments. The above description is only a specific embodiment of the present disclosure, but the scope of protection of the present disclosure is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present disclosure, and these modifications or replacements should be included in the scope of protection of the present disclosure. Therefore, the scope of protection of the present disclosure should be based on the scope of protection of the claims.
Claims
1. A list query method, comprising: Obtain a configuration template file set, wherein the configuration file set includes a data storage template file, a query condition configuration template file, and a query result configuration template file; Acquire an inventory data set, and based on the data storage template file, store the inventory data set into a preset database; Generate a list query statement based on the query condition configuration template file and the input query characters; Performing a list query in the preset database based on the list query statement to obtain a list query result; A template file is configured based on the query result, and the inventory query result is output.
2. The inventory query method according to claim 1, wherein: The step of obtaining the configuration template file set includes: Acquire multiple target configuration files, wherein the target configuration files include a data source configuration file, a data template configuration file, a query condition configuration file, and a query result configuration file; Generate a data storage template file for storing the inventory data set according to the data source configuration file and the data template configuration file; Generate a query condition configuration template file for generating the inventory query statement according to the data template configuration file and the query condition configuration file; A query result configuration template file for outputting the inventory query result is generated according to the data template configuration file and the query result configuration file.
3. The inventory query method according to claim 2, wherein: The data source configuration file includes a database type of the preset database, an index identifier for storing inventory data in the inventory data set, and a field type in the inventory data; The data template configuration file includes a plurality of field identifiers of the inventory data, wherein the field identifiers include a field name, a field type, a field length, a field description, a type identifier, an index field, a query result field, and an aggregation field; The query condition configuration file includes query fields, query logic, control categories and control locations for querying the inventory data; The query result configuration file includes a result field, an escape field, a display field and a field display position for outputting the list data.
4. The inventory query method according to claim 3, wherein: The plurality of target configuration files are generated according to a plurality of inventory data in the inventory data set.
5. The inventory query method according to claim 2, wherein: The storing the inventory data set to a preset database based on the data storage template file includes: Based on the data template configuration file, screening multiple inventory data in the inventory data set to obtain multiple first inventory data; Based on the data source configuration file, performing data conversion on the plurality of first inventory data to obtain a plurality of second inventory data; The plurality of second list data are stored in a preset database.
6. The inventory query method according to any one of claims 1 to 5, wherein: The step of generating a list query statement based on the query condition configuration template file and the input query characters includes: Configure the template file based on the query conditions to generate a list query interface; In response to an input operation on the list query interface, obtaining a corresponding query character; A list query statement is generated based on the query condition configuration template file and the query characters.
7. The inventory query method according to claim 6, wherein: The query condition configuration template file includes a data template configuration file and a query condition configuration file; The step of configuring the template file based on the query condition and the query character to generate a list query statement includes: Based on the data template configuration file, determining a target field identifier that matches the query character; Based on the query condition configuration file, generating a constraint logic relationship of the target field identifier; The list query statement is generated according to the constraint logic relationship identified by the target field.
8. The inventory query method according to any one of claims 1 to 5, wherein: The configuring a template file based on the query result and outputting the inventory query result comprises: Based on the query result configuration template file, annotating the inventory query result to obtain a new inventory query result; The new list query result is displayed on the list query interface.
9. A terminal device, comprising a processor, a memory, a computer program stored in the memory and executable by the processor, and a data bus configured to implement connection and communication between the processor and the memory, wherein when the computer program is executed by the processor, the inventory query method as described in any one of claims 1 to 8 is implemented.
10. A storage medium configured as a computer-readable storage medium, wherein the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the inventory query method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Data query method and device, equipment and storage medium
CN113420044A
Data query method and device
CN113760948A
Bill generation method and device and storage medium
CN114691712A
Dynamic query method and system
CN115114321A
Data query method and system, terminal and computer readable storage medium
CN115544061A
Cited By
To-do work order optimization method and system
CN121456202A