Data query method and device, storage medium and electronic device

By parsing and transforming the access data field parameters of the data query platform, the management pressure and inefficiency caused by code rewriting in different usage scenarios are solved, and the scalability and efficiency of the data query platform are improved.

CN117668019BActive Publication Date: 2026-06-19CHINA CONSTRUCTION BANK

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHINA CONSTRUCTION BANK
Filing Date
2023-12-01
Publication Date
2026-06-19

AI Technical Summary

Technical Problem

In existing technologies, as the number of usage scenarios increases, data query platforms need to rewrite a large amount of code, resulting in high data management pressure and reduced query efficiency.

Method used

By parsing the field parameters of the accessed data, converting the field types according to the preset correspondence, binding the corresponding types in the data query platform, and sending the target data in response to the query request of the target object.

🎯Benefits of technology

It enables data interoperability and consistency across multiple business scenarios, improving the scalability and query efficiency of the data query platform.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117668019B_ABST
    Figure CN117668019B_ABST
Patent Text Reader

Abstract

This application discloses a data query method, apparatus, storage medium, and electronic device. The method includes: parsing access data obtained through a data interface to obtain field parameters of the access data, wherein the access data includes at least the currently running data of the data query platform and business data from other business systems; converting a first field type corresponding to the field parameters to a second field type according to a preset correspondence, and binding the field parameters and the second field type in the data query platform; responding to a data query request sent by a target object, and if it is determined that a third field type in the data query request matches the second field type, sending the target data corresponding to the field parameters to the target object. This technical solution addresses the problem of improving data query efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing, and more specifically, to a data query method and apparatus, a storage medium and an electronic device. Background Technology

[0002] Currently, data queries for enterprises can generally be achieved using data query platforms. To meet diverse query needs, these platforms are often integrated with different usage scenarios. For example, for news queries, the platform needs to be integrated into a news query scenario to search for fields such as title, content, tags, page views, and number of favorites. Similarly, for personnel queries, the platform needs to be integrated into a personnel query scenario to search for fields such as name, ID number, job title, phone number, and organization. Since data for different usage scenarios is managed separately, and each new usage scenario requires rewriting related development code, the increasing number of usage scenarios not only generates a large amount of code, placing significant pressure on data management, but also leads to a decrease in data query efficiency due to the surge in data volume.

[0003] Therefore, in related technologies, there is a question of how to improve data query efficiency.

[0004] No effective solution has yet been proposed for improving data query efficiency in related technologies. Summary of the Invention

[0005] This application provides a data query method and apparatus, a storage medium and an electronic device, to at least address how to improve data query efficiency.

[0006] According to one aspect of the embodiments of this application, a data query method is provided, comprising: parsing access data obtained through a data interface to obtain field parameters of the access data, wherein the access data includes at least the current running data of the data query platform and business data of other business systems; converting a first field type corresponding to the field parameters into a second field type according to a preset correspondence, and binding the field parameters and the second field type in the data query platform; and, in response to a data query request sent by a target object, sending the target data corresponding to the field parameters to the target object if it is determined that a third field type in the data query request is consistent with the second field type.

[0007] In an exemplary embodiment, before converting the first field type corresponding to the field parameter to the second field type according to the preset correspondence, the preset correspondence is determined by the following method: determining the business search scenario corresponding to the access data, setting the reverse index field preset for the business search scenario as the second field type of the field parameter; determining the field conversion relationship between the first field type and the second field type; and determining the field conversion relationship as the preset correspondence.

[0008] In an exemplary embodiment, before parsing the access data obtained through the data interface to obtain the field parameters of the access data, the method further includes: if it is determined that the access data is business data of the other business system, scanning the access data at least twice within a preset period; determining whether the access data has been updated by comparing the scan results of the at least two scans; if it is determined that the access data has been updated, parsing the newly added data in the access data to obtain the field parameters of the newly added data, and converting the field type corresponding to the field parameters of the newly added data.

[0009] In one exemplary embodiment, parsing the newly added data in the access data includes: if it is determined that the data file corresponding to the newly added data belongs to a preset data file, parsing the newly added data according to the parsing format corresponding to the preset data file to obtain the field parameters of the newly added data; and / or, if it is determined that the data file corresponding to the newly added data does not belong to a preset data file, sending the preset data file to the target object, and parsing the newly added data according to other parsing formats sent by the target object to obtain the field parameters of the newly added data.

