CN114997870A - Data processing method, data processing device, computer equipment and storage medium - Google Patents
Data processing method, data processing device, computer equipment and storage medium Download PDFInfo
- Publication number
- CN114997870A CN114997870A CN202110228940.6A CN202110228940A CN114997870A CN 114997870 A CN114997870 A CN 114997870A CN 202110228940 A CN202110228940 A CN 202110228940A CN 114997870 A CN114997870 A CN 114997870A
- Authority
- CN
- China
- Prior art keywords
- transaction
- profit
- loss
- transaction data
- settled
- 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
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q20/00—Payment architectures, schemes or protocols
- G06Q20/38—Payment protocols; Details thereof
- G06Q20/40—Authorisation, e.g. identification of payer or payee, verification of customer or shop credentials; Review and approval of payers, e.g. check credit lines or negative lists
- G06Q20/401—Transaction verification
- G06Q20/4016—Transaction verification involving fraud or risk level assessment in transaction processing
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q40/00—Finance; Insurance; Tax strategies; Processing of corporate or income taxes
- G06Q40/04—Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
Landscapes
- Business, Economics & Management (AREA)
- Accounting & Taxation (AREA)
- Engineering & Computer Science (AREA)
- Finance (AREA)
- Physics & Mathematics (AREA)
- Strategic Management (AREA)
- General Business, Economics & Management (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Economics (AREA)
- Marketing (AREA)
- Technology Law (AREA)
- Development Economics (AREA)
- Computer Security & Cryptography (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
Description
技术领域technical field
本申请涉及计算机技术领域,尤其涉及一种数据处理方法、装置、计算机设备以及存储介质。The present application relates to the field of computer technology, and in particular, to a data processing method, apparatus, computer device, and storage medium.
背景技术Background technique
当参与主体支持多种资源数据类型的资源数据的交易时,参与主体需要监控所有交易的总体损益。目前,是由人工计算所有交易的损益情况,一旦发现损益异常,人工生成告警,以通知相应的处置人员对异常情况进行处理。When a participant supports the transaction of resource data of multiple resource data types, the participant needs to monitor the overall profit and loss of all transactions. At present, the profit and loss of all transactions are calculated manually. Once abnormal profit and loss is found, an alarm is manually generated to notify the corresponding disposal personnel to deal with the abnormal situation.
对交易的自动化监控程度低下会导致误告警的情况,且仅仅对参与主体的总体损益进行监控导致监控粒度较粗。因此,如何避免误告警以及精细化监控交易数据是当前研究热点。The low degree of automated monitoring of transactions will lead to false alarms, and only monitoring the overall profit and loss of participating entities results in coarse monitoring granularity. Therefore, how to avoid false alarms and finely monitor transaction data is a current research hotspot.
发明内容SUMMARY OF THE INVENTION
本申请实施例提供一种数据处理方法、装置、计算机设备以及存储介质,可以避免误告警以及精细化监控交易数据。The embodiments of the present application provide a data processing method, apparatus, computer equipment, and storage medium, which can avoid false alarms and finely monitor transaction data.
本申请实施例一方面提供了一种数据处理方法,包括:On the one hand, the embodiments of the present application provide a data processing method, including:
获取已结算交易数据集合,所述已结算交易数据集合包括N个已结算交易数据,每个已结算交易数据均包括交易信息和资源数据类型,所述已结算交易数据集合对应K个资源数据类型,N,K均是正整数;Acquire a set of settled transaction data, the settled transaction data set includes N settled transaction data, each settled transaction data includes transaction information and resource data types, and the settled transaction data set corresponds to K resource data types , N, K are all positive integers;
对所述已结算交易数据集合中的交易信息进行损益统计处理,得到每种资源数据类型的损益;Performing profit and loss statistical processing on the transaction information in the settled transaction data set to obtain the profit and loss of each resource data type;
当K个资源数据类型中存在M个资源数据类型的损益小于损益阈值时,获取M个资源数据类型的损益原因,并根据M个资源数据类型的损益原因生成损益告警信息,M是正整数;When the profit and loss of M resource data types in the K resource data types is less than the profit and loss threshold, obtain the profit and loss reasons of the M resource data types, and generate profit and loss alarm information according to the profit and loss reasons of the M resource data types, where M is a positive integer;
输出所述损益告警信息。The profit and loss warning information is output.
本申请实施例一方面提供了一种数据处理装置,包括:On the one hand, the embodiments of the present application provide a data processing apparatus, including:
获取模块,用于获取已结算交易数据集合,所述已结算交易数据集合包括N 个已结算交易数据,每个已结算交易数据均包括交易信息和资源数据类型,所述已结算交易数据集合对应K个资源数据类型,N,K均是正整数;The acquisition module is used to acquire a set of settled transaction data, the set of settled transaction data includes N pieces of settled transaction data, each of the settled transaction data includes transaction information and resource data types, and the set of settled transaction data corresponds to K resource data types, N, K are positive integers;
统计模块,用于对所述已结算交易数据集合中的交易信息进行损益统计处理,得到每种资源数据类型的损益;A statistics module, configured to perform profit and loss statistical processing on the transaction information in the settled transaction data set to obtain the profit and loss of each resource data type;
生成模块,用于当K个资源数据类型中存在M个资源数据类型的损益小于损益阈值时,获取M个资源数据类型的损益原因,并根据M个资源数据类型的损益原因生成损益告警信息,M是正整数;The generating module is configured to obtain the profit and loss reasons of the M resource data types when the profit and loss of the M resource data types in the K resource data types is less than the profit and loss threshold, and generate profit and loss alarm information according to the profit and loss reasons of the M resource data types, M is a positive integer;
输出模块,用于输出所述损益告警信息。An output module, configured to output the profit and loss alarm information.
本申请实施例一方面提供了一种计算机设备,包括存储器和处理器,存储器存储有计算机程序,计算机程序被处理器执行时,使得处理器执行上述各实施例中的方法。An aspect of the embodiments of the present application provides a computer device, including a memory and a processor, the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the methods in the foregoing embodiments.
本申请实施例一方面提供了一种计算机存储介质,计算机存储介质存储有计算机程序,计算机程序包括程序指令,程序指令当被处理器执行时,执行上述各实施例中的方法。An aspect of the embodiments of the present application provides a computer storage medium, where the computer storage medium stores a computer program, the computer program includes program instructions, and when the program instructions are executed by a processor, the methods in the foregoing embodiments are executed.
本申请实施例一方面提供了一种计算机程序产品或计算机程序,计算机程序产品或计算机程序包括计算机指令,计算机指令存储在计算机可读存储介质中,计算机指令被计算机设备的处理器执行时,执行上述各实施例中的方法。On the one hand, the embodiments of the present application provide a computer program product or computer program. The computer program product or computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. When the computer instructions are executed by a processor of a computer device, the execution methods in the above embodiments.
本申请由终端设备自动对已结算交易数据集合中的交易信息进行统计处理,以得到每一种资源数据类型的损益,相比仅监控所有资源数据类型的总损益,本申请是针对每一种资源数据类型的损益,因此对交易数据的监控粒度更细;再有,本申请由终端设备自动计算损益,进而生成告警信息,没有人工参与自动化程度高,可以避免出现误告警的情况;进一步地,本申请的告警信息中还包括资源数据类型的损益较小的损益原因,可以丰富告警信息包含的内容。In this application, the terminal device automatically performs statistical processing on the transaction information in the settled transaction data set to obtain the profit and loss of each resource data type. Compared with only monitoring the total profit and loss of all resource data types, this application is for each The profit and loss of the resource data type, so the monitoring granularity of the transaction data is finer; in addition, in this application, the terminal device automatically calculates the profit and loss, and then generates alarm information, without manual participation. The high degree of automation can avoid false alarms; further , the alarm information of the present application also includes the reason for the smaller profit and loss of the resource data type, which can enrich the content contained in the alarm information.
附图说明Description of drawings
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the accompanying drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are only These are some embodiments of the present application. For those of ordinary skill in the art, other drawings can also be obtained based on these drawings without any creative effort.
图1是本申请实施例提供的一种损益示意图;1 is a schematic diagram of a profit and loss provided by an embodiment of the present application;
图2是本申请实施例提供的一种数据处理的整体业务示意图;2 is a schematic diagram of an overall service of data processing provided by an embodiment of the present application;
图3为本申请实施例提供的一种数据处理的流程示意图;3 is a schematic flowchart of a data processing provided by an embodiment of the present application;
图4是本申请实施例提供的一种损益指标体系示意图;4 is a schematic diagram of a profit and loss indicator system provided by an embodiment of the present application;
图5是本申请实施例提供的一种展示页面的示意图;5 is a schematic diagram of a display page provided by an embodiment of the present application;
图6为本申请实施例提供的一种数据处理的流程示意图;6 is a schematic flowchart of a data processing provided by an embodiment of the present application;
图7是本申请实施例提供的一种3-SIGMA算法示意图;7 is a schematic diagram of a 3-SIGMA algorithm provided by an embodiment of the present application;
图8是本申请实施例提供的一种展示页面的示意图;8 is a schematic diagram of a display page provided by an embodiment of the present application;
图9是本申请实施例提供的一种展示页面的示意图;9 is a schematic diagram of a display page provided by an embodiment of the present application;
图10是本申请实施例提供的一种业务处置页面的示意图;FIG. 10 is a schematic diagram of a service handling page provided by an embodiment of the present application;
图11是本申请实施例提供的一种前端框架示意图;11 is a schematic diagram of a front-end framework provided by an embodiment of the present application;
图12是本申请实施例提供的一种中间层框架示意图;12 is a schematic diagram of an intermediate layer framework provided by an embodiment of the present application;
图13是本申请实施例提供的一种系统安全框架示意图;13 is a schematic diagram of a system security framework provided by an embodiment of the present application;
图14是本申请实施例提供的一种区块链的系统架构图;14 is a system architecture diagram of a blockchain provided by an embodiment of the present application;
图15是本申请实施例提供的一种数据处理的流程示意图;15 is a schematic flowchart of a data processing provided by an embodiment of the present application;
图16是本申请实施例提供的一种数据处理装置的结构示意图;16 is a schematic structural diagram of a data processing apparatus provided by an embodiment of the present application;
图17是本申请实施例提供的一种计算机设备的结构示意图。FIG. 17 is a schematic structural diagram of a computer device provided by an embodiment of the present application.
具体实施方式Detailed ways
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, but not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the protection scope of the present application.
本申请可以应用于跨境收单业务的风险感知和评估系统,该系统中的风险感知模块主要是用于计算每一种资源数据类型的损益,大盘总损益,以及发现异常交易对象(在本申请中交易对象是指发生消费行为的境外商户),能够使相关业务人员及时感知风险情况;该系统中的评估模块主要是用于找出亏损原因,发布告警信息以及根据告警信息展示对应的处置页面,以使业务人员可以在该处置页面中进行业务操作,以提高业分析效率和异动处置效率。This application can be applied to the risk perception and evaluation system of cross-border acquiring business. The risk perception module in the system is mainly used to calculate the profit and loss of each resource data type, the total profit and loss of the market, and find abnormal transaction objects (in this The transaction object in the application refers to the overseas merchant with consumption behavior), which can enable the relevant business personnel to perceive the risk situation in time; the evaluation module in the system is mainly used to find out the cause of the loss, issue the alarm information, and display the corresponding treatment according to the alarm information. page, so that business personnel can perform business operations on the disposal page, so as to improve the efficiency of business analysis and transaction disposal.
下面首先对跨境收单的定义,以及跨境收单时资源数据类型的损益的定义进行说明:The following first describes the definition of cross-border acquiring and the definition of the profit and loss of resource data types when cross-border acquiring:
跨境收单是指境内的个人在境外商户产生消费后,由参与主体收取境内个人的人民币货款,再统一通过合作银行向境外商户结汇。Cross-border acquiring means that after domestic individuals generate consumption at overseas merchants, participating entities collect RMB payment from domestic individuals, and then settle foreign exchange with overseas merchants through cooperative banks.
由于用户消费时间和对商户结算时间存在时间差,同一资源数据类型的消费时点汇率和结算时点汇率可能会发生较大波动,导致参与主体需用更多资源数据(相比交易时点)购入商户支持的资源数据类型的资源数据向商户结算,引发亏损。如:内地消费者在T日在香港商户A共消费了1亿港币,消费时港币对人民币的汇率是0.8840。假设由于外部事件冲击,在T+1日结算时港币对人民币的汇率是0.9540,故引发参与主体700万的亏损(1亿×(0.8840-0.9540) =-700万)。Due to the time difference between the user's consumption time and the settlement time with merchants, the consumption time exchange rate and settlement time exchange rate of the same resource data type may fluctuate greatly, resulting in participants needing more resource data (compared to transaction time) to purchase The resource data of the resource data type supported by the merchant is settled to the merchant, causing losses. For example: Mainland consumers spent a total of 100 million Hong Kong dollars at Merchant A in Hong Kong on T day, and the exchange rate of Hong Kong dollar to RMB at the time of consumption was 0.8840. Assuming that due to the impact of external events, the exchange rate of Hong Kong dollar to RMB at the time of settlement on T+1 is 0.9540, which will lead to a loss of 7 million for participating entities (100 million × (0.8840-0.9540) = -7 million).
如图1所示,图1是本申请实施例提供的一种损益示意图,从图1可以看出,在02:00发生了一笔交易,该交易在04:00结算,且该交易成交时的比率(在 02:00时刻的比率)是要比结算时的比率(在04:00时刻的比率)低,因此对参与主体来说,这一笔交易就会引发亏损。As shown in FIG. 1 , which is a schematic diagram of a profit and loss provided by an embodiment of the present application, it can be seen from FIG. 1 that a transaction occurs at 02:00, the transaction is settled at 04:00, and when the transaction is completed The ratio (the ratio at 02:00) is lower than the ratio at settlement (the ratio at 04:00), so for the participants, this transaction will cause a loss.
综上,跨境收单时资源数据类型的损益的定义如下公式(1):To sum up, the definition of the profit and loss of the resource data type in cross-border acquiring is as follows (1):
其中,Qi表示第i种资源数据类型的资源数据总量,ttxn表示交易时第i种资源数据类型的汇率,tsettlement表示结算时第i种资源数据类型的汇率。Among them, Qi represents the total amount of resource data of the ith resource data type, t txn represents the exchange rate of the ith resource data type during transaction, and t settlement represents the exchange rate of the ith resource data type during settlement.
一般来说,参与主体可以支持多种资源数据类型的跨境收单业务,例如可以支持人民币对港币的跨境收单,可以支持人民币对美元的跨境收单,可以支持人民币对日元的跨境收单等。现有技术中,往往只关注参与主体在大盘上的总体损益,对损益的监控粒度较粗;且出现损益异常后,没有配套的广播、异动归因、风险处置等流程方案,缺乏一体化处置平台。Generally speaking, participating entities can support cross-border acquiring business of various resource data types, for example, it can support cross-border acquiring of RMB to HKD, can support cross-border acquiring of RMB to USD, and can support RMB to Japanese yen. Cross-border receipt, etc. In the existing technology, it is often only concerned with the overall profit and loss of the participating entities in the broader market, and the monitoring granularity of profit and loss is relatively coarse; and when abnormal profit and loss occurs, there is no supporting process plan such as broadcasting, change attribution, risk disposal, etc., and there is a lack of integrated disposal. platform.
本申请正是在上述背景技术基础上提出的方案,本申请不仅确定参与主体的大盘总体损益,还会细粒度地确定每一种资源数据类型的损益(例如,确定港币这一种资源数据类型的损益,确定美元这一种资源数据类型的损益,以及确定日币这一种资源数据类型的损益),通过粒度细化,更精确地监控跨境收单业务数据;再有本申请通过发现异常损益,以及为异常损益查找损益原因,生成告警以及展示处置页面等一体化流水线形成业务闭环,可以提高异动处置效率;还有,本申请通过商户的实时交易量(实时交易量可以包含已结算交易量和未结算交易量)以及预测交易量及时发现异常商户,一旦发现异常商户,可以提醒用户谨慎交易,以保护用户的资产安全。This application proposes a solution based on the above background technology. This application not only determines the overall profit and loss of the participating entities, but also determines the profit and loss of each resource data type in a fine-grained manner (for example, determining the Hong Kong dollar, a resource data type, The profit and loss of a resource data type such as USD, and the profit and loss of a resource data type such as Japanese currency) are determined, and the cross-border acquiring business data can be monitored more accurately through granular refinement; Abnormal profit and loss, as well as finding the cause of profit and loss for abnormal profit and loss, generating alarms and displaying disposal pages, etc., form a business closed loop, which can improve the efficiency of transaction disposal; Transaction volume and unsettled transaction volume) and predicted transaction volume to detect abnormal merchants in time. Once abnormal merchants are found, users can be reminded to trade cautiously to protect the security of users’ assets.
请参见图2,图2是本申请实施例提供的一种数据处理的整体业务示意图,本申请涉及两个部分,一部分是通过T日的已结算交易数据计算T日各个资源数据类型(通俗来说就是各个币种)的损益、大盘损益、各个时间段的损益等,根据损益阈值以及计算出来的各个资源数据类型的损益、大盘损益、各个时间段的损益来确定是否生成告警;另一部分是通过T-1日的离线交易数据预测交易对象在T日的预测交易量,通过T日实时交易数据中的交易量和预测交易量发现该交易对象是否为异常交易对象。若是异常交易对象,也要针对该异常交易对象的告警。Please refer to FIG. 2. FIG. 2 is a schematic diagram of an overall business of data processing provided by an embodiment of the present application. The present application involves two parts. That is to say, the profit and loss of each currency, the profit and loss of the market, the profit and loss of each time period, etc., according to the profit and loss threshold and the calculated profit and loss of each resource data type, the profit and loss of the large market, and the profit and loss of each time period to determine whether to generate an alarm; the other part is Use the offline transaction data on T-1 day to predict the predicted transaction volume of the transaction object on T day, and find out whether the transaction object is an abnormal transaction object through the transaction volume and predicted transaction volume in the real-time transaction data of T day. If it is an abnormal transaction object, an alarm for the abnormal transaction object is also required.
生成了告警后,本申请还可以从多个维度分析异常,以得到异常原因;以及通过可视化平台将交易走势、比率走势(即汇率走势)以及损益走势通过图表的形式展示出来。分析出异常原因后,向对应的业务人员发送告警(即对应图2中的告警广播),业务人员接收到告警后,人工进行核验并进行业务处理。后续,可以将处理日志记录下来。After the alarm is generated, the application can also analyze the abnormality from multiple dimensions to obtain the abnormal cause; and display the transaction trend, the ratio trend (ie, the exchange rate trend) and the profit and loss trend in the form of charts through the visualization platform. After analyzing the cause of the abnormality, an alarm is sent to the corresponding business personnel (that is, corresponding to the alarm broadcast in Figure 2). After the business personnel receives the alarm, they manually verify and process the business. Subsequently, the processing log can be recorded.
下面结合附图,对本申请实施例提供的数据处理方案进行详细介绍。The data processing solutions provided by the embodiments of the present application will be described in detail below with reference to the accompanying drawings.
请参见图3,图3为本申请实施例提供的一种数据处理的流程示意图。下述实施例以服务器为执行主体进行描述(当然也可以将终端设备为执行主体进行描述),该数据处理方案包括如下步骤:Referring to FIG. 3 , FIG. 3 is a schematic flowchart of data processing provided by an embodiment of the present application. The following embodiments are described with the server as the execution body (of course, the terminal device can also be described as the execution body), and the data processing solution includes the following steps:
步骤S101,获取已结算交易数据集合,所述已结算交易数据集合包括N个已结算交易数据,每个已结算交易数据均包括交易信息和资源数据类型,所述已结算交易数据集合对应K个资源数据类型,N是正整数。Step S101, obtaining a set of settled transaction data, the set of settled transaction data includes N pieces of settled transaction data, each of the settled transaction data includes transaction information and resource data types, and the set of settled transaction data corresponds to K Resource data type, N is a positive integer.
具体的,服务器获取已结算交易数据集合,已结算交易数据集合可以是前述中跨境收单业务中的交易数据,已结算交易数据集合中包括N个已结算交易数据,每个已结算交易数据均包括交易信息和资源数据类型,交易信息均包括交易数据量、交易比率和结算比率。Specifically, the server obtains a set of settled transaction data. The set of settled transaction data may be the transaction data in the aforementioned cross-border acquiring business. The set of settled transaction data includes N pieces of settled transaction data, each of which is settled transaction data. Both include transaction information and resource data types, and transaction information includes transaction data volume, transaction ratio, and settlement ratio.
其中,交易比率可以认为是消费者在境外商户产生交易时的汇率;结算比率可以认为是参与主体向境外商户结算时的汇率,资源数据类型指的是结汇的资源数据类型,即境外商户支持的资源数据类型。Among them, the transaction ratio can be considered as the exchange rate when consumers make transactions at overseas merchants; the settlement ratio can be considered as the exchange rate when participants settle settlements with overseas merchants, and the resource data type refers to the resource data type for foreign exchange settlement, that is, the type of resource data supported by overseas merchants. Resource data type.
举例来说,内地消费者在T日在香港商户A共消费了100港币,消费时港币对人民币的汇率是0.8840,在T+1日结算时港币对人民币的汇率是0.9540,那么对应的已结算交易数据可以表示为:(100,0.8840,0.9540,港币)。For example, mainland consumers spend a total of
已结算交易数据集合可以对应K个资源数据类型,当然,K是不大于N的。The settled transaction data set may correspond to K resource data types, of course, K is not greater than N.
需要说明的是,为了体现实时性,可以每10分钟就获取一次已结算交易数据集合。例如,当前日期是2021/2/24,在这一天内,每间隔10分钟就获取一次今天之内的已结算交易数据集合,进而可以实时地根据已结算交易数据集合确定每种资源数据类型的损益。It should be noted that, in order to reflect real-time performance, the data set of settled transactions may be acquired every 10 minutes. For example, if the current date is 2021/2/24, within this day, the set of settled transaction data within today is obtained every 10 minutes, and then the data set of each resource data type can be determined in real time according to the set of settled transaction data. profit and loss.
当然,若间隔时长取值更短,实时性就更强,例如,每间隔1分钟就获取一次已结算交易数据集合,再采用本申请的方案就可以更实时地确定每种资源数据类型的损益。Of course, if the value of the interval is shorter, the real-time performance is stronger. For example, a set of settled transaction data is obtained every 1 minute, and then the solution of this application can be used to determine the profit and loss of each resource data type in a more real-time manner. .
需要说明的是,上述已结算交易数据是已经结汇的交易数据,换句话说,就是参与主体已经向境外商户结算的交易数据,但发生消费者和境外商户之间的交易行为的时间只要在结算之前即可,其余没有限定。It should be noted that the above-mentioned settled transaction data is the transaction data that has already settled foreign exchange. In other words, it is the transaction data that the participant has settled with the overseas merchant, but the transaction between the consumer and the overseas merchant occurs only after the settlement. It can be used before, and the rest is not limited.
资源数据类型除了是真实的货币类型,还可以是游戏应用中的游戏币类型。例如,在跨游戏应用玩家交易平台上,一个游戏应用对应1种游戏币类型,交易比率可以认为是游戏应用A中的玩家与游戏应用B中的玩家产生交易时的比率;结算比率可以认为是参与主体向游戏应用B中的玩家结算时的比率,资源数据类型指的是游戏应用对应的游戏币类型。In addition to the real currency type, the resource data type can also be the game currency type in the game application. For example, on a cross-game application player trading platform, one game application corresponds to one type of game currency, and the transaction ratio can be considered as the ratio between players in game application A and players in game application B when transactions occur; the settlement ratio can be considered as The ratio at which the participant pays the players in the game application B, and the resource data type refers to the game currency type corresponding to the game application.
步骤S102,对所述已结算交易数据集合中的交易信息进行损益统计处理,得到每种资源数据类型的损益。Step S102, performing profit and loss statistical processing on the transaction information in the settled transaction data set to obtain the profit and loss of each resource data type.
具体的,服务器可以根据每个已结算交易数据中的资源数据类型,将这N 个已结算交易数据划分为多个单位集合,每个单位集合中的已结算交易数据的资源数据类型相同。Specifically, the server may divide the N settled transaction data into multiple unit sets according to the resource data type in each settled transaction data, and the settled transaction data in each unit set has the same resource data type.
针对任一单位集合来说,分别计算该单位集合中每个已结算交易数据的单位损益,将所有的单位损益进行叠加即可得到该单位集合对应的资源数据类型的损益。此处的资源数据类型的损益可以是正数,也可以是负数,正数表示该资源数据类型当前是盈利状态,负数表示该资源数据类型当前是亏损状态。For any unit set, the unit profit and loss of each settled transaction data in the unit set is calculated separately, and all unit profit and loss are superimposed to obtain the profit and loss of the resource data type corresponding to the unit set. The profit and loss of the resource data type here can be a positive number or a negative number. A positive number indicates that the resource data type is currently in a profitable state, and a negative number indicates that the resource data type is currently in a loss state.
举例来说,现有4个已结算交易数据,分别为已结算交易数据1:(100,0.8,0.9, 港币),已结算交易数据2:(200,0.7,0.9,港币),已结算交易数据3:(100,10,9,美元),已结算交易数据4:(200,10,12,美元),那么可以将上述4个已结算交易数据划分为2个单位集合,分别为单位集合1:{已结算交易数据1:(100,0.8,0.9, 港币),已结算交易数据2:(200,0.7,0.9,港币)},和单位集合2:{已结算交易数据3:(100,10,9,美元),已结算交易数据4:(200,10,12,美元)}。针对单位集合1 来说:已结算交易数据1的单位损益是:100×(0.8-0.9)=-10,已结算交易数据2 的单位损益是:200×(0.7-0.9)=-40,因此资源数据类型为港币的损益就是-50;可以采用与上述同样的方式计算出资源数据类型为美元的损益是-30。For example, there are currently 4 settled transaction data, namely settled transaction data 1: (100, 0.8, 0.9, HKD), settled transaction data 2: (200, 0.7, 0.9, HKD), settled transaction Data 3: (100, 10, 9, USD), settled transaction data 4: (200, 10, 12, USD), then the above 4 settled transaction data can be divided into 2 unit sets, which are unit sets respectively 1: {settled transaction data 1: (100, 0.8, 0.9, HKD), settled transaction data 2: (200, 0.7, 0.9, HKD)}, and unit set 2: {settled transaction data 3: (100 ,10,9,USD), settled transaction data 4: (200,10,12,USD)}. For unit set 1: the unit profit and loss of settled
可选的,服务器可以将K种资源数据类型的损益叠加为累计损益,该累计损益与可以认为是参与主体的大盘损益。Optionally, the server may superimpose the profits and losses of the K types of resource data into a cumulative profit and loss, and the cumulative profit and loss can be considered as the general market profit and loss of the participating entities.
可选的,每个已结算交易数据还包括结算时间戳,已结算交易数据集合对应P个结算时间段,除最后一个结算时间段以外,其余结算时间段的时长都与预设时长(预设时长可以等于1小时)相同。Optionally, each settled transaction data also includes a settlement timestamp, the settled transaction data set corresponds to P settlement time periods, and except for the last settlement time period, the duration of the rest of the settlement time periods is the same as the preset time period (preset). duration can be equal to 1 hour) is the same.
举例来说,已结算交易数据集合是2021/2/24/00:00-2021/2/24/02:30之间的已结算交易数据,若预设时长是1个小时,可以将已结算交易数据集合划分为3 个结算时间段,分别为:2021/2/24/00:00-2021/2/24/00:59、 2021/2/24/01:00-2021/2/24/01:59、2021/2/24/02:00-2021/2/24/02:30。For example, the set of settled transaction data is the settled transaction data between 2021/2/24/00:00-2021/2/24/02:30. If the preset time period is 1 hour, the settled transaction data can be The transaction data set is divided into 3 settlement time periods, namely: 2021/2/24/00:00-2021/2/24/00:59, 2021/2/24/01:00-2021/2/24/ 01:59, 2021/2/24/02:00-2021/2/24/02:30.
服务器可以根据每个已结算交易数据的结算时间戳,将上述K个单位集合再划分为多个子单位集合,每个子单位集合中已结算交易数据的资源数据类型相同,且结算时间戳处于同一个结算时间段内。针对一个子单位集合来说,服务器统计该子单位集合中的已结算交易数据的损益,将该损益作为该子单位集合对应的资源数据类型和结算时间段的损益。对所有的子单位集合都可以计算出来一个损益,可以得到每种资源数据类型在每个结算时间段的损益。The server may subdivide the above K unit sets into multiple sub-unit sets according to the settlement timestamp of each settled transaction data. The resource data types of the settled transaction data in each sub-unit set are the same, and the settlement timestamps are in the same during the settlement period. For a sub-unit set, the server counts the profit and loss of the settled transaction data in the sub-unit set, and takes the profit and loss as the profit and loss of the resource data type and settlement time period corresponding to the sub-unit set. A profit and loss can be calculated for all sub-unit sets, and the profit and loss of each resource data type in each settlement period can be obtained.
服务器还可以将每个结算时间段内的所有资源数据类型的损益叠加为每个结算时间段内的总损益。The server may also superimpose the profit and loss of all resource data types in each settlement period into the total profit and loss in each settlement period.
总结上述过程,每种资源数据类型的损益是在资源数据类型的维度来确定的损益,每个结算时间段内的总损益是在结算时间段的维度来确定的损益,累计损益就是参与主体大盘整体损益。Summarizing the above process, the profit and loss of each resource data type is the profit and loss determined in the dimension of the resource data type, the total profit and loss in each settlement time period is the profit and loss determined in the dimension of the settlement time period, and the accumulated profit and loss is the participating main body market. Overall profit and loss.
通过不同维度,不同粒度的分析已结算交易数据来确定损益,可以更好地帮助参与主体来分析已结算交易数据。By analyzing settled transaction data in different dimensions and granularities to determine profit and loss, it can better help participants analyze settled transaction data.
请参见图4,图4是本申请实施例提供的一种损益指标体系示意图,用户交易数据和结算数据合并起来可以对应本申请中的已结算交易数据,通过用户交易数据中的资源数据类型可以将对应的已结算交易数据写入对应的渠道,对于发生在夜间的已结算交易数据,对应的已结算交易数据写入对应渠道的夜间借道。已结算交易数据划分好后,通过对同一种资源数据类型的损益进行统计,可以得到该种资源数据类型的日累计损益。将所有资源数据类型的日累计损益叠加为大盘损益,大盘损益即是参与主体在当日的总损益。Please refer to FIG. 4. FIG. 4 is a schematic diagram of a profit and loss indicator system provided by an embodiment of the present application. The user transaction data and settlement data can be combined to correspond to the settled transaction data in the present application. The resource data type in the user transaction data can Write the corresponding settled transaction data to the corresponding channel. For the settled transaction data that occurred at night, the corresponding settled transaction data is written to the nighttime borrowing channel of the corresponding channel. After the settled transaction data is divided, the daily accumulated profit and loss of the resource data type can be obtained by calculating the profit and loss of the same resource data type. The daily cumulative profit and loss of all resource data types is superimposed into the broad market profit and loss, and the broad market profit and loss is the total profit and loss of the participating entities on that day.
服务器可以在展示页面展示上述每个时间内的总损益,累计损益,每种资源数据类型的损益;或者,在展示页面展示P个结算时间段中的最大结算时间段内的总损益(若结算时间段的时长是1小时,可以知道当前1小时内的所有资源数据类型的总损益)和累计损益。The server can display the total profit and loss, accumulated profit and loss, and profit and loss of each resource data type on the display page; The duration of the time period is 1 hour, and you can know the total profit and loss of all resource data types in the current 1 hour) and accumulated profit and loss.
当然,服务器在展示每种资源数据类型的损益时,可以按照损益从大到小 (或者从小到大)的顺序来展示K个资源数据类型的损益。Of course, when displaying the profit and loss of each resource data type, the server may display the profit and loss of the K resource data types in the order of profit and loss from large to small (or from small to large).
请参见图5,图5是本申请实施例提供的一种展示页面的示意图,在展示页面上可以显示出大盘的小时累计损益(当前这一个小时内的累计损益)以及大盘的日累计损益,在图5中黑色涂黑部分表示亏损量。可以知道,不同的亏损量对应不同等级的告警线,当然,不同等级的告警线生成的告警信息也不同。例如,一级告警线对应的告警信息可以用橙色字体表示,二级告警信息可以用红色字体表示等。Please refer to FIG. 5. FIG. 5 is a schematic diagram of a display page provided by an embodiment of the present application. On the display page, the hourly accumulated profit and loss of the broad market (the accumulated profit and loss in the current hour) and the daily accumulated profit and loss of the broad market can be displayed, In Fig. 5, the black-shaded portion represents the loss amount. It can be known that different loss amounts correspond to different levels of alarm lines. Of course, different levels of alarm lines generate different alarm information. For example, the alarm information corresponding to the first-level alarm line may be represented in orange font, and the second-level alarm information may be represented in red font.
步骤S103,当K个资源数据类型中存在M个资源数据类型的损益小于损益阈值时,获取M个资源数据类型的损益原因,并根据M个资源数据类型的损益原因生成损益告警信息,M是正整数。Step S103, when the profit and loss of M resource data types in the K resource data types is less than the profit and loss threshold, obtain the profit and loss reasons of the M resource data types, and generate profit and loss alarm information according to the profit and loss reasons of the M resource data types, where M is positive. Integer.
具体的,服务器获取预设的损益阈值,当K个资源数据类型的损益中存在 M个资源数据类型的损益小于损益阈值时,服务器获取这M个资源数据类型中的每个资源数据类型的损益原因,M是正整数。Specifically, the server obtains a preset profit and loss threshold, and when the profit and loss of M resource data types in the profit and loss of the K resource data types is smaller than the profit and loss threshold, the server obtains the profit and loss of each resource data type in the M resource data types The reason, M is a positive integer.
针对M个资源数据类型中的任一个资源数据类型(称为目标资源数据类型),确定目标资源数据类型的损益原因的具体过程如下:For any resource data type (referred to as the target resource data type) among the M resource data types, the specific process of determining the reason for the profit and loss of the target resource data type is as follows:
从前述可知,已结算交易数据集合对应P个结算时间段,可以将P个结算时间段中最大结算时间段称为第二结算时间段,在P个结算时间段中与第二结算时间段相邻的结算时间段称为第一结算时间段。It can be seen from the foregoing that the set of settled transaction data corresponds to P settlement time periods, and the largest settlement time period in the P settlement time periods can be referred to as the second settlement time period. The settlement period is referred to as the first settlement period.
服务器从已结算交易数据集合中抽取目标资源数据类型在第一结算时间段内的已结算交易数据(称为第一已结算交易数据集),并从已结算交易数据集合中抽取目标资源数据类型在第二结算时间段内的已结算交易数据(称为第二已结算交易数据集)。服务器计算第一已结算交易数据集合中的已结算交易数据的交易比率的平均值(称为第一交易比率均值a1),计算第一已结算交易数据集合中的已结算交易数据的结算比率的平均值(称为第一结算比率均值b1),计算第一已结算交易数据集合中的已结算交易数据的交易数据量之和(称为第一交易总量c1)。The server extracts the settled transaction data of the target resource data type within the first settlement time period (referred to as the first settled transaction data set) from the settled transaction data set, and extracts the target resource data type from the settled transaction data set Settled transaction data during the second settlement time period (referred to as a second set of settled transaction data). The server calculates the average value of the transaction ratios of the settled transaction data in the first settled transaction data set (referred to as the first transaction ratio average a1), and calculates the average value of the settlement ratios of the settled transaction data in the first settled transaction data set. The average value (referred to as the first settlement ratio average value b1 ) is calculated as the sum of the transaction data volumes of the settled transaction data in the first settled transaction data set (referred to as the first transaction total amount c1 ).
同样地,服务器计算第二已结算交易数据集合中的已结算交易数据的交易比率的平均值(称为第二交易比率均值a2),计算第二已结算交易数据集合中的已结算交易数据的结算比率的平均值(称为第二结算比率均值b2),计算第二已结算交易数据集合中的已结算交易数据的交易数据量之和(称为第二交易总量c2)。Similarly, the server calculates the average value of the transaction ratios of the settled transaction data in the second set of settled transaction data (referred to as the second transaction ratio mean a2), and calculates the average value of the settled transaction data in the second set of settled transaction data. The average value of the settlement ratios (referred to as the second average settlement ratio b2 ) is calculated as the sum of the transaction data volumes of the settled transaction data in the second set of settled transaction data (referred to as the second total transaction volume c2 ).
根据下述公式(2)计算第一损益s1:Calculate the first profit and loss s1 according to the following formula (2):
s1=c1*(a1-b1) (2)s1=c1*(a1-b1) (2)
根据下述公式(3)计算第二损益s2:Calculate the second profit and loss s2 according to the following formula (3):
s2=c2*(a2-b2) (3)s2=c2*(a2-b2) (3)
服务器将第二损益s2减去第一损益s1得到损益变动,损益变动的计算公式如下公式(4):The server subtracts the second profit and loss s2 from the first profit and loss s1 to obtain the change in profit and loss. The calculation formula for the change in profit and loss is as follows: formula (4):
Δs=s2-s1 (4)Δs=s2-s1 (4)
根据下述公式(5)计算交易量贡献率p1:Calculate the transaction volume contribution rate p1 according to the following formula (5):
根据下述公式(6)计算比率贡献率p2:The ratio contribution rate p2 is calculated according to the following formula (6):
服务器可以将上述计算出来的交易量贡献率p1和比率贡献率p2组合为目标资源数据类型的损益原因。分析上述损益原因的计算过程可以知道,损益原因即是确定交易量因素对整体损益的贡献率+资源数据类型之间的比率对整体损益的贡献率。The server may combine the transaction volume contribution rate p1 and the ratio contribution rate p2 calculated above as the profit and loss cause of the target resource data type. By analyzing the calculation process of the above-mentioned profit and loss reasons, it can be known that the profit and loss reason is the contribution rate of the transaction volume factor to the overall profit and loss + the ratio of resource data types to the overall profit and loss.
服务器可以采用相同的方式确定M个资源数据类型中的每个资源数据类型的损益原因。The server may determine the profit and loss cause for each of the M resource data types in the same manner.
服务器确定了M个资源数据类型中的每个资源数据类型的损益原因后,可以生成包含这M个资源数据类型的损益原因的损益告警信息,以辅助业务人员在进行处置时,能够快速定位问题原因以作出最优处置。或者,服务器可以为 M个资源数据类型中的每一个资源数据类型都生成对应的损益告警信息,即会生成M个损益告警信息。After the server determines the profit and loss cause of each resource data type in the M resource data types, it can generate profit and loss alarm information including the profit and loss cause of the M resource data types, so as to assist the business personnel to quickly locate the problem when dealing with the problem. reasons for optimal treatment. Alternatively, the server may generate corresponding profit and loss alarm information for each of the M resource data types, that is, M pieces of profit and loss alarm information will be generated.
可选的,前面描述了当资源数据类型的损益小于损益阈值时,会为该资源数据类型生成损益告警信息。从前述可知,前面不仅计算了每种资源数据类型的损益,还计算了每个结算时间段的总损益,以及累计损益,同样地,若P个结算时间段中的任一结算时间段的总损益小于第一阈值,则分析造成该任一结算时间段的总损益小于第一阈值的资源数据类型(称为辅助资源数据类型),进而采用上述方式,确定该辅助资源数据类型的损益原因,再生成告警信息,该告警信息中包含辅助资源数据类型的损益原因。Optionally, as described above, when the profit and loss of the resource data type is less than the profit and loss threshold, the profit and loss alarm information will be generated for the resource data type. It can be seen from the foregoing that not only the profit and loss of each resource data type, but also the total profit and loss of each settlement time period, and the accumulated profit and loss are calculated. Similarly, if the total profit and loss of any settlement time period in the P settlement time periods is calculated If the profit or loss is less than the first threshold, then analyze the resource data type (referred to as auxiliary resource data type) that causes the total profit and loss of any settlement period to be smaller than the first threshold, and then use the above method to determine the profit and loss reason for the auxiliary resource data type, Regenerate alarm information, where the alarm information includes the cause of profit and loss of the auxiliary resource data type.
可选的,若累计损益小于第二阈值,则分析造成该累计损益小于第二阈值的资源数据类型(称为辅助资源数据类型),进而采用上述方式,确定该辅助资源数据类型的损益原因,再生成告警信息,该告警信息中包含辅助资源数据类型的损益原因。Optionally, if the cumulative profit and loss is less than the second threshold, analyze the resource data type (referred to as auxiliary resource data type) that causes the cumulative profit and loss to be less than the second threshold, and then use the above method to determine the profit and loss reason for the auxiliary resource data type, Regenerate alarm information, where the alarm information includes the cause of profit and loss of the auxiliary resource data type.
可以知道,当需要确定累计损益的损益原因,或者每个结算时间段的损益原因时,最后都需要关注到某一种资源数据类型上来。It can be known that when it is necessary to determine the profit and loss cause of the accumulated profit and loss, or the profit and loss cause of each settlement period, it is necessary to pay attention to a certain resource data type in the end.
步骤S104,输出所述损益告警信息。Step S104, outputting the profit and loss alarm information.
上述可知,本申请不仅计算出参与主体的大盘总损益,还会计算每个时间段内的总损益,每种资源数据类型的损益,对交易数据的监控粒度更细;再有,本申请在展示页面按照从大到小的顺序展示出每个时间内的总损益,累计损益,每种资源数据类型的损益,可以提升损益的展示效果;进一步地,本申请中的损益原因即是交易量因素对整体损益的贡献率+资源数据类型之间的比率对整体损益的贡献率,对资源数据类型的损益原因分析准确。As can be seen from the above, this application not only calculates the total profit and loss of the participating entities, but also calculates the total profit and loss in each time period, the profit and loss of each resource data type, and the monitoring granularity of transaction data is finer; The display page displays the total profit and loss, cumulative profit and loss, and profit and loss of each resource data type in descending order, which can improve the display effect of profit and loss; further, the reason for profit and loss in this application is the transaction volume The contribution rate of factors to the overall profit and loss + the contribution rate of the ratio between resource data types to the overall profit and loss, and the analysis of the reasons for the profit and loss of resource data types is accurate.
请参见图6,图6为本申请实施例提供的一种数据处理的流程示意图,该数据处理方案包括如下步骤:Please refer to FIG. 6. FIG. 6 is a schematic flowchart of a data processing provided by an embodiment of the present application. The data processing solution includes the following steps:
步骤S201,获取已结算交易数据集合,所述已结算交易数据集合包括N个已结算交易数据,每个已结算交易数据均包括交易信息和资源数据类型,所述已结算交易数据集合对应K个资源数据类型,N,K均是正整数。Step S201, obtaining a set of settled transaction data, the set of settled transaction data includes N pieces of settled transaction data, each of the settled transaction data includes transaction information and resource data types, and the set of settled transaction data corresponds to K Resource data type, N, K are positive integers.
步骤S202,对所述已结算交易数据集合中的交易信息进行损益统计处理,得到每种资源数据类型的损益。Step S202, performing profit and loss statistical processing on the transaction information in the settled transaction data set to obtain the profit and loss of each resource data type.
步骤S203,当K个资源数据类型中存在M个资源数据类型的损益小于损益阈值时,获取M个资源数据类型的损益原因,并根据M个资源数据类型的损益原因生成损益告警信息,M是正整数,输出所述损益告警信息。Step S203, when the profit and loss of M resource data types in the K resource data types is less than the profit and loss threshold, obtain the profit and loss reasons of the M resource data types, and generate profit and loss alarm information according to the profit and loss reasons of the M resource data types, where M is positive. Integer, output the profit and loss alarm information.
其中,步骤S201-步骤S203的具体实现方式可以参见上述图3对应实施例中的步骤S101-步骤S104。Wherein, for the specific implementation manner of step S201-step S203, reference may be made to step S101-step S104 in the above-mentioned embodiment corresponding to FIG. 3 .
步骤S204,获取U个交易对象的目标交易数据,每个目标交易数据均包括交易数据量。Step S204, acquiring target transaction data of U transaction objects, each target transaction data including transaction data volume.
具体的,服务器获取U个交易对象在T日的目标交易数据,前述中的已结算交易数据可以对应U个交易对象,此处的交易对象可以是指境外商户,或者游戏玩家,当前日期为T日,换句话说,服务器获取的就是U个交易对象在当日的交易数据。Specifically, the server obtains the target transaction data of the U transaction objects on the T day. The settled transaction data in the foregoing may correspond to the U transaction objects. The transaction objects here may refer to overseas merchants or game players, and the current date is T. In other words, what the server obtains is the transaction data of U transaction objects on that day.
目标交易数据是消费者和交易对象已经产生了交易行为,但交易对象还未和参与主体结算的交易数据。举例来说,在2021/2/24/12:00用户在香港商户A 中购买了商品A,价格是100港币,且交易是交易比率是0.8;但参与主体还未和香港商户A结算此笔交易,因此,目标交易数据可以表示为:(100,香港商户 A,0.8,2021/2/24/12:00),由于还未结算,因此此时还不能生成对应的已结算交易数据。The target transaction data is the transaction data that the consumer and the transaction object have already generated transaction behavior, but the transaction object has not yet settled with the participating entity. For example, at 2021/2/24/12:00, the user purchased commodity A in Hong Kong merchant A, the price is 100 Hong Kong dollars, and the transaction ratio is 0.8; but the participating entity has not yet settled this transaction with Hong Kong merchant A Therefore, the target transaction data can be expressed as: (100, Hong Kong Merchant A, 0.8, 2021/2/24/12:00), since the settlement has not yet been settled, the corresponding settled transaction data cannot be generated at this time.
步骤S205,对所述U个交易对象的目标交易数据中的交易数据量进行统计处理,得到U个交易对象中的异常交易对象,根据所述异常交易对象生成交易告警信息。Step S205: Perform statistical processing on the transaction data volume in the target transaction data of the U transaction objects, obtain abnormal transaction objects in the U transaction objects, and generate transaction alarm information according to the abnormal transaction objects.
具体的,服务器可以按照不同的交易对象,将所有的目标交易数据划分为U 个簇,每个簇中的目标交易数据属于同一个交易对象。Specifically, the server may divide all target transaction data into U clusters according to different transaction objects, and the target transaction data in each cluster belong to the same transaction object.
将每一个簇中的目标交易数据中的交易数据量叠加为该簇对应的交易对象的累计交易数据量,即是获取每个商户的未结算的累计交易数据量。The transaction data volume in the target transaction data in each cluster is superimposed as the cumulative transaction data volume of the transaction object corresponding to the cluster, that is, the unsettled cumulative transaction data volume of each merchant is obtained.
服务器再获取每个交易对象的预测交易数据量,其中交易对象在T日的预测交易数据量是由交易对象在T-1日真实交易数据预测得到,T-1日真实交易数据是T-1日的完整交易数据。The server then obtains the predicted transaction data volume of each transaction object, in which the predicted transaction data volume of the transaction object on T day is predicted by the transaction object's real transaction data on T-1 day, and the real transaction data on T-1 day is T-1 Complete transaction data for the day.
服务器将预测交易数据量大于累计交易数据量的交易对象作为异常交易对象。The server regards a transaction object whose predicted transaction data volume is greater than the accumulated transaction data volume as an abnormal transaction object.
本申请从历史交易总天数、最近一次交易时间、日均交易规模、交易稳定性、交易活跃度等5方面,将所有就交易对象分为3种类型(分别是高活跃度类型、中活跃度类型和低活跃度类型),每种类型匹配相应的预测方案。具体来说,针对高活跃度类型的交易对象采用Prophet算法来预测,针对中活跃度类型的交易对象采用3-SIGMA算法算法来预测,针对低活跃度类型的交易对象采用动态行业均值来预测。This application divides all transaction objects into 3 types (high activity type, medium activity type, etc.) from five aspects, including the total number of historical transaction days, the last transaction time, the average daily transaction size, transaction stability, and transaction activity. type and low activity type), each type matches the corresponding prediction scheme. Specifically, the Prophet algorithm is used to predict the transaction objects of the high activity type, the 3-SIGMA algorithm is used to predict the transaction objects of the medium activity type, and the dynamic industry average is used to predict the transaction objects of the low activity type.
下面分别对这3种预测方案进行说明,首先说明基于Prophet算法和某一个交易对象在T-1日的完整历史交易数据(主要是利用历史交易数据中的交易数据量),来预测该交易对象在T日的预测交易数据量:The three forecasting schemes are described below. First, the complete historical transaction data of a certain transaction object on T-1 day (mainly using the transaction data volume in the historical transaction data) based on the Prophet algorithm will be explained to predict the transaction object. Predicted transaction data volume on day T:
Prophet根据经典时序理论,将时序数据拆分为趋势项、周期项、季节项、节假日项,对每一项分段拟合,可以表示为下述公式(7):According to the classical time series theory, Prophet divides the time series data into trend items, periodic items, seasonal items, and holiday items. The fitting of each item can be expressed as the following formula (7):
y(t)=g(t)+s(t)+h(t)+ε(t) (7)y(t)=g(t)+s(t)+h(t)+ε(t) (7)
其中,g(t)表示趋势项,它表示时间序列在非周期上面的变化趋势;s(t)表示周期项,或者称为季节项,一般来说是以周或者年或者小时为单位;h(t)表示节假日项,表示在当天是否存在节假日;ε(t)表示误差项或者称为剩余项。Prophet 算法就是通过拟合这几项,然后最后把它们累加起来就得到了时间序列的预测值。Among them, g(t) represents the trend item, which represents the change trend of the time series on a non-periodic basis; s(t) represents the cyclic item, or seasonal item, generally in weeks or years or hours; h (t) represents the holiday item, indicating whether there is a holiday on that day; ε(t) represents the error item or the remaining item. The Prophet algorithm obtains the predicted value of the time series by fitting these items and finally adding them up.
趋势项模型g(t):分段线性或逻辑增长曲线趋势:Trend term model g(t): Piecewise linear or logistic growth curve trend:
基于逻辑回归的趋势项可以表示为下述公式(8):The trend term based on logistic regression can be expressed as the following formula (8):
其中,C(t)是业务经验上限;k为初始增长率;α(t)为指示函数,σ表示表示增长率的变化量,m为偏差参数;Among them, C(t) is the upper limit of business experience; k is the initial growth rate; α(t) is the indicator function, σ represents the change in growth rate, and m is the deviation parameter;
基于线性回归的趋势项可以表示为下述公式(9):The trend term based on linear regression can be expressed as the following formula (9):
g(t)=(k+α(t)σ*t+(m+α(t)Tγ)) (9)g(t)=(k+α(t)σ*t+(m+α(t) T γ)) (9)
公式(9)中参数的含义与公式(8)中参数的含义一致。The meanings of the parameters in formula (9) are the same as those in formula (8).
季节项模型s(t):用傅里叶级数模拟每年的季节性分量:Seasonal term model s(t): Use a Fourier series to model the seasonal component of each year:
由于季节项描述的是周期性行为,故可以通过正弦和余弦函数(下述公式(10))来综合表示季节项模型s(t)(傅里叶级数),Since the seasonal term describes the periodic behavior, the seasonal term model s(t) (Fourier series) can be comprehensively represented by the sine and cosine functions (the following formula (10)),
从经验看来,对于以年为周期的序列(P=365.25)而言,N=10;对于以周为周期的序列(P=7)而言,N=3;Empirically, N=10 for year-period series (P=365.25); N=3 for week-period series (P=7);
将公式(10)进一步抽象为:s(t)=X(t)β,其中β~N(0,σ2)。在模型中,σ2通过季节性优先等级来控制,σ2值越大,表示季节的效应越明显。Formula (10) is further abstracted as: s(t)=X(t)β, where β~N(0,σ 2 ). In the model, σ2 is controlled by the seasonality priority, and the larger the value of σ2 , the more obvious the effect of season.
节假日项模型h(t)用虚拟变量来模拟每周的周期性分量,可以用下述公式 (11)来表示:The holiday term model h(t) uses dummy variables to simulate the weekly periodic component, which can be expressed by the following formula (11):
其中,k~N(0,v2),v是假日优先级,默认值为10,当v的取值越大,表示节假日对模型的影响越大。Among them, k~N(0, v 2 ), v is the priority of holidays, and the default value is 10. When the value of v is larger, it means that the holiday has a greater impact on the model.
其次来说明基于3-SIGMA算法和某一个交易对象在T-1日的完整历史交易数据(主要是利用历史交易数据中的交易数据量),来预测该交易对象在T日的预测交易数据量:Next, it is explained based on the 3-SIGMA algorithm and the complete historical transaction data of a certain transaction object on T-1 day (mainly using the transaction data volume in the historical transaction data) to predict the predicted transaction data volume of the transaction object on T day. :
3-SIGMA模型数据需要服从正态分布。在3σ原则下,异常值如超过3倍标准差,那么可以将其视为异常值。正负3σ的概率是99.7%。因此首先基于在T-1 日的完整历史交易数据中的交易数据量计算出均值u和标准差σ,将u+3σ作为该交易对象在T日的预测交易数据量。The 3-SIGMA model data needs to obey a normal distribution. Under the 3σ principle, if the outlier exceeds 3 times the standard deviation, it can be regarded as an outlier. The probability of plus or minus 3σ is 99.7%. Therefore, the mean value u and the standard deviation σ are first calculated based on the transaction data volume in the complete historical transaction data on T-1 day, and u+3σ is taken as the predicted transaction data volume of the transaction object on T day.
请参见图7,图7是本申请实施例提供的一种3-SIGMA算法示意图,从图 7可以看出,通常把等于±3σ的误差作为极限误差,对于正态分布的随机误差,落在±3σ以外的概率只有0.27%,它在有限次测量中发生的可能性很小,故存在3σ准则。如果一组测量数据中某个测量值的残余误差的绝对值νi>3σ,则该测量值为坏值,即对应本申请中的超过预测交易量的累计交易数据量。Please refer to FIG. 7. FIG. 7 is a schematic diagram of a 3-SIGMA algorithm provided by an embodiment of the present application. It can be seen from FIG. 7 that an error equal to ±3σ is usually regarded as the limit error. The probability other than ±3σ is only 0.27%, and it is very unlikely to occur in a limited number of measurements, so there is a 3σ criterion. If the absolute value νi of the residual error of a certain measurement value in a set of measurement data is greater than 3σ, the measurement value is a bad value, that is, it corresponds to the accumulated transaction data volume exceeding the predicted transaction volume in the present application.
最后来说明采用动态行业均值,来预测某一个交易对象在T日的预测交易数据量:Finally, it is explained that the dynamic industry average is used to predict the predicted transaction data volume of a certain transaction object on T day:
服务器获取与待预测交易对象同行业的其余交易对象在T-1日的历史交易数据,将获得历史交易数据中的交易数据量的平均值作为待预测交易对象在T 日的预测交易数据量。The server obtains the historical transaction data of other transaction objects in the same industry as the transaction object to be predicted on day T-1, and takes the average of the transaction data volume in the obtained historical transaction data as the predicted transaction data volume of the transaction object to be predicted on day T.
至此,服务器就从U个交易对象中确定了异常交易对象,服务器可以直接生成包含异常交易对象的交易告警信息,以提醒业务处理人员特别注意这些异常交易对象。So far, the server has determined the abnormal transaction objects from the U transaction objects, and the server can directly generate transaction alarm information including the abnormal transaction objects to remind the business processing personnel to pay special attention to these abnormal transaction objects.
可选的,在确定异常交易对象后,还可以进一步基于结合交易量级、交易对象风险评级、累计交易数据量和预测交易数据量的偏离度等变量确定是否生成交易告警信息,以及该交易告警信息对应的处置部分。具体过程用以下算法描述:Optionally, after the abnormal transaction object is determined, it may be further determined whether to generate transaction alarm information and the transaction alarm based on variables such as the transaction volume level, the risk rating of the transaction object, the accumulated transaction data volume and the deviation degree of the predicted transaction data volume. The corresponding disposition part of the information. The specific process is described by the following algorithm:
步骤S206,输出所述交易告警信息。Step S206, outputting the transaction alarm information.
可选的,服务器还可以针对U个交易对象的累计交易数据量进行排序,得到排序结果,排序结果中包含U个交易对象,以及每个交易对象的累计交易数据量,且这U个交易对象的累计交易数据量是按照从大到小(或者从小到大) 的顺序排列的。服务器在展示页面展示排序结果,以方便业务人员可以快速定位到累计交易数据量较大的交易对象。Optionally, the server may also sort the cumulative transaction data volume of the U transaction objects to obtain a sorting result, where the sorting result includes U transaction objects and the cumulative transaction data volume of each transaction object, and the U transaction objects The cumulative transaction data volume of is arranged in order from large to small (or from small to large). The server displays the sorting results on the display page, so that business personnel can quickly locate transaction objects with a large amount of accumulated transaction data.
请参见图8,图8是本申请实施例提供的一种展示页面的示意图,通过统计每个交易对象的累计交易量(累计交易量可以对应本申请的累计交易数据量),在展示页面按照从大到小的原则依次展示多个交易对象,以及每个交易对象的累计交易量。Please refer to FIG. 8. FIG. 8 is a schematic diagram of a display page provided by an embodiment of the present application. By counting the cumulative transaction volume of each transaction object (the cumulative transaction volume may correspond to the cumulative transaction data volume of the present application), the Display multiple transaction objects in order from large to small, and the cumulative transaction volume of each transaction object.
可选的,每个目标交易数据还包括交易时间戳和交易比率,服务器可以根据U个交易对象的目标交易数据的交易时间戳,将所有的目标交易数据划分为多个目标交易数据集合,同一个目标交易数据集合中的目标交易数据中的交易时间戳处于同一交易时间段。例如,将一个小时作为一个交易时间段。Optionally, each target transaction data also includes a transaction timestamp and a transaction ratio. The server may divide all the target transaction data into multiple target transaction data sets according to the transaction timestamps of the target transaction data of the U transaction objects. The transaction timestamps in the target transaction data in a target transaction data set are in the same transaction time period. For example, consider one hour as a trading time period.
服务器将每个目标交易数据中的交易数据量乘以交易比率,可以得到每个目标交易数据的转换交易量,这是因为不同的目标交易数据对应不同资源数据类型,通过交易数据量和交易比率的相乘得到的转换交易量的资源数据类型是相同的(例如,转换交易量的资源数据类型是人民币类型)。服务器可以将同一个目标交易数据集合中的目标交易数据的转换交易量进行叠加,得到该目标交易数据集合对应的交易时间段的交易敞口。将所有交易时间段的交易敞口叠加为累计交易敞口,在展示页面展示每个交易时间段的交易敞口以及累计交易敞口。或者在展示页面仅展示累计交易敞口和多个交易时间段中的最大交易时间段的交易敞口。The server multiplies the transaction data volume in each target transaction data by the transaction ratio to obtain the converted transaction volume of each target transaction data. This is because different target transaction data correspond to different resource data types. Through the transaction data volume and transaction ratio The resource data type of the converted transaction volume obtained by multiplying it is the same (for example, the resource data type of the converted transaction volume is RMB type). The server may superimpose the converted transaction volume of the target transaction data in the same target transaction data set to obtain the transaction exposure of the transaction time period corresponding to the target transaction data set. The trading exposures of all trading time periods are superimposed into cumulative trading exposures, and the trading exposures and cumulative trading exposures of each trading period are displayed on the display page. Alternatively, only the cumulative trading exposure and the trading exposure of the largest trading period among multiple trading periods can be displayed on the display page.
交易敞口是对参与主体来说的,即消费者和境外商户已经产生了交易,但参与主体还未与境外商户结算的交易数据量可以称之为交易敞口,交易敞口通俗理解就是参与主体需要承担的风险,交易敞口越大,需要参与主体承担的风险的就越大。The transaction exposure is for the participating entities, that is, consumers and overseas merchants have already made transactions, but the transaction data volume that the participating entities have not yet settled with overseas merchants can be called transaction exposure. The popular understanding of transaction exposure is participation. The risk that the entity needs to take, the greater the trading exposure, the greater the risk that the participating entity needs to take.
当多个交易时间段中的任一交易时间段的交易敞口大于第一敞口阈值,或者当累计交易敞口大于第二敞口阈值,服务器生成敞口告警信息,并向对应的业务人员输出该敞口告警信息。When the trading exposure of any one of the multiple trading time periods is greater than the first exposure threshold, or when the cumulative trading exposure is greater than the second exposure threshold, the server generates exposure warning information and sends a notification to the corresponding business personnel. Output the exposure warning information.
如图5所示,在展示页面可以显示大盘当前的一个小时内的累计敞口,以及显示大盘在当日的累计敞口。当小时累计敞口大于对应的阈值,或者日累计敞口大于对应的阈值,可以生成对应的告警信息,且超出阈值的不同程度,对应不同等级的告警信息,不同等级的告警信息可以帮助后续的业务人员为告警信息排序出处理优先级。As shown in Figure 5, the display page can display the current cumulative exposure of the market within one hour, as well as the cumulative exposure of the market on the current day. When the hourly cumulative exposure is greater than the corresponding threshold, or the daily cumulative exposure is greater than the corresponding threshold, corresponding alarm information can be generated, and different levels of exceeding the threshold correspond to different levels of alarm information, and different levels of alarm information can help follow-up The business personnel sort out the processing priority for the alarm information.
请参见图9,图9是本申请实施例提供的一种展示页面的示意图,在展示页面中显示出每种资源数据类型(外币类型)对应的敞口(可以是小时累计敞口,或者可以是日累计敞口),以及每种资源数据类型的损益(可以是小时累计损益,或者可以是日累计损益)。从资源数据类型的角度,分析每种资源数据类型所承担的风险,以及大盘损益。Please refer to FIG. 9. FIG. 9 is a schematic diagram of a display page provided by an embodiment of the present application. The display page displays the corresponding exposure of each resource data type (foreign currency type) (which may be hourly cumulative exposure, or may be is the daily cumulative exposure), and the profit and loss for each resource data type (which can be hourly cumulative profit or loss, or it can be daily cumulative profit and loss). From the perspective of resource data types, analyze the risks borne by each resource data type, as well as the gains and losses of the broader market.
其中,每种资源数据类型的敞口就是将属于同一种资源数据类型的目标交易数据的转换交易量进行叠加,即可得到该种资源数据类型对应的敞口。Among them, the exposure of each resource data type is to superimpose the conversion transaction volume of the target transaction data belonging to the same resource data type, and then the exposure corresponding to this resource data type can be obtained.
可选的,当服务器获取到损益告警信息,或者获取到交易告警信息,或者获取到敞口告警信息时,服务器可以展示对应告警信息的业务处置页面,使得业务人员可以在业务处置页面上生成用户处置指令。或者,服务器可以生成业务处置页面,并将该业务处置页面推送至对应的业务处置人员,以使对应的业务处置人员可以业务处置页面上生成用户处置指令。Optionally, when the server obtains profit and loss warning information, or obtains transaction warning information, or obtains exposure warning information, the server can display a business handling page corresponding to the warning information, so that business personnel can generate user information on the business handling page. Disposition instructions. Alternatively, the server may generate a service handling page, and push the service handling page to the corresponding service handling personnel, so that the corresponding service handling personnel can generate user handling instructions on the service handling page.
请参见图10,图10是本申请实施例提供的一种业务处置页面的示意图,图 10对应的业务处置页面是针对交易告警信息的业务处置页面,在业务处置页面中可展示交易对象的标识,资源数据类型,预测交易量和实时累计交易量。当然,实时累计交易量是大于预测交易量的。业务人员根据业务处置页面所展示的信息,可以勾选对应的处置操作,后续可以根据业务人员所勾选的处置操作生成用户处置指令,服务器可以基于用户处置指令执行对应的业务操作。Please refer to FIG. 10. FIG. 10 is a schematic diagram of a business handling page provided by an embodiment of the present application. The business handling page corresponding to FIG. 10 is a business handling page for transaction alarm information, and the identifier of the transaction object can be displayed on the business handling page. , resource data types, forecast transaction volume and real-time cumulative transaction volume. Of course, the real-time cumulative transaction volume is greater than the predicted transaction volume. According to the information displayed on the business disposal page, the business personnel can select the corresponding disposal operations, and subsequently can generate user disposal instructions according to the disposal operations checked by the business personnel, and the server can execute the corresponding business operations based on the user disposal instructions.
从前述可知,跨境收单业务的风险感知和评估系统可以展示每个结算时间段的总损益、累计损益以及每种资源数据类型的损益,分析损益原因,生成告警信息,以及跳转业务处置页面。下面对上述系统在可视化方面上的实现进行说明:As can be seen from the foregoing, the risk perception and assessment system for cross-border acquiring business can display the total profit and loss, cumulative profit and loss of each settlement period, and profit and loss of each resource data type, analyze the reasons for profit and loss, generate alarm information, and jump to business disposal page. The implementation of the above system in terms of visualization is described below:
前端主要是对数据进行可视化处理,方便对关键数据进行分析、告警和展示,在node中间层开启进程进行数据的查询和接口合并处理,前端使用基于vue 框架+echart进行数据可视化展示,node中间层采用egg框架。涉及的技术框架如下表1所示:The front-end is mainly for data visualization, which is convenient for analyzing, alarming and displaying key data. The process is started in the middle layer of node for data query and interface merging processing. Adopt egg frame. The technical framework involved is shown in Table 1 below:
表1Table 1
如图11所示,在展示端使用了基于MVVM模式设计的vue框架,公共组件库elementUI和图表库echart,运用elementUI的公共组件整合成粒度更大的业务组件。依托Echart丰富的图表库,对node层处理过后的数据进行展示。As shown in Figure 11, the vue framework based on the MVVM pattern design is used on the display side, the public component library elementUI and the chart library echart, and the public components of elementUI are used to integrate the business components with larger granularity. Relying on Echart's rich chart library, the data processed by the node layer is displayed.
数据的展示处理:Data display processing:
当需要展示比率(包含交易比率和结算比率)时,由于比率数值偏差比较小,因此需要在展示上需要明显体现出涨跌的幅度,纵坐标展示汇率的最低值和最高值,在最低值和最高值之间根据偏差进行排列,这样能达到明显的波动的效果。When it is necessary to display the ratio (including transaction ratio and settlement ratio), since the deviation of the ratio value is relatively small, it is necessary to clearly reflect the range of ups and downs on the display, and the ordinate shows the lowest and highest value of the exchange rate. The highest values are arranged according to the deviation, so that the effect of obvious fluctuation can be achieved.
当需要展示每个结算时间段的总损益,或者需要展示每个交易时间段的交易敞口是,横坐标数据可能比较密集,在这种条件下,对横坐标的点于点之间做间隔处理,即首先展示部分横坐标的点,隐藏部分横坐标的点,当光标移动至被隐藏横坐标的点时,再展示被隐藏横坐标的点。达到展示疏密适当,数据趋势保持的效果。When the total profit and loss of each settlement period needs to be displayed, or the trading exposure of each trading period needs to be displayed, the data on the abscissa may be dense. Under such conditions, the points on the abscissa should be spaced Processing, that is, firstly display some points of abscissa, hide some points of abscissa, when the cursor moves to the point of hidden abscissa, then display the point of hidden abscissa. To achieve the effect of displaying appropriate density and maintaining data trends.
为了更好地达到可视化效果,对node层的部分接口进行合并,被合并的接口是可以获取首屏数据的接口,且对首屏数据进行异步请求,非首屏数据进行懒加载。接口合并后可以减少首屏的http请求,达到优化首屏的目的。In order to achieve a better visualization effect, some interfaces of the node layer are merged. The merged interface is the interface that can obtain the first screen data, and asynchronously requests the first screen data, and the non-first screen data is lazy loaded. After the interfaces are merged, the http requests of the first screen can be reduced, and the purpose of optimizing the first screen can be achieved.
如图12所示,Node中间层采用egg框架,egg继承了koa框架,中间件的编写风格选择洋葱圈模型,为上层提供架构能力,高度可扩展的插件机制,一个插件可以包含extend(扩展基础对象的上下文),middleware(增加一个或多个中间件),config(配置各个环境下插件自身的默认配置项)。在规范化的目录结构下进行功能迭代开发,其中包含了路由层、控制层、服务层、中间件、 schedule等。As shown in Figure 12, the middle layer of Node adopts the egg framework, egg inherits the koa framework, and the middleware writing style selects the onion ring model to provide the upper layer with architectural capabilities and a highly extensible plug-in mechanism. object context), middleware (add one or more middleware), config (configure the default configuration items of the plugin itself in each environment). Iterative development of functions is carried out under a standardized directory structure, including routing layer, control layer, service layer, middleware, schedule, etc.
跨境收单业务的风险感知和评估系统在支持业务的过程中,中间件负责接口请求的安全过滤和请求的权限控制,在路由层配置对于的接口api路径,在 controler编写业务的接口,在server层编写sql语句调用mysql数据库,依托egg 的schedule来跑定时任务,定时查询,以监控业务数据的异常情况以及确定是否生成告警信息,让业务方缩短排查问题的时间。The risk perception and assessment system for cross-border acquiring business In the process of supporting the business, the middleware is responsible for the security filtering of interface requests and the permission control of requests, configure the API path for the interface in the routing layer, and write the interface of the business in the controller. The server layer writes sql statements to call the mysql database, and relies on egg's schedule to run scheduled tasks and query regularly to monitor abnormal business data and determine whether to generate alarm information, so that the business side can shorten the troubleshooting time.
如图13所示,跨境收单业务的风险感知和评估系统内部功能的安全性和稳定性有由外围的四个部分来进行支撑,包含了FiT权限系统、移动分析工具、aegis 前端监控、生成告警。实时性和有效性能够保证系统的稳定性和业务数据的稳定性。在跨境收单业务的风险感知和评估系统中,在egg框架中使用node插件,不影响原有的业务逻辑,在外层为系统提供保护和监控。有了外在的保护,让内在的功能得以顺利进行。As shown in Figure 13, the security and stability of the internal functions of the cross-border acquiring business risk perception and evaluation system are supported by four peripheral parts, including the FiT permission system, mobile analysis tools, aegis front-end monitoring, Generate an alert. Real-time performance and effectiveness can ensure the stability of the system and the stability of business data. In the risk perception and evaluation system of cross-border acquiring business, using the node plug-in in the egg framework does not affect the original business logic, and provides protection and monitoring for the system at the outer layer. With external protection, the internal functions can be carried out smoothly.
请参见图14,图14是本申请实施例提供的一种区块链的系统架构图。前述实施例中的服务器可以为图14中的节点1、或节点2或节点3或节点4,所有的节点可以组合为区块链系统,每个节点都包括硬件层、中间层、操作系统层和应用层。从图14中可以看出,区块链系统的中的每个节点所存储的区块链数据都相同。可以知道,上述节点可以包括计算机设备。下述实施例以目标区块链节点为执行主体进行描述,目标区块链节点是区块链系统中多个节点中的任一节点,目标区块链节点可以对应前述实施例中的服务器。Please refer to FIG. 14. FIG. 14 is a system architecture diagram of a blockchain provided by an embodiment of the present application. The server in the foregoing embodiment can be
请一并参见图15,图15是本申请实施例提供的一种数据处理的流程示意图,本实施例主要描述目标交易数据和已结算交易数据的监控与区块链技术的结合,数据处理包括如下步骤:Please refer to FIG. 15 together. FIG. 15 is a schematic flowchart of a data processing provided by an embodiment of the present application. This embodiment mainly describes the combination of the monitoring of target transaction data and settled transaction data with blockchain technology. The data processing includes: Follow the steps below:
步骤301,从区块链上获取已结算交易数据集合,所述已结算交易数据集合包括N个已结算交易数据,每个已结算交易数据均包括交易信息和资源数据类型,所述已结算交易数据集合对应K个资源数据类型,N,K均是正整数。Step 301: Obtain a set of settled transaction data from the blockchain, where the set of settled transaction data includes N pieces of settled transaction data, each settled transaction data includes transaction information and resource data types, and the settled transaction data The data set corresponds to K resource data types, and N and K are both positive integers.
具体的,当接收到监控请求时,目标区块链节点提取出监控请求所携带的区块高度,在区块链上读取该区块高度对应的区块,从该区块的区块体中读取数据,作为已结算交易数据集合。Specifically, when receiving the monitoring request, the target blockchain node extracts the block height carried by the monitoring request, reads the block corresponding to the block height on the blockchain, and extracts the block body from the block body. Read data from , as a collection of settled transaction data.
其中,当参与主体与跨境商户进行了结算时,目标区块链节点可以将已结算交易数据实时地存储在区块链上,并记录下已结算交易数据存储的区块高度。Among them, when the participant has settled with the cross-border merchant, the target blockchain node can store the settled transaction data on the blockchain in real time, and record the block height of the settled transaction data storage.
步骤S302,对所述已结算交易数据集合中的交易信息进行损益统计处理,得到每种资源数据类型的损益;Step S302, performing profit and loss statistical processing on the transaction information in the settled transaction data set to obtain the profit and loss of each resource data type;
步骤S303,当K个资源数据类型中存在M个资源数据类型的损益小于损益阈值时,获取M个资源数据类型的损益原因,并根据M个资源数据类型的损益原因生成损益告警信息,M是正整数,输出所述损益告警信息。Step S303, when the profit and loss of M resource data types in the K resource data types is less than the profit and loss threshold, obtain the profit and loss reasons of the M resource data types, and generate profit and loss alarm information according to the profit and loss reasons of the M resource data types, where M is positive. Integer, output the profit and loss alarm information.
其中,步骤S302-步骤S303的具体过程可以参见上述图3对应实施例中的步骤S102-步骤S104,。Wherein, for the specific process of step S302-step S303, reference may be made to step S102-step S104 in the embodiment corresponding to FIG. 3 above.
步骤304,将每个结算时间段的总损益、累计损益、每种资源数据类型的损益、M个资源数据类型的损益原因以及损益告警信息打包为区块,将所述区块存储至所述区块链上。Step 304: Package the total profit and loss, cumulative profit and loss, profit and loss of each resource data type, profit and loss reasons for M resource data types, and profit and loss alarm information into blocks, and store the blocks in the on the blockchain.
具体的,目标区块链节点可以将生成损益告警信息中间过程所计算得到的每个结算时间段的总损益、累计损益、每种资源数据类型的损益、M个资源数据类型的损益原因以及损益告警信息存储至区块体,计算上述每个结算时间段的总损益、累计损益、每种资源数据类型的损益、M个资源数据类型的损益原因以及损益告警信息的默克尔根,并获取当前区块链的最后一个区块的哈希值,目标区块链节点将计算出来的默克尔根、当前区块链的最后一个区块的哈希值以及当前时间戳存储至区块头。目标区块链节点将该区块头以及区块体组合为区块,并将该区块存储至目标区块链节点所维护的区块链,以及向其余的节点广播该区块,以使其余的节点将该区块添加至各自维护的区块链,使得各节点所维护的区块链达到同步。Specifically, the target blockchain node can calculate the total profit and loss of each settlement period, the cumulative profit and loss, the profit and loss of each resource data type, the profit and loss reasons for the M resource data types, and the profit and loss calculated by the intermediate process of generating profit and loss alarm information. The alarm information is stored in the block body, and the total profit and loss, cumulative profit and loss, profit and loss of each resource data type, profit and loss reasons for M resource data types, and Merkel root of profit and loss alarm information for each settlement period are calculated, and obtain The hash value of the last block of the current blockchain, the target blockchain node stores the calculated Merkle root, the hash value of the last block of the current blockchain, and the current timestamp in the block header. The target blockchain node combines the block header and the block body into a block, stores the block in the blockchain maintained by the target blockchain node, and broadcasts the block to the rest of the nodes, so that the rest of the The nodes of the node add the block to the blockchains they maintain, so that the blockchains maintained by each node are synchronized.
可选的,除了将每个结算时间段的总损益、累计损益、每种资源数据类型的损益、M个资源数据类型的损益原因以及损益告警信息存储在区块链上以外,还可以将异常交易对象、交易告警信息、每个交易时间段的交易敞口、累计交易敞口以及敞口告警信息等都存储在区块链上。Optionally, in addition to storing the total profit and loss, accumulated profit and loss, profit and loss of each resource data type, profit and loss reasons for M resource data types, and profit and loss alarm information in the blockchain for each settlement period, exceptions can also be stored on the blockchain. Transaction objects, transaction alarm information, transaction exposure for each transaction period, cumulative transaction exposure, and exposure alarm information are all stored on the blockchain.
上述可知,依托于区块链的完整属性以及不可篡改属性,可以保证目标区块链节点获取到的已结算交易数据集合是可信且未被篡改的,因此基于已结算交易数据集合所统计的每种资源数据类型的损益,以及生成的损益原因和损益告警信息也是可信任的,可以保证对已结算交易数据集合的统计结果的准确性。As can be seen from the above, relying on the complete attributes and non-tampering attributes of the blockchain, it can be ensured that the settled transaction data set obtained by the target blockchain node is credible and has not been tampered with. Therefore, based on the statistics of the settled transaction data set The profit and loss of each resource data type, as well as the generated profit and loss reasons and profit and loss alarm information are also trustworthy, which can ensure the accuracy of the statistical results of the settled transaction data set.
进一步的,请参见图16,其是本申请实施例提供的一种数据处理装置的结构示意图。如图16所示,数据处理装置1可以应用于上述图1-图15对应实施例中的服务器或者目标区块链节点。具体的,数据处理装置1可以是运行于计算机设备中的一个计算机程序(包括程序代码),例如该数据处理装置1为一个应用软件;该数据处理装置1可以用于执行本申请实施例提供的方法中的相应步骤。Further, please refer to FIG. 16 , which is a schematic structural diagram of a data processing apparatus provided by an embodiment of the present application. As shown in FIG. 16 , the
数据处理装置1可以包括:获取模块11、统计模块12、生成模块13和输出模块14。The
获取模块11,用于获取已结算交易数据集合,所述已结算交易数据集合包括N个已结算交易数据,每个已结算交易数据均包括交易信息和资源数据类型,所述已结算交易数据集合对应K个资源数据类型,N,K均是正整数;The acquisition module 11 is used to acquire a set of settled transaction data, the set of settled transaction data includes N pieces of settled transaction data, and each of the settled transaction data includes transaction information and resource data types, and the set of settled transaction data Corresponding to K resource data types, N and K are positive integers;
统计模块12,用于对所述已结算交易数据集合中的交易信息进行损益统计处理,得到每种资源数据类型的损益;A
生成模块13,用于当K个资源数据类型中存在M个资源数据类型的损益小于损益阈值时,获取M个资源数据类型的损益原因,并根据M个资源数据类型的损益原因生成损益告警信息,M是正整数;The generating
输出模块14,用于输出所述损益告警信息。The
在一种可能的实施方式中,统计模块12在用于对所述已结算交易数据集合中的交易信息进行损益统计处理,得到每种资源数据类型的损益时,具体用于:In a possible implementation manner, when the
将所述已结算交易数据集合划分为K个单位集合,每个单位集合中的资源数据类型相同;dividing the settled transaction data set into K unit sets, and the resource data types in each unit set are the same;
对每个单位集合中的交易信息分别进行损益统计处理,得到每种资源数据类型的损益。Statistical processing of profit and loss is performed on the transaction information in each unit set to obtain the profit and loss of each resource data type.
在一种可能的实施方式中,每个已结算交易数据还包括结算时间戳,所述已结算交易数据集合对应P个结算时间段;In a possible implementation manner, each settled transaction data further includes a settlement timestamp, and the settled transaction data set corresponds to P settlement time periods;
所述数据处理装置1还可以包括:第一展示模块15。The
第一展示模块15,用于对每个结算时间段对应的已结算交易数据中的交易信息进行损益统计处理,得到每种资源数据类型在每个结算时间段的损益,将每个结算时间段内的所有资源数据类型的损益叠加为每个结算时间段内的总损益,将每种资源数据类型的损益叠加为累计损益,在展示页面展示每个结算时间段的总损益、累计损益以及每种资源数据类型的损益。The
在一种可能的实施方式中,目标资源数据类型是M个资源数据类型中的任一资源数据类型,P个结算时间段包括第一结算时间段和第二结算时间段,第一结算时间段和第二结算时间段相邻,且第二结算时间段是P个结算时间段中的最大结算时间段;In a possible implementation, the target resource data type is any resource data type among the M resource data types, the P settlement time periods include a first settlement time period and a second settlement time period, and the first settlement time period is adjacent to the second settlement time period, and the second settlement time period is the largest settlement time period among the P settlement time periods;
生成模块13在用于确定目标资源数据类型的损益原因时,具体用于:When the generating
从所述已结算交易数据集合中抽取目标资源数据类型在第一结算时间段内的第一已结算交易数据集合;extracting a first settled transaction data set of the target resource data type within the first settlement time period from the settled transaction data set;
从所述已结算交易数据集合中抽取目标资源数据类型在第二结算时间段内的第二已结算交易数据集合;extracting a second set of settled transaction data of the target resource data type within the second settlement time period from the set of settled transaction data;
对所述第一已结算交易数据集合和第二已结算交易数据集合进行分析处理,得到交易量贡献率和比率贡献率;Analyzing and processing the first settled transaction data set and the second settled transaction data set to obtain a transaction volume contribution rate and a ratio contribution rate;
将交易量贡献率和比率贡献率组合为所述目标资源数据类型的损益原因。The transaction volume contribution rate and the ratio contribution rate are combined as the profit and loss reason for the target resource data type.
在一种可能的实施方式中,所述交易信息包括交易数据量、交易比率和结算比率;In a possible implementation, the transaction information includes transaction data volume, transaction ratio and settlement ratio;
生成模块13在用于对所述第一已结算交易数据集合和第二已结算交易数据集合进行分析处理,得到交易量贡献率和比率贡献率时,具体用于:When the generating
根据第一已结算交易数据集合中的交易比率确定第一交易比率均值,根据第一已结算交易数据集合中的结算比率确定第一结算比率均值,根据第一已结算交易数据集合中交易数据量确定第一交易总量;The first transaction ratio mean is determined according to the transaction ratio in the first settled transaction data set, the first settlement ratio average is determined according to the settlement ratio in the first settled transaction data set, and the transaction data volume in the first settled transaction data set is determined determine the first transaction volume;
根据第二已结算交易数据集合中的交易比率确定第二交易比率均值,根据第二已结算交易数据集合中的结算比率确定第二结算比率均值,根据第二已结算交易数据集合中交易数据量确定第二交易总量;The second transaction ratio mean is determined according to the transaction ratio in the second settled transaction data set, the second settlement ratio average is determined according to the settlement ratio in the second settled transaction data set, and the transaction data volume in the second settled transaction data set is determined determining the second transaction volume;
根据第一交易比率均值、第一结算比率均值和第一交易总量确定第一损益,根据第二交易比率均值、第二结算比率均值和第二交易总量确定第二损益,将第二损益减去第一损益得到损益变动;The first profit and loss is determined according to the average value of the first transaction ratio, the average value of the first settlement ratio and the first transaction volume, the second profit and loss is determined according to the average value of the second transaction ratio, the average value of the second settlement ratio and the second transaction volume, and the second profit and loss Subtract the first profit and loss to get the change in profit and loss;
根据第二交易总量、第一交易比率均值、第一结算比率均值、第一损益和损益变动确定交易量贡献率,根据第二损益和交易量贡献率确定比率贡献率。The transaction volume contribution rate is determined according to the second total transaction volume, the average first transaction ratio, the average first settlement ratio, the first profit and loss, and the change in profit and loss, and the ratio contribution rate is determined according to the second profit and loss and the transaction volume contribution rate.
在一种可能的实施方式中,所述获取模块11,还用于获取U个交易对象的目标交易数据,每个目标交易数据均包括交易数据量;In a possible implementation manner, the acquisition module 11 is further configured to acquire target transaction data of U transaction objects, and each target transaction data includes transaction data volume;
所述统计模块12,还用于对所述U个交易对象的目标交易数据中的交易数据量进行统计处理,得到U个交易对象中的异常交易对象,根据所述异常交易对象生成交易告警信息;The
所述输出模块14,还用于输出所述交易告警信息。The
在一种可能的实施方式中,每个目标交易数据还包括交易时间戳和交易比率;所述数据处理装置1还包括:第二展示模块16。In a possible implementation manner, each target transaction data further includes a transaction time stamp and a transaction ratio; the
第二展示模块16,用于根据目标交易数据的交易时间戳,将目标交易数据划分为多个目标交易数据集合,同一目标交易数据集合中的目标交易数据中的交易时间戳处于同一交易时间段内;The
第二展示模块16,还用于根据每个目标交易数据中的交易数据量和交易比率,确定每个目标交易数据的转换交易量,将同一目标交易数据集合中的目标交易数据的转换交易量分别进行叠加处理,得到每个交易时间段的交易敞口,将所有交易时间段的交易敞口叠加为累计交易敞口,在展示页面展示每个交易时间段的交易敞口以及累计交易敞口。The
在一种可能的实施方式中,所述生成模块13,还用于当多个交易时间段中的任一交易时间段的交易敞口大于第一敞口阈值时,或者当累计交易敞口大于第二敞口阈值时,生成敞口告警信息。In a possible implementation manner, the generating
在一种可能的实施方式中,统计模块12在用于对所述U个交易对象的目标交易数据中的交易数据量进行统计处理,得到U个交易对象中的异常交易对象时,具体用于:In a possible implementation manner, when the
将每个交易对象的目标交易数据中的交易数据量叠加为每个交易对象的累计交易数据量;Superimpose the transaction data volume in the target transaction data of each transaction object into the cumulative transaction data volume of each transaction object;
获取每个交易对象的预测交易数据量;Obtain the predicted transaction data volume of each transaction object;
将预测交易数据量大于累计交易数据量的交易对象作为异常交易对象。The transaction objects whose predicted transaction data volume is greater than the accumulated transaction data volume are regarded as abnormal transaction objects.
在一种可能的实施方式中,数据处理装置1还可以包括:第三展示模块17。In a possible implementation manner, the
第三展示模块17,用于将U个交易对象的累计交易数据量进行排序,得到排序结果,在展示页面展示所述排序结果。The third display module 17 is configured to sort the accumulated transaction data volumes of the U transaction objects to obtain a sorting result, and display the sorting result on the display page.
在一种可能的实施方式中,数据处理装置1还可以包括:第三展示模块18。In a possible implementation manner, the
第四展示模块18,用于当接收到损益告警信息时,或者当接收到交易告警信息时,展示业务处置页面,所述业务处置页面用于接收用户处置指令。The
在一种可能的实施方式中,所述已结算交易数据集合存储在区块链上;In a possible implementation, the set of settled transaction data is stored on a blockchain;
所述数据处理装置1还可以包括:存储模块19。The
存储模块19,用于将每个结算时间段的总损益、累计损益、每种资源数据类型的损益、M个资源数据类型的损益原因以及损益告警信息打包为区块,将所述区块存储至所述区块链上。The
根据本发明的一个实施例,图1-图15所示的方法所涉及的各个步骤均可以是由图16所示的数据处理装置中的各个模块来执行的。例如,图3中所示的步骤S101-S104可以分别由图16中所示的获取模块11、统计模块12、生成模块 13、输出模块14、第一展示模块15来执行;又如,图6中所示的步骤S204-步骤S206可以由图16中所示的获取模块11、统计模块12、输出模块14、第二展示模块16、第三展示模块17、第四展示模块18来执行;又如,图15中所示的步骤S304可以由图16中所示的存储模块19来执行。According to an embodiment of the present invention, each step involved in the method shown in FIG. 1 to FIG. 15 may be performed by each module in the data processing apparatus shown in FIG. 16 . For example, steps S101-S104 shown in FIG. 3 can be respectively performed by the acquisition module 11, the
进一步地,请参见图17,是本申请实施例提供的一种计算机设备的结构示意图。上述图1-图15对应实施例中的服务器或者目标区块链节点可以为计算机设备1000。如图17所示,计算机设备1000可以包括:用户接口1002、处理器 1004、编码器1006以及存储器1008。信号接收器1016用于经由蜂窝接口1010、 WIFI接口1012、...、或NFC接口1014接收或者发送数据。编码器1006将接收到的数据编码为计算机处理的数据格式。存储器1008中存储有计算机程序,处理器1004被设置为通过计算机程序执行上述任一项方法实施例中的步骤。存储器1008可包括易失性存储器(例如,动态随机存取存储器DRAM),还可以包括非易失性存储器(例如,一次性可编程只读存储器OTPROM)。在一些实例中,存储器1008可进一步包括相对于处理器1004远程设置的存储器,这些远程存储器可以通过网络连接至计算机设备1000。用户接口1002可以包括:键盘 1018和显示器1020。Further, please refer to FIG. 17 , which is a schematic structural diagram of a computer device provided by an embodiment of the present application. The server or target blockchain node in the embodiments corresponding to FIGS. 1 to 15 may be
在图17所示的计算机设备1000中,处理器1004可以用于调用存储器1008 中存储计算机程序,以实现:In the
获取已结算交易数据集合,所述已结算交易数据集合包括N个已结算交易数据,每个已结算交易数据均包括交易信息和资源数据类型,所述已结算交易数据集合对应K个资源数据类型,N,K均是正整数;Acquire a set of settled transaction data, the settled transaction data set includes N settled transaction data, each settled transaction data includes transaction information and resource data types, and the settled transaction data set corresponds to K resource data types , N, K are all positive integers;
对所述已结算交易数据集合中的交易信息进行损益统计处理,得到每种资源数据类型的损益;Performing profit and loss statistical processing on the transaction information in the settled transaction data set to obtain the profit and loss of each resource data type;
当K个资源数据类型中存在M个资源数据类型的损益小于损益阈值时,获取M个资源数据类型的损益原因,并根据M个资源数据类型的损益原因生成损益告警信息,M是正整数;When the profit and loss of M resource data types in the K resource data types is less than the profit and loss threshold, obtain the profit and loss reasons of the M resource data types, and generate profit and loss alarm information according to the profit and loss reasons of the M resource data types, where M is a positive integer;
输出所述损益告警信息。The profit and loss warning information is output.
在一个实施例中,处理器1004在执行对所述已结算交易数据集合中的交易信息进行损益统计处理,得到每种资源数据类型的损益时,具体执行以下步骤:将所述已结算交易数据集合划分为K个单位集合,每个单位集合中的资源数据类型相同;In one embodiment, the
对每个单位集合中的交易信息分别进行损益统计处理,得到每种资源数据类型的损益。Statistical processing of profit and loss is performed on the transaction information in each unit set to obtain the profit and loss of each resource data type.
在一个实施例中,每个已结算交易数据还包括结算时间戳,所述已结算交易数据集合对应P个结算时间段;In one embodiment, each settled transaction data further includes a settlement timestamp, and the set of settled transaction data corresponds to P settlement time periods;
处理器1004还执行以下步骤:
对每个结算时间段对应的已结算交易数据中的交易信息进行损益统计处理,得到每种资源数据类型在每个结算时间段的损益;Perform profit and loss statistical processing on the transaction information in the settled transaction data corresponding to each settlement time period, and obtain the profit and loss of each resource data type in each settlement time period;
将每个结算时间段内的所有资源数据类型的损益叠加为每个结算时间段内的总损益;Superimpose the profit and loss of all resource data types in each settlement period into the total profit and loss in each settlement period;
将每种资源数据类型的损益叠加为累计损益;Superimpose the profit and loss of each resource data type into cumulative profit and loss;
在展示页面展示每个结算时间段的总损益、累计损益以及每种资源数据类型的损益。The total profit and loss, cumulative profit and loss, and profit and loss of each resource data type for each settlement period are displayed on the display page.
在一个实施例中,目标资源数据类型是M个资源数据类型中的任一资源数据类型,P个结算时间段包括第一结算时间段和第二结算时间段,第一结算时间段和第二结算时间段相邻,且第二结算时间段是P个结算时间段中的最大结算时间段;In one embodiment, the target resource data type is any resource data type among M resource data types, and the P settlement time periods include a first settlement time period and a second settlement time period, and the first settlement time period and the second settlement time period The settlement time periods are adjacent, and the second settlement time period is the largest settlement time period among the P settlement time periods;
处理器1004在执行确定目标资源数据类型的损益原因时,具体执行以下步骤:When the
从所述已结算交易数据集合中抽取目标资源数据类型在第一结算时间段内的第一已结算交易数据集合;extracting a first settled transaction data set of the target resource data type within the first settlement time period from the settled transaction data set;
从所述已结算交易数据集合中抽取目标资源数据类型在第二结算时间段内的第二已结算交易数据集合;extracting a second set of settled transaction data of the target resource data type within the second settlement time period from the set of settled transaction data;
对所述第一已结算交易数据集合和第二已结算交易数据集合进行分析处理,得到交易量贡献率和比率贡献率;Analyzing and processing the first settled transaction data set and the second settled transaction data set to obtain a transaction volume contribution rate and a ratio contribution rate;
将交易量贡献率和比率贡献率组合为所述目标资源数据类型的损益原因。The transaction volume contribution rate and the ratio contribution rate are combined as the profit and loss reason for the target resource data type.
在一个实施例中,交易信息包括交易数据量、交易比率和结算比率;In one embodiment, the transaction information includes transaction data volume, transaction ratio and settlement ratio;
处理器1004在执行对所述第一已结算交易数据集合和第二已结算交易数据集合进行分析处理,得到交易量贡献率和比率贡献率时,具体执行以下步骤:When the
根据第一已结算交易数据集合中的交易比率确定第一交易比率均值,根据第一已结算交易数据集合中的结算比率确定第一结算比率均值,根据第一已结算交易数据集合中交易数据量确定第一交易总量;The first transaction ratio mean is determined according to the transaction ratio in the first settled transaction data set, the first settlement ratio average is determined according to the settlement ratio in the first settled transaction data set, and the transaction data volume in the first settled transaction data set is determined determine the first transaction volume;
根据第二已结算交易数据集合中的交易比率确定第二交易比率均值,根据第二已结算交易数据集合中的结算比率确定第二结算比率均值,根据第二已结算交易数据集合中交易数据量确定第二交易总量;The second transaction ratio mean is determined according to the transaction ratio in the second settled transaction data set, the second settlement ratio average is determined according to the settlement ratio in the second settled transaction data set, and the transaction data volume in the second settled transaction data set is determined determining the second transaction volume;
根据第一交易比率均值、第一结算比率均值和第一交易总量确定第一损益,根据第二交易比率均值、第二结算比率均值和第二交易总量确定第二损益,将第二损益减去第一损益得到损益变动;The first profit and loss is determined according to the average value of the first transaction ratio, the average value of the first settlement ratio and the first transaction volume, the second profit and loss is determined according to the average value of the second transaction ratio, the average value of the second settlement ratio and the second transaction volume, and the second profit and loss Subtract the first profit and loss to get the change in profit and loss;
根据第二交易总量、第一交易比率均值、第一结算比率均值、第一损益和损益变动确定交易量贡献率,根据第二损益和交易量贡献率确定比率贡献率。The transaction volume contribution rate is determined according to the second total transaction volume, the average first transaction ratio, the average first settlement ratio, the first profit and loss, and the change in profit and loss, and the ratio contribution rate is determined according to the second profit and loss and the transaction volume contribution rate.
在一个实施例中,处理器1004还执行以下步骤:In one embodiment, the
获取U个交易对象的目标交易数据,每个目标交易数据均包括交易数据量;Obtain the target transaction data of U transaction objects, each target transaction data includes the transaction data volume;
对所述U个交易对象的目标交易数据中的交易数据量进行统计处理,得到 U个交易对象中的异常交易对象,根据所述异常交易对象生成交易告警信息;Perform statistical processing on the transaction data volume in the target transaction data of the U transaction objects, obtain abnormal transaction objects in the U transaction objects, and generate transaction alarm information according to the abnormal transaction objects;
输出所述交易告警信息。The transaction warning information is output.
在一个实施例中,每个目标交易数据还包括交易时间戳和交易比率;In one embodiment, each target transaction data further includes a transaction timestamp and a transaction ratio;
处理器1004还执行以下步骤:
根据目标交易数据的交易时间戳,将目标交易数据划分为多个目标交易数据集合,同一目标交易数据集合中的目标交易数据中的交易时间戳处于同一交易时间段内;According to the transaction time stamp of the target transaction data, the target transaction data is divided into multiple target transaction data sets, and the transaction time stamps in the target transaction data in the same target transaction data set are in the same transaction time period;
根据每个目标交易数据中的交易数据量和交易比率,确定每个目标交易数据的转换交易量;Determine the conversion transaction volume of each target transaction data according to the transaction data volume and transaction ratio in each target transaction data;
将同一目标交易数据集合中的目标交易数据的转换交易量分别进行叠加处理,得到每个交易时间段的交易敞口;The converted transaction volumes of the target transaction data in the same target transaction data set are superimposed respectively to obtain the transaction exposure of each transaction time period;
将所有交易时间段的交易敞口叠加为累计交易敞口;Overlay the trading exposures of all trading time periods into cumulative trading exposures;
在展示页面展示每个交易时间段的交易敞口以及累计交易敞口。On the display page, the trading exposure and cumulative trading exposure of each trading time period are displayed.
在一个实施例中,处理器1004还执行以下步骤:In one embodiment, the
当多个交易时间段中的任一交易时间段的交易敞口大于第一敞口阈值时,或者当累计交易敞口大于第二敞口阈值时,生成敞口告警信息。When the trading exposure of any one of the multiple trading time periods is greater than the first exposure threshold, or when the accumulated trading exposure is greater than the second exposure threshold, the exposure warning information is generated.
在一个实施例中,处理器1004在执行对所述U个交易对象的目标交易数据中的交易数据量进行统计处理,得到U个交易对象中的异常交易对象时,具体执行以下步骤:In one embodiment, the
将每个交易对象的目标交易数据中的交易数据量叠加为每个交易对象的累计交易数据量;Superimpose the transaction data volume in the target transaction data of each transaction object into the cumulative transaction data volume of each transaction object;
获取每个交易对象的预测交易数据量;Obtain the predicted transaction data volume of each transaction object;
将预测交易数据量大于累计交易数据量的交易对象作为异常交易对象。The transaction objects whose predicted transaction data volume is greater than the accumulated transaction data volume are regarded as abnormal transaction objects.
在一个实施例中,处理器1004还执行以下步骤:In one embodiment, the
将U个交易对象的累计交易数据量进行排序,得到排序结果;Sort the cumulative transaction data volume of the U transaction objects to obtain the sorting result;
在展示页面展示所述排序结果。The sorting results are displayed on the display page.
在一个实施例中,处理器1004还执行以下步骤:In one embodiment, the
当接收到损益告警信息时,或者当接收到交易告警信息时,展示业务处置页面,所述业务处置页面用于接收用户处置指令。When the profit and loss alarm information is received, or when the transaction alarm information is received, a business handling page is displayed, and the business handling page is used for receiving user handling instructions.
在一个实施例中,所述已结算交易数据集合存储在区块链上;In one embodiment, the set of settled transaction data is stored on a blockchain;
处理器1004还执行以下步骤:
将每个结算时间段的总损益、累计损益、每种资源数据类型的损益、M个资源数据类型的损益原因以及损益告警信息打包为区块;Packing the total profit and loss, cumulative profit and loss, profit and loss of each resource data type, profit and loss reasons of M resource data types, and profit and loss alarm information for each settlement period into blocks;
将所述区块存储至所述区块链上。Store the block on the blockchain.
应当理解,本申请实施例中所描述的计算机设备1000可执行前文图1-图15 所对应实施例中对数据处理方法的描述,也可执行前文图16所对应实施例中对数据处理装置1的描述,在此不再赘述。另外,对采用相同方法的有益效果描述,也不再进行赘述。It should be understood that the
此外,这里需要指出的是:本申请实施例还提供了一种计算机存储介质,且计算机存储介质中存储有前文提及的数据处理装置1所执行的计算机程序,且计算机程序包括程序指令,当处理器执行程序指令时,能够执行前文图1-图 15所对应实施例中对数据处理方法的描述,因此,这里将不再进行赘述。另外,对采用相同方法的有益效果描述,也不再进行赘述。对于本申请所涉及的计算机存储介质实施例中未披露的技术细节,请参照本申请方法实施例的描述。作为示例,程序指令可以被部署在一个计算机设备上执行,或者在位于一个地点的多个计算机设备上执行,又或者,分布在多个地点且通过通信网络互联的多个计算机设备上执行,分布在多个地点且通过通信网络互联的多个计算机设备可以组合为区块链网络。In addition, it should be pointed out here that the embodiment of the present application also provides a computer storage medium, and the computer storage medium stores the computer program executed by the aforementioned
根据本申请的一个方面,提供了一种计算机程序产品或计算机程序,该计算机程序产品或计算机程序包括计算机指令,该计算机指令存储在计算机可读存储介质中。计算机设备的处理器从计算机可读存储介质读取该计算机指令,处理器执行该计算机指令,使得该计算机设备可以执行前文图1到图15所对应实施例中的方法,因此,这里将不再进行赘述。According to one aspect of the present application, there is provided a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device can execute the methods in the foregoing embodiments corresponding to FIG. 1 to FIG. Repeat.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,上述程序可存储于一计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,上述存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory, ROM)或随机存储记忆体(Random AccessMemory,RAM)等。Those of ordinary skill in the art can understand that all or part of the process in the method of the above embodiment can be implemented by instructing the relevant hardware through a computer program, and the above program can be stored in a computer-readable storage medium. , may include the flow of the above-mentioned method embodiments. The above-mentioned storage medium may be a magnetic disk, an optical disk, a read-only memory (Read-Only Memory, ROM), or a random access memory (Random Access Memory, RAM) or the like.
以上所揭露的仅为本申请较佳实施例而已,当然不能以此来限定本申请之权利范围,因此依本申请权利要求所作的等同变化,仍属本申请所涵盖的范围。The above disclosures are only the preferred embodiments of the present application, and of course, the scope of the rights of the present application cannot be limited by this. Therefore, equivalent changes made according to the claims of the present application are still within the scope of the present application.
Claims (15)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202110228940.6A CN114997870A (en) | 2021-03-02 | 2021-03-02 | Data processing method, data processing device, computer equipment and storage medium |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202110228940.6A CN114997870A (en) | 2021-03-02 | 2021-03-02 | Data processing method, data processing device, computer equipment and storage medium |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN114997870A true CN114997870A (en) | 2022-09-02 |
Family
ID=83018136
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202110228940.6A Pending CN114997870A (en) | 2021-03-02 | 2021-03-02 | Data processing method, data processing device, computer equipment and storage medium |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN114997870A (en) |
Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20160314471A1 (en) * | 2015-04-24 | 2016-10-27 | Fmr Llc | Aberrant and Diminished Activity Detector Apparatuses, Methods and Systems |
| CN110175902A (en) * | 2019-04-09 | 2019-08-27 | 昆山古鳌电子机械有限公司 | A kind of risk management and control method |
| CN110717762A (en) * | 2019-12-16 | 2020-01-21 | 腾讯科技(深圳)有限公司 | Data processing method, data processing device, node equipment and storage medium |
| US10825074B1 (en) * | 2020-02-06 | 2020-11-03 | Capital One Services, Llc | Methods and systems for anonymizing and providing access to transaction data |
| CN112116481A (en) * | 2019-06-21 | 2020-12-22 | 腾讯科技(深圳)有限公司 | Income posting processing method and device, alarm server and storage medium |
| CN112150214A (en) * | 2020-10-20 | 2020-12-29 | 腾讯科技(深圳)有限公司 | A data prediction method, apparatus and computer-readable storage medium |
| CN112416724A (en) * | 2020-12-04 | 2021-02-26 | 中国建设银行股份有限公司 | Alarm processing method, system, computer equipment and storage medium |
-
2021
- 2021-03-02 CN CN202110228940.6A patent/CN114997870A/en active Pending
Patent Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20160314471A1 (en) * | 2015-04-24 | 2016-10-27 | Fmr Llc | Aberrant and Diminished Activity Detector Apparatuses, Methods and Systems |
| CN110175902A (en) * | 2019-04-09 | 2019-08-27 | 昆山古鳌电子机械有限公司 | A kind of risk management and control method |
| CN112116481A (en) * | 2019-06-21 | 2020-12-22 | 腾讯科技(深圳)有限公司 | Income posting processing method and device, alarm server and storage medium |
| CN110717762A (en) * | 2019-12-16 | 2020-01-21 | 腾讯科技(深圳)有限公司 | Data processing method, data processing device, node equipment and storage medium |
| US10825074B1 (en) * | 2020-02-06 | 2020-11-03 | Capital One Services, Llc | Methods and systems for anonymizing and providing access to transaction data |
| CN112150214A (en) * | 2020-10-20 | 2020-12-29 | 腾讯科技(深圳)有限公司 | A data prediction method, apparatus and computer-readable storage medium |
| CN112416724A (en) * | 2020-12-04 | 2021-02-26 | 中国建设银行股份有限公司 | Alarm processing method, system, computer equipment and storage medium |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US9947048B2 (en) | Apparatus and methods for implementing changed monitoring conditions and/or requirements using dynamically-modifiable control logic | |
| Li et al. | Rounding errors and volatility estimation | |
| CN111090780A (en) | Method and device for determining suspicious transaction information, storage medium and electronic equipment | |
| CN109118012B (en) | Industrial dynamic multi-dimensional energy consumption cost prediction method, system, storage medium and terminal | |
| Todorova et al. | A comparative study of range‐based stock return volatility estimators for the German market | |
| CN113869602A (en) | Method and system for predicting demand of spare parts of nuclear power plant, computer equipment and storage medium | |
| CN114372681A (en) | Enterprise classification method, device, equipment, medium and product based on flow data | |
| CN113553234A (en) | Data Anomaly Detection Methods | |
| CN119887385A (en) | Asset management system, method, computing device, storage medium, and program product | |
| CN118096392B (en) | Intelligent identification method and system for economic risk | |
| CN113129127A (en) | Early warning method and device | |
| CN114997870A (en) | Data processing method, data processing device, computer equipment and storage medium | |
| CN111164633B (en) | Method and device for adjusting scoring card model, server and storage medium | |
| CN108429632B (en) | Service monitoring method and device | |
| CN114387085B (en) | Method, device, computer equipment and storage medium for processing stream data | |
| CN112967129B (en) | A method, device, computer equipment and storage medium for calculating financial data | |
| CN114647433A (en) | Application processing method and device, storage medium and electronic device | |
| CN114722907A (en) | Method and device for generating game property supply and demand change prediction model | |
| CN114240650A (en) | Data monitoring method and device, nonvolatile storage medium and electronic equipment | |
| Ratliff-Crain et al. | Revisiting Cont's stylized facts for modern stock markets | |
| CN112330182A (en) | Quantitative analysis method and device for economic operation condition | |
| Ahmed et al. | Forecasting GDP of Bangladesh using time series analysis | |
| Weiss | Short-Term Effects of Extreme Heat, Cold, and Air Pollution Episodes on Excess Mortality in Luxembourg | |
| CN118153770A (en) | Resource amount prediction method, device and equipment for virtual resources and storage medium | |
| US20250225540A1 (en) | System and method for analyzing data sets using indexing |
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: 40073425 Country of ref document: HK |