CN110929135B - Query processing method and device - Google Patents

Query processing method and device Download PDF

Info

Publication number
CN110929135B
CN110929135B CN201911121929.9A CN201911121929A CN110929135B CN 110929135 B CN110929135 B CN 110929135B CN 201911121929 A CN201911121929 A CN 201911121929A CN 110929135 B CN110929135 B CN 110929135B
Authority
CN
China
Prior art keywords
query
platform
service
result information
inquiry
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.)
Active
Application number
CN201911121929.9A
Other languages
Chinese (zh)
Other versions
CN110929135A (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.)
Taikang Insurance Group Co Ltd
Original Assignee
Taikang Insurance Group Co 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 Taikang Insurance Group Co Ltd filed Critical Taikang Insurance Group Co Ltd
Priority to CN201911121929.9A priority Critical patent/CN110929135B/en
Publication of CN110929135A publication Critical patent/CN110929135A/en
Application granted granted Critical
Publication of CN110929135B publication Critical patent/CN110929135B/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/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9532Query formulation
    • 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/08Insurance

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Finance (AREA)
  • Accounting & Taxation (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Mathematical Physics (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 embodiment of the invention provides a query processing method and a query processing device, wherein the query processing method comprises the following steps: a first service query platform receives a query request sent by a terminal and generates first query result information aiming at the query request; when the first service query platform is connected with the second service query platform, the first service query platform sends a query request to the second service query platform; the first service inquiry platform receives second inquiry result information returned by the second service inquiry platform aiming at the inquiry request; the first service query platform generates target query result information by adopting the first query result information and the second query result information; and the first service inquiry platform sends target inquiry result information to the terminal. In the embodiment of the invention, whether the first service query platform is used for returning the query result information to the terminal can be determined through the first query result information and the second query result information, and whether the first service query platform is used is judged without checking the query result information by a tester.

Description

Query processing method and device
Technical Field
The present invention relates to the field of query processing technologies, and in particular, to a query processing method and a query processing apparatus.
Background
When the service query platform is upgraded, the interface of the new platform is usually developed according to the format of the input parameter and the output parameter of the interface of the old platform, so that the externally provided interface service is usually consistent with the old interface.
After the platform development is completed, a tester can perform testing, the interface of the new platform is called after the testing is passed, and the interface of the old platform is off-line.
The common interface test has no page, and each field in the output parameter message can only be seen through a tool. If the interface logic is complex and there are many output parameter fields, insufficient testing may result. If the new interface is not fully tested, a bug may appear after the new interface is brought online.
Disclosure of Invention
In view of the above problems, embodiments of the present invention are proposed to provide a query processing method and a corresponding query processing apparatus that overcome or at least partially solve the above problems.
In order to solve the above problem, an embodiment of the present invention discloses a query processing method, which relates to a first service query platform and a second service query platform, wherein the first service query platform is in communication with a terminal, and the method includes:
the first service inquiry platform receives an inquiry request sent by the terminal and generates first inquiry result information aiming at the inquiry request;
when the first service query platform is connected with the second service query platform, the first service query platform sends the query request to the second service query platform;
the first service inquiry platform receives second inquiry result information returned by the second service inquiry platform aiming at the inquiry request;
the first service query platform generates target query result information by adopting the first query result information and the second query result information;
and the first service inquiry platform sends the target inquiry result information to the terminal.
Optionally, the step of generating, by the first service query platform, target query result information by using the first query result information and the second query result information includes:
the first service query platform extracts the second query result information sent to a preset message queue by the second service query platform from the preset message queue;
the first service inquiry platform compares the first inquiry result information with the second inquiry result information to obtain a comparison result;
the first service inquiry platform stores the comparison result in a preset database;
the first service query platform adjusts the connection state between the first service query platform and the second service query platform by adopting the comparison result in the preset database;
and the first service inquiry platform generates target inquiry result information by adopting the connection state.
Optionally, the step of adjusting, by the first service query platform, a connection state between the first service query platform and the second service query platform by using the comparison result in the preset database includes:
when the comparison result in the preset database is that the first query result information is the same as the second query result information,
and the first service inquiry platform adjusts the first service inquiry platform, and the second service inquiry platform is in a disconnected state.
Optionally, the step of adjusting, by the first service query platform, a connection state between the first service query platform and the second service query platform by using the comparison result in the preset database includes:
when the comparison result in the preset database is that the first query result information is different from the second query result information,
and the first service inquiry platform adjusts the first service inquiry platform, and the second service inquiry platform is in a connection state.
Optionally, the step of generating, by the first service query platform, target query result information by using the connection state includes:
and when the first service query platform and the second service query platform are in a disconnected state, the first service query platform determines the first query result information as first target query result information.
Optionally, the step of generating, by the first service query platform, target query result information by using the connection state includes:
and when the first service query platform and the second service query platform are in a connected state, the first service query platform determines the second query result information as second target query result information.
Optionally, the method further comprises:
and when the first service inquiry platform is not connected with the second service inquiry platform, returning the first inquiry result information to the terminal.
The embodiment of the invention also discloses a query processing device, which relates to a first service query platform and a second service query platform, wherein the first service query platform is communicated with a terminal, and the device comprises:
a first query result information generating module, configured to receive, by the first service query platform, a query request sent by the terminal, and generate first query result information for the query request;
the query request sending module is used for sending the query request to the second service query platform by the first service query platform when the first service query platform is connected with the second service query platform;
a second query result information receiving module, configured to receive, by the first service query platform, second query result information returned by the second service query platform for the query request;
a target query result information generating module, configured to generate target query result information by using the first query result information and the second query result information by the first service query platform;
and the target query result information sending module is used for sending the target query result information to the terminal by the first service query platform.
Alternatively,
the target query result information generating module comprises:
a second query result information extraction sub-module, configured to extract, by the first service query platform, second query result information sent by the second service query platform to a preset message queue from the preset message queue;
the comparison sub-module is used for comparing the first query result information with the second query result information by the first service query platform to obtain a comparison result; the storage sub-module is used for storing the comparison result in a preset database by the first service query platform;
a connection state adjusting sub-module, configured to adjust, by the first service query platform, a connection state between the first service query platform and the second service query platform by using the comparison result in the preset database;
and the target query result information generating submodule is used for generating target query result information by the first service query platform according to the connection state.
Optionally, the connection status adjusting sub-module includes:
and the disconnection state adjusting unit is used for adjusting the first service query platform by the first service query platform and enabling the second service query platform to be in a disconnection state when the comparison result in the preset database is that the first query result information is the same as the second query result information.
Optionally, the connection status adjusting sub-module includes:
and the connection state adjusting unit is used for adjusting the first service query platform by the first service query platform when the comparison result in the preset database is that the first query result information is different from the second query result information, and the second service query platform is in a connection state.
Optionally, the target query result information generating sub-module includes:
a first target query result information determining unit, configured to determine, by the first service query platform, the first query result information as first target query result information when the first service query platform and the second service query platform are in a disconnected state.
Optionally, the target query result information generating sub-module includes:
and the second target query result information determining unit is used for determining the second query result information as the second target query result information by the first service query platform when the first service query platform and the second service query platform are in a connected state.
Optionally, the method further comprises:
and the first query result information returning module is used for returning the first query result information to the terminal when the first service query platform is not connected with the second service query platform.
The embodiment of the invention also discloses a device, which comprises:
one or more processors; and
one or more machine readable media having instructions stored thereon that, when executed by the one or more processors, cause the apparatus to perform one or more methods as described above.
Embodiments of the invention also disclose one or more machine-readable media having instructions stored thereon, which when executed by one or more processors, cause the processors to perform one or more of the methods described above.
The embodiment of the invention has the following advantages: in the embodiment of the invention, a first service query platform generates first query result information aiming at a query request, and when the first service query platform is connected with a second service platform, the first service query platform sends the query request to the second query platform and receives second query result information returned by the second query platform aiming at the query request; and finally, determining a service query platform for generating target query result information according to the first query result information and the second query result information. In the embodiment of the invention, whether the first service query platform is used for returning the query result information to the terminal can be determined through the first query result information and the second query result information, and whether the first service query platform is used is judged without checking the query result information by a tester.
Drawings
FIG. 1 is a flow chart of the steps of one embodiment of a query processing method of the present invention;
FIG. 2 is a flow diagram of the steps of another embodiment of a query processing method of the present invention;
FIG. 3 is a block flow diagram of one embodiment of a query processing method of the present invention;
fig. 4 is a block diagram of an embodiment of a query processing apparatus according to the present invention.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in further detail below.
One of the core concepts of the embodiment of the invention is that when a new service query platform is online, the connection between the new service query platform and an old service query platform is maintained, the new service query platform generates first query result information aiming at a query request, and the old service query platform generates second query result information aiming at the query request; comparing the first query result information with the second query result information, and judging whether to disconnect the connection between the new service query platform and the old service query platform; when the connection between the new service query platform and the old service query platform can be disconnected, the input parameter and the output parameter formats of the new service query platform and the old service query platform are proved to be consistent, and at the moment, the interface of the new service query platform can be considered to pass the test. At this time, the new service query platform may directly return corresponding query result information in response to the query request sent by the receiving terminal.
Referring to fig. 1, a flowchart illustrating steps of an embodiment of a query processing method according to the present invention is shown, and relates to a first service query platform and a second service query platform, where the first service query platform communicates with a terminal, and specifically includes the following steps:
step 101, the first service query platform receives a query request sent by the terminal and generates first query result information aiming at the query request;
in the embodiment of the invention, after a first service query platform (a new service query platform) is on line, a terminal calls an interface of the first service query platform and sends a query request to the first service query platform through the interface. After receiving a query request sent by a terminal, a first service query platform may generate first query result information for the query request.
In one example, with the application of insurance review as a scenario, the query request may contain customer information, which may include customer name, certificate type, certificate number, etc., and the query result data may be historical policy information of the customer, such as policy number, when to buy the policy, what insurance products to buy, etc. For example, if a customer wants to purchase an insurance product, the worker can obtain a historical insurance policy by sending information such as the name of the customer to the service inquiry platform. And determining whether to accept the client application according to the historical policy.
102, when the first service query platform is connected with the second service query platform, the first service query platform sends the query request to the second service query platform;
when the first service query platform is just on line, the first service query platform is in a connection state with the second service query platform (old service query platform), and the first service query platform generates first query result information aiming at the query request and then sends the query request to the second service query platform.
In the embodiment of the present invention, the second service query platform is a service query platform that operates in advance, and the first service query platform is a new query platform that is used to replace the second service query platform. After the first service query platform is online, the second service query platform is disconnected from the terminal, and a query request sent by the terminal is received through the first service query platform.
103, the first service query platform receives second query result information returned by the second service query platform for the query request;
and after receiving the query request forwarded by the first service query platform, the second service query platform generates second query result information aiming at the query request.
In the embodiment of the invention, the second service query platform generates the second query result information aiming at the query request on the premise that the connection is established between the first service query platform and the second service query platform.
Under the condition that the first service query platform and the second service query platform both respond to the query request, the probability of data error is lower than that of the first service query platform because the second service query platform is a query platform operated in advance. Therefore, in an example, when the first service query platform and the second service query platform are in a connected state, the first service query platform may directly return, to the terminal, the second query result information returned by the second service query platform.
Step 104, the first service query platform generates target query result information by using the first query result information and the second query result information;
in the embodiment of the present invention, after the first service query platform operates for a period of time, it needs to be determined whether it is enough to replace the second service query platform.
In one example, the target query result information may be generated based on first query result information generated by a first business query platform and second query result information generated by a second business query platform. The target query result information is used to determine which business query platform to use to return query result information for the query request.
And 105, the first service query platform sends the target query result information to the terminal.
In the embodiment of the invention, after the target query result information is determined, the target query result information can be sent to the terminal through the first service query platform.
In the embodiment of the invention, a first service query platform generates first query result information aiming at a query request, and when the first service query platform is connected with a second service platform, the first service query platform sends the query request to the second query platform and receives second query result information returned by the second query platform aiming at the query request; and finally, determining a service query platform for generating the target query result information according to the first query result information and the second query result information. In the embodiment of the invention, whether the first service query platform is used for returning the query result information to the terminal can be determined through the first query result information and the second query result information, and whether the first service query platform is used is judged without checking the query result information by a tester.
Referring to fig. 2, a flowchart of steps of another embodiment of a query processing method according to the present invention is shown, and relates to a first service query platform and a second service query platform, where the first service query platform is in communication with a terminal, and the method specifically includes the following steps:
step 201, the first service query platform receives a query request sent by the terminal, and generates first query result information aiming at the query request;
in the embodiment of the invention, after a first service query platform (a new service query platform) is on line, a terminal calls an interface of the first service query platform and sends a query request to the first service query platform through the interface. After receiving the query request sent by the terminal, the first service query platform may generate first query result information for the query request.
In one example, with the application of insurance review as a scenario, the query request may contain customer information, which may include customer name, certificate type, certificate number, etc., and the query result data may be historical policy information of the customer, such as policy number, when to buy the policy, what insurance products to buy, etc. For example, if a customer wants to purchase an insurance product, the worker can obtain a historical insurance policy by sending information such as the name of the customer to the service inquiry platform. And determining whether to accept the client application according to the historical policy.
Step 202, when the first service query platform is connected with the second service query platform, the first service query platform sends the query request to the second service query platform;
when the first service query platform is just on line, the first service query platform is in a connection state with the second service query platform (old service query platform), and the first service query platform generates first query result information aiming at the query request and then sends the query request to the second service query platform.
In the embodiment of the present invention, the second service query platform is a service query platform that operates in advance, and the first service query platform is a new query platform that is used to replace the second service query platform. After the first service query platform is online, the second service query platform is disconnected from the terminal, and a query request sent by the terminal is received through the first service query platform.
Step 203, the first service query platform receives second query result information returned by the second service query platform for the query request;
and after receiving the query request forwarded by the first service query platform, the second service query platform generates second query result information aiming at the query request.
In the embodiment of the present invention, the second service query platform generates the second query result information for the query request on the premise that the connection is established between the first service query platform and the second service query platform.
Under the condition that the first service query platform and the second service query platform both respond to the query request, the probability of data error generation is lower than that of the first service query platform because the second service query platform is a previously operated query platform. Therefore, in an example, when the first service query platform and the second service query platform are in a connected state, the first service query platform may directly return, to the terminal, the second query result information returned by the second service query platform.
Step 204, the first service query platform extracts the second query result information sent by the second service query platform to a preset message queue from the preset message queue;
the message queue has good peak clipping effect, namely, transaction messages generated in high concurrency in a short time are stored in the message queue through asynchronous processing, so that concurrent transactions in a peak period are clipped. In the embodiment of the present invention, the message queue may temporarily store the second query result information.
In the embodiment of the present invention, when the second service query platform returns the second query result information to the first service query platform, the second service query platform may further send the second query result information to a preset message queue. When the first service query platform needs to use the second query result information subsequently, the second query result information can be directly extracted from the preset message queue.
Step 205, the first service query platform compares the first query result information with the second query result information to obtain a comparison result;
after the second query result information is extracted, the first query result information and the second query result information generated aiming at the same query request are compared to obtain a comparison result.
Step 206, the first service query platform stores the comparison result in a preset database;
and storing a comparison result between the first query result information and the second query result information generated for each query request in a preset database.
Step 207, the first service query platform adjusts the connection state between the first service query platform and the second service query platform by using the comparison result in the preset database;
in the embodiment of the present invention, a certain time threshold may be set, and after the first service query platform is online for a certain time (for example, one week), the comparison results stored in the database are automatically obtained, and the connection state between the first service query platform and the second service query platform is adjusted according to all the comparison results.
In this embodiment of the present invention, the step of adjusting the connection state between the first service query platform and the second service query platform by the first service query platform using the comparison result in the preset database includes:
and when the comparison result in the preset database is that the first query result information is the same as the second query result information, the first service query platform adjusts the first service query platform, and the second service query platform is in a disconnected state.
And within a certain time threshold, when the comparison results in the database all show that the first query result information is consistent with the second query result information, the first service query platform is proved to be capable of achieving the same query effect as the second service query platform. The first service inquiry platform can replace the second service inquiry platform to carry out service processing. At this time, the connection between the first service query platform and the second service query platform may be disconnected.
In this embodiment of the present invention, the step of adjusting, by the first service query platform, the connection state between the first service query platform and the second service query platform by using the comparison result in the preset database includes:
and when the comparison result in the preset database is that the first query result information is different from the second query result information, the first service query platform adjusts the first service query platform, and the second service query platform is in a connection state.
On the contrary, within a certain time threshold, when the comparison result in the database shows that part of the first query result information is inconsistent with the second query result information, the first service query platform is proved to be incapable of achieving the same query effect as the second service query platform. The first service query platform is adopted to replace the second service query platform, so that risks exist. At this time, the connection between the first service query platform and the second service query platform may be maintained.
And 208, the first service query platform generates target query result information by adopting the connection state.
In the embodiment of the invention, after the connection state between the first service query platform and the second service query platform is adjusted, the target query result information returned to the terminal can be determined according to the connection state.
In this embodiment of the present invention, the step of generating target query result information by the first service query platform using the connection state includes: and when the first service query platform and the second service query platform are in a disconnected state, the first service query platform determines the first query result information as target query result information.
In the embodiment of the present invention, when the first service query platform and the second service query platform are in a disconnected state, it indicates that the first service query platform and the second service query platform have formally completed switching, and after the first service query platform receives the query request, the generated first query result information may be used as the target query result information.
In this embodiment of the present invention, the step of generating target query result information by the first service query platform using the connection state includes: and when the first service query platform and the second service query platform are in a connected state, the first service query platform determines the second query result information as target query result information.
In the embodiment of the invention, when the first service query platform and the second service query platform are in a connected state, the first service query platform is proved to be failed in the test, and the risk exists when the first service query platform is adopted to generate the target query result information. At this time, the second query result generated by the second service query platform may be used as the target query result information.
Step 209, the first service query platform sends the target query result information to the terminal.
After determining the target query result information, the first service query platform may return the target query result information to the terminal.
For example, when it is determined that the target query result information is the first query result information, the first service query platform may directly return the first query result information to the terminal when receiving the query request.
And when the target query result information is determined to be the second query result information, the first service query platform directly forwards the query request to the second service query platform after receiving the query request, and returns the second query result information to the terminal after receiving the second query result information generated by the second service query platform aiming at the query request.
Referring to FIG. 3, a flow diagram of one embodiment of a query processing method of the present invention is shown.
As shown in fig. 3, when the first service query platform is just on line, the terminal invokes an interface of the first service query platform to send a query request to the first service query platform. After the first service query platform receives the query request, there are two processing modes:
the first processing mode is that the first service query platform responds to the query request and directly returns the first query result information to the terminal when the first service query platform and the second service query platform are in a disconnected state.
The second processing mode is that in a connected state between the first service query platform and the second service query platform, the first service query platform not only generates the first query result information in response to the query request, but also forwards the query request to the second service query platform, and receives the second query result information returned by the second service query platform for the query request. And after receiving the second query result information, the first service query platform directly returns the second service query result information to the terminal, and in addition, the second service query platform also sends the second query result information and the query request to the message queue. And the data comparison program of the first service query platform compares the first query result information and the second query result information generated aiming at the same query request, and stores the comparison result in a preset database. And under the condition that the comparison results in the database are consistent, disconnecting the first service query platform from the second service query platform (subsequently adopting a first processing mode), so that the first service query platform is adopted to process the service. And under the condition that the comparison results in the database are not completely consistent, continuously maintaining the connection between the first service query platform and the second service query platform, so that the second query result information is continuously sent to the terminal when the query request is received, and the risk possibly brought by using the first service query platform is avoided. Meanwhile, alarm information can be sent out to prompt that the first service query platform has risks and needs to be adjusted.
In the embodiment of the invention, a first service inquiry platform generates first inquiry result information aiming at an inquiry request, and when the first service inquiry platform is connected with a second service platform, the first service inquiry platform sends the inquiry request to the second inquiry platform and receives second inquiry result information returned by the second inquiry platform aiming at the inquiry request; and finally, determining a service query platform for generating the target query result information according to the first query result information and the second query result information. In the embodiment of the invention, whether the first service query platform is used to return the query result information to the terminal can be determined through the first query result information and the second query result information, and whether the first service query platform is used is judged without a tester checking the query result information.
It should be noted that for simplicity of description, the method embodiments are shown as a series of combinations of acts, but those skilled in the art will recognize that the embodiments are not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the embodiments. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred and that no particular act is required to implement the invention.
Referring to fig. 4, a block diagram of a query processing apparatus according to an embodiment of the present invention is shown, which may specifically include the following modules:
a first query result information generating module 401, configured to receive, by the first service query platform, a query request sent by the terminal, and generate first query result information for the query request;
a query request sending module 402, configured to, when the first service query platform is connected to the second service query platform, send the query request to the second service query platform by the first service query platform;
a second query result information receiving module 403, configured to receive, by the first service query platform, second query result information returned by the second service query platform for the query request;
a target query result information generating module 404, configured to generate target query result information by using the first query result information and the second query result information by the first service query platform;
a target query result information sending module 405, configured to send the target query result information to the terminal by the first service query platform.
In this embodiment of the present invention, the target query result information generating module may include:
a second query result information extraction sub-module, configured to extract, by the first service query platform, second query result information sent by the second service query platform to a preset message queue from the preset message queue;
the comparison sub-module is used for comparing the first query result information with the second query result information by the first service query platform to obtain a comparison result;
the storage sub-module is used for storing the comparison result in a preset database by the first service query platform;
a connection state adjusting sub-module, configured to adjust, by the first service query platform, a connection state between the first service query platform and the second service query platform by using the comparison result in the preset database;
and the target query result information generating submodule is used for generating target query result information by the first service query platform according to the connection state.
In this embodiment of the present invention, the connection state adjustment submodule may include:
and the disconnection state adjusting unit is used for adjusting the first service query platform by the first service query platform when the comparison result in the preset database is that the first query result information is the same as the second query result information, and keeping the second service query platform in a disconnection state.
In this embodiment of the present invention, the connection state adjusting submodule may include:
and the connection state adjusting unit is used for adjusting the first service query platform by the first service query platform and enabling the second service query platform to be in a connection state when the comparison result in the preset database is that the first query result information is different from the second query result information.
In this embodiment of the present invention, the target query result information generating sub-module may include:
a first target query result information determining unit, configured to determine, by the first service query platform, the first query result information as first target query result information when the first service query platform and the second service query platform are in a disconnected state.
In this embodiment of the present invention, the target query result information generating sub-module may include:
and the second target query result information determining unit is used for determining the second query result information as the second target query result information by the first service query platform when the first service query platform and the second service query platform are in a connected state.
In the embodiment of the present invention, the apparatus may further include:
and the first query result information returning module is used for returning the first query result information to the terminal when the first service query platform is not connected with the second service query platform.
For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
An embodiment of the present invention further provides an apparatus, including:
one or more processors; and
one or more machine-readable media having instructions stored thereon, which when executed by the one or more processors, cause the apparatus to perform methods as described in embodiments of the invention.
Embodiments of the invention also provide one or more machine-readable media having instructions stored thereon, which when executed by one or more processors, cause the processors to perform the methods described herein.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, apparatus, or computer program product. Accordingly, embodiments of the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
Embodiments of the present invention are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing terminal to cause a series of operational steps to be performed on the computer or other programmable terminal to produce a computer implemented process such that the instructions which execute on the computer or other programmable terminal provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications of these embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the embodiments of the invention.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be 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. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal 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 terminal. Without further limitation, an element defined by the phrase "comprising a … …" does not exclude the presence of another identical element in a process, method, article, or terminal apparatus that comprises the element.
The query processing method and the query processing apparatus provided by the present invention are described in detail above, and the principle and the implementation of the present invention are explained in this document by applying specific examples, and the description of the above embodiments is only used to help understanding the method and the core idea of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (7)

1. A query processing method relates to a first service query platform and a second service query platform, wherein the first service query platform is communicated with a terminal, and the method comprises the following steps:
the first service inquiry platform receives an inquiry request sent by the terminal and generates first inquiry result information aiming at the inquiry request;
when the first service query platform is connected with the second service query platform, the first service query platform sends the query request to the second service query platform;
the first service inquiry platform receives second inquiry result information returned by the second service inquiry platform aiming at the inquiry request;
the first service query platform generates target query result information by adopting the first query result information and the second query result information;
the first service inquiry platform sends the target inquiry result information to the terminal;
the step of generating target query result information by the first service query platform by using the first query result information and the second query result information includes:
the first service query platform extracts the second query result information sent by the second service query platform to a preset message queue from the preset message queue;
the first service inquiry platform compares the first inquiry result information with the second inquiry result information to obtain a comparison result;
the first service inquiry platform stores the comparison result in a preset database;
the first service query platform adjusts the connection state between the first service query platform and the second service query platform by adopting the comparison result in the preset database;
the first service inquiry platform generates target inquiry result information by adopting the connection state;
the step of generating target query result information by the first service query platform according to the connection state includes:
when the first service query platform and the second service query platform are in a disconnected state, the first service query platform determines the first query result information as first target query result information;
and when the first service query platform and the second service query platform are in a connected state, the first service query platform determines the second query result information as second target query result information.
2. The method according to claim 1, wherein the step of the first service query platform adjusting the connection state between the first service query platform and the second service query platform by using the comparison result in the preset database comprises:
when the comparison result in the preset database is that the first query result information is the same as the second query result information,
and the first service inquiry platform adjusts the first service inquiry platform, and the second service inquiry platform is in a disconnected state.
3. The method according to claim 1, wherein the step of the first service query platform adjusting the connection state between the first service query platform and the second service query platform by using the comparison result in the preset database comprises:
when the comparison result in the preset database is that the first query result information is different from the second query result information,
and the first service inquiry platform adjusts the first service inquiry platform, and the second service inquiry platform is in a connection state.
4. The method of claim 1, further comprising:
and when the first service inquiry platform is not connected with the second service inquiry platform, returning the first inquiry result information to the terminal.
5. An inquiry processing device, which relates to a first service inquiry platform and a second service inquiry platform, wherein the first service inquiry platform is communicated with a terminal, the device comprises:
a first query result information generating module, configured to receive, by the first service query platform, a query request sent by the terminal, and generate first query result information for the query request;
the query request sending module is used for sending the query request to the second service query platform by the first service query platform when the first service query platform is connected with the second service query platform;
a second query result information receiving module, configured to receive, by the first service query platform, second query result information returned by the second service query platform for the query request;
a target query result information generating module, configured to generate target query result information by using the first query result information and the second query result information by the first service query platform;
a target query result information sending module, configured to send the target query result information to the terminal by the first service query platform;
wherein, the target query result information generating module comprises:
a second query result information extraction sub-module, configured to extract, by the first service query platform, second query result information sent by the second service query platform to a preset message queue from the preset message queue;
the comparison sub-module is used for comparing the first query result information with the second query result information by the first service query platform to obtain a comparison result; the storage sub-module is used for storing the comparison result in a preset database by the first service query platform;
a connection state adjusting sub-module, configured to adjust, by the first service query platform, a connection state between the first service query platform and the second service query platform by using the comparison result in the preset database;
a target query result information generating submodule, configured to generate target query result information by using the connection state by the first service query platform;
the target query result information generation sub-module comprises:
a first target query result information determining unit, configured to determine, by the first service query platform, the first query result information as first target query result information when the first service query platform and the second service query platform are in a disconnected state;
and the second target query result information determining unit is used for determining the second query result information as the second target query result information by the first service query platform when the first service query platform and the second service query platform are in a connected state.
6. An apparatus, comprising:
one or more processors; and
one or more machine-readable media having instructions stored thereon that, when executed by the one or more processors, cause the apparatus to perform the method of any of claims 1-4.
7. One or more machine-readable media having instructions stored thereon, which when executed by one or more processors, cause the processors to perform the method of any of claims 1-4.
CN201911121929.9A 2019-11-15 2019-11-15 Query processing method and device Active CN110929135B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911121929.9A CN110929135B (en) 2019-11-15 2019-11-15 Query processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911121929.9A CN110929135B (en) 2019-11-15 2019-11-15 Query processing method and device

Publications (2)

Publication Number Publication Date
CN110929135A CN110929135A (en) 2020-03-27
CN110929135B true CN110929135B (en) 2023-01-06

Family

ID=69853133

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911121929.9A Active CN110929135B (en) 2019-11-15 2019-11-15 Query processing method and device

Country Status (1)

Country Link
CN (1) CN110929135B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112637326B (en) * 2020-12-21 2023-08-22 广东太平洋互联网信息服务有限公司 Old server upgrading method and system based on gateway

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101957847B (en) * 2010-09-21 2011-11-23 百度在线网络技术(北京)有限公司 Searching system and implementation method thereof
CN103888281B (en) * 2012-12-21 2018-05-18 腾讯科技(北京)有限公司 Server gray scale upgrade method, device and corresponding gray scale upgrade server
CN105095464B (en) * 2015-07-30 2019-03-05 北京奇虎科技有限公司 A kind of detection method and device of searching system
US10120951B2 (en) * 2015-08-12 2018-11-06 Samsung Electronics Co., Ltd. Bifurcated search
US10545995B2 (en) * 2017-05-22 2020-01-28 Sap Se Validating query results during asynchronous database replication
CN109359034A (en) * 2018-09-07 2019-02-19 平安科技(深圳)有限公司 A kind of operation system test method, computer readable storage medium and terminal device

Also Published As

Publication number Publication date
CN110929135A (en) 2020-03-27

Similar Documents

Publication Publication Date Title
CN108520454B (en) Method and system for calling back orders in real time
CN111177005B (en) Service application testing method, device, server and storage medium
US8126967B2 (en) Multiple aggregator support
CN110716951B (en) Label configuration method, device and equipment convenient to configure and storage medium
CN110636106B (en) Information pushing method and device, computer equipment and storage medium
CN112817995B (en) Data processing method and device, electronic equipment and storage medium
CN109361628B (en) Message assembling method and device, computer equipment and storage medium
CN110503559B (en) Block chain-based clearing method, device, equipment and computer storage medium
CN110033280B (en) Payment anti-shake method and device
CN109034603B (en) Business process execution method, device and computer readable storage medium
CN108647105B (en) Idempotent control method, device and system in system switching process
CN110929135B (en) Query processing method and device
CN113297357B (en) Asynchronous processing method and device for business process data
CN106034148B (en) Rapid information interaction method, local server, remote server and system
CN113627913A (en) Client-side cash registering method, device, equipment and storage medium
CN111338947A (en) Test method, test device, storage medium and electronic equipment
CN111738853A (en) Transaction optimization method and device based on block chain distributed system
CN115080449A (en) Test method, device, equipment, medium and program product
CN113487053A (en) Maintenance service method, device, equipment and computer readable storage medium
CN111382062B (en) Joint debugging test method and device for real estate transaction system and external institution business system
CN110362464B (en) Software analysis method and equipment
CN111754348A (en) Scene combined transaction method and device
CN111488236A (en) Order abnormity processing method, server, storage medium and processing device
CN110879787A (en) Client test method and system
CN111104439B (en) Stored data comparison method, stored data comparison device and storage medium

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