[0010] In one exemplary embodiment, the method further includes: if it is determined that the access data has been updated, and if it is determined that the data type of the access data is full data, then a new inverted index field is generated based on the access data, and the new inverted index field is used to replace the inverted index field of the business search scenario corresponding to the access data; if it is determined that the data type of the access data is not full data, then a third field type corresponding to the field parameter of the newly added data is determined, wherein the third field type corresponds to other inverted index fields; and the inverted index field is updated by adding the other inverted index to the inverted index field.

[0011] In an exemplary embodiment, after parsing the access data obtained through the data interface to obtain the field parameters of the access data, the method further includes: performing storage verification on the field parameters; if it is determined that the field parameters pass the storage verification, storing the field parameters and the access data corresponding to the field parameters in a field storage area; and sending the target data corresponding to the field parameters to the target object includes: determining the access data corresponding to the field parameters from the field storage area, determining the access data corresponding to the field parameters as the target data, and sending the target data to the target object.

[0012] In an exemplary embodiment, storing and validating the field parameter includes: validating the field parameter using a preset validation rule when it is determined that the field name of the field parameter is consistent with a preset field name; wherein, validating the field parameter using the preset validation rule includes: determining a validation parameter corresponding to the preset field name from the preset validation rule; comparing the parameter value of the field parameter with the validation value of the validation parameter to obtain a comparison result; and determining that the field parameter passes the validation when it is determined that the comparison result indicates that the validation parameter is consistent with the field parameter.

[0013] According to another aspect of the embodiments of this application, a data query device is also provided, comprising: a data parsing module, configured to parse access data obtained through a data interface to obtain field parameters of the access data, wherein the access data includes at least the current running data of the data query platform and business data of other business systems; a type conversion module, configured to convert a first field type corresponding to the field parameters into a second field type according to a preset correspondence, and bind the field parameters and the second field type in the data query platform; and a data sending module, configured to respond to a data query request sent by a target object, and, if it is determined that a third field type in the data query request is consistent with the second field type, send the target data corresponding to the field parameters to the target object.

[0014] According to another aspect of the embodiments of this application, a computer-readable storage medium is also provided, wherein a computer program is stored in the computer-readable storage medium, and the computer program is configured to execute the above-described data query method at runtime.

[0015] According to another aspect of the embodiments of this application, an electronic device is also provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the data query method described above through the computer program.

[0016] This application allows for the parsing of data from a data interface to obtain field parameters. Based on a preset relationship, the first field type corresponding to the field parameter is converted to a second field type and then bound to a data query platform. When the third field type in the data query request sent by the target object is the same as the second field type, the target data corresponding to the field parameter is sent to the target object. This technical solution addresses the problem of improving data query efficiency, thereby achieving the effect of improving data query efficiency. Attached Figure Description

[0017] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments of this application and, together with the description thereof, serve to explain this application and do not constitute an undue limitation thereof. In the drawings:

[0018] Figure 1 This is a hardware structure block diagram of a computer terminal that executes the data query method of the embodiments of this application;

[0019] Figure 2 This is a flowchart of a data query method according to an embodiment of this application;

[0020] Figure 3 This is a schematic diagram of automated data access according to an embodiment of this application;

[0021] Figure 4 This is a schematic diagram of the dataset configuration according to an embodiment of this application;

[0022] Figure 5 This is a schematic diagram of data mapping and transformation according to an embodiment of this application;

[0023] Figure 6 This is a data flow control diagram according to an embodiment of this application;

[0024] Figure 7 This is a structural block diagram of a data query device according to an embodiment of this application. Detailed Implementation

[0025] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.

