CN117033443A - Account balance query method and device, electronic equipment and medium - Google Patents

Account balance query method and device, electronic equipment and medium Download PDF

Info

Publication number
CN117033443A
CN117033443A CN202311038301.9A CN202311038301A CN117033443A CN 117033443 A CN117033443 A CN 117033443A CN 202311038301 A CN202311038301 A CN 202311038301A CN 117033443 A CN117033443 A CN 117033443A
Authority
CN
China
Prior art keywords
account
query
accounts
queried
operations
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
CN202311038301.9A
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.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
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 Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202311038301.9A priority Critical patent/CN117033443A/en
Publication of CN117033443A publication Critical patent/CN117033443A/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
    • G06F16/24553Query execution of query operations
    • 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
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/30Payment architectures, schemes or protocols characterised by the use of specific devices or networks
    • G06Q20/36Payment architectures, schemes or protocols characterised by the use of specific devices or networks using electronic wallets or electronic money safes
    • G06Q20/367Payment architectures, schemes or protocols characterised by the use of specific devices or networks using electronic wallets or electronic money safes involving electronic purses or money safes
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Finance (AREA)
  • General Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Computational Linguistics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The present disclosure provides an account balance query method, which may be used in the financial field or other fields. The method comprises the steps of responding to a first user request, and acquiring account information of a plurality of accounts to be queried; dividing the accounts to be queried into M account types based on account information of the accounts to be queried; and respectively calling a query interface to execute M query operations and M save operations aiming at the M account types, wherein the M query operations respectively query the balance information of the accounts to be queried in the M account types, and the M save operations respectively save the balance information queried by the M query operations, wherein at least one query operation in the M query operations and at least one save operation in the M save operations are executed in parallel. The present disclosure also provides an account balance query apparatus, device, storage medium, and program product. The method provided by the disclosure can improve the query speed and the query efficiency of account balance.

Description

