WO2020006894A1 - 财务数据同步方法、装置、计算机设备和存储介质 - Google Patents

财务数据同步方法、装置、计算机设备和存储介质 Download PDF

Info

Publication number
WO2020006894A1
WO2020006894A1 PCT/CN2018/107680 CN2018107680W WO2020006894A1 WO 2020006894 A1 WO2020006894 A1 WO 2020006894A1 CN 2018107680 W CN2018107680 W CN 2018107680W WO 2020006894 A1 WO2020006894 A1 WO 2020006894A1
Authority
WO
WIPO (PCT)
Prior art keywords
financial data
enterprise
data synchronization
financial
task
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.)
Ceased
Application number
PCT/CN2018/107680
Other languages
English (en)
French (fr)
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.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Publication of WO2020006894A1 publication Critical patent/WO2020006894A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/12Accounting
    • G06Q40/125Finance or payroll

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 synchronizing financial data.
  • the main purpose of this application is to provide a highly flexible financial data synchronization method, device, computer equipment and storage medium.
  • this application proposes a method for synchronizing financial data, which is used to synchronize financial data in an application database of an application server corresponding to a front-end server on an enterprise end, and / or synchronize financial data in an enterprise database on an enterprise end, including:
  • the present application also provides a financial data synchronization device for synchronizing financial data in an application database of an application server corresponding to a front-end server on an enterprise side, and / or, synchronizing financial data in an enterprise database on an enterprise side, including:
  • An obtaining unit for obtaining financial data synchronization commands of corresponding fields An obtaining unit for obtaining financial data synchronization commands of corresponding fields
  • a search unit configured to search the preset intermediate data table for the financial data corresponding to the field according to the financial data synchronization command
  • a synchronization unit is used to synchronize the found financial data to a specified database.
  • 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 financial data synchronization method, device, computer equipment, and storage medium of this application establish an intermediate data table that is fully recognized by the enterprise-end front-end processor and the enterprise side, and first update the data to be synchronized to the intermediate data table, and then apply the database or
  • the fields in the intermediate data table can be configured, and the caller and callee will not be tied to the fields, which improves the efficiency and flexibility of financial data synchronization.
  • FIG. 1 is a schematic flowchart of a financial data synchronization method according to an embodiment of the present application
  • FIG. 2 is a schematic flowchart of a financial data synchronization method according to an embodiment of the present application
  • step S2 in a financial data synchronization method according to an embodiment of the present application
  • FIG. 4 is a schematic flowchart of a financial data synchronization device according to an embodiment of the present application.
  • FIG. 5 is a schematic flowchart of a financial data synchronization device according to an embodiment of the present application.
  • FIG. 6 is a schematic flowchart of a search unit according to an embodiment of the present application.
  • FIG. 7 is a schematic flowchart of a computer device according to an embodiment of the present application.
  • an embodiment of the present application provides a method for synchronizing financial data, which is used to synchronize financial data in an application database of an application server corresponding to a front end of an enterprise, and / or synchronize financial data in an enterprise database of an enterprise.
  • the foregoing enterprise-side front-end machine refers to the front-end machine set on the enterprise side, and is an intermediate device when the financial system of the enterprise side and the bank-side are directly connected with each other.
  • the above application server refers to a third-party application server that provides an enterprise-side front-end processor to the enterprise. It serves as the management background of the enterprise-side front-end processor.
  • the tasks issued by the enterprise first enter the above application server, and then the application server sends the application server Front-end machine.
  • the application database is a database that stores application server-side financial data.
  • the above-mentioned enterprise-side enterprise database is a database that stores enterprise-side financial data.
  • the above method includes steps:
  • the above field generally represents a kind of data.
  • the corresponding field includes a plurality of fields, which are respectively bank account information, user information, organizational structure, and approval flow information.
  • the above-mentioned execution subject may be an enterprise side, or an application server of an enterprise side front-end processor provider, or an enterprise side and an application server may perform data synchronization respectively.
  • the above intermediate data table is an intermediate data table set by the enterprise side, and the enterprise side will send the relevant authority of the intermediate data table to the above application server, that is, the application server can pass the enterprise side front-end processor to the intermediate Read data from data tables, and send data to intermediate data tables.
  • the information of the intermediate data such as fields and tabulation rules, is fed back to the application server, so that the technical staff on the application server side can configure the application server accordingly.
  • the application server may also preset a configuration script and perform corresponding configuration according to the information fed back by the enterprise.
  • the above intermediate data table generally includes all data that the application server and the enterprise need to synchronize.
  • step S3 when the financial data synchronization command is initiated by the application server, the designated database is the application database on the application server side; if the financial data synchronization command is initiated by the enterprise side, the designated database is the enterprise on the enterprise side database.
  • step S1 of obtaining the financial data synchronization command of a corresponding field the method includes:
  • the above-mentioned incremental data refers to data added to the original historical data.
  • the above incremental data is the incremental data in the database corresponding to the execution subject.
  • the execution subject is an enterprise side
  • the data generated by the enterprise side is stored in the enterprise database
  • the enterprise side obtains the incremental data in the enterprise database, and then sends the incremental data to the above-mentioned intermediate Data sheet.
  • the execution subject is an application server
  • the data obtained by the application server is stored in the corresponding application database
  • the application server obtains the incremental data in the application database, and then sends the incremental data to the above.
  • the intermediate data table There are two methods for updating the incremental data to the intermediate data table.
  • the first method is to set an update frequency, that is, to update the intermediate data table regularly. Taking the enterprise side as an example, the enterprise side is set to the middle every 30 minutes.
  • the data table uploads incremental data once to update the intermediate data table.
  • the second is to trigger immediately, or take the enterprise side as an example. As long as the enterprise side generates incremental data, it is immediately uploaded to the intermediate data table.
  • the method for synchronizing financial data further includes:
  • a field extension command is sent to perform extension processing on the fields of the intermediate data table, wherein the extension command includes an extension field.
  • the above field expansion command includes adding fields in the intermediate data table, modifying fields in the intermediate data table, deleting fields in the intermediate data table, and the like.
  • the prior art method of interface API for data synchronization there is no need to update the synchronization data software version of the enterprise side and the application server, and the use is more flexible and convenient.
  • the extension of 5 fields in the table can meet the upgrade requirements, and no other major changes such as version upgrades are required.
  • Step S2 of the data includes:
  • S21 Send a first task ID corresponding to the financial data synchronization command to the enterprise-side front-end processor, wherein the enterprise-side front-end processor stores the first task ID in a preset cache queue.
  • a plurality of UKey interfaces are set on the enterprise-side front-end machine, and the enterprise-side front-end machine is configured to correspond to a plurality of UKey interfaces and can be completed with a plurality of bank-side front-end machines of different types of banks.
  • Financial data interaction is that when the enterprise-end front-end processor is installed by the enterprise, the enterprise-end front-end processor has an administrator interface, and the specified configuration information is entered in the preset interface, and the configuration information includes the enterprise ID and the enterprise-end front-end processor number.
  • Bank server IP, bank port, bank-enterprise direct connection number of the bank, version number of the bank front-end processor, bank type, thread size configuration, etc., and then send the configuration result to the application server corresponding to the front-end processor of the enterprise . That is, configure the bank-enterprise direct account number and related information passed by the application.
  • an enterprise needs to log in to each account to obtain data at its corresponding bank (transaction data, query data, etc.), it only needs to be inserted on the Caiku front-end machine.
  • the corresponding UKEY can be used to realize the connection of one enterprise-end front-end machine with multiple bank-end front-end machines of different types of banks.
  • the enterprise centrally manages the user's bank UKey in a unified manner, without the need for bank switching operations.
  • the bank front-end machine can obtain account information, transaction flow information, and balance information of each bank in real time, and can perform related operations such as payment, collection, and transfer.
  • the above major banks refer to different banks. For example, 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 first task ID described above is only an identifier, and the identifier uniquely corresponds to the financial data synchronization command.
  • the first task ID has no task content to prevent the financial data synchronization command from being directly placed in the front end of the enterprise, which affects the enterprise end.
  • the running space of the front machine reduces its running speed.
  • 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 attributes include transaction attributes and query attributes. Because the first 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. Rules, according to the specific request attached to the corresponding priority level, for example, the level of payment is higher than the level of data synchronization.
  • the above-mentioned enterprise-side front-end processor feeds back the first task ID means that if there is idle in the thread pool corresponding to the cache queue, the task command is obtained from the cache queue, and because only the task ID is in the cache queue at this time Therefore, the enterprise side will return the task ID to the application server, and the application server will generate or call the corresponding command according to the task ID.
  • the command obtained is the corresponding financial data synchronization command message.
  • the enterprise-side front-end machine can be used to read the financial data synchronization command message requiring synchronization in the intermediate data table. data.
  • the above-mentioned financial data synchronization method is characterized in that when the application database of the application server synchronizes financial data, the above-mentioned financial data synchronization method includes:
  • the front end of the enterprise 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 front end of the enterprise and the application server may lose the connection. Then, the two are detected by heartbeat detection. The connection status of the user. When the connection between the two fails, an alarm message needs to be issued. Sending out alarm information includes sending information such as emails to relevant personnel of the enterprise, and / or to relevant personnel of third parties that provide enterprise-side front-end processors.
  • the application server sends the financial data synchronization command to the front-end server of the enterprise end through a long connection.
  • the front end of the enterprise may receive continuous tasks, it uses a long connection to send the task to the front end of the enterprise. After each operation is not disconnected, it is sufficient to send a data packet directly next time. It is not necessary to establish a TCP (Transmission Control Protocol) connection to maintain the efficiency of processing tasks.
  • TCP Transmission Control Protocol
  • the above-mentioned step of sending the financial data synchronization command to the enterprise-end front end in a long connection manner includes:
  • the synchronous blocking mode makes a long connection with the enterprise-end front-end processor, and sends the financial data synchronization command.
  • the front end of the enterprise also needs to process tasks such as balance inquiry tasks or financial transfer tasks for different bank accounts, and each task cannot generally be performed at the same time, it needs to be performed in accordance with the order of instructions, and one instruction can be executed before the next instruction is executed. , Can not be executed asynchronously, so in this application, the BIO synchronous blocking mode is used to make a long connection with the enterprise-side front-end processor.
  • the method for synchronizing financial data in this embodiment establishes an enterprise-end front-end machine and an intermediate data table approved by the enterprise-side.
  • the data to be synchronized is first updated into the intermediate data table, and then the financial data requirements of the database or the enterprise-side database are applied.
  • an embodiment of the present application further provides a financial data synchronization device, which is used to synchronize financial data in an application database of an application server corresponding to a front end of an enterprise, and / or, synchronize financial data in an enterprise database of an enterprise.
  • the foregoing enterprise-side front-end machine refers to the front-end machine set on the enterprise side, and is an intermediate device when the financial system of the enterprise side and the bank-side are directly connected with each other.
  • the above application server refers to a third-party application server that provides an enterprise-side front-end processor to the enterprise. It serves as the management background of the enterprise-side front-end processor. The tasks issued by the enterprise will first enter the above application server and then be sent by the application server to the enterprise. Front-end machine.
  • the application database is a database that stores application server-side financial data.
  • the above-mentioned enterprise-side enterprise database is a database that stores enterprise-side financial data.
  • the device includes:
  • the above field generally represents one kind of data, for example, the corresponding field includes multiple, respectively, bank account information, user information, organizational structure, approval flow information, and the like.
  • the searching unit 20 is configured to search the preset intermediate data table for financial data corresponding to the field according to the financial data synchronization command.
  • the intermediate data table is an intermediate data table set by the enterprise side, and the enterprise side sends related permissions of the intermediate data table to the application server, that is, the application server can access the Read data from the intermediate data table, and send data to the intermediate data table.
  • the information of the intermediate data such as fields and tabulation rules, is fed back to the application server, so that the technical staff on the application server side can configure the application server accordingly.
  • the application server may also preset a configuration script and perform corresponding configuration according to the information fed back by the enterprise.
  • the above intermediate data table generally includes all data that the application server and the enterprise need to synchronize.
  • the synchronization unit 30 is configured to synchronize the found financial data to a designated database.
  • the designated database refers to the application server side of the application server; if the financial data synchronization command is initiated by the enterprise side, the designated database refers to the enterprise side Enterprise database.
  • the foregoing financial data synchronization device further includes:
  • the incremental update unit 101 is configured to update the incremental data into the intermediate data table.
  • the incremental data refers to data added to the original historical data.
  • the above incremental data is the incremental data in the database corresponding to the execution subject.
  • the execution subject is an enterprise side
  • the data generated by the enterprise side is stored in the enterprise database
  • the enterprise side obtains the incremental data in the enterprise database, and then sends the incremental data to the above-mentioned intermediate Data sheet.
  • the execution subject is an application server
  • the data obtained by the application server is stored in the corresponding application database
  • the application server obtains the incremental data in the application database, and then sends the incremental data to the above.
  • the intermediate data table There are two methods for updating the incremental data to the intermediate data table.
  • the first method is to set an update frequency, that is, to update the intermediate data table regularly. Taking the enterprise side as an example, the enterprise side is set to the middle every 30 minutes.
  • the data table uploads incremental data once to update the intermediate data table.
  • the second is to trigger immediately, or take the enterprise side as an example. As long as the enterprise side generates incremental data, it is immediately uploaded to the intermediate data table.
  • the foregoing financial data synchronization device further includes:
  • the extension unit is configured to send a field extension command to perform extension processing on the fields of the intermediate data table, where the extension command includes an extension field.
  • the above-mentioned field extension command includes adding a field in the intermediate data table, modifying a field in the intermediate data table, deleting a field in the intermediate data table, and the like.
  • the prior art method of interface API for data synchronization there is no need to update the synchronization data software version of the enterprise side and the application server, and the use is more flexible and convenient.
  • the extension of 5 fields in the table can meet the upgrade requirements, and no other major changes such as version upgrades are required.
  • the search unit 20 when the application database of the application server synchronizes the financial data, the search unit 20 includes:
  • a sending module 21 is configured to send a first task ID corresponding to the financial data synchronization command to the enterprise-end front-end processor, wherein the enterprise-end front-end processor stores the first task ID in a preset In the cache queue.
  • a plurality of UKey interfaces are set on the enterprise-side front-end machine, and the enterprise-side front-end machine is configured to correspond to a plurality of UKey interfaces to a plurality of bank-side front-end machines of different types of banks.
  • Complete financial data interaction is that when the enterprise-end front-end processor is installed by the enterprise, the enterprise-end front-end processor has an administrator interface, and the specified configuration information is entered in the preset interface, and the configuration information includes the enterprise ID and the enterprise-end front-end processor number.
  • Bank server IP, bank port, bank-enterprise direct connection number of the bank, version number of the bank front-end processor, bank type, thread size configuration, etc., and then send the configuration result to the application server corresponding to the front-end processor of the enterprise . That is, configure the bank-enterprise direct account number and related information passed by the application.
  • an enterprise needs to log in to each account to obtain data at its corresponding bank (transaction data, query data, etc.), it only needs to be inserted on the Caiku front-end machine.
  • the corresponding UKEY can be used to realize the connection of one enterprise-end front-end machine with multiple bank-end front-end machines of different types of banks.
  • the enterprise centrally manages the user's bank UKey in a unified manner, without the need for bank switching operations.
  • the bank front-end machine can obtain account information, transaction flow information, and balance information of each bank in real time, and can perform related operations such as payment, collection, and transfer.
  • the above major banks refer to different banks. For example, 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 first task ID described above is only an identifier, and the identifier uniquely corresponds to the financial data synchronization command.
  • the first task ID has no task content to prevent the financial data synchronization command from being directly placed in the front end of the enterprise, which affects the enterprise end.
  • the running space of the front machine reduces its running speed.
  • 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 attributes include transaction attributes and query attributes. Because the first 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. Rules, according to the specific request attached to the corresponding priority level, for example, the level of payment is higher than the level of data synchronization.
  • the receiving module 22 is configured to receive a first task ID fed back by the enterprise-end front-end processor, and obtain a corresponding financial data synchronization command according to the first task ID.
  • the enterprise-side front-end processor feedbacks the first task ID means that if the thread pool corresponding to the cache queue is free, the task command is obtained from the cache queue, and because only the task is in the cache queue at this time ID, so the front end of the enterprise will return the task ID to the application server, and the application server will generate or call the corresponding command according to the task ID.
  • the command obtained is the corresponding financial data synchronization command message.
  • the reading module 23 is configured to send a financial data synchronization command obtained according to the first task ID to the enterprise-end front-end processor, and use the enterprise-side front-end processor to synchronize the financial data command to the intermediate data. Read synchronous data from the table.
  • the intermediate data table is an intermediate file, which is open to the enterprise-side front-end processor
  • the enterprise-side front-end processor can be used to read the financial data synchronization command message in the intermediate data table. Synchronized data.
  • the above-mentioned financial data synchronization device when the application database of the application server synchronizes financial data, the above-mentioned financial data synchronization device includes:
  • the heartbeat detection unit is configured to receive a heartbeat detection packet sent by the enterprise-end front-end unit, and detect a connection state with the enterprise-side front-end unit; if the connection state is disconnected, an alarm message is issued.
  • the front end of the enterprise 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 front end of the enterprise and the application server may lose the connection. Then, the two are detected by heartbeat detection. The connection status of the user. When the connection between the two fails, an alarm message needs to be issued. Sending out alarm information includes sending information such as emails to relevant personnel of the enterprise, and / or to relevant personnel of third parties that provide enterprise-side front-end processors.
  • the application server sends the financial data synchronization command to the enterprise-end front-end processor through a long connection. Specifically, a long-term connection is made with the enterprise-end front-end processor through a block input output (BIO) synchronization blocking mode, and the financial data synchronization command is sent.
  • BIO block input output
  • the front end of the enterprise may receive continuous tasks, it uses a long connection to send the task to the front end of the enterprise. After each operation is not disconnected, it is sufficient to send a data packet directly next time. It is not necessary to establish a TCP (Transmission Control Protocol) connection to maintain the efficiency of processing tasks. Because the front end of the enterprise also needs to process tasks such as balance inquiry tasks or financial transfer tasks for different bank accounts, and each task cannot generally be performed at the same time, it needs to be performed in accordance with the order of instructions, and one instruction can be executed before the next instruction is executed. , Can not be executed asynchronously, so in this application, the BIO synchronous blocking mode is used to make a long connection with the enterprise-side front-end processor.
  • TCP Transmission Control Protocol
  • the financial data synchronization device of this embodiment establishes an intermediate data table that is fully recognized by the enterprise-end front end and the enterprise side, and first updates the data to be synchronized into the intermediate data table, and then applies the financial data requirements of the database or the enterprise-side database
  • 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 financial data synchronization method programs and the like.
  • the network interface of the computer device is used to communicate with an external terminal through a network connection.
  • the computer-readable instructions are executed by a processor to implement a method for synchronizing financial data.
  • the processor executes the financial data synchronization method, which is used to synchronize financial data in an application database of an application server corresponding to the front end of the enterprise, and / or, the enterprise database synchronizes financial data, including: obtaining financial data synchronization commands in corresponding fields. Finding the financial data corresponding to the field in a preset intermediate data table according to the financial data synchronization command; synchronizing the found financial data to a designated database.
  • the method before the step of obtaining the financial data synchronization command of the corresponding field, the method includes: updating the incremental data to the intermediate data table.
  • the method for synchronizing financial data further includes: sending a field extension command to perform extension processing on the fields of the intermediate data table, wherein the extension command includes an extension field.
  • the step of searching for financial data corresponding to the field in a preset intermediate data table according to the financial data synchronization command includes: Sending a first task ID corresponding to the financial data synchronization command to the enterprise-side front-end processor, wherein the enterprise-side front-end processor stores the first task ID in a preset cache queue; receiving The first task ID fed back by the enterprise-side front-end machine obtains a corresponding financial data synchronization command according to the first task ID; and sends the financial data synchronization command obtained according to the first task ID to the enterprise-side front-end Using the enterprise-end front-end processor to read the synchronization data into the intermediate data table according to the financial data synchronization command.
  • the method for synchronizing financial data when synchronizing financial data with an application database of the application server, includes: receiving a heartbeat detection packet sent by the enterprise-end front-end processor, and detecting the same as the enterprise-end front-end processor; Connection status; if the connection status is disconnected, an alarm message is issued.
  • the financial data synchronization command is sent to the enterprise-end front end in a long connection manner.
  • the above-mentioned step of sending the financial data synchronization command to the enterprise-end front end by means of a long connection includes: performing a long-term connection with the enterprise-end front end through a BIO synchronization blocking mode, and sending The financial data synchronization command.
  • FIG. 7 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer equipment to which the solution of the present application is applied.
  • the computer equipment in the embodiment of the present application establishes an enterprise-side front-end processor and an intermediate data table recognized by the enterprise-side.
  • the data to be synchronized is first updated into the intermediate data table, and then the financial data of the application database or enterprise-side database needs to be synchronized
  • the fields of the intermediate data table can be flexibly set, such as adding, deleting, and changing. For different business needs, you only need to configure the fields of the intermediate data table. That is, the fields between the caller and the callee will not be tied up, which improves the efficiency and flexibility of financial data synchronization.
  • An embodiment of the present application further provides a computer non-volatile readable storage medium, which stores computer readable instructions, and when the computer readable instructions are executed by a processor, a method for synchronizing financial data is used for the front end of an enterprise.
  • Synchronizing financial data in the application database of the application server corresponding to the installation, and / or synchronizing the financial data in the enterprise database of the enterprise includes: obtaining a financial data synchronization command of the corresponding field; and sending the financial data synchronization command to a preset intermediate data table Find financial data corresponding to the field; synchronize the found financial data to a designated database.
  • the above financial data synchronization method establishes an enterprise-side front-end machine and an intermediate data table recognized by the enterprise-side.
  • the data to be synchronized is first updated to the intermediate data table, and then when the financial data of the database or enterprise-side database needs to be synchronized
  • you only need to configure the fields of the intermediate data table. The caller and callee will not be tied to the field, improving the efficiency and flexibility of financial data synchronization.
  • the method before the step of obtaining the financial data synchronization command of the corresponding field by the processor, the method includes: updating the incremental data to the intermediate data table.
  • the method for synchronizing financial data performed by the processor further includes: sending a field extension command to perform extension processing on the fields of the intermediate data table, wherein the extension command includes an extension field.
  • the processor finds the financial data corresponding to the field in a preset intermediate data table according to the financial data synchronization command. Including: sending a first task ID corresponding to the financial data synchronization command to the enterprise-side front-end processor, wherein the enterprise-side front-end processor stores the first task ID in a preset cache queue Receiving a first task ID fed back by the enterprise-end front-end processor, and acquiring a corresponding financial data synchronization command according to the first task ID; and sending a financial data synchronization command obtained according to the first task ID to the enterprise end
  • the front-end machine uses the enterprise-side front-end machine to read synchronization data from the intermediate data table according to the financial data synchronization command.
  • the method for executing financial data synchronization by the processor includes: receiving a heartbeat detection packet sent by the enterprise-end front-end processor, Set the connection status; if the connection status is disconnected, an alarm message is issued.
  • the processor controls the application server to send the financial data synchronization command to the enterprise-end front-end processor through a long connection.
  • the step of the processor controlling the application server to send the financial data synchronization command to the enterprise-end front-end processor through a long connection method includes: performing the process with the enterprise-end front-end processor through a BIO synchronization blocking mode. Long connection, sending the financial data synchronization command.
  • 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)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