[0026] It should be noted that the terms and terms such as "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0027] The methods and embodiments provided in this application can be executed on a computer terminal or similar computing device. Taking running on a computer terminal as an example, Figure 1 This is a hardware structure block diagram of a computer terminal executing the data query method of the embodiments of this application. For example... Figure 1 As shown, a computer terminal may include one or more ( Figure 1 Only one is shown in the diagram. A processor 102 (which may include, but is not limited to, a microprocessor unit (MPU) or a programmable logic device (PLD)) and a memory 104 configured to store data are also included. In one exemplary embodiment, the computer terminal may further include a transmission device 106 configured for communication and an input / output device 108. Those skilled in the art will understand that… Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the computer terminal described above. For example, the computer terminal may also include components that are more complex than those described above. Figure 1 The more or fewer components shown, or having the same Figure 1 Equivalent functions or ratios shown Figure 1 The functions shown have more different configurations.

[0028] The memory 104 may be configured to store computer programs, such as application software programs and modules, like the computer program corresponding to the data query method in this embodiment. The processor 102 executes various functional applications and data processing by running the computer programs stored in the memory 104, thereby implementing the aforementioned method. The memory 104 may include high-speed random access memory and may also include 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 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to a computer terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0029] The transmission device 106 is configured to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider for the computer terminal. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module configured to communicate with the Internet wirelessly.

[0030] This embodiment provides a data query method. Figure 2 According to the flowchart of the data query method according to an embodiment of this application, the process includes the following steps:

[0031] Step S202: Parse the access data obtained through the data interface to obtain the field parameters of the access data, wherein the access data includes at least the current running data of the data query platform and the business data of other business systems;

[0032] Optionally, in step S202 above, for example, the access data may include streaming data of system operation and data files related to the business.

[0033] Step S204: Convert the first field type corresponding to the field parameter to the second field type according to the preset correspondence, and bind the field parameter and the second field type in the data query platform;

[0034] It should be noted that in step S204 above, the second field type is used to perform a reverse index on the field parameter.

[0035] Step S206: In response to the data query request sent by the target object, if it is determined that the type of the third field in the data query request is consistent with the type of the second field, the target data corresponding to the field parameter is sent to the target object.

[0036] In an exemplary embodiment, before performing step S204 to convert the first field type corresponding to the field parameter to the second field type according to the preset correspondence, the preset correspondence can be determined by: determining the business search scenario corresponding to the access data, setting the reverse index field preset for the business search scenario as the second field type of the field parameter; determining the field conversion relationship between the first field type and the second field type; and determining the field conversion relationship as the preset correspondence.

[0037] In an exemplary embodiment, before parsing the access data obtained through the data interface to obtain the field parameters of the access data in step S202 above, the following steps may also be performed: Step S11, if it is determined that the access data is business data of the other business system, the access data is scanned at least twice within a preset period; Step S12, if the scan results of the at least two scans are compared, it is determined whether the access data has been updated; Step S13, if it is determined that the access data has been updated, the newly added data in the access data is parsed to obtain the field parameters of the newly added data, and the field type corresponding to the field parameters of the newly added data is converted.

[0038] It should be noted that in the above embodiments, the process of converting the field type corresponding to the field parameter of the newly added data is similar to the process of converting the first field type to the second field type, and will not be repeated here.

[0039] In an exemplary embodiment, the specific implementation process of parsing the newly added data in the access data in step S13 above includes: if it is determined that the data file corresponding to the newly added data belongs to a preset data file, parsing the newly added data according to the parsing format corresponding to the preset data file to obtain the field parameters of the newly added data; and / or, if it is determined that the data file corresponding to the newly added data does not belong to a preset data file, sending the preset data file to the target object, and parsing the newly added data according to other parsing formats sent by the target object to obtain the field parameters of the newly added data.

[0040] In one exemplary embodiment, the method further includes: if it is determined that the access data has been updated, and if it is determined that the data type of the access data is full data, then a new inverted index field is generated based on the access data, and the new inverted index field is used to replace the inverted index field of the business search scenario corresponding to the access data; if it is determined that the data type of the access data is not full data, then a third field type corresponding to the field parameter of the newly added data is determined, wherein the third field type corresponds to other inverted index fields; and the inverted index field is updated by adding the other inverted index to the inverted index field.

[0041] In an exemplary embodiment, after parsing the access data obtained through the data interface in step S202 to obtain the field parameters of the access data, the method further includes the following process: performing storage verification on the field parameters; if it is determined that the field parameters pass the storage verification, storing the field parameters and the access data corresponding to the field parameters in a field storage area; sending the target data corresponding to the field parameters to the target object includes: determining the access data corresponding to the field parameters from the field storage area, determining the access data corresponding to the field parameters as the target data, and sending the target data to the target object.