Account balance query method and device, electronic equipment and medium
Technical Field
The present disclosure relates to the field of finance, and in particular, to an account balance query method, apparatus, device, medium, and program product.
Background
The real-time inquiry of the account balance is an indispensable core requirement for the business personnel of the bank to master the account balance change, know whether the account balance is sufficient, confirm whether the money drawing operation is successful and the like in real time.
In the process of realizing the conception of the present disclosure, the inventor finds that the conventional account balance query mode can uniformly and sequentially initiate query requests to the host computer for all accounts of the user, and has low query speed and low query efficiency.
Disclosure of Invention
In view of the foregoing, the present disclosure provides an account balance query method, apparatus, device, medium, and program product.
According to a first aspect of the present disclosure, there is provided an account balance query method, including: responding to a first user request, and acquiring account information of a plurality of accounts to be queried; dividing the accounts to be queried into M account types based on account information of the accounts to be queried, wherein M is an integer greater than or equal to 2; and respectively calling a query interface to execute M query operations and M save operations aiming at the M account types, wherein the M query operations respectively query the balance information of the accounts to be queried in the M account types, and the M save operations respectively save the balance information queried by the M query operations, wherein at least one query operation in the M query operations and at least one save operation in the M save operations are executed in parallel.
According to an embodiment of the present disclosure, at least two of the M query operations are performed in parallel.
According to an embodiment of the present disclosure, at least two save operations of the M save operations are performed in parallel.
According to an embodiment of the disclosure, the account information includes an account code and internal and external flag information, the account code includes an account type code, and the internal and external flag information is used for indicating a system type to which the account belongs; the step of dividing the plurality of accounts to be queried into M account types based on the account information comprises the following steps: intercepting an account type code in the account code; and dividing the plurality of accounts to be queried into M account types based on the account type codes and the internal and external sign information of the system.
According to an embodiment of the present disclosure, the M save operations include: and the M storage operations respectively receive balance information of the account to be queried, and store the balance information in M target data sources.
According to an embodiment of the present disclosure, before the step of obtaining account information of the plurality of accounts to be queried, the method further includes: acquiring an account query request of a target user; judging the number of accounts to be queried of the target user; and when the number of the accounts to be queried exceeds the preset number of accounts, determining the account query request as the first user request.
According to an embodiment of the disclosure, the step of obtaining account information of a plurality of accounts to be queried in response to a first user request includes: and responding to the first user request, and circularly acquiring the account information of the accounts to be queried until the account information of all the accounts to be queried of the target user is acquired.
According to the embodiment of the disclosure, when the number of accounts to be queried does not exceed the preset number of accounts, determining the account query request as a second user request.
A second aspect of the present disclosure provides an account balance query device, comprising: the first acquisition module is used for responding to a first user request and acquiring account information of a plurality of accounts to be queried; the classification module is used for classifying the accounts to be queried into M account types based on account information of the accounts to be queried, wherein M is an integer greater than or equal to 2; and a query and save module, configured to call a query interface to execute M query operations and execute M save operations for the M account types, where the M query operations query balance information of accounts to be queried in the M account types, and the M save operations save balance information queried by the M query operations, respectively, where at least one query operation of the M query operations and at least one save operation of the M save operations are executed in parallel.
According to an embodiment of the present disclosure, at least two of the M query operations in the query holding module are performed in parallel.
According to an embodiment of the present disclosure, at least two save operations of the M save operations in the query save module are performed in parallel.
According to an embodiment of the disclosure, the account information in the classification module includes an account code and internal and external flag information, the account code includes an account type code, and the internal and external flag information is used for indicating a system type to which the account belongs; the classification module comprises an intercepting unit for intercepting account type codes in the account codes; and the classification unit is used for classifying the accounts to be queried into M account types based on the account type codes and the internal and external sign information of the system.
According to an embodiment of the disclosure, the query holding module includes a holding unit configured to enable the M holding operations to respectively receive balance information of an account to be queried, and hold the balance information in M target data sources.
According to an embodiment of the present disclosure, the apparatus further comprises: the second acquisition module is used for acquiring an account query request of the target user; the judging module is used for judging the number of accounts to be queried of the target user; and the first switching module is used for determining the account query request as the first user request when the number of the accounts to be queried exceeds the preset number of accounts.
According to an embodiment of the present disclosure, the first acquisition module includes: the circulation acquisition unit is used for responding to the first user request and circularly acquiring the account information of the accounts to be queried until the account information of all the accounts to be queried of the target user is acquired.
According to an embodiment of the present disclosure, the apparatus further comprises: and the second switching module is used for determining the account query request as a second user request when the number of the accounts to be queried does not exceed the preset number of the accounts.
A third aspect of the present disclosure provides an electronic device, comprising: one or more processors; and a memory for storing one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the method described above.
A fourth aspect of the present disclosure also provides a computer-readable storage medium having stored thereon executable instructions that, when executed by a processor, cause the processor to perform the above-described method.
A fifth aspect of the present disclosure also provides a computer program product comprising a computer program which, when executed by a processor, implements the above method.
One or more of the above embodiments have the following advantages or benefits: according to the account balance query method, dependence and nesting among accounts in query are optimized, the accounts to be queried are classified, and balance information query operation and balance information storage operation are executed in parallel, so that high-concurrency account balance query is realized, the query speed and the query efficiency of account balance are improved, and the query accuracy is also improved.
Drawings
The foregoing and other objects, features and advantages of the disclosure will be more apparent from the following description of embodiments of the disclosure with reference to the accompanying drawings, in which:
FIG. 1 schematically illustrates an application scenario diagram of an account balance query method, apparatus, device, medium and program product according to an embodiment of the present disclosure;
FIG. 2 schematically illustrates a flow diagram of an account balance query method according to an embodiment of the present disclosure;
FIG. 3 schematically illustrates a flow chart of dividing a plurality of accounts to be queried into M account types according to an embodiment of the disclosure;
FIG. 4 schematically illustrates a flowchart of a save operation according to an embodiment of the present disclosure;
FIG. 5 schematically illustrates a flow chart of determining that an account query request is the first user request, according to an embodiment of the disclosure;
FIG. 6 schematically illustrates a system block diagram of an account balance query method according to an embodiment of the disclosure;
FIG. 7 schematically illustrates a flow diagram of an account balance query method according to an embodiment of the disclosure;
FIG. 8 schematically illustrates a block diagram of an account balance query device according to an embodiment of the disclosure; and
fig. 9 schematically illustrates a block diagram of an electronic device adapted to implement an account balance query method according to an embodiment of the disclosure.
Detailed Description
Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. It should be understood that the description is only exemplary and is not intended to limit the scope of the present disclosure. In the following detailed description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the present disclosure. It may be evident, however, that one or more embodiments may be practiced without these specific details. In addition, in the following description, descriptions of well-known structures and techniques are omitted so as not to unnecessarily obscure the concepts of the present disclosure.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The terms "comprises," "comprising," and/or the like, as used herein, specify the presence of stated features, steps, operations, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, or components.
All terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art unless otherwise defined. It should be noted that the terms used herein should be construed to have meanings consistent with the context of the present specification and should not be construed in an idealized or overly formal manner.
Where expressions like at least one of "A, B and C, etc. are used, the expressions should generally be interpreted in accordance with the meaning as commonly understood by those skilled in the art (e.g.," a system having at least one of A, B and C "shall include, but not be limited to, a system having a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.). The terms "first," "second," and the like, are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include one or more of the described features.
The real-time inquiry of the account balance is an indispensable core requirement for the business personnel of the bank to master the account balance change, know whether the account balance is sufficient, confirm whether the money drawing operation is successful and the like in real time. The function is huge for users, is frequently used every day, and has extremely severe requirements on the efficiency and accuracy of inquiry. In the traditional account balance inquiry mode, all accounts of a user are uniformly and sequentially inquired to a host computer in each inquiry mode, and after a certain number of results are obtained, data are stored once and finally displayed for the user to check. Such query processing sequences rely heavily on waiting between accounts, and processing logic is nested with each other, resulting in processing inefficiencies. With the rapid development of banking managed services, the coverage area of the services and the number of clients are increased, and with the rapid increase of the number of accounts, the method can seriously timeout, cannot meet the normal requirements of the services, and the number of accounts at the level of millions is very frequent, so that the traditional balance real-time query scheme is overwhelmed. There is therefore a need for an efficient processing method that breaks order dependencies and logical nesting that is highly concurrent.
In view of the foregoing, embodiments of the present disclosure provide an account balance query method, including: responding to a first user request, and acquiring account information of a plurality of accounts to be queried; dividing the accounts to be queried into M account types based on account information of the accounts to be queried, wherein M is an integer greater than or equal to 2; and respectively calling a query interface to execute M query operations and M save operations aiming at the M account types, wherein the M query operations respectively query the balance information of the accounts to be queried in the M account types, and the M save operations respectively save the balance information queried by the M query operations, wherein at least one query operation in the M query operations and at least one save operation in the M save operations are executed in parallel. According to the account balance query method provided by the embodiment of the disclosure, three key steps of account judgment, balance query and data storage in query logic are decoupled, so that the three key steps are independent of each other, the mutual influence is avoided, the dependence among accounts and the nesting among logics in query are optimized, the account to be queried is classified, and balance information query operation and balance information storage operation are executed in parallel, so that high-concurrency account balance query is realized, the query speed and the query efficiency of account balance are improved, and the query accuracy is also improved.
It should be noted that, the method and the device for determining account balance in the financial field can be used for inquiring account balance in any field except the financial field, and the application field of the method and the device for inquiring account balance in the present disclosure is not limited.
In the technical solution of the present disclosure, the related user information (including, but not limited to, user personal information, user image information, user equipment information, such as location information, etc.) and data (including, but not limited to, data for analysis, stored data, displayed data, etc.) are information and data authorized by the user or sufficiently authorized by each party, and the related data is collected, stored, used, processed, transmitted, provided, disclosed, applied, etc. and processed, all in compliance with the related laws and regulations and standards of the related country and region, necessary security measures are taken, no prejudice to the public order, and corresponding operation entries are provided for the user to select authorization or rejection.
In the technical scheme of the disclosure, the authorization or consent of the user is obtained before the personal information of the user is obtained or acquired.
Fig. 1 schematically illustrates an application scenario diagram of an account balance query method, apparatus, device, medium and program product according to an embodiment of the present disclosure.
As shown in fig. 1, an application scenario 100 according to this embodiment may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 is used as a medium to provide communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
The user may interact with the server 105 via the network 104 using the terminal devices 101, 102, 103 to receive or send messages or the like. Various communication client applications, such as shopping class applications, web browser applications, search class applications, instant messaging tools, mailbox clients, social platform software, etc. (by way of example only) may be installed on the terminal devices 101, 102, 103.
The terminal devices 101, 102, 103 may be a variety of electronic devices having a display screen and supporting web browsing, including but not limited to smartphones, tablets, laptop and desktop computers, and the like.
The server 105 may be a server providing various services, such as a background management server (by way of example only) providing support for websites browsed by users using the terminal devices 101, 102, 103. The background management server may analyze and process the received data such as the user request, and feed back the processing result (e.g., the web page, information, or data obtained or generated according to the user request) to the terminal device.
It should be noted that the account balance query method provided by the embodiments of the present disclosure may be generally executed by the server 105. Accordingly, the account balance query device provided by the embodiments of the present disclosure may be generally disposed in the server 105. The account balance query method provided by the embodiments of the present disclosure may also be performed by a server or a server cluster that is different from the server 105 and is capable of communicating with the terminal devices 101, 102, 103 and/or the server 105. Accordingly, the account balance query device provided by the embodiments of the present disclosure may also be provided in a server or a server cluster that is different from the server 105 and is capable of communicating with the terminal devices 101, 102, 103 and/or the server 105.
It should be understood that the number of terminal devices, networks and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Fig. 2 schematically illustrates a flow chart of an account balance query method according to an embodiment of the disclosure.
As shown in fig. 2, the account balance query method of this embodiment includes operations S210 to S230.
In operation S210, account information of a plurality of accounts to be queried is acquired in response to a first user request. For example, for a escrow person, there are a large number of escrow accounts to be queried under the name, so when the escrow person is selected, and is determined as the first user, account information of a plurality of accounts to be queried under the name can be acquired in response to the first user request.
In embodiments of the present disclosure, the user's consent or authorization may be obtained prior to obtaining the user's information. For example, before operation S210, a request to acquire user account information may be issued to the user. In case that the user agrees or authorizes that the user account information can be acquired, the operation S210 is performed.
In operation S220, the accounts to be queried are divided into M account types based on account information of the accounts to be queried, where M is an integer greater than or equal to 2. By dividing a plurality of accounts to be queried into at least two types, direct parallel query of different types of accounts can be realized.
According to the embodiment of the disclosure, the account information comprises an account code and internal and external sign information, wherein the account code comprises an account type code, and the internal and external sign information is used for indicating the system type to which the account belongs.
Optionally, the account code is a standard code considered to be specified by the bank, for example, a 10-digit number, wherein the 8 th to the lower 10 digits of the account code are account type codes, and are used for representing account types, for example, deposit type accounts, financial type accounts, and the like. The intra-system and inter-system flags are system types for representing account storage, such as an in-house system or an out-of-home system. For example, the account codes and the internal and external sign information of all accounts under a certain user authority can be circularly acquired, the 8 th to 10 th bits of the account codes are intercepted to be used as account type identifiers, and the accounts are classified by combining the internal and external sign information of the system, so that the accounts to be queried are divided into: the account number of the deposit type is 4.
Fig. 3 schematically illustrates a flow chart of dividing a plurality of accounts to be queried into M account types according to an embodiment of the disclosure.
As shown in fig. 3, the dividing the plurality of accounts to be queried into M account types in this embodiment includes operations S310 to S320.
In operation S310, an account type code among the account codes is intercepted.
In operation S320, the plurality of accounts to be queried are divided into M account types based on the account type code and the intra-system and inter-system flag information.
Optionally, the classifying operation performed in parallel may be performed on the multiple accounts to be queried, that is, the classifying operation is performed on multiple accounts to be queried at the same time, so that the classifying speed can be greatly increased in a scenario of classifying a large number of accounts to be queried.
In operation S230, a query interface is respectively invoked to execute M query operations and execute M save operations for the M account types, where the M query operations respectively query balance information of accounts to be queried in the M account types, and the M save operations respectively save the balance information queried by the M query operations, where at least one query operation in the M query operations and at least one save operation in the M save operations are executed in parallel. After the execution of a certain query operation is finished, the save operation can be directly executed without waiting for all the query operations to be executed and then executing the save operation, thereby realizing the parallel execution of the query operation and the save operation and accelerating the query speed.
Alternatively, the sorting operation and the query operation and the save operation may be performed in parallel, and when sorting a large number of accounts, for example, millions of accounts, there may be a longer waiting time after the previous accounts are sorted due to the huge number of accounts, and the subsequent accounts may be sorted. Therefore, for the classified accounts, the query operation stage can be directly entered without waiting for the subsequent accounts to be classified and then queried, so that the parallel execution of classification operation, query operation and storage operation is realized, and the query speed is further increased.
According to an embodiment of the present disclosure, at least two of the M query operations are performed in parallel. Optionally, the M query operations are executed in parallel, and balance information of the account to be queried in each account type is queried in parallel. For example, the multiple accounts to be queried are divided into: the account balance information inquiry is carried out between each 4 account types in parallel, so that the overall inquiry speed is greatly accelerated. In addition, for a plurality of accounts to be queried in each account type, the balance information of each account to be queried can be queried in parallel. For example, the multiple accounts to be queried are divided into: the number of accounts which are simultaneously queried in parallel can be set according to the actual server capacity, for example, the balance information query of 1 ten thousand accounts is simultaneously performed, and the parallel query mode can further accelerate the query speed compared with the traditional mode of querying the other account after the balance information of one account is queried.
According to an embodiment of the present disclosure, at least two save operations of the M save operations are performed in parallel. Optionally, the M saving operations are executed in parallel, and balance information of the account to be queried in each account type is saved in parallel. For example, for 4 account types: the balance information preservation operation of the accounts is carried out in parallel among the internal deposit type account, the external deposit type account, the internal financial accounting type account and the external financial accounting type account, so that the overall preservation speed is greatly increased. In addition, for a plurality of accounts to be queried in each account type, balance information of each account to be queried can be stored in parallel. For example, the balance information of 30 ten thousand accounts is stored in the internal savings type account, and the parallel storage mode is adopted, specifically, the number of the accounts stored in parallel can be set according to the actual server capacity, for example, the balance information of 1 ten thousand accounts is stored simultaneously, and compared with the traditional mode of storing the balance information of one account and then storing the other account, the parallel storage mode can further increase the storage speed.
Optionally, in order to further increase the processing speed, the balance information is in the form of a JSON string, the JSON string needs to be parsed to obtain account balance in the JSON string, and then data is written in the target data source in parallel for storage.
Fig. 4 schematically illustrates a flowchart of a save operation according to an embodiment of the present disclosure.
As shown in fig. 4, the save operation of this embodiment includes operation S410.
In operation S410, the M save operations respectively receive balance information of the account to be queried, and save the balance information in M target data sources.
According to the account balance query method, dependence and nesting among accounts in query are optimized, the accounts to be queried are classified, and balance information query operation and balance information storage operation are executed in parallel, so that high-concurrency account balance query is realized, the query speed and the query efficiency of account balance are improved, and the query accuracy is also improved.
Fig. 5 schematically illustrates a flow chart of determining that an account query request is the first user request, according to an embodiment of the disclosure.
As shown in fig. 5, before the step of acquiring account information of a plurality of accounts to be queried, the determining that the account query request is the first user request in this embodiment includes operations S510 to S530.
In operation S510, an account query request of a target user is acquired.
In operation S520, the number of accounts to be queried of the target user is determined.
In operation S530, when the number of accounts to be queried exceeds a preset number of accounts, determining that the account query request is the first user request. After determining that the first user requests, the method switches to a first query mode, namely a new query mode in the embodiment of the disclosure. When the number of accounts to be queried exceeds the preset number of accounts, the account query request needs to be determined as the first user request and is switched to a new system query mode in order to increase the query speed due to the fact that the number of accounts to be queried is excessive.
According to an embodiment of the disclosure, the step of obtaining account information of a plurality of accounts to be queried in response to a first user request includes: and responding to the first user request, and circularly acquiring the account information of the accounts to be queried until the account information of all the accounts to be queried of the target user is acquired. Because the number of the accounts to be queried is too large, the account information of the accounts to be queried is required to be acquired in a circulating way until the account information of all the accounts to be queried of the target user is acquired, optionally, the account information of the accounts to be queried can be acquired in a circulating way by scheduling through a technical means of a message middleware, and the acquired account information is sent to a system executing a new query mode.
According to the embodiment of the disclosure, when the number of accounts to be queried does not exceed the preset number of accounts, determining the account query request as a second user request. After determining that the request is a second user request, switching to a second query mode, namely a traditional account balance query mode. When the number of accounts to be queried is too large, the conventional account balance query mode is low in query speed and needs to be switched to a new query mode for calculation, and when the number of accounts to be queried is smaller than the preset number of accounts, the conventional account balance query mode is adopted for calculation, so that the whole operation is more stable, and therefore, the account balance query method provided by the embodiment of the disclosure has the advantages of good compatibility and compatibility with two systems. The number of specific preset accounts may be determined according to practical situations, which is not limited in the embodiments of the present disclosure. Specifically, after switching to the new query mode, the account query request of the target user may be sent to the system executing the new query mode through the message middleware for job scheduling.
Fig. 6 schematically illustrates a system configuration diagram of an account balance query method according to an embodiment of the present disclosure.
As shown in fig. 6, a system structure of an account balance query method according to an embodiment of the present disclosure includes: a new and old mode switching unit 1, a job scheduling unit 2 and a new account balance inquiry unit 3.
New and old mode switching unit 1: the method is mainly responsible for controlling the switching of new and old systems, adjusting the switching range, namely presetting the account number, so that the system functions are stably upgraded without risk.
Job scheduling unit 2: the method is mainly responsible for receiving a new mode query request, and is used as message middleware among different systems to convey the request to a special account balance query system.
New account balance inquiry unit 3: the account balance is mainly responsible for batch inquiry, and comprises an account diversion unit 31, a balance information inquiry unit 32 and a data storage unit 33.
Account diversion unit 31: and classifying and summarizing account types according to the account basic information, and calling different balance information inquiry units by different types of accounts.
Balance information inquiry unit 32: and disassembling the original unified balance inquiry function without account types into account inquiry functions corresponding to different account types, simultaneously realizing high concurrency access of accounts corresponding to different account types, and finally sending the result to a data storage unit.
A data holding unit 33: and asynchronously receiving the queried balance information, analyzing the data, extracting account balance, and randomly storing the data in a target data source in high concurrency.
Fig. 7 schematically illustrates a flow diagram of an account balance query method according to an embodiment of the disclosure.
As shown in fig. 7, the flow of the account balance inquiry method of this embodiment includes steps S101 to S105.
Step S101: the service initiates an account query request through page clicking, judges the number of accounts used under the name of the service, exceeds a certain data limit, and cuts into a new system query mode.
Step S102: in the new system query mode, the service adds job calling information to wait for the processing of the consumer after each request sent by the service.
Step S103: and acquiring the job information to be processed based on the job calling system. And circularly acquiring account codes and internal and external sign information of all accounts under the user permission, intercepting 8 th to 10 th bits of the account codes as account type identifiers, and classifying the accounts by combining the internal and external sign information of the system.
Step S104: after classification, the accounts enter respective processing queues, call respective query interfaces in sequence, and asynchronously initiate balance information query.
Step S105: a JSON result string of the query is received. And analyzing the JSON to acquire service element information therein, and asynchronously writing data into a target data source so as to facilitate service viewing.
The account balance inquiry method provided by the embodiment of the disclosure solves the problems of low efficiency, slow inquiry speed and overtime inquiry pain points of the traditional account balance inquiry, optimizes the dependence and logic nesting among the inquired accounts, realizes the high concurrent account balance inquiry, greatly improves the account balance inquiry efficiency, ensures the smooth development of the work of related business, protects the navigation for the expansion of the business, and enables the function to be painless and stable to upgrade and not to influence the existing system.
Based on the account balance query method, the disclosure also provides an account balance query device. The device will be described in detail below in connection with fig. 8.
Fig. 8 schematically illustrates a block diagram of an account balance query device according to an embodiment of the disclosure.
As shown in fig. 8, the account balance query device 800 of this embodiment includes a first acquisition module 810, a classification module 820, and a query holding module 830.
The first obtaining module 810 is configured to obtain account information of a plurality of accounts to be queried in response to a first user request. In an embodiment, the first obtaining module 810 may be configured to perform the operation S210 described above, which is not described herein.
The classification module 820 is configured to divide the plurality of accounts to be queried into M account types based on account information of the plurality of accounts to be queried, where M is an integer greater than or equal to 2. In an embodiment, the classification module 820 may be used to perform the operation S220 described above, which is not described herein.
The query and save module 830 is configured to call a query interface to execute M query operations and execute M save operations for the M account types, where the M query operations query balance information of accounts to be queried in the M account types, and the M save operations save balance information queried by the M query operations, respectively, where at least one query operation in the M query operations and at least one save operation in the M save operations are executed in parallel. In an embodiment, the query holding module 830 may be configured to perform the operation S230 described above, which is not described herein.
According to an embodiment of the present disclosure, at least two of the M query operations in the query holding module are performed in parallel.
According to an embodiment of the present disclosure, at least two save operations of the M save operations in the query save module are performed in parallel.
According to an embodiment of the disclosure, the account information in the classification module includes an account code and internal and external flag information, the account code includes an account type code, and the internal and external flag information is used for indicating a system type to which the account belongs; the classification module includes an intercepting unit, configured to intercept account type codes in the account codes, where in an embodiment, the intercepting unit may be configured to perform the operation S310 described above, and is not described herein again; and a classification unit, configured to divide the accounts to be queried into M account types based on the account type code and the intra-system and inter-system flag information, where in an embodiment, the classification unit may be configured to perform the operation S320 described above, which is not described herein again.
According to an embodiment of the disclosure, the query holding module includes a holding unit configured to enable the M holding operations to respectively receive balance information of an account to be queried, and hold the balance information in M target data sources. In an embodiment, the saving unit may be used to perform the operation S410 described above, which is not described herein.
According to an embodiment of the present disclosure, the apparatus further comprises: the second obtaining module is configured to obtain an account query request of the target user, and in an embodiment, the second obtaining module may be configured to perform the operation S510 described above, which is not described herein again; the determining module is configured to determine the number of accounts to be queried of the target user, and in an embodiment, the determining module may be configured to perform the operation S520 described above, which is not described herein again; and a first switching module, configured to determine that the account query request is the first user request when the number of accounts to be queried exceeds a preset number of accounts, where in an embodiment, the first switching module may be configured to execute the operation S530 described above, and will not be described herein again.
According to an embodiment of the present disclosure, the first acquisition module includes: the circulation acquisition unit is used for responding to the first user request and circularly acquiring the account information of the accounts to be queried until the account information of all the accounts to be queried of the target user is acquired.
According to an embodiment of the present disclosure, the apparatus further comprises: and the second switching module is used for determining the account query request as a second user request when the number of the accounts to be queried does not exceed the preset number of the accounts.
Any of the first acquisition module 810, the classification module 820, and the query holding module 830 may be combined in one module to be implemented, or any of them may be split into a plurality of modules, according to embodiments of the present disclosure. Alternatively, at least some of the functionality of one or more of the modules may be combined with at least some of the functionality of other modules and implemented in one module. According to embodiments of the present disclosure, at least one of the first acquisition module 810, the classification module 820, and the query holding module 830 may be implemented at least in part as hardware circuitry, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or in hardware or firmware, such as any other reasonable way of integrating or packaging the circuitry, or in any one of or a suitable combination of any of the three. Alternatively, at least one of the first acquisition module 810, the classification module 820, and the query holding module 830 may be at least partially implemented as computer program modules that, when executed, perform the corresponding functions.
Fig. 9 schematically illustrates a block diagram of an electronic device adapted to implement an account balance query method according to an embodiment of the disclosure.
As shown in fig. 9, an electronic device 900 according to an embodiment of the present disclosure includes a processor 901 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 902 or a program loaded from a storage portion 908 into a Random Access Memory (RAM) 903. The processor 901 may include, for example, a general purpose microprocessor (e.g., a CPU), an instruction set processor and/or an associated chipset and/or a special purpose microprocessor (e.g., an Application Specific Integrated Circuit (ASIC)), or the like. Processor 901 may also include on-board memory for caching purposes. Processor 901 may include a single processing unit or multiple processing units for performing the different actions of the method flows according to embodiments of the present disclosure.
In the RAM 903, various programs and data necessary for the operation of the electronic device 900 are stored. The processor 901, the ROM 902, and the RAM 903 are connected to each other by a bus 904. The processor 901 performs various operations of the method flow according to the embodiments of the present disclosure by executing programs in the ROM 902 and/or the RAM 903. Note that the program may be stored in one or more memories other than the ROM 902 and the RAM 903. The processor 901 may also perform various operations of the method flow according to embodiments of the present disclosure by executing programs stored in the one or more memories.
According to an embodiment of the disclosure, the electronic device 900 may also include an input/output (I/O) interface 905, the input/output (I/O) interface 905 also being connected to the bus 904. The electronic device 900 may also include one or more of the following components connected to the I/O interface 905: an input section 906 including a keyboard, a mouse, and the like; an output portion 907 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and a speaker; a storage portion 908 including a hard disk or the like; and a communication section 909 including a network interface card such as a LAN card, a modem, or the like. The communication section 909 performs communication processing via a network such as the internet. The drive 910 is also connected to the I/O interface 905 as needed. A removable medium 911 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is installed as needed on the drive 910 so that a computer program read out therefrom is installed into the storage section 908 as needed.
The present disclosure also provides a computer-readable storage medium that may be embodied in the apparatus/device/system described in the above embodiments; or may exist alone without being assembled into the apparatus/device/system. The computer-readable storage medium carries one or more programs which, when executed, implement methods in accordance with embodiments of the present disclosure.
According to embodiments of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, which may include, for example, but is not limited to: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this disclosure, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. For example, according to embodiments of the present disclosure, the computer-readable storage medium may include ROM 902 and/or RAM 903 and/or one or more memories other than ROM 902 and RAM 903 described above.
Embodiments of the present disclosure also include a computer program product comprising a computer program containing program code for performing the methods shown in the flowcharts. The program code, when executed in a computer system, causes the computer system to perform the methods of embodiments of the present disclosure.
The above-described functions defined in the system/apparatus of the embodiments of the present disclosure are performed when the computer program is executed by the processor 901. The systems, apparatus, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the disclosure.
In one embodiment, the computer program may be based on a tangible storage medium such as an optical storage device, a magnetic storage device, or the like. In another embodiment, the computer program may also be transmitted, distributed, and downloaded and installed in the form of a signal on a network medium, via communication portion 909, and/or installed from removable medium 911. The computer program may include program code that may be transmitted using any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
In such an embodiment, the computer program may be downloaded and installed from the network via the communication portion 909 and/or installed from the removable medium 911. The above-described functions defined in the system of the embodiments of the present disclosure are performed when the computer program is executed by the processor 901. The systems, devices, apparatus, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the disclosure.
According to embodiments of the present disclosure, program code for performing computer programs provided by embodiments of the present disclosure may be written in any combination of one or more programming languages, and in particular, such computer programs may be implemented in high-level procedural and/or object-oriented programming languages, and/or assembly/machine languages. Programming languages include, but are not limited to, such as Java, c++, python, "C" or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of remote computing devices, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., connected via the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
Those skilled in the art will appreciate that the features recited in the various embodiments of the disclosure and/or in the claims may be combined in various combinations and/or combinations, even if such combinations or combinations are not explicitly recited in the disclosure. In particular, the features recited in the various embodiments of the present disclosure and/or the claims may be variously combined and/or combined without departing from the spirit and teachings of the present disclosure. All such combinations and/or combinations fall within the scope of the present disclosure.
The embodiments of the present disclosure are described above. However, these examples are for illustrative purposes only and are not intended to limit the scope of the present disclosure. Although the embodiments are described above separately, this does not mean that the measures in the embodiments cannot be used advantageously in combination. The scope of the disclosure is defined by the appended claims and equivalents thereof. Various alternatives and modifications can be made by those skilled in the art without departing from the scope of the disclosure, and such alternatives and modifications are intended to fall within the scope of the disclosure.