本申请揭示了财务数据同步方法、装置、计算机设备和存储介质,用于企业端前置机对应的应用服务器的应用数据库同步财务数据,和/或企业端的企业数据库同步财务数据。建立一个企业端前置机和企业端全部认可的中间数据表,应用数据库或企业端数据库直接到中间数据表中读取同步数据即可,提高财务数据同步的效率和灵活性。

Description

财务数据同步方法、装置、计算机设备和存储介质
本申请要求于2018年7月2日提交中国专利局、申请号为2018107086660,申请名称为“财务数据同步方法、装置、计算机设备和存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及到计算机领域,特别是涉及到一种财务数据同步方法、装置、计算机设备和存储介质。
背景技术
市面上,财务数据同步一般通过接口api的方式进行数据同步,这种方式不太灵活,如发生变动,需要重新发布新的版本,灵活性较差,维护成本较高。
技术问题
本申请的主要目的为提供一种灵活性高的财务数据同步方法、装置、计算机设备和存储介质。
技术解决方案
为了实现上述发明目的,本申请提出一种财务数据同步方法,用于企业端前置机对应的应用服务器的应用数据库同步财务数据,和/或,企业端的企业数据库同步财务数据,包括:
获取对应字段的财务数据同步命令;
根据所述财务数据同步命令到预设的中间数据表中查找与所述字段对应的财务数据;
将查找到的财务数据同步到指定的数据库。
本申请还提供一种财务数据同步装置,用于企业端前置机对应的应用服务器的应用数据库同步财务数据,和/或,企业端的企业数据库同步财务数据,包括:
获取单元,用于获取对应字段的财务数据同步命令;
查找单元,用于根据所述财务数据同步命令到预设的中间数据表中查找与所述字段对应的财务数据;
同步单元,用于将查找到的财务数据同步到指定的数据库。
本申请还提供一种计算机设备,包括存储器和处理器,所述存储器存储有计算机可读指令,所述处理器执行所述计算机可读指令时实现上述任一项所述方法的步骤。
本申请还提供一种计算机非易失性可读存储介质,其上存储有计算机可读指令,所述计算机可读指令被处理器执行时实现上述任一项所述的方法的步骤。
有益效果
本申请的财务数据同步方法、装置、计算机设备和存储介质,建立一个企业端前置机和企业端全部认可的中间数据表,先将需要同步的数据更新到中间数据表中,然后应用数据库或企业端数据库的财务数据需要同步的时候,直接到中间数据表中读取同步数据即可,而中间数据表的字段可以灵活设置,如增、删、改等,针对不同的业务需求,只需要对中间数据表的字段进行配置即可,调用方和被调用方之间不会被字段绑死,提高财务数据同步的效率和灵活性。
附图说明
图1 为本申请一实施例的财务数据同步方法的流程示意图;
图2 为本申请一实施例的财务数据同步方法的流程示意图;
图3 为本申请一实施例的财务数据同步方法中步骤S2的流程示意图;
图4为本申请一实施例的财务数据同步装置的流程示意图;
图5为本申请一实施例的财务数据同步装置的流程示意图;
图6为本申请一实施例的查找单元的流程示意图;
图7为本申请一实施例的计算机设备的流程示意图。
本申请目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。
本发明的最佳实施方式
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
参照图1,本申请实施例提供一种财务数据同步方法,用于企业端前置机对应的应用服务器的应用数据库同步财务数据,和/或,企业端的企业数据库同步财务数据。
上述企业端前置机是指设置在企业端的前置机,是企业端财务系统与银行端进行银企直联时的中间设备。上述应用服务器是指给企业提供企业端前置机的第三方的应用服务器,其作为企业端前置机的管理后台,企业发布的任务会先进入到上述应用服务器,然后由应用服务器发送给企业端前置机。上述应用数据库即为存储应用服务器端财务数据的数据库。上述企业端的企业数据库即为存储企业端财务数据的数据库。
上述方法包括步骤:
S1、获取对应字段的财务数据同步命令。
在上述步骤S1中,上述字段一般代表着一个种类数据,比如,对应字段包括多个,分别为银行账户信息,用户信息,组织架构,审批流信息等。上述执行主体可以为企业端,也可以是企业端前置机提供方的应用服务器,或者是企业端、应用服务器分别进行数据同步。
S2、根据所述财务数据同步命令到预设的中间数据表中查找与所述字段对应的财务数据。
在上述步骤S2中,上述的中间数据表是企业端设置的中间数据表,企业端会将该中间数据表的相关权限发送给上述的应用服务器,即应用服务器可以通过企业端前置机到中间数据表中读取数据,以及向中间数据表发送数据等。本申请中,企业端制成上述中间数据表之后,会将中间数据的信息,如字段、制表规则等反馈给应用服务器,以便于应用服务器一端的技术人员对应用服务器进行对应的配置。在另一实施例中,应用服务器也可以预设配置脚本,根据企业端反馈的信息进行相应的配置。上述中间数据表,一般包含了应用服务器与企业端需要同步的全部数据。
S3、将查找到的财务数据同步到指定的数据库。
在上述步骤S3中,当发起财务数据同步命令的是应用服务器,则指定的数据库是指应用服务器一端的应用数据库;如果发起财务数据同步命令的是企业端,则指定的数据库是指企业端的企业数据库。
参照图2,在一个实施例中,上述获取对应字段的财务数据同步命令的步骤S1之前,包括:
S101、将增量数据更新至所述中间数据表中。
在上述步骤S101中,上述增量数据是指在原有的历史数据上增加的数据。本实施例中,上述增量数据即为执行主体对应的数据库中的增量数据。在一个具体实施例中,上述执行主体为企业端时,企业端的生成的数据会存储到企业数据库中,企业端会获取到企业数据库中的增量数据,然后将增量数据发送到上述的中间数据表中。在另一个实施例中,上述执行主体为应用服务器时,应用服务器获取的数据会存储到对应的应用数据库中,应用服务器会获取到应用数据库中的增量数据,然后将增量数据发送到上述的中间数据表中。将增量数据更新至所述中间数据表中的方法包括两种,第一种是,设置一个更新频率,即定时更新中间数据表,以企业端为例,企业端设置每过30分钟向中间数据表上传一次增量数据以更新中间数据表。第二种是,即时触发,还是以企业端为例,只要企业端产生增量数据立刻上传给中间数据表。
在一个实施例中,上述财务数据同步方法还包括:
发送字段扩展命令,对所述中间数据表的字段进行扩展处理,其中,所述扩展命令中包含扩展字段。
在本步骤中,上述字段扩展命令包括增加中间数据表中的字段、修改中间数据表中的字段、删除中间数据表的字段等。相比于现有技术的接口api的方式进行数据同步,无需更新企业端和应用服务器的同步数据软件版本,使用更加灵活,方便。具体地,前一个中间数据表的字段只有5个字段,后来由于业务需求变更升级,5个字段不能满足当前的业务了,需要增加到10个,通过中间数据表的方式只要在前一个中间数据表中扩展5个字段就能满足升级需求,无需做版本升级等其他大的变更。
参照图3,在一个实施例中,当所述应用服务器的应用数据库同步所述财务数据时,所述根据所述财务数据同步命令到预设的中间数据表中查找与所述字段对应的财务数据的步骤S2,包括:
S21、向所述企业端前置机发送所述财务数据同步命令对应的第一任务ID,其中,所述企业端前置机将所述第一任务ID存入到预设的缓存队列中。
在上述步骤S21中,上述企业端前置机上设置有多个UKey接口,所述企业端前置机对应多个所述UKey接口被配置为可以与多个不同银行种类的银行端前置机完成财务数据交互。其过程为,当企业安装企业端前置机时,企业端前置机有一个管理员界面,在预设的界面内输入指定的配置信息,该配置信息包括企业ID、企业端前置机编号、银行服务器IP、银行端口、银行的银企直联编号、银行端前置机的版本号,银行大类,线程数大小配置等,然后将配置结果发送给企业端前置机对应的应用服务器。也就是,配置申请通过的银企直联的账号及其相关信息,当企业需要登录各账户获取在其对应银行的数据时(交易数据、查询数据等),只需要在财酷前置机上插入对应的UKEY即可,实现一个企业端前置机与多个不同类银行的银行端前置机连接,企业统一集中管理用户的银行UKey,无需做银行的切换操作。通过银行端前置机可以实时获取每个银行的账户信息、交易流水信息、余额信息,并且可以进行相关的支付、归集、调拨等相关操作。上述银行大类是指不同的银行,比如工商银行与建设银行属于两个不同的银行大类等,即使用不同前置机的银行被认为是不同的银行大类。上述的第一任务ID只是一个标识,该标识唯一对应所述财务数据同步命令,第一任务ID并没有任务内容,以防止将财务数据同步命令直接放到企业端前置机中,影响企业端前置机的运行空间,而降低其运行速度。因为本申请的企业端前置机可以连接多个银行端前置机,所以各种不同的任务会较多,直接将各种任务的报文堆积到前置机的缓存中,会大大地降低企业端前置机的运行效率,甚至崩溃。本申请中,只放入第一任务ID,则大大地降低了企业端前置机的缓存空间的要求,提高运行环境质量。本实施例中,预设的缓存队列一般包括交易缓存队列和查询缓存队列,不同的缓存队列存放对应属性的任务ID,对应的设置交易线程池和查询线程池。企业端前置机在获取到第一任务ID时,先判断所述第一任务ID的属性,其中属性包括交易属性、查询属性,因为第一任务ID属于查询类,则放入到查询缓存队列中。两个缓存队列中的任务按优先级进行排序,每个任务会设置有一个类型标识,类型标识分为1-8个级别,为1的话等级最高,代表紧急任务,优先处理,可以根据预设规则,根据具体请求附加对应的优先级别,比如,支付的级别高于数据同步的级别等。
S22、接收所述企业端前置机反馈的第一任务ID,根据所述第一任务ID获取对应的财务数据同步命令。
在上述步骤S22中,上述企业端前置机反馈第一任务ID是指,对应上述缓存队列的线程池中有空闲,则到缓存队列中获取任务命令,又因为此时缓存队列中只是任务ID,所以企业端前置机会将任务ID返回给上述应用服务器,应用服务器会根据任务ID生成或调取对应的命令。本申请中,当任务ID为第一任务ID时,得到的命令即为对应的财务数据同步命令报文。
S23、发送根据所述第一任务ID获取的财务数据同步命令给所述企业端前置机,利用所述企业端前置机根据所述财务数据同步命令到所述中间数据表中读取同步数据。
在上述步骤S23中,因为中间数据表是一个中间文件,其开放于企业端前置机,所以可以利用企业端前置机到中间数据表中读取述财务数据同步命令报文中要求同步的数据。
在一个实施例中,上述财务数据同步方法,其特征在于,当所述应用服务器的应用数据库同步财务数据时,上述财务数据同步方法包括:
接收所述企业端前置机发送的心跳检测包,检测与所述企业端前置机的连接状态;
若连接状态为断开,则发出警报信息。
企业端前置机和应用服务器应该长期在线,但是因为是电子产品,难免会出现故障或者升级等处理,此时企业端前置机与应用服务器可能断掉连接,那么通过心跳检测的方式检测两者的连接状态,当两者连接失败,则需要发出警报信息。发出警报信息包括,发送邮件等信息给企业的相关人员,和/或发送给提供企业端前置机的第三方的相关人员等。
在一个实施例中,上述财务数据同步方法中,上述应用服务器通过长连接的方式向所述企业端前置机发送所述财务数据同步命令。
因为企业端前置机接收到任务可能是连续的,所以使用长连接的方式发送任务给企业端前置机,每个操作完后都不断开,下次处理时直接发送数据包就可以了,不用建立TCP(Transmission Control Protocol 传输控制协议)连接,以保持处理任务的效率。
在一个实施例中,上述通过长连接的方式向所述企业端前置机发送所述财务数据同步命令的步骤,包括:
通过BIO(block input output)同步阻塞模式与所述企业端前置机进行长连接,发送所述财务数据同步命令。
因为企业端前置机还需要针对不同银行账户的余额查询任务或财务调拨任务等任务进行处理,而各任务一般不能够同时进行,所以需要按照指令顺序进行,一个指令执行完才能执行下一个指令,不能异步执行,所以本申请中采用BIO同步阻塞模式与企业端前置机进行长连接。
本实施例的财务数据同步方法,建立一个企业端前置机和企业端全部认可的中间数据表,先将需要同步的数据更新到中间数据表中,然后应用数据库或企业端数据库的财务数据需要同步的时候,直接到中间数据表中读取同步数据即可,而中间数据表的字段可以灵活设置,如增、删、改等,针对不同的业务需求,只需要对中间数据表的字段进行配置即可,调用方和被调用方之间不会被字段绑死,提高财务数据同步的效率和灵活性。
参照图4,本申请实施例还提供一种财务数据同步装置,用于企业端前置机对应的应用服务器的应用数据库同步财务数据,和/或,企业端的企业数据库同步财务数据。
上述企业端前置机是指设置在企业端的前置机,是企业端财务系统与银行端进行银企直联时的中间设备。上述应用服务器是指给企业提供企业端前置机的第三方的应用服务器,其作为企业端前置机的管理后台,企业发布的任务会先进入到上述应用服务器,然后由应用服务器发送给企业端前置机。上述应用数据库即为存储应用服务器端财务数据的数据库。上述企业端的企业数据库即为存储企业端财务数据的数据库。
所述装置包括:
获取单元10,用于获取对应字段的财务数据同步命令
在上述获取单元10中,上述字段一般代表着一个种类数据,比如,对应字段包括多个,分别为银行账户信息,用户信息,组织架构,审批流信息等。
查找单元20,用于根据所述财务数据同步命令到预设的中间数据表中查找与所述字段对应的财务数据。
在上述查找单元20中,上述的中间数据表是企业端设置的中间数据表,企业端会将该中间数据表的相关权限发送给上述的应用服务器,即应用服务器可以通过企业端前置机到中间数据表中读取数据,以及向中间数据表发送数据等。本申请中,企业端制成上述中间数据表之后,会将中间数据的信息,如字段、制表规则等反馈给应用服务器,以便于应用服务器一端的技术人员对应用服务器进行对应的配置。在另一实施例中,应用服务器也可以预设配置脚本,根据企业端反馈的信息进行相应的配置。上述中间数据表,一般包含了应用服务器与企业端需要同步的全部数据。
同步单元30,用于将查找到的财务数据同步到指定的数据库。
在上述同步单元30中,当发起财务数据同步命令的是应用服务器,则指定的数据库是指应用服务器一端的应用数据库;如果发起财务数据同步命令的是企业端,则指定的数据库是指企业端的企业数据库。
参照图5,在一个实施例中,上述财务数据同步装置,还包括:
增量更新单元101,用于将增量数据更新至所述中间数据表中。
在上述增量更新单元101中,上述增量数据是指在原有的历史数据上增加的数据。本实施例中,上述增量数据即为执行主体对应的数据库中的增量数据。在一个具体实施例中,上述执行主体为企业端时,企业端的生成的数据会存储到企业数据库中,企业端会获取到企业数据库中的增量数据,然后将增量数据发送到上述的中间数据表中。在另一个实施例中,上述执行主体为应用服务器时,应用服务器获取的数据会存储到对应的应用数据库中,应用服务器会获取到应用数据库中的增量数据,然后将增量数据发送到上述的中间数据表中。将增量数据更新至所述中间数据表中的方法包括两种,第一种是,设置一个更新频率,即定时更新中间数据表,以企业端为例,企业端设置每过30分钟向中间数据表上传一次增量数据以更新中间数据表。第二种是,即时触发,还是以企业端为例,只要企业端产生增量数据立刻上传给中间数据表。
在一个实施例中,上述财务数据同步装置还包括:
扩展单元,用于发送字段扩展命令,对所述中间数据表的字段进行扩展处理,其中,所述扩展命令中包含扩展字段。
在上述扩展单元中,上述字段扩展命令包括增加中间数据表中的字段、修改中间数据表中的字段、删除中间数据表的字段等。相比于现有技术的接口api的方式进行数据同步,无需更新企业端和应用服务器的同步数据软件版本,使用更加灵活,方便。具体地,前一个中间数据表的字段只有5个字段,后来由于业务需求变更升级,5个字段不能满足当前的业务了,需要增加到10个,通过中间数据表的方式只要在前一个中间数据表中扩展5个字段就能满足升级需求,无需做版本升级等其他大的变更。
参照图6,在一个实施例中,当所述应用服务器的应用数据库同步所述财务数据时,上述查找单元20,包括:
发送模块21,用于向所述企业端前置机发送所述财务数据同步命令对应的第一任务ID,其中,所述企业端前置机将所述第一任务ID存入到预设的缓存队列中。
在上述发送模块21中,上述企业端前置机上设置有多个UKey接口,所述企业端前置机对应多个所述UKey接口被配置为可以与多个不同银行种类的银行端前置机完成财务数据交互。其过程为,当企业安装企业端前置机时,企业端前置机有一个管理员界面,在预设的界面内输入指定的配置信息,该配置信息包括企业ID、企业端前置机编号、银行服务器IP、银行端口、银行的银企直联编号、银行端前置机的版本号,银行大类,线程数大小配置等,然后将配置结果发送给企业端前置机对应的应用服务器。也就是,配置申请通过的银企直联的账号及其相关信息,当企业需要登录各账户获取在其对应银行的数据时(交易数据、查询数据等),只需要在财酷前置机上插入对应的UKEY即可,实现一个企业端前置机与多个不同类银行的银行端前置机连接,企业统一集中管理用户的银行UKey,无需做银行的切换操作。通过银行端前置机可以实时获取每个银行的账户信息、交易流水信息、余额信息,并且可以进行相关的支付、归集、调拨等相关操作。上述银行大类是指不同的银行,比如工商银行与建设银行属于两个不同的银行大类等,即使用不同前置机的银行被认为是不同的银行大类。上述的第一任务ID只是一个标识,该标识唯一对应所述财务数据同步命令,第一任务ID并没有任务内容,以防止将财务数据同步命令直接放到企业端前置机中,影响企业端前置机的运行空间,而降低其运行速度。因为本申请的企业端前置机可以连接多个银行端前置机,所以各种不同的任务会较多,直接将各种任务的报文堆积到前置机的缓存中,会大大地降低企业端前置机的运行效率,甚至崩溃。本申请中,只放入第一任务ID,则大大地降低了企业端前置机的缓存空间的要求,提高运行环境质量。本实施例中,预设的缓存队列一般包括交易缓存队列和查询缓存队列,不同的缓存队列存放对应属性的任务ID,对应的设置交易线程池和查询线程池。企业端前置机在获取到第一任务ID时,先判断所述第一任务ID的属性,其中属性包括交易属性、查询属性,因为第一任务ID属于查询类,则放入到查询缓存队列中。两个缓存队列中的任务按优先级进行排序,每个任务会设置有一个类型标识,类型标识分为1-8个级别,为1的话等级最高,代表紧急任务,优先处理,可以根据预设规则,根据具体请求附加对应的优先级别,比如,支付的级别高于数据同步的级别等。
接收模块22,用于接收所述企业端前置机反馈的第一任务ID,根据所述第一任务ID获取对应的财务数据同步命令。
在上述接收模块22中,上述企业端前置机反馈第一任务ID是指,对应上述缓存队列的线程池中有空闲,则到缓存队列中获取任务命令,又因为此时缓存队列中只是任务ID,所以企业端前置机会将任务ID返回给上述应用服务器,应用服务器会根据任务ID生成或调取对应的命令。本申请中,当任务ID为第一任务ID时,得到的命令即为对应的财务数据同步命令报文。
读取模块23,用于发送根据所述第一任务ID获取的财务数据同步命令给所述企业端前置机,利用所述企业端前置机根据所述财务数据同步命令到所述中间数据表中读取同步数据。
在上述读取模块23中,因为中间数据表是一个中间文件,其开放于企业端前置机,所以可以利用企业端前置机到中间数据表中读取述财务数据同步命令报文中要求同步的数据。
在一个实施例中,,当所述应用服务器的应用数据库同步财务数据时,上述财务数据同步装置包括:
心跳检测单元,用于接收所述企业端前置机发送的心跳检测包,检测与所述企业端前置机的连接状态;若连接状态为断开,则发出警报信息。
企业端前置机和应用服务器应该长期在线,但是因为是电子产品,难免会出现故障或者升级等处理,此时企业端前置机与应用服务器可能断掉连接,那么通过心跳检测的方式检测两者的连接状态,当两者连接失败,则需要发出警报信息。发出警报信息包括,发送邮件等信息给企业的相关人员,和/或发送给提供企业端前置机的第三方的相关人员等。
在一个实施例中,上述应用服务器通过长连接的方式向所述企业端前置机发送所述财务数据同步命令。具体地,通过BIO(block input output)同步阻塞模式与所述企业端前置机进行长连接,发送所述财务数据同步命令。
因为企业端前置机接收到任务可能是连续的,所以使用长连接的方式发送任务给企业端前置机,每个操作完后都不断开,下次处理时直接发送数据包就可以了,不用建立TCP(Transmission Control Protocol 传输控制协议)连接,以保持处理任务的效率。因为企业端前置机还需要针对不同银行账户的余额查询任务或财务调拨任务等任务进行处理,而各任务一般不能够同时进行,所以需要按照指令顺序进行,一个指令执行完才能执行下一个指令,不能异步执行,所以本申请中采用BIO同步阻塞模式与企业端前置机进行长连接。
本实施例的财务数据同步装置,建立一个企业端前置机和企业端全部认可的中间数据表,先将需要同步的数据更新到中间数据表中,然后应用数据库或企业端数据库的财务数据需要同步的时候,直接到中间数据表中读取同步数据即可,而中间数据表的字段可以灵活设置,如增、删、改等,针对不同的业务需求,只需要对中间数据表的字段进行配置即可,调用方和被调用方之间不会被字段绑死,提高财务数据同步的效率和灵活性。
参照图7,本申请实施例中还提供一种计算机设备,该计算机设备可以是服务器,其内部结构可以如图7所示。该计算机设备包括通过系统总线连接的处理器、存储器、网络接口和数据库。其中,该计算机设计的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作系统、计算机可读指令和数据库。该内存器为非易失性存储介质中的操作系统和计算机可读指令的运行提供环境。该计算机设备的数据库用于存储财务数据同步方法程序等。该计算机设备的网络接口用于与外部的终端通过网络连接通信。该计算机可读指令被处理器执行时以实现一种财务数据同步方法。
上述处理器执行上述财务数据同步方法,用于企业端前置机对应的应用服务器的应用数据库同步财务数据,和/或,企业端的企业数据库同步财务数据,包括:获取对应字段的财务数据同步命令;根据所述财务数据同步命令到预设的中间数据表中查找与所述字段对应的财务数据;将查找到的财务数据同步到指定的数据库。
在一个实施例中,上述获取对应字段的财务数据同步命令的步骤之前,包括:将增量数据更新至所述中间数据表中。
在一个实施例中,上述财务数据同步方法还包括:发送字段扩展命令,对所述中间数据表的字段进行扩展处理,其中,所述扩展命令中包含扩展字段。
在一个实施例中,当所述应用服务器的应用数据库同步所述财务数据时,上述根据所述财务数据同步命令到预设的中间数据表中查找与所述字段对应的财务数据的步骤,包括:向所述企业端前置机发送所述财务数据同步命令对应的第一任务ID,其中,所述企业端前置机将所述第一任务ID存入到预设的缓存队列中;接收所述企业端前置机反馈的第一任务ID,根据所述第一任务ID获取对应的财务数据同步命令;发送根据所述第一任务ID获取的财务数据同步命令给所述企业端前置机,利用所述企业端前置机根据所述财务数据同步命令到所述中间数据表中读取同步数据。
在一个实施例中,当所述应用服务器的应用数据库同步财务数据时,所述财务数据同步方法包括:接收所述企业端前置机发送的心跳检测包,检测与所述企业端前置机的连接状态;若连接状态为断开,则发出警报信息。
在一个实施例中,通过长连接的方式向所述企业端前置机发送所述财务数据同步命令。
在一个实施例中,上述通过长连接的方式向所述企业端前置机发送所述财务数据同步命令的步骤,包括:通过BIO同步阻塞模式与所述企业端前置机进行长连接,发送所述财务数据同步命令。
本领域技术人员可以理解,图7中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定。
本申请实施例的计算机设备,建立一个企业端前置机和企业端全部认可的中间数据表,先将需要同步的数据更新到中间数据表中,然后应用数据库或企业端数据库的财务数据需要同步的时候,直接到中间数据表中读取同步数据即可,而中间数据表的字段可以灵活设置,如增、删、改等,针对不同的业务需求,只需要对中间数据表的字段进行配置即可,调用方和被调用方之间不会被字段绑死,提高财务数据同步的效率和灵活性。
本申请一实施例还提供一种计算机非易失性可读存储介质,其上存储有计算机可读指令,计算机可读指令被处理器执行时实现一种财务数据同步方法,用于企业端前置机对应的应用服务器的应用数据库同步财务数据,和/或,企业端的企业数据库同步财务数据,包括:获取对应字段的财务数据同步命令;根据所述财务数据同步命令到预设的中间数据表中查找与所述字段对应的财务数据;将查找到的财务数据同步到指定的数据库。
上述财务数据同步方法,建立一个企业端前置机和企业端全部认可的中间数据表,先将需要同步的数据更新到中间数据表中,然后应用数据库或企业端数据库的财务数据需要同步的时候,直接到中间数据表中读取同步数据即可,而中间数据表的字段可以灵活设置,如增、删、改等,针对不同的业务需求,只需要对中间数据表的字段进行配置即可,调用方和被调用方之间不会被字段绑死,提高财务数据同步的效率和灵活性。
在一个实施例中,上述处理器获取对应字段的财务数据同步命令的步骤之前,包括:将增量数据更新至所述中间数据表中。
在一个实施例中,上述处理器执行的财务数据同步方法还包括:发送字段扩展命令,对所述中间数据表的字段进行扩展处理,其中,所述扩展命令中包含扩展字段。
在一个实施例中,当所述应用服务器的应用数据库同步所述财务数据时,上述处理器根据所述财务数据同步命令到预设的中间数据表中查找与所述字段对应的财务数据的步骤,包括:向所述企业端前置机发送所述财务数据同步命令对应的第一任务ID,其中,所述企业端前置机将所述第一任务ID存入到预设的缓存队列中;接收所述企业端前置机反馈的第一任务ID,根据所述第一任务ID获取对应的财务数据同步命令;发送根据所述第一任务ID获取的财务数据同步命令给所述企业端前置机,利用所述企业端前置机根据所述财务数据同步命令到所述中间数据表中读取同步数据。
在一个实施例中,上述当所述应用服务器的应用数据库同步财务数据时,处理器执行财务数据同步方法包括:接收所述企业端前置机发送的心跳检测包,检测与所述企业端前置机的连接状态;若连接状态为断开,则发出警报信息。
在一个实施例中,上述处理器控制应用服务器通过长连接的方式向所述企业端前置机发送所述财务数据同步命令。
在一个实施例中,上述处理器控制应用服务器通过长连接的方式向所述企业端前置机发送所述财务数据同步命令的步骤包括:通过BIO同步阻塞模式与所述企业端前置机进行长连接,发送所述财务数据同步命令。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机可读指令来指令相关的硬件来完成,所述的计算机可读指令可存储于一非易失性计算机可读取存储介质中,该计算机可读指令在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的和实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和/或易失性存储器。非易失性存储器可以包括只读存储器(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)

  1. 一种财务数据同步方法,用于企业端前置机对应的应用服务器的应用数据库同步财务数据,和/或,企业端的企业数据库同步财务数据,其特征在于,包括:
    获取对应字段的财务数据同步命令;
    根据所述财务数据同步命令到预设的中间数据表中查找与所述字段对应的财务数据;
    将查找到的财务数据同步到指定的数据库。
  2. 根据权利要求1所述的财务数据同步方法,其特征在于,所述获取对应字段的财务数据同步命令的步骤之前,包括:
    将增量数据更新至所述中间数据表中。
  3. 根据权利要求1所述的财务数据同步方法,其特征在于,所述方法还包括:
    发送字段扩展命令,对所述中间数据表的字段进行扩展处理,其中,所述扩展命令中包含扩展字段。
  4. 根据权利要求1所述的财务数据同步方法,其特征在于,当所述应用服务器的应用数据库同步所述财务数据时,所述根据所述财务数据同步命令到预设的中间数据表中查找与所述字段对应的财务数据的步骤,包括:
    向所述企业端前置机发送所述财务数据同步命令对应的第一任务ID,其中,所述企业端前置机将所述第一任务ID存入到预设的缓存队列中;
    接收所述企业端前置机反馈的第一任务ID,根据所述第一任务ID获取对应的财务数据同步命令;
    发送根据所述第一任务ID获取的财务数据同步命令给所述企业端前置机,利用所述企业端前置机根据所述财务数据同步命令到所述中间数据表中读取同步数据。
  5. 根据权利要求1所述的财务数据同步方法,其特征在于,当所述应用服务器的应用数据库同步财务数据时,所述方法包括:
    接收所述企业端前置机发送的心跳检测包,检测与所述企业端前置机的连接状态;
    若连接状态为断开,则发出警报信息。
  6. 根据权利要求5所述的财务数据同步方法,其特征在于,通过长连接的方式向所述企业端前置机发送所述财务数据同步命令。
  7. 根据权利要求6所述的财务数据同步方法,其特征在于,所述通过长连接的方式向所述企业端前置机发送所述财务数据同步命令的步骤,包括:
    通过BIO同步阻塞模式与所述企业端前置机进行长连接,发送所述财务数据同步命令。
  8. 一种财务数据同步装置,用于企业端前置机对应的应用服务器的应用数据库同步财务数据,和/或,企业端的企业数据库同步财务数据,其特征在于,包括:
    获取单元,用于获取对应字段的财务数据同步命令;
    查找单元,用于根据所述财务数据同步命令到预设的中间数据表中查找与所述字段对应的财务数据;
    同步单元,用于将查找到的财务数据同步到指定的数据库。
  9. 根据权利要求8所述的财务数据同步装置,其特征在于,还包括:
    增量更新单元,用于将增量数据更新至所述中间数据表中。
  10. 根据权利要求8所述的财务数据同步装置,其特征在于,还包括:
    扩展单元,用于发送字段扩展命令,对所述中间数据表的字段进行扩展处理,其中,所述扩展命令中包含扩展字段。
  11. 根据权利要求8所述的财务数据同步装置,其特征在于,当所述应用服务器的应用数据库同步所述财务数据时,所述查找单元,包括:
    发送模块,用于向所述企业端前置机发送所述财务数据同步命令对应的第一任务ID,其中,所述企业端前置机将所述第一任务ID存入到预设的缓存队列中;
    接收模块,用于接收所述企业端前置机反馈的第一任务ID,根据所述第一任务ID获取对应的财务数据同步命令;
    读取模块,用于发送根据所述第一任务ID获取的财务数据同步命令给所述企业端前置机,利用所述企业端前置机根据所述财务数据同步命令到所述中间数据表中读取同步数据。
  12. 根据权利要求8所述的财务数据同步装置,其特征在于,当所述应用服务器的应用数据库同步财务数据时,所述装置还包括:
    心跳检测单元,用于接收所述企业端前置机发送的心跳检测包,检测与所述企业端前置机的连接状态;若连接状态为断开,则发出警报信息。
  13. 根据权利要求12所述的财务数据同步装置,其特征在于,所述应用服务器通过长连接的方式向所述企业端前置机发送所述财务数据同步命令。
  14. 根据权利要求13所述的财务数据同步装置,其特征在于,所述应用服务器通过BIO同步阻塞模式与所述企业端前置机进行长连接,发送所述财务数据同步命令。
  15. 一种计算机设备,包括存储器和处理器,所述存储器存储有计算机可读指令,其特征在于,所述处理器执行所述计算机可读指令时实现财务数据同步方法,用于企业端前置机对应的应用服务器的应用数据库同步财务数据,和/或,企业端的企业数据库同步财务数据,所述方法包括:
    获取对应字段的财务数据同步命令;
    根据所述财务数据同步命令到预设的中间数据表中查找与所述字段对应的财务数据;
    将查找到的财务数据同步到指定的数据库。
  16. 根据权利要求15所述的计算机设备,其特征在于,所述获取对应字段的财务数据同步命令的步骤之前,包括:
    将增量数据更新至所述中间数据表中。
  17. 根据权利要求15所述的计算机设备,其特征在于,所述方法还包括:
    发送字段扩展命令,对所述中间数据表的字段进行扩展处理,其中,所述扩展命令中包含扩展字段。
  18. 根据权利要求15所述的计算机设备,其特征在于,当所述应用服务器的应用数据库同步所述财务数据时,所述根据所述财务数据同步命令到预设的中间数据表中查找与所述字段对应的财务数据的步骤,包括:
    向所述企业端前置机发送所述财务数据同步命令对应的第一任务ID,其中,所述企业端前置机将所述第一任务ID存入到预设的缓存队列中;
    接收所述企业端前置机反馈的第一任务ID,根据所述第一任务ID获取对应的财务数据同步命令;
    发送根据所述第一任务ID获取的财务数据同步命令给所述企业端前置机,利用所述企业端前置机根据所述财务数据同步命令到所述中间数据表中读取同步数据。
  19. 一种计算机非易失性可读存储介质,其上存储有计算机可读指令,其特征在于,所述计算机可读指令被处理器执行时实现财务数据同步方法,用于企业端前置机对应的应用服务器的应用数据库同步财务数据,和/或,企业端的企业数据库同步财务数据,所述方法包括:
    获取对应字段的财务数据同步命令;
    根据所述财务数据同步命令到预设的中间数据表中查找与所述字段对应的财务数据;
    将查找到的财务数据同步到指定的数据库。
  20. 根据权利要求19所述的计算机非易失性可读存储介质,其特征在于,所述获取对应字段的财务数据同步命令的步骤之前,包括:
    将增量数据更新至所述中间数据表中。