[0042] In an exemplary embodiment, the above-described process of storing and validating the field parameter specifically includes: when it is determined that the field name of the field parameter is consistent with a preset field name, validating the field parameter using a preset validation rule; wherein, validating the field parameter using the preset validation rule includes: determining the validation parameter corresponding to the preset field name from the preset validation rule; comparing the parameter value of the field parameter with the validation value of the validation parameter to obtain a comparison result; and when it is determined that the comparison result indicates that the validation parameter is consistent with the field parameter, determining that the field parameter passes the validation.

[0043] Optionally, the field parameter values ​​in the above embodiments will be explained below with reference to Table 1. As shown in Table 1, the field parameter values ​​include field type, whether it is null, default value, and other values ​​that need to be validated.

[0044] Table 1

[0045] field name type Is it empty? Default value describe Field 1 int Y 0 Document Number Field 2 float Y 0.00 Document size Field 3 string N New document file name … … … … … field n word Y NULL document relative path

[0046] It should be noted that, in the above embodiments, the comparison result used to indicate that the verification parameter is consistent with the field parameter means that all parameters are consistent, and the comparison result used to indicate that the verification parameter is inconsistent with the field parameter can be understood as any one of the parameters being inconsistent.

[0047] Through the above embodiments, a data query platform supporting multiple business scenarios can be realized, solving the problems of data incompatibility and inconsistency, and improving the platform's scalability, facilitating the access of new data, and forming a sustainable development architecture.

[0048] Obviously, the embodiments described above are only some embodiments of this application, and not all embodiments. To better understand the above data query method, the process is described below with reference to embodiments, but this is not intended to limit the technical solutions of the embodiments of this application. Specifically:

[0049] In an optional embodiment, combined with Figure 3 The process of obtaining access data from the data interface is described, such as... Figure 3 As shown:

[0050] After acquiring the access data, the first step is to perform data abstraction and encapsulation configuration. This includes: parsing the access data through a data parsing layer to obtain the field parameters of the access data; and validating the field parameters of the access data through a data validation layer. Then, the access data needs to be mapped and transformed. This includes: filtering invalid and erroneous data through a data filtering layer; and after filtering, converting the field types of the field parameters through a data mapping and transformation layer to obtain index data.

[0051] In an optional embodiment, combined with Figure 4 The process of abstracting and encapsulating the above-mentioned access data configuration will be further explained, such as... Figure 4 As shown:

[0052] The accessed data includes multiple pieces of business data (such as...). Figure 4 The basic information data includes multiple business data entries that share the same fields, such as name and description fields. Based on the parsing format corresponding to the above business data, the data is parsed to obtain the field parameters and data types of the business data. For example, the name field belongs to the string data type, the number field belongs to the int data type, and the fraction field belongs to the double data type. In addition, there are business-defined data types, such as word (document) data type, txt (text) data type, and web (web page) data type.

[0053] After determining the data template for the access data, the source of the access data needs to be determined. The access data must include at least the currently running data of the data query platform (e.g., ...). Figure 4 The data shown comes from the streaming interface) and business data from other business systems (such as...). Figure 4 The business data includes data packet files, which contain full data packets (equivalent to newly added data), incremental data packets (equivalent to newly added data), and initialization data packets (equivalent to pre-set data files). Each data packet contains a distinguishing identifier, which can be used to store the data packet to the corresponding storage path.

[0054] After determining the data template and data source, the accessed data can be validated using the data template. This includes operations such as field type validation, null value validation, field default value validation, and field length validation. If the validation is passed, the accessed data will be stored in the corresponding dataset (equivalent to the field storage area).

[0055] In an optional embodiment, combined with Figure 5 The process of mapping and transforming the above-mentioned access data will be further explained, such as... Figure 5 As shown:

[0056] Figure 5 This paper provides a feasible process for generating an inverted index field (equivalent to an inverted index field) from a dataset. First, the dataset is filtered and selected based on the field values ​​or combinations of field values. Optionally, the field content of the dataset can be supplemented by operations such as default value filling, conditional field value filling, and dynamic value filling. Then, the dataset is transformed by operations such as field type conversion and field merging conversion to obtain the inverted index.