Claims (12)

1. A method for account balance inquiry, the method comprising:
responding to a first user request, and acquiring account information of a plurality of accounts to be queried;
Dividing the accounts to be queried into M account types based on account information of the accounts to be queried, wherein M is an integer greater than or equal to 2; and
for the M account types, respectively calling a query interface to execute M query operations and M save operations, wherein the M query operations respectively query the balance information of the accounts to be queried in the M account types, the M save operations respectively save the balance information queried by the M query operations,
wherein at least one of the M query operations and at least one of the M save operations are performed in parallel.
2. The method of claim 1, wherein at least two of the M query operations are performed in parallel.
3. The method of claim 2, wherein at least two of the M save operations are performed in parallel.
4. The method of claim 1, wherein the account information includes an account code and intra-system flag information, the account code including an account type code, the intra-system flag information being used to indicate a system type to which the account belongs;
The step of dividing the plurality of accounts to be queried into M account types based on the account information comprises the following steps:
intercepting an account type code in the account code; and
and dividing the accounts to be queried into M account types based on the account type codes and the internal and external sign information of the system.
5. The method of claim 1, wherein the M save operations comprise:
and the M storage operations respectively receive balance information of the account to be queried, and store the balance information in M target data sources.
6. The method of any of claims 1-5, wherein prior to the step of obtaining account information for a plurality of accounts to be queried, the method further comprises:
acquiring an account query request of a target user;
judging the number of accounts to be queried of the target user; and
and when the number of the accounts to be queried exceeds the preset number of accounts, determining the account query request as the first user request.
7. The method of claim 6, wherein the step of obtaining account information for a plurality of accounts to be queried in response to the first user request comprises:
And responding to the first user request, and circularly acquiring the account information of the accounts to be queried until the account information of all the accounts to be queried of the target user is acquired.
8. The method of claim 6, wherein the method further comprises:
and when the number of the accounts to be queried does not exceed the number of the preset accounts, determining the account query request as a second user request.
9. An account balance query device, comprising:
the first acquisition module is used for responding to a first user request and acquiring account information of a plurality of accounts to be queried;
the classification module is used for classifying the accounts to be queried into M account types based on account information of the accounts to be queried, wherein M is an integer greater than or equal to 2; and
the query and save module is used for respectively calling a query interface to execute M query operations and M save operations aiming at the M account types, wherein the M query operations respectively query the balance information of the accounts to be queried in the M account types, and the M save operations respectively save the balance information queried by the M query operations, and at least one query operation in the M query operations and at least one save operation in the M save operations are executed in parallel.
10. An electronic device, comprising:
one or more processors;
storage means for storing one or more programs,
wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the method of any of claims 1-8.
11. A computer readable storage medium having stored thereon executable instructions which, when executed by a processor, cause the processor to perform the method according to any of claims 1-8.
12. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 8.
CN202311038301.9A 2023-08-17 2023-08-17 Account balance query method and device, electronic equipment and medium Pending CN117033443A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311038301.9A CN117033443A (en) 2023-08-17 2023-08-17 Account balance query method and device, electronic equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311038301.9A CN117033443A (en) 2023-08-17 2023-08-17 Account balance query method and device, electronic equipment and medium

