A data calling method and device, computer equipment and storage medium
By acquiring the target business's requirements and configuring the data call interface, the problem of low data call efficiency in existing technologies is solved, enabling rapid generation and management of data call interfaces and improving data call efficiency.
Patent Information
- Application Number
- CN202211427153.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-14
- Publication Date
- 2026-08-25
- Estimated Expiration
- 2042-11-14
AI Technical Summary
In existing technologies, a corresponding data service API interface needs to be developed each time a different business is encountered, resulting in low data retrieval efficiency.
By obtaining the target business requirements, and based on query performance requirements and interface attribute requirements, the target database is determined from at least one type of database, the data call interface is configured, and the business data in the target database is called in response to the data query command.
It improves data retrieval efficiency, enables rapid generation and management of data retrieval interfaces, and meets the needs of different businesses.
Smart Images

Figure CN115794915B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data retrieval technology, specifically to a data retrieval method, apparatus, computer device, and storage medium. Background Technology
[0002] With the development of society, big data is being used more and more widely in business processing. When enterprises process business through application terminals, the application terminals need to obtain the big data corresponding to the business in order to process the business.
[0003] In existing technologies, it is necessary to manually store the big data corresponding to the business locally, and then manually develop a data service API interface for that business. This API is then used to call big data for business processing. However, since different businesses have different business rules, the corresponding data service interfaces for data calls also differ. Therefore, a new data service API interface needs to be developed for each different business, and the data is then called through this API. Developing a new API interface for each new business leads to significant time consumption and low efficiency in data retrieval. Summary of the Invention
[0004] This application provides a data retrieval method, apparatus, computer equipment, and storage medium that can be used in financial technology or other related fields, thereby improving data retrieval efficiency.
[0005] This application provides a data retrieval method, including:
[0006] Obtain the business data required for storage by the target business, as well as the corresponding requirements information for the target business, including query performance requirements and interface attribute requirements.
[0007] Based on the above query performance requirements and the above business data volume, a target database for storing the above business data is determined from at least one type of database, and the above business data is stored in the above target database.
[0008] Based on the above interface attribute requirements, determine the configuration information of the data call interface for calling the above business data from the above target database, and configure the data call interface for the above business data according to the above configuration information.
[0009] Obtain the data query instruction for the target business sent by the application, respond to the data query instruction by calling the data call interface to query the business data in the target database, and send the business data in the target database to the application.
[0010] Accordingly, embodiments of this application also provide a data retrieval device, including:
[0011] The data acquisition module is used to acquire the business data that the target business needs to store, as well as the requirement information corresponding to the target business. The requirement information includes query performance requirements and interface attribute requirements.
[0012] The data storage module is used to determine the target database for storing the business data from at least one type of database based on the above query performance requirements and the amount of the above business data, and to store the business data in the target database.
[0013] The interface configuration module is used to determine the configuration information of the data call interface for calling the business data from the target database based on the above interface attribute requirements, and to configure the data call interface for the business data according to the above configuration information.
[0014] The interface call module is used to obtain the data query instruction for the target business sent by the application, respond to the data query instruction by calling the data call interface to query the business data in the target database, and send the business data in the target database to the application.
[0015] Accordingly, this application also provides a computer device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor executes any of the data retrieval methods provided in this application.
[0016] Accordingly, embodiments of this application also provide a storage medium that stores multiple instructions, which are adapted for loading by a processor to execute the data retrieval method described above.
[0017] This application embodiment obtains the business data required for storage by the target business, as well as the corresponding requirement information for the target business. The requirement information includes query performance requirements and interface attribute requirements. Based on the query performance requirements and the data volume of the business data, a target database for storing the business data is determined from at least one type of database, and the business data is stored in the target database. Based on the interface attribute requirements, configuration information for a data call interface to retrieve the business data from the target database is determined, and the data call interface for the business data is configured according to the configuration information. A data query instruction for the target business sent by the application is obtained, and the data query instruction is responded to by calling the data call interface to query the business data in the target database. The business data in the target database is then sent to the application. Thus, by storing the target business data according to the requirement information of the target business and configuring the data call interface for the business data of the target business, data retrieval is achieved based on the data call interface, thereby improving data retrieval efficiency. Attached Figure Description
[0018] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0019] Figure 1 This is a flowchart illustrating a data retrieval method provided in an embodiment of this application.
[0020] Figure 2 This is a structural block diagram of a data retrieval device provided in an embodiment of this application.
[0021] Figure 3 A schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation
[0022] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0023] This application provides a data retrieval method, apparatus, storage medium, and computer device. Specifically, the data retrieval method of this application can be executed by a computer device, which can be a server or a terminal, etc. The server can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The terminal can be a smartphone, desktop computer, laptop, tablet computer, etc., but is not limited to these. The terminal and server can be directly or indirectly connected via wired or wireless communication, which is not limited herein.
[0024] For example, the computer device can be a terminal that can obtain the business data required for storage by the target business, as well as the corresponding requirement information for the target business, including query performance requirements and interface attribute requirements; based on the query performance requirements and the data volume of the business data, determine the target database for storing the business data from at least one type of database, and store the business data in the target database; based on the interface attribute requirements, determine the configuration information of the data call interface for calling the business data from the target database, and configure the data call interface for the business data according to the configuration information; obtain the data query instruction for the target business sent by the application terminal, respond to the data query instruction by calling the data call interface to query the business data in the target database, and send the business data in the target database to the application terminal.
[0025] To address the aforementioned issues, this application provides a data retrieval method, apparatus, computer device, and storage medium, which can improve data retrieval efficiency.
[0026] The following sections provide detailed descriptions of each example. It should be noted that the order in which the embodiments are described is not intended to limit the preferred order of the embodiments.
[0027] This application provides a data retrieval method, which can be executed by a terminal or a server. This application uses the execution of the data retrieval method by a terminal as an example for illustration. For example, the terminal can be an application.
[0028] Please see Figure 1 , Figure 1 This is a flowchart illustrating a data retrieval method provided in an embodiment of this application. The specific flow of this data retrieval method can be as follows:
[0029] 101. Obtain the business data required for storage by the target business, as well as the corresponding requirement information for the target business. The requirement information includes query performance requirements and interface attribute requirements.
[0030] The aforementioned target business refers to the business that the application needs to process. Since the application needs to obtain the big data required to process different businesses, for example, if the current target business is to mine a specific type of potential customer, then it is necessary to obtain the corresponding big data based on that specific type so as to process the target business based on the big data corresponding to that specific type.
[0031] Understandably, when an application needs to obtain business data corresponding to a target business for business processing, it must first store the business data corresponding to the target business in the database so that the application can directly query the corresponding data from the database when needed. Therefore, when the application obtains the target business that needs to be processed, it needs to obtain the business data that needs to be stored in the big data database so that when the application needs to process the target business, it can obtain the corresponding data in a timely manner so as to process the target business in a timely manner.
[0032] Specifically, the application can use a pre-defined big data storage service to store the business data corresponding to the target business in a database that can be queried by the application. This big data storage service is integrated with the data service of the big data source.
[0033] The requirement information corresponding to the target business mentioned above is the requirement information that the application needs to process the target business. For example, the business data corresponding to the target business can be stored based on the requirement information of the target business, or a data call interface that can retrieve the business data of the target business can be created based on the requirement information of the target business, or the target business can be processed based on the requirement information of the target business, without any limitation.
[0034] In this embodiment, when the application determines the target service to be processed, it obtains the business data required for the target service to be stored. This allows the application to obtain the relevant data in a timely manner when it needs to process the target service, enabling it to process the target service quickly. Correspondingly, to process the business data more accurately in a way that meets the business requirements of the target service, the application also needs to obtain the corresponding requirement information when it determines the target service. This allows the application to process the target service based on the required information.
[0035] Among the above requirements is the query performance requirement, which is used to indicate the performance when querying the business data corresponding to the target business during the processing of the target business.
[0036] Specifically, different database configurations result in different efficiencies in querying data from the database, which in turn leads to different performance levels in business processing. Therefore, performance can be categorized based on the database that interfaces with the application. If there are only two databases, their respective performance levels can be determined based on their configurations, such as high performance and low performance.
[0037] For example, the two databases mentioned above are Elasticsearch (ES) and Database (DB). Since ES supports configuring cluster names and index names, and DB supports configuring database names and table names, ES has relatively higher performance.
[0038] Among the above requirements is the interface attribute requirement, which indicates the performance requirements of the interface to be called when querying the business data corresponding to the target business during the processing of the target business.
[0039] In some embodiments, obtaining the business data required for the target business may include: obtaining the database name of the large database containing the business data required for the target business, and the table name of the data table in the large database; and obtaining the business data from the data table in the large database using a data processing engine based on the database name and the table name. The database name and table name can be configured on the application side when the target business is determined.
[0040] 102. Based on the above query performance requirements and the amount of the above business data, determine the target database for storing the above business data from at least one type of database, and store the above business data in the target database.
[0041] In this embodiment, based on the query performance requirements corresponding to the target business, the application can obtain the performance required to query the business data corresponding to the target business during the processing of the target business. Based on this performance, a corresponding database can be selected. Furthermore, the application also considers the data volume of the business data to determine the target database for storing the business data based on the configuration of at least one type of database. The business data is then stored in the target database. This process determines the target database for storing the business data of the target business based on different business scenarios and performance requirements. This allows the application to obtain the relevant data promptly when processing the target business, enabling rapid processing. The application can store the obtained business data in the target database through a data processing engine.
[0042] For example, suppose there are two different types of databases, namely ES database and DB database. Given the above query performance requirements and the above business data volume, it is determined that the application needs to store the target business data in the database with higher performance. Since ES database has higher performance than DB database, the target database is ES database.
[0043] In some embodiments, the application can obtain the data location of business data in the big data database, that is, the database name and table name of the big data database, so as to store the business data accordingly based on the database name of the big data database used when obtaining the business data and the table name of the data table in the big data database, so that the corresponding business data can be quickly found when needed.
[0044] Specifically, storing the aforementioned business data in the aforementioned target database may include: configuring a target storage space in the aforementioned target database according to the aforementioned database name and the aforementioned table name, and storing the aforementioned business data in the target storage space of the aforementioned target database.
[0045] The library name and the table name can be used as the space name of the target storage space, so that the spatial location of the target storage space can be determined based on the library name and the table name.
[0046] 103. Based on the above interface attribute requirements, determine the configuration information of the data call interface for calling the above business data from the above target database, and configure the data call interface for the above business data according to the above configuration information.
[0047] The configuration information mentioned above includes, but is not limited to, interface parameters, interface type, interface number, and data encryption requirements.
[0048] Understandably, in order to configure data call interfaces for data services that meet different business scenarios or business needs, the application can determine the performance requirements of the interfaces to be called when querying business data corresponding to the target business during the processing of the target business, based on the interface attribute requirements corresponding to the target business. Based on these performance requirements, the configuration information of the data call interfaces for the aforementioned business data can be determined, and the configuration of the data call interfaces for the business data can be configured based on this configuration information, thereby realizing the management of the configuration of the data call interfaces.
[0049] The application can modify the configuration information of the historical data call interface based on the configuration information of the current business data call interface to obtain the data call interface for the current business data. The application can also create a new data call interface for the current business data based on the configuration information of the current business data call interface, thus achieving rapid generation of data call interfaces.
[0050] In this embodiment, the application can use the preset interface management and interface generation functions to call the interface management and interface generation functions, determine the corresponding configuration information based on the interface attribute requirements, and manage and generate the data call interface for business data according to the corresponding configuration information.
[0051] For example, the interface attribute requirements mentioned above include table fields for business data. The configuration information for determining the data call interface for calling the business data from the target database based on the interface attribute requirements may include: determining the interface parameters of the data call interface based on the table fields of the business data, wherein the interface parameters include input parameters and output parameters, and determining the interface parameters as the configuration information for the data call interface for the business data.
[0052] In some embodiments, the configuration information for determining the data call interface for calling the business data from the target database based on the interface attribute requirements may include: determining the interface type supported by the application end that processes the target business based on the interface attribute requirements; and configuring the interface type as the configuration information for the data call interface for the business data so that the data call interface can send data to the application end that processes the target business.
[0053] The interface types mentioned above include, but are not limited to, HTTP, RESTful, and ESA types.
[0054] In some embodiments, the interface attribute requirements include data association requirements. These data association requirements indicate the association between the data call interface and the business data. The configuration information for determining the data call interface for calling the business data from the target database based on these interface attribute requirements may include: generating an interface number based on the business data according to the data association requirements, and determining the interface number as the configuration information for the data call interface of the business data, so that the data call interface corresponding to the interface number can be accurately identified. The interface number serves as a unique identifier for the data call interface, indicating the data call interface.
[0055] Specifically, if the above data has a high correlation, for example, if the data correlation is greater than a preset correlation threshold, the application can generate the corresponding interface number based on the business data.
[0056] In some embodiments, the interface attribute requirements include data encryption requirements, which are used to indicate the encryption requirements of the business data. The configuration information for determining the data call interface for calling the business data from the target database based on the interface attribute requirements may include: determining the data encryption requirements as the configuration information for the data call interface for the business data, so that when the data encryption requirements are high, for example, when the requirement value corresponding to the data encryption requirements is greater than a preset requirement threshold, the data call interface can encrypt the queried business data and generate a corresponding encryption ID when it finds the corresponding business data.
[0057] In some embodiments, the application can pre-set some interface configuration templates so that when a data call interface for creating new business data needs to be created, the speed of creating the interface can be improved by using the interface configuration template.
[0058] Specifically, configuring the data call interface for the business data based on the above configuration information may include: obtaining the interface configuration template corresponding to the data call interface from a preset template set based on the interface type of the data call interface for the business data; modifying the template information in the interface configuration template according to the above configuration information, thereby realizing the rapid generation of the data call interface.
[0059] In some embodiments, a corresponding interface list can also be set in the application, that is, all data call interfaces generated by the application are recorded in the interface list. When needed, the application can query a data call interface corresponding to a certain business through the interface list, and modify the interface configuration template based on the configuration information of the queried data call interface. This ensures that the template information in the interface configuration template corresponding to the data call interface for generating business data of the current target business is less different from the actual interface configuration information of the application, thereby enabling the rapid configuration of the data call interface for the business data of the target business.
[0060] Specifically, before modifying the template information in the interface configuration template according to the above configuration information, the application may further include: determining the historical data call interface of the historical business that is consistent with the above business type from the preset interface list according to the business type of the above target business, and obtaining the historical configuration information of the historical data call interface of the historical business that is consistent with the above business type, so as to modify the template information in the interface configuration template according to the above historical configuration information.
[0061] When there are at least two historical data call interfaces for historical services that are consistent with the above-mentioned business types, the target configuration information for modifying the template information in the interface configuration template can be determined by selecting the mode of the historical configuration information of the historical data call interfaces of the at least two historical services that are consistent with the above-mentioned business types. For example, if there are three historical configuration information for historical data call interfaces, and two of them have an interface type of HTTP and the other has an interface type of RESTful, then the interface type in the target configuration information is determined to be HTTP.
[0062] In some embodiments, a corresponding interface list can be set in the application, where all data call interfaces generated by the application are recorded. This allows for the retrieval of a specific data call interface for a particular business function when needed, and the modification of the configuration information of the retrieved interface. The modified interface can then be applied to new business functions, thus achieving unified management of the data call interfaces. Furthermore, the application can download the interface documentation for any data call interface in the interface list.
[0063] Specifically, the data call interface configured according to the above configuration information may include: the application end determines the historical data call interface of the historical business that is consistent with the above business type from a preset interface list according to the business type of the above target business, and obtains the historical configuration information of the historical data call interface of the historical business that is consistent with the above business type, so as to modify the above historical configuration information according to the above configuration information, thereby realizing the rapid generation of the data call interface.
[0064] 104. Obtain the data query instruction for the target business sent by the application, respond to the data query instruction by calling the data call interface to query the business data in the target database, and send the business data in the target database to the application.
[0065] The aforementioned data query command is used to query the business data corresponding to the target business and send the business data corresponding to the target business to the application that issued the data query command.
[0066] In this embodiment, the application can pre-set a data query service to respond to data query commands. This service calls the corresponding data call interface, and the data is transmitted based on the input and output parameters of the data call interface, ensuring that business data conforming to a specific format is sent to the application. The application can invoke the data call interface based on its corresponding interface address.
[0067] In some embodiments, when the aforementioned business data is stored in the target storage space of the target database, the aforementioned data query instruction includes the location information of the target storage space. The aforementioned method of responding to the aforementioned data query instruction by calling the aforementioned data call interface to query the business data in the aforementioned target database may include: responding to the aforementioned data query instruction by inputting the aforementioned location information to the aforementioned data call interface, so as to call the aforementioned data call interface to query the business data in the target storage space of the aforementioned target database based on the aforementioned location information.
[0068] This application discloses a data retrieval method, which includes: obtaining business data to be stored for a target business, and corresponding requirement information for the target business, wherein the requirement information includes query performance requirements and interface attribute requirements; determining a target database for storing the business data from at least one type of database based on the query performance requirements and the data volume of the business data, and storing the business data in the target database; determining configuration information for a data retrieval interface for retrieving the business data from the target database based on the interface attribute requirements, and configuring the data retrieval interface for the business data according to the configuration information; obtaining a data query instruction for the target business sent by an application, responding to the data query instruction by calling the data retrieval interface to query the business data in the target database, and sending the business data in the target database to the application, thereby improving data retrieval efficiency.
[0069] To facilitate better implementation of the data retrieval method provided in the embodiments of this application, the embodiments of this application also provide a data retrieval device based on the above-described data retrieval method. The meanings of the terms used are the same as in the data retrieval method described above, and specific implementation details can be found in the descriptions within the method embodiments.
[0070] Please see Figure 2 , Figure 2 A structural block diagram of a data retrieval device provided in this application embodiment, the device comprising:
[0071] The data acquisition module 201 is used to acquire the business data that the target business needs to store, as well as the requirement information corresponding to the target business. The requirement information includes query performance requirements and interface attribute requirements.
[0072] Data storage module 202 is used to determine the target database for storing the business data from at least one type of database based on the above query performance requirements and the amount of business data, and to store the business data in the target database.
[0073] The interface configuration module 203 is used to determine the configuration information of the data call interface for calling the business data from the target database based on the above interface attribute requirements, and to configure the data call interface for the business data according to the above configuration information.
[0074] The interface call module 204 is used to obtain the data query instruction of the target business sent by the application, respond to the data query instruction by calling the data call interface to query the business data in the target database, and send the business data in the target database to the application.
[0075] In some embodiments, the data acquisition module 201 includes:
[0076] The name acquisition unit is used to acquire the database name of the large database where the business data required for the target business is stored, as well as the table name of the data table in the aforementioned large database;
[0077] The data acquisition unit is used to retrieve the aforementioned business data from the data tables of the aforementioned large database using the data processing engine, based on the aforementioned database name and table name.
[0078] In some embodiments, the data storage module 202 includes:
[0079] The space configuration unit is used to configure a target storage space in the target database according to the database name and the table name, and to store the business data in the target storage space of the target database.
[0080] The aforementioned interface call module 204 includes:
[0081] The interface calling unit is used to respond to the above data query instruction by inputting the above location information to the above data calling interface, so as to call the above data calling interface to query the business data in the target storage space of the above target database according to the above location information.
[0082] In some embodiments, the interface configuration module 203 includes:
[0083] The type determination unit is used to determine the interface types supported by the application that processes the target business based on the above interface attribute requirements.
[0084] The information determination unit is used to determine the configuration information of the data call interface for the above-mentioned business data as the interface type mentioned above.
[0085] In some embodiments, the interface configuration module 203 further includes:
[0086] The number generation unit is used to generate an interface number based on the above-mentioned data correlation requirements and the above-mentioned business data, and to determine the above-mentioned interface number as the configuration information of the data call interface of the above-mentioned business data.
[0087] In some embodiments, the interface configuration module 203 further includes:
[0088] The template acquisition unit is used to obtain the interface configuration template corresponding to the data call interface from a preset template set based on the interface type of the data call interface of the above business data.
[0089] The first information modification unit is used to modify the template information in the interface configuration template according to the above configuration information.
[0090] In some embodiments, the interface configuration module 203 further includes:
[0091] The information acquisition unit is used to acquire historical configuration information of historical data call interfaces that are consistent with the above-mentioned business type, based on the business type of the target business mentioned above.
[0092] The second information modification unit is used to modify the template information in the interface configuration template based on the aforementioned historical configuration information.
[0093] This application discloses a data retrieval device. A data acquisition module 201 acquires the business data required for storage by a target business, as well as the corresponding requirement information for the target business, including query performance requirements and interface attribute requirements. A data storage module 202 determines a target database for storing the business data from at least one type of database based on the query performance requirements and the amount of business data, and stores the business data in the target database. An interface configuration module 203 determines the configuration information of a data retrieval interface for retrieving the business data from the target database based on the interface attribute requirements, and configures the data retrieval interface according to the configuration information. An interface retrieval module 204 acquires a data query instruction for the target business sent by an application, responds to the data query instruction by calling the data retrieval interface to query the business data in the target database, and sends the business data from the target database to the application. This improves data retrieval efficiency.
[0094] Accordingly, embodiments of this application also provide a computer device, which can be a terminal. For example... Figure 3 As shown, Figure 3This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. The computer device 300 includes a processor 301 with one or more processing cores, a memory 302 with one or more computer-readable storage media, and a computer program stored in the memory 302 and executable on the processor. The processor 301 and the memory 302 are electrically connected. Those skilled in the art will understand that the computer device structure shown in the figure does not constitute a limitation on the computer device, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0095] The processor 301 is the control center of the computer device 300. It connects various parts of the computer device 300 through various interfaces and lines. By running or loading software programs and / or modules stored in the memory 302, and calling data stored in the memory 302, it performs various functions of the computer device 300 and processes data, thereby monitoring the computer device 300 as a whole.
[0096] In this embodiment, the processor 301 in the computer device 300 loads the instructions corresponding to the processes of one or more applications into the memory 302 according to the following steps, and the processor 301 runs the applications stored in the memory 302 to achieve various functions:
[0097] Obtain the business data required for storage by the target business, as well as the corresponding requirements information for the target business, including query performance requirements and interface attribute requirements.
[0098] Based on the above query performance requirements and the above business data volume, a target database for storing the above business data is determined from at least one type of database, and the above business data is stored in the above target database.
[0099] Based on the above interface attribute requirements, determine the configuration information of the data call interface for calling the above business data from the above target database, and configure the data call interface for the above business data according to the above configuration information.
[0100] Obtain the data query instruction for the target business sent by the application, respond to the data query instruction by calling the data call interface to query the business data in the target database, and send the business data in the target database to the application.
[0101] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.
[0102] Optional, such as Figure 3As shown, the computer device 300 also includes: a touch screen display 303, a radio frequency circuit 304, an audio circuit 305, an input unit 306, and a power supply 307. The processor 301 is electrically connected to the touch screen display 303, the radio frequency circuit 304, the audio circuit 305, the input unit 306, and the power supply 307. Those skilled in the art will understand that... Figure 3 The computer device structure shown does not constitute a limitation on the computer device and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0103] The touch display screen 303 can be used to display a graphical user interface (GUI) and receive operation commands generated by the user interacting with the GUI. The touch display screen 303 may include a display panel and a touch panel. The display panel can be used to display messages input by the user or messages provided to the user, as well as various graphical user interfaces of the computer device. These graphical user interfaces can be composed of graphics, text, icons, video, and any combination thereof. Optionally, the display panel can be configured using a liquid crystal display (LCD), organic light-emitting diode (OLED), or other similar technologies. The touch panel can be used to collect touch operations performed by the user on or near it (such as operations performed by the user using a finger, stylus, or any suitable object or accessory on or near the touch panel), generate corresponding operation commands, and execute the corresponding program according to the operation commands. Optionally, the touch panel may include two parts: a touch detection device and a touch controller. The touch detection device detects the user's touch location and the signal generated by the touch operation, transmitting the signal to the touch controller. The touch controller receives the touch message from the touch detection device, converts it into touch point coordinates, and sends it to the processor 301. It can also receive and execute commands from the processor 301. The touch panel can cover the display panel. When the touch panel detects a touch operation on or near it, it transmits the information to the processor 301 to determine the type of touch event. Subsequently, the processor 301 provides corresponding visual output on the display panel based on the type of touch event. In this embodiment, the touch panel and the display panel can be integrated into the touch display screen 303 to achieve input and output functions. However, in some embodiments, the touch panel and the touch display screen 303 can be implemented as two independent components to achieve input and output functions. That is, the touch display screen 303 can also be used as part of the input unit 306 to achieve input functions.
[0104] The radio frequency circuit 304 can be used to transmit and receive radio frequency signals to establish wireless communication with network devices or other computer devices, and to transmit and receive signals with network devices or other computer devices.
[0105] Audio circuitry 305 can be used to provide an audio interface between a user and a computer device via a speaker and a microphone. Audio circuitry 305 converts received audio data into electrical signals, transmits them to the speaker, and the speaker converts them into sound signals for output. Conversely, the microphone converts collected sound signals into electrical signals, which are then received by audio circuitry 305, converted back into audio data, and output to processor 301 for processing. The audio data is then transmitted via radio frequency circuitry 304 to, for example, another computer device, or output to memory 302 for further processing. Audio circuitry 305 may also include an earphone jack to facilitate communication between peripheral headphones and the computer device.
[0106] The input unit 306 can be used to receive input numbers, character messages or user characteristic messages (such as fingerprints, iris, facial messages, etc.), and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.
[0107] Power supply 307 is used to supply power to various components of computer device 300. Optionally, power supply 307 can be logically connected to processor 301 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. Power supply 307 may also include one or more DC or AC power supplies, recharging systems, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components.
[0108] although Figure 3 As not shown in the diagram, the computer device 300 may also include a camera, sensor, wireless fidelity module, Bluetooth module, etc., which will not be described in detail here.
[0109] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0110] As can be seen from the above, the computer device provided in this embodiment obtains the business data required to be stored for the target business, as well as the requirement information corresponding to the target business, including query performance requirements and interface attribute requirements; based on the query performance requirements and the data volume of the business data, it determines the target database for storing the business data from at least one type of database, and stores the business data in the target database; based on the interface attribute requirements, it determines the configuration information of the data call interface for calling the business data from the target database, and configures the data call interface for the business data according to the configuration information; it obtains the data query instruction for the target business sent by the application terminal, responds to the data query instruction by calling the data call interface to query the business data in the target database, and sends the business data in the target database to the application terminal.
[0111] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by instructions, or by instructions controlling related hardware. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.
[0112] Therefore, embodiments of this application provide a computer-readable storage medium storing a plurality of computer programs that can be loaded by a processor to execute steps in any of the data retrieval methods provided in embodiments of this application. For example, the computer program can execute the following steps:
[0113] Obtain the business data required for storage by the target business, as well as the corresponding requirements information for the target business, including query performance requirements and interface attribute requirements.
[0114] Based on the above query performance requirements and the above business data volume, a target database for storing the above business data is determined from at least one type of database, and the above business data is stored in the above target database.
[0115] Based on the above interface attribute requirements, determine the configuration information of the data call interface for calling the above business data from the above target database, and configure the data call interface for the above business data according to the above configuration information.
[0116] Obtain the data query instruction for the target business sent by the application, respond to the data query instruction by calling the data call interface to query the business data in the target database, and send the business data in the target database to the application.
[0117] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.
[0118] The storage medium may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.
[0119] Since the computer program stored in the storage medium can execute the steps in any of the data retrieval methods provided in the embodiments of this application, the beneficial effects that any of the data retrieval methods provided in the embodiments of this application can achieve can be realized. For details, please refer to the previous embodiments, which will not be repeated here.
[0120] The above provides a detailed description of a data retrieval method, apparatus, computer device, and storage medium provided in the embodiments of this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A data retrieval method, characterized in that, The method includes: Obtain the database name of the large database containing the business data required for the target business, and the table name of the data table in the large database; Based on the library name and the table name, the business data is obtained from the data tables of the large database through the data processing engine; Obtain the requirement information corresponding to the target business, including query performance requirements and interface attribute requirements; Based on the query performance requirements and the amount of business data, a target database for storing the business data is determined from at least one type of database, and a target storage space is configured in the target database according to the database name and the table name, and the business data is stored in the target storage space of the target database; Based on the interface attribute requirements, determine the configuration information of the data call interface for calling the business data from the target database, and configure the data call interface for the business data according to the configuration information; The application receives a data query instruction from the application client, which includes the location information of the target storage space. In response to the data query instruction, the application client inputs the location information to the data call interface to call the data call interface to query the business data in the target storage space of the target database based on the location information. The application client then sends the business data in the target database to the application client. The application client sets an interface list, which records the historical configuration information of the data call interface corresponding to different businesses. The step of configuring the data call interface for the business data according to the configuration information includes: Based on the interface type of the data call interface of the business data, obtain the interface configuration template corresponding to the data call interface from the preset template set, and the interface configuration template is preset in the application. Based on the business type of the target business, the application determines the historical data call interface of the historical business that matches the business type from the interface list. When there are at least two historical data call interfaces for historical services that are consistent with the business type, select the mode from the historical configuration information of the historical data call interfaces of the at least two historical services that are consistent with the business type to determine the target configuration information for modifying the template information in the interface configuration template; Modify the template information in the interface configuration template according to the target configuration information; Modify the template information in the interface configuration template according to the configuration information.
2. The method according to claim 1, characterized in that, The configuration information for determining the data retrieval interface for calling the business data from the target database based on the interface attribute requirements includes: Based on the interface attribute requirements, determine the interface types supported by the application that processes the target business. The configuration information for the data call interface that determines the interface type as the business data.
3. The method according to claim 1, characterized in that, The interface attribute requirements include data association requirements, which indicate the association between the data call interface and the business data. The step of determining the configuration information for the data call interface that calls the business data from the target database based on the interface attribute requirements includes: Based on the data correlation requirements, an interface number is generated according to the business data, and the interface number is determined as the configuration information of the data call interface of the business data.
4. A data retrieval device, characterized in that, The device includes: The data acquisition module is used to acquire the database name of the large database where the business data required for the target business is stored, and the table name of the data table in the large database; based on the database name and the table name, the data processing engine acquires the business data from the data table in the large database; and acquires the requirement information corresponding to the target business, including query performance requirements and interface attribute requirements. The data storage module is used to determine the target database for storing the business data from at least one type of database based on the query performance requirements and the amount of business data, and to configure a target storage space in the target database according to the database name and the table name, and to store the business data in the target storage space of the target database. The interface configuration module is used to determine the configuration information of the data call interface for calling the business data from the target database based on the interface attribute requirements, and to configure the data call interface for the business data according to the configuration information. The interface call module is used to obtain the data query instruction of the target service sent by the application terminal, which includes the location information of the target storage space. In response to the data query instruction, the module inputs the location information to the data call interface to call the data call interface to query the service data in the target storage space of the target database according to the location information, and sends the service data in the target database to the application terminal. The application terminal sets an interface list, and the interface list records the historical configuration information of the data call interface corresponding to different services. The interface configuration module includes: The template acquisition unit is used to acquire the interface configuration template corresponding to the data call interface from a preset template set based on the interface type of the data call interface of the business data. The interface configuration template is preset in the application. The information acquisition unit is used to determine, through the application terminal, the historical data call interface of the historical business that is consistent with the business type of the target business from the interface list; when there are at least two historical data call interfaces of the historical business that are consistent with the business type, the mode is selected from the historical configuration information of the historical data call interfaces of the at least two historical businesses that are consistent with the business type to determine the target configuration information for modifying the template information in the interface configuration template. The second information modification unit is used to modify the template information in the interface configuration template according to the target configuration information; The first information modification unit is used to modify the template information in the interface configuration template according to the configuration information.
5. A computer device, characterized in that, It includes a memory, a processor, and a computer program stored in the memory and running on the processor, wherein when the processor executes the program, it implements the data retrieval method as described in any one of claims 1 to 3.
6. A storage medium, characterized in that, The storage medium stores a plurality of instructions adapted for loading by a processor to execute the data retrieval method according to any one of claims 1 to 3.
Citation Information
Patent Citations
Service data processing method, server and storage medium
CN111026797A
Data processing method and device, electronic equipment and storage medium
CN111382182A
Data processing method and device, equipment and storage medium
CN113901111A
Code generation method and device, equipment and medium
CN115016794A