CN111459991A - Information query method and device - Google Patents

Information query method and device Download PDF

Info

Publication number
CN111459991A
CN111459991A CN202010293119.8A CN202010293119A CN111459991A CN 111459991 A CN111459991 A CN 111459991A CN 202010293119 A CN202010293119 A CN 202010293119A CN 111459991 A CN111459991 A CN 111459991A
Authority
CN
China
Prior art keywords
information
target
information parameter
entity class
query
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010293119.8A
Other languages
Chinese (zh)
Other versions
CN111459991B (en
Inventor
李姿萱
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Bank of China Ltd
Original Assignee
Bank of China Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Bank of China Ltd filed Critical Bank of China Ltd
Priority to CN202010293119.8A priority Critical patent/CN111459991B/en
Publication of CN111459991A publication Critical patent/CN111459991A/en
Application granted granted Critical
Publication of CN111459991B publication Critical patent/CN111459991B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2457Query processing with adaptation to user needs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • G06F16/252Integrating or interfacing systems involving database management systems between a Database Management System and a front-end application
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/02Banking, e.g. interest calculation or account maintenance
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Finance (AREA)
  • Computational Linguistics (AREA)
  • Accounting & Taxation (AREA)
  • Computing Systems (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Technology Law (AREA)
  • General Business, Economics & Management (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides an information query method and device, wherein the method comprises the following steps: when a query request sent to a query system by a front end is received, acquiring a first information parameter of information to be queried contained in the query request; calling a controller to preprocess the information parameter to obtain a second information parameter corresponding to the first information parameter; calling a service module through a controller, carrying out logic processing on the second information parameter, and determining a target entity class corresponding to the information to be inquired; the target entity class is a specific service function correspondingly realized by the information to be inquired; and the application mapping module searches a target calling interface corresponding to the target entity class and inquires information corresponding to the second information parameter through the target calling interface. By applying the method provided by the invention, the respective functions are realized through the controller, the service module and the mapping module, the coupling degree in the query system is reduced, and the information required by the user can be rapidly and accurately queried.

Description

Information query method and device
Technical Field
The invention relates to the technical field of computers, in particular to an information query method and device.
Background
With the rapid development of computer technology, a large number of information query requests sent by a front end are received in a query system of a bank every day, and information corresponding to the information query requests is queried by calling each database arranged in the query system.
In the prior art, when querying information, each interface corresponding to each database needs to be called to query information requested by a user stored in the database through the interface. Because the coupling degree between each module and the device in the inquiry system of the bank is high in the process of information inquiry, the calling of the interface is too frequent along with the increase of the information inquiry request amount, so that the inquiry speed is slow or the information requested by a user cannot be inquired easily.
Disclosure of Invention
In view of this, the present invention provides an information query method, by which the coupling degree in a query system can be reduced, and information required by a user can be quickly and accurately queried.
The invention also provides an information inquiry device which is used for ensuring the realization and the application of the method in practice.
An information query method, comprising:
when a query request sent to a query system by a front end is received, acquiring a first information parameter of information to be queried contained in the query request;
calling a preset controller to preprocess the first information parameter to obtain a second information parameter corresponding to the first information parameter;
calling a preset service module through the controller, carrying out logic processing on the second information parameter, and determining a target entity class corresponding to the information to be inquired; the target entity class is a specific service function correspondingly realized by the information to be inquired;
and searching a target calling interface corresponding to the target entity class by using a preset mapping module, and inquiring information corresponding to the second information parameter through the target calling interface.
Optionally, the invoking a preset controller to preprocess the first information parameter to obtain a second information parameter corresponding to the first information parameter includes:
determining an information query format currently supported by the query system;
and calling a preset controller, and performing format conversion on the first information parameter according to the information query format to obtain a second information parameter corresponding to the first information parameter.
Optionally, in the method, the applying the service module to perform logic processing on the second information parameter to determine a target entity class corresponding to the information to be queried includes:
acquiring a preset configuration file in the service module;
analyzing the second information parameter to obtain configuration data corresponding to the information to be inquired;
matching the configuration data with each data contained in the configuration file, and determining the data which is matched and consistent with the configuration data in the configuration file as target data;
and acquiring an entity class corresponding to the target data in the configuration file, and determining the entity class corresponding to the target data as a target entity class corresponding to the information to be queried.
Optionally, the method for searching for the target call interface corresponding to the target entity class by using the preset mapping module includes:
reading entity classes corresponding to preset calling interfaces of all databases by applying preset SQ L instructions in the mapping module;
and searching a calling interface corresponding to the target entity class according to the second information parameter and the entity class corresponding to each calling interface, and determining the calling interface corresponding to the target entity class as a target calling interface.
The above method, optionally, further includes:
when the information corresponding to the second information parameter is inquired, the information is sent to the controller through the service module;
and the controller is applied to convert the format of the information according to the information query format and feed back the converted information to the front end.
An information inquiry apparatus comprising:
the device comprises an acquisition unit, a query unit and a processing unit, wherein the acquisition unit is used for acquiring a first information parameter of information to be queried contained in a query request when the query request sent to a query system by a front end is received;
the first processing unit is used for calling a preset controller to preprocess the first information parameter to obtain a second information parameter corresponding to the first information parameter;
the second processing unit is used for calling a preset service module through the controller, carrying out logic processing on the second information parameter and determining a target entity class corresponding to the information to be inquired; the target entity class is a specific service function correspondingly realized by the information to be inquired;
and the query unit is used for searching a target calling interface corresponding to the target entity class by using a preset mapping module and querying information corresponding to the second information parameter through the target calling interface.
The above apparatus, optionally, the first processing unit includes:
the first determining subunit is used for determining the information query format currently supported by the query system;
and the conversion subunit is used for calling a preset controller, performing format conversion on the first information parameter according to the information query format, and obtaining a second information parameter corresponding to the first information parameter.
The above apparatus, optionally, the second processing unit includes:
the acquisition subunit is used for acquiring a configuration file preset in the service module;
the analysis subunit is configured to analyze the second information parameter to obtain configuration data corresponding to the information to be queried;
the matching subunit is used for matching the configuration data with each data contained in the configuration file and determining the data which is matched and consistent with the configuration data in the configuration file as target data;
and the second determining subunit is configured to acquire the entity class corresponding to the target data in the configuration file, and determine the entity class corresponding to the target data as the target entity class corresponding to the information to be queried.
The above apparatus, optionally, the query unit includes:
the reading subunit is used for applying a preset SQ L instruction in the mapping module and reading entity classes corresponding to preset calling interfaces of all databases;
and the third determining subunit is configured to search for a calling interface corresponding to the target entity class according to the second information parameter and the entity class corresponding to each calling interface, and determine that the calling interface corresponding to the target entity class is a target calling interface.
The above apparatus, optionally, further comprises:
the feedback unit is used for sending the information to the controller through the service module when the information corresponding to the second information parameter is inquired; and the controller is applied to convert the format of the information according to the information query format and feed back the converted information to the front end.
A storage medium, the storage medium comprising stored instructions, wherein when the instructions are executed, a device in which the storage medium is located is controlled to execute the above information query method.
An electronic device includes a memory, and one or more instructions, wherein the one or more instructions are stored in the memory and configured to be executed by one or more processors to perform the above information query method.
Compared with the prior art, the invention has the following advantages:
the invention provides an information query method, which comprises the following steps: when a query request sent to a query system by a front end is received, acquiring a first information parameter of information to be queried contained in the query request; calling a preset controller to preprocess the information parameter to obtain a second information parameter corresponding to the first information parameter; calling a preset service module through the controller, carrying out logic processing on the second information parameter, and determining a target entity class corresponding to the information to be inquired; the target entity class is a specific service function correspondingly realized by the information to be inquired; and searching a target calling interface corresponding to the target entity class by using a preset mapping module, and inquiring information corresponding to the second information parameter through the target calling interface. By applying the method provided by the invention, the respective functions are realized through the controller, the service module and the mapping module, the coupling degree in the query system is reduced, and the information required by the user can be rapidly and accurately queried.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a flowchart of a method of an information query method according to an embodiment of the present invention;
fig. 2 is a schematic view of an application scenario of an information query method according to an embodiment of the present invention;
fig. 3 is a flowchart of another method of an information query method according to an embodiment of the present invention;
fig. 4 is a device structure diagram of an information query device according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In this application, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions, and the terms "comprises", "comprising", or any other variation thereof are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The invention is operational with numerous general purpose or special purpose computing device environments or configurations. For example: personal computers, server computers, hand-held or portable devices, tablet-type devices, multi-processor apparatus, distributed computing environments that include any of the above devices or equipment, and the like.
The embodiment of the invention provides an information query method, which can be applied to a plurality of system platforms, wherein an execution main body of the method can be a computer terminal or a processor of various mobile devices, and a flow chart of the method is shown in fig. 1 and specifically comprises the following steps:
s101: when a query request sent to a query system by a front end is received, acquiring a first information parameter of information to be queried contained in the query request;
in the embodiment of the invention, the front end can be a client side for the user to inquire information, the interaction with the user is realized, and the user sends the inquiry request to the inquiry system through the page of the front end.
The query request includes a first information parameter of the information to be queried, where the first information parameter may be an information name of the information to be queried or an information feature related to the information to be queried. And the first information parameter is used as an index condition of the information to be inquired, and the information is inquired through the first information parameter.
Specifically, an SMM framework is established in the query system, wherein the SMM framework is an abbreviation of spring mvcmmybatis. The method is a more mainstream JavaEE enterprise-level framework and is suitable for building various large-scale enterprise-level application systems. The Spring is a container framework, and realizes the management of business objects; the springMVC is a web layer MVC framework, and realizes the separation of input logic, service logic and UI logic; the MyBatis is a persistent layer framework of opportunistic Java for managing addition, deletion and modification of data.
S102: calling a preset controller to preprocess the first information parameter to obtain a second information parameter corresponding to the first information parameter;
in the embodiment of the present invention, the Controller is a presentation layer, i.e., a Controller layer, disposed in an SMM framework in the query system, and is a last layer disposed in the SMM framework, and is configured to interface with the front end and receive the first information parameter sent by the front end. After the first information parameter is input into the query system, the Controller layer preprocesses the first information parameter through the Controller layer to obtain a second information parameter corresponding to the first information parameter.
S103: calling a preset service module through the controller, carrying out logic processing on the second information parameter, and determining a target entity class corresponding to the information to be inquired; the target entity class is a specific service function correspondingly realized by the information to be inquired;
in the embodiment of the present invention, the Service module is a Service layer, i.e., a Service layer, disposed in an SMM framework in the query system, and the Controller layer invokes the Service layer through an interface, performs logic processing on the first information parameter, and determines a target entity class corresponding to the information to be queried.
It should be noted that the target entity class is a specific service function correspondingly implemented by the information to be queried, that is, an attribute class of the information to be queried, and the target entity class is consistent with an attribute value in a database corresponding to the target entity class. The entity class generally defines three types of entity class information, specifically global information GlobalInfo, front-end application information ClientInfo, and background system information bgsyslnfo. Global information, which is used for recording global information of an interface, such as total transaction amount of 32 nodes, global TPS and the like; front-end application information, which is used for recording the transaction condition of a certain front end, such as the average response time, error reporting condition and the like of the application; and the background system information is used for recording the transaction condition of a certain background system specified by the uploading parameter type or url, such as the transaction request amount of the background.
S104: and searching a target calling interface corresponding to the target entity class by using a preset mapping module, and inquiring information corresponding to the second information parameter through the target calling interface.
In the embodiment of the present invention, the mapping module is a persistent layer, i.e., a mapper layer, disposed in an SMM framework in the query system, and the Service layer is connected to the mapper layer through an interface. And after the target entity class corresponding to the information to be inquired is determined, searching a target calling interface through the mapping relation between the target entity class and each database, and inquiring the information corresponding to the second information parameter in the corresponding database through the target calling interface.
In the information query method provided by the embodiment of the invention, when the front end sends the query request to the query system, the controller first preprocesses the first information parameter contained in the query request sent by the front end to obtain the second information parameter, and then the controller calls the service module to logically process the second information parameter to obtain the target entity class corresponding to the information to be queried. And finally, searching a target calling interface corresponding to the target entity class through the application mapping module, and searching information through the target calling interface.
Referring to fig. 2, an application scenario of the information query method according to the embodiment of the present invention is schematically illustrated, where the application scenario includes a front-end device 10 and a server 20, where the front-end device 10 may be a device capable of querying information through network connection, such as a mobile phone, a notebook, a tablet computer, a smart watch, and a smart television, and the server 20 may be any server device capable of supporting a corresponding query service. When the user needs to inquire certain information, the front-end device 10 is connected with the server 20 through the network, and the application front-end device 10 sends an inquiry request to the server 20 through the network. The controller in the query system in the server 20 obtains the first information parameter in the query request and preprocesses the first information parameter to obtain the second information parameter. And calling the service module through the controller, performing logic processing on the second information parameter by using the service module, determining a target entity class corresponding to the information to be inquired, searching a target calling interface corresponding to the target entity class through the mapping module, and inquiring the information corresponding to the second information parameter through the target calling interface.
By applying the method provided by the embodiment of the invention, the respective functions are realized through the controller, the service module and the mapping module, the coupling degree in the query system is reduced, and the information required by the user can be rapidly and accurately queried.
In the method provided in the embodiment of the present invention, based on the content of step S102, the controller preprocesses the first information parameter to obtain a second information parameter corresponding to the first information parameter. The process of preprocessing the first information parameter may specifically include:
determining an information query format currently supported by the query system;
and calling a preset controller, and performing format conversion on the first information parameter according to the information query format to obtain a second information parameter corresponding to the first information parameter.
In the information query method provided in the embodiment of the present invention, an information query format applied in the query system may be set in the query system, and the information query format may be a json format. And converting the first information parameter into a second information parameter in a json format to quickly query the information in the json format.
In the embodiment of the present invention, the setting of the information query format may be set according to a specific service scenario, and the setting of the information query format in the present invention is not limited. For example, if the open source library in the query system is Fastjson, javabeans in the first information parameter are serialized into json character strings through the Fastjson, that is, the first information parameter is converted into a second information parameter in the json format.
By applying the method of the embodiment of the invention, the format conversion is carried out on the first information parameter, and the information query can be carried out according to the second information parameter obtained after the conversion, so that the progress of the information query is accelerated.
In the method provided in the embodiment of the present invention, based on the content in step S103, the service module is called by the controller, and the process of determining the target entity class after the service module performs logic processing on the second information parameter may specifically include:
acquiring a preset configuration file in the service module;
analyzing the second information parameter to obtain configuration data corresponding to the information to be inquired;
matching the configuration data with each data contained in the configuration file, and determining the data which is matched and consistent with the configuration data in the configuration file as target data;
and acquiring an entity class corresponding to the target data in the configuration file, and determining the entity class corresponding to the target data as a target entity class corresponding to the information to be queried.
In the information query method provided by the embodiment of the invention, the service module is provided with the configuration file, and the configuration file is an entity type file which is set according to actual business requirements in the development process of the service module. And analyzing the second information parameter to obtain configuration data corresponding to the information to be queried, wherein the configuration data can be javabean, and the javabean is a reusable component written by Java language. The configuration file comprises a plurality of data, each data corresponds to an entity class, and after the data matched with the configuration data in the configuration file is determined, the entity class corresponding to the data is determined as the target entity class of the information to be inquired.
For example, after receiving the second information parameter in the controller, the service module determines the specific service function implemented by the information to be queried according to the second information parameter, performs a function definition on the service function, and determines the information corresponding to the part of data that needs to be queried and the interface through which the corresponding database needs to be accessed when determining that information is queried through the mapping module.
By applying the method provided by the embodiment of the invention, the information required to be inquired at the front end is further accurately determined by determining the target entity class corresponding to the information to be inquired, and the accuracy of the information inquiry process is ensured.
In the method provided in the embodiment of the present invention, based on the content of step S104, searching for the target invocation interface corresponding to the target entity class by using a preset mapping module may specifically include:
reading entity classes corresponding to preset calling interfaces of all databases by applying preset SQ L instructions in the mapping module;
and searching a calling interface corresponding to the target entity class according to the second information parameter and the entity class corresponding to each calling interface, and determining the calling interface corresponding to the target entity class as a target calling interface.
In the information query method provided by the embodiment of the invention, in the development process of the mapping module, in order to implement persistent operation on the database, the mapping relation between the structure and the entity class can be queried through an SQ L statement and a label control SQ L, and the data can be added and deleted, in the call interfaces corresponding to each database of the query system, each call interface respectively defines a specific entity class.
By applying the method provided by the embodiment of the invention, the information required by the user can be quickly and accurately inquired.
In the method provided by the embodiment of the present invention, after querying the information requested by the user, the method specifically further includes:
when the information corresponding to the second information parameter is inquired, the information is sent to the controller through the service module;
and the controller is applied to convert the format of the information according to the information query format and feed back the converted information to the front end.
Referring to fig. 3, another flowchart of an information query method provided in an embodiment of the present invention specifically illustrates a process of performing information query, including:
s301: receiving a query request sent by a front end to a query system, and acquiring a first information parameter of information to be queried contained in the query request;
s302: calling a controller to perform format conversion on the first information parameter, and converting the first information parameter into a second information parameter in a json format;
s303: the controller calls the service module to perform logic processing on the second information parameter, and a target entity class corresponding to the information to be inquired is determined;
s304: the application mapping module searches a target calling interface corresponding to the target entity class and inquires information corresponding to the second information parameter through the target calling interface;
s305: sending the information searched by the mapping module to the controller through the service module;
s306: the controller converts the information to obtain converted information in a json format;
s307: and feeding back the converted information to the front end to finish the information query process.
In the information query method provided by the embodiment of the invention, in the information query process, various kinds of processing are firstly carried out according to the sequence from the controller to the service module to the mapping module, then the information is queried, and then the information is fed back to the front end according to the sequence from the mapping module to the service module to the controller. When the information is sent to the controller, the controller performs format conversion on the information according to the information query format in the above embodiment, where a specific format may be a json format.
Based on the method provided by the embodiment, the invention provides an application embodiment of the information query method, the method can be applied to a plurality of system environments, the specific application environment can be a bank system, and the application process in the bank system is as follows:
when the front end needs to inquire the total transaction amount of the bank in the same day, an inquiry request is sent to a bank system, and a first transaction name corresponding to the total transaction amount contained in the inquiry request is obtained. And performing format conversion on the first transaction name through a Controller layer in an SMM frame arranged in a bank system to obtain a second transaction name in a json format, calling a Service layer by the Controller layer, and determining an entity class corresponding to the total transaction amount as an entity class of the global information after the Service layer performs logic processing on the second transaction name. And determining each calling interface corresponding to the global information by applying mapper and the like, and searching a target calling interface corresponding to the second transaction name in each calling interface, namely, the target calling interface is a calling interface corresponding to the total transaction amount. And searching total transaction amount information corresponding to the second transaction name in a corresponding database through the target calling interface, sending the total transaction amount information to a Service layer through a mapper layer, sending the total transaction amount information to a Controller layer through the Service layer, and feeding the format of the total transaction amount information back to the front end after the format of the total transaction amount information is converted by the Controller layer.
By applying the method provided by the embodiment of the invention, after the information is inquired, the information can be quickly returned to the front end according to the original inquiry path, so that the experience of the user at the front end on information inquiry is improved.
The specific implementation procedures and derivatives thereof of the above embodiments are within the scope of the present invention.
Corresponding to the method described in fig. 1, an embodiment of the present invention further provides an information query apparatus, which is used for implementing the method in fig. 1 specifically, and the information query apparatus provided in the embodiment of the present invention may be applied to a computer terminal or various mobile devices, and a schematic structural diagram of the information query apparatus is shown in fig. 4, and specifically includes:
an obtaining unit 401, configured to obtain, when a query request sent by a front end to a query system is received, a first information parameter of information to be queried included in the query request;
a first processing unit 402, configured to invoke a preset controller to perform preprocessing on the first information parameter, so as to obtain a second information parameter corresponding to the first information parameter;
a second processing unit 403, configured to invoke a preset service module through the controller, perform logic processing on the second information parameter, and determine a target entity class corresponding to the information to be queried; the target entity class is a specific service function correspondingly realized by the information to be inquired;
the query unit 404 is configured to search for a target call interface corresponding to the target entity class by using a preset mapping module, and query information corresponding to the second information parameter through the target call interface.
In the device provided by the embodiment of the invention, after receiving the query request sent by the front end, the obtaining unit obtains the first information parameter in the query request. The first processing unit calls the controller to preprocess the first information parameter to obtain a second information parameter; the second processing unit calls the service module through the controller to perform logic processing on the second information parameter, and determines an entity class corresponding to the information to be inquired. And finally, calling the mapping module through the query unit to search the target calling interface, and searching the information corresponding to the second information parameter through the target calling interface.
By applying the device provided by the embodiment of the invention, the respective functions are realized through the controller, the service module and the mapping module, the coupling degree in the query system is reduced, and the information required by the user can be rapidly and accurately queried.
In the apparatus provided in the embodiment of the present invention, the first processing unit 402 includes:
the first determining subunit is used for determining the information query format currently supported by the query system;
and the conversion subunit is used for calling a preset controller, performing format conversion on the first information parameter according to the information query format, and obtaining a second information parameter corresponding to the first information parameter.
In the apparatus provided in the embodiment of the present invention, the second processing unit 403 includes:
the acquisition subunit is used for acquiring a configuration file preset in the service module;
the analysis subunit is configured to analyze the second information parameter to obtain configuration data corresponding to the information to be queried;
the matching subunit is used for matching the configuration data with each data contained in the configuration file and determining the data which is matched and consistent with the configuration data in the configuration file as target data;
and the second determining subunit is configured to acquire the entity class corresponding to the target data in the configuration file, and determine the entity class corresponding to the target data as the target entity class corresponding to the information to be queried.
In the apparatus provided in the embodiment of the present invention, the querying unit 404 includes:
the reading subunit is used for applying a preset SQ L instruction in the mapping module and reading entity classes corresponding to preset calling interfaces of all databases;
and the third determining subunit is configured to search for a calling interface corresponding to the target entity class according to the second information parameter and the entity class corresponding to each calling interface, and determine that the calling interface corresponding to the target entity class is a target calling interface.
The device provided by the embodiment of the invention further comprises:
the feedback unit is used for sending the information to the controller through the service module when the information corresponding to the second information parameter is inquired; and the controller is applied to convert the format of the information according to the information query format and feed back the converted information to the front end.
The specific working processes of each unit and sub-unit in the information query device disclosed in the above embodiment of the present invention can refer to the corresponding contents in the information query method disclosed in the above embodiment of the present invention, and are not described herein again.
The embodiment of the invention also provides a storage medium, which comprises a stored instruction, wherein when the instruction runs, the device where the storage medium is located is controlled to execute the information query method.
An electronic device is provided in an embodiment of the present invention, and the structural diagram of the electronic device is shown in fig. 5, which specifically includes a memory 501 and one or more instructions 502, where the one or more instructions 502 are stored in the memory 501, and are configured to be executed by one or more processors 503 to perform the following operations according to the one or more instructions 502:
when a query request sent to a query system by a front end is received, acquiring a first information parameter of information to be queried contained in the query request;
calling a preset controller to preprocess the first information parameter to obtain a second information parameter corresponding to the first information parameter;
calling a preset service module through the controller, carrying out logic processing on the second information parameter, and determining a target entity class corresponding to the information to be inquired; the target entity class is a specific service function correspondingly realized by the information to be inquired;
and searching a target calling interface corresponding to the target entity class by using a preset mapping module, and inquiring information corresponding to the second information parameter through the target calling interface.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, the system or system embodiments are substantially similar to the method embodiments and therefore are described in a relatively simple manner, and reference may be made to some of the descriptions of the method embodiments for related points. The above-described system and system embodiments are only illustrative, wherein the units described as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both.
To clearly illustrate this interchangeability of hardware and software, various illustrative components and steps have been described above generally in terms of their functionality. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. An information query method, comprising:
when a query request sent to a query system by a front end is received, acquiring a first information parameter of information to be queried contained in the query request;
calling a preset controller to preprocess the first information parameter to obtain a second information parameter corresponding to the first information parameter;
calling a preset service module through the controller, carrying out logic processing on the second information parameter, and determining a target entity class corresponding to the information to be inquired; the target entity class is a specific service function correspondingly realized by the information to be inquired;
and searching a target calling interface corresponding to the target entity class by using a preset mapping module, and inquiring information corresponding to the second information parameter through the target calling interface.
2. The method according to claim 1, wherein the invoking a preset controller to preprocess the first information parameter to obtain a second information parameter corresponding to the first information parameter comprises:
determining an information query format currently supported by the query system;
and calling a preset controller, and performing format conversion on the first information parameter according to the information query format to obtain a second information parameter corresponding to the first information parameter.
3. The method according to claim 1, wherein the applying the service module to perform logic processing on the second information parameter and determine a target entity class corresponding to the information to be queried includes:
acquiring a preset configuration file in the service module;
analyzing the second information parameter to obtain configuration data corresponding to the information to be inquired;
matching the configuration data with each data contained in the configuration file, and determining the data which is matched and consistent with the configuration data in the configuration file as target data;
and acquiring an entity class corresponding to the target data in the configuration file, and determining the entity class corresponding to the target data as a target entity class corresponding to the information to be queried.
4. The method according to claim 1, wherein the applying a preset mapping module to find the target call interface corresponding to the target entity class includes:
reading entity classes corresponding to preset calling interfaces of all databases by applying preset SQ L instructions in the mapping module;
and searching a calling interface corresponding to the target entity class according to the second information parameter and the entity class corresponding to each calling interface, and determining the calling interface corresponding to the target entity class as a target calling interface.
5. The method of claim 2, further comprising:
when the information corresponding to the second information parameter is inquired, the information is sent to the controller through the service module;
and the controller is applied to convert the format of the information according to the information query format and feed back the converted information to the front end.
6. An information inquiry apparatus, comprising:
the device comprises an acquisition unit, a query unit and a processing unit, wherein the acquisition unit is used for acquiring a first information parameter of information to be queried contained in a query request when the query request sent to a query system by a front end is received;
the first processing unit is used for calling a preset controller to preprocess the first information parameter to obtain a second information parameter corresponding to the first information parameter;
the second processing unit is used for calling a preset service module through the controller, carrying out logic processing on the second information parameter and determining a target entity class corresponding to the information to be inquired; the target entity class is a specific service function correspondingly realized by the information to be inquired;
and the query unit is used for searching a target calling interface corresponding to the target entity class by using a preset mapping module and querying information corresponding to the second information parameter through the target calling interface.
7. The apparatus of claim 6, wherein the first processing unit comprises:
the first determining subunit is used for determining the information query format currently supported by the query system;
and the conversion subunit is used for calling a preset controller, performing format conversion on the first information parameter according to the information query format, and obtaining a second information parameter corresponding to the first information parameter.
8. The apparatus of claim 6, wherein the second processing unit comprises:
the acquisition subunit is used for acquiring a configuration file preset in the service module;
the analysis subunit is configured to analyze the second information parameter to obtain configuration data corresponding to the information to be queried;
the matching subunit is used for matching the configuration data with each data contained in the configuration file and determining the data which is matched and consistent with the configuration data in the configuration file as target data;
and the second determining subunit is configured to acquire the entity class corresponding to the target data in the configuration file, and determine the entity class corresponding to the target data as the target entity class corresponding to the information to be queried.
9. The apparatus of claim 6, wherein the query unit comprises:
the reading subunit is used for applying a preset SQ L instruction in the mapping module and reading entity classes corresponding to preset calling interfaces of all databases;
and the third determining subunit is configured to search for a calling interface corresponding to the target entity class according to the second information parameter and the entity class corresponding to each calling interface, and determine that the calling interface corresponding to the target entity class is a target calling interface.
10. The apparatus of claim 6, further comprising:
the feedback unit is used for sending the information to the controller through the service module when the information corresponding to the second information parameter is inquired; and the controller is applied to convert the format of the information according to the information query format and feed back the converted information to the front end.
CN202010293119.8A 2020-04-15 2020-04-15 Information query method and device Active CN111459991B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010293119.8A CN111459991B (en) 2020-04-15 2020-04-15 Information query method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010293119.8A CN111459991B (en) 2020-04-15 2020-04-15 Information query method and device

Publications (2)

Publication Number Publication Date
CN111459991A true CN111459991A (en) 2020-07-28
CN111459991B CN111459991B (en) 2023-04-07

Family

ID=71680277

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010293119.8A Active CN111459991B (en) 2020-04-15 2020-04-15 Information query method and device

Country Status (1)

Country Link
CN (1) CN111459991B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112000692A (en) * 2020-09-02 2020-11-27 平安养老保险股份有限公司 Page query feedback method and device, computer equipment and readable storage medium
CN113836145A (en) * 2021-09-29 2021-12-24 中电金信软件有限公司 Method and device for requesting data, electronic equipment and computer-readable storage medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120011134A1 (en) * 2010-07-08 2012-01-12 Travnik Jakub Systems and methods for database query translation
CN103425495A (en) * 2013-08-07 2013-12-04 华为软件技术有限公司 Method and system for processing service request information
US20150370897A1 (en) * 2014-06-18 2015-12-24 Alibaba Group Holding Limited Data query method and apparatus
CN105447051A (en) * 2014-09-22 2016-03-30 普天信息技术有限公司 Database operation method and device
CN108108439A (en) * 2017-12-21 2018-06-01 北京奇艺世纪科技有限公司 A kind of data query method, apparatus and electronic equipment
CN109062952A (en) * 2018-06-22 2018-12-21 北京奇艺世纪科技有限公司 A kind of data query method, apparatus and electronic equipment
CN109145025A (en) * 2018-09-14 2019-01-04 阿里巴巴集团控股有限公司 A kind of data query method, apparatus and service server that multi-data source is integrated
CN109271403A (en) * 2018-09-28 2019-01-25 北京京东金融科技控股有限公司 A kind of operating method of data query, device, medium and electronic equipment
CN110489440A (en) * 2019-07-29 2019-11-22 腾讯科技(深圳)有限公司 Data query method and apparatus

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120011134A1 (en) * 2010-07-08 2012-01-12 Travnik Jakub Systems and methods for database query translation
CN103425495A (en) * 2013-08-07 2013-12-04 华为软件技术有限公司 Method and system for processing service request information
US20150370897A1 (en) * 2014-06-18 2015-12-24 Alibaba Group Holding Limited Data query method and apparatus
CN105447051A (en) * 2014-09-22 2016-03-30 普天信息技术有限公司 Database operation method and device
CN108108439A (en) * 2017-12-21 2018-06-01 北京奇艺世纪科技有限公司 A kind of data query method, apparatus and electronic equipment
CN109062952A (en) * 2018-06-22 2018-12-21 北京奇艺世纪科技有限公司 A kind of data query method, apparatus and electronic equipment
CN109145025A (en) * 2018-09-14 2019-01-04 阿里巴巴集团控股有限公司 A kind of data query method, apparatus and service server that multi-data source is integrated
CN109271403A (en) * 2018-09-28 2019-01-25 北京京东金融科技控股有限公司 A kind of operating method of data query, device, medium and electronic equipment
CN110489440A (en) * 2019-07-29 2019-11-22 腾讯科技(深圳)有限公司 Data query method and apparatus

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112000692A (en) * 2020-09-02 2020-11-27 平安养老保险股份有限公司 Page query feedback method and device, computer equipment and readable storage medium
CN112000692B (en) * 2020-09-02 2023-06-23 平安养老保险股份有限公司 Page query feedback method and device, computer equipment and readable storage medium
CN113836145A (en) * 2021-09-29 2021-12-24 中电金信软件有限公司 Method and device for requesting data, electronic equipment and computer-readable storage medium

Also Published As

Publication number Publication date
CN111459991B (en) 2023-04-07

Similar Documents

Publication Publication Date Title
US8056091B2 (en) Systems and methods for using application services
US9251268B2 (en) Automated target specific format conversion of context information from a user query
EP3567494A1 (en) Methods and systems for identifying, selecting, and presenting media-content items related to a common story
EP2369480A2 (en) Mashup infrastructure with learning mechanism
WO2014179819A2 (en) Software design pattern for adapting a graph database visualization software
CA2456126C (en) Method and computer system for identifying objects for archiving
US7685114B2 (en) Systems and methods for mapping text
JP5031819B2 (en) Declarations for transformations in service sequences
EP3848824A1 (en) Landing page processing method, apparatus, device and medium
CN111459991B (en) Information query method and device
US10915378B1 (en) Open discovery service
US20220114463A1 (en) System and Method for Multi-modality Soft-agent for Query Population and Information Mining
US20230161766A1 (en) Data investigation and visualization system
US20160283222A1 (en) Application user interface overlays for application lifecycle management
CN114564203A (en) Service operation method and device, electronic equipment and readable medium
CN110109983B (en) Method and device for operating Redis database
CN116594683A (en) Code annotation information generation method, device, equipment and storage medium
CN113625998B (en) Request processing method and device
CN111427577A (en) Code processing method and device and server
CN111488386B (en) Data query method and device
CN114675982A (en) General method and system for acquiring data of service integration system
CN112711677A (en) Visual management device and method for Neo4j graph database
CN115291773A (en) Tree structure data display method and device
CN113448578A (en) Page data processing method, processing system, electronic device and readable storage medium
CN112947984A (en) Application program development method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant