WO2020006896A1 - 余额监控方法、装置、计算机设备和存储介质 - Google Patents
余额监控方法、装置、计算机设备和存储介质 Download PDFInfo
- Publication number
- WO2020006896A1 WO2020006896A1 PCT/CN2018/108029 CN2018108029W WO2020006896A1 WO 2020006896 A1 WO2020006896 A1 WO 2020006896A1 CN 2018108029 W CN2018108029 W CN 2018108029W WO 2020006896 A1 WO2020006896 A1 WO 2020006896A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- enterprise
- bank
- balance
- sending
- machine
- Prior art date
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q40/00—Finance; Insurance; Tax strategies; Processing of corporate or income taxes
- G06Q40/02—Banking, e.g. interest calculation or account maintenance
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q40/00—Finance; Insurance; Tax strategies; Processing of corporate or income taxes
- G06Q40/12—Accounting
- G06Q40/125—Finance or payroll
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION 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/00—Payment architectures, schemes or protocols
- G06Q20/38—Payment protocols; Details thereof
- G06Q20/40—Authorisation, e.g. identification of payer or payee, verification of customer or shop credentials; Review and approval of payers, e.g. check credit lines or negative lists
- G06Q20/401—Transaction verification
- G06Q20/4014—Identity check for transactions
Definitions
- the present application relates to the field of computers, and in particular, to a method, an apparatus, a computer device, and a storage medium for monitoring balances.
- the main purpose of this application is to provide a balance monitoring method, device, computer equipment, and storage medium for quickly querying the balance of multiple bank accounts.
- this application proposes a balance monitoring method, which uses an enterprise-end front-end machine set on an enterprise side to perform financial data interaction with a bank-side.
- the enterprise-end front-end machine is provided with multiple UKey interfaces.
- the front-end processor corresponds to a plurality of the UKey interfaces and is configured to complete financial data interaction with multiple bank-end front-end processors of different types of banks; the method includes:
- the present application also provides a balance inquiry device, which uses an enterprise-side front-end machine set on the enterprise side to exchange financial data with a bank side.
- the enterprise-side front-end machine is provided with multiple UKey interfaces, and the enterprise-side front-end machine corresponds to A plurality of the UKey interfaces are configured to complete financial data interaction with a plurality of bank-side front-end processors of different types of banks; the device includes:
- a sending unit configured to send a balance inquiry task corresponding to a plurality of bank accounts to the enterprise-end front-end processor, wherein the plurality of bank accounts includes at least two types of bank accounts;
- a forwarding unit configured to send the balance query task for different bank accounts to the corresponding bank-end front-end machine by using the enterprise-end front-end machine to query the balance of the corresponding bank account to the bank server of the corresponding bank-end front-end machine;
- the receiving unit is configured to receive balance information of each of the bank accounts obtained by the enterprise-end front-end processor from each of the bank-end front-end processors.
- the present application further provides a computer device including a memory and a processor, where the memory stores computer-readable instructions, and when the processor executes the computer-readable instructions, implements the steps of any of the foregoing methods.
- the present application also provides a computer non-volatile readable storage medium having computer-readable instructions stored thereon, which are executed by a processor to implement the steps of the method according to any one of the foregoing.
- the balance monitoring method, device, computer equipment, and storage medium of this application because multiple UKey interfaces are set on the enterprise-end front-end machine and corresponding configuration is performed, so the enterprise-end front-end machine can conduct banking with a number of different types of banks.
- Enterprise direct connection function when initiating a balance inquiry task, there is no need to manually log in to different bank accounts to check their balances, but it is automatically completed through the financial system, that is, the balances of different bank accounts can be automatically inquired.
- FIG. 1 is a schematic flowchart of a balance monitoring method according to an embodiment of the present application
- FIG. 2 is a schematic flowchart of step S1 in the foregoing balance monitoring method according to an embodiment of the present application
- FIG. 3 is a schematic block diagram of a structure of a balance inquiry device according to an embodiment of the present application.
- FIG. 4 is a schematic block diagram of a sending unit according to an embodiment of the present application.
- FIG. 5 is a schematic block diagram of a structure of a balance query device according to an embodiment of the present application.
- FIG. 6 is a schematic block diagram of a structure of a computer device according to an embodiment of the present application.
- an embodiment of the present application provides a balance monitoring method, which uses an enterprise-end front-end machine set on an enterprise side to perform financial data interaction with a bank-side.
- the enterprise-end front-end machine is provided with multiple UKey interfaces, and the enterprise The front end processor corresponds to a plurality of the UKey interfaces and is configured to complete financial data interaction with a plurality of different bank end front processors.
- the above-mentioned enterprise-side front-end machine refers to the front-end machine set on the enterprise side, and is an intermediate device when the enterprise-side financial system is directly connected with the bank-bank-enterprise.
- the foregoing enterprise-side front-end machine is configured to complete data interaction with a plurality of different types of bank-side front-end machines.
- the configuration process is that when an enterprise-side front-end machine is installed, the enterprise-side front-end machine has an administrator interface. Enter the specified configuration information in the preset interface.
- the configuration information includes the enterprise ID, the enterprise front-end processor number, the bank server IP, the bank port, the bank-enterprise direct connection number of the bank, and the bank-end front-end processor version number.
- Banks and other corporate financial systems and banks complete the necessary parameters for direct bank-enterprise integration, and configure the number of threads to configure multi-threaded tasks; then send the configuration results to the application corresponding to the enterprise front-end processor server. That is, configure the bank-enterprise direct account number and related information that are applied for.
- each bank-enterprise direct account When an enterprise needs to log in to each bank-enterprise direct account to obtain data (transaction data, query data, etc.) in its corresponding bank, it only needs to be in the enterprise.
- the corresponding UKey (a small storage device directly connected to the computer via USB, with password verification function, and reliable and high speed) can be inserted into the front-end machine, which can realize an enterprise-side front-end machine and a number of different types of banks.
- the front-end of the enterprise can easily obtain the account information, transaction flow information, and balance information of each bank-enterprise direct account of the enterprise, and can perform related operations such as payment, collection, and transfer.
- the above major banks refer to different banks.
- ICBC and China Construction Bank belong to two different major banks, that is, banks using different front-end processors are considered to be different major banks.
- the above method includes steps:
- the above balance inquiry task is a task of obtaining a balance of a designated bank account.
- Enterprises that can use the front end of the enterprise will have multiple different bank accounts, and these bank accounts are distributed in different types of banks. Because the above-mentioned front end of the enterprise side can insert multiple UKeys, when querying the balance of multiple bank accounts, as long as all UKeys corresponding to each bank account are inserted into the front end of the enterprise side, there is no need to check each account balance. , The corresponding operation of inserting a UKey, etc., and because it is a one-time insertion of all UKey corresponding to each bank to the enterprise-end front-end machine, you do not need to worry about the problem of incorrect UKey insertion.
- the process of sending a balance inquiry task includes: after selecting a bank account to be checked for balance in a list, receiving a "start query" command to generate balance inquiry tasks for a plurality of selected bank accounts , And then can be sent to the enterprise front end at the same time or according to the preset priority rules.
- step S2 because the above-mentioned enterprise-side front-end machine is connected to different bank-side front-end machines, after obtaining a plurality of balance inquiry tasks, the bank information corresponding to each balance inquiry task will be analyzed first to facilitate the balance inquiry. The task is correctly sent to the corresponding bank-end front-end machine. When it is sent to the corresponding bank-end front-end machine balance inquiry task, the corresponding UKey information will also be obtained in order to facilitate the bank's normal balance inquiry processing.
- step S3 the account balance information of each bank account inquired is obtained.
- the account balance information of the bank account to be monitored is obtained, corresponding operations can be performed according to the account balance information. For example, after the balance of the bank account is greater than a specified first threshold, the bank account funds are transferred according to a preset method. To the first bank account; for another example, after the balance of the bank account is less than the specified second threshold, the funds of the second bank account are transferred to the bank account according to a preset method, so that it is higher than the second threshold.
- the above-mentioned step S1 of sending a balance inquiry task corresponding to a plurality of bank accounts to the front-end of the enterprise end includes:
- the above balance inquiry task ID is only an identifier, and the identifier uniquely corresponds to one of the balance inquiry tasks.
- the balance inquiry task ID does not have a task content, so as to prevent the balance inquiry task from being directly placed on the front end of the enterprise. It affects the running space of the front end of the enterprise and reduces its running speed. Because the enterprise-end front-end unit of this application can be connected to multiple bank-side front-end units, there will be many different tasks, and directly stacking various tasks into the cache of the front-end unit will greatly reduce the enterprise-side front-end units. Set up the operating efficiency and even crash.
- the preset cache queue generally includes a transaction cache queue and a query cache queue. Different cache queues store task IDs of corresponding attributes, and correspondingly set a transaction thread pool and a query thread pool.
- the front end of the enterprise obtains the balance query task ID, it first determines the attributes of the balance query task ID.
- the attributes include transaction attributes and query attributes. Because the balance query task ID belongs to the query class, it is placed in the query cache queue. in.
- the tasks in the two cache queues are sorted according to priority. Each task will be set with a type identifier.
- the type identifier is divided into 1-8 levels. If it is 1, the highest level, which represents emergency tasks.
- Priority processing can be based on presets. Pre-set rules, according to the specific request attached to the corresponding priority level, for example, the level of payment is higher than the level of query bank flow.
- the tasks issued are balance query tasks
- the order in which the task IDs corresponding to each task are stored in the query cache queue will also have a sequential order.
- the reasons for the sequential order include: the enterprise side queries different banks
- the balance task of the account has a preset priority. For example, if the X bank account is the main bank account on the enterprise side, the priority of the query task ID for checking the balance of the X bank account is set to a priority such as 1 or 2. Grade.
- step S12 the balance query task ID fed back by the front-end server of the enterprise refers to that the query thread pool corresponding to the query cache queue is free, and the balance query task is obtained from the query cache queue. Only the balance query task ID is in the cache queue, so the front end of the enterprise will return the balance query task ID to the above application server, and the application server will generate or call the corresponding task according to the balance query task ID, and then send it to the front end of the enterprise. .
- step S1 of sending the balance inquiry task corresponding to a plurality of bank accounts to the enterprise-end front end the method includes:
- a method for judging whether a UKey device corresponding to various types of banks is inserted into the front-end of the enterprise side includes: collecting an identifier of a UKey device inserted in each UKey interface corresponding to its bank type, and then comparing the identifier with The identifiers representing various types of banks configured when the enterprise-side front-end processor is configured are compared. If the collected identifiers fully cover the identifiers representing various types of banks configured when the enterprise-side front-end processor is configured, the enterprise-side front-end is determined. UKey devices corresponding to various types of banks are inserted on the machine, and subsequent steps such as step S1 can be performed.
- the types of banks corresponding to the uncovered identifiers are extracted and sent to the relevant personnel of the enterprise for alarm.
- the company's Relevant personnel can take appropriate measures to re-insert the UKey device that was forgotten to be inserted or the insertion place is loose, which leads to poor contact of the UKey device to ensure the interaction between the enterprise and the banks.
- the foregoing balance monitoring method further includes:
- the enterprise front-end machine and the application server should be online for a long time, but because it is an electronic product, it will inevitably fail or upgrade. At this time, the enterprise front-end machine and the application server may lose the connection.
- This method detects the connection status between the enterprise front end and the application server. When the connection between the two fails, an alarm message needs to be issued.
- the bank-side front-end machine is sent to the bank's relevant management system by the bank-side front-end machine to inform the bank-side staff.
- the bank-side staff can manually notify the corresponding staff of the enterprise-side that a disconnection failure has occurred.
- the above-mentioned receiving and sending of the heartbeat detection packet can ensure that the financial person at the enterprise side knows whether the front-end processor of the enterprise side and the application server are disconnected, so as to timely process things that should be completed directly by the bank and enterprise.
- the above-mentioned step S1 of sending a balance inquiry task corresponding to a plurality of bank accounts to the enterprise-end front-end processor includes:
- step S13 because the balance query task sent to the front end of the enterprise may be continuous, the service is monitored by using a long connection method, so that each operation is not disconnected, and a data packet is directly sent next time. Yes, it is not necessary to establish a TCP (Transmission Control Protocol) connection to maintain the efficiency of processing tasks.
- the application server and the enterprise-end front end adopt a block input output (BIO) synchronous blocking mode for a long connection.
- BIO block input output
- Different balance query tasks cannot be performed at the same time, so they need to be performed in accordance with the order of instructions.
- One instruction can be executed before the next instruction can be executed. It cannot be executed asynchronously. Therefore, the BIO synchronous blocking mode is used in this application to enable the application server and the enterprise front-end processor to perform Long connection.
- the foregoing balance monitoring method further includes:
- Protocol Buffers are used for serialization.
- Protocol Buffers It is a lightweight and efficient structured data storage format, which can be used for serialization of structured data, or serialization. It is very suitable for data storage or RPC data exchange format. Language-independent, platform-independent, and extensible serialization structure data format that can be used in communication protocols, data storage, etc., simply The main advantages of Protobuf are: simple and fast. This application uses GOOGLE's Protocol Buffers for serialization, which can improve the efficiency of message packaging and sending.
- the enterprise-side front-end machine can perform bank-enterprise direct connection functions with multiple different types of banks; when a balance is initiated
- querying tasks there is no need to manually log in to different bank accounts to check their balances. Instead, they can be completed automatically through the financial system, that is, they can automatically check the balances of different bank accounts.
- you can The balance of the bank account determines which bank accounts need financial transfer processing, those that require collection processing, etc., and conducts financial transfers and fund collection in accordance with preset rules, which greatly improves the different tasks for different types of bank accounts. Implementation efficiency, saving human resources, and only need to configure once, during the query process, there will be no artificial errors such as entering account numbers.
- an embodiment of the present application further provides a balance query device, which uses an enterprise-side front-end machine set on an enterprise side to perform financial data interaction with a bank-side.
- the enterprise-side front-end machine is provided with multiple UKey interfaces.
- the enterprise front end corresponds to a plurality of the UKey interfaces, and is configured to complete financial data interaction with a plurality of different bank end front end types.
- the above-mentioned enterprise-side front-end machine refers to the front-end machine set on the enterprise side, and is an intermediate device when the enterprise-side financial system is directly connected with the bank-bank-enterprise.
- the foregoing enterprise-side front-end machine is configured to complete data interaction with a plurality of different types of bank-side front-end machines.
- the configuration process is that when an enterprise-side front-end machine is installed, the enterprise-side front-end machine has an administrator interface. Enter the specified configuration information in the preset interface.
- the configuration information includes the enterprise ID, the enterprise front-end processor number, the bank server IP, the bank port, the bank-enterprise direct connection number of the bank, and the bank-end front-end processor version number.
- Banks and other corporate financial systems and banks complete the necessary parameters for direct bank-enterprise integration, and configure the number of threads to configure multi-threaded tasks; then send the configuration results to the application corresponding to the enterprise front-end processor server. That is, configure the bank-enterprise direct account number and related information that are applied for.
- each bank-enterprise direct account When an enterprise needs to log in to each bank-enterprise direct account to obtain data (transaction data, query data, etc.) in its corresponding bank, it only needs to be in the enterprise.
- the corresponding UKey (a small storage device directly connected to the computer via USB, with password verification function, and reliable and high speed) can be inserted into the front-end machine, which can realize an enterprise-side front-end machine and a number of different types of banks.
- the front-end of the enterprise can easily obtain the account information, transaction flow information, and balance information of each bank-enterprise direct account of the enterprise, and can perform related operations such as payment, collection, and transfer.
- the above major banks refer to different banks.
- ICBC and China Construction Bank belong to two different major banks, that is, banks using different front-end processors are considered to be different major banks.
- the device includes:
- the sending unit 10 is configured to send a balance inquiry task corresponding to a plurality of bank accounts to the front end of the enterprise, where the plurality of bank accounts include at least two types of bank accounts of the bank.
- the balance inquiry task is a task of obtaining a balance of a designated bank account.
- Enterprises that can use the front end of the enterprise will have multiple different bank accounts, and these bank accounts are distributed in different types of banks. Because the above-mentioned front end of the enterprise side can insert multiple UKeys, when querying the balance of multiple bank accounts, as long as all UKeys corresponding to each bank account are inserted into the front end of the enterprise side, there is no need to check each account balance. , The corresponding operation of inserting a UKey, etc., and because it is a one-time insertion of all UKey corresponding to each bank to the enterprise-end front-end machine, you do not need to worry about the problem of incorrect UKey insertion.
- the process of sending a balance inquiry task includes: after selecting a bank account to be checked for balance in a list, receiving a "start query" command to generate balance inquiry tasks for a plurality of selected bank accounts , And then can be sent to the enterprise front end at the same time or according to the preset priority rules.
- the forwarding unit 20 is configured to send the balance inquiry task for different bank accounts to the corresponding bank-end front-end machine by using the enterprise-end front-end machine to query the balance of the corresponding bank account to the bank server of the corresponding bank-end front-end machine. .
- the bank information corresponding to each balance inquiry task will be analyzed first in order to balance the balance.
- the query task is correctly sent to the corresponding bank-end front-end machine.
- the corresponding UKey information is also obtained to facilitate the bank's normal balance query processing.
- the receiving unit 30 is configured to receive balance information of each of the bank accounts obtained by the enterprise-end front-end processor from each of the bank-end front-end processors.
- the receiving unit 30 is the account balance information of each bank account obtained through the receiving unit 30.
- the account balance information of the bank account to be monitored is obtained, corresponding operations can be performed according to the account balance information. For example, after the balance of the bank account is greater than a specified first threshold, the bank account funds are transferred according to a preset method. To the first bank account; for another example, after the balance of the bank account is less than the specified second threshold, the funds of the second bank account are transferred to the bank account according to a preset method, so that it is higher than the second threshold.
- the sending unit 10 includes:
- a sending module 11 is configured to send a plurality of balance inquiry task IDs corresponding to the balance inquiry tasks of the bank account to the enterprise-end front-end machine, wherein the enterprise-side front-end machine sends a plurality of the balance inquiry task IDs Store it in a preset cache queue.
- the above balance query task ID is only an identifier, and the identifier uniquely corresponds to one of the balance query tasks.
- the balance query task ID has no task content to prevent the balance query task from being directly placed in front of the enterprise. In the machine, it affects the running space of the front end of the enterprise, and reduces its running speed. Because the enterprise-end front-end unit of this application can be connected to multiple bank-side front-end units, there will be many different tasks, and directly stacking various tasks into the cache of the front-end unit will greatly reduce the enterprise-side front-end units. Set up the operating efficiency and even crash.
- the preset cache queue generally includes a transaction cache queue and a query cache queue. Different cache queues store task IDs of corresponding attributes, and correspondingly set a transaction thread pool and a query thread pool.
- the front end of the enterprise obtains the balance query task ID, it first determines the attributes of the balance query task ID.
- the attributes include transaction attributes and query attributes. Because the balance query task ID belongs to the query class, it is placed in the query cache queue. in.
- the tasks in the two cache queues are sorted according to priority. Each task will be set with a type identifier.
- the type identifier is divided into 1-8 levels. If it is 1, the highest level, which represents emergency tasks.
- Priority processing can be based on presets. Pre-set rules, according to the specific request attached to the corresponding priority level, for example, the level of payment is higher than the level of query bank flow.
- the tasks issued are balance query tasks
- the order in which the task IDs corresponding to each task are stored in the query cache queue will also have a sequential order.
- the reasons for the sequential order include: the enterprise side queries different banks
- the balance task of the account has a preset priority. For example, if the X bank account is the main bank account on the enterprise side, the priority of the query task ID for checking the balance of the X bank account is set to a priority such as 1 or 2. Grade.
- the receiving feedback module 12 is configured to receive a balance query task ID fed back by the enterprise-end front-end machine, obtain a corresponding balance query task according to the balance-query task ID, and send it to the enterprise-end front-end machine.
- the balance query task ID fed back by the front-end server of the enterprise refers to that the query thread pool corresponding to the query cache queue is free, and then the balance query task is obtained from the query cache queue.
- the query cache queue is only the balance query task ID, so the enterprise side will return the balance query task ID to the above application server, and the application server will generate or call the corresponding task according to the balance query task ID, and then send it to the enterprise side. Set up.
- the foregoing balance query device further includes:
- a judging unit 101 configured to judge whether a UKey device corresponding to various types of banks is inserted into the front end of the enterprise;
- the first alarm unit 102 is configured to report an alarm if it is determined that UKey devices corresponding to various types of banks are not inserted into the front end of the enterprise.
- the method for the determination unit 101 to determine whether a UKey device corresponding to various types of banks is inserted into the front end of the enterprise includes: collecting the UKey devices inserted in each UKey interface corresponding to their bank types. Identification, and then comparing the identification with the identification of various types of banks configured when the enterprise-side front-end is configured, if the collected IDs fully cover the identification of various types of banks configured when the enterprise-side front-end is configured When it is determined, UKey devices corresponding to various types of banks are inserted into the front-end of the enterprise. Otherwise, the types of banks corresponding to the uncovered identifiers are extracted and sent to the relevant personnel of the enterprise through the first alarm unit 102 for alarm.
- the relevant personnel of the enterprise can perform corresponding processing, and will forget to insert the UKey device or re-insert the UKey device due to loose contact, etc., to ensure the interaction between the enterprise and the banks.
- the foregoing balance query device further includes:
- a heartbeat detection unit configured to receive a heartbeat detection packet sent by the enterprise-end front-end unit and detect a connection status with the enterprise-side front-end unit;
- the second alarm unit is configured to issue an alarm message if the connection state is disconnected.
- the enterprise front-end machine and the application server should be online for a long time, but because it is an electronic product, it will inevitably fail or upgrade. At this time, the enterprise front-end machine and the application server may lose the connection.
- This method detects the connection status between the enterprise front end and the application server. When the connection between the two fails, an alarm message needs to be issued.
- the bank-side front-end machine is sent to the bank's relevant management system by the bank-side front-end machine to inform the bank-side staff.
- the bank-side staff can manually notify the corresponding staff of the enterprise-side that a disconnection failure has occurred.
- the above-mentioned receiving and sending of the heartbeat detection packet can ensure that the financial person at the enterprise side knows whether the front-end processor of the enterprise side and the application server are disconnected, so as to timely process things that should be completed directly by the bank and enterprise.
- the sending unit 10 includes:
- the long connection module is configured to send a balance inquiry task corresponding to multiple bank accounts to the enterprise-end front-end machine through a long connection.
- the application server and the enterprise-end front end adopt a block input output (BIO) synchronous blocking mode for a long connection.
- BIO block input output
- Different balance query tasks cannot be performed at the same time, so they need to be performed in accordance with the order of instructions.
- One instruction can be executed before the next instruction can be executed. It cannot be executed asynchronously. Therefore, the BIO synchronous blocking mode is used in this application to enable the application server and enterprise front-end processor Long connection.
- the foregoing balance query device further includes:
- the serialization unit is configured to use Protocol Buffers for serialization when sending tasks with the enterprise-end front-end processor.
- Protocol Buffers It is a lightweight and efficient structured data storage format, which can be used for serialization of structured data, or serialization. It is very suitable for data storage or RPC data exchange format. Language-independent, platform-independent, and extensible serialization structure data format that can be used in communication protocols, data storage, etc., simply The main advantages of Protobuf are: simple and fast. This application uses GOOGLE's Protocol Buffers for serialization, which can improve the efficiency of message packaging and sending.
- the balance inquiry device of the present application because a plurality of UKey interfaces are set on the enterprise-end front-end machine and configured accordingly, the enterprise-end front-end machine can perform the bank-enterprise direct connection function with a plurality of different types of banks; when a balance is initiated
- querying tasks there is no need to manually log in to different bank accounts to check their balances. Instead, they can be completed automatically through the financial system, that is, they can automatically check the balances of different bank accounts.
- you can The balance of the bank account determines which bank accounts need financial transfer processing, those that require collection processing, etc., and conducts financial transfers and fund collection in accordance with preset rules, which greatly improves the different tasks for different types of bank accounts. Implementation efficiency, saving human resources, and only need to configure once, during the query process, there will be no artificial errors such as entering account numbers.
- an embodiment of the present application further provides a computer device.
- the computer device may be a server, and its internal structure may be as shown in FIG.
- the computer device includes a processor, a memory, a network interface, and a database connected through a system bus.
- the computer design processor is used to provide computing and control capabilities.
- the memory of the computer device includes a non-volatile storage medium and an internal memory.
- the non-volatile storage medium stores an operating system, computer-readable instructions, and a database.
- the memory provides an environment for operating systems and computer-readable instructions in a non-volatile storage medium.
- the database of the computer equipment is used to store balance monitoring method programs and the like.
- the network interface of the computer device is used to communicate with an external terminal through a network connection.
- An embodiment of the present application further provides a computer non-volatile readable storage medium having computer-readable instructions stored thereon.
- the computer-readable instructions are executed by a processor, the balance monitoring methods in the foregoing embodiments are implemented.
- Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory.
- Volatile memory can include random access memory (RAM) or external cache memory.
- RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual-speed data rate SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
Landscapes
- Business, Economics & Management (AREA)
- Accounting & Taxation (AREA)
- Finance (AREA)
- Engineering & Computer Science (AREA)
- Development Economics (AREA)
- Economics (AREA)
- Marketing (AREA)
- Strategic Management (AREA)
- Technology Law (AREA)
- Physics & Mathematics (AREA)
- General Business, Economics & Management (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)
Abstract
一种余额监控方法、装置、计算机设备和存储介质,利用企业端设置的企业端前置机与银行端进行财务数据交互,企业端前置机上设置有多个UKey接口,企业端前置机对应多个UKey接口被配置为可以与多个不同银行种类的银行端前置机完成财务数据交互;方法包括:向企业端前置机发送多个银行账户对应的余额查询任务,其中,多个银行账户至少包括两个种类银行的银行账户(S1);利用企业端前置机将针对不同银行账户的余额查询任务发送给对应的银行端前置机,以到对应银行端前置机的银行服务器查询对应银行账户的余额(S2);接收企业端前置机从各银行端前置机获取到的各银行账户的余额信息(S3)。企业端前置机能够与多个不同种类的银行进行银企直联功能;发起余额查询任务时,无需手动地登录不同的银行账户查询其余额,而是通过财务系统自动完成,提高了对不同大类银行的账户的余额监控任务的执行效率。
Description
本申请要求于2018年7月2日提交中国专利局、申请号为2018107078664,申请名称为“余额监控方法、装置、计算机设备和存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本申请涉及到计算机领域,特别是涉及到一种余额监控方法、装置、计算机设备和存储介质。
传统的银行资金监控需要用户手动登录到银行官网进行查看,并不能做到全自动的监控和预警,银行账户过多的时候,需要进行银行切换,操作起来不方便。
本申请的主要目的为提供一种快速查询多个银行账户的余额的余额监控方法、装置、计算机设备和存储介质。
为了实现上述发明目的,本申请提出一种余额监控方法,利用企业端设置的企业端前置机与银行端进行财务数据交互,所述企业端前置机上设置有多个UKey接口,所述企业端前置机对应多个所述UKey接口被配置为可以与多个不同银行种类的银行端前置机完成财务数据交互;所述方法,包括:
向所述企业端前置机发送多个银行账户对应的余额查询任务,其中,所述多个银行账户至少包括两个种类银行的银行账户;
利用所述企业端前置机将针对不同银行账户的余额查询任务发送给对应的银行端前置机,以到对应银行端前置机的银行服务器查询对应银行账户的余额;
接收所述企业端前置机从各所述银行端前置机获取到的各所述银行账户的余额信息。
本申请还提供一种余额查询装置,利用企业端设置的企业端前置机与银行端进行财务数据交互,所述企业端前置机上设置有多个UKey接口,所述企业端前置机对应多个所述UKey接口被配置为可以与多个不同银行种类的银行端前置机完成财务数据交互;所述装置,包括:
发送单元,用于向所述企业端前置机发送多个银行账户对应的余额查询任务,其中,所述多个银行账户至少包括两个种类银行的银行账户;
转发单元,用于利用所述企业端前置机将针对不同银行账户的余额查询任务发送给对应的银行端前置机,以到对应银行端前置机的银行服务器查询对应银行账户的余额;
接收单元,用于接收所述企业端前置机从各所述银行端前置机获取到的各所述银行账户的余额信息。
本申请还提供一种计算机设备,包括存储器和处理器,所述存储器存储有计算机可读指令,所述处理器执行所述计算机可读指令时实现上述任一项所述方法的步骤。
本申请还提供一种计算机非易失性可读存储介质,其上存储有计算机可读指令,所述计算机可读指令被处理器执行时实现上述任一项所述的方法的步骤。
本申请的余额监控方法、装置、计算机设备和存储介质,因为在企业端前置机上设置了多个UKey接口并进行相应的配置,所以企业端前置机能够与多个不同种类的银行进行银企直联功能;当发起余额查询任务时,无需手动地登录不同的银行账户查询其余额,而是通过财务系统自动完成,即可以自动查询不同的银行账户的余额,当获取到各银行账户的余额信息之后,则可以根据各银行账户的余额判断出哪些银行账户需要财务调拨处理,那些需要归集处理等,并按照预设的规则进行财务调拨、资金归集等,大大地提高了对不同大类银行的账户的不同任务的执行效率,节约人力资源,而且只需要配置一次即可,在查询过程中,不会出现人为的如输入账号等错误。
图1 为本申请一实施例的余额监控方法的流程示意图;
图2 为本申请一实施例的上述余额监控方法中步骤S1的流程示意图;
图3 为本申请一实施例的余额查询装置的结构示意框图;
图4 为本申请一实施例的发送单元的结构示意框图;
图5 为本申请一实施例的余额查询装置的结构示意框图;
图6 为本申请一实施例的计算机设备的结构示意框图。
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
参照图1,本申请实施例提供一种余额监控方法,利用企业端设置的企业端前置机与银行端进行财务数据交互,所述企业端前置机上设置有多个UKey接口,所述企业端前置机对应多个所述UKey接口被配置为可以与多个不同银行种类的银行端前置机完成财务数据交互。
上述的企业端前置机是指设置在企业端的前置机,是企业端财务系统与银行端进行银企直联时的中间设备。上述企业端前置机被配置为可以与多个不同银行种类的银行端前置机完成数据交互,配置过程为,当企业安装企业端前置机时,企业端前置机有一个管理员界面,在预设的界面内输入指定的配置信息,该配置信息包括企业ID、企业端前置机编号、银行服务器IP、银行端口、银行的银企直联编号、银行端前置机的版本号,银行大类等企业财务系统与银行完成银企直联的必要参数,还会配置线程数大小配置等,以实现多线程任务的处理;然后将配置结果发送给企业端前置机对应的应用服务器。也就是,配置申请通过的银企直联的账号及其相关信息,当企业需要登录各银企直联的账户获取在其对应银行的数据时(交易数据、查询数据等),只需要在企业端前置机上插入对应的UKey(一种通过USB直接与计算机相连、具有密码验证功能、可靠高速的小型存储设备)即可,实现一个企业端前置机与多个不同类银行的银行端前置机连接,企业统一集中管理用户的银行UKey,无需做银行的切换操作。通过企业端前置机可以方便地获取企业的每个银企直联账户的账户信息、交易流水信息、余额信息,并且可以进行相关的支付、归集、调拨等相关操作。上述银行大类是指不同的银行,比如工商银行与建设银行属于两个不同的银行大类等,即使用不同前置机的银行被认为是不同的银行大类。
上述方法,包括步骤:
S1、向所述企业端前置机发送多个银行账户对应的余额查询任务,其中,所述多个银行账户至少包括两个种类银行的银行账户。
在上述步骤S1中,上述余额查询任务即为获取指定银行账户的余额的任务。能用到企业端前置的企业都会设置有多个不同的银行账户,这些银行账户分布于不同的银行大类。因为上述企业端前置机可以插入多个UKey,那么在查询多个银行账户的余额时,只要提前将各银行账户对应的UKey全部插入到企业端前置机上即可,无需每查询一个账户余额,对应的插入一个UKey的操作等,又因为是一次性将各银行对应的UKey全部插入到企业端前置机上,则无需担心UKey插错的问题。在本实施例中,发送余额查询任务的过程包括:在一个列表中选择需要查询余额的银行账户后,接收一个“开始查询”的命令即可生成针对多个被选择的银行账户的余额查询任务,然后可以同时或按照预设的优先规则发送给企业端前置机。本申请中,还可以在不同的时间自动生成针对不同银行账户的余额查询任务,然后自动发送给上述企业端前置机等。
S2、利用所述企业端前置机将针对不同银行账户的余额查询任务发送给对应的银行端前置机,以到对应银行端前置机的银行服务器查询对应银行账户的余额;
在上述步骤S2中,因为上述企业端前置机连接有不同的银行端前置机,获取到多个余额查询任务后,会先分析各余额查询任务对应的银行信息等,以便于将余额查询任务正确地发送给对应的银行端前置机,在发送给对应的银行端前置机余额查询任务的时候,还会获取对应的UKey信息,以便于银行端正常的余额查询处理。
S3、接收所述企业端前置机从各所述银行端前置机获取到的各所述银行账户的余额信息。
在上述步骤S3中,即获取到查询的各银行账户的账户余额信息。当获取到需要监控的银行账户的账户余额信息后,可以根据账户余额信息进行对应的操作,比如,银行账户的余额大于指定的第一阈值后,按照预设的方法将该银行账户的资金转账到第一银行账户;又比如,银行账户的余额小于指定的第二阈值后,按照预设的方法将第二银行账户的资金向该银行账户转账,使其高于上述第二阈值等。
参照图2,在一个实施例中,上述向所述企业端前置机发送多个银行账户对应的余额查询任务的步骤S1,包括:
S11、向所述企业端前置机发送多个所述银行账户的余额查询任务对应的余额查询任务ID,其中,所述企业端前置机将多个所述余额查询任务ID存入到预设的缓存队列中。
在上述步骤S11中,上述的余额查询任务ID只是一个标识,该标识唯一对应一个所述余额查询任务,余额查询任务ID并没有任务内容,以防止将余额查询任务直接放到企业端前置机中,影响企业端前置机的运行空间,而降低其运行速度。因为本申请的企业端前置机可以连接多个银行端前置机,所以各种不同的任务会较多,直接将各种任务堆积到前置机的缓存中,会大大地降低企业端前置机的运行效率,甚至崩溃。本申请中,只放入余额查询任务ID,则大大地降低了企业端前置机的缓存空间的要求,提高运行环境质量。本实施例中,预设的缓存队列一般包括交易缓存队列和查询缓存队列,不同的缓存队列存放对应属性的任务ID,对应的设置交易线程池和查询线程池。企业端前置机在获取到余额查询任务ID时,先判断所述余额查询任务ID的属性,其中属性包括交易属性、查询属性,因为余额查询任务ID属于查询类,则放入到查询缓存队列中。两个缓存队列中的任务按优先级进行排序,每个任务会设置有一个类型标识,类型标识分为1-8个级别,为1的话等级最高,代表紧急任务,优先处理,可以根据预设预设规则,根据具体请求附加对应的优先级别,比如,支付的级别高于查询银行流水的级别等。本申请中,虽然发出的任务都是余额查询任务,但是各任务对应的任务ID存入到查询缓存队列中的顺序也会存在先后的顺序,造成先后顺序的原因包括:企业端对查询不同银行账户的余额的任务预设了优先级,比如,X银行账户是企业端的主要银行账户,则将查询该X银行账户的余额查询任务ID的优先级设定为靠前的如1或2的优先级等。
S12、接收所述企业端前置机反馈的余额查询任务ID,根据所述余额查询任务ID获取对应的余额查询任务,并发给所述企业端前置机。
在上述步骤S12中,上述企业端前置机反馈的余额查询任务ID是指,对应上述查询缓存队列的查询线程池中有空闲,则到查询缓存队列中获取余额查询任务,又因为此时查询缓存队列中只是余额查询任务ID,所以企业端前置机会将余额查询任务ID返回给上述应用服务器,应用服务器会根据余额查询任务ID生成或调取对应的任务,然后发送给企业端前置机。
在一个实施例中,上述向所述企业端前置机发送多个银行账户对应的余额查询任务的步骤S1之前,包括:
S101、判断所述企业端前置机上是否插入对应各种类银行的UKey设备;
S102、若否,则报警。
在上述步骤S101和S102中,判断企业端前置机上是否插入对应各种类银行的UKey设备的方法包括:采集各UKey接口插入的UKey设备的对应其银行种类的标识,然后将所述标识与配置企业端前置机时配置的代表各类银行的标识进行比对,如果采集到的各标识全面覆盖配置企业端前置机时配置的代表各类银行的标识时,则判定企业端前置机上插入对应各种类银行的UKey设备,可以执行后续如步骤S1等步骤,否者,将未被覆盖的标识对应的银行种类提取出来,并发送给企业的相关人员以报警,此时企业的相关人员可以进行相应的处理,将忘记插入的UKey设备或插入处松动而导致UKey设备接触不良的重新插入等,以保证企业与各银行之间的交互。在另一实施例中,还可以判断获取到的UKey设备的标识与配置企业端前置机时配置的代表各类银行的标识(不重复)的数量是否相同,因为一个银行只会发一个UKey给企业,所以当数量相同时候,基本可以判定企业端前置机上插入对应各种类银行的UKey设备,此种判断方法虽然存在缺陷,但是判断速度会更快。
在一个实施例中,上述余额监控方法还包括:
接收所述企业端前置机发送的心跳检测包,检测与所述企业端前置机的连接状态;若连接状态为断开,则发出警报信息。
理论上,企业端前置机和应用服务器应该长期在线,但是因为是电子产品,难免会出现故障或者升级等处理,此时企业端前置机与应用服务器可能断掉连接,那么通过心跳检测的方式检测企业端前置机和应用服务器的连接状态,当两者连接失败,则需要发出警报信息。发出警报信息包括两种,第一种,发送邮件等信息给企业的相关人员,和/或发送给提供企业端前置机的第三方的相关人员;第二种,发送指定的信息给与其连接的银行端前置机,并由银行端前置机发送给银行的相关管理系统,以告知银行端的工作人员,银行端的工作人员可以人工告知企业端相应人员发生了断连接的故障等。上述接收发送心跳检测包,可以保障企业端的财务人了解企业端前置机和应用服务器是否断开连接,从而及时处理原本需要银企直联完成的事物。
在一个实施例中,上述向所述企业端前置机发送多个银行账户对应的余额查询任务的步骤S1,包括:
S13、通过长连接的方式向所述企业端前置机发送多个银行账户对应的余额查询任务。
在上述步骤S13中,因为向企业端前置机发送的余额查询任务可能是连续的,所以使用长连接的方式监听服务,使每个操作完后都不断开,下次处理时直接发送数据包就可以,不用建立TCP(Transmission Control Protocol 传输控制协议)连接,以保持处理任务的效率。本实施例中,应用服务器与企业端前置机采用BIO(block input output)同步阻塞模式进行长连接。不同的余额查询任务不能够同时进行,所以需要按照指令顺序进行,一个指令执行完才能执行下一个指令,不能异步执行,所以本申请中采用BIO同步阻塞模式使应用服务器与企业端前置机进行长连接。
在一个实施中,上述余额监控方法还包括:
与所述企业端前置机发送任务时,采用Protocol Buffers进行序列化。
Protocol Buffers
是一种轻便高效的结构化数据存储格式,可以用于结构化数据串行化,或者说序列化。它很适合做数据存储或 RPC 数据交换格式。可用于通讯协议、数据存储等领域的语言无关、平台无关、可扩展的序列化结构数据格式,简单说来
Protobuf 的主要优点就是:简单,快。本申请采用GOOGLE(谷歌)的Protocol Buffers进行序列化,可以提高报文封装和发送的效率。
本申请的余额监控方法,因为在企业端前置机上设置了多个UKey接口并进行相应的配置,所以企业端前置机能够与多个不同种类的银行进行银企直联功能;当发起余额查询任务时,无需手动地登录不同的银行账户查询其余额,而是通过财务系统自动完成,即可以自动查询不同的银行账户的余额,当获取到各银行账户的余额信息之后,则可以根据各银行账户的余额判断出哪些银行账户需要财务调拨处理,那些需要归集处理等,并按照预设的规则进行财务调拨、资金归集等,大大地提高了对不同大类银行的账户的不同任务的执行效率,节约人力资源,而且只需要配置一次即可,在查询过程中,不会出现人为的如输入账号等错误。
参照图3,本申请实施例还提供一种余额查询装置,利用企业端设置的企业端前置机与银行端进行财务数据交互,所述企业端前置机上设置有多个UKey接口,所述企业端前置机对应多个所述UKey接口被配置为可以与多个不同银行种类的银行端前置机完成财务数据交互。
上述的企业端前置机是指设置在企业端的前置机,是企业端财务系统与银行端进行银企直联时的中间设备。上述企业端前置机被配置为可以与多个不同银行种类的银行端前置机完成数据交互,配置过程为,当企业安装企业端前置机时,企业端前置机有一个管理员界面,在预设的界面内输入指定的配置信息,该配置信息包括企业ID、企业端前置机编号、银行服务器IP、银行端口、银行的银企直联编号、银行端前置机的版本号,银行大类等企业财务系统与银行完成银企直联的必要参数,还会配置线程数大小配置等,以实现多线程任务的处理;然后将配置结果发送给企业端前置机对应的应用服务器。也就是,配置申请通过的银企直联的账号及其相关信息,当企业需要登录各银企直联的账户获取在其对应银行的数据时(交易数据、查询数据等),只需要在企业端前置机上插入对应的UKey(一种通过USB直接与计算机相连、具有密码验证功能、可靠高速的小型存储设备)即可,实现一个企业端前置机与多个不同类银行的银行端前置机连接,企业统一集中管理用户的银行UKey,无需做银行的切换操作。通过企业端前置机可以方便地获取企业的每个银企直联账户的账户信息、交易流水信息、余额信息,并且可以进行相关的支付、归集、调拨等相关操作。上述银行大类是指不同的银行,比如工商银行与建设银行属于两个不同的银行大类等,即使用不同前置机的银行被认为是不同的银行大类。
所述装置,包括:
发送单元10,用于向所述企业端前置机发送多个银行账户对应的余额查询任务,其中,所述多个银行账户至少包括两个种类银行的银行账户。
在上述发送单元10中,上述余额查询任务即为获取指定银行账户的余额的任务。能用到企业端前置的企业都会设置有多个不同的银行账户,这些银行账户分布于不同的银行大类。因为上述企业端前置机可以插入多个UKey,那么在查询多个银行账户的余额时,只要提前将各银行账户对应的UKey全部插入到企业端前置机上即可,无需每查询一个账户余额,对应的插入一个UKey的操作等,又因为是一次性将各银行对应的UKey全部插入到企业端前置机上,则无需担心UKey插错的问题。在本实施例中,发送余额查询任务的过程包括:在一个列表中选择需要查询余额的银行账户后,接收一个“开始查询”的命令即可生成针对多个被选择的银行账户的余额查询任务,然后可以同时或按照预设的优先规则发送给企业端前置机。本申请中,还可以在不同的时间自动生成针对不同银行账户的余额查询任务,然后自动发送给上述企业端前置机等。
转发单元20,用于利用所述企业端前置机将针对不同银行账户的余额查询任务发送给对应的银行端前置机,以到对应银行端前置机的银行服务器查询对应银行账户的余额。
在上述转发单元20中,因为上述企业端前置机连接有不同的银行端前置机,获取到多个余额查询任务后,会先分析各余额查询任务对应的银行信息等,以便于将余额查询任务正确地发送给对应的银行端前置机,在发送给对应的银行端前置机余额查询任务的时候,还会获取对应的UKey信息,以便于银行端正常的余额查询处理。
接收单元30,用于接收所述企业端前置机从各所述银行端前置机获取到的各所述银行账户的余额信息。
在上述接收单元30中,即为通过接收单元30获取到查询的各银行账户的账户余额信息。当获取到需要监控的银行账户的账户余额信息后,可以根据账户余额信息进行对应的操作,比如,银行账户的余额大于指定的第一阈值后,按照预设的方法将该银行账户的资金转账到第一银行账户;又比如,银行账户的余额小于指定的第二阈值后,按照预设的方法将第二银行账户的资金向该银行账户转账,使其高于上述第二阈值等。
参照图4,在一个实施例中,上述发送单元10,包括:
发送模块11,用于向所述企业端前置机发送多个所述银行账户的余额查询任务对应的余额查询任务ID,其中,所述企业端前置机将多个所述余额查询任务ID存入到预设的缓存队列中。
在上述发送模块11中,上述的余额查询任务ID只是一个标识,该标识唯一对应一个所述余额查询任务,余额查询任务ID并没有任务内容,以防止将余额查询任务直接放到企业端前置机中,影响企业端前置机的运行空间,而降低其运行速度。因为本申请的企业端前置机可以连接多个银行端前置机,所以各种不同的任务会较多,直接将各种任务堆积到前置机的缓存中,会大大地降低企业端前置机的运行效率,甚至崩溃。本申请中,只放入余额查询任务ID,则大大地降低了企业端前置机的缓存空间的要求,提高运行环境质量。本实施例中,预设的缓存队列一般包括交易缓存队列和查询缓存队列,不同的缓存队列存放对应属性的任务ID,对应的设置交易线程池和查询线程池。企业端前置机在获取到余额查询任务ID时,先判断所述余额查询任务ID的属性,其中属性包括交易属性、查询属性,因为余额查询任务ID属于查询类,则放入到查询缓存队列中。两个缓存队列中的任务按优先级进行排序,每个任务会设置有一个类型标识,类型标识分为1-8个级别,为1的话等级最高,代表紧急任务,优先处理,可以根据预设预设规则,根据具体请求附加对应的优先级别,比如,支付的级别高于查询银行流水的级别等。本申请中,虽然发出的任务都是余额查询任务,但是各任务对应的任务ID存入到查询缓存队列中的顺序也会存在先后的顺序,造成先后顺序的原因包括:企业端对查询不同银行账户的余额的任务预设了优先级,比如,X银行账户是企业端的主要银行账户,则将查询该X银行账户的余额查询任务ID的优先级设定为靠前的如1或2的优先级等。
接收反馈模块12,用于接收所述企业端前置机反馈的余额查询任务ID,根据所述余额查询任务ID获取对应的余额查询任务,并发给所述企业端前置机。
在上述接收反馈模块12中,上述企业端前置机反馈的余额查询任务ID是指,对应上述查询缓存队列的查询线程池中有空闲,则到查询缓存队列中获取余额查询任务,又因为此时查询缓存队列中只是余额查询任务ID,所以企业端前置机会将余额查询任务ID返回给上述应用服务器,应用服务器会根据余额查询任务ID生成或调取对应的任务,然后发送给企业端前置机。
参照图5,在一个实施例中,上述余额查询装置还包括:
判断单元101,用于判断所述企业端前置机上是否插入对应各种类银行的UKey设备;
第一报警单元102,用于若判定所述企业端前置机上未插入对应各种类银行的UKey设备,则报警。
在上述判断单元101和第一报警单元102中,判断单元101判断企业端前置机上是否插入对应各种类银行的UKey设备的方法包括:采集各UKey接口插入的UKey设备的对应其银行种类的标识,然后将所述标识与配置企业端前置机时配置的代表各类银行的标识进行比对,如果采集到的各标识全面覆盖配置企业端前置机时配置的代表各类银行的标识时,则判定企业端前置机上插入对应各种类银行的UKey设备,否者,将未被覆盖的标识对应的银行种类提取出来,并通过第一报警单元102发送给企业的相关人员以报警,此时企业的相关人员可以进行相应的处理,将忘记插入的UKey设备或插入处松动而导致UKey设备接触不良的重新插入等,以保证企业与各银行之间的交互。在另一实施例中,还可以判断获取到的UKey设备的标识与配置企业端前置机时配置的代表各类银行的标识(不重复)的数量是否相同,因为一个银行只会发一个UKey给企业,所以当数量相同时候,基本可以判定企业端前置机上插入对应各种类银行的UKey设备,此种判断方法虽然存在缺陷,但是判断速度会更快。
在一个实施例中,上述余额查询装置还包括:
心跳检测单元,用于接收所述企业端前置机发送的心跳检测包,检测与所述企业端前置机的连接状态;
第二报警单元,用于若连接状态为断开,则发出警报信息。
理论上,企业端前置机和应用服务器应该长期在线,但是因为是电子产品,难免会出现故障或者升级等处理,此时企业端前置机与应用服务器可能断掉连接,那么通过心跳检测的方式检测企业端前置机和应用服务器的连接状态,当两者连接失败,则需要发出警报信息。发出警报信息包括两种,第一种,发送邮件等信息给企业的相关人员,和/或发送给提供企业端前置机的第三方的相关人员;第二种,发送指定的信息给与其连接的银行端前置机,并由银行端前置机发送给银行的相关管理系统,以告知银行端的工作人员,银行端的工作人员可以人工告知企业端相应人员发生了断连接的故障等。上述接收发送心跳检测包,可以保障企业端的财务人了解企业端前置机和应用服务器是否断开连接,从而及时处理原本需要银企直联完成的事物。
在一个实施例中,上述发送单元10,包括:
长连接模块,用于通过长连接的方式向所述企业端前置机发送多个银行账户对应的余额查询任务。
在上述长连接模块中,因为向企业端前置机发送的余额查询任务可能是连续的,所以使用长连接的方式监听服务,使每个操作完后都不断开,下次处理时直接发送数据包就可以,不用建立TCP(Transmission Control Protocol 传输控制协议)连接,以保持处理任务的效率。本实施例中,应用服务器与企业端前置机采用BIO(block input output)同步阻塞模式进行长连接。不同的余额查询任务不能够同时进行,所以需要按照指令顺序进行,一个指令执行完才能执行下一个指令,不能异步执行,所以本申请中采用BIO同步阻塞模式使应用服务器与企业端前置机进行长连接。
在一个实施中,上述余额查询装置还包括:
序列化单元,用于与所述企业端前置机发送任务时,采用Protocol Buffers进行序列化。
Protocol Buffers
是一种轻便高效的结构化数据存储格式,可以用于结构化数据串行化,或者说序列化。它很适合做数据存储或 RPC 数据交换格式。可用于通讯协议、数据存储等领域的语言无关、平台无关、可扩展的序列化结构数据格式,简单说来
Protobuf 的主要优点就是:简单,快。本申请采用GOOGLE(谷歌)的Protocol Buffers进行序列化,可以提高报文封装和发送的效率。
本申请的余额查询装置,因为在企业端前置机上设置了多个UKey接口并进行相应的配置,所以企业端前置机能够与多个不同种类的银行进行银企直联功能;当发起余额查询任务时,无需手动地登录不同的银行账户查询其余额,而是通过财务系统自动完成,即可以自动查询不同的银行账户的余额,当获取到各银行账户的余额信息之后,则可以根据各银行账户的余额判断出哪些银行账户需要财务调拨处理,那些需要归集处理等,并按照预设的规则进行财务调拨、资金归集等,大大地提高了对不同大类银行的账户的不同任务的执行效率,节约人力资源,而且只需要配置一次即可,在查询过程中,不会出现人为的如输入账号等错误。
参照图6,本申请实施例中还提供一种计算机设备,该计算机设备可以是服务器,其内部结构可以如图6所示。该计算机设备包括通过系统总线连接的处理器、存储器、网络接口和数据库。其中,该计算机设计的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作系统、计算机可读指令和数据库。该内存器为非易失性存储介质中的操作系统和计算机可读指令的运行提供环境。该计算机设备的数据库用于存储余额监控方法程序等。该计算机设备的网络接口用于与外部的终端通过网络连接通信。该计算机可读指令被处理器执行时以实现上述各实施例中的余额监控方法。
本申请一实施例还提供一种计算机非易失性可读存储介质,其上存储有计算机可读指令,计算机可读指令被处理器执行时实现上述各实施例中的余额监控方法。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机可读指令来指令相关的硬件来完成,所述的计算机可读指令可存储于一非易失性计算机可读取存储介质中,该计算机可读指令在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的和实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和/或易失性存储器。非易失性存储器可以包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM)或者外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双速据率SDRAM(SSRSDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)等。
以上所述仅为本申请的优选实施例,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。
Claims (20)
- 一种余额监控方法,其特征在于,利用企业端设置的企业端前置机与银行端进行财务数据交互,所述企业端前置机上设置有多个UKey接口,所述企业端前置机对应多个所述UKey接口被配置为可以与多个不同银行种类的银行端前置机完成财务数据交互;所述方法,包括:向所述企业端前置机发送多个银行账户对应的余额查询任务,其中,所述多个银行账户至少包括两个种类银行的银行账户;利用所述企业端前置机将针对不同银行账户的余额查询任务发送给对应的银行端前置机,以到对应银行端前置机的银行服务器查询对应银行账户的余额;接收所述企业端前置机从各所述银行端前置机获取到的各所述银行账户的余额信息。
- 根据权利要求1所述的余额监控方法,其特征在于,所述向所述企业端前置机发送多个银行账户对应的余额查询任务的步骤,包括:向所述企业端前置机发送多个所述银行账户的余额查询任务对应的余额查询任务ID,其中,所述企业端前置机将多个所述余额查询任务ID存入到预设的缓存队列中;接收所述企业端前置机反馈的余额查询任务ID,根据所述余额查询任务ID获取对应的余额查询任务,并发给所述企业端前置机。
- 根据权利要求1所述的余额监控方法,其特征在于,所述向所述企业端前置机发送多个银行账户对应的余额查询任务的步骤之前,包括:判断所述企业端前置机上是否插入对应各种类银行的UKey设备;若否,则报警。
- 根据权利要求1所述的余额监控方法,其特征在于,所述方法还包括:接收所述企业端前置机发送的心跳检测包,检测与所述企业端前置机的连接状态;若连接状态为断开,则发出警报信息。
- 根据权利要求1所述的余额监控方法,其特征在于,所述向所述企业端前置机发送多个银行账户对应的余额查询任务的步骤,包括:通过长连接的方式向所述企业端前置机发送多个银行账户对应的余额查询任务。
- 根据权利要求5所述的余额监控方法,其特征在于,所述通过长连接的方式向所述企业端前置机发送多个银行账户对应的余额查询任务的步骤,包括:通过BIO同步阻塞模式向所述企业端前置机发送多个银行账户对应的余额查询任务。
- 根据权利要求1所述的余额监控方法,其特征在于,所述方法还包括:与所述企业端前置机发送任务时,采用Protocol Buffers进行序列化。
- 一种余额查询装置,其特征在于,利用企业端设置的企业端前置机与银行端进行财务数据交互,所述企业端前置机上设置有多个UKey接口,所述企业端前置机对应多个所述UKey接口被配置为可以与多个不同银行种类的银行端前置机完成财务数据交互;所述装置,包括:发送单元,用于向所述企业端前置机发送多个银行账户对应的余额查询任务,其中,所述多个银行账户至少包括两个种类银行的银行账户;转发单元,用于利用所述企业端前置机将针对不同银行账户的余额查询任务发送给对应的银行端前置机,以到对应银行端前置机的银行服务器查询对应银行账户的余额;接收单元,用于接收所述企业端前置机从各所述银行端前置机获取到的各所述银行账户的余额信息。
- 根据权利要求8所述的余额监控装置,其特征在于,所述发送单元,包括:发送模块,用于向所述企业端前置机发送多个所述银行账户的余额查询任务对应的余额查询任务ID,其中,所述企业端前置机将多个所述余额查询任务ID存入到预设的缓存队列中;接收反馈模块,用于接收所述企业端前置机反馈的余额查询任务ID,根据所述余额查询任务ID获取对应的余额查询任务,并发给所述企业端前置机。
- 根据权利要求8所述的余额监控装置,其特征在于,所述装置还包括:判断单元,用于判断所述企业端前置机上是否插入对应各种类银行的UKey设备;第一报警单元,用于若判定所述企业端前置机上未插入对应各种类银行的UKey设备,则报警。
- 根据权利要求8所述的余额监控装置,其特征在于,所述装置还包括:心跳检测单元,用于接收所述企业端前置机发送的心跳检测包,检测与所述企业端前置机的连接状态;第二报警单元,用于若连接状态为断开,则发出警报信息。
- 根据权利要求8所述的余额监控装置,其特征在于,所述发送单元,包括:长连接模块,用于通过长连接的方式向所述企业端前置机发送多个银行账户对应的余额查询任务。
- 根据权利要求12所述的余额监控装置,其特征在于,所述长连接模块,具体用于通过BIO同步阻塞模式向所述企业端前置机发送多个银行账户对应的余额查询任务。
- 根据权利要求8所述的余额监控装置,其特征在于,所述装置还包括:序列化单元,用于与所述企业端前置机发送任务时,采用Protocol Buffers进行序列化。
- 一种计算机设备,包括存储器和处理器,所述存储器存储有计算机可读指令,其特征在于,所述处理器执行所述计算机可读指令时实现余额监控方法,利用企业端设置的企业端前置机与银行端进行财务数据交互,所述企业端前置机上设置有多个UKey接口,所述企业端前置机对应多个所述UKey接口被配置为可以与多个不同银行种类的银行端前置机完成财务数据交互;所述方法,包括:向所述企业端前置机发送多个银行账户对应的余额查询任务,其中,所述多个银行账户至少包括两个种类银行的银行账户;利用所述企业端前置机将针对不同银行账户的余额查询任务发送给对应的银行端前置机,以到对应银行端前置机的银行服务器查询对应银行账户的余额;接收所述企业端前置机从各所述银行端前置机获取到的各所述银行账户的余额信息。
- 根据权利要求15所述的计算机设备,其特征在于,所述向所述企业端前置机发送多个银行账户对应的余额查询任务的步骤,包括:向所述企业端前置机发送多个所述银行账户的余额查询任务对应的余额查询任务ID,其中,所述企业端前置机将多个所述余额查询任务ID存入到预设的缓存队列中;接收所述企业端前置机反馈的余额查询任务ID,根据所述余额查询任务ID获取对应的余额查询任务,并发给所述企业端前置机。
- 根据权利要求15所述的计算机设备,其特征在于,所述向所述企业端前置机发送多个银行账户对应的余额查询任务的步骤之前,包括:判断所述企业端前置机上是否插入对应各种类银行的UKey设备;若否,则报警。
- 根据权利要求15所述的计算机设备,其特征在于,所述方法还包括:接收所述企业端前置机发送的心跳检测包,检测与所述企业端前置机的连接状态;若连接状态为断开,则发出警报信息。
- 一种计算机非易失性可读存储介质,其上存储有计算机可读指令,其特征在于,所述计算机可读指令被处理器执行时实现余额监控方法,利用企业端设置的企业端前置机与银行端进行财务数据交互,所述企业端前置机上设置有多个UKey接口,所述企业端前置机对应多个所述UKey接口被配置为可以与多个不同银行种类的银行端前置机完成财务数据交互;所述方法,包括:向所述企业端前置机发送多个银行账户对应的余额查询任务,其中,所述多个银行账户至少包括两个种类银行的银行账户;利用所述企业端前置机将针对不同银行账户的余额查询任务发送给对应的银行端前置机,以到对应银行端前置机的银行服务器查询对应银行账户的余额;接收所述企业端前置机从各所述银行端前置机获取到的各所述银行账户的余额信息。
- 根据权利要求19所述的计算机非易失性可读存储介质,其特征在于,所述向所述企业端前置机发送多个银行账户对应的余额查询任务的步骤,包括:向所述企业端前置机发送多个所述银行账户的余额查询任务对应的余额查询任务ID,其中,所述企业端前置机将多个所述余额查询任务ID存入到预设的缓存队列中;接收所述企业端前置机反馈的余额查询任务ID,根据所述余额查询任务ID获取对应的余额查询任务,并发给所述企业端前置机。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810707866.4A CN109118352A (zh) | 2018-07-02 | 2018-07-02 | 余额监控方法、装置、计算机设备和存储介质 |
CN201810707866.4 | 2018-07-02 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2020006896A1 true WO2020006896A1 (zh) | 2020-01-09 |
Family
ID=64822121
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2018/108029 WO2020006896A1 (zh) | 2018-07-02 | 2018-09-27 | 余额监控方法、装置、计算机设备和存储介质 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN109118352A (zh) |
WO (1) | WO2020006896A1 (zh) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110827009B (zh) * | 2019-10-24 | 2023-04-04 | 支付宝(杭州)信息技术有限公司 | 一种基于账户余额限制的资金转移方法及装置 |
CN111881329A (zh) * | 2020-07-09 | 2020-11-03 | 中国建设银行股份有限公司 | 一种账户余额管理方法和系统 |
CN114693436A (zh) * | 2022-05-30 | 2022-07-01 | 云账户技术(天津)有限公司 | 头寸资金调拨管理系统、方法和网络设备 |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR200418791Y1 (ko) * | 2006-01-24 | 2006-06-14 | 윤종진 | 전자키를 이용한 티씨피 아이피 기반의 지능형 출입 관리시스템 |
CN101625749A (zh) * | 2009-08-18 | 2010-01-13 | 交通银行股份有限公司 | 一种联机批处理数据的方法、服务器及系统 |
CN102521778A (zh) * | 2011-12-08 | 2012-06-27 | 携程计算机技术(上海)有限公司 | 企业与银行直接进行财务数据交互的系统 |
CN103679960A (zh) * | 2012-09-06 | 2014-03-26 | 联多科技(北京)有限公司 | 现金通统一金融平台 |
CN107516204A (zh) * | 2017-08-31 | 2017-12-26 | 四川长虹电器股份有限公司 | 互联网银企对接系统及对接方法 |
CN108040083A (zh) * | 2017-11-13 | 2018-05-15 | 深圳市买买提乐购金融服务有限公司 | 银企直连通信的控制方法、相关设备及系统 |
-
2018
- 2018-07-02 CN CN201810707866.4A patent/CN109118352A/zh not_active Withdrawn
- 2018-09-27 WO PCT/CN2018/108029 patent/WO2020006896A1/zh active Application Filing
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR200418791Y1 (ko) * | 2006-01-24 | 2006-06-14 | 윤종진 | 전자키를 이용한 티씨피 아이피 기반의 지능형 출입 관리시스템 |
CN101625749A (zh) * | 2009-08-18 | 2010-01-13 | 交通银行股份有限公司 | 一种联机批处理数据的方法、服务器及系统 |
CN102521778A (zh) * | 2011-12-08 | 2012-06-27 | 携程计算机技术(上海)有限公司 | 企业与银行直接进行财务数据交互的系统 |
CN103679960A (zh) * | 2012-09-06 | 2014-03-26 | 联多科技(北京)有限公司 | 现金通统一金融平台 |
CN107516204A (zh) * | 2017-08-31 | 2017-12-26 | 四川长虹电器股份有限公司 | 互联网银企对接系统及对接方法 |
CN108040083A (zh) * | 2017-11-13 | 2018-05-15 | 深圳市买买提乐购金融服务有限公司 | 银企直连通信的控制方法、相关设备及系统 |
Also Published As
Publication number | Publication date |
---|---|
CN109118352A (zh) | 2019-01-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2020006903A1 (zh) | 财务数据交互方法、装置、计算机设备和存储介质 | |
WO2020006902A1 (zh) | 批量支付方法、装置、计算机设备和存储介质 | |
WO2020006895A1 (zh) | 对账方法、装置、计算机设备和存储介质 | |
WO2020006893A1 (zh) | 回单获取方法、装置、计算机设备和存储介质 | |
WO2020006896A1 (zh) | 余额监控方法、装置、计算机设备和存储介质 | |
US9015731B2 (en) | Event handling system and method | |
CN104182683B (zh) | 一种联机事务的监控方法、装置及系统 | |
JP2018508072A (ja) | メッセージをプッシュするための方法および装置 | |
WO2009030130A1 (fr) | Procédé et système de transmission de données | |
WO2020006901A1 (zh) | 资金归集方法、装置、计算机设备和存储介质 | |
WO2020259515A1 (zh) | 一种tcp应用的调用链获取方法及装置 | |
CN111240862A (zh) | 一种通用接口平台以及数据转换方法 | |
US11556407B2 (en) | Fast node death detection | |
CN107797859A (zh) | 一种定时任务的调度方法及一种调度服务器 | |
CN111694743A (zh) | 业务系统的检测方法及装置 | |
US12074840B2 (en) | Techniques to provide streaming data resiliency utilizing a distributed message queue system | |
WO2020258653A1 (zh) | 一种跨节点的数据处理方法及装置 | |
CN107172112B (zh) | 一种计算机文件传输方法及装置 | |
CN107133171A (zh) | 一种基于组件式的轻量aop框架及其使用方法 | |
WO2020006904A1 (zh) | 财务调拨方法、装置、计算机设备和存储介质 | |
CN104731660A (zh) | 数据分配方法、装置和系统 | |
CN110569178A (zh) | 基于大数据平台的接口预警方法和系统 | |
CN115643271A (zh) | 一种云上多应用数据同步方法、装置、服务器及介质 | |
CN104754029A (zh) | 确定主管理服务器的方法、装置和系统 | |
CN115086311A (zh) | 一种基于云服务总线的企业跨系统服务的管理系统 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 18925061 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 18925061 Country of ref document: EP Kind code of ref document: A1 |