CN104408065A - Trade information on-line inquiry method and device - Google Patents

Trade information on-line inquiry method and device Download PDF

Info

Publication number
CN104408065A
CN104408065A CN201410594467.3A CN201410594467A CN104408065A CN 104408065 A CN104408065 A CN 104408065A CN 201410594467 A CN201410594467 A CN 201410594467A CN 104408065 A CN104408065 A CN 104408065A
Authority
CN
China
Prior art keywords
asynchronous task
query
asynchronous
checked
user terminal
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.)
Pending
Application number
CN201410594467.3A
Other languages
Chinese (zh)
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.)
China Construction Bank Corp
Original Assignee
China Construction Bank Corp
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 China Construction Bank Corp filed Critical China Construction Bank Corp
Priority to CN201410594467.3A priority Critical patent/CN104408065A/en
Publication of CN104408065A publication Critical patent/CN104408065A/en
Pending legal-status Critical Current

Links

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/2455Query execution

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a trade information on-line inquiry method which comprises the following steps that a to-be-inquired trade information request sent by a user terminal is received, the to-be-inquired trade information request carries inquiring conditions of to-be-inquired trade information, synchronous inquiring is conducted according to the inquiring conditions of the to-be-inquired trade information, the usable rest time of the inquiry is set, and when the current consumed time of the synchronous inquiring is greater than an overtime control parameter, prompting information is returned to the user terminal, wherein the prompting information is used for prompting a user to select narrowing the range of the to-be-inquired trade information to conduct the synchronous inquiring, or converting to asynchronous inquiring processing without changing the range of the to-be-inquired trade information, and the overtime control parameter is the smaller value between the usable rest time of the inquiry this time and the longest processing time which is defined in advance and is permitted by each synchronous processing. The trade information on-line inquiry method provided by the embodiment of the invention can improve the performance, the stability and the using rate of a system.

Description

A kind of method of on-line equiries Transaction Information and device
Technical field
The present invention relates to communication technical field, particularly relate to a kind of method and device of on-line equiries Transaction Information.
Background technology
On-line transaction information inquiry is the situation in order to allow user understand the historical trading occurred in a period of time in the past, at present, to be user start period, Close Date and other optional query arguments by selected Transaction Information scope to be checked inquires about the transaction details occurred in this time period in on-line transaction information inquiry.
Above-mentioned information inquiry mode, because the historical data amount in time range to be checked varies in size and different disposal route difference of concluding the business, thus causes the corresponding response time also likely to there is very large difference.When the transaction (as being greater than the inquiry of 30 seconds) that the server process response time is longer, the performance of system can be reduced; On the other hand, when server responds the query processing of a large amount of length consuming time simultaneously, the release of program resource is slowed down, server finally may be caused cannot to process follow-up inquiry request, reduce utilization factor and the stability of system.
Summary of the invention
The embodiment of the present invention provides a kind of method and device of on-line equiries Transaction Information, for the performance of elevator system, utilization factor and stability.
First aspect present invention provides a kind of method of on-line equiries Transaction Information, comprising:
Receive the Transaction Information request to be checked that user terminal sends, the querying condition of Transaction Information to be checked is carried in described Transaction Information request to be checked;
Querying condition according to described Transaction Information to be checked carries out synchronous query, the remaining time available of this time inquiry of setting simultaneously;
In described synchronous query processing procedure, judge that synchronous query is current and consuming timely whether be greater than overtime control parameter, if, then return information to described user terminal, described information is selected for pointing out user to carry out subsequent query operation, described query manipulation is chosen as and reduces described Transaction Information scope to be checked and carry out synchronous query, or do not change described trading range to be checked and turn asynchronous query process, wherein, described overtime control parameter is the smaller value in most long process time both of allowing of remaining time available of this time inquiry and pre-defined each synchronous process.
Second aspect present invention provides a kind of device of on-line equiries Transaction Information, comprising:
Receiving element, for receiving the Transaction Information request to be checked that user terminal sends, the querying condition of Transaction Information to be checked is carried in described Transaction Information request to be checked;
Synchronous query unit, for carrying out synchronous query according to the querying condition of described Transaction Information to be checked;
Setup unit, for when described synchronous query unit initiates inquiry, the remaining time available of setting this time inquiry;
Judging unit, for in described synchronous query processing procedure, judge that synchronous query is current and consuming timely whether be greater than overtime control parameter, described overtime control parameter is the smaller value in most long process time both of allowing of remaining time available of this time inquiry and pre-defined each synchronous process;
Return unit, for when described judging unit judges that described query responding time is greater than overtime control parameter, information is returned to described user terminal, described information is selected for pointing out user to carry out subsequent query operation, described query manipulation is chosen as and reduces described Transaction Information scope to be checked and carry out synchronous query, or does not change described trading range to be checked and turn asynchronous query process.
Implement the embodiment of the present invention, there is following beneficial effect:
In the embodiment of the present invention, receive user terminal send carry the querying condition Transaction Information inquiry request of Transaction Information to be checked after, preferentially synchronous query is carried out according to described querying condition, the remaining time available of this time inquiry of setting simultaneously, when judge synchronous query current consuming time be greater than overtime control parameter time, information is returned to user terminal, described information is selected for pointing out user to carry out subsequent query operation, described query manipulation is chosen as and reduces described Transaction Information scope to be checked and carry out synchronous query, or do not change described trading range to be checked and turn asynchronous query process, wherein, described overtime control parameter is the smaller value in most long process time both of allowing of remaining time available of this time inquiry and pre-defined each synchronous process.In the present invention, querying server is in synchronous query processing procedure, judge that synchronous query is current consuming timely whether to complete in overtime control parameter, can the response time that synchronous query is concluded the business be limited in controlled range like this, guarantee that program resource can be discharged fast, thus improve the performance of system, and when querying server can be avoided to respond a large amount of query processing consuming time simultaneously, the release of program resource is slowed down, application program finally may be caused cannot to process the situation of follow-up inquiry request, thus improve utilization factor and the stability of system.
Accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, be briefly described to the accompanying drawing used required in embodiment or description of the prior art below, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
The schematic flow sheet of the method for a kind of on-line equiries Transaction Information that Fig. 1 provides for the embodiment of the present invention;
The schematic flow sheet of the method for the another kind of on-line equiries Transaction Information that Fig. 2 provides for the embodiment of the present invention;
The schematic flow sheet of the method for the another kind of on-line equiries Transaction Information that Fig. 3 provides for the embodiment of the present invention;
The structural representation of the device of a kind of on-line equiries Transaction Information that Fig. 4 provides for the embodiment of the present invention;
The structural representation of the device of the another kind of on-line equiries Transaction Information that Fig. 5 provides for the embodiment of the present invention;
The structural representation of the device of the another kind of on-line equiries Transaction Information that Fig. 6 provides for the embodiment of the present invention;
The structural representation of the asynchronous task processing module in the device of a kind of on-line equiries Transaction Information that Fig. 7 provides for the embodiment of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, be clearly and completely described the technical scheme in the embodiment of the present invention, obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.
The synchronous query mentioned in the embodiment of the present invention is after user terminal to send the instruction of query manipulation to querying server, will wait for that Query Result is returned user terminal by querying server always, then just proceeds next step operation.Asynchronous query is after user terminal to have issued the instruction of query manipulation to querying server, next statement of query statement instruction will be performed at once, and do not need querying server by the time Query Result to be returned user terminal, described user terminal can comprise the internet devices such as PC, smart mobile phone (as Android phone, iOS mobile phone etc.), panel computer, palm PC, mobile internet device (MID, Mobile InternetDevices) or wearable intelligent equipment.
The embodiment of the present invention provides a kind of method and device of on-line equiries Transaction Information, can improve the utilization factor of system, performance and stability.Describe in detail respectively below.
Refer to Fig. 1, the schematic flow sheet of the method for a kind of on-line equiries Transaction Information that Fig. 1 provides for the embodiment of the present invention.As shown in Figure 1, the method for this on-line equiries Transaction Information can comprise the following steps:
101, receive the Transaction Information request to be checked that user terminal sends, the querying condition of Transaction Information to be checked is carried in described Transaction Information request to be checked.
In the embodiment of the present invention, before initiation inquiry transaction, user is by input inquiry condition on interface, and described querying condition is that the trading range of Transaction Information to be checked starts period, Close Date and other optional query argument, and the embodiment of the present invention is not construed as limiting.
102, synchronous query is carried out according to the querying condition of described Transaction Information to be checked, the remaining time available of this time inquiry of setting simultaneously.
In the embodiment of the present invention, after querying server receives the inquiry request of the querying condition carrying Transaction Information to be checked, querying server, according to querying condition, preferentially carries out synchronous query, the remaining time available of this time inquiry of querying server setting simultaneously.
103, in synchronous query processing procedure, judge that synchronous query is current and consuming timely whether be greater than overtime control parameter, if, then return information to described user terminal, described information is selected for pointing out user to carry out subsequent query operation, described query manipulation is chosen as and reduces described Transaction Information scope to be checked and carry out synchronous query, or do not change described trading range to be checked and turn asynchronous query process, wherein, described overtime control parameter is the smaller value in most long process time both of allowing of remaining time available of this time inquiry and pre-defined each synchronous process.
In the embodiment of the present invention, the most long process time that querying server pre-defines the permission of each synchronous process is 30 seconds, the most long process time that remaining time available of server settings this time inquiry and server pre-define that each synchronous process allows can be the same or different, and the embodiment of the present invention is not construed as limiting.
In the embodiment of the present invention, in synchronous query processing procedure, judge that synchronous query is current consuming timely whether to complete in overtime control parameter, if, then Query Result is directly returned to user terminal, if not, user is then pointed out to reduce inquiry trading range, or turn asynchronous query, can the response time that synchronous query is concluded the business be limited in controlled range like this, guarantee that program resource can be discharged fast, thus improve the performance of system, and program can be avoided to respond a large amount of query processings consuming time simultaneously, the release of program resource is slowed down, application program finally may be caused cannot to process the situation of follow-up inquiry request, thus improve utilization factor and the stability of system.
As a kind of possible embodiment, in the method for the on-line equiries Transaction Information described by Fig. 1, if synchronous query is current consuming time when being less than described overtime control parameter, then illustrate that this time inquiry inquiry trading information data amount is less, querying server can process in overtime control parameter temporal, this status inquiry server, after query processing completes, returns Query Result directly to user terminal.
In the method for the on-line equiries Transaction Information described by Fig. 1, receive the Transaction Information request to be checked that user terminal sends, the querying condition of Transaction Information to be checked is carried in described Transaction Information request to be checked, preferentially synchronous query is carried out according to querying condition, the remaining time available of this time inquiry of setting simultaneously, in synchronous query process, judge that synchronous query is current and consuming timely whether be greater than overtime control parameter, if this time synchronous query is current be consuming timely greater than overtime control parameter, then illustrate that the data volume of this time inquiry is larger, cannot complete within the scope of certain hour, now return information to user terminal, the scope that prompting user reduces Transaction Information to be checked proceeds synchronous query, or not changing trading range to be checked turns asynchronous query, in the present embodiment in synchronous query processing procedure, judge whether the synchronous query response time can complete in overtime control parameter, can the response time that synchronous query is concluded the business be limited in controlled range like this, ensure that program resource can be discharged fast, thus improve the performance of system, and avoid program to respond a large amount of query processings consuming time simultaneously, the release of program resource is slowed down, application program finally may be caused cannot to process the situation of follow-up inquiry request, thus improve utilization factor and the stability of system, if this time synchronous query is current be consuming timely less than overtime control parameter, then illustrate that the data volume of this time inquiry is less, can complete in overtime control parameter area, now adopt synchronous query that user can be made to obtain Query Result fast.
Refer to Fig. 2, the schematic flow sheet of the method for the another kind of on-line equiries Transaction Information that Fig. 2 provides for the embodiment of the present invention.
201, receive the Transaction Information request to be checked that user terminal sends, the querying condition of Transaction Information to be checked is carried in described Transaction Information request to be checked.
In the embodiment of the present invention, before initiation inquiry transaction, user is by input inquiry condition on interface, described querying condition is that the trading range that user inputs Transaction Information to be checked by interface starts period, Close Date and other optional query argument, and the embodiment of the present invention is not construed as limiting.
202, carry out synchronous query according to the querying condition of described Transaction Information to be checked, set simultaneously and this time inquire about remaining time available.
In the embodiment of the present invention, querying server receives the inquiry request of the querying condition carrying Transaction Information to be checked, and querying server, according to querying condition, preferentially carries out synchronous query, sets simultaneously and this time inquires about remaining time available.
203, in synchronous query processing procedure, judge that synchronous query is current consuming time when being greater than overtime control parameter, return information to user terminal, user selects to reduce Transaction Information scope to be checked according to information and carries out synchronous query.
In the embodiment of the present invention, in synchronous query processing procedure, when server judge synchronous query current consuming time be greater than overtime control parameter time, information is returned to user terminal, described information carries out synchronous query for pointing out user to reduce described trading range to be checked, or do not change described trading range to be checked and turn asynchronous query process, if user selects to reduce trading range to be checked proceed synchronous query, then repeat the step of 101-103.
In the method for the on-line equiries Transaction Information described by Fig. 2, receive the Transaction Information request to be checked that user terminal sends, the querying condition of Transaction Information to be checked is carried in described Transaction Information request to be checked, preferentially synchronous query is carried out according to querying condition, the remaining time available of this time inquiry of setting simultaneously, server is in synchronous query processing procedure, judge that synchronous query is current consuming time when can not complete in overtime control parameter, prompting user reduces inquiry trading range, or turn asynchronous query, if user selects to reduce trading range to be checked and proceeds synchronous query, can the response time that synchronous query is concluded the business be limited in controlled range like this, guarantee that program resource can be discharged fast, thus improve the performance of system, and program can be avoided to respond a large amount of query processings consuming time simultaneously, the release of program resource is slowed down, application program finally may be caused cannot to process the situation of follow-up inquiry request, thus improve utilization factor and the stability of system.
Refer to Fig. 3, the schematic flow sheet of the method for the another kind of on-line equiries Transaction Information that Fig. 3 provides for the embodiment of the present invention.
301, receive the Transaction Information request to be checked that user terminal sends, the querying condition of Transaction Information to be checked is carried in described Transaction Information request to be checked.
In the embodiment of the present invention, before initiation inquiry transaction, user is by input inquiry condition on interface, described querying condition is that the trading range that user inputs Transaction Information to be checked by interface starts period, Close Date and other optional query argument, and the embodiment of the present invention is not construed as limiting.
302, carry out synchronous query according to the querying condition of described Transaction Information to be checked, set simultaneously and this time inquire about remaining time available.
In the embodiment of the present invention, querying server receives the inquiry request of the querying condition carrying Transaction Information to be checked, and querying server, according to querying condition, preferentially carries out synchronous query, sets simultaneously and this time inquires about remaining time available.
303, in synchronous query processing procedure, judge that synchronous query is current consuming time when being greater than overtime control parameter, return information to user terminal, user selects asynchronous query according to information.
In the embodiment of the present invention, in synchronous query processing procedure, when querying server judge synchronous query current consuming time be greater than overtime control parameter time, information is returned to user terminal, described information carries out synchronous query for pointing out user to reduce described trading range to be checked, or do not change described trading range to be checked and turn asynchronous query process, if user selects not change trading range to be checked, then turn asynchronous query.
304, information registration is carried out to asynchronous task, after having registered, asynchronous task number is returned to user terminal, and asynchronous task is stored in asynchronous task registration form.
In the embodiment of the present invention, querying server carries out information registration to asynchronous task, described information register content comprises process class corresponding to asynchronous task number, the enrollment time of asynchronous task, the deadline of asynchronous task, asynchronous task state, asynchronous task and request message corresponding to asynchronous task, after described asynchronous task has been registered, described asynchronous task number is returned to described user terminal, according to the request for information of the asynchronous task number described asynchronous task of inquiry, and described asynchronous task can be stored in asynchronous task registration form for subsequent user.
305, a timed task is defined, regularly inquiry asynchronous task registration form.
In the embodiment of the present invention, server pre-defines a timed task, regularly inquiry asynchronous task registration form, and described regular inquiry is for inquire about an asynchronous task registration form every 1 second querying server.
306, the time adding described asynchronous task registration form according to described asynchronous task sorts, and from described asynchronous task registration form, filters out according to the order of described sequence the asynchronous task that front N pen do not complete.
In the embodiment of the present invention, the time that querying server adds asynchronous task registration form according to asynchronous task sorts, and sequentially screen out according to sequence the asynchronous task that front N pen do not complete, wherein N be more than or equal to 1 integer, the asynchronous task state do not completed have processed, untreated and process in.
307, adopt row level to be locked into row locking to each asynchronous task of the asynchronous task that N pen does not complete, lock successfully, judge whether described asynchronous task is untreated, if so, then described asynchronous task is designated in process.
In the embodiment of the present invention, the each asynchronous task of querying server to the asynchronous task that the N pen screened from asynchronous task registration form does not complete adopts row level to be locked into row locking, lock successfully, judge whether described asynchronous task state is untreated, if, be then in processing by described asynchronous task status indicator, described row level lock is a kind of exclusive lock, for pinning certain a line of table, limit the access mode of other users to this row, but the operation of reading this journey can not be stoped, it is the one lock that in MySQL, granularity is minimum, he can greatly reduce the conflict of database manipulation.But granularity is less, the cost of realization is also higher.
308, according to the object of specifying in described asynchronous task registration form and the request message information corresponding with described appointed object, call the data enquire method identical with synchronous query and process.
In the embodiment of the present invention, querying server is according to the object of specifying in described asynchronous task registration form and the request message information corresponding with described appointed object, call the data enquire method identical with synchronous query to process, server after described asynchronous task process completes, by described asynchronous task status indicator for complete.
309, receive the inquiry request that described user terminal sends, described inquiry request carries described asynchronous task number, and described server judges whether described asynchronous task completes, and if so, then returns Query Result to described terminal.
In the embodiment of the present invention, the asynchronous task number that querying server inputs according to user, inquire about the request for information with asynchronous task number corresponding asynchronous task, if described asynchronous task completes, then querying server returns the result of inquiry to described user terminal.Querying server returns the mode of Query Result to user terminal can with in synchronous query process, return Query Result to user terminal or return the mode of information the same, also can be different, such as, synchronous query and asynchronous query all adopt the mode of message, or synchronous query adopts the mode of message, asynchronous query adopts the mode of file, and the mode that in this enforcement, server returned results or returned information to user terminal does not limit.
Further, in embodiments of the present invention, in described asynchronous task processing procedure, described querying server limits the number of threads for the treatment of asynchronous task, the proportional range that the described number of threads for the treatment of asynchronous task accounts for total number of threads is 10% ~ 20%, described server real-time monitoring user selects the situation of inquiry mode, and whether the described number of threads for the treatment of asynchronous task of assessment meets demand, if not, server carries out adjusting the described number of threads for the treatment of asynchronous task according to described proportional range.Such as, when server monitoring is comparatively well-to-do to synchronous query, when asynchronous query is comparatively nervous, server can according to the number of threads of the suitable increase of described proportional range for the treatment of asynchronous task, and for example, server monitoring is comparatively nervous to synchronous query, and when asynchronous query is comparatively well-to-do, server can according to the number of threads of the suitable reduction of described proportional range for the treatment of asynchronous task.
In the method for the on-line equiries Transaction Information described by Fig. 3, in synchronous query processing procedure, judge that synchronous query is current consuming timely whether to complete in overtime control parameter, can the response time that synchronous query is concluded the business be limited in controlled range like this, guarantee that program resource can be discharged fast, thus improve the performance of system, and program can be avoided to respond a large amount of query processings consuming time simultaneously, the release of program resource is slowed down, application program finally may be caused cannot to process the situation of follow-up inquiry request, thus improve utilization factor and the stability of server.
Refer to Fig. 4, the structural drawing of the device of a kind of on-line equiries Transaction Information that Fig. 4 provides for the embodiment of the present invention.
Receiving element 401, for receiving the Transaction Information request to be checked that user terminal sends, the querying condition of Transaction Information to be checked is carried in described Transaction Information request to be checked.
Synchronous query unit 402, for carrying out synchronous query according to the querying condition of described Transaction Information to be checked.
Setup unit 403, for when described synchronous query unit initiates inquiry, the remaining time available of setting this time inquiry.
Judging unit 404, for in described synchronous query processing procedure, judge that synchronous query is current and consuming timely whether be greater than overtime control parameter, described overtime control parameter be remaining time available of described querying server setting this time inquiry and described querying server pre-define that each synchronous process allows the most long process time both in smaller value.
Return unit 405, for when described judging unit judges that described query responding time is greater than overtime control parameter, information is returned to described user terminal, described information is selected for pointing out user to carry out subsequent query operation, described query manipulation is chosen as and reduces described Transaction Information scope to be checked and carry out synchronous query, or does not change described trading range to be checked and turn asynchronous query process.
As a kind of possible embodiment, return unit 405 also for judge at judging unit 404 synchronous query current consuming time be less than overtime control parameter time, Query Result is directly returned to user terminal.
In the server shown in Fig. 4, receiving element 401 receives the Transaction Information request to be checked that user terminal sends, the querying condition of Transaction Information to be checked is carried in described Transaction Information request to be checked, query unit 402 preferentially carries out synchronous query according to querying condition, setup unit 403 sets the remaining time available of this time inquiry simultaneously, judging unit 404 is in synchronous query process, judge that synchronous query is current consuming time when being greater than overtime control parameter, return unit 405 and return information to user terminal, the scope that prompting user reduces Transaction Information to be checked proceeds synchronous query, or not changing trading range to be checked turns asynchronous query.In embodiments of the present invention, in synchronous query processing procedure, judge that synchronous query is current consuming timely whether to complete in overtime control parameter, can the response time that synchronous query is concluded the business be limited in controlled range like this, guarantee that program resource can be discharged fast, thus improve the performance of system, and program can be avoided to respond a large amount of query processings consuming time simultaneously, the release of program resource is slowed down, application program finally may be caused cannot to process the situation of follow-up inquiry request, thus improve utilization factor and the stability of system.
Refer to Fig. 5, the structural drawing of the device of the another kind of on-line equiries Transaction Information that Fig. 5 provides for the embodiment of the present invention.
Receiving element 501, for receiving the Transaction Information request to be checked that user terminal sends, the querying condition of Transaction Information to be checked is carried in described Transaction Information request to be checked.
Synchronous query unit 502, for carrying out synchronous query according to the querying condition of described Transaction Information to be checked.
Setup unit 503, for when described synchronous query unit initiates inquiry, the remaining time available of setting this time inquiry.
Judging unit 504, for in described synchronous query processing procedure, judge that synchronous query is current and consuming timely whether be greater than overtime control parameter, described overtime control parameter be remaining time available of described querying server setting this time inquiry and described querying server pre-define that each synchronous process allows the most long process time both in smaller value.
Return unit 505, for when described judging unit judges that described query responding time is greater than overtime control parameter, information is returned to described user terminal, described information is selected for pointing out user to carry out subsequent query operation, described query manipulation is chosen as and reduces described Transaction Information scope to be checked and carry out synchronous query, or does not change described trading range to be checked and turn asynchronous query process.
As a kind of possible embodiment, receiving element 501 is also for receiving the Transaction Information inquiry request reducing trading range to be checked that described user terminal sends, synchronous query unit 502 also for receive described user terminal send reduce the Transaction Information inquiry request of trading range to be checked after, synchronous query is carried out to described Transaction Information request to be checked.
As a kind of possible embodiment, receiving element 501 is also for receiving the asynchronous query request that described user terminal sends, asynchronous query unit is used for, after the asynchronous query request receiving the transmission of described user terminal, carrying out asynchronous query to described Transaction Information request to be checked.
In the server shown in Fig. 5, receiving element 501 receives the Transaction Information request to be checked that user terminal sends, the querying condition of Transaction Information to be checked is carried in described Transaction Information request to be checked, synchronous query unit 502 preferentially carries out synchronous query according to querying condition, setup unit 503 sets the remaining time available of this time inquiry simultaneously, judging unit 504 is in synchronous query process, judge that synchronous query is current consuming time when being greater than overtime control parameter, return unit 505 and return information to user terminal, the scope that prompting user reduces Transaction Information to be checked proceeds synchronous query, or not changing trading range to be checked turns asynchronous query.In embodiments of the present invention, in synchronous query processing procedure, judge that synchronous query is current consuming timely whether to complete in overtime control parameter, can the response time that synchronous query is concluded the business be limited in controlled range like this, guarantee that program resource can be discharged fast, thus improve the performance of system, and program can be avoided to respond a large amount of query processings consuming time simultaneously, the release of program resource is slowed down, application program finally may be caused cannot to process the situation of follow-up inquiry request, thus improve utilization factor and the stability of system.
Refer to Fig. 6, the structural drawing of the device of the another kind of on-line equiries Transaction Information that Fig. 6 provides for the embodiment of the present invention.
Receiving element 601, for receiving the Transaction Information request to be checked that user terminal sends, the querying condition of Transaction Information to be checked is carried in described Transaction Information request to be checked.
Synchronous query unit 602, for carrying out synchronous query according to the querying condition of described Transaction Information to be checked.
Setup unit 603, for when described synchronous query unit initiates inquiry, the remaining time available of setting this time inquiry.
Judging unit 604, for in described synchronous query processing procedure, judge that synchronous query is current and consuming timely whether be greater than overtime control parameter, described overtime control parameter be remaining time available of described querying server setting this time inquiry and described querying server pre-define that each synchronous process allows the most long process time both in smaller value.
Return unit 605, for judge at described judging unit described synchronous query current consuming time be greater than overtime control parameter time, information is returned to described user terminal, described information is selected for pointing out user to carry out subsequent query operation, described query manipulation is chosen as and reduces described Transaction Information scope to be checked and carry out synchronous query, or does not change described trading range to be checked and turn asynchronous query process.
Receiving element 601, also sends asynchronous query request for receiving described user terminal.
Asynchronous task Registration Module 606, for carrying out information registration to described asynchronous task, described information register content comprises process class corresponding to asynchronous task number, the enrollment time of asynchronous task, the deadline of asynchronous task, asynchronous task state, asynchronous task and request message corresponding to asynchronous task, after described asynchronous task has been registered, described asynchronous task number is returned to described user terminal, and the described asynchronous task of registration is stored in asynchronous task registration form.
Asynchronous task processing module 607, for obtaining registered asynchronous task and processing described asynchronous task.
Receive subelement 608, for receiving the inquiry request that described user terminal sends, described inquiry request carries described asynchronous task number.
First judgment sub-unit 609, for judging whether described asynchronous task completes.
Return subelement 610, for when described judging unit judges that described asynchronous task completes, return Query Result to user terminal.
Further, in asynchronous task processing procedure, limit unit, in described asynchronous task processing procedure, limit the number of threads for the treatment of asynchronous task, the proportional range that the described number of threads for the treatment of asynchronous task accounts for total number of threads is 10% ~ 20%.
Monitoring unit, selects the situation of inquiry mode for real-time supervisory user.
Whether assessment unit, meet demand for assessment of the described number of threads for the treatment of asynchronous task.
Adjustment unit, for when the described number of threads for the treatment of asynchronous task of described assessment unit assessment does not meet demand, carries out adjusting the described number of threads for the treatment of asynchronous task according to described proportional range.
Further, in synchronous query or asynchronous query process, described in return unit for the concrete mode returning information to described user terminal or return Query Result be any one of message mode or file mode.
It is described that to return subelement for returning the concrete mode of Query Result to described user terminal be any one of message mode or file mode.
In the server shown in Fig. 6, server is in synchronous query processing procedure, judge that synchronous query is current consuming timely whether to complete in overtime control parameter, can the response time that synchronous query is concluded the business be limited in controlled range like this, guarantee that program resource can be discharged fast, thus improve the performance of system, and program can be avoided to respond a large amount of query processings consuming time simultaneously, the release of program resource is slowed down, application program finally may be caused cannot to process the situation of follow-up inquiry request, thus improve utilization factor and the stability of server.
Refer to Fig. 7, the structural drawing of asynchronous task processing module in the device of a kind of on-line equiries Transaction Information that Fig. 7 provides for the embodiment of the present invention.
Definition unit 701, for defining a timed task, described timed task is used for regularly inquiry asynchronous task registration form.
Sequencing unit 702, the time adding described asynchronous task registration form according to described asynchronous task sorts.
Screening unit 703, for filtering out the asynchronous task that front N pen does not complete from described asynchronous task registration form according to the clooating sequence of described sequencing unit, wherein N be more than or equal to 1 integer.
Lock cell 704, for adopting row level to be locked into row locking to described each asynchronous task do not completed.
Second judgment sub-unit 705, lock successfully for going level at described lock cell to described each asynchronous task do not completed, whether the asynchronous task state do not completed described in judgement is untreated.
First identify unit 706, for when the asynchronous task state do not completed described in described judging unit judgement is untreated, identifies described asynchronous task state in process.
Call unit 707, for according to the object of specifying in described asynchronous task registration form and the request message information corresponding with described appointed object, calls the data enquire method identical with synchronous query and processes.
Second identify unit 708, for after described asynchronous process task completes, by described asynchronous task status indicator for complete.
In the embodiment of the present invention, in synchronous query processing procedure, judge that synchronous query is current consuming timely whether to complete in overtime control parameter, can the response time that synchronous query is concluded the business be limited in controlled range like this, guarantee that program resource can be discharged fast, thus improve the performance of system, and program can be avoided to respond a large amount of query processings consuming time simultaneously, the release of program resource is slowed down, application program finally may be caused cannot to process the situation of follow-up inquiry request, thus improve utilization factor and the stability of system.
One of ordinary skill in the art will appreciate that all or part of flow process realized in above-described embodiment method, that the hardware that can carry out instruction relevant by computer program has come, described program can be stored in computer read/write memory medium, this program, when performing, can comprise the flow process of the embodiment as above-mentioned each side method.Wherein, described storage medium can be magnetic disc, CD, read-only store-memory body (Read-Only Memory, ROM) or random store-memory body (Random Access Memory, RAM) etc.
Above disclosedly be only present pre-ferred embodiments, certainly can not limit the interest field of the present invention with this, therefore according to the equivalent variations that the claims in the present invention are done, still belong to the scope that the present invention is contained.