PCT/CN2018/107680 2018-07-02 2018-09-26 财务数据同步方法、装置、计算机设备和存储介质 Ceased WO2020006894A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810708666.0A CN109086320A (zh) 2018-07-02 2018-07-02 财务数据同步方法、装置、计算机设备和存储介质
CN201810708666.0 2018-07-02

Publications (1)

Publication Number Publication Date
WO2020006894A1 true WO2020006894A1 (zh) 2020-01-09

Family

ID=64836868

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/107680 Ceased WO2020006894A1 (zh) 2018-07-02 2018-09-26 财务数据同步方法、装置、计算机设备和存储介质

Country Status (2)

Country Link
CN (1) CN109086320A (zh)
WO (1) WO2020006894A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116628087A (zh) * 2023-05-19 2023-08-22 中国工商银行股份有限公司 云端同步客户端数据的方法、装置和计算机设备
CN117493466B (zh) * 2023-12-27 2024-04-26 国网浙江省电力有限公司宁波供电公司 财务数据同步方法及系统

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080109497A1 (en) * 2001-08-15 2008-05-08 Gravic, Inc. Synchronization of plural databases in a database replication system when replication is slower than the synchronization process
CN105787077A (zh) * 2016-03-02 2016-07-20 百度在线网络技术(北京)有限公司 数据同步方法和装置
CN106021494A (zh) * 2016-05-19 2016-10-12 中国银联股份有限公司 一种主数据同步方法及装置

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7315978B2 (en) * 2003-07-30 2008-01-01 Ameriprise Financial, Inc. System and method for remote collection of data
CN101527630B (zh) * 2008-12-31 2011-02-16 北京飞天诚信科技有限公司 远程制证的方法、服务器及系统
CN102521778A (zh) * 2011-12-08 2012-06-27 携程计算机技术(上海)有限公司 企业与银行直接进行财务数据交互的系统
CN103413241A (zh) * 2013-07-12 2013-11-27 广州银联网络支付有限公司 一种银行代收付系统
CN105760485A (zh) * 2016-02-17 2016-07-13 上海携程商务有限公司 财务数据抽取方法及系统

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080109497A1 (en) * 2001-08-15 2008-05-08 Gravic, Inc. Synchronization of plural databases in a database replication system when replication is slower than the synchronization process
CN105787077A (zh) * 2016-03-02 2016-07-20 百度在线网络技术(北京)有限公司 数据同步方法和装置
CN106021494A (zh) * 2016-05-19 2016-10-12 中国银联股份有限公司 一种主数据同步方法及装置