Publications (1)

Publication Number Publication Date
CN117033443A true CN117033443A (en) 2023-11-10

Family

ID=88637016

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311038301.9A Pending CN117033443A (en) 2023-08-17 2023-08-17 Account balance query method and device, electronic equipment and medium

Country Status (1)

Country Link
CN (1) CN117033443A (en)

Similar Documents

Publication Publication Date Title
WO2020000720A1 (en) Server, packet processing method, program, and computer-readable storage medium
CN113946425A (en) Service processing method and device, electronic equipment and computer readable storage medium
CN111427971B (en) Business modeling method, device, system and medium for computer system
CN111881329A (en) Account balance management method and system
CN110706093A (en) Accounting processing method and device
CN112835904A (en) Data processing method and data processing device
CN110909022A (en) Data query method and device
CN115587575A (en) Data table creation method, target data query method, device and equipment
CN110648216A (en) Wind control method and device
CN111401684A (en) Task processing method and device
CN112580065A (en) Data query method and device
CN115965474A (en) Service processing method, device, equipment and storage medium
CN117033443A (en) Account balance query method and device, electronic equipment and medium
CN112131257B (en) Data query method and device
CN113971007B (en) Information processing method, device, electronic equipment and medium
CN114363172B (en) Decoupling management method, device, equipment and medium for container group
CN114285743B (en) Method, device, electronic equipment and storage medium for updating configuration information
CN114268558B (en) Method, device, equipment and medium for generating monitoring graph
CN117493443A (en) Data processing method and device, electronic equipment and readable storage medium
CN116743874A (en) Task processing method, device, equipment and medium
CN116775307A (en) Service processing method, device, equipment and storage medium
CN117056340A (en) Account checking data processing method, device, equipment and storage medium
CN114661794A (en) Service data processing method, device, equipment and medium
CN118133122A (en) Fee data processing method, device, electronic equipment and computer readable medium
CN117472908A (en) Method, device, electronic equipment and storage medium for preventing repeated service delivery

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