Claims (14)

1. a method for on-line equiries Transaction Information, is characterized in that, comprising:
Receive the Transaction Information request to be checked that user terminal sends, the querying condition of Transaction Information to be checked is carried in described Transaction Information request to be checked;
Querying condition according to described Transaction Information to be checked carries out synchronous query, the remaining time available of this time inquiry of setting simultaneously;
In described synchronous query processing procedure, judge that synchronous query is current and consuming timely whether be greater than overtime control parameter, if, then return information to described user terminal, described information is selected for pointing out user to carry out subsequent query operation, described query manipulation is chosen as and reduces described Transaction Information scope to be checked and carry out synchronous query, or do not change described trading range to be checked and turn asynchronous query process, wherein, described overtime control parameter is the smaller value in most long process time both of allowing of remaining time available of this time inquiry and pre-defined each synchronous process.
2. method according to claim 1, is characterized in that, described method also comprises:
Receive the Transaction Information inquiry request reducing trading range to be checked that described user terminal sends, synchronous query is carried out to described Transaction Information request to be checked;
Receive the asynchronous query request that described user terminal sends, asynchronous query is carried out to described Transaction Information request to be checked.
3. method according to claim 1, is characterized in that, described method also comprises:
If judge, described synchronous query is current consuming time when being less than described overtime control parameter, then return Query Result to described user terminal.
4. if method according to claim 2, is characterized in that, when receiving the asynchronous query request of described user terminal transmission described, carries out asynchronous query, comprising described Transaction Information request to be checked:
Information registration is carried out to described asynchronous task, described information register content comprises process class corresponding to asynchronous task number, the enrollment time of asynchronous task, the deadline of asynchronous task, asynchronous task state, asynchronous task and request message corresponding to asynchronous task, after described asynchronous task has been registered, described asynchronous task number is returned to described user terminal, and the described asynchronous task of registration is stored in asynchronous task registration form;
Obtain registered asynchronous task and described asynchronous task is processed;
Receive the inquiry request that described user terminal sends, described inquiry request carries described asynchronous task number, judges whether described asynchronous task completes, if so, then returns Query Result to described terminal.
5. method according to claim 4, is characterized in that, described method also comprises:
In described asynchronous task processing procedure, limit the number of threads for the treatment of asynchronous task, the proportional range that the described number of threads for the treatment of asynchronous task accounts for total number of threads is 10% ~ 20%;
The described user of real-time monitoring selects the situation of inquiry mode, and whether the described number of threads for the treatment of asynchronous task of assessment meets demand, if not, then carries out adjusting the described number of threads for the treatment of asynchronous task according to described proportional range.
6. method according to claim 4, is characterized in that, the registered asynchronous task of described acquisition also processes described asynchronous task, comprising:
Define a timed task, described timed task is used for regularly inquiry asynchronous task registration form;
The time adding described asynchronous task registration form according to described asynchronous task sorts, and from described asynchronous task registration form, filters out according to the order of described sequence the asynchronous task that front N pen do not complete, wherein N be more than or equal to 1 integer;
Adopting row level to be locked into row locking to each asynchronous task of the asynchronous task that described N pen does not complete, lock successfully, judge whether described asynchronous task state is untreated, is if so, then in processing by described asynchronous task status indicator;
According to the object of specifying in described asynchronous task registration form and the request message information corresponding with described appointed object, call the data enquire method identical with synchronous query and process;
After described asynchronous process task completes, by described asynchronous task status indicator for complete.
7. the method according to claim 1,3 and 4, is characterized in that, describedly returns information to described user terminal or describedly returns Query Result to user terminal, comprising:
In synchronous query or asynchronous query process, the mode returning information to described user terminal is any one of message mode or file mode;
The mode returning Query Result to described user terminal is any one of message mode or file mode.
8. a device for on-line equiries Transaction Information, is characterized in that, comprising:
Receiving element, for receiving the Transaction Information request to be checked that user terminal sends, the querying condition of Transaction Information to be checked is carried in described Transaction Information request to be checked;
Synchronous query unit, for carrying out synchronous query according to the querying condition of described Transaction Information to be checked;
Setup unit, for when described synchronous query unit initiates inquiry, the remaining time available of setting this time inquiry;
Judging unit, for in described synchronous query processing procedure, judge that synchronous query is current and consuming timely whether be greater than overtime control parameter, described overtime control parameter is the smaller value in most long process time both of allowing of remaining time available of this time inquiry and pre-defined each synchronous process;
Return unit, for when described judging unit judges that described query responding time is greater than overtime control parameter, information is returned to described user terminal, described information is selected for pointing out user to carry out subsequent query operation, described query manipulation is chosen as and reduces described Transaction Information scope to be checked and carry out synchronous query, or does not change described trading range to be checked and turn asynchronous query process.
9. device according to claim 8, is characterized in that:
Described receiving element, also for receiving the Transaction Information inquiry request reducing trading range to be checked that described user terminal sends;
Described synchronous query unit, also for receive at described receiving element described user terminal send reduce the Transaction Information inquiry request of trading range to be checked time, synchronous query is carried out to described Transaction Information request to be checked;
Described receiving element, also sends asynchronous query request for receiving described user terminal;
Asynchronous query unit, time also for receiving described user terminal transmission asynchronous query request at described receiving element, carries out asynchronous query to described Transaction Information request to be checked.
10. device according to claim 7, is characterized in that:
Describedly return unit, also for judge at described judging unit described synchronous query current consuming time be less than described overtime control parameter time, return Query Result to described user terminal.
11. devices according to claim 7, is characterized in that, when described receiving element receives the asynchronous query request of described user terminal transmission, carry out asynchronous query, comprising described Transaction Information request to be checked:
Asynchronous task Registration Module, for carrying out information registration to described asynchronous task, described information register content comprises process class corresponding to asynchronous task number, the enrollment time of asynchronous task, the deadline of asynchronous task, asynchronous task state, asynchronous task and request message corresponding to asynchronous task, after described asynchronous task has been registered, described asynchronous task number is returned to described user terminal, and the described asynchronous task of registration is stored in asynchronous task registration form;
Asynchronous task processing module, for obtaining registered asynchronous task and processing described asynchronous task;
Receive subelement, for receiving the inquiry request that described user terminal sends, described inquiry request carries described asynchronous task number;
First judgment sub-unit, for judging whether described asynchronous task completes;
Return subelement, for when described judging unit judges that described asynchronous task completes, return Query Result to user terminal.
12. devices according to claim 11, is characterized in that, also for:
Limit unit, in described asynchronous task processing procedure, limit the number of threads for the treatment of asynchronous task, the described number of threads for the treatment of asynchronous task accounts for the preset ratio scope of total number of threads;
Monitoring unit, selects the situation of inquiry mode for monitoring described user in real time;
Whether assessment unit, meet demand for assessment of the described number of threads for the treatment of asynchronous task;
Adjustment unit, for when the described number of threads for the treatment of asynchronous task of described assessment unit assessment does not meet demand, carries out adjusting the described number of threads for the treatment of asynchronous task according to described preset ratio scope.
13. devices according to claim 11, is characterized in that, described asynchronous task processing module obtains registered asynchronous task and processes described asynchronous task, comprising:
Definition unit, for defining a timed task, described timed task is used for regularly inquiry asynchronous task registration form;
Sequencing unit, the time adding described asynchronous task registration form according to described asynchronous task sorts;
Screening unit, for filtering out the asynchronous task that front N pen does not complete from described asynchronous task registration form according to the clooating sequence of described sequencing unit, wherein N be more than or equal to 1 integer;
Lock cell, for adopting row level to be locked into row locking to described each asynchronous task do not completed;
Second judgment sub-unit, lock successfully for going level at described lock cell to described each asynchronous task do not completed, whether the asynchronous task state do not completed described in judgement is untreated;
First identify unit, for when the asynchronous task state do not completed described in described judging unit judgement is untreated, identifies described asynchronous task state in process;
Call unit, for according to the object of specifying in described asynchronous task registration form and the request message information corresponding with described appointed object, calls the data enquire method identical with synchronous query and processes;
Second identify unit, for after described asynchronous process task completes, by described asynchronous task status indicator for complete.
Device described in 14. according to Claim 8,10 and 11, is characterized in that:
In synchronous query or asynchronous query process, described in return unit for the concrete mode returning information to described user terminal or return Query Result be any one of message mode or file mode;
It is described that to return subelement for returning the concrete mode of Query Result to described user terminal be any one of message mode or file mode.
CN201410594467.3A 2014-10-29 2014-10-29 Trade information on-line inquiry method and device Pending CN104408065A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410594467.3A CN104408065A (en) 2014-10-29 2014-10-29 Trade information on-line inquiry method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410594467.3A CN104408065A (en) 2014-10-29 2014-10-29 Trade information on-line inquiry method and device