Also Published As

Publication number Publication date
CN109086320A (zh) 2018-12-25

Similar Documents

Publication Publication Date Title
US10425375B2 (en) Message sending method, apparatus, and system, and server
US9524382B2 (en) System and method for centralizedly controlling server user rights
WO2020237797A1 (zh) 一种微服务框架下动态配置管理方法及系统
US10243919B1 (en) Rule-based automation of DNS service discovery
WO2019061720A1 (zh) 一种数据同步的方法和系统
US20220286373A1 (en) Scalable real time metrics management
CN110032886A (zh) 资源权限管理的方法及设备
CN110324184B (zh) 服务扩容与迁移方法、装置、系统、设备及可读存储介质
WO2021031905A1 (zh) 数据管理方法、装置、设备、系统及计算机可读存储介质
CN102724295A (zh) 数据同步方法及系统
US11228486B2 (en) Methods for managing storage virtual machine configuration changes in a distributed storage system and devices thereof
WO2020006902A1 (zh) 批量支付方法、装置、计算机设备和存储介质
WO2020258666A1 (zh) 一种分布式系统及数据处理方法
CN110019104A (zh) 文件资源交换方法、文件资源服务器及文件交换系统
US20230111782A1 (en) Request processing method based on consortium blockchain, device, and storage medium
US20120054775A1 (en) Message processing
WO2023231681A1 (zh) 账号创建方法、物联网多租户系统、设备、程序和介质
CN110324384B (zh) 数据推送的方法和装置
WO2020006894A1 (zh) 财务数据同步方法、装置、计算机设备和存储介质
CN110401698A (zh) 一种基于任务异步分发的监控数据采集方法、装置和系统
CN112163026A (zh) 一种用于整合多类技术应用数据的多源异构接口管控方法
CN107480309A (zh) 数据库访问策略更新方法、装置、服务器及计算设备
CN108521342A (zh) 一种集群的管理方法及装置
CN119449487A (zh) 前后端分离的数据处理方法及装置
US12580966B2 (en) Cloud workload import into SD-WAN policy

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: 18925180

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: 18925180

Country of ref document: EP

Kind code of ref document: A1