[0057] It should be noted that the inverted index fields are related to the inverted index structure. Different business scenarios correspond to different inverted index structures, so the fields involved are also different. Through the above method, the dataset can be reused. For example, the search scenarios of mobile software and web pages are different, and the dataset fields and data ranges used are also different, but the required data can be found in the information dataset.

[0058] The above embodiments allow for flexible data reuse to meet complex data usage scenarios. Furthermore, custom validation rules enable rule expansion to meet data query needs in specific scenarios.

[0059] In an optional embodiment, Figure 6 This is a data flow control diagram according to an embodiment of this application, such as... Figure 6 As shown:

[0060] Step S601: Obtain access data from the task pool, where the access data includes streaming data and data files. Streaming data (equivalent to currently running data) is stored in the streaming data task pool, and data files (equivalent to business data) are stored in the data file task pool.

[0061] It should be noted that in step S601 above, the data files are scanned by a scheduled task to scan the file directory. New files are added to the data file task pool upon discovery. For example, a regular expression scan is used to scan the configured storage path, adding processed data to the file list. A scan task is triggered periodically, and data not found in the file list is added to the task pool.

[0062] Step S602: Parse the incoming data according to the dataset template (equivalent to the parsing format);

[0063] Step S603: Perform data validation based on the dataset field configuration, such as field type validation, field default value validation, field length validation, etc.

[0064] Step S604: Filter the data in the dataset that fails the above data validation process, and keep only the data that passes the validation;

[0065] Step S605: Perform data transformation based on the field transformation relationship between the data fields (equivalent to the first field type) and the inverted index fields (equivalent to the second field type) in the dataset;

[0066] Step S606: If it is determined that the data type of the accessed data is full data, then execute steps S607 to S608; otherwise, execute step S609.

[0067] Step S607: Generate a new inverted index field;

[0068] Step S608: Replace the previous inverted index field with the new inverted index field;

[0069] Step S609: Update the data based on the original inverted index field.

[0070] Through the above embodiments, automated data access can be achieved. By configuring rules, new data can be automatically synchronized with zero-code development. This allows for flexible configuration and combination of data processing flows in different scenarios, improving data reusability and thus enhancing data query efficiency.

[0071] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods of the various embodiments of this application.

[0072] This embodiment also provides a data query device for implementing the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, hardware implementations, or a combination of software and hardware, are also possible and contemplated.

[0073] Figure 7 This is a structural block diagram of a data query device according to an embodiment of this application; as shown below. Figure 7 As shown, it includes:

[0074] The data parsing module 72 is used to parse the access data obtained through the data interface to obtain the field parameters of the access data, wherein the access data includes at least the current running data of the data query platform and the business data of other business systems;

[0075] The type conversion module 74 is used to convert the first field type corresponding to the field parameter into the second field type according to a preset correspondence, and bind the field parameter and the second field type in the data query platform;

[0076] The data sending module 76 is used to respond to a data query request sent by the target object, and if it is determined that the type of the third field in the data query request is consistent with the type of the second field, send the target data corresponding to the field parameter to the target object.

[0077] The aforementioned device parses the access data obtained through the data interface to obtain field parameters of the access data. The access data includes at least the current operating data of the data query platform and business data from other business systems. Based on a preset correspondence, the first field type corresponding to the field parameter is converted to a second field type, and the field parameter and the second field type are bound in the data query platform. In response to a data query request sent by a target object, if it is determined that the third field type in the data query request matches the second field type, the target data corresponding to the field parameter is sent to the target object. The above embodiment solves the problem of how to improve data query efficiency, thereby achieving the effect of improving data query efficiency.

[0078] In an exemplary embodiment, the type conversion module 74 is further configured to: determine the business search scenario corresponding to the access data, set the reverse index field preset for the business search scenario as the second field type of the field parameter; determine the field conversion relationship between the first field type and the second field type; and determine the field conversion relationship as the preset correspondence relationship.