Publications (1)

Publication Number Publication Date
CN104408065A true CN104408065A (en) 2015-03-11

Family

ID=52645697

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410594467.3A Pending CN104408065A (en) 2014-10-29 2014-10-29 Trade information on-line inquiry method and device

Country Status (1)

Country Link
CN (1) CN104408065A (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105208125A (en) * 2015-09-30 2015-12-30 百度在线网络技术(北京)有限公司 Message transmission method, device and system
CN105243169A (en) * 2015-11-12 2016-01-13 中国建设银行股份有限公司 Data query method and system
CN105872170A (en) * 2016-03-28 2016-08-17 北京小米移动软件有限公司 Method and device for searching contact person
WO2016206550A1 (en) * 2015-06-25 2016-12-29 中兴通讯股份有限公司 Electronic worksheet processing method and device
CN106919621A (en) * 2015-12-28 2017-07-04 航天信息股份有限公司 Transaction Information querying method, inquiry unit and inquiry system
CN107943922A (en) * 2017-11-21 2018-04-20 北京锐安科技有限公司 A kind of method for information retrieval and device based on solr
CN108920278A (en) * 2018-07-02 2018-11-30 中国建设银行股份有限公司 Resource allocation methods and device
CN110555769A (en) * 2019-07-25 2019-12-10 深圳壹账通智能科技有限公司 Block chain transaction data processing method and device, computer equipment and storage medium
CN112818202A (en) * 2019-11-18 2021-05-18 北京京东振世信息技术有限公司 Data query method and device
CN113535782A (en) * 2021-07-22 2021-10-22 成都数之联科技有限公司 BI report query response method, system, electronic equipment and computer readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102096708A (en) * 2011-01-17 2011-06-15 中国工商银行股份有限公司 Device and method for realizing online transaction asynchronous processing based on database
CN101882161B (en) * 2010-06-23 2012-07-04 中国工商银行股份有限公司 Application level asynchronous task scheduling system and method
WO2013075446A1 (en) * 2011-11-22 2013-05-30 华为技术有限公司 Service processing method and system
CN103324724A (en) * 2013-06-26 2013-09-25 华为技术有限公司 Method and device for processing data
CN103701720A (en) * 2014-01-13 2014-04-02 中国银行股份有限公司 Communication method with Socket server and online transaction management system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101882161B (en) * 2010-06-23 2012-07-04 中国工商银行股份有限公司 Application level asynchronous task scheduling system and method
CN102096708A (en) * 2011-01-17 2011-06-15 中国工商银行股份有限公司 Device and method for realizing online transaction asynchronous processing based on database
WO2013075446A1 (en) * 2011-11-22 2013-05-30 华为技术有限公司 Service processing method and system
CN103324724A (en) * 2013-06-26 2013-09-25 华为技术有限公司 Method and device for processing data
CN103701720A (en) * 2014-01-13 2014-04-02 中国银行股份有限公司 Communication method with Socket server and online transaction management system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
D.贝纳格等: "《Visual Studio使用大全》", 31 December 1998 *

Cited By (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106327038A (en) * 2015-06-25 2017-01-11 中兴通讯股份有限公司 Electronic worksheet processing method and apparatus
WO2016206550A1 (en) * 2015-06-25 2016-12-29 中兴通讯股份有限公司 Electronic worksheet processing method and device
CN105208125B (en) * 2015-09-30 2019-12-17 百度在线网络技术(北京)有限公司 message transmission method, device and system
CN105208125A (en) * 2015-09-30 2015-12-30 百度在线网络技术(北京)有限公司 Message transmission method, device and system
CN105243169B (en) * 2015-11-12 2019-01-29 中国建设银行股份有限公司 A kind of data query method and system
CN105243169A (en) * 2015-11-12 2016-01-13 中国建设银行股份有限公司 Data query method and system
CN106919621A (en) * 2015-12-28 2017-07-04 航天信息股份有限公司 Transaction Information querying method, inquiry unit and inquiry system
CN106919621B (en) * 2015-12-28 2021-03-26 航天信息股份有限公司 Transaction information query method, query device and query system
CN105872170A (en) * 2016-03-28 2016-08-17 北京小米移动软件有限公司 Method and device for searching contact person
CN105872170B (en) * 2016-03-28 2019-05-10 北京小米移动软件有限公司 Method and apparatus for searching for contact person
CN107943922A (en) * 2017-11-21 2018-04-20 北京锐安科技有限公司 A kind of method for information retrieval and device based on solr
CN107943922B (en) * 2017-11-21 2020-08-25 北京锐安科技有限公司 Method and device for retrieving information based on solr
CN108920278A (en) * 2018-07-02 2018-11-30 中国建设银行股份有限公司 Resource allocation methods and device
CN110555769A (en) * 2019-07-25 2019-12-10 深圳壹账通智能科技有限公司 Block chain transaction data processing method and device, computer equipment and storage medium
CN112818202A (en) * 2019-11-18 2021-05-18 北京京东振世信息技术有限公司 Data query method and device
CN113535782A (en) * 2021-07-22 2021-10-22 成都数之联科技有限公司 BI report query response method, system, electronic equipment and computer readable storage medium
CN113535782B (en) * 2021-07-22 2024-05-07 成都数之联科技股份有限公司 BI report query response method, system, electronic equipment and computer readable storage medium

Similar Documents

Publication Publication Date Title
CN104408065A (en) Trade information on-line inquiry method and device
CN108683604B (en) Concurrent access control method, terminal device, and medium
CN107730196B (en) Project progress management method and terminal equipment
CN109902901A (en) Method for allocating tasks, device, storage medium and computer equipment
EP3779687A1 (en) Virtual machine scheduling method and device
JP2019513246A (en) Training method of random forest model, electronic device and storage medium
CN107678844B (en) Breakpoint intelligent distribution method, electronic device and computer readable storage medium
KR20180020248A (en) Method and device for obtaining payment threshold
US20150348041A1 (en) Fraud scoring method and system for use with payment processing
CN105488039A (en) Query method and device
CN104182683A (en) Method, device and system for monitoring online transactions
CN109102245B (en) Processing method, system and device for approval process
CN103023984A (en) Terminal application server and application log filtering method thereof
CN105827406A (en) Identity verification method, identity verification device, and identity verification system
CN112053123A (en) Automatic accounting processing method and device, electronic equipment and readable storage medium
US20190147443A1 (en) Payment method based on mobile terminal and mobile terminal
CN105450737B (en) A kind of data processing method, device and system
EP3667495A1 (en) Task scheduling method, apparatus and device, and storage medium
CN107871213B (en) Transaction behavior evaluation method, device, server and storage medium
CN102521043B (en) A kind of task processing method and application system
CN112463266A (en) Execution policy generation method and device, electronic equipment and storage medium
CN105116884A (en) Control method of sweeping robot, server and service system
CN107608979B (en) Method and device for identifying potential help-seeking knowledge points of user
CN110188258B (en) Method and device for acquiring external data by using crawler
CN106648874B (en) Processing method and device for batch tasks

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20150311

RJ01 Rejection of invention patent application after publication