CN114331704A - Income posting method, device and equipment and computer readable storage medium - Google Patents
Income posting method, device and equipment and computer readable storage medium Download PDFInfo
- Publication number
- CN114331704A CN114331704A CN202011077412.7A CN202011077412A CN114331704A CN 114331704 A CN114331704 A CN 114331704A CN 202011077412 A CN202011077412 A CN 202011077412A CN 114331704 A CN114331704 A CN 114331704A
- Authority
- CN
- China
- Prior art keywords
- account
- entry
- income information
- income
- group
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 98
- 230000008859 change Effects 0.000 claims description 32
- 230000004044 response Effects 0.000 claims description 13
- 238000012546 transfer Methods 0.000 claims description 4
- 230000008569 process Effects 0.000 description 38
- 238000005516 engineering process Methods 0.000 description 20
- 238000012545 processing Methods 0.000 description 9
- 238000004891 communication Methods 0.000 description 5
- 238000004590 computer program Methods 0.000 description 4
- 238000010586 diagram Methods 0.000 description 4
- 230000008901 benefit Effects 0.000 description 3
- 238000011161 development Methods 0.000 description 3
- 230000006870 function Effects 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 238000012986 modification Methods 0.000 description 3
- 238000011084 recovery Methods 0.000 description 3
- 238000013500 data storage Methods 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 238000005259 measurement Methods 0.000 description 2
- 230000010076 replication Effects 0.000 description 2
- 238000013515 script Methods 0.000 description 2
- 238000013473 artificial intelligence Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 238000007726 management method Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 238000011160 research Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Images
Landscapes
- Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)
Abstract
Description
技术领域technical field
本申请涉及计算机技术领域,尤其涉及一种收益入账方法、装置、设备及计算机可读存储介质。The present application relates to the field of computer technologies, and in particular, to a method, apparatus, device, and computer-readable storage medium for revenue entry.
背景技术Background technique
货币基金是每日收益结转成份额,随着互联网金融的发展,出现了各种各样的互联网金融平台,越来越多的用户也选择在互联网金融平台持有基金等金融产品。对于互联网金融平台,面对大量的用户,需要提升其数据的安全性,因此,往往采用分布式的存储方式存储用户的收益信息,以提高容灾能力。Monetary funds are daily earnings carried forward into shares. With the development of Internet finance, various Internet financial platforms have emerged, and more and more users are also choosing to hold financial products such as funds on Internet financial platforms. For Internet financial platforms, in the face of a large number of users, it is necessary to improve the security of their data. Therefore, distributed storage methods are often used to store users' income information to improve disaster tolerance.
互联网金融平台还需要按照一定的收益周期完成收益入账操作,并及时将上一个收益周期内的收益信息反馈至用户。但是,收益入账操作需要多次访问并修改数据库中的用户收益数据,而提高容灾能力的过程中,会严重影响收益入账的效率,收益入账耗时过长,用户体验较差。The Internet financial platform also needs to complete the revenue entry operation according to a certain revenue cycle, and timely feedback the revenue information in the previous revenue cycle to the user. However, the revenue entry operation needs to access and modify the user revenue data in the database multiple times. In the process of improving the disaster recovery capability, the efficiency of revenue entry will be seriously affected, the revenue entry will take too long, and the user experience will be poor.
发明内容SUMMARY OF THE INVENTION
本申请实施例提供一种收益入账方法、装置、设备及计算机可读存储介质,能够减少收益入账耗时,提升收益入账效率。The embodiments of the present application provide a method, apparatus, device, and computer-readable storage medium for revenue entry, which can reduce the time-consuming of revenue entry and improve the efficiency of revenue entry.
本申请实施例的技术方案是这样实现的:The technical solutions of the embodiments of the present application are implemented as follows:
本申请实施例提供一种收益入账方法,包括:对多个账户收益信息进行分组,得到至少一个入账组;每一入账组中的各账户收益信息对应的账户收益记录处于数据库的同一数据表;调用入账接口对每一入账组进行入账操作;入账操作用于调整入账组中的各账户收益信息对应的账户资源;响应于每一入账组的入账反馈,发送每一入账组的入账记录请求至数据库;入账记录请求用于指示数据库更新入账组中的各账户收益信息对应的账户收益记录。An embodiment of the present application provides a method for entering income into an account, including: grouping multiple account income information to obtain at least one entry group; the account income record corresponding to each account income information in each entry group is located in the same data table of the database; Call the entry interface to perform entry operation for each entry group; the entry operation is used to adjust the account resources corresponding to the income information of each account in the entry group; in response to the entry feedback of each entry group, send the entry record request of each entry group to Database; the entry record request is used to instruct the database to update the account income records corresponding to the income information of each account in the entry group.
在本申请的一些实施例中,所述调用入账接口对每一入账组进行入账操作,包括:根据入账组中的各账户收益信息,生成至少一个资源调整请求;资源调整请求携带账户收益信息对应的账户标识和资源变化量;发送每一资源调整请求至入账接口;资源调整请求用于指示入账接口根据资源变化量调整账户标识对应的账户中的虚拟资源。In some embodiments of the present application, the invoking an account entry interface to perform an entry operation for each entry group includes: generating at least one resource adjustment request according to the income information of each account in the entry group; the resource adjustment request carrying the account income information corresponds to The account identifier and resource change amount; send each resource adjustment request to the entry interface; the resource adjustment request is used to instruct the entry interface to adjust the virtual resources in the account corresponding to the account identifier according to the resource change amount.
在本申请的一些实施例中,在根据入账组中的至少一个账户收益信息,生成至少一个账户收益信息对应的资源调整请求之前,所述方法还包括:生成入账组中每一账户收益信息对应的入账单号;开启事务,事务包括:发送每一账户收益信息对应的新增流水请求至数据库;新增流水请求用于指示数据库在账户收益信息对应的账户收益记录中新增与入账单号对应的流水记录;在接收到每一账户收益信息对应的新增流水反馈的情况下,提交事务。In some embodiments of the present application, before generating the resource adjustment request corresponding to the at least one account income information according to the at least one account income information in the crediting group, the method further includes: generating the corresponding income information for each account in the crediting group Opening a transaction, the transaction includes: sending a new flow request corresponding to the income information of each account to the database; the new flow request is used to instruct the database to add a new bill number in the account income record corresponding to the account income information The corresponding flow record; in the case of receiving the new flow feedback corresponding to the income information of each account, submit the transaction.
在本申请的一些实施例中,所述根据入账组中的各账户收益信息,生成至少一个资源调整请求,包括:响应于提交事务,根据入账组中的各账户收益信息,生成每一账户收益信息对应的资源调整请求;资源调整请求还携带账户收益信息对应的入账单号。In some embodiments of the present application, the generating at least one resource adjustment request according to the income information of each account in the account entry group includes: in response to submitting a transaction, generating each account income according to the income information of each account in the account entry group The resource adjustment request corresponding to the information; the resource adjustment request also carries the billing number corresponding to the account income information.
在本申请的一些实施例中,所述新增流水请求还用于更新数据库中账户收益信息对应的第一资源总量;在根据入账组中的各账户收益信息,生成至少一个资源调整请求之前,所述方法还包括:根据数据库发送的每一账户收益信息对应的新增流水反馈,获取每一账户收益信息对应的第一资源总量;根据每一账户收益信息对应的第一资源总量更新本地缓存中每一账户收益信息对应的第二资源总量;所述根据入账组中的各账户收益信息,生成至少一个资源调整请求,包括:在账户收益信息对应的第一资源总量与第二资源总量不同的情况下,生成账户收益信息对应的资源调整请求;资源调整请求还携带账户收益信息对应的入账单号。In some embodiments of the present application, the new flow request is also used to update the first total amount of resources corresponding to the account income information in the database; before at least one resource adjustment request is generated according to the income information of each account in the account group , the method further includes: obtaining the first total amount of resources corresponding to each account income information according to the newly added flow feedback corresponding to each account income information sent by the database; according to the first resource total amount corresponding to each account income information Updating the second total amount of resources corresponding to the income information of each account in the local cache; generating at least one resource adjustment request according to the income information of each account in the account group, including: comparing the first total amount of resources corresponding to the income information of the account with When the second total amount of resources is different, a resource adjustment request corresponding to the account income information is generated; the resource adjustment request also carries the billing number corresponding to the account income information.
在本申请的一些实施例中,在发送每一账户收益信息对应的新增流水请求至数据库之前,所述方法还包括:对每一账户收益信息对应的账户收益信息进行加锁;在提交事务之前,所述方法还包括:对每一账户收益信息对应的账户收益信息进行解锁。In some embodiments of the present application, before sending a new flow request corresponding to each account income information to the database, the method further includes: locking the account income information corresponding to each account income information; Before, the method further includes: unlocking the account income information corresponding to each account income information.
在本申请的一些实施例中,所述方法还包括:接收入账接口发送的每一资源调整请求对应的资源调整反馈;资源调整反馈用于表征资源调整请求对应的调整操作是否成功;根据每一资源转移反馈,生成入账反馈;入账反馈用于表征入账组中每一账户收益信息对应的入账操作结果。In some embodiments of the present application, the method further includes: receiving resource adjustment feedback corresponding to each resource adjustment request sent by the billing interface; the resource adjustment feedback is used to indicate whether the adjustment operation corresponding to the resource adjustment request is successful; Resource transfer feedback to generate entry feedback; entry feedback is used to represent the entry operation result corresponding to the income information of each account in the entry group.
在本申请的一些实施例中,所述响应于每一入账组的入账反馈,发送每一入账组的入账记录请求至数据库,包括:根据入账组中每一账户收益信息对应的入账操作结果,生成入账组的入账记录请求;发送入账记录请求至数据库;所述根据入账组中每一账户收益信息对应的入账操作结果,生成入账组的入账记录请求,包括:获取入账组中入账操作结果为入账成功的账户收益信息,得到至少一个待入账收益信息;根据至少一个待入账收益信息生成入账记录请求;入账记录请求用于指示数据库更新每一待入账收益信息对应的流水记录。In some embodiments of the present application, the sending a request for an entry record of each entry group to the database in response to the entry feedback of each entry group includes: according to the entry operation result corresponding to the income information of each account in the entry group, Generating an entry record request for an entry group; sending the entry record request to a database; and generating an entry record request for an entry group according to the entry operation result corresponding to the income information of each account in the entry group, including: obtaining the entry operation result in the entry group: Obtain at least one piece of income information to be entered into the account income information that has been successfully entered into the account; generate an entry record request according to the at least one income information to be entered into the account; the entry record request is used to instruct the database to update the flow record corresponding to each income information to be entered into the account.
在本申请的一些实施例中,所述方法还包括:获取每一入账记录请求对应的入账记录反馈;入账记录反馈包括入账组中的各账户收益信息对应的入账结果;根据每一入账组中的每一账户收益信息对应的入账结果生成批量入账结果。In some embodiments of the present application, the method further includes: obtaining the entry record feedback corresponding to each entry record request; the entry record feedback includes the entry result corresponding to the income information of each account in the entry group; The entry result corresponding to the income information of each account will generate a batch entry result.
本申请实施例提供一种收益入账装置,所述装置包括:An embodiment of the present application provides a revenue entry device, and the device includes:
分组模块,用于对多个账户收益信息进行分组,得到至少一个入账组;每一入账组中的各账户收益信息对应的账户收益记录处于数据库的同一数据表。The grouping module is used for grouping multiple account income information to obtain at least one entry group; the account income record corresponding to each account income information in each entry group is located in the same data table of the database.
调整模块,用于调用入账接口对每一入账组进行入账操作;入账操作用于调整入账组中的各账户收益信息对应的账户资源。The adjustment module is used to call the account entry interface to perform an entry operation for each entry group; the entry operation is used to adjust the account resources corresponding to the income information of each account in the entry group.
入账模块,用于响应于每一入账组的入账反馈,发送每一入账组的入账记录请求至数据库;入账记录请求用于指示数据库更新入账组中的各账户收益信息对应的账户收益记录。The account entry module is used for sending the entry record request of each entry group to the database in response to the entry feedback of each entry group; the entry record request is used to instruct the database to update the account income record corresponding to each account income information in the entry group.
本申请实施例提供一种收益入账设备,包括:The embodiment of the present application provides a revenue entry device, including:
存储器,用于存储可执行指令;memory for storing executable instructions;
处理器,用于执行所述存储器中存储的可执行指令时,实现本申请实施例提供的收益入账方法。The processor is configured to implement the revenue entry method provided by the embodiment of the present application when executing the executable instructions stored in the memory.
本申请实施例提供一种计算机可读存储介质,存储有可执行指令,用于引起处理器执行时,实现本申请实施例提供的收益入账方法。The embodiments of the present application provide a computer-readable storage medium, which stores executable instructions for causing the processor to execute the method to implement the revenue entry method provided by the embodiments of the present application.
本申请实施例具有以下有益效果:The embodiment of the present application has the following beneficial effects:
本申请实施例可以按照预设的分组规则对多个用户收益信息进行分组,得到至少一个入账组,在对多个用户收益信息进行收益入账的过程中,可以采用一个入账记录请求对入账组中至少一个用户收益信息进行同时更新,相对于传统技术中针对每一用户收益信息进行单独更新的方案,本申请由于将对应同一个数据表的多个用户收益信息划分为同一入账组,并基于入账组进行收益入账操作,可以降低收益入账过程中的整体耗时,提升整体收益入账的入账效率。In this embodiment of the present application, a plurality of user income information may be grouped according to a preset grouping rule to obtain at least one crediting group. In the process of crediting the income of the multiple user income information, an account crediting record may be used to request for the crediting group. At least one user income information is updated at the same time. Compared with the scheme of separately updating each user income information in the traditional technology, the present application divides multiple user income information corresponding to the same data table into the same account group, and based on the account The revenue entry operation of the group can reduce the overall time-consuming process of revenue entry and improve the entry efficiency of the overall revenue entry.
附图说明Description of drawings
图1是本申请实施例提供的收益入账系统的一个可选的架构示意图;FIG. 1 is an optional schematic structural diagram of a revenue entry system provided by an embodiment of the present application;
图2是本申请实施例提供的收益入账设备的结构示意图;FIG. 2 is a schematic structural diagram of a revenue entry device provided by an embodiment of the present application;
图3是本申请实施例提供的收益入账方法的一个可选的流程示意图;Fig. 3 is an optional schematic flow chart of the revenue entry method provided by the embodiment of the present application;
图4是本申请实施例提供的收益入账方法的一个可选的流程示意图;FIG. 4 is an optional schematic flowchart of the revenue entry method provided by the embodiment of the present application;
图5是本申请实施例提供的收益入账方法的一个可选的流程示意图;FIG. 5 is an optional schematic flowchart of the revenue entry method provided by the embodiment of the present application;
图6是本申请实施例提供的收益入账方法的一个可选的流程示意图;Fig. 6 is an optional schematic flow chart of the revenue entry method provided by the embodiment of the present application;
图7是本申请实施例提供的收益入账方法的一个可选的流程示意图;FIG. 7 is an optional schematic flow chart of the revenue entry method provided by the embodiment of the present application;
图8是本申请实施例提供的收益入账方法的一个可选的流程示意图;FIG. 8 is an optional schematic flow chart of the revenue entry method provided by the embodiment of the present application;
图9是本申请实施例提供的收益入账方法的一个可选的流程示意图。FIG. 9 is an optional schematic flowchart of the revenue entry method provided by the embodiment of the present application.
具体实施方式Detailed ways
为了使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请作进一步地详细描述,所描述的实施例不应视为对本申请的限制,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其它实施例,都属于本申请保护的范围。In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be described in further detail below with reference to the accompanying drawings. All other embodiments obtained under the premise of creative work fall within the scope of protection of the present application.
在以下的描述中,涉及到“一些实施例”,其描述了所有可能实施例的子集,但是可以理解,“一些实施例”可以是所有可能实施例的相同子集或不同子集,并且可以在不冲突的情况下相互结合。In the following description, reference is made to "some embodiments" which describe a subset of all possible embodiments, but it is understood that "some embodiments" can be the same or a different subset of all possible embodiments, and Can be combined with each other without conflict.
在以下的描述中,所涉及的术语“第一\第二\第三”仅仅是是区别类似的对象,不代表针对对象的特定排序,可以理解地,“第一\第二\第三”在允许的情况下可以互换特定的顺序或先后次序,以使在本实施例中描述的本申请实施例能够以除了在在本实施例中图示或描述的以外的顺序实施。In the following description, the term "first\second\third" is only used to distinguish similar objects, and does not represent a specific ordering of objects. It is understood that "first\second\third" Where permitted, the specific order or sequence may be interchanged, so that the embodiments of the present application described in this embodiment can be implemented in sequences other than those illustrated or described in this embodiment.
除非另有定义,本文所使用的所有的技术和科学术语与属于本申请的技术领域的技术人员通常理解的含义相同。本文中所使用的术语只是为了描述本申请实施例的目的,不是旨在限制本申请。Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the technical field to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of the present application, and are not intended to limit the present application.
首先,对本申请实施例中涉及的名词进行简单介绍:First, briefly introduce the terms involved in the embodiments of the present application:
批跑(批量更新):业务团队周期性/触发性地根据各个账户的收益信息对各个账户的收益记录进行更新。Batch run (batch update): The business team periodically/triggeredly updates the income records of each account based on the income information of each account.
收益:用户在基金平台购买基金等金融产品后,经过一个预设的收益周期产生的变化量。Income: The amount of change that occurs after a user purchases financial products such as funds on the fund platform after a preset income cycle.
参见图1,图1是本申请实施例提供的收益入账系统100的一个可选的架构示意图,为实现支撑一个收益入账应用,终端(示例性示出了终端400-1和终端400-2)通过网络300连接服务器200,网络300可以是广域网或者局域网,又或者是二者的组合。服务器200还连接至少一个数据库,该数据库可以为数据库集群,用于实现收益记录的分布式存储,提升容灾能力。图1还示出了服务器200可以为服务器集群,该服务器集群包括服务器200-1至200-3,同样地,服务器200-1至200-3可以是实体机器,也可以是利用虚拟化技术(如容器技术及虚拟机技术等)构建的虚拟机器,本申请实施例对此不做限定,当然,在本实施例中也可使用单个服务器来进行服务的提供。Referring to FIG. 1, FIG. 1 is an optional schematic diagram of the structure of the
在本申请的一些实施例中,终端可以通过图形界面(示例性示出了图形界面410-1和图形界面410-2)接收管理员对收益数据的更新操作,该更新操作也可以是按照预设的收益周期自动执行的。响应于该更新操作,终端会向服务器200发送收益更新请求,该收益更新请求用于指示该服务器200对多个账户收益信息进行分组,得到至少一个入账组;每一入账组中的各账户收益信息对应的账户收益记录处于数据库的同一数据表;调用入账接口对每一入账组进行入账操作;入账操作用于调整入账组中的各账户收益信息对应的账户资源;响应于每一入账组的入账反馈,发送每一入账组的入账记录请求至数据库;入账记录请求用于指示数据库更新入账组中的各账户收益信息对应的账户收益记录。终端还可以通过用户通过图形界面接收用户对收益的查询请求,并将该查询请求发送至服务器200,服务器200可以根据更新后的账户收益记录生成反馈消息,并将反馈消息发送至终端,终端可以通过图形界面(示例性示出了图形界面410-1和图形界面410-2)展示该反馈消息。In some embodiments of the present application, the terminal may receive an update operation of the revenue data by the administrator through a graphical interface (a graphical interface 410-1 and a graphical interface 410-2 are exemplarily shown), and the update operation may also be performed according to a preset The set revenue cycle is automatically executed. In response to the update operation, the terminal will send an income update request to the server 200, and the income update request is used to instruct the server 200 to group multiple account income information to obtain at least one entry group; the income of each account in each entry group The account income record corresponding to the information is in the same data table of the database; the account entry interface is called to perform an entry operation for each entry group; the entry operation is used to adjust the account resources corresponding to the income information of each account in the entry group; The account entry feedback sends the entry record request of each entry group to the database; the entry record request is used to instruct the database to update the account income record corresponding to the income information of each account in the entry group. The terminal can also receive the user's query request for earnings through a graphical interface, and send the query request to the server 200. The server 200 can generate a feedback message according to the updated account earnings record, and send the feedback message to the terminal. The terminal can The feedback message is presented through a graphical interface (graphical interface 410-1 and graphical interface 410-2 are illustratively shown).
本申请实施例可以借助于云技术(Cloud Technology)实现,云技术是指在广域网或局域网内将硬件、软件、网络等系列资源统一起来,实现数据的计算、储存、处理和共享的一种托管技术。The embodiments of the present application can be implemented with the help of cloud technology. Cloud technology refers to a kind of hosting that unifies a series of resources such as hardware, software, and network in a wide area network or a local area network to realize data computing, storage, processing, and sharing. technology.
云技术基于云计算商业模式应用的网络技术、信息技术、整合技术、管理平台技术、以及应用技术等的总称,可以组成资源池,按需所用,灵活便利。云计算技术将变成重要支撑。技术网络系统的后台服务需要大量的计算、存储资源,例如,教育系统的门户网站。Cloud technology is based on the general term of network technology, information technology, integration technology, management platform technology, and application technology applied in the cloud computing business model. Cloud computing technology will become an important support. Background services of technical network systems require a lot of computing and storage resources, for example, portal websites of educational systems.
作为示例,服务器200可以是独立的物理服务器,也可以是多个物理服务器构成的服务器集群或者分布式系统,还可以是提供云服务、云数据库、云计算、云函数、云存储、网络服务、云通信、中间件服务、域名服务、安全服务、CDN、以及大数据和人工智能平台等基础云计算服务的云服务器。终端可以是智能手机、平板电脑、笔记本电脑、台式计算机、智能音箱、以及智能手表等,但并不局限于此。终端以及服务器200可以通过有线或无线通信方式进行直接或间接地连接,本申请实施例中不做限制。As an example, the server 200 may be an independent physical server, or a server cluster or a distributed system composed of multiple physical servers, or may provide cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, Cloud servers for basic cloud computing services such as cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The terminal may be a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart speaker, a smart watch, etc., but is not limited thereto. The terminal and the server 200 may be directly or indirectly connected through wired or wireless communication, which is not limited in this embodiment of the present application.
参见图2,图2是本申请实施例提供的收益入账设备500的结构示意图,图2所示的收益入账设备500包括:至少一个处理器510、存储器550、至少一个网络接口520和用户接口530。收益入账设备500中的各个组件通过总线系统540耦合在一起。可理解,总线系统540用于实现这些组件之间的连接通信。总线系统540除包括数据总线之外,还包括电源总线、控制总线和状态信号总线。但是为了清楚说明起见,在图2中将各种总线都标为总线系统540。Referring to FIG. 2 , FIG. 2 is a schematic structural diagram of a revenue credit device 500 provided by an embodiment of the present application. The revenue credit device 500 shown in FIG. 2 includes: at least one processor 510 , memory 550 , at least one network interface 520 and user interface 530 . The various components in revenue posting device 500 are coupled together by
处理器510可以是一种集成电路芯片,具有信号的处理能力,例如通用处理器、数字信号处理器(DSP,Digital Signal Processor),或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等,其中,通用处理器可以是微处理器或者任何常规的处理器等。The processor 510 may be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP, Digital Signal Processor), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., where a general-purpose processor may be a microprocessor or any conventional processor or the like.
用户接口530包括使得能够呈现媒体内容的一个或多个输出装置531,包括一个或多个扬声器和/或一个或多个视觉显示屏。用户接口530还包括一个或多个输入装置532,包括有助于用户输入的用户接口部件,比如键盘、鼠标、麦克风、触屏显示屏、摄像头、其他输入按钮和控件。User interface 530 includes one or more output devices 531 that enable presentation of media content, including one or more speakers and/or one or more visual display screens. User interface 530 also includes one or more input devices 532, including user interface components that facilitate user input, such as a keyboard, mouse, microphone, touch screen display, camera, and other input buttons and controls.
存储器550包括易失性存储器或非易失性存储器,也可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(ROM,Read Only Memory),易失性存储器可以是随机存取存储器(RAM,Random Access Memory)。本申请实施例描述的存储器550旨在包括任意适合类型的存储器。存储器550可选地包括在物理位置上远离处理器510的一个或多个存储设备。Memory 550 includes volatile memory or non-volatile memory, and may also include both volatile and non-volatile memory. The non-volatile memory may be a read only memory (ROM, Read Only Memory), and the volatile memory may be a random access memory (RAM, Random Access Memory). The memory 550 described in the embodiments of the present application is intended to include any suitable type of memory. Memory 550 optionally includes one or more storage devices that are physically remote from processor 510 .
在本申请的一些实施例中,存储器550能够存储数据以支持各种操作,这些数据的示例包括程序、模块和数据结构或者其子集或超集,下面示例性说明。In some embodiments of the present application, memory 550 is capable of storing data to support various operations, examples of which include programs, modules, and data structures, or subsets or supersets thereof, as exemplified below.
操作系统551,包括用于处理各种基本系统服务和执行硬件相关任务的系统程序,例如框架层、核心库层、驱动层等,用于实现各种基础业务以及处理基于硬件的任务;The operating system 551 includes system programs for processing various basic system services and performing hardware-related tasks, such as a framework layer, a core library layer, a driver layer, etc., for implementing various basic services and processing hardware-based tasks;
网络通信模块552,用于经由一个或多个(有线或无线)网络接口520到达其他计算设备,示例性的网络接口520包括:蓝牙、无线相容性认证(WiFi)、和通用串行总线(USB,Universal Serial Bus)等;A network communication module 552 for reaching other computing devices via one or more (wired or wireless) network interfaces 520, exemplary network interfaces 520 including: Bluetooth, Wireless Compatibility (WiFi), and Universal Serial Bus ( USB, Universal Serial Bus), etc.;
显示模块553,用于经由一个或多个与用户接口530相关联的输出装置531(例如,显示屏、扬声器等)使得能够呈现信息(例如,用于操作外围设备和显示内容和信息的用户接口);A display module 553 for enabling presentation of information (eg, a user interface for operating peripherals and displaying content and information) via one or more output devices 531 associated with the user interface 530 (eg, a display screen, speakers, etc.) );
输入处理模块554,用于对一个或多个来自一个或多个输入装置532之一的一个或多个用户输入或互动进行检测以及翻译所检测的输入或互动。An input processing module 554 for detecting one or more user inputs or interactions from one of the one or more input devices 532 and translating the detected inputs or interactions.
在本申请的一些实施例中,本申请实施例提供的收益入账装置可以采用软硬件结合的方式实现,作为示例,本申请实施例提供的收益入账装置可以是采用硬件译码处理器形式的处理器,其被编程以执行本申请实施例提供的收益入账方法。In some embodiments of the present application, the revenue crediting device provided by the embodiments of the present application may be implemented by a combination of software and hardware. As an example, the revenue crediting device provided by the embodiments of the present application may be processed in the form of a hardware decoding processor. The device is programmed to execute the revenue accounting method provided by the embodiments of the present application.
在本申请的一些实施例中,本申请实施例提供的收益入账装置可以采用软件方式实现,图2示出了存储在存储器550中的收益入账装置555,其可以是程序和插件等形式的软件,包括以下软件模块:分组模块5551、调整模块5552和入账模块5553,这些模块是逻辑上的,因此根据所实现的功能可以进行任意的组合或进一步拆分。In some embodiments of the present application, the revenue credit device provided by the embodiments of the present application may be implemented in software. FIG. 2 shows the revenue credit device 555 stored in the memory 550, which may be software in the form of programs and plug-ins. , including the following software modules: grouping module 5551, adjustment module 5552 and account entry module 5553, these modules are logical, so any combination or further split can be performed according to the functions implemented.
将在下文中说明各个模块的功能。The function of each module will be explained below.
在另一些实施例中,本申请实施例提供的装置可以采用硬件方式实现,作为示例,本申请实施例提供的装置可以是采用硬件译码处理器形式的处理器,其被编程以执行本申请实施例提供的收益入账方法,例如,硬件译码处理器形式的处理器可以采用一个或多个应用专用集成电路(ASIC,Application Specific Integrated Circuit)、DSP、可编程逻辑器件(PLD,Programmable Logic Device)、复杂可编程逻辑器件(CPLD,ComplexProgrammable Logic Device)、现场可编程门阵列(FPGA,Field-Programmable GateArray)或其他电子元件。In other embodiments, the apparatus provided by the embodiments of the present application may be implemented in hardware. As an example, the apparatus provided by the embodiments of the present application may be a processor in the form of a hardware decoding processor, which is programmed to execute the present application For the revenue entry method provided by the embodiment, for example, the processor in the form of a hardware decoding processor may adopt one or more Application Specific Integrated Circuits (ASIC, Application Specific Integrated Circuit), DSP, Programmable Logic Device (PLD, Programmable Logic Device) ), Complex Programmable Logic Device (CPLD, Complex Programmable Logic Device), Field Programmable Gate Array (FPGA, Field-Programmable Gate Array) or other electronic components.
将结合本申请实施例提供的服务器的示例性应用和实施,在本申请实施例中,将以服务器为执行主体说明本申请实施例提供的收益入账方法。With reference to the exemplary application and implementation of the server provided by the embodiment of the present application, in the embodiment of the present application, the server is used as the execution subject to describe the revenue entry method provided by the embodiment of the present application.
参见图3,图3是本申请实施例提供的收益入账方法的一个可选的流程示意图,将结合图3示出的步骤进行说明。Referring to FIG. 3 , FIG. 3 is an optional schematic flowchart of the revenue entry method provided by the embodiment of the present application, which will be described with reference to the steps shown in FIG. 3 .
在步骤301中,对多个账户收益信息进行分组,得到至少一个入账组;每一入账组中的各账户收益信息对应的账户收益记录处于数据库的同一数据表。In
在本申请的一些实施例中,服务器可以通过解析收益文件得到该多个账户收益信息。其中,该收益文件可以为基金公司发送的收益文件,该收益文件包括了多个账户中每一账户在预设收益周期内的账户收益信息。其中,一个账户的账户收益信息可以包括该账户的账户标识、资源变化量和资源总量。In some embodiments of the present application, the server may obtain the multiple account income information by parsing the income file. Wherein, the income file may be an income file sent by the fund company, and the income file includes account income information of each account in the multiple accounts within the preset income cycle. Wherein, the account income information of an account may include the account identifier of the account, the amount of resource change, and the total amount of resources.
在本申请的一些实施例中,服务器在解析该收益文件后,可以得到该解析文件中包括的多个账户收益信息,服务器可以根据每一账户收益信息修改数据库中与该账户收益信息对应的账户收益记录,即在该账户收益信息对应的账户收益记录中新增一条收益流水。因此,可以先获取每一账户收益信息对应的收益记录,按照收益记录处于数据库中同一数据表的分组规则对该多个账户收益信息进行分组,得到至少一个入账组。In some embodiments of the present application, after parsing the income file, the server can obtain multiple account income information included in the parsed file, and the server can modify the account corresponding to the account income information in the database according to each account income information Income record, that is, a new income stream is added to the account income record corresponding to the account income information. Therefore, the income records corresponding to the income information of each account can be obtained first, and the income records of the multiple accounts can be grouped according to the grouping rule that the income records are located in the same data table in the database to obtain at least one entry group.
在本申请的一些实施例中,可以根据数据库中存储各账户的账户收益记录的存储规则,指定该分组规则。例如,在数据库根据账户收益信息中账户标识的前/后N位相同的至少一个账户收益记录存储于同一数据库的同一数据表中,对应的,在对该多个账户收益记录进行分组的过程中,可以按照每一账户收益信息中的账户标识,将前/后N位相同的至少一个账户收益记录设置为一个入账组。In some embodiments of the present application, the grouping rule may be specified according to a storage rule for storing account income records of each account in the database. For example, in the database, at least one account income record with the same first/last N digits of the account identifier in the account income information is stored in the same data table of the same database. Correspondingly, in the process of grouping the plurality of account income records , at least one account income record with the same first and last N digits can be set as an account entry group according to the account identifier in each account income information.
在本申请的一些实施例中,该分组规则还可以对每一账户组中的账户收益记录的数量进行限制。其中,可以设置最大组内数量和/或最小组内数量对每一账户组中的账户收益记录的数量进行限制。In some embodiments of the present application, the grouping rule may further limit the number of account income records in each account group. Wherein, the maximum number within the group and/or the minimum number within the group can be set to limit the number of account income records in each account group.
在本申请的一些实施例中,在对多个账户收益信息进行分组的过程中,每一账户组中的账户收益记录的数量可以相同,也可以不相同。为了保证收益入账效率,在对多个账户收益信息进行分组的过程中,需要保证存在至少一个账户组的账户收益记录的数量为至少两个,在账户组内账户收益记录的数量为至少两个的情况下,本申请可以对入账组内的至少两个账户收益记录进行批量入账操作,进而可以提升收益入账效率。In some embodiments of the present application, in the process of grouping multiple account income information, the number of account income records in each account group may be the same or different. In order to ensure the efficiency of income entry, in the process of grouping the income information of multiple accounts, it is necessary to ensure that the number of account income records in at least one account group is at least two, and the number of account income records in the account group is at least two. In this case, the application can perform batch entry operations for at least two account income records in the entry group, thereby improving the efficiency of income entry.
例如,对于存在的20个账户收益记录,假设该20个账户收益记录均处于同一数据表中,通过本申请上述的分组规则,可以将该20个账户收益记录划分为一个入账组;也可以将20个账户收益记录划分为18个只有一个账户收益记录的入账组和1个有两个账户收益记录的入账组;若存在最大组内数量为10和最小组内数量为2,可以将20个账户收益记录划分为1个有十个账户收益记录的入账组和5个有两个账户收益记录的入账组。For example, for the existing 20 account income records, assuming that the 20 account income records are in the same data table, the 20 account income records can be divided into an account entry group through the grouping rules described above in this application; The 20 account income records are divided into 18 entry groups with only one account income record and 1 entry group with two account income records; if there are 10 maximum group numbers and 2 minimum group numbers, 20 Account income records are divided into one entry group with ten account income records and five entry groups with two account income records.
在步骤302中,调用入账接口对每一入账组进行入账操作;入账操作用于调整入账组中的各账户收益信息对应的账户资源。In
在本申请的一些实施例中,该入账接口为可以提供入账操作服务的任意类型的接口,例如,该入账接口可以为金融机构提供的操作接口,如银行接口,基金接口等。调用入账接口对每一账户组进行入账操作的过程包括,根据入账组内的每一账户收益信息,调整每一账户收益信息对应的账户资源。在该入账接口为银行接口的情况下,该账户资源为该账户收益信息在银行系统中对应的账户资源;在该入账接口为基金接口的情况下,该账户资源为该账户收益信息在基金系统中对应的账户资源。In some embodiments of the present application, the account entry interface is any type of interface that can provide account entry operation services. For example, the account entry interface can be an operation interface provided by a financial institution, such as a bank interface, a fund interface, and the like. The process of invoking the crediting interface to perform crediting operations for each account group includes adjusting the account resources corresponding to the income information of each account according to the income information of each account in the crediting group. If the account entry interface is a bank interface, the account resource is the account resource corresponding to the account income information in the banking system; if the account entry interface is a fund interface, the account resource is the account income information in the fund system. The corresponding account resources in .
在本申请的一些实施例中,对于任意一个入账组的入账操作的过程中,即对该入账组中各账户收益信息对应的账户资源的调整操作的过程中,可以得到该入账组中每一账户收益信息对应的入账操作结果,进而可以得到该入账组的入账操作的入账操作反馈,该入账操作反馈用于表征该入账组中每一账户收益信息对应的入账操作结果。In some embodiments of the present application, in the process of the entry operation of any entry group, that is, during the adjustment operation of the account resources corresponding to the income information of each account in the entry group, each entry in the entry group can be obtained. The entry operation result corresponding to the account income information, and then the entry operation feedback of the entry operation of the entry group can be obtained, and the entry operation feedback is used to represent the entry operation result corresponding to the income information of each account in the entry group.
在步骤303中,响应于每一入账组的入账反馈,发送每一入账组的入账记录请求至数据库;入账记录请求用于指示数据库更新入账组中的各账户收益信息对应的账户收益记录。In
在本申请的一些实施例中,对于任意一个入账组,在接收到该入账组的入账反馈后,可以获取该入账组中的每一账户收益信息对应的入账操作结果。根据该入账组中的每一账户收益信息对应的入账操作结果可以生成该入账组的入账记录请求,该入账记录请求用于指示数据库更新入账组中的各账户收益信息对应的账户收益记录。In some embodiments of the present application, for any crediting group, after receiving the crediting feedback of the crediting group, the crediting operation result corresponding to the income information of each account in the crediting group can be obtained. An account entry record request for the account entry group can be generated according to the entry operation result corresponding to each account income information in the entry group, and the entry record request is used to instruct the database to update the account income record corresponding to each account income information in the entry group.
在本申请的一些实施例中,对于一个入账组,其中的账户收益信息对应的入账操作结果无论是入账成功还是入账失败,该入账记录请求包括每一账户收益信息对应的账户标识、资源变化量、资源总量和入账操作结果,数据库在接收到该入账组对应的入账记录请求后,会根据每一账户收益信息对应的账户标识、资源变化量、资源总量和入账操作结果更新对应的账户收益记录。In some embodiments of the present application, for an account entry group, whether the entry operation result corresponding to the account income information in the entry group is successful or unsuccessful, the entry record request includes the account identifier and resource change corresponding to each account income information. , the total amount of resources and the result of the entry operation. After the database receives the entry record request corresponding to the entry group, it will update the corresponding account according to the account ID, resource change, total resource and entry operation result corresponding to the income information of each account. Earnings records.
在本申请的一些实施例中,对于一个入账组,该入账记录请求包括入账操作结果为入账成功的账户收益信息对应的账户标识、资源变化量和资源总量,数据库在接收到该入账组对应的入账记录请求后,会根据每一入账操作结果为入账成功的账户收益信息对应的账户标识、资源变化量和资源总量更新对应的账户收益记录。In some embodiments of the present application, for an account entry group, the entry record request includes the account identifier, the resource change amount and the total amount of resources corresponding to the account income information whose entry operation result is that the entry is successful. After the account entry record request is made, the corresponding account income record will be updated according to the account ID, resource change amount and total resource amount corresponding to the account income information that is successfully entered into the account according to the result of each entry operation.
通过本申请实施例对于图3的上述示例性实施可知,本申请实施例可以按照预设的分组规则对多个用户收益信息进行分组,得到至少一个入账组,在对多个用户收益信息进行收益入账的过程中,可以采用一个入账记录请求对入账组中至少一个用户收益信息进行同时更新,相对于传统技术中针对每一用户收益信息进行单独更新的方案,本申请由于将对应同一个数据表的多个用户收益信息划分为同一入账组,并基于入账组进行收益入账操作,可以降低收益入账过程中的整体耗时,提升整体收益入账的入账效率。It can be seen from the above exemplary implementation of FIG. 3 in the embodiment of the present application that the embodiment of the present application can group multiple user income information according to a preset grouping rule, so as to obtain at least one credit group. In the process of entering the account, one entry record request can be used to simultaneously update the income information of at least one user in the account entry group. Compared with the scheme of separately updating the income information of each user in the traditional technology, this application will correspond to the same data table. The income information of multiple users is divided into the same entry group, and the income entry operation is performed based on the entry group, which can reduce the overall time-consuming process of income entry and improve the entry efficiency of the overall income entry.
参见图4,图4是本申请实施例提供的收益入账方法的一个可选的流程示意图,基于图3,图3示出的步骤302可以更新为步骤401至步骤402,将结合图4示出的步骤进行说明。Referring to FIG. 4, FIG. 4 is an optional schematic flowchart of the revenue entry method provided by the embodiment of the present application. Based on FIG. 3, step 302 shown in FIG. 3 may be updated to
在步骤401中,根据入账组中的各账户收益信息,生成至少一个资源调整请求;资源调整请求携带账户收益信息对应的账户标识和资源变化量。In
在本申请的一些实施例中,对于任意一个入账组中的每一账户收益信息,可以获取每一账户收益信息中的账户标识和资源变化量,并根据每一账户收益信息中的账户标识和资源变化量生成该至少一个资源调整请求。In some embodiments of the present application, for each account income information in any one of the account entry groups, the account identifier and resource change in each account income information can be obtained, and according to the account identifier and the resource change in each account income information The resource delta generates the at least one resource adjustment request.
在本申请的一些实施例中,在根据每一账户收益信息中的账户标识和资源变化量生成该至少一个资源调整请求的过程中,可以判断账户收益信息中的资源变化量是否为0,在该账户收益信息对应的资源变化量为0的情况下,不生成该账户收益信息对应的资源调整请求。In some embodiments of the present application, in the process of generating the at least one resource adjustment request according to the account identifier and the resource change amount in each account benefit information, it may be determined whether the resource change amount in the account benefit information is 0, and then When the resource change amount corresponding to the account income information is 0, the resource adjustment request corresponding to the account income information is not generated.
例如,若一个入账组中存在3个账户收益信息,账户标识和资源变化量分别为(用户A,20)、(用户B,0.5)和(用户C,0)。可以生成每一账户收益信息对应的资源调整请求,即生成3个资源调整请求;还可以在账户收益信息对应的资源变化量为0的情况下,不生成该账户收益信息对应的资源调整请求,即不生成用户C对应的资源调整请求,只生成用户A和用户B分别对应的资源调整请求。For example, if there are 3 account income information in an account entry group, the account identifier and resource change amount are (user A, 20), (user B, 0.5) and (user C, 0) respectively. A resource adjustment request corresponding to each account income information can be generated, that is, three resource adjustment requests can be generated; it is also possible to not generate a resource adjustment request corresponding to the account income information when the resource change amount corresponding to the account income information is 0, That is, the resource adjustment request corresponding to the user C is not generated, and only the resource adjustment requests corresponding to the user A and the user B respectively are generated.
在步骤402中,发送每一资源调整请求至入账接口;资源调整请求用于指示入账接口根据资源变化量调整账户标识对应的账户中的虚拟资源。In
在本申请的一些实施例中,在对一个入账组的入账操作的过程中,需要分别发送步骤401生成的至少一个资源调整请求至入账接口,入账接口在接收到该每一资源调整请求后,会根据每一资源请求中携带的账户标识和资源变化量,在该入账接口对应的系统中根据资源变化量调整账户标识对应的账户中的虚拟资源。In some embodiments of the present application, in the process of crediting an crediting group, at least one resource adjustment request generated in
通过本申请实施例对于图4的上述示例性实施可知,本申请实施例通过调用入账接口对各账户收益信息对应的账户进行虚拟资源的调整,可以加快收益入账的速度,降低收益入账耗时。It can be seen from the above exemplary implementation of FIG. 4 in the embodiment of the present application that the embodiment of the present application adjusts the virtual resources of the accounts corresponding to the income information of each account by invoking the account entry interface, which can speed up the income entry speed and reduce the time consuming of income entry.
在本申请的一些实施例中,参见图5,图5是本申请实施例提供的收益入账方法的一个可选的流程示意图,基于图4,在步骤401之前,还包括步骤501至步骤503,步骤401可以更新为步骤504。In some embodiments of the present application, referring to FIG. 5 , FIG. 5 is an optional schematic flow chart of the revenue entry method provided by the embodiment of the present application. Based on FIG. 4 , before
在步骤501中,生成入账组中每一账户收益信息对应的入账单号。In
在本申请的一些实施例中,对于任意一个入账组,在调用入账接口对该入账组进行入账操作之前,即生成该入账组对应的至少一个资源调整请求之前,还需要生成该入账组中每一账户收益信息对应的入账单号。In some embodiments of the present application, for any crediting group, before calling the crediting interface to perform the crediting operation on the crediting group, that is, before generating at least one resource adjustment request corresponding to the crediting group, it is also necessary to generate each item in the crediting group. A billing number corresponding to the account income information.
在本申请的一些实施例中,该入账单号可以根据系统时间、该账户收益信息中资源变化量的计量单位及交易编号生成。其中,系统时间为生成该入账单号时的系统时间;资源变化量的计量单位可以为虚拟资源对应的币种编号。对于一个账户收益信息,在一天之内只能生成同一个入账单号。In some embodiments of the present application, the billing number may be generated according to the system time, the measurement unit of the resource change in the account revenue information, and the transaction number. Wherein, the system time is the system time when the billing number is generated; the measurement unit of the resource change amount may be the currency number corresponding to the virtual resource. For one account income information, only one billing number can be generated within one day.
在步骤502中,开启事务,事务包括:发送每一账户收益信息对应的新增流水请求至数据库;新增流水请求用于指示数据库在账户收益信息对应的账户收益记录中新增与入账单号对应的流水记录。In
在本申请的一些实施例中,需要将该入账组中每一账户收益信息对应的入账单号新增至数据库中与账户收益信息对应的收益记录中。可以针对该入账组,发起一个事务,在该事务中,需要发送每一个账户收益信息对应的新增流水请求至该数据库,以使数据库在每一账户收益信息对应的账户收益记录中新增该入账单号对应的流水记录。该事务在执行过程中,需要完成每一账户收益对应的入账单号的记录过程,若存在一个账户收益信息对应的入账单号记录失败,则撤销该入账组其他账户收益信息对应的记录操作。In some embodiments of the present application, the billing number corresponding to each account income information in the billing group needs to be added to the income record corresponding to the account income information in the database. A transaction can be initiated for the account entry group. In this transaction, a new flow request corresponding to each account income information needs to be sent to the database, so that the database can add the new account income record corresponding to each account income information. The flow record corresponding to the billing number. During the execution of this transaction, it is necessary to complete the recording process of the billing number corresponding to the income of each account. If there is a failure to record the billing number corresponding to the income information of the account, the recording operation corresponding to the income information of other accounts in the billing group will be cancelled.
在本申请的一些实施例中,由于数据库是跨城数据库,需要通过网络将该请求消息发送至该数据库中,以完成入账单号的记录过程。为了保证记录成功率,对于任意一个账户收益信息对应的新增流水请求可以多次发送至数据库,以确保数据库可以接收到每一账户收益信息对应的新增流水请求。由于对于任意账户收益信息,在一天内只会生成一个入账单号,因此数据库在接收到任意一个账户收益信息对应的多条新增流水请求后,只会新增一条与入账单号对应的流水记录。In some embodiments of the present application, since the database is a cross-city database, the request message needs to be sent to the database through the network to complete the process of recording the billing number. In order to ensure the success rate of recording, the new flow request corresponding to any account income information can be sent to the database multiple times to ensure that the database can receive the new flow request corresponding to each account income information. Since for any account income information, only one billing number will be generated in one day, so after the database receives multiple new flow requests corresponding to any account income information, it will only add one new flow corresponding to the billing number. Record.
在本申请的一些实施例中,数据库在执行上述在账户收益信息对应的账户收益记录中新增与入账单号对应的流水记录的过程中,在该新增流水请求对应的入账单号已经被新增至账户收益信息对应的账户收益记录之后,会生成与该新增流水请求对应的新增流水反馈。In some embodiments of the present application, when the database performs the above process of adding a flow record corresponding to the billing number in the account income record corresponding to the account income information, the billing number corresponding to the new flow request has been After being added to the account income record corresponding to the account income information, a new flow feedback corresponding to the new flow request will be generated.
在步骤503中,在接收到每一账户收益信息对应的新增流水反馈的情况下,提交事务。In
在本申请的一些实施例中,对于一个入账组中的N个账户收益信息,会发出N个账户收益信息对应的N个新增流水请求,只有在接收到N个新增流水请求中每一新增流水请求对应的新增流水反馈的情况下,即接收到N个新增流水反馈的情况下,提交该事务;否则,进行事务回滚。In some embodiments of the present application, for N account income information in an account entry group, N new flow requests corresponding to the N account income information will be issued, and only when each of the N new flow requests is received In the case of new pipeline feedback corresponding to the new pipeline request, that is, when N new pipeline feedbacks are received, the transaction is submitted; otherwise, the transaction is rolled back.
在步骤504中,响应于提交事务,根据入账组中的各账户收益信息,生成每一账户收益信息对应的资源调整请求;资源调整请求还携带账户收益信息对应的入账单号。In
在本申请的一些实施例中,响应于提交该事务,数据库中已经存在该入账组中每一账户收益信息对应的新增的流水记录,每一账户收益信息对应的流水记录在每一账户收益信息对应的账户收益记录中。此时,该入账组的入账单号记录操作已经完成,可以生成每一账户收益信息对应的资源调整请求。每一资源调整请求还携带账户收益信息对应的入账单号。In some embodiments of the present application, in response to submitting the transaction, a newly added flow record corresponding to the income information of each account in the account entry group already exists in the database, and the flow record corresponding to the income information of each account is recorded in the income of each account In the account income record corresponding to the information. At this point, the billing number recording operation of the billing group has been completed, and a resource adjustment request corresponding to the income information of each account can be generated. Each resource adjustment request also carries the billing number corresponding to the account income information.
例如,对于一个存在3个账户收益信息的入账组,在生成3个新增流水请求,并发送至数据库,接收数据库反馈的3个新增流水反馈之后,会生成该入账组中每一账户收益信息对应的资源调整请求,即生成3个资源调整请求,每一资源调整请求携带对应的入账单号。For example, for an account entry group with 3 account income information, after generating 3 new transaction requests and sending them to the database, after receiving the 3 new transaction feedback feedbacks from the database, the income of each account in the account group will be generated. For the resource adjustment request corresponding to the information, three resource adjustment requests are generated, and each resource adjustment request carries a corresponding billing number.
在本申请的一些实施例中,由于每一资源调整请求还携带账户收益记录对应的入账单号,因此,入账接口在接收到资源调整请求之后,还会根据该入账单号判断该资源调整请求是否为合法请求,在该资源调整请求是否为合法请求的情况下,在该入账接口对应的系统中根据资源变化量调整账户标识对应的账户中的虚拟资源。在该资源调整请求为非法请求的情况下,生成告警报告并保存。其中,可以采用以下至少之一的方式判断该资源调整请求是否为合法请求:根据入账单号的生成规则判断该资源调整请求中携带的入账单号是否为合法单号,在该入账单号为合法单号的情况下,对应的资源调整请求为合法请求;记录每一账户标识对应的入账单号,在一个收益周期内接收到的该账户标识对应的第一个资源调整请求为合法请求,并记录该第一个资源调整请求对应的入账单号,在该收益周期内接收到其他携带该入账单号的资源调整请求为非法请求。In some embodiments of the present application, since each resource adjustment request also carries the billing number corresponding to the account revenue record, the billing interface will also judge the resource adjustment request according to the billing number after receiving the resource adjustment request. Whether it is a legal request or not, in the case of whether the resource adjustment request is a legal request, the virtual resource in the account corresponding to the account identifier is adjusted in the system corresponding to the account entry interface according to the resource change amount. In the case that the resource adjustment request is an illegal request, an alarm report is generated and saved. Wherein, at least one of the following methods can be used to judge whether the resource adjustment request is a legal request: according to the generation rule of the billing number, it is judged whether the billing number carried in the resource adjustment request is a legal billing number, and the billing number is In the case of a legal order number, the corresponding resource adjustment request is a legal request; the billing number corresponding to each account identifier is recorded, and the first resource adjustment request corresponding to the account identifier received within a revenue cycle is a legal request. The billing number corresponding to the first resource adjustment request is recorded, and other resource adjustment requests with the billing number received within the revenue period are illegal requests.
在本申请的一些实施例中,在发送每一账户收益信息对应的新增流水请求至数据库之前,本实施例还包括:对每一账户收益信息对应的账户收益信息进行加锁;在提交事务之前,本实施例还包括:对每一账户收益信息对应的账户收益信息进行解锁。通过本实施例中的方法,可以保证在新增收益流水至用户收益记录的过程中,该用户收益记录不会被其他进程或服务更改,避免重复操作,保证数据的一致性。In some embodiments of the present application, before sending a new flow request corresponding to each account income information to the database, this embodiment further includes: locking the account income information corresponding to each account income information; Before, this embodiment further includes: unlocking the account income information corresponding to each account income information. With the method in this embodiment, it can be ensured that in the process of adding a revenue stream to the user revenue record, the user revenue record will not be changed by other processes or services, avoiding repeated operations and ensuring data consistency.
通过本申请实施例对于图5的上述示例性实施可知,本申请实施例通过对每一账户收益信息生成对应的入账单号,可以避免在账户收益记录中重复新增收益流水的情况,也可以避免在调用入账接口过程中重复调整账户收益信息对应账户的虚拟资源的情况,提升了收益入账过程中的安全性。并且,本申请实施例通过事务的方式,将同一入账组中多个账户收益信息的入账单号的记录操作绑定在一起,可以保证各账户收益信息对应的入账单号可以全部完成记录,防止因遗漏一条入账单号而导致的入账错误问题。并且,本申请实施例在新增收益流水至用户收益记录的过程中采用加锁的方式,可以使得对应的用户收益记录不会被其他进程或服务更改,避免重复操作,保证数据的一致性。It can be seen from the above exemplary implementation of FIG. 5 in the embodiment of the present application that by generating a corresponding billing number for each account income information in the embodiment of the present application, it is possible to avoid the situation of repeatedly adding new income streams in the account income record, or It avoids the situation of repeatedly adjusting the virtual resources of the account corresponding to the account income information in the process of calling the account entry interface, and improves the security of the income entry process. In addition, in the embodiment of the present application, the recording operations of the billing numbers of the income information of multiple accounts in the same billing group are bound together by means of transactions, which can ensure that the billing numbers corresponding to the income information of each account can be completely recorded, preventing Entry errors caused by missing a billing number. In addition, the embodiment of the present application adopts a locking method in the process of adding a revenue stream to a user revenue record, so that the corresponding user revenue record will not be changed by other processes or services, avoiding repeated operations and ensuring data consistency.
在本申请的一些实施例中,参见图6,图6是本申请实施例提供的收益入账方法的一个可选的流程示意图,基于图4,在步骤401之前,还包括步骤601至步骤605,步骤401可以更新为步骤606。In some embodiments of the present application, referring to FIG. 6 , FIG. 6 is an optional schematic flowchart of the revenue entry method provided by the embodiments of the present application. Based on FIG. 4 , before
在步骤601中,生成入账组中每一账户收益信息对应的入账单号。In
在步骤602中,开启事务,事务包括:发送每一账户收益信息对应的新增流水请求至数据库;新增流水请求用于指示数据库在账户收益信息对应的账户收益记录中新增与入账单号对应的流水记录。In
在步骤603中,在接收到每一账户收益信息对应的新增流水反馈的情况下,提交事务。In
在本申请的一些实施例中,上述步骤601至步骤603与图5中的步骤501至步骤503相同,在此不再赘述。In some embodiments of the present application, the
在步骤604中,根据数据库发送的每一账户收益信息对应的新增流水反馈,获取每一账户收益信息对应的第一资源总量。In
在本申请的一些实施例中,每一账户收益信息对应的新增流水请求还用于更新每一账户收益信息在数据库中的第一资源总量。数据库在接收到每一账户收益信息对应的新增流水请求后,除了在每一账户收益信息对应的账户收益记录中新增入账单号对应的收益流水,还需要更新每一账户收益信息对应的第一资源总量。相应地,数据库发送的新增流水反馈中也携带了账户收益信息在数据库中最新的第一资源总量。In some embodiments of the present application, the new flow request corresponding to each account income information is also used to update the first total amount of resources in the database for each account income information. After the database receives the new flow request corresponding to the income information of each account, in addition to adding the income flow corresponding to the bill number in the account income record corresponding to the income information of each account, it also needs to update the income flow corresponding to the income information of each account. The total amount of the first resource. Correspondingly, the newly added flow feedback sent by the database also carries the latest total amount of first resources in the database for the account revenue information.
例如,对于入账组中的一个新增流水请求,该新增流水请求携带“用户1,30,单号1”,在数据库接收到该新增流水请求后,需要在用户1对应的账户流水记录中新增一条收益流水,该收益流水与单号1对应,同时,数据库还会获取用户1对应的历史资源总量M,利用该新增流水请求中的资源变化量更新该历史资源总量M,得到第一资源总量(M+30)。在数据库发送该新增流水请求对应的新增流水反馈中,会携带该用户1对应的第一资源总量(M+30)。For example, for a new transaction request in an account entry group, the new transaction request carries "user 1, 30, order number 1". After the database receives the new transaction request, it needs to record in the account corresponding to user 1. A new revenue stream is added in the stream, and the revenue stream corresponds to the order number 1. At the same time, the database will also obtain the total historical resource M corresponding to user 1, and update the historical resource total M with the resource change in the new stream request. , the total amount of the first resource (M+30) is obtained. The new flow feedback corresponding to the new flow request sent by the database will carry the first total amount of resources (M+30) corresponding to the user 1.
在步骤605中,根据每一账户收益信息对应的第一资源总量更新本地缓存中每一账户收益信息对应的第二资源总量。In
在本申请的一些实施例中,服务器中存储有每一账户收益信息的第二资源总量,在步骤604中接收每一账户收益信息对应的第一资源总量后,会根据每一账户收益信息对应的第一资源总量更新本地缓存中每一账户收益信息对应的第二资源总量。In some embodiments of the present application, the server stores the second total amount of resources for each account income information. The first total amount of resources corresponding to the information updates the second total amount of resources corresponding to each account revenue information in the local cache.
以上述举例为基础,若用户1对应的第一资源总量(M+30),在服务器本地缓存中,用户1对应的第二资源总量为M,需要利用该第一资源总量更新该第二资源总量,在更新之后,服务器中用户1对应的第二资源总量为(M+30),与数据库中一致。Based on the above example, if the total amount of first resources corresponding to user 1 is (M+30), in the server's local cache, the total amount of second resources corresponding to user 1 is M, and the total amount of first resources needs to be used to update the The second total amount of resources, after the update, the second total amount of resources corresponding to user 1 in the server is (M+30), which is consistent with that in the database.
在步骤606中,在账户收益信息对应的第一资源总量与第二资源总量不同的情况下,生成账户收益信息对应的资源调整请求;资源调整请求还携带账户收益信息对应的入账单号。In
在本申请的一些实施例中,在步骤605根据每一账户收益信息对应的第一资源总量更新本地缓存中每一账户收益信息对应的第二资源总量的过程中,在一个账户收益信息对应的第一资源总量与第二资源总量相同的情况下,表示该账户收益信息在此次收益周期内的收益为0,该账户收益信息对应的虚拟资源量不需要调整,因此不生成该账户收益对应的资源调整请求。在账户收益信息对应的第一资源总量与第二资源总量不同的情况下,生成账户收益信息对应的资源调整请求。In some embodiments of the present application, in
例如,若入账组包括第一账户收益信息和第二账户收益信息,其中,第一账户收益信息对应的第一资源总量和第二资源总量相同,第二账户收益信息对应的第一资源总量和第二资源总量不相同,在生成该入账组对应的至少一个资源调整请求的过程中,不生成第一账户收益信息对应的资源调整请求,只生成第二账户收益信息对应的资源调整请求。For example, if the account entry group includes the first account income information and the second account income information, the first resource total amount corresponding to the first account income information and the second resource total amount are the same, and the first resource corresponding to the second account income information The total amount is not the same as the total amount of the second resource. In the process of generating at least one resource adjustment request corresponding to the credit group, the resource adjustment request corresponding to the first account income information is not generated, and only the resources corresponding to the second account income information are generated. Adjustment request.
在本申请的一些实施例中,由于每一资源调整请求还携带账户收益记录对应的入账单号,因此,入账接口在接收到资源调整请求之后,还会根据该入账单号判断该资源调整请求是否为合法请求,在该资源调整请求是否为合法请求的情况下,在该入账接口对应的系统中根据资源变化量调整账户标识对应的账户中的虚拟资源。在该资源调整请求为非法请求的情况下,生成告警报告并保存。其中,可以采用以下至少之一的方式判断该资源调整请求是否为合法请求:根据入账单号的生成规则判断该资源调整请求中携带的入账单号是否为合法单号,在该入账单号为合法单号的情况下,对应的资源调整请求为合法请求;记录每一账户标识对应的入账单号,在一个收益周期内接收到的该账户标识对应的第一个资源调整请求为合法请求,并记录该第一个资源调整请求对应的入账单号,在该收益周期内接收到其他携带该入账单号的资源调整请求为非法请求。In some embodiments of the present application, since each resource adjustment request also carries the billing number corresponding to the account revenue record, the billing interface will also judge the resource adjustment request according to the billing number after receiving the resource adjustment request. Whether it is a legal request or not, in the case of whether the resource adjustment request is a legal request, the virtual resource in the account corresponding to the account identifier is adjusted in the system corresponding to the account entry interface according to the resource change amount. In the case that the resource adjustment request is an illegal request, an alarm report is generated and saved. Wherein, at least one of the following methods can be used to judge whether the resource adjustment request is a legal request: according to the generation rule of the billing number, it is judged whether the billing number carried in the resource adjustment request is a legal billing number, and the billing number is In the case of a legal order number, the corresponding resource adjustment request is a legal request; the billing number corresponding to each account identifier is recorded, and the first resource adjustment request corresponding to the account identifier received within a revenue cycle is a legal request. The billing number corresponding to the first resource adjustment request is recorded, and other resource adjustment requests with the billing number received within the revenue period are illegal requests.
通过本申请实施例对于图6的上述示例性实施可知,本申请实施例通过新增流水请求在数据库中更新账户收益信息对应的第一资源总量,并利用新增流水反馈中携带的第一资源总量更新本地缓存中的第二资源总量,可以保证服务器本地缓存中各用户收益信息对应的资源总量与数据库中保持一致,在接收到用户对资源总量的查看请求后,可以省去在数据库查询的步骤,降低数据库运算压力的同时,还可以提升查看请求的反馈效率,提升用户使用体验;并且,由于在第一资源总量和第二资源总量不同的情况下,不生成对应的资源调整请求,不仅可以降低银行接口的运算压力,还可以减少收益入账的耗时,提升收益入账效率。It can be seen from the above exemplary implementation of FIG. 6 in the embodiment of the present application that the embodiment of the present application updates the first total amount of resources corresponding to the account revenue information in the database through the newly added flow request, and uses the first total amount of resources carried in the newly added flow feedback. The total amount of resources updates the second total amount of resources in the local cache, which can ensure that the total amount of resources corresponding to each user's revenue information in the server's local cache is consistent with the database. Going to the step of database query, while reducing the computational pressure of the database, can also improve the feedback efficiency of viewing requests and improve the user experience; and, because the total amount of the first resource and the total amount of the second resource are different, no generation The corresponding resource adjustment request can not only reduce the computing pressure of the bank interface, but also reduce the time-consuming of revenue entry and improve the efficiency of revenue entry.
在本申请的一些实施例中,参见图7,图7是本申请实施例提供的收益入账方法的一个可选的流程示意图,基于上述实施例,以图4为例,在步骤401之前,还包括步骤701至步骤703,在步骤303之前,所述方法还包括步骤704至步骤705,步骤303还可以包括步骤706至步骤707,所述方法还可以包括步骤708。In some embodiments of the present application, referring to FIG. 7 , FIG. 7 is an optional schematic flowchart of the revenue entry method provided by the embodiment of the present application. Based on the above embodiments, taking FIG. 4 as an example, before
在步骤701中,生成入账组中每一账户收益信息对应的入账单号。In
在步骤702中,开启事务,事务包括:发送每一账户收益信息对应的新增流水请求至数据库;新增流水请求用于指示数据库在账户收益信息对应的账户收益记录中新增与入账单号对应的流水记录。In
在步骤703中,在接收到每一账户收益信息对应的新增流水反馈的情况下,提交事务。In
在本申请的一些实施例中,上述步骤701至步骤703与图5中的步骤501至步骤503相同,在此不再赘述。In some embodiments of the present application, the
在步骤704中,接收入账接口发送的每一资源调整请求对应的资源调整反馈;资源调整反馈用于表征资源调整请求对应的调整操作是否成功。In
在本申请的一些实施例中,在发送每一资源调整请求至该入账接口之后,可以接收到该入账接口针对每一资源调整请求生成的资源调整反馈。其中,该资源调整反馈用于表征资源调整请求对应的调整操作是否成功,例如,可以包括资源调整成功和资源调整失败两种资源调整结果。In some embodiments of the present application, after each resource adjustment request is sent to the billing interface, a resource adjustment feedback generated by the billing interface for each resource adjustment request may be received. The resource adjustment feedback is used to represent whether the adjustment operation corresponding to the resource adjustment request is successful, for example, it may include two types of resource adjustment results: resource adjustment success and resource adjustment failure.
在步骤705中,根据每一资源转移反馈,生成入账反馈;入账反馈用于表征入账组中每一账户收益信息对应的入账操作结果。In
在本申请的一些实施例中,在基于图5提供的实施例的情况下,对于该入账组中每一账户收益信息均发送对应的资源调整请求,因此,可以直接根据每一资源调整请求对应的资源调整反馈确定每一账户收益信息对应的入账操作结果。In some embodiments of the present application, based on the embodiment provided in FIG. 5 , a corresponding resource adjustment request is sent for each account income information in the credit group. Therefore, the corresponding resource adjustment request can be directly The resource adjustment feedback of , determines the result of the entry operation corresponding to the income information of each account.
例如,对于一个存在3个账户收益信息的入账组,会生成该入账组中每一账户收益信息对应的资源调整请求,即生成3个资源调整请求,并发送至入账接口,对应地,可以接收入账接口反馈的每一账户收益信息对应的资源调整反馈,即3个账户收益信息对应的资源调整反馈。此时,可以根据接收到的3个资源调整反馈确定3个账户收益信息中每一账户收益信息对应的入账操作结果,即在账户收益信息对应的资源调整结果为资源调整成功的情况下,该账户收益信息对应的入账操作结果为入账成功;在账户收益信息对应的资源调整结果为资源调整失败的情况下,该账户收益信息对应的入账操作结果为入账失败。For example, for a credit group with three account income information, a resource adjustment request corresponding to each account income information in the credit group will be generated, that is, three resource adjustment requests will be generated and sent to the credit interface. Correspondingly, it can receive The resource adjustment feedback corresponding to each account income information fed back by the account entry interface, that is, the resource adjustment feedback corresponding to the three account income information. At this time, the result of the entry operation corresponding to each of the three account income information can be determined according to the received three resource adjustment feedbacks, that is, when the resource adjustment result corresponding to the account income information is that the resource adjustment is successful, the The result of the entry operation corresponding to the account income information is that the entry is successful; if the resource adjustment result corresponding to the account income information is a resource adjustment failure, the result of the entry operation corresponding to the account income information is an entry failure.
在本申请的一些实施例中,在基于图6提供的实施例的情况下,对于该入账组中的至少一个账户收益信息,在该账户收益信息的资源变化量为0的情况下,不生成并发送该账户收益信息对应的资源调整请求,在该账户收益信息的资源变化量不为0的情况下,生成并发送该账户收益信息对应的资源调整请求。因此,生成的资源调整请求的数量可能小于该入账组中账户收益信息的数量,相应地,接收到的资源调整反馈的数量可能小于该入账组中账户收益信息的数量。基于上述情况,服务器将资源调整反馈为资源调整失败的账户收益信息对应的入账操作结果确定为入账失败;将资源调整反馈为资源调整成功和资源变化量为0的账户收益信息对应的入账操作结果确定为入账成功。In some embodiments of the present application, based on the embodiment provided in FIG. 6 , for at least one account income information in the crediting group, when the resource change amount of the account income information is 0, no generation And send the resource adjustment request corresponding to the account income information, and in the case that the resource change amount of the account income information is not 0, generate and send the resource adjustment request corresponding to the account income information. Therefore, the number of generated resource adjustment requests may be smaller than the amount of account income information in the crediting group, and accordingly, the number of received resource adjustment feedbacks may be smaller than the amount of account income information in the crediting group. Based on the above situation, the server determines that the resource adjustment feedback is the result of the entry operation corresponding to the account income information for which the resource adjustment fails as the entry failure; and the server feeds back the resource adjustment as the result of the entry operation corresponding to the account income information for which the resource adjustment is successful and the resource change amount is 0. It is determined that the entry is successful.
例如,若入账组包括第一账户收益信息和第二账户收益信息,其中,第一账户收益信息对应的第一资源总量和第二资源总量相同,第二账户收益信息对应的第一资源总量和第二资源总量不相同,在生成该入账组对应的至少一个资源调整请求的过程中,不生成第一账户收益信息对应的资源调整请求,只生成第二账户收益信息对应的资源调整请求。接收到该第二账户收益信息对应的资源调整反馈后,在该资源调整反馈为资源调整成功的情况下,该第一账户收益信息和第二账户收益信息对应的入账操作结果均为入账成功;在该资源调整反馈为资源调整失败的情况下,该第一账户收益信息对应的入账操作结果为入账成功,该第二账户收益信息对应的入账操作结果为入账失败。For example, if the account entry group includes the first account income information and the second account income information, the first resource total amount corresponding to the first account income information and the second resource total amount are the same, and the first resource corresponding to the second account income information The total amount is not the same as the total amount of the second resource. In the process of generating at least one resource adjustment request corresponding to the credit group, the resource adjustment request corresponding to the first account income information is not generated, and only the resources corresponding to the second account income information are generated. Adjustment request. After receiving the resource adjustment feedback corresponding to the income information of the second account, if the feedback of the resource adjustment is that the resource adjustment is successful, the results of the entry operation corresponding to the income information of the first account and the income information of the second account are both successful entry; In the case where the resource adjustment feedback is that the resource adjustment fails, the result of the entry operation corresponding to the income information of the first account is that the entry is successful, and the result of the entry operation corresponding to the income information of the second account is the entry failure.
在步骤706中,根据入账组中每一账户收益信息对应的入账操作结果,生成入账组的入账记录请求。In
在本申请的一些实施例中,可以通过以下方式实现上述步骤706:获取所述入账组中入账操作结果为入账成功的账户收益信息,得到至少一个待入账收益信息;根据所述至少一个待入账收益信息生成所述入账记录请求;所述入账记录请求用于指示所述数据库更新每一所述待入账收益信息对应的流水记录。需要说明的是,由于本申请实施例中将处于同一数据表中的账户收益记录对应的账户收益记录分为同一个入账组,因此,在本步骤中,针对一个入账组的多个待入账收益信息,可以采用一个入账记录请求同时更新每一所述待入账收益信息对应的流水记录。该入账记录请求为一条数据库操作语句。In some embodiments of the present application, the above-mentioned
在步骤707中,发送入账记录请求至数据库。In
在步骤708中,获取每一入账记录请求对应的入账记录反馈;入账记录反馈包括入账组中的各账户收益信息对应的入账结果;根据每一入账组中的每一账户收益信息对应的入账结果生成批量入账结果。In
在本申请的一些实施例中,在将每一入账组对应的入账记录请求发送至数据库中之后,可以得到数据库针对每一入账记录请求发送的入账记录反馈。其中,数据库在接收到每一入账记录请求之后,可以将入账记录请求中的每一账户收益信息保存在对应的账户收益记录中,其中,具体可以保存在每一账户收益信息对应的入账单号对应的流水记录中。相应地,在保存记录的过程中,数据库会根据各账户收益信息的保存结果,生成对应的入账结果,并通过该批量入账结果统计多个账户收益信息中入账成功的账户收益信息和入账失败的账户收益信息。In some embodiments of the present application, after the account entry record request corresponding to each account entry group is sent to the database, the account entry record feedback sent by the database for each account entry record request can be obtained. Wherein, after receiving each account entry record request, the database can save each account income information in the account entry record request in the corresponding account income record, which can be specifically stored in the entry number corresponding to each account income information in the corresponding flow record. Correspondingly, in the process of saving records, the database will generate the corresponding entry results according to the results of saving the income information of each account, and use the batch entry results to count the income information of the accounts that have been successfully entered and the incomes that have failed to enter the account through the batch entry results. Account earnings information.
例如,若存在20个账户收益信息,在进行分组后,可以得到包括第1到10个账户收益信息的第一入账组,和第11到20个账户收益信息的第二入账组,在将第一入账组对应的第一入账记录请求和第二入账组对应的第一入账记录请求发送至数据库后,可以得到第一入账组对应的第一入账记录反馈,和第二入账组对应的第二入账记录反馈,其中,第一入账记录反馈包括第1账户收益信息入账失败,第2至第10账户收益信息入账成功;第二入账记录反馈包括第20账户收益信息入账失败,第11至第19账户收益信息入账成功,此时,可以对各账户收益信息对应的入账结果进行统计,并生成批量入账结果,该批量入账结果包括:第2至第19账户收益信息入账成功,第1和第20账户收益信息入账失败。For example, if there are 20 account income information, after grouping, the first entry group including the 1st to 10th account income information, and the second entry group containing the 11th to 20th account income information can be obtained. After the first entry record request corresponding to an entry group and the first entry record request corresponding to the second entry group are sent to the database, the feedback of the first entry record corresponding to the first entry group and the second entry record corresponding to the second entry group can be obtained. Feedback on account entry records, wherein the first entry record feedback includes the failure to enter the first account income information into the account, and the second to tenth account income information is successfully entered into the account; the second account entry record feedback includes the 20th account income information failed to enter into the account, and the 11th to 19th The account income information has been successfully entered into the account. At this time, the accounting results corresponding to the income information of each account can be counted, and batch entry results can be generated. The batch entry results include: the 2nd to 19th account income information has been successfully entered into the account, and the first and 20th account income information has been successfully entered into the account. Failed to enter account income information.
在本申请的一些实施例中,可以将该批量入账结果发送至管理员对应的终端设备中,以提醒管理员对入账失败的账户收益信息进行处理。In some embodiments of the present application, the batch crediting result may be sent to the terminal device corresponding to the administrator, so as to remind the administrator to process the account income information that fails to be credited.
通过本申请实施例对于图7的上述示例性实施可知,本申请实施例通过在对多个用户收益信息进行收益入账的过程中,可以采用一个入账记录请求对入账组中至少一个用户收益信息进行同时更新,可以降低收益入账过程中的整体耗时,提升整体收益入账的入账效率;并且,由于根据各入账组的入账记录反馈生成批量入账结果,可以直观的显示各账户收益信息的入账情况,提升了管理员使用体验。It can be seen from the above-mentioned exemplary implementation of FIG. 7 in the embodiment of the present application that, in the process of entering the income of multiple users’ income information in the embodiment of the present application, an account entry record request can be used to perform an account entry record request on at least one user’s income information in the account group. Simultaneous updating can reduce the overall time-consuming process of revenue entry and improve the entry efficiency of the overall revenue entry; in addition, since the batch entry results are generated based on the entry record feedback of each entry group, the entry status of the income information of each account can be visually displayed. The administrator experience has been improved.
下面,将说明本申请实施例在一个实际的应用场景中的示例性应用。Below, an exemplary application of the embodiments of the present application in a practical application scenario will be described.
货币基金是每日收益结转成份额,随着互联网金融的发展,出现了各种各样的金融基金平台,大部分金融基金平台均为互联网平台。越来越多的用户持有基金,而且互联网平台的很多用户,对用户的收益入账面临着处理数据量大,处理时间紧张的问题。服务于上亿用户,提升城市级别容灾故障能力是技术的发展趋势。Monetary funds are carried over from daily earnings into shares. With the development of Internet finance, various financial fund platforms have emerged, most of which are Internet platforms. More and more users hold funds, and many users of Internet platforms face the problem of large amount of processing data and tight processing time when they account for users' income. Serving hundreds of millions of users and improving city-level disaster tolerance and fault tolerance are the development trends of technology.
由于基金公司提供收益文件的时间比较晚,要保证用户在早上7点前看到收益,随着用户量的增加,为了提升城市级别容灾能力就要对收益数据进行跨城双写。数据存储层使用MGR组复制技术。这种方案对入账性能影响较大,单笔入账往往需要至少4个修改语句,每个修改语句,耗时增加30ms。单笔耗时至少增加120ms。入账整体时间会从之前的5小时变为8小时,不满足我们7点前完成收益入账的目标。Since the fund company provides the income file relatively late, it is necessary to ensure that users can see the income before 7:00 in the morning. As the number of users increases, in order to improve the city-level disaster recovery capability, it is necessary to double-write the income data across cities. The data storage layer uses MGR group replication technology. This solution has a great impact on the entry performance. A single entry often requires at least 4 modification statements, and each modification statement takes an additional 30ms. The time-consuming of a single transaction increases by at least 120ms. The overall entry time will change from the previous 5 hours to 8 hours, which does not meet our goal of completing revenue entry before 7 o'clock.
在本申请的一些实施例中,参见图8,图8是本申请实施例提供的收益入账方法的一个可选的流程示意图。In some embodiments of the present application, referring to FIG. 8 , FIG. 8 is an optional schematic flowchart of the revenue entry method provided by the embodiments of the present application.
在步骤801中,入账批跑发起收益批量入账请求,并发送至服务器。In step 801, the account-entry batcher initiates a batch-account entry request for revenue, and sends it to the server.
在步骤802中,服务器对数据库中的收益记录进行加锁。In step 802, the server locks the revenue record in the database.
在步骤803中,数据库开启事务,生成入账单号,并将入账单号记录至数据库中的用户收益记录中。In step 803, the database starts the transaction, generates an invoicing number, and records the invoicing number in the user income record in the database.
在步骤804中,数据库通过入账单号判断是否重复请求,在重复请求的情况下,重入返回。In step 804, the database judges whether the request is repeated according to the billing number, and in the case of the repeated request, re-entry returns.
在步骤805中,数据库更新收益总表。In step 805, the database updates the revenue summary table.
在步骤806中,数据库对用户收益记录进行解锁,并提交该事务。In step 806, the database unlocks the user revenue record and commits the transaction.
在步骤807中,数据库更新服务器中本地缓存的总收益。In step 807, the database updates the total revenue cached locally in the server.
在步骤808中,服务器调用银行接口给用户增加收益。In step 808, the server invokes the bank interface to increase profits for the user.
在步骤809中,服务器接收银行接口反馈的操作结果。In step 809, the server receives the operation result fed back by the bank interface.
在步骤810中,服务器在数据库中的用户收益记录进行更新。In step 810, the server updates the user income record in the database.
在步骤811中,数据库发送更新结果至服务器。In step 811, the database sends the update result to the server.
在步骤812中,服务器返回收益入账执行结果至入账批跑。In step 812, the server returns the execution result of revenue entry to the entry batch.
其中,步骤802、803、806和810需要对数据库进行操作,即向该数据库发送携带操作语句的操作请求。为了提升收益信息的容灾能力,本申请中的数据库使用了MGR组复制技术,将数据库的备份存储于不同城市中,因此,上述步骤802、803、806和810需要跨城操作,由于单笔跨城操作会在原有耗时上增加30ms,对于一个用户收益信息的收益入账过程会增加120ms,严重影响了入账效率。其中,跨城操作是指,比如深圳机器给上海的数据库机器发送携带操作语句的操作请求,这个过程就会网络跨城访问。网络传输距离比较远,耗时也会比较大。Wherein, steps 802, 803, 806 and 810 need to operate the database, that is, send an operation request carrying an operation statement to the database. In order to improve the disaster recovery capability of revenue information, the database in this application uses the MGR group replication technology to store the backup of the database in different cities. Therefore, the above steps 802, 803, 806 and 810 require cross-city operations. Cross-city operation will increase the original time consumption by 30ms, and the revenue entry process of a user's income information will increase by 120ms, which seriously affects the efficiency of entry. Among them, the cross-city operation refers to, for example, that a machine in Shenzhen sends an operation request carrying an operation statement to a database machine in Shanghai, and this process will be accessed across the network. The network transmission distance is relatively long, and the time-consuming will be relatively large.
经过申请人的研究,发现相关技术中单笔用户收益信息的收益入账过程耗时较大,因此提出了如图9提供的收益入账方法。通过将相同用户标识尾号的用户合并入账,减少了跨城次数,让单笔入账平均耗时得到大幅下降,提升了处理性能。After the applicant's research, it is found that the revenue entry process of a single user's revenue information in the related art is time-consuming, so a revenue entry method as shown in Figure 9 is proposed. By merging users with the same user ID tail number into the account, the number of cross-city transactions is reduced, the average time-consuming of a single account entry is greatly reduced, and the processing performance is improved.
在步骤901中,入账批跑对需要入账的用户按照用户标识进行排序分组。In step 901, the account entry batcher sorts and groups the users who need to enter the account according to their user IDs.
在本申请的一些实施例中,收益批跑对需要入账的用户按照用户标识(uid)尾号进行排序分组。相同尾号的用户每N个用户一组。图中,收益批跑为一个服务模块用于解析收益文件,可以得到用户账号,当天收益金额,用户最新总资产信息。In some embodiments of the present application, the revenue batch run sorts and groups the users who need to be credited according to the tail number of the user identifier (uid). Users with the same tail number are grouped for every N users. In the figure, the income batch run is a service module used to parse the income file, and can get the user account, the income amount of the day, and the latest total asset information of the user.
在步骤902中,入账批跑发起用户组的入账请求,并发送至服务器。该用户组相当于上述实施例中的入账组。In step 902, the account entry batcher initiates an account entry request of the user group and sends it to the server. The user group is equivalent to the account entry group in the above embodiment.
在本申请的一些实施例中,入账批跑把N个相同尾号的一组用户打包发送请求给服务器;因为数据存储层(数据库)是按照用户尾号分库分表的,也就是说只有相同尾号的用户数据存储在一个数据表中。同一个表里的数据才可以把多个语句操作合并为一个操作。In some embodiments of the present application, the account entry batch runs a group of N users with the same tail number and sends a request to the server; because the data storage layer (database) is divided into databases and tables according to the user's tail number, that is to say, only User data with the same end number is stored in a data table. Only the data in the same table can combine multiple statement operations into one operation.
在步骤903中,服务器对数据库中用户组内的N个用户的收益记录进行加锁。In step 903, the server locks the income records of N users in the user group in the database.
在本申请的一些实施例中,该步骤需要N次跨城操作。In some embodiments of the present application, this step requires N cross-city operations.
在步骤904中,在数据库中更新用户1的流水号(相当于上述实施例中的入账单号)。In step 904, the serial number of user 1 (equivalent to the billing number in the above embodiment) is updated in the database.
在步骤905中,在服务器中更新用户1的总收益(相当于上述实施例中的资源总量)。In step 905, the total revenue of user 1 (equivalent to the total amount of resources in the above embodiment) is updated in the server.
在步骤906中,服务器调用银行接口给用户1增加收益。In step 906, the server invokes the bank interface to increase the profit for User 1.
在步骤907中,服务器接收银行接口反馈的操作结果。In step 907, the server receives the operation result fed back by the bank interface.
需要说明的是,在步骤907至步骤908之间,服务器可以按照与上述步骤904至步骤907相同的处理方式,依次对用户2至用户N-1进行处理。It should be noted that, between steps 907 to 908, the server may sequentially process the user 2 to the user N-1 in the same processing manner as the above-mentioned steps 904 to 907.
在步骤908中,在数据库中更新用户N的更新流水号。In step 908, the update serial number of user N is updated in the database.
在步骤909中,在服务器中更新用户N的总收益。In step 909, the total revenue of user N is updated in the server.
在本申请的一些实施例中,该步骤对用户组内的N个用户的收益记录进行解锁只需要1次跨城操作。In some embodiments of the present application, in this step, only one cross-city operation is required to unlock the income records of N users in the user group.
在步骤910中,服务器调用银行接口给用户N增加收益。In step 910, the server invokes the bank interface to increase income for user N.
在步骤911中,服务器接收银行接口反馈的操作结果。In step 911, the server receives the operation result fed back by the bank interface.
在步骤912中,服务器指示数据库对用户组内的N个用户的收益记录进行批量更新。In step 912, the server instructs the database to batch update the income records of the N users in the user group.
在本申请的一些实施例中,该步骤对于N个用户的收益记录进行批量更新只需要1次跨城操作。In some embodiments of the present application, in this step, only one cross-city operation is required to batch update the income records of N users.
在步骤913中,数据库发送更新结果至服务器。In step 913, the database sends the update result to the server.
在步骤914中,服务器返回N个用户中每个账户的收益入账执行结果至入账批跑。In step 914, the server returns the execution result of revenue crediting of each account of the N users to the crediting batch run.
通过上述实施例提供的方法,在N为5的情况下,单次请求处理5个用户的入账,共5+5+1+1=12次跨城操作,增加耗时12*30ms=360ms,平均一个用户入账耗时增加360ms/5=72ms。比相关方案中的单笔耗时120ms减少了40%。Through the method provided by the above embodiment, in the case where N is 5, a single request to process the accounts of 5 users, a total of 5+5+1+1=12 cross-city operations, increases the time consumption by 12*30ms=360ms, On average, it takes 360ms/5=72ms for a user to enter the account. It is 40% less than the 120ms time taken by a single transaction in the related scheme.
下面继续说明本申请实施例提供的收益入账装置555的实施为软件模块的示例性结构,在本申请的一些实施例中,如图2所示,存储在存储器550的收益入账装置555中的软件模块可以包括:The following continues to describe the exemplary structure of the revenue credit device 555 provided by the embodiments of the present application implemented as software modules. In some embodiments of the present application, as shown in FIG. 2 , the software stored in the revenue credit device 555 of the memory 550 Modules can include:
分组模块5551,用于对多个账户收益信息进行分组,得到至少一个入账组;每一入账组中的各账户收益信息对应的账户收益记录处于数据库的同一数据表。The grouping module 5551 is used for grouping multiple account income information to obtain at least one entry group; the account income record corresponding to each account income information in each entry group is located in the same data table of the database.
调整模块5552,用于调用入账接口对每一入账组进行入账操作;入账操作用于调整入账组中的各账户收益信息对应的账户资源。The adjustment module 5552 is used to call the account entry interface to perform an entry operation for each entry group; the entry operation is used to adjust the account resources corresponding to the income information of each account in the entry group.
入账模块5553,用于响应于每一入账组的入账反馈,发送每一入账组的入账记录请求至数据库;入账记录请求用于指示数据库更新入账组中的各账户收益信息对应的账户收益记录。The account entry module 5553 is used to send the entry record request of each entry group to the database in response to the entry feedback of each entry group; the entry record request is used to instruct the database to update the account income record corresponding to the income information of each account in the entry group.
在本申请的一些实施例中,调整模块5552,还用于根据入账组中的各账户收益信息,生成至少一个资源调整请求;资源调整请求携带账户收益信息对应的账户标识和资源变化量;发送每一资源调整请求至入账接口;资源调整请求用于指示入账接口根据资源变化量调整账户标识对应的账户中的虚拟资源。In some embodiments of the present application, the adjustment module 5552 is further configured to generate at least one resource adjustment request according to the income information of each account in the account group; the resource adjustment request carries the account identifier and the resource change corresponding to the account income information; sending Each resource adjustment request is sent to the credit interface; the resource adjustment request is used to instruct the credit interface to adjust the virtual resources in the account corresponding to the account identifier according to the resource change amount.
在本申请的一些实施例中,调整模块5552,还用于生成入账组中每一账户收益信息对应的入账单号;开启事务,事务包括:发送每一账户收益信息对应的新增流水请求至数据库;新增流水请求用于指示数据库在账户收益信息对应的账户收益记录中新增与入账单号对应的流水记录;在接收到每一账户收益信息对应的新增流水反馈的情况下,提交事务。In some embodiments of this application, the adjustment module 5552 is further configured to generate a billing number corresponding to the income information of each account in the billing group; to open a transaction, the transaction includes: sending a new flow request corresponding to the income information of each account to Database; the new flow request is used to instruct the database to add a flow record corresponding to the billing number in the account income record corresponding to the account income information; in the case of receiving the new flow feedback corresponding to each account income information, submit affairs.
在本申请的一些实施例中,调整模块5552,还用于响应于提交事务,根据入账组中的各账户收益信息,生成每一账户收益信息对应的资源调整请求;资源调整请求还携带账户收益信息对应的入账单号。In some embodiments of the present application, the adjustment module 5552 is further configured to, in response to submitting a transaction, generate a resource adjustment request corresponding to the income information of each account according to the income information of each account in the account group; the resource adjustment request also carries the income of the account The billing number corresponding to the information.
在本申请的一些实施例中,调整模块5552,还用于在根据入账组中的各账户收益信息,生成至少一个资源调整请求之前,根据数据库发送的每一账户收益信息对应的新增流水反馈,获取每一账户收益信息对应的第一资源总量;根据每一账户收益信息对应的第一资源总量更新本地缓存中每一账户收益信息对应的第二资源总量。调整模块5552,还用于在账户收益信息对应的第一资源总量与第二资源总量不同的情况下,生成账户收益信息对应的资源调整请求;资源调整请求还携带账户收益信息对应的入账单号。In some embodiments of the present application, the adjustment module 5552 is further configured to, before generating at least one resource adjustment request according to the income information of each account in the account group, feedback the newly added flow according to the income information of each account sent by the database , obtain the first total amount of resources corresponding to the income information of each account; update the total amount of resources corresponding to each account income information in the local cache according to the first total amount of resources corresponding to the income information of each account. The adjustment module 5552 is further configured to generate a resource adjustment request corresponding to the account income information when the first total amount of resources corresponding to the account income information is different from the second total amount of resources; the resource adjustment request also carries the entry corresponding to the account income information single number.
在本申请的一些实施例中,调整模块5552,还用于在发送每一账户收益信息对应的新增流水请求至数据库之前,对每一账户收益信息对应的账户收益信息进行加锁;在提交事务之前,对每一账户收益信息对应的账户收益信息进行解锁。In some embodiments of the present application, the adjustment module 5552 is further configured to lock the account income information corresponding to each account income information before sending the new flow request corresponding to each account income information to the database; Before the transaction, unlock the account income information corresponding to each account income information.
在本申请的一些实施例中,入账模块5553,还用于接收入账接口发送的每一资源调整请求对应的资源调整反馈;资源调整反馈用于表征资源调整请求对应的调整操作是否成功;根据每一资源转移反馈,生成入账反馈;入账反馈用于表征入账组中每一账户收益信息对应的入账操作结果。In some embodiments of this application, the account entry module 5553 is further configured to receive resource adjustment feedback corresponding to each resource adjustment request sent by the account entry interface; the resource adjustment feedback is used to indicate whether the adjustment operation corresponding to the resource adjustment request is successful; 1. Resource transfer feedback to generate credit feedback; the credit feedback is used to represent the credit operation result corresponding to the income information of each account in the credit group.
在本申请的一些实施例中,入账模块5553,还用于根据入账组中每一账户收益信息对应的入账操作结果,生成入账组的入账记录请求;发送入账记录请求至数据库。所述根据入账组中每一账户收益信息对应的入账操作结果,生成入账组的入账记录请求,包括:获取入账组中入账操作结果为入账成功的账户收益信息,得到至少一个待入账收益信息;根据至少一个待入账收益信息生成入账记录请求;入账记录请求用于指示数据库更新每一待入账收益信息对应的流水记录。In some embodiments of the present application, the account entry module 5553 is further configured to generate an account entry record request of the account entry group according to the entry operation result corresponding to the income information of each account in the account entry group; and send the entry record request to the database. The generating an account entry record request of the account entry group according to the entry operation result corresponding to the income information of each account in the entry group, includes: obtaining the account income information in the entry group whose entry operation result is successful entry into the account, and obtaining at least one income information to be entered into the account; An account entry record request is generated according to at least one piece of income information to be entered into the account; the entry record request is used to instruct the database to update the flow record corresponding to each income information to be entered into the account.
在本申请的一些实施例中,入账模块5553,还用于获取每一入账记录请求对应的入账记录反馈;入账记录反馈包括入账组中的各账户收益信息对应的入账结果;根据每一入账组中的每一账户收益信息对应的入账结果生成批量入账结果。In some embodiments of the present application, the account entry module 5553 is further configured to obtain the entry record feedback corresponding to each entry record request; the entry record feedback includes the entry result corresponding to the income information of each account in the entry group; according to each entry group The account entry results corresponding to each account income information in the system generate batch entry results.
本申请实施例提供了一种计算机程序产品或计算机程序,该计算机程序产品或计算机程序包括计算机指令,该计算机指令存储在计算机可读存储介质中。计算机设备的处理器从计算机可读存储介质读取该计算机指令,处理器执行该计算机指令,使得该计算机设备执行本申请实施例上述的收益入账方法。Embodiments of the present application provide a computer program product or computer program, where the computer program product or computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. The processor of the computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the revenue crediting method described above in the embodiment of the present application.
本申请实施例提供一种存储有可执行指令的计算机可读存储介质,其中存储有可执行指令,当可执行指令被处理器执行时,将引起处理器执行本申请实施例提供的收益入账方法,例如,如图3至图9示出的方法。The embodiments of the present application provide a computer-readable storage medium storing executable instructions, wherein the executable instructions are stored, and when the executable instructions are executed by a processor, the processor will cause the processor to execute the revenue crediting method provided by the embodiments of the present application. , for example, the methods shown in FIGS. 3 to 9 .
在本申请的一些实施例中,计算机可读存储介质可以是FRAM、ROM、PROM、EPROM、EEPROM、闪存、磁表面存储器、光盘、或CD-ROM等存储器;也可以是包括上述存储器之一或任意组合的各种设备。In some embodiments of the present application, the computer-readable storage medium may be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, flash memory, magnetic surface memory, optical disk, or CD-ROM; Various devices in any combination.
在本申请的一些实施例中,可执行指令可以采用程序、软件、软件模块、脚本或代码的形式,按任意形式的编程语言(包括编译或解释语言,或者声明性或过程性语言)来编写,并且其可按任意形式部署,包括被部署为独立的程序或者被部署为模块、组件、子例程或者适合在计算环境中使用的其它单元。In some embodiments of the present application, executable instructions may take the form of programs, software, software modules, scripts, or code, written in any form of programming language, including compiled or interpreted languages, or declarative or procedural languages , and it may be deployed in any form, including as a stand-alone program or as a module, component, subroutine, or other unit suitable for use in a computing environment.
作为示例,可执行指令可以但不一定对应于文件系统中的文件,可以可被存储在保存其它程序或数据的文件的一部分,例如,存储在超文本标记语言(HTML,Hyper TextMarkup Language)文档中的一个或多个脚本中,存储在专用于所讨论的程序的单个文件中,或者,存储在多个协同文件(例如,存储一个或多个模块、子程序或代码部分的文件)中。As an example, executable instructions may, but do not necessarily correspond to files in a file system, may be stored as part of a file that holds other programs or data, for example, in a Hyper Text Markup Language (HTML) document One or more scripts of a , stored in a single file dedicated to the program in question, or in multiple cooperating files (eg, files that store one or more modules, subroutines, or code sections).
作为示例,可执行指令可被部署为在一个计算设备上执行,或者在位于一个地点的多个计算设备上执行,又或者,在分布在多个地点且通过通信网络互连的多个计算设备上执行。As an example, executable instructions may be deployed to be executed on one computing device, or on multiple computing devices located at one site, or alternatively, distributed across multiple sites and interconnected by a communication network execute on.
综上所述,通过本申请实施例能够实现以下技术效果:To sum up, the following technical effects can be achieved through the embodiments of the present application:
(1)本申请实施例可以按照预设的分组规则对多个用户收益信息进行分组,得到至少一个入账组,在对多个用户收益信息进行收益入账的过程中,可以采用一个入账记录请求对入账组中至少一个用户收益信息进行同时更新,相对于传统技术中针对每一用户收益信息进行单独更新的方案,本申请由于将对应同一个数据表的多个用户收益信息划分为同一入账组,并基于入账组进行收益入账操作,可以降低收益入账过程中的整体耗时,提升整体收益入账的入账效率。(1) In this embodiment of the present application, a plurality of user income information can be grouped according to a preset grouping rule to obtain at least one entry group. At least one user's income information in the account group is updated at the same time. Compared with the scheme of separately updating the income information of each user in the traditional technology, the present application divides multiple user income information corresponding to the same data table into the same account group. The revenue entry operation based on the entry group can reduce the overall time-consuming process of revenue entry and improve the entry efficiency of the overall income entry.
(2)本申请实施例通过调用入账接口对各账户收益信息对应的账户进行虚拟资源的调整,可以加快收益入账的速度,降低收益入账耗时。(2) In the embodiment of the present application, by calling the account entry interface to adjust the virtual resources of the accounts corresponding to the income information of each account, the speed of income entry can be accelerated and the time-consuming of income entry can be reduced.
(3)本申请实施例通过对每一账户收益信息生成对应的入账单号,可以避免在账户收益记录中重复新增收益流水的情况,也可以避免在调用入账接口过程中重复调整账户收益信息对应账户的虚拟资源的情况,提升了收益入账过程中的安全性。并且,本申请实施例通过事务的方式,将同一入账组中多个账户收益信息的入账单号的记录操作绑定在一起,可以保证各账户收益信息对应的入账单号可以全部完成记录,防止因遗漏一条入账单号而导致的入账错误问题。并且,本申请实施例在新增收益流水至用户收益记录的过程中采用加锁的方式,可以使得对应的用户收益记录不会被其他进程或服务更改,避免重复操作,保证数据的一致性。(3) In the embodiment of the present application, by generating a corresponding billing number for each account income information, it is possible to avoid the situation of repeatedly adding new income flow in the account income record, and also avoid repeatedly adjusting the account income information in the process of calling the account income interface. The situation of the virtual resources of the corresponding account improves the security in the process of revenue entry. In addition, in the embodiment of the present application, the recording operations of the billing numbers of the income information of multiple accounts in the same billing group are bound together by means of transactions, which can ensure that the billing numbers corresponding to the income information of each account can be completely recorded, preventing Entry errors caused by missing a billing number. In addition, the embodiment of the present application adopts a locking method in the process of adding a revenue stream to a user revenue record, so that the corresponding user revenue record will not be changed by other processes or services, avoiding repeated operations and ensuring data consistency.
(4)本申请实施例通过新增流水请求在数据库中更新账户收益信息对应的第一资源总量,并利用新增流水反馈中携带的第一资源总量更新本地缓存中的第二资源总量,可以保证服务器本地缓存中各用户收益信息对应的资源总量与数据库中保持一致,在接收到用户对资源总量的查看请求后,可以省去在数据库查询的步骤,降低数据库运算压力的同时,还可以提升查看请求的反馈效率,提升用户使用体验;并且,由于在第一资源总量和第二资源总量不同的情况下,不生成对应的资源调整请求,不仅可以降低银行接口的运算压力,还可以减少收益入账的耗时,提升收益入账效率。(4) In this embodiment of the present application, the first total amount of resources corresponding to the account revenue information is updated in the database by adding a new flow request, and the second total amount of resources in the local cache is updated by using the first total amount of resources carried in the newly added flow feedback. It can ensure that the total amount of resources corresponding to each user's revenue information in the server's local cache is consistent with that in the database. After receiving the user's request for viewing the total amount of resources, the step of querying the database can be omitted and the computational pressure of the database can be reduced. At the same time, the feedback efficiency of viewing requests can also be improved, and the user experience can be improved; and, in the case where the total amount of the first resource and the total amount of the second resource are different, the corresponding resource adjustment request is not generated, which can not only reduce the cost of the bank interface The computing pressure can also reduce the time-consuming of revenue entry and improve the efficiency of revenue entry.
以上所述,仅为本申请的实施例而已,并非用于限定本申请的保护范围。凡在本申请的精神和范围之内所作的任何修改、等同替换和改进等,均包含在本申请的保护范围之内。The above descriptions are merely examples of the present application, and are not intended to limit the protection scope of the present application. Any modifications, equivalent replacements and improvements made within the spirit and scope of this application are included within the protection scope of this application.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011077412.7A CN114331704A (en) | 2020-10-10 | 2020-10-10 | Income posting method, device and equipment and computer readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011077412.7A CN114331704A (en) | 2020-10-10 | 2020-10-10 | Income posting method, device and equipment and computer readable storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114331704A true CN114331704A (en) | 2022-04-12 |
Family
ID=81032533
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011077412.7A Pending CN114331704A (en) | 2020-10-10 | 2020-10-10 | Income posting method, device and equipment and computer readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114331704A (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108647950A (en) * | 2018-05-18 | 2018-10-12 | 阿里巴巴集团控股有限公司 | A kind of transfer request processing method, device and equipment |
CN110020846A (en) * | 2019-03-18 | 2019-07-16 | 阿里巴巴集团控股有限公司 | A kind of transferred account service processing method and system |
CN110134701A (en) * | 2019-04-30 | 2019-08-16 | 阿里巴巴集团控股有限公司 | A kind of buffering benefit account method and device |
CN110175919A (en) * | 2019-05-29 | 2019-08-27 | 深圳前海微众银行股份有限公司 | Transaction data processing method, device, equipment and computer readable storage medium |
-
2020
- 2020-10-10 CN CN202011077412.7A patent/CN114331704A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108647950A (en) * | 2018-05-18 | 2018-10-12 | 阿里巴巴集团控股有限公司 | A kind of transfer request processing method, device and equipment |
CN110020846A (en) * | 2019-03-18 | 2019-07-16 | 阿里巴巴集团控股有限公司 | A kind of transferred account service processing method and system |
CN110134701A (en) * | 2019-04-30 | 2019-08-16 | 阿里巴巴集团控股有限公司 | A kind of buffering benefit account method and device |
CN110175919A (en) * | 2019-05-29 | 2019-08-27 | 深圳前海微众银行股份有限公司 | Transaction data processing method, device, equipment and computer readable storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110990182B (en) | Transaction processing method, device, equipment and storage medium | |
US8788928B2 (en) | System and methodology for development of stream processing applications utilizing spreadsheet interface | |
US20140095267A1 (en) | Executing a business process in a framework | |
CN112883337B (en) | Transaction data calculation method, device, electronic device and storage medium | |
US8463755B2 (en) | System and method for providing collaborative master data processes | |
CN112099934A (en) | Batch processing method, system, computer equipment and storage medium | |
US11379191B2 (en) | Presentation oriented rules-based technical architecture display framework | |
CN115545929B (en) | Funds management method, apparatus, electronic device and storage medium | |
CN114331704A (en) | Income posting method, device and equipment and computer readable storage medium | |
US12423290B2 (en) | Generating account configurations using configuration bundles | |
CN117541172A (en) | Hot account concurrent processing method, device and equipment based on sub-account splitting | |
US11567961B2 (en) | Using flat data input for simultaneous application of multiple separate calculations rule sets to obtain multiple output results | |
US20140082627A1 (en) | Parallel compute framework | |
US8209302B2 (en) | Systems and methods for processing data objects | |
CN115578170A (en) | Method, device, equipment and storage medium for financial batch production certificates | |
CN115080606A (en) | Service data query method, device, equipment and medium | |
CN114707961A (en) | Method, apparatus, device, medium and program product for executing tasks to be approved based on approval flow configuration | |
HK40070335A (en) | Revenue posting method, device, equipment and computer readable storage medium | |
US9342541B1 (en) | Presentation oriented rules-based technical architecture display framework (PORTRAY) | |
CN115170260A (en) | Financial certification making method and device, storage medium and computer equipment | |
CN113254114B (en) | Operation method, device, device and storage medium of blockchain system | |
Song et al. | Design and Implementation of Bank Smart Counter System Based on SSM Framework | |
CN113971007B (en) | Information processing method, device, electronic equipment and medium | |
US20220107951A1 (en) | Computing architecture for existing asset system integration | |
US11966887B1 (en) | Bridging network transaction platforms to unify cross-platform transfers |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
REG | Reference to a national code |
Ref country code: HK Ref legal event code: DE Ref document number: 40070335 Country of ref document: HK |