[0079] In an exemplary embodiment, the data parsing module 72 is further configured to: when it is determined that the access data is business data of the other business system, perform at least two scans on the access data within a preset period; determine whether the access data has been updated by comparing the scan results of the at least two scans; when it is determined that the access data has been updated, parse the newly added data in the access data to obtain the field parameters of the newly added data, and convert the field type corresponding to the field parameters of the newly added data.

[0080] In an exemplary embodiment, the data parsing module 72 is further configured to: if it is determined that the data file corresponding to the newly added data belongs to a preset data file, parse the newly added data according to the parsing format corresponding to the preset data file to obtain the field parameters of the newly added data; and / or, if it is determined that the data file corresponding to the newly added data does not belong to a preset data file, send the preset data file to the target object, and parse the newly added data according to other parsing formats sent by the target object to obtain the field parameters of the newly added data.

[0081] In an exemplary embodiment, the data parsing module 72 is further configured to: if it is determined that the access data has been updated, and if it is determined that the data type of the access data is full data, then generate a new inverted index field based on the access data, and replace the inverted index field of the business search scenario corresponding to the access data with the new inverted index field; if it is determined that the data type of the access data is not full data, then determine the third field type corresponding to the field parameter of the newly added data, wherein the third field type corresponds to other inverted index fields; and update the inverted index field by adding the other inverted index to the inverted index field.

[0082] In an exemplary embodiment, the data parsing module 72 is further configured to: perform storage verification on the field parameter; if it is determined that the field parameter passes the storage verification, store the field parameter and the access data corresponding to the field parameter in the field storage area; the step of sending the target data corresponding to the field parameter to the target object includes: determining the access data corresponding to the field parameter from the field storage area, determining the access data corresponding to the field parameter as the target data, and sending the target data to the target object.

[0083] In an exemplary embodiment, the data parsing module 72 is further configured to: when it is determined that the field name of the field parameter is consistent with a preset field name, validate the field parameter using a preset validation rule; wherein, validating the field parameter using the preset validation rule includes: determining the validation parameter corresponding to the preset field name from the preset validation rule; comparing the parameter value of the field parameter with the validation value of the validation parameter to obtain a comparison result; and determining that the field parameter passes the validation when it is determined that the comparison result indicates that the validation parameter is consistent with the field parameter.

[0084] Embodiments of this application also provide a storage medium including a stored program, wherein the program executes any of the methods described above when it is run.

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

[0086] S1, parse the access data obtained through the data interface to obtain the field parameters of the access data, wherein the access data includes at least the current running data of the data query platform and the business data of other business systems;

[0087] S2, convert the first field type corresponding to the field parameter to the second field type according to the preset correspondence, and bind the field parameter and the second field type in the data query platform;

[0088] S3, in response to a data query request sent by the target object, if it is determined that the type of the third field in the data query request is consistent with the type of the second field, the target data corresponding to the field parameter is sent to the target object.

[0089] Embodiments of this application also provide an electronic device including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any 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 can be configured to perform the following steps via a computer program:

[0092] S1, parse the access data obtained through the data interface to obtain the field parameters of the access data, wherein the access data includes at least the current running data of the data query platform and the business data of other business systems;

[0093] S2, convert the first field type corresponding to the field parameter to the second field type according to the preset correspondence, and bind the field parameter and the second field type in the data query platform;

[0094] S3, in response to a data query request sent by the target object, if it is determined that the type of the third field in the data query request is consistent with the type of the second field, the target data corresponding to the field parameter is sent to the target object.

[0095] Optionally, in this embodiment, the storage medium may include, but is not limited to, various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0096] Optionally, specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementations, and will not be repeated here.

[0097] Obviously, those skilled in the art should understand that the modules or steps of this application described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. They can be implemented using computer-executable program code, and thus can be stored in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those presented here, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, this application is not limited to any particular combination of hardware and software.

[0098] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the principles of this application should be included within the protection scope of this application.

Claims

1. A data query method, characterized by, Applications in data query platforms include: The access data obtained through the data interface is parsed to obtain the field parameters of the access data, wherein the access data includes at least the current running data of the data query platform and the business data of other business systems; According to a preset correspondence, the first field type corresponding to the field parameter is converted to the second field type, and the field parameter and the second field type are bound in the data query platform; In response to a data query request sent by a target object, if it is determined that the type of the third field in the data query request is consistent with the type of the second field, the target data corresponding to the field parameter is sent to the target object; Before converting the first field type corresponding to the field parameter to the second field type according to the preset correspondence, the preset correspondence is determined by the following method: The business search scenario corresponding to the access data is determined, and the reverse index field preset for the business search scenario is set as the second field type of the field parameter; the field conversion relationship between the first field type and the second field type is determined; and the field conversion relationship is determined as the preset correspondence relationship.

2. The data query method of claim 1, wherein, Before parsing the access data obtained through the data interface to obtain the field parameters of the access data, the method further includes: If it is determined that the access data is business data of the other business system, the access data shall be scanned at least twice within a preset period; The access data is determined to have been updated by comparing the results of the at least two scans. If it is determined that the access data has been updated, the newly added data in the access data is parsed to obtain the field parameters of the newly added data, and the field type corresponding to the field parameters of the newly added data is converted.

3. The data query method of claim 2, wherein, Parsing the newly added data in the access data includes: If it is determined that the data file corresponding to the newly added data belongs to a preset data file, the newly added data is parsed according to the parsing format corresponding to the preset data file to obtain the field parameters of the newly added data; And / or, if it is determined that the data file corresponding to the newly added data does not belong to the preset data file, the preset data file is sent to the target object, and the newly added data is parsed according to other parsing formats sent by the target object to obtain the field parameters of the newly added data.

4. The data query method according to claim 2, characterized in that, The method further includes: If it is determined that the access data has been updated, and if the data type of the access data is determined to be full data, then a new inverted index field is generated based on the access data, and the inverted index field of the business search scenario corresponding to the access data is replaced by the new inverted index field. If it is determined that the data type of the accessed data is not the full data, then the third field type corresponding to the field parameter of the newly added data is determined, wherein the third field type corresponds to other inverted index fields; The inverted index field is updated by adding the other inverted indexes to the inverted index field.

5. The data query method of claim 1, wherein, After parsing the access data obtained through the data interface to obtain the field parameters of the access data, the method further includes: Perform storage validation on the field parameters; If the field parameter passes the storage verification, the field parameter and the access data corresponding to the field parameter are stored in the field storage area. Sending the target data corresponding to the field parameters to the target object includes: The access data corresponding to the field parameter is determined from the field storage area, the access data corresponding to the field parameter is determined as the target data, and the target data is sent to the target object.

6. The data query method of claim 5, wherein, The storage validation of the field parameters includes: If the field name of the field parameter is determined to be consistent with the preset field name, the field parameter is validated using the preset validation rules; The step of validating the field parameters using preset validation rules includes: The verification parameters corresponding to the preset field names are determined from the preset verification rules; The value of the field parameter is compared with the value of the verification parameter to obtain a comparison result; If the comparison result indicates that the verification parameter is consistent with the field parameter, then the field parameter is determined to have passed the verification.

7. A data query apparatus, characterized by comprising: include: The data parsing module is used to parse the access data obtained through the data interface to obtain the field parameters of the access data, wherein the access data includes at least the current running data of the data query platform and the business data of other business systems; The type conversion module is used to convert the first field type corresponding to the field parameter into a second field type according to a preset correspondence, and bind the field parameter and the second field type in the data query platform; The data sending module is used to respond to a data query request sent by the target object, and when it is determined that the type of the third field in the data query request is consistent with the type of the second field, send the target data corresponding to the field parameter to the target object; The aforementioned type conversion module is also used to determine the business search scenario corresponding to the access data, set the preset reverse index field for the business search scenario as the second field type of the field parameter; determine the field conversion relationship between the first field type and the second field type; and determine the field conversion relationship as the preset correspondence relationship.

8. A computer readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, wherein the program, when executed, performs the method according to any one of claims 1 to 6. 9.An electronic device comprising a memory and a processor, the electronic device characterized by, The memory stores a computer program, and the processor is configured to execute the method described in any one of claims 1 to 6 through the computer program.

Citation Information

Patent Citations

  • Data query method and device, electronic equipment and storage medium

    CN110647562A

  • Universal retrieval method and device, equipment and storage medium

    CN113742535A