Virtual Resource Early Warning Processing Method, Related Device and Medium

By classifying and predicting virtual resource transactions on blockchains, the method improves transaction security through predictive modeling and risk detection.

CN119377063BActive Publication Date: 2025-07-15李力
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411261562.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-10
Publication Date
2025-07-15
Estimated Expiration
2044-09-10

AI Technical Summary

Technical Problem

In the prior art, the security of virtual resource transactions on the blockchain cannot be effectively guaranteed, and there are security risks when users participate in virtual resource transactions.

Method used

By obtaining historical virtual resource transactions on the target blockchain, classifying and clustering, determining the correlation coefficient and overall correlation parameters of statistical parameters on the chain, training the target prediction model, using the statistical parameters of the current time to predict the total amount of virtual resources and issuing early warnings to improve security.

Benefits of technology

The security of virtual resource transaction processing on the blockchain is improved, and early warning is issued in a timely manner through an accurate prediction model to reduce virtual resource losses.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119377063B_ABST
    Figure CN119377063B_ABST
Patent Text Reader

Abstract

The present disclosure provides a method for virtual resource early warning processing, related devices, and media. The method includes: classifying historical virtual resource transactions based on historical transaction attributes to obtain virtual resource transaction classes; determining first historical values of multiple on-chain statistical parameters of the virtual resource transaction classes based on each historical virtual resource transaction in the virtual resource transaction classes; determining an overall correlation parameter for each on-chain statistical parameter; determining a target on-chain statistical parameter based on the overall correlation parameters of each on-chain statistical parameter; training a target prediction model based on the first historical value of the target on-chain statistical parameter; inputting the actual value of the target on-chain statistical parameter into the target prediction model to obtain the current predicted total amount of virtual resources on the target blockchain, and issuing an early warning based on the current predicted total amount of virtual resources. The embodiments of the present disclosure improve the security of virtual resource transaction processing on the blockchain. The present disclosure can be applied to scenarios such as virtual resource platform early warning.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of data processing, and in particular, to a method for warning processing of virtual resources, related devices, and media. Background Art

[0002] Currently, blockchains are often used to record virtual resource transactions. Users participate in virtual resource transactions. The virtual resource transactions are recorded on the blockchain. In the prior art, the security of users participating in virtual resource transactions cannot be guaranteed. There is a need for a technology to improve the security of virtual resource transaction processing on the blockchain. Summary of the Invention

[0003] Embodiments of the present disclosure provide a method for warning processing of virtual resources, related devices, and media, which can improve the security of virtual resource transaction processing on the blockchain.

[0004] According to one aspect of the present disclosure, there is provided a method for warning processing of virtual resources, including:

[0005] Obtain historical virtual resource transactions recorded on a target blockchain, and obtain historical transaction attributes from historical transaction attribute fields in the historical virtual resource transactions;

[0006] Classify the historical virtual resource transactions based on the historical transaction attributes to obtain virtual resource transaction classes;

[0007] Based on each historical virtual resource transaction in the virtual resource transaction classes, determine first historical values of multiple on-chain statistical parameters of the virtual resource transaction classes;

[0008] For each on-chain statistical parameter, based on the first historical value of the on-chain statistical parameter, determine a correlation coefficient between the on-chain statistical parameter and the total amount of virtual resources on the target blockchain, and based on the correlation coefficients corresponding to each virtual resource transaction class, determine an overall correlation parameter of the on-chain statistical parameter;

[0009] Based on the overall correlation parameters of each on-chain statistical parameter, determine a target on-chain statistical parameter among the multiple on-chain statistical parameters;

[0010] Train a target prediction model based on the first historical value of the target on-chain statistical parameter;

[0011] Obtain an actual value of the target on-chain statistical parameter at the current time, input the actual value into the target prediction model to obtain a current predicted total amount of virtual resources on the target blockchain, and issue a warning based on the current predicted total amount of virtual resources.

[0012] According to one aspect of the present disclosure, there is provided a virtual resource early warning processing device, including:

[0013] A first acquisition unit, configured to acquire historical virtual resource transactions recorded on a target blockchain, and acquire historical transaction attributes from historical transaction attribute fields in the historical virtual resource transactions;

[0014] A classification unit, configured to classify the historical virtual resource transactions based on the historical transaction attributes to obtain virtual resource transaction classes;

[0015] A first determination unit, configured to determine first historical values of a plurality of on-chain statistical parameters of the virtual resource transaction class based on each historical virtual resource transaction in the virtual resource transaction class;

[0016] A second determination unit, configured to, for each of the on-chain statistical parameters, determine a correlation coefficient between the on-chain statistical parameter and the total amount of virtual resources on the target blockchain based on the first historical value of the on-chain statistical parameter, and determine an overall correlation parameter of the on-chain statistical parameter based on the correlation coefficients corresponding to each virtual resource transaction class;

[0017] A third determination unit, configured to determine a target on-chain statistical parameter among the plurality of on-chain statistical parameters based on the overall correlation parameter of each of the on-chain statistical parameters;

[0018] A training unit, configured to train a target prediction model based on the first historical value of the target on-chain statistical parameter;

[0019] A second acquisition unit, configured to acquire an actual value of the target on-chain statistical parameter at the current time, input the actual value into the target prediction model to obtain a current predicted total amount of virtual resources on the target blockchain, and issue an early warning based on the current predicted total amount of virtual resources.

[0020] Optionally, the first acquisition unit is specifically configured to:

[0021] Acquire historical virtual resource blocks on the target blockchain;

[0022] Decompose the historical virtual resource blocks into the historical virtual resource transactions.

[0023] Optionally, the historical transaction attribute is a historical transaction type;

[0024] The classification unit is specifically configured to:

[0025] Group the historical virtual resource transactions of the same historical transaction type into the same virtual resource transaction class.

[0026] Optionally, the historical transaction attributes are multiple historical transaction attributes, and the classification unit is specifically configured to:

[0027] Based on the multiple historical transaction attributes of the historical virtual resource transactions, use a clustering algorithm to cluster the multiple historical virtual resource transactions to obtain the virtual resource transaction classes.

[0028] Optionally, the first determining unit is specifically configured to:

[0029] In each historical time period, based on each historical virtual resource transaction in the virtual resource transaction classes obtained in the historical time period, determine a first historical sub-value of the multiple on-chain statistical parameters corresponding to the historical time period;

[0030] For a single on-chain statistical parameter, generate a first historical sub-value vector based on the first historical sub-values obtained in each historical time period, as the first historical value of the on-chain statistical parameter.

[0031] Optionally, the second determining unit is specifically configured to:

[0032] Obtain a correlation coefficient function, where the correlation coefficient function is a function of the first historical value and the total amount of virtual resources on the target blockchain;

[0033] Obtain the total amount of virtual resources on the target blockchain in the historical time period corresponding to the first historical value;

[0034] Substitute the first historical value and the total amount of virtual resources on the target blockchain into the correlation coefficient function to obtain the correlation coefficient.

[0035] Optionally, the second determining unit is specifically further configured to:

[0036] Obtain the number of virtual resources on the target blockchain in the historical time period corresponding to the first historical value;

[0037] Obtain the unit resource amount represented by a single virtual resource in the historical time period;

[0038] Based on the number of virtual resources on the target blockchain and the unit resource amount, determine the total amount of virtual resources on the target blockchain in the historical time period corresponding to the first historical value.

[0039] Optionally, the second determining unit is specifically further configured to:

[0040] The determining of the overall correlation parameter of the on-chain statistical parameter based on the correlation coefficients corresponding to each virtual resource transaction class includes:

[0041] Obtain the class weights of each virtual resource transaction class;

[0042] Based on the correlation coefficients and the class weights of each virtual resource transaction class, calculate the overall correlation parameter of the on-chain statistical parameter.

[0043] Optionally, the third determination unit is specifically configured to:

[0044] Determine the on-chain statistical parameter with the largest overall correlation parameter as the target on-chain statistical parameter.

[0045] Optionally, the target prediction model is a linear regression model, and the linear regression model has a linear coefficient and an offset;

[0046] The training unit is specifically configured to:

[0047] Determine the first logarithm of the first historical value;

[0048] Obtain the total amount of virtual resources on the target blockchain in the historical time period corresponding to the first historical value;

[0049] Determine the second logarithm of the total amount of virtual resources on the target blockchain;

[0050] Use the first logarithm as the input of the linear regression model and the second logarithm as the output of the linear regression model to solve for the linear coefficient and the offset.

[0051] Optionally, the target on-chain statistical parameter is multiple target on-chain statistical parameters whose overall correlation parameters meet a predetermined condition; the linear regression model has multiple linear coefficients corresponding to the multiple target on-chain statistical parameters respectively;

[0052] The training unit is specifically further configured to:

[0053] Determine the first logarithms of the respective first historical values of the multiple target on-chain statistical parameters;

[0054] Use the first logarithms of the respective first historical values of the multiple target on-chain statistical parameters as the input of the linear regression model and the second logarithm as the output of the linear regression model to solve for the offset and the linear coefficients corresponding to the respective target on-chain statistical parameters.

[0055] Optionally, the second obtaining unit is specifically configured to:

[0056] Obtain the actual values of the multiple target on-chain statistical parameters at the current time, input the actual values of the multiple target on-chain statistical parameters into the target prediction model, and perform operations based on the offset and the linear coefficients corresponding to the respective target on-chain statistical parameters to obtain the current predicted total virtual resources.

[0057] Optionally, the target on-chain statistical parameters are multiple target on-chain statistical parameters whose overall correlation parameters meet a predetermined condition; the linear regression model includes multiple linear regression sub-models, and each linear regression sub-model has a linear coefficient and an offset corresponding to one of the target on-chain statistical parameters;

[0058] The training unit is specifically further configured to:

[0059] Determine the first logarithm of each of the multiple first historical values of the multiple target on-chain statistical parameters;

[0060] For each target on-chain statistical parameter, use the first logarithm of the first historical value of the target on-chain statistical parameter as the input of the linear regression sub-model corresponding to the target on-chain statistical parameter, and use the second logarithm as the output of the linear regression sub-model corresponding to the target on-chain statistical parameter, and solve for the linear coefficient and the offset corresponding to the target on-chain statistical parameter.

[0061] Optionally, the second acquisition unit is specifically configured to:

[0062] Obtain the actual values of the multiple target on-chain statistical parameters at the current time, input the actual value of each target on-chain statistical parameter into the linear regression sub-model corresponding to the target on-chain statistical parameter, and obtain the sub-predicted total virtual resources corresponding to the target on-chain statistical parameter;

[0063] Determine the current predicted total virtual resources based on the sub-predicted total virtual resources corresponding to the respective target on-chain statistical parameters and the statistical parameter weights of the respective target on-chain statistical parameters.

[0064] Optionally, the second acquisition unit is specifically further configured to:

[0065] Determine the first difference between the current actual total virtual resources on the target blockchain and the current predicted total virtual resources;

[0066] If the first difference exceeds the risk degree threshold, issue the warning.

[0067] Optionally, the virtual resource warning processing device further includes:

[0068] A third acquisition unit, configured to acquire static attributes of a target user who is currently performing virtual resource transaction processing;

[0069] A fourth acquisition unit, configured to acquire an associated transaction associated with the target user from the historical virtual resource transactions recorded on the target blockchain;

[0070] A first input unit, configured to input the associated transaction into a label attribute recognition model to obtain label attributes of the target user;

[0071] A second input unit, configured to input the static attributes and the label attributes into a risk degree threshold prediction model to obtain the risk degree threshold.

[0072] Optionally, the virtual resource early warning processing device further includes:

[0073] A fourth determination unit, configured to determine a second difference between the first difference and the risk degree threshold;

[0074] A fifth acquisition unit, configured to acquire a current virtual resource amount in the resource pool of the target user;

[0075] A fifth determination unit, configured to determine a virtual resource reduction amount based on the current virtual resource amount and the second difference;

[0076] A reduction unit, configured to reduce the current virtual resource amount based on the virtual resource reduction amount.

[0077] Optionally, the second acquisition unit is specifically further configured to:

[0078] When the first difference exceeds the risk degree threshold, detect the duration for which the first difference exceeds the risk degree threshold;

[0079] If the duration exceeds a predetermined duration threshold, issue the early warning.

[0080] Optionally, the virtual resource early warning processing method is executed in a time period;

[0081] The second acquisition unit is specifically further configured to:

[0082] If the first difference exceeds the risk degree threshold, determine the number of consecutive time periods before the current time period for which the first difference exceeds the risk degree threshold;

[0083] Determine an early warning level based on the number of consecutive time periods;

[0084] Issue the early warning based on the early warning level.

[0085] According to one aspect of the present disclosure, an electronic device is provided, including a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, the virtual resource warning processing method as described above is implemented.

[0086] According to one aspect of the present disclosure, a computer-readable storage medium is provided. The storage medium stores a computer program, and when the computer program is executed by a processor, the virtual resource warning processing method as described above is implemented.

[0087] According to one aspect of the present disclosure, a computer program product is provided. The computer program product includes a computer program, and the computer program is read and executed by a processor of a computer device, so that the computer device executes the virtual resource warning processing method as described above.

[0088] In the embodiments of the present disclosure, the actual value of the target on-chain statistical parameter at the current time on the target blockchain is obtained, and the actual value is input into the pre-trained target prediction model to obtain the current predicted total amount of virtual resources on the target blockchain. The security of virtual resource transaction processing on the blockchain is related to the current predicted total amount of virtual resources. Therefore, based on the current predicted total amount of virtual resources, a warning can be issued when the virtual resource transaction processing is unsafe. In this way, the security of virtual resource transaction processing on the blockchain can be improved. When training the target prediction model, the historical virtual resource transactions recorded on the target blockchain are obtained, and the first historical values of multiple on-chain statistical parameters are determined based on the historical virtual resource transactions, and the overall correlation parameter of each on-chain statistical parameter is determined accordingly. Based on the overall correlation parameters of each on-chain statistical parameter, the target on-chain statistical parameter can be determined among multiple on-chain statistical parameters, and the target prediction model is trained accordingly. Since this process determines the target on-chain statistical parameter from multiple on-chain statistical parameters using the overall correlation parameter, the trained target prediction model has higher accuracy, thereby further improving the security of virtual resource transaction processing on the blockchain. When determining the overall correlation parameter of each on-chain statistical parameter, the historical transaction attributes are obtained from the historical transaction attribute fields in the historical virtual resource transactions, and the historical virtual resource transactions are classified accordingly. For each category, the first historical values of multiple on-chain statistical parameters are determined. Accordingly, for each on-chain statistical parameter, the correlation coefficients of each category are determined, and then the overall correlation parameter is determined. This process takes into account the different characteristics of each category to determine the correlation coefficients of each category, so that the calculated correlation coefficients are more representative, making the finally determined overall correlation parameter more accurate and improving the security of virtual resource transaction processing on the blockchain.

[0089] Other features and advantages of the present disclosure will be set forth in the following description, and in part will be obvious from the description, or may be learned by practice of the present disclosure. The objectives and other advantages of the present disclosure may be realized and attained by the structure particularly pointed out in the specification, claims and drawings. Description of the Drawings

[0090] The drawings are used to provide a further understanding of the technical solution of the present disclosure, and constitute a part of the specification. Together with the embodiments of the present disclosure, they are used to explain the technical solution of the present disclosure, and do not constitute a limitation to the technical solution of the present disclosure.

[0091] Figure 1 is a framework diagram of the system to which the virtual resource early warning processing method according to the embodiment of the present disclosure is applied;

[0092] Figure 2A and Figure 2B is a schematic diagram of the interface in the scenario of early warning on the virtual resource platform in the embodiment of the present disclosure;

[0093] Figure 3 is the overall flowchart of the virtual resource early warning processing method in the embodiment of the present disclosure;

[0094] Figure 4A is a schematic diagram for determining the statistical parameters on the target chain provided by the embodiment of the present disclosure;

[0095] Figure 4B is a schematic diagram of the virtual resource early warning processing method provided by the embodiment of the present disclosure;

[0096] Figure 5 is Figure 3 a flowchart of step 310 for obtaining historical virtual resource transactions in

[0097] Figure 6 is Figure 3 a flowchart of step 320 for obtaining virtual resource transaction classes in

[0098] Figure 7 is Figure 6 a schematic diagram for obtaining virtual resource transaction classes in

[0099] Figure 8 is Figure 3 another flowchart of step 320 for obtaining virtual resource transaction classes in

[0100] Figure 9 is Figure 8 a schematic diagram for obtaining virtual resource transaction classes in

[0101] Figure 10 is Figure 3A flowchart of step 330 in determining the first historical value;

[0102] Figure 11 Yes Figure 10 A schematic diagram of determining the first historical value in;

[0103] Figure 12 Yes Figure 3 A flowchart of step 640 in determining the correlation coefficient between the on-chain statistical parameter and the total amount of virtual resources on the target blockchain in;

[0104] Figure 13 Yes Figure 12 A flowchart of step 1220 in obtaining the total amount of virtual resources on the target blockchain in;

[0105] Figure 14 Yes Figure 3 A flowchart of step 340 in determining the overall correlation parameter of the on-chain statistical parameter in;

[0106] Figure 15 Yes Figure 3 A flowchart of step 350 in determining the on-chain statistical parameter of the target chain among multiple on-chain statistical parameters in;

[0107] Figure 16 Yes Figure 3 A flowchart of step 360 in training the target prediction model in;

[0108] Figure 17 A schematic diagram of the linear regression model provided by the embodiments of the present disclosure;

[0109] Figure 18 Yes Figure 16 A flowchart of training the target prediction model when the linear regression model has multiple linear coefficients respectively corresponding to multiple on-chain statistical parameters of the target chain in;

[0110] Figure 19 Yes Figure 18 A schematic diagram of training the target prediction model when the linear regression model has multiple linear coefficients respectively corresponding to multiple on-chain statistical parameters of the target chain in;

[0111] Figure 20 Yes Figure 16 A flowchart of training the target prediction model when the linear regression model includes multiple linear regression sub-models in;

[0112] Figure 21 Yes Figure 20 A schematic diagram of training the target prediction model when the linear regression model includes multiple linear regression sub-models in;

[0113] Figure 22 YesFigure 3 A flowchart of step 370 in determining the total amount of currently predicted virtual resources;

[0114] Figure 23 Yes Figure 3 Another flowchart of step 370 in determining the total amount of currently predicted virtual resources;

[0115] Figure 24 Yes Figure 3 A flowchart of step 370 in issuing a warning;

[0116] Figure 25 Yes Figure 24 A flowchart of step 2420 in issuing a warning;

[0117] Figure 26 Yes Figure 24 Another flowchart of step 2420 in issuing a warning;

[0118] Figure 27 Yes Figure 24 A schematic diagram of an interface in issuing a warning;

[0119] Figure 28 A flowchart of determining a risk degree threshold provided by an embodiment of the present disclosure;

[0120] Figure 29 Yes Figure 28 A schematic diagram of determining a risk degree threshold;

[0121] Figure 30 A flowchart of processing the amount of virtual resources in a warning state provided by an embodiment of the present disclosure;

[0122] Figure 31 Yes Figure 30 A schematic diagram of processing the amount of virtual resources in a warning state;

[0123] Figure 32 A schematic diagram of the structure of a virtual resource warning processing device according to an embodiment of the present disclosure;

[0124] Figure 33 Yes Figure 3 The structural diagram of a terminal executing the virtual resource warning processing method shown in;

[0125] Figure 34 Yes Figure 3 The structural diagram of a server executing the virtual resource warning processing method shown in. Specific embodiments

[0126] In order to make the objectives, technical solutions and advantages of the present disclosure more clear and understandable, the present disclosure will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present disclosure and are not used to limit the present disclosure.

[0127] Before further elaborating on the embodiments of the present disclosure, the nouns and terms involved in the embodiments of the present disclosure are described. The nouns and terms involved in the embodiments of the present disclosure are applicable to the following explanations:

[0128] Virtual resource: refers to various information and products existing on the Internet that can be acquired and used by users. These resources usually do not exist in physical form but are provided digitally.

[0129] Blockchain: Blockchain is a new application mode of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, and encryption algorithms. Essentially, it is a decentralized database, a series of data blocks generated by using cryptographic methods. Each data block contains information about a batch of transactions, used to verify the validity of the information and link to the previous block.

[0130] Currently, the blockchain is often used to record virtual resource transactions. Users participate in virtual resource transactions. Virtual resource transactions are recorded on the blockchain. In the prior art, the security of users participating in virtual resource transactions cannot be guaranteed. A technology for improving the security of virtual resource transaction processing on the blockchain is needed.

[0131] Based on this, the embodiments of the present disclosure provide a virtual resource early warning processing method, related device and medium, which can improve the security of virtual resource transaction processing on the blockchain.

[0132] System architecture and scenario description of the embodiments of the present disclosure

[0133] Figure 1 It is the system architecture diagram to which the virtual resource early warning processing method according to the embodiments of the present disclosure is applied. It includes: object terminal 110, Internet 120, gateway 130, and server 140.

[0134] The object terminal 110 is a device for the object to view the early warning messages of virtual resources. It includes various forms such as desktop computers, laptop computers, PDAs (Personal Digital Assistants), mobile phones, vehicle-mounted terminals, home theater terminals, and dedicated terminals. In addition, it can be a single device or a collection of multiple devices. For example, multiple devices are connected through a local area network and share a display device for collaborative work, jointly constituting a terminal. The object terminal 110 can also communicate with the Internet 120 in a wired or wireless manner to exchange data.

[0135] The gateway 130 is also known as an internetwork connector or protocol converter. The gateway 130 realizes network interconnection at the transport layer and is a computer system or device that acts as a converter. Between two systems using different communication protocols, data formats, or languages, or even with completely different architectures, the gateway 130 is a translator. At the same time, the gateway 130 can also provide filtering and security functions. Messages sent from the object terminal 110 to the server 140 need to be sent to the corresponding server 140 through the gateway 130. Messages sent from the server 140 to the object terminal 110 also need to be sent to the corresponding object terminal 110 through the gateway 130.

[0136] The server 140 refers to a computer system that can provide virtual resource warning processing services to the object terminal 110. Compared with the object terminal 110, the server 140 has higher requirements in terms of stability, security, performance, etc. The server 140 can be a high-performance computer in a network platform, a cluster of multiple high-performance computers, a part (such as a virtual machine) allocated from a high-performance computer, a combination of parts (such as virtual machines) allocated from multiple high-performance computers, etc. The server 140 can also communicate with the Internet 120 through wired or wireless means to exchange data.

[0137] The embodiments of the present disclosure can be applied in various scenarios, such as Figure 2A and Figure 2B the scenario of issuing a warning on a virtual resource platform as shown.

[0138] Figure 2A This is a schematic diagram of the interface of the virtual resource platform provided by the embodiments of the present disclosure. The amount of virtual resources held by user A on the virtual platform is 1000.

[0139] In addition, the virtual resource warning processing method provided by the embodiments of the present disclosure is applied to Figure 2A the virtual resource platform as shown to process the data on the target blockchain corresponding to the virtual resource platform, so as to generate a warning message as shown in Figure 2B shown. Figure 2BThe warning message shown in the figure indicates a relatively high risk of a decrease in the total amount of virtual resources corresponding to the virtual resources held by User A, and the security of virtual resource transaction processing is high or low. For example, the total amount of virtual resources corresponding to the virtual resources held by User A at the current time point is 1500, and after one day, the total amount of virtual resources corresponding to the virtual resources held by User A may decrease to 1300, or even less than 1000, resulting in losses. Therefore, when a warning message is displayed on the virtual resource platform, User A can choose to withdraw virtual resources to reduce the amount of virtual resources. When no warning message is displayed on the virtual resource platform, User A can choose to keep the current amount of virtual resources unchanged or obtain more virtual resources. It can be seen that the virtual resource warning processing method provided by the embodiments of the present disclosure can improve the security of virtual resource transaction processing on the blockchain.

[0140] It should be understood that the above content only shows an illustration of some application scenarios of the present disclosure. The business scenarios to which the present disclosure can be applied may include, but are not limited to, the specific embodiments listed above.

[0141] General description of the embodiments of the present disclosure

[0142] It should be emphasized that the embodiments of the present disclosure can be applied to a variety of application scenarios, such as scenarios of increasing or decreasing virtual resources based on virtual resource warnings. In the related art, the security of users participating in virtual resource transactions cannot be guaranteed. Some embodiments of the present disclosure provide a virtual resource warning processing method, related devices and media, which can improve the security of virtual resource transaction processing on the blockchain.

[0143] The virtual resource warning processing method is a method for processing data on a target blockchain to obtain a current predicted total amount of virtual resources and issue a warning based on the current total amount of virtual resources. This method can improve the security of virtual resource transaction processing on the blockchain.

[0144] The virtual resource warning processing method of the embodiments of the present disclosure can be executed on the object terminal 110, or on the server 140, or part of it can be executed on the object terminal 110 and the other part on the server 140.

[0145] As Figure 3 shown, according to an embodiment of the present disclosure, the virtual resource warning processing method includes:

[0146] Step 310, obtain the historical virtual resource transactions recorded on the target blockchain, and obtain the historical transaction attributes from the historical transaction attribute fields in the historical virtual resource transactions;

[0147] Step 320, classify the historical virtual resource transactions based on the historical transaction attributes to obtain virtual resource transaction classes;

[0148] Step 330: Determine the first historical values of multiple on-chain statistical parameters of the virtual resource transaction class based on each historical virtual resource transaction in the virtual resource transaction class;

[0149] Step 340: For each on-chain statistical parameter, determine the correlation coefficient between the on-chain statistical parameter and the total virtual resources on the target blockchain based on the first historical value of the on-chain statistical parameter, and determine the overall correlation parameter of the on-chain statistical parameter based on the correlation coefficients corresponding to each virtual resource transaction class;

[0150] Step 350: Determine the target on-chain statistical parameter among multiple on-chain statistical parameters based on the overall correlation parameters of each on-chain statistical parameter;

[0151] Step 360: Train the target prediction model based on the first historical value of the target on-chain statistical parameter;

[0152] Step 370: Obtain the actual value of the target on-chain statistical parameter at the current time, input the actual value into the target prediction model to obtain the current predicted total virtual resources on the target blockchain, and issue a warning based on the current predicted total virtual resources.

[0153] The following provides a detailed description of Steps 310 to 370.

[0154] In Step 310, obtain the historical virtual resource transactions recorded on the target blockchain, and obtain the historical transaction attributes from the historical transaction attribute fields in the historical virtual resource transactions.

[0155] The target blockchain is the blockchain that requires virtual resource warning processing. Blockchain is a distributed database technology that stores data in the form of a chained data structure. It can be said that the relevant data of virtual resources are stored on the blockchain.

[0156] Historical virtual resource transactions refer to the historical transactions related to virtual resources recorded on the target blockchain. Historical virtual resource transactions include the transfer in and out of virtual resources on the target blockchain, the setting of user virtual resource accounts, etc.

[0157] The historical transaction attribute field corresponds to the historical virtual resource transaction. The historical transaction attribute field is a field in the historical virtual resource transaction that records the historical transaction attributes corresponding to the historical virtual resource transaction.

[0158] It should be noted that the historical transaction attributes can be set as needed to meet different classification requirements. For example, the processing time period, processing institution or processing user corresponding to the historical virtual resource transaction, the transfer in and out of virtual resources, etc. Suppose historical virtual resource transaction 1 is that institution A transfers virtual resource 1000 to institution B at 10:10 in the morning. Then the specific historical transaction attributes corresponding to historical virtual resource transaction 1 are the transfer in and out between institution A and institution B, 10:10 in the morning, and virtual resource 1000, etc.

[0159] In step 320, classify the historical virtual resource transactions based on the historical transaction attributes to obtain virtual resource transaction classes.

[0160] The virtual resource transaction class is the classification result of the historical virtual resource transaction class according to the historical transaction attributes. Each virtual resource transaction class includes at least one historical virtual resource transaction. If the historical transaction attribute is the processing time period corresponding to the historical virtual resource transaction class, then based on the processing time periods of each historical virtual resource transaction class, determine the virtual resource transaction class to which the historical virtual resource transaction belongs. Suppose the processing time of historical virtual resource transaction A is 9:10, historical virtual resource transaction B is 10:30, historical virtual resource transaction C is 15:15, and historical virtual resource transaction D is 16:42. Classify the historical virtual resource transactions based on the processing time periods corresponding to the historical virtual resource transactions, and two virtual resource transaction classes can be obtained. One virtual resource transaction class includes historical virtual resource transactions with processing times in the morning, such as historical virtual resource transaction A and historical virtual resource transaction B, and the other virtual resource transaction class corresponds to historical virtual resource transactions with processing times in the afternoon, such as historical virtual resource transaction C and historical virtual resource transaction D.

[0161] In step 330, based on each historical virtual resource transaction in the virtual resource transaction class, determine the first historical value of multiple on-chain statistical parameters of the virtual resource transaction class.

[0162] The on-chain statistical parameter is the statistical result of the parameters of each historical virtual resource transaction in the virtual resource transaction class on the target blockchain.

[0163] Refer to Figure 4A , the on-chain statistical parameters include block height, cumulative address number, cumulative computing power hash rate, cumulative number of resource forwarding times, and cumulative resource forwarding volume.

[0164] The target blockchain is a chain structure, in which each block occupies a position from the beginning of the blockchain to the latest added block, and this position is arranged in chronological order, and the block height refers to the position number of a block in the target blockchain. It can be said that the block height represents the specific position of the block where the historical virtual resource transaction is located on the target blockchain. Based on the block height, the order of each historical virtual resource transaction in the virtual resource transaction class can be determined.

[0165] The cumulative number of addresses refers to the number of addresses involved in each historical virtual resource transaction in the virtual resource transaction class. Specifically, virtual resources can be forwarded between users. For example, user A can send virtual resources to user B. Then the device address of user A is the transfer-out address of the virtual resource, and the address of user B is the transfer-in address of the virtual resource. Then the cumulative number of addresses is the number of multiple transfer-out addresses and transfer-in addresses involved in each historical virtual resource transaction in the virtual resource transaction class. In addition, the transfer-in addresses and transfer-out addresses corresponding to different historical virtual resource transactions may be repeated, and these repeated addresses will only be recorded as one address number. For example, a certain virtual resource transaction class includes historical virtual resource transaction 1 and historical virtual resource transaction 2. The transfer-in address corresponding to historical virtual resource transaction 1 is addr1 and the transfer-out address is addr2. The transfer-in address corresponding to historical virtual resource transaction 2 is addr3 and the transfer-out address is addr1. Then the cumulative number of addresses corresponding to the virtual resource transaction class is 3.

[0166] Computing power refers to the amount of computing that a computer system can handle, usually referring to the amount of computing tasks per unit time. Computing power is usually expressed in units of hash rates. The hash rate refers to the number of times a computer system performs hash operations per unit time. Therefore, the cumulative computing power hash rate can be considered as the speed at which the computer system performs hash operations during the processing of each historical virtual resource transaction corresponding to the virtual resource transaction class. The computing power hash rate plays a vital role in the security of virtual resource transaction processing. The higher the cumulative computing power hash rate, the more computing power and computing resources are invested in the process of virtual resource transaction processing, which also means that the network where the target blockchain is located is more stable and secure.

[0167] The cumulative number of resource forwarding times refers to the number of virtual resource forwarding times corresponding to each historical virtual resource transaction in the virtual resource transaction class. Historical virtual resource transactions may include virtual resource forwarding, virtual resource account establishment, virtual resource donation, virtual resource acquisition, virtual resource withdrawal and other different transactions. In this case, the cumulative number of resource forwarding times can be regarded as the number of historical virtual resource transactions involving virtual resource forwarding in the virtual resource transaction class.

[0168] The cumulative forwarded resource volume refers to the total volume of virtual resources forwarded corresponding to each historical virtual resource transaction in the virtual resource transaction class. Suppose historical virtual resource transaction 1, historical virtual resource transaction 2, and historical virtual resource transaction 3 in the virtual resource transaction class involve the forwarding of virtual resources. Among them, historical virtual resource transaction 1 is that user A forwards 1000 virtual resources to user B, historical virtual resource transaction 2 is that user B forwards 200 virtual resources to user C, and historical virtual resource transaction 3 is that user B forwards 800 virtual resources to user A. Then the cumulative forwarded resource volume of this virtual resource transaction class is 2000.

[0169] The first historical value corresponds to the on-chain statistical parameter. The first historical value is the specific value of the on-chain statistical parameter of each virtual resource transaction class, and the first historical value is specifically determined based on each historical virtual resource transaction in the virtual resource transaction class.

[0170] Refer to Figure 4A , classify each historical virtual resource transaction according to the historical transaction attribute to obtain virtual resource transaction class A, virtual resource transaction class B, and virtual resource transaction class C. There are multiple on-chain statistical parameters, which are respectively block height, cumulative address number, cumulative computing power hash rate, cumulative forwarded resource times, and cumulative forwarded resource volume. For each virtual resource transaction class, based on each historical virtual resource transaction in the virtual resource transaction class, determine the specific value of the on-chain statistical parameter, so as to obtain the first historical value. For example, the first historical values of the multiple on-chain statistical parameters corresponding to virtual resource transaction class A are block height A, cumulative address number A, cumulative computing power hash rate A, cumulative forwarded resource times A, and cumulative forwarded resource volume A.

[0171] In step 340, for each on-chain statistical parameter, based on the first historical value of the on-chain statistical parameter, determine the correlation coefficient between the on-chain statistical parameter and the total volume of virtual resources on the target blockchain, and based on the correlation coefficients corresponding to each virtual resource transaction class, determine the overall correlation parameter of the on-chain statistical parameter.

[0172] The total volume of virtual resources on the target blockchain refers to the total value of all virtual resources on the target blockchain. The total volume of virtual resources on the target blockchain is different from the virtual resource volume. The virtual volume on the target blockchain refers to the number of virtual resources on the target blockchain. Even when the virtual volume on the target blockchain is the same, the total volume of virtual resources on the target blockchain is uncertain.

[0173] For the total amount of virtual resources on the target blockchain, each on-chain statistical parameter has a certain impact on it. The correlation coefficient refers to the coefficient representing the correlation between the on-chain statistical parameter corresponding to the virtual resource transaction class and the total amount of virtual resources on the target blockchain, and the correlation coefficient can represent the impact of the on-chain statistical parameter on the total amount of virtual resources on the target blockchain. The larger the correlation parameter, the greater the impact of the on-chain statistical parameter corresponding to the virtual resource transaction class on the total amount of virtual resources on the target blockchain.

[0174] The overall correlation parameter corresponds to the on-chain statistical parameter, which refers to the coefficient between the on-chain statistical parameters corresponding to all virtual resource transaction classes on the target blockchain and the total amount of virtual resources on the target blockchain. The larger the overall correlation parameter, the greater the impact of the corresponding on-chain statistical parameter on the total amount of virtual resources on the target blockchain.

[0175] Refer to Figure 4A , after determining the first historical value of the on-chain statistical parameter corresponding to each virtual resource transaction class, for each virtual resource transaction class, determine the correlation coefficient between each on-chain statistical parameter and the total amount of virtual resources on the target blockchain. For example, for the virtual resource transaction class A, 5 correlation coefficients A are calculated, and the 5 correlation coefficients A are determined based on the block height A, the cumulative number of addresses A, the cumulative computing power hash rate A, the cumulative number of times of forwarding resources A, and the cumulative amount of forwarded resources A respectively. Similarly, for the virtual resource transaction class B, 5 correlation coefficients B are determined. For the virtual resource transaction class C, 5 correlation coefficients C are determined. Then, for each on-chain statistical parameter, based on the corresponding correlation coefficients in each virtual resource transaction class, determine the overall correlation parameter between the on-chain statistical parameter and the total amount of virtual resources on the target blockchain. Then the number of finally determined overall correlation parameters is 5. For the block height, based on the correlation coefficient A, correlation coefficient B, and correlation coefficient C corresponding to the block height, determine the overall correlation coefficient between the block height and the total amount of virtual resources on the target blockchain.

[0176] In step 350, based on the overall correlation parameters of each on-chain statistical parameter, determine the target on-chain statistical parameter among multiple on-chain statistical parameters.

[0177] The target on-chain statistical parameter is one or more on-chain statistical parameters with the highest correlation with the total amount of virtual resources on the target blockchain. The number of target on-chain statistical parameters can be specifically determined according to actual needs.

[0178] Refer to Figure 4A, there are a total of five overall correlation parameters, which respectively correspond to the on-chain statistical parameters block height, cumulative number of addresses, cumulative computing power hash rate, cumulative number of times of forwarding resources, and cumulative amount of forwarded resources. The target on-chain statistical parameters are determined from multiple on-chain statistical parameters based on the overall correlation parameters. The specific target on-chain statistical parameters are one or more of the block height, cumulative number of addresses, cumulative computing power hash rate, cumulative number of times of forwarding resources, and cumulative amount of forwarded resources.

[0179] In step 360, based on the first historical value of the target on-chain statistical parameters, the target prediction model is trained.

[0180] After determining the target on-chain statistical parameters, based on the first historical value of the target on-chain statistical parameters, the target prediction model is trained.

[0181] The target prediction model is a model used to predict the total amount of virtual resources of the target blockchain. The input of this model is the value corresponding to the target on-chain statistical parameters. Therefore, in the embodiments of the present disclosure, the target prediction model is trained using the first historical value of the target on-chain statistical parameters.

[0182] It should be noted that in addition to the first historical value of the target on-chain statistical parameters, the embodiments of the present disclosure also use the historical total amount of virtual resources corresponding to the first historical value to train the target prediction model, so that when the input of the model is the first historical value of the target on-chain statistical parameters, the target prediction model can output the historical total amount of virtual resources corresponding to the first historical value.

[0183] It should be noted that historical virtual resource transactions will increase over time. Correspondingly, the first historical value of the target on-chain statistical parameters used to train the target prediction model will also increase. In the embodiments of the present disclosure, a new historical total amount of virtual resources can be obtained at preset intervals to train the target prediction model, thereby improving the prediction accuracy of the target prediction model.

[0184] In step 370, the actual value of the target on-chain statistical parameters at the current time is obtained, the actual value is input into the target prediction model, the current predicted total amount of virtual resources on the target blockchain is obtained, and an alarm is issued based on the current predicted total amount of virtual resources.

[0185] The actual value is the value of the target on-chain statistical parameters on the target blockchain at the current time. And the current predicted total amount of virtual resources is the total amount of virtual resources on the target blockchain predicted by the target prediction model based on the actual value.

[0186] When the current predicted total amount of virtual resources is determined, an alarm can be issued based on the current predicted total amount of virtual resources when the virtual resource transaction processing is unsafe, thereby improving the security of virtual resource transaction processing on the blockchain.

[0187] Refer toFigure 4B , in the embodiments of the present disclosure, historical virtual resource transactions on the target blockchain are first obtained, and statistical parameters on the target chain are determined according to the method shown in Figure 4A to train the target prediction model based on the first historical value of the statistical parameters on the target chain. After that, the actual value of the statistical parameters on the target chain at the current time is obtained, and the actual value is input into the trained target prediction model to obtain the current predicted total amount of virtual resources on the target blockchain. Based on the current predicted total amount of virtual resources, it can be determined whether the virtual resource transaction processing on the current target blockchain is secure, and a warning is issued when the virtual resource transaction processing is insecure.

[0188] It should be noted that, referring to Figure 2B , when the virtual resource transaction processing is insecure, a warning is issued, and a warning message is displayed on the virtual resource platform to which the virtual resource warning processing method provided in the embodiments of the present disclosure is applied, so as to remind the user that the current virtual resource transaction processing is insecure and reduce the amount of virtual resources obtained on the virtual resource platform.

[0189] In the embodiments of the above steps 310 to 370, the actual value of the statistical parameters on the target chain at the current time on the target blockchain is obtained, and the actual value is input into the pre-trained target prediction model to obtain the current predicted total amount of virtual resources on the target blockchain. The security of virtual resource transaction processing on the blockchain is related to this current predicted total amount of virtual resources. Therefore, a warning can be issued when the virtual resource transaction processing is insecure based on the current predicted total amount of virtual resources. In this way, the security of virtual resource transaction processing on the blockchain can be improved. When training the target prediction model, historical virtual resource transactions recorded on the target blockchain are obtained, and the first historical value of multiple statistical parameters on the chain is determined based on the historical virtual resource transactions, and the overall correlation parameter of each statistical parameter on the chain is determined accordingly. Based on the overall correlation parameters of each statistical parameter on the chain, the statistical parameter on the target chain can be determined among multiple statistical parameters on the chain, and the target prediction model is trained accordingly. Since this process determines the statistical parameter on the target chain from multiple statistical parameters on the chain using the overall correlation parameter, the trained target prediction model has higher accuracy, thereby further improving the security of virtual resource transaction processing on the blockchain. When determining the overall correlation parameter of each statistical parameter on the chain, historical transaction attributes are obtained from the historical transaction attribute fields in the historical virtual resource transactions, and the historical virtual resource transactions are classified accordingly. For each category, the first historical value of multiple statistical parameters on the chain is determined. Accordingly, for each statistical parameter on the chain, the correlation coefficient of each category is determined, and then the overall correlation parameter is determined. This process takes into account the different characteristics of each category to determine the correlation coefficient of each category, so that the calculated correlation coefficient is more representative, making the finally determined overall correlation parameter more accurate and improving the security of virtual resource transaction processing on the blockchain.

[0190] The above is the overall description of steps 310 to 370. The following is a detailed description of the specific implementation process of steps 310 to 370.

[0191] Detailed description of step 310

[0192] In step 310, obtain the historical virtual resource transactions recorded on the target blockchain, and obtain the historical transaction attributes from the historical transaction attribute fields in the historical virtual resource transactions.

[0193] In one embodiment, referring to Figure 5 , step 310 includes:

[0194] Step 510, obtain the historical virtual resource blocks on the target blockchain;

[0195] Step 520, decompose the historical virtual resource blocks into historical virtual resource transactions.

[0196] The following is a detailed description of step 510 and step 520.

[0197] In step 510, obtain the historical virtual resource blocks on the target blockchain.

[0198] The historical virtual resource blocks are the blockchains on the target blockchain that record historical virtual resource transactions. Specifically, the historical virtual resource blocks are the blocks formed before the current time.

[0199] A blockchain is a chain structure formed by combining data blocks in sequence according to time order, and the blocks in the blockchain are a data structure that contains the relevant data of the virtual resource transactions on the target blockchain.

[0200] In step 520, decompose the historical virtual resource blocks into historical virtual resource transactions.

[0201] The historical virtual resources record the relevant data of the historical virtual resource transactions on the target blockchain. Then, by decomposing the historical virtual resource blocks, historical virtual resource transactions can be obtained.

[0202] The embodiments of the above steps 510 and 520 obtain the historical virtual resource blocks on the target blockchain, decompose the historical virtual resource blocks, and obtain historical virtual resource transactions. The acquisition of the historical virtual resource blocks ensures the correctness of the obtained historical virtual resource transactions, thereby improving the security of virtual resource transaction processing.

[0203] Detailed description of step 320

[0204] In step 320, classify the historical virtual resource transactions based on the historical transaction attributes to obtain virtual resource transaction classes.

[0205] In one embodiment, the historical transaction attribute is the historical transaction type. Referring to Figure 6 , step 320 includes:

[0206] Step 610: Group the historical virtual resource transactions of the same historical transaction type into the same virtual resource transaction class.

[0207] The following describes step 610 in detail.

[0208] In step 610, group the historical virtual resource transactions of the same historical transaction type into the same virtual resource transaction class.

[0209] The historical transaction attribute is the historical transaction type. The historical transaction type is the transaction type corresponding to the historical virtual resource transaction. The historical transaction type includes various types such as forwarding of virtual resources, establishment of virtual resource accounts, donation of virtual resources, acquisition of virtual resources, and withdrawal of virtual resources. It can be determined that the number of types of historical transaction types is fixed. Therefore, in the process of classifying historical virtual resource transactions, it is only necessary to group the historical virtual resource transactions of the same historical transaction type into the same virtual resource transaction class.

[0210] Referring to Figure 7 , the historical transaction types provided in the embodiments of the present disclosure include historical transaction type A, historical transaction type B, and historical transaction type C, and there are a total of 4 historical virtual resource transactions. The 4 historical virtual resource transactions are historical virtual resource transaction 1, historical virtual resource transaction 2, historical virtual resource transaction 3, and historical virtual resource transaction 4. Classify the multiple historical virtual resource transactions based on the historical transaction type to obtain virtual resource transaction class A, virtual resource transaction class B, and virtual resource transaction class C. Virtual resource transaction class A corresponds to historical transaction type A, and it includes historical virtual resource transaction 1 and historical virtual resource transaction 3. Virtual resource transaction class B corresponds to historical transaction type B, and it includes historical virtual resource transaction 4. Virtual resource transaction class C corresponds to historical transaction type C, and it specifically includes historical virtual resource transaction 2.

[0211] The above embodiment of step 610 classifies the historical virtual resource transactions based on the historical transaction type. Specifically, group the historical virtual resource transactions of the same historical transaction type into the same virtual resource transaction class, that is, the multiple historical virtual resource transactions corresponding to the same virtual resource transaction class have the same historical transaction type. This method starts from the perspective of historical transaction types, and the determined correlation coefficients of each class contain the characteristics of each historical transaction type, making the finally determined overall correlation parameter more accurate and further improving the security of virtual resource transaction processing on the blockchain.

[0212] In another embodiment, the historical transaction attributes are multiple historical transaction attributes. Refer to Figure 8 , step 320 includes:

[0213] Step 810: Based on multiple historical transaction attributes of historical virtual resource transactions, use a clustering algorithm to cluster multiple historical virtual resource transactions to obtain virtual resource transaction classes.

[0214] Step 810 will be described in detail below.

[0215] In step 810, based on multiple historical transaction attributes of historical virtual resource transactions, use a clustering algorithm to cluster multiple historical virtual resource transactions to obtain virtual resource transaction classes.

[0216] The historical transaction attributes are multiple historical transaction attributes. The multiple historical transaction attributes can be the processing user type, time, location, etc. corresponding to the historical virtual resource transactions. The values corresponding to attributes such as user type, time, and location are relatively numerous, and the values obtained by combining multiple attributes are even in the thousands. Therefore, it is impossible to simply classify historical transaction attributes with the same multiple historical transaction attributes into the same virtual resource transaction class.

[0217] In the embodiments of the present disclosure, a clustering algorithm is specifically used to cluster multiple historical virtual resource transactions to obtain multiple virtual resource transaction classes.

[0218] It should be noted that in the embodiments of the present disclosure, various clustering algorithms can be used to cluster historical virtual resource transactions, such as K-means clustering, Mean Shift algorithm, density-based clustering algorithm, maximum expectation estimation using Gaussian mixture model, etc.

[0219] Refer to Figure 9 , the user type corresponding to historical virtual resource transaction 1 is individual, and the time is 9:00. The user type corresponding to historical virtual resource transaction 2 is institution A, and the time is 11:26. The user type corresponding to historical virtual resource transaction 3 is institution B, and the time is 13:12. The user type corresponding to historical virtual resource transaction 4 is institution C, and the time is 14:26. Using a clustering algorithm to process multiple historical virtual resource transactions, the user type of historical virtual resource transaction 1 is individual and the time is in the morning, which is quite different from other historical virtual resource transactions. Therefore, historical virtual resource transaction 1 is classified into virtual resource transaction class A. The processing times of historical virtual resource transaction 3 and virtual resource transaction 4 are close, and institution B and institution C are institutions of the same type. Therefore, historical virtual resource transaction 3 and virtual resource transaction 4 are classified into virtual resource transaction class C. In addition, historical virtual resource transaction 2 can be classified into virtual resource transaction class B.

[0220] In the embodiment of step 810 above, in the case where the historical transaction attributes are multiple historical transaction attributes, based on the multiple historical transaction attributes, a clustering algorithm is used to cluster multiple historical virtual resource transactions to obtain virtual resource transaction classes. This method starts from the perspective of historical transaction attributes and groups virtual resource transactions with the same or similar historical transaction attributes into the same class. In this way, the determined correlation coefficient is more representative, improving the security of virtual resource transaction processing on the blockchain.

[0221] Detailed description of step 330

[0222] In step 330, based on each historical virtual resource transaction in the virtual resource transaction class, a first historical value of multiple on-chain statistical parameters of the virtual resource transaction class is determined.

[0223] In one embodiment, referring to Figure 10 , step 330 includes:

[0224] Step 1010: In each historical time period, based on each historical virtual resource transaction obtained in the historical time period and belonging to the virtual resource transaction class, determine a first historical sub-value of multiple on-chain statistical parameters corresponding to the historical time period;

[0225] Step 1020: For a single on-chain statistical parameter, based on the first historical sub-values obtained in each historical time period, generate a first historical sub-value vector as the first historical value of the on-chain statistical parameter.

[0226] The following provides a detailed description of step 1010 and step 1020.

[0227] In step 1010, in each historical time period, based on each historical virtual resource transaction obtained in the historical time period and belonging to the virtual resource transaction class, determine a first historical sub-value of multiple on-chain statistical parameters corresponding to the historical time period.

[0228] The historical time period is the period for determining the first historical sub-value, and the first historical sub-value corresponds to the on-chain statistical parameter. The first historical sub-value is the value of the corresponding on-chain statistical parameter within the historical time period. The historical time period can be set as needed. For the convenience of calculation, the historical time period is usually set to 1 day in the embodiments of the present disclosure.

[0229] Referring to Figure 11, embodiments of the present disclosure determine 4 historical time periods before the current time, and for each historical time period, determine first historical sub-values of multiple on-chain statistical parameters according to each historical virtual resource transaction in the virtual resource transaction class of the target blockchain within the historical time period. For example, in historical time period 1, according to each historical virtual resource transaction 1 in the virtual resource transaction class, determine first historical sub-values of multiple on-chain statistical parameters such as block height 1 and cumulative address number 1.

[0230] In step 1020, for a single on-chain statistical parameter, generate a first historical sub-value vector based on the first historical sub-values obtained for each historical time period, and use it as the first historical value of the on-chain statistical parameter.

[0231] The first historical sub-value vector is a vector composed of the first historical sub-values corresponding to each historical time period. Each element of the first historical sub-value vector corresponds to a first historical sub-value, and the first historical sub-value vector corresponds to the on-chain statistical parameter.

[0232] After determining multiple first historical sub-values, for each on-chain statistical parameter, generate a first historical sub-value vector based on the first historical sub-values obtained for each historical time period, and then use the first historical sub-value vector as the first historical value of the on-chain statistical parameter.

[0233] Refer to Figure 11 , for the block height, it corresponds to 4 first historical sub-values, namely block height 1, block height 2, block height 3, and block height 4. Among them, block height 1 corresponds to historical time period 1, block height 2 corresponds to historical time period 2, block height 3 corresponds to historical time period 3, and block height 3 corresponds to historical time period 3. Generate a first historical sub-value vector based on the first historical sub-values obtained for each historical time period. Then, the first historical sub-value vector corresponding to the block height is [block height 1, block height 2, block height 3, block height 4], and this vector is used as the first historical value of the block height. Similarly, the first historical value of the cumulative address number can be expressed as [cumulative address number 1, cumulative address number 2, cumulative address number 3, cumulative address number 4].

[0234] The embodiments of the above-mentioned step 1010 and step 1020 are set with a historical time period, and in each historical time period, based on each historical virtual resource transaction in the virtual resource transaction class obtained in this historical time period, the first historical sub-value of a plurality of on-chain statistical parameters corresponding to the historical time period is determined. Then, for a single on-chain statistical parameter, based on the first historical sub-values obtained in each historical time period, a first historical sub-value vector is generated, and further the first historical value of the on-chain statistical parameter is determined. The setting of the historical time period can perform more accurate calculations on historical resource transactions, and the obtained first historical sub-value can reflect the on-chain statistical parameters within this historical time period, so that the obtained first historical value is more accurate, improving the security of virtual transaction processing.

[0235] Detailed description of step 340

[0236] In step 340, for each on-chain statistical parameter, based on the first historical value of the on-chain statistical parameter, the correlation coefficient between the on-chain statistical parameter and the total amount of virtual resources on the target blockchain is determined, and based on the correlation coefficients corresponding to each virtual resource transaction class, the overall correlation parameter of the on-chain statistical parameter is determined.

[0237] In one embodiment, referring to Figure 12 , step 340 includes:

[0238] Step 1210, obtain the correlation coefficient function, where the correlation coefficient function is a function of the first historical value and the total amount of virtual resources on the target blockchain;

[0239] Step 1220, obtain the total amount of virtual resources on the target blockchain in the historical time period corresponding to the first historical value;

[0240] Step 1230, substitute the first historical value and the total amount of virtual resources on the target blockchain into the correlation coefficient function to obtain the correlation coefficient.

[0241] The following is a detailed description of steps 1210 to 1230.

[0242] In step 1210, obtain the correlation coefficient function, where the correlation coefficient function is a function of the first historical value and the total amount of virtual resources on the target blockchain.

[0243] The correlation coefficient function is a function of the first historical value of the on-chain statistical parameter and the total amount of virtual resources on the target blockchain.

[0244] In step 1220, obtain the total amount of virtual resources on the target blockchain in the historical time period corresponding to the first historical value.

[0245] The total amount of virtual resources on the target blockchain is the total value of the virtual resources on the target blockchain during the historical time period corresponding to the first historical value, and the total amount of virtual resources on the target blockchain corresponds to the first historical value.

[0246] Refer to Figure 11 , if the first historical value of the on-chain statistical parameter is determined based on the historical resource transactions during historical time periods 1 to 4, then the total amount of virtual resources on the target blockchain is the total value of the virtual resources on the target blockchain during historical time periods 1 to 4.

[0247] In step 1230, substitute the first historical value and the total amount of virtual resources on the target blockchain into the correlation coefficient function to obtain the correlation coefficient.

[0248] The correlation coefficient function is a function of the first historical value and the total amount of virtual resources on the target blockchain. After determining the first historical value and the total amount of virtual resources on the target blockchain, they can be substituted into the correlation coefficient function to obtain the correlation coefficient between the on-chain statistical parameter corresponding to the first historical value and the total amount of virtual resources on the target blockchain.

[0249] It should be noted that the correlation coefficient can be expressed as C = CF(M, BD), where M is the total amount of virtual resources on the target blockchain, BD is the first historical value of the on-chain statistical parameter, CF is the correlation coefficient function, and C is the correlation coefficient. Substitute the first historical value and the total amount of virtual resources on the target blockchain into the correlation coefficient function = CF(M, BD) to obtain the correlation coefficient C.

[0250] It should be noted that in the embodiments of the present disclosure, the Pearson correlation coefficient function is used as the correlation coefficient function for calculation. The Pearson correlation coefficient can be used to measure the correlation between the first historical value and the total amount of virtual resources on the target blockchain, and the value of the Pearson correlation coefficient is between -1 and 1.

[0251] The above steps 1210 to 1230 are provided with a correlation coefficient function, and the correlation coefficient function is a function of the first historical value and the total amount of virtual resources on the target blockchain. Then, substituting the first historical value and the total amount of virtual resources on the target blockchain corresponding to the historical time period of the first historical value into the correlation coefficient function can obtain the correlation coefficient. The correlation coefficient function is a function of the first historical value and the total amount of virtual resources on the target blockchain. Then, the correlation coefficient determined based on this function can more accurately represent the correlation between the on-chain statistical parameter and the total amount of virtual resources on the target blockchain, thereby improving the accuracy of early warning and the security of virtual resource transaction processing.

[0252] The above is the overall description of steps 1210 to 1230. Since steps 1210 and 1230 have been described in detail above, only the specific implementation process of step 1220 will be described in detail below.

[0253] In step 1220, obtain the total amount of virtual resources on the target blockchain for the historical time period corresponding to the first historical value.

[0254] In one embodiment, referring to Figure 13 , step 1220 includes:

[0255] Step 1310, obtain the number of virtual resources on the target blockchain for the historical time period corresponding to the first historical value;

[0256] Step 1320, obtain the unit resource amount represented by a single virtual resource in the historical time period;

[0257] Step 1330, based on the number of virtual resources and the unit resource amount on the target blockchain, determine the total amount of virtual resources on the target blockchain for the historical time period corresponding to the first historical value.

[0258] The following will describe steps 1310 to 1330 in detail.

[0259] In step 1310, obtain the number of virtual resources on the target blockchain for the historical time period corresponding to the first historical value.

[0260] The number of virtual resources on the target blockchain is the number of virtual resources of the target blockchain within the historical time period corresponding to the first historical value.

[0261] Referring to Figure 11 , if the historical time period corresponding to the first historical value is historical time period 1 to historical time period 4, then the number of virtual resources on the target blockchain is the number of virtual resources of the target blockchain within historical time period 1 to historical time period 3.

[0262] In step 1320, obtain the unit resource amount represented by a single virtual resource in the historical time period.

[0263] The unit resource amount is the total value corresponding to a single virtual resource of the target blockchain in the historical time period.

[0264] In step 1330, based on the number of virtual resources and the unit resource amount on the target blockchain, determine the total amount of virtual resources on the target blockchain for the historical time period corresponding to the first historical value.

[0265] The total amount of virtual resources on the target blockchain in the historical time period is determined based on the number of virtual resources and the unit resource amount on the target blockchain.

[0266] Assume that the number of virtual resources on the target blockchain in the historical time period corresponding to the first historical value is S, and the unit resource amount represented by a single resource in the historical time period is P. Then, the total amount of virtual resources on the target blockchain in the historical time period corresponding to the first historical value is expressed as M = S * P. If the number of virtual resources on the target blockchain is 1000 and the unit resource amount is 1.5, then the total amount of virtual resources on the target blockchain is 1500.

[0267] The embodiments of the above steps 1310 to 1330 determine the total amount of virtual resources on the target blockchain in the historical time period corresponding to the first historical value based on the number of virtual resources and the unit resource amount on the target blockchain, improving the accuracy of the total amount of virtual resources on the target blockchain, thereby improving the accuracy of the correlation coefficient and enhancing the security of virtual resource transaction processing.

[0268] In another embodiment, referring to Figure 14 , step 340 includes:

[0269] Step 1410, obtain the class weights of each virtual resource transaction class;

[0270] Step 1420, calculate the overall correlation parameter of the on-chain statistical parameter based on the correlation coefficient and class weight of each virtual resource transaction class.

[0271] The following provides a detailed description of steps 1410 and 1420.

[0272] In step 1410, obtain the class weights of each virtual resource transaction class.

[0273] The class weight corresponds to the virtual resource transaction class. The class weight is the weight of the corresponding virtual resource transaction class among multiple virtual resource transaction classes. Different virtual resource transaction classes have different corresponding class weights, and the sum of the class weights of each virtual resource transaction class is 1.

[0274] In step 1420, calculate the overall correlation parameter of the on-chain statistical parameter based on the correlation coefficient and class weight of each virtual resource transaction class.

[0275] The overall correlation parameter of the on-chain statistical parameters is determined based on the correlation coefficients and class weights of multiple virtual resource transaction classes. Specifically, the products of the correlation coefficients and class weights of each virtual resource transaction class are added together to obtain the overall correlation parameter of the on-chain statistical parameters. Suppose each virtual resource transaction class includes virtual resource transaction class A, virtual resource transaction class B, and virtual resource transaction class C, and the correlation coefficient corresponding to virtual resource transaction class A is 0.8 and the class weight is 0.4, the correlation coefficient corresponding to virtual resource transaction class B is 0.6 and the class weight is 0.3, and the correlation coefficient corresponding to virtual resource transaction class C is 0.5 and the class weight is 0.3. Then the overall correlation parameter of the on-chain statistical parameters is 0.65.

[0276] The embodiments of the above steps 1410 and 1420 calculate the overall correlation parameter of the on-chain statistical parameters based on the correlation coefficients and class weights of each virtual resource transaction class. The setting of the class weights takes into account the importance of each class, so that the calculated overall correlation parameter is more accurate, further improving the security of virtual resource transaction processing on the blockchain.

[0277] Detailed description of step 350

[0278] In step 350, based on the overall correlation parameters of each on-chain statistical parameter, a target on-chain statistical parameter is determined among multiple on-chain statistical parameters.

[0279] In one embodiment, referring to Figure 15 , step 350 includes:

[0280] Step 1510: Determine the on-chain statistical parameter with the largest overall correlation parameter as the target on-chain statistical parameter.

[0281] The following is a detailed description of step 1510.

[0282] In step 1510, determine the on-chain statistical parameter with the largest overall correlation parameter as the target on-chain statistical parameter.

[0283] The target on-chain statistical parameter is the on-chain statistical parameter with the highest correlation with the total amount of virtual resources on the target blockchain, and the overall correlation parameter is used to describe the correlation between the on-chain statistical parameter and the total amount of virtual resources. The larger the overall correlation parameter, the stronger the correlation between the on-chain statistical parameter and the total amount of virtual resources. Therefore, in the case where there is only one target on-chain statistical parameter, the embodiments of the present disclosure determine the on-chain statistical parameter with the largest overall correlation parameter as the target on-chain statistical parameter.

[0284] Assume that the overall correlation parameter corresponding to the block height is 0.92, the overall correlation parameter corresponding to the cumulative number of addresses is 0.78, the overall correlation parameter corresponding to the cumulative computing power hash rate is 0.94, the overall correlation parameter corresponding to the cumulative number of forwarded resources is 0.86, and the overall correlation parameter corresponding to the cumulative amount of forwarded resources is 0.8. Then, the cumulative computing power hash rate is taken as the statistical parameter on the target chain.

[0285] The statistical parameter on the chain with the largest overall correlation parameter can be expressed as MaxC = Max(C1, C2, C3,...), where MaxC is the statistical parameter on the chain with the largest overall correlation parameter, and C1, C2, C3,... represent the overall correlation parameters of each statistical parameter on the chain. Furthermore, the statistical parameter on the target chain can be expressed as MaxC = CF(M, F), where M is the total amount of virtual resources on the target blockchain, and F is the statistical parameter on the target chain.

[0286] The embodiment of step 1510 above determines the statistical parameter on the chain with the largest overall correlation parameter as the statistical parameter on the target chain. The statistical parameter on the target chain determined by this method is more accurate, thereby improving the accuracy of the target prediction model and providing the security of virtual resource transaction processing.

[0287] In one embodiment, if the statistical parameter on the target chain is multiple statistical parameters with the highest correlation with the total amount of virtual resources on the target blockchain, the prediction number can be set. Then, sort the multiple statistical parameters on the chain in descending order according to the overall correlation parameter, and take the first preset number of statistical parameters on the chain as the statistical parameter on the target chain.

[0288] In addition, the embodiment of the present disclosure can also set a preset threshold, and use the statistical parameter on the chain whose overall correlation parameter is greater than the preset threshold as the statistical parameter on the target chain.

[0289] Detailed description of step 360

[0290] In step 360, based on the first historical value of the statistical parameter on the target chain, train the target prediction model.

[0291] In one embodiment, the target prediction model is a linear regression model, and the linear regression model has a linear coefficient and an offset. Refer to Figure 16 , step 360 includes:

[0292] Step 1610, determine the first logarithm of the first historical value;

[0293] Step 1620, obtain the total amount of virtual resources on the target blockchain in the historical time period corresponding to the first historical value;

[0294] Step 1630, determine the second logarithm of the total amount of virtual resources on the target blockchain;

[0295] Step 1640: Use the first pair of numbers as the input of the linear regression model and the second pair of numbers as the output of the linear regression model to solve for the linear coefficient and the offset.

[0296] The following provides a detailed description of steps 1610 to 1640.

[0297] In step 1610, determine the first logarithm of the first historical value.

[0298] The first logarithm is the logarithm of the first historical value. Assume the first historical value is F, and the first logarithm of the first historical value can be expressed as log n F, where n can be set as needed. For ease of representation, the first logarithm is denoted as F_log.

[0299] In step 1620, obtain the total amount of virtual resources on the target blockchain for the historical time period corresponding to the first historical value.

[0300] The total amount of virtual resources on the target blockchain is the total value of the virtual resources on the target blockchain during the historical time period corresponding to the first historical value, and the total amount of virtual resources on the target blockchain corresponds to the first historical value.

[0301] Refer to Figure 11 , the first historical value of the on-chain statistical parameter is determined based on historical resource transactions from historical time period 1 to historical time period 4. Then, the total amount of virtual resources on the target blockchain is the total value of the virtual resources on the target blockchain from historical time period 1 to historical time period 4.

[0302] In step 1630, determine the second logarithm of the total amount of virtual resources on the target blockchain.

[0303] The second logarithm is the logarithm of the total amount of virtual resources on the target blockchain. Assume the total amount of virtual resources on the target blockchain is M, and the second logarithm can be expressed as log n M, where n can be set as needed, but it must be equal to the base of the first logarithm. For ease of representation, the second logarithm is denoted as M_log.

[0304] In step 1640, use the first logarithm as the input of the linear regression model and the second logarithm as the output of the linear regression model to solve for the linear coefficient and the offset.

[0305] The linear regression model is the original model corresponding to the target prediction model. Therefore, during the training process of the target prediction model, the input of the linear regression model is the first logarithm corresponding to the first historical value of the target on-chain statistical parameter, and the output of the linear regression model is the second logarithm corresponding to the total amount of virtual resources on the target blockchain, thereby determining the linear coefficient and the offset of the linear regression model.

[0306] Figure 17 A schematic diagram of the linear regression model provided by the embodiments of the present disclosure. Figure 17 The abscissa in it is the first logarithm F_log, and the ordinate is the second logarithm M_log. Figure 17 Each point in the coordinate system is determined based on the first historical value of the statistical parameter on the target chain and the total amount of virtual resources on the target blockchain corresponding to the first historical value. Through these coordinate points, the linear regression model M_log = LF(F_log) = a + b * F_log is determined, so that the linear regression model can pass through as many points as possible. Among them, LF represents a unary linear regression function, b is the linear coefficient of the linear regression model, and a is the offset of the linear regression model.

[0307] It should be noted that the embodiments of the present disclosure can also use other function models as the target prediction model, such as a unary quadratic function model, an exponential function model, etc. However, compared with other models, the linear regression model can more accurately reflect the relationship between the first historical value and the total amount of virtual resources on the target blockchain.

[0308] The embodiments of the above steps 1610 to 1640 use the linear regression model as the target prediction model, take the first logarithm of the first historical value as the input of the linear regression model, and take the second logarithm as the output of the linear regression model to solve for the linear coefficient and the offset. The target prediction model obtained in this way can accurately reflect the relationship between the value of the statistical parameter on the target chain and the total amount of virtual resources on the target blockchain, thereby improving the prediction accuracy of the target prediction model and the security of virtual resource transaction processing.

[0309] In step 1610, determine the first logarithm of the first historical value.

[0310] In step 1640, take the first logarithm as the input of the linear regression model and the second logarithm as the output of the linear regression model to solve for the linear coefficient and the offset.

[0311] In one embodiment, the statistical parameter on the target chain is multiple statistical parameters on the target chain whose overall correlation parameter meets a predetermined condition, and the linear regression model has multiple linear coefficients corresponding to the multiple statistical parameters on the target chain respectively. Refer to Figure 18 Step 1610 includes:

[0312] Step 1810, determine the first logarithm of each of the multiple first historical values of the multiple statistical parameters on the target chain;

[0313] Correspondingly, step 1640 includes:

[0314] Step 1820: Use the first logarithms of the multiple first historical values of the statistical parameters on multiple target chains as the inputs of the linear regression model, use the second logarithm as the output of the linear regression model, and solve for the offset and the linear coefficients corresponding to the statistical parameters on each target chain.

[0315] It should be noted that the predetermined condition is the determination condition of the statistical parameter on the target chain, and the statistical parameter on the chain that meets the predetermined condition can be used as the statistical parameter on the target chain. When there are multiple statistical parameters on the target chain, the linear regression model has multiple linear coefficients corresponding to the multiple statistical parameters on the target chain, and the statistical parameter on the target chain and the linear coefficient are in one-to-one correspondence.

[0316] The following gives a detailed description of Step 1810 and Step 1820.

[0317] In Step 1810, determine the first logarithms of the multiple first historical values of the statistical parameters on multiple target chains.

[0318] For each statistical parameter on the target chain, calculate the first logarithm of its corresponding multiple first historical values respectively.

[0319] In Step 1820: Use the first logarithms of the multiple first historical values of the statistical parameters on multiple target chains as the inputs of the linear regression model, use the second logarithm as the output of the linear regression model, and solve for the offset and the linear coefficients corresponding to the statistical parameters on each target chain.

[0320] The linear regression model has multiple linear coefficients corresponding to the statistical parameters on the target chain, and there is only one offset.

[0321] Refer to Figure 19 , the overall correlation parameters of multiple statistical parameters on the chain that meet the preset conditions are the statistical parameter 1 on the target chain, the statistical parameter 2 on the target chain, and the statistical parameter 3 on the target chain. Among them, the first logarithm 1 corresponding to the statistical parameter 1 on the target chain is F1_log, the first logarithm 2 corresponding to the statistical parameter 2 on the target chain is F2_log, and the first logarithm 3 corresponding to the statistical parameter 3 on the target chain is F3_log. Then, determine the linear regression model as M_log = a + b1 * F1_log + b2 * F2_log + b3 * F3_log, where M_log is the second logarithm, a is the offset, and b1, b2, and b3 are the linear coefficients corresponding to the statistical parameters on each target chain respectively.

[0322] In the embodiments of the above steps 1810 and 1820, when there are multiple statistical parameters set on the target chain, a single linear regression model is used as the target prediction model. Among them, the first logarithms of the multiple first historical values of the multiple statistical parameters on the multiple target chains are used as the inputs of the linear regression model, and the second logarithms are used as the outputs of the linear regression model. Then, the linear coefficients correspond to the statistical parameters on each target chain respectively. This method can quickly determine the linear regression model and improve the efficiency of virtual resource warning processing.

[0323] In one embodiment, the statistical parameters on the target chain are multiple statistical parameters on the target chain whose overall correlation parameters meet the predetermined conditions. The linear regression model includes multiple linear regression sub-models, and each linear regression sub-model has a linear coefficient and an offset corresponding to a statistical parameter on a target chain.

[0324] Referring to Figure 20 , step 1610 includes:

[0325] Step 2010, determine the first logarithms of the multiple first historical values of the multiple statistical parameters on the multiple target chains respectively;

[0326] Correspondingly, step 1640 includes;

[0327] Step 2020, for each statistical parameter on the target chain, use the first logarithm of the first historical value of the statistical parameter on the target chain as the input of the linear regression sub-model corresponding to the statistical parameter on the target chain, and use the second logarithm as the output of the linear regression sub-model corresponding to the statistical parameter on the target chain, and solve for the linear coefficient and offset corresponding to the statistical parameter on the target chain.

[0328] It should be noted that the predetermined condition is the determination condition of the statistical parameter on the target chain, and the statistical parameter on the chain that meets the predetermined condition can be used as the statistical parameter on the target chain. When there are multiple statistical parameters on the target chain, the linear regression model includes multiple linear regression sub-models. The linear regression sub-models correspond one-to-one with the statistical parameters on the target chain, and each linear regression sub-model has a linear coefficient and an offset corresponding to a statistical parameter on a target chain.

[0329] The following describes steps 2010 and 2020 in detail.

[0330] In step 2010, determine the first logarithms of the multiple first historical values of the multiple statistical parameters on the multiple target chains respectively.

[0331] For each statistical parameter on the target chain, calculate the first logarithm of its corresponding multiple first historical values respectively.

[0332] In step 2020, for each statistical parameter on the target chain, the first logarithm of the first historical value of the statistical parameter on the target chain is used as the input of the linear regression sub-model corresponding to the statistical parameter on the target chain, and the second logarithm is used as the output of the linear regression sub-model corresponding to the statistical parameter on the target chain, and the linear coefficient and offset corresponding to the statistical parameter on the target chain are solved.

[0333] For each statistical parameter on the target chain, the first logarithm of its corresponding first historical value is used as the input of the linear regression sub-model, and the second logarithm is used as the output of the linear regression sub-model, and the linear coefficient and offset corresponding to the statistical parameter on the target chain are solved, so as to determine the linear regression sub-model corresponding to the statistical parameter on the target chain.

[0334] Refer to Figure 21 , among the overall correlation parameters of multiple statistical parameters on the chain, those that meet the preset conditions are the statistical parameter 1 on the target chain, the statistical parameter 2 on the target chain, and the statistical parameter 3 on the target chain. Among them, the first logarithm 1 corresponding to the statistical parameter 1 on the target chain is F1_log, the first logarithm 2 corresponding to the statistical parameter 2 on the target chain is F2_log, and the first logarithm 3 corresponding to the statistical parameter 3 on the target chain is F3_log. F1_log is used as the input of the linear regression sub-model 1, and the second logarithm M_log is used as the output of the linear regression sub-model 1, and the linear coefficient b1 and offset a1 corresponding to the statistical parameter 1 on the target chain are solved, so as to obtain the linear regression sub-model 1 as M_log = a1 + b1 * F1_log. Similarly, it is determined that the linear regression sub-model 2 corresponding to the statistical parameter 2 on the target chain is M_log = a2 + b2 * F2_log, and the linear regression sub-model 3 corresponding to the statistical parameter 3 on the target chain is M_log = a3 + b3 * F3_log. Furthermore, the linear regression sub-model 1, the linear regression sub-model 2, and the linear regression sub-model 3 are used as the linear regression model.

[0335] In the above embodiments of step 2010 and step 2020, when there are multiple statistical parameters set on the target chain, multiple linear regression sub-models are used as the target prediction model, that is, the linear regression model. The linear regression sub-model corresponds to the statistical parameter on the target chain. This method can improve the prediction accuracy of the target prediction model, and thus improve the accuracy of virtual resource transaction processing.

[0336] Detailed description of step 370

[0337] In step 370, the actual value of the statistical parameter on the target chain at the current time is obtained, the actual value is input into the target prediction model, the current predicted total virtual resources on the target blockchain are obtained, and an alarm is issued based on the current predicted total virtual resources.

[0338] In the embodiments of the above-mentioned steps 1810 and 1820, the statistical parameters on the target chain are multiple statistical parameters on the target chain where the overall correlation parameter meets the predetermined conditions, and the linear regression model has multiple linear coefficients respectively corresponding to the multiple statistical parameters on the target chain. In this case, in one embodiment, referring to Figure 22 , step 370 includes:

[0339] Step 2210, obtain the actual values of the multiple statistical parameters on the target chain at the current time, input the actual values of the multiple statistical parameters on the target chain into the target prediction model, and perform operations based on the offset and the linear coefficients respectively corresponding to each statistical parameter on the target chain to obtain the current predicted total virtual resources.

[0340] The following details step 2210.

[0341] When the linear regression model has multiple linear coefficients respectively corresponding to the multiple statistical parameters on the target chain, input the actual values of the multiple statistical functions on the target chain into the target prediction model to perform operations based on the offset and the multiple linear coefficients corresponding to the statistical functions on the target chain to obtain the current predicted total virtual resources.

[0342] Referring to Figure 19 , the linear regression model is M_log = a + b1*F1_log + b2*F2_log + b3*F3_log. Input the actual values of the statistical parameter 1 on the target chain, the statistical parameter 2 on the target chain, and the statistical parameter 3 on the target chain at the current time into the linear regression model to obtain the current predicted total virtual resources M_log.

[0343] The embodiment of the above-mentioned step 2210, in the case where there are multiple statistical parameters set on the target chain, uses a single linear regression model as the target prediction model, and inputs the actual values of the multiple statistical parameters on the target chain at the current time into the target prediction model to obtain the current total virtual resources. This method can improve the calculation efficiency of the current total virtual resources, and further improve the efficiency of virtual resource warning processing.

[0344] In the embodiments of the above-mentioned steps 2010 and 2020, the statistical parameters on the target chain are multiple statistical parameters on the target chain where the overall correlation parameter meets the predetermined conditions, and the linear regression model includes multiple linear regression sub-models. Each linear regression sub-model has a linear coefficient and an offset corresponding to one statistical parameter on the target chain. In this case, in one embodiment, referring to Figure 23 , step 370 includes:

[0345] Step 2310: Obtain the actual values of multiple on-chain statistical parameters at the current time, and input the actual value of each on-chain statistical parameter into the linear regression sub-model corresponding to the on-chain statistical parameter to obtain the predicted virtual resource total corresponding to the on-chain statistical parameter.

[0346] Step 2320: Determine the current predicted virtual resource total based on the predicted virtual resource totals corresponding to the on-chain statistical parameters of each target chain and the statistical parameter weights of the on-chain statistical parameters of each target chain.

[0347] The following provides a detailed description of Step 2310 and Step 2320.

[0348] In Step 2310, obtain the actual values of multiple on-chain statistical parameters at the current time, and input the actual value of each on-chain statistical parameter into the linear regression sub-model corresponding to the on-chain statistical parameter to obtain the predicted virtual resource total corresponding to the on-chain statistical parameter.

[0349] The on-chain statistical parameter corresponds to the linear regression sub-model. For each on-chain statistical parameter, input the actual value of the on-chain statistical parameter at the current time into the corresponding linear regression sub-model to obtain the predicted virtual resource total corresponding to the on-chain statistical parameter.

[0350] The predicted virtual resource total corresponds one-to-one with the on-chain statistical parameter, and the predicted virtual resource total refers to the output result of the linear regression sub-model of the on-chain statistical parameter corresponding to it.

[0351] Refer to Figure 21 , the linear regression sub-model 1 corresponds to the on-chain statistical parameter 1. Input the actual value of the on-chain statistical parameter 1 into the linear regression sub-model to obtain the predicted virtual resource total 1. Similarly, input the actual value of the on-chain statistical parameter 2 into the linear regression sub-model to obtain the predicted virtual resource total 2. Input the actual value of the on-chain statistical parameter 3 into the linear regression sub-model to obtain the predicted virtual resource total 3.

[0352] In Step 2320, determine the current predicted virtual resource total based on the predicted virtual resource totals corresponding to the on-chain statistical parameters of each target chain and the statistical parameter weights of the on-chain statistical parameters of each target chain.

[0353] The statistical parameter weight is the weight that the on-chain statistical parameter occupies among multiple on-chain statistical parameters. The statistical parameter weights corresponding to different on-chain statistical parameters are different, and the statistical parameter weights of the on-chain statistical parameters of each target chain are 1.

[0354] The current predicted total virtual resources can be obtained by performing a weighted sum calculation based on the sub-predicted total virtual resources corresponding to the statistical parameters on each target chain and the statistical parameter weights of the statistical parameters on each target chain. Specifically, first, for each statistical parameter on the target chain, calculate the product of the sub-predicted total virtual resources corresponding to the statistical parameter on the target chain and the statistical parameter weight. Then, use the sum of the products of the statistical parameters on each target chain as the current predicted total virtual resources. Refer to Figure 21 If the linear regression sub-model 1 outputs the sub-predicted total virtual resources 1, the linear regression sub-model 2 outputs the sub-predicted total virtual resources 2, the linear regression sub-model 3 outputs the sub-predicted total virtual resources 3, the statistical parameter weight of the statistical parameter 1 on the target chain is 0.2, the statistical parameter weight of the statistical parameter 2 on the target chain is 0.5, and the statistical parameter weight of the statistical parameter 3 on the target chain is 0.3, then the current predicted total virtual resources = 0.2 * sub-predicted total virtual resources 1 + 0.5 * sub-predicted total virtual resources 2 + 0.3 * sub-predicted total virtual resources 3.

[0355] It should be noted that when the linear regression model includes multiple linear regression sub-models, the embodiments of the present disclosure can also determine the current predicted total virtual resources in other ways. For example, use the average value of multiple sub-predicted total virtual resources as the current predicted total virtual resources, or use the trimmed mean of multiple sub-predicted total virtual resources as the current predicted total virtual resources.

[0356] In the case where the linear regression model includes multiple linear regression sub-models, the embodiments of steps 2310 and 2320 determine the current predicted total virtual resources based on the sub-predicted total virtual resources output by each linear regression sub-model and the statistical parameter weights of the statistical parameters on each target chain. The value of the current predicted total virtual resources determined by this method is more accurate, thereby improving the accuracy of virtual resource transaction processing.

[0357] In one embodiment, refer to Figure 24 step 370 includes:

[0358] Step 2410, determine the first difference between the current actual total virtual resources and the current predicted total virtual resources on the target blockchain;

[0359] Step 2420, if the first difference exceeds the risk threshold, issue a warning.

[0360] The following provides a detailed description of steps 2410 and 2420.

[0361] In step 2410, determine the first difference between the current actual total virtual resources and the current predicted total virtual resources on the target blockchain.

[0362] The first difference is the first difference between the current actual total virtual resources and the current predicted total virtual resources on the target blockchain.

[0363] If the current actual total virtual resources on the target blockchain is M_log and the current predicted total virtual resources on the target blockchain is PM_log, the first difference can be expressed as MB = M_log - PM_log.

[0364] In step 2420, if the first difference exceeds the risk degree threshold, a warning is issued.

[0365] The risk degree threshold is the judgment condition for whether to issue a warning. If the first difference exceeds the risk degree threshold, a warning is issued; conversely, if the first difference does not exceed the risk degree threshold, no warning is issued.

[0366] It should be noted that the risk degree threshold can be set as needed, and the risk degree threshold is greater than 0.

[0367] Assume that the current actual total virtual resources is 3200 and the current predicted total virtual resources is 2600. Then the first difference is 600. If the risk degree threshold is less than 600, such as 500, then a warning is issued. If the risk degree threshold is greater than or equal to 600, then no warning is issued.

[0368] In the above embodiments of step 2410 and step 2410, a warning is issued when the first difference between the current actual total virtual resources and the current predicted total virtual resources on the target blockchain exceeds the risk degree threshold. This method can issue a warning in a timely manner and improve the security of virtual resource transaction processing.

[0369] The above is the overall description of step 2410 and step 2420. Since step 2410 has been described in detail above, only the specific implementation process of step 2420 will be described in detail below.

[0370] In step 2420, if the first difference exceeds the risk degree threshold, a warning is issued.

[0371] In one embodiment, referring to Figure 25 , step 2420 includes:

[0372] Step 2510, when the first difference exceeds the risk degree threshold, detect the duration for which the first difference exceeds the risk degree threshold;

[0373] Step 2520, if the duration exceeds the predetermined duration threshold, issue a warning.

[0374] The following will describe step 2510 and step 2520 in detail.

[0375] In step 2510, when the first difference exceeds the risk degree threshold, detect the duration for which the first difference exceeds the risk degree threshold.

[0376] The duration is the time for which the first difference exceeds the risk degree threshold.

[0377] In step 2520, if the duration exceeds a predetermined duration threshold, issue a warning.

[0378] The predetermined duration threshold is the judgment condition for whether to issue a warning. When the first difference exceeds the risk degree threshold and the duration exceeds the predetermined duration threshold, a warning is issued. While when the first difference is less than the risk prevention degree threshold, or the first difference exceeds the risk degree threshold but the duration does not exceed the duration threshold, no warning is issued.

[0379] Suppose the current predicted total amount of virtual resources is 3200, the risk degree threshold is 600, and the predetermined duration threshold is 2 hours. If the current actual total amount of virtual resources remains at 4000 for 3 hours, a warning is issued. If the current actual total amount of virtual resources remains at 4000 for 1 hour and then changes to 3500 at the end of the first hour, no warning is issued. If the current actual amount of virtual resources is 3500, no warning is issued.

[0380] The embodiments of the above steps 2510 and 2520 are provided with a predetermined duration threshold. When the first difference exceeds the risk degree threshold and the duration for which the first difference exceeds the risk degree threshold exceeds the predetermined duration threshold, a warning is issued. This method is applicable to the situation where the total amount of virtual resources fluctuates too much in a short period of time, improving the security of virtual resource transaction processing.

[0381] In another embodiment, the virtual resource warning processing method is executed according to a time period. Refer to Figure 26 , step 2420 includes:

[0382] Step 2610, if the first difference exceeds the risk degree threshold, determine the number of consecutive time periods for which the first difference exceeded the risk degree threshold before the current time period;

[0383] Step 2620, based on the number of consecutive time periods, determine the warning level;

[0384] Step 2630, based on the warning level, issue a warning.

[0385] It should be noted that the total amount of virtual resources on the target blockchain changes in real time. To improve the efficiency of virtual resource warning processing, the embodiments of the present disclosure execute the virtual resource warning processing method according to a time period. Specifically, every time period, the actual value of the statistical parameter on the target chain at the current time is input into the target prediction model to obtain the current predicted total amount of virtual resources, and the first difference is calculated based on the current predicted total amount of virtual resources and the current actual total amount of virtual resources corresponding to the current time period.

[0386] It should be noted that the time period can be set as needed, which can be 30 minutes, or 1 hour, 2 hours, etc.

[0387] The following describes steps 2610 to 2630 in detail.

[0388] In step 2610, if the first difference exceeds the risk degree threshold, determine the number of consecutive time periods in which the first difference exceeded the risk degree threshold before the current time period.

[0389] The number of consecutive time periods is the number of consecutive time periods in which the first difference exceeded the risk degree threshold before the current time. The number of consecutive time periods does not include the current time period. Assume that the current time is 16:00, and the time period for executing the virtual resource warning processing method is 30 minutes. The first difference at the current time exceeds the risk degree threshold, and the first differences from 14:00 to the current time all exceed the risk degree threshold. Then the number of consecutive time periods is 3.

[0390] In step 2620, determine the warning level based on the number of consecutive time periods.

[0391] The warning level is determined based on the number of consecutive time periods.

[0392] The embodiments of the present disclosure can be provided with multiple period number intervals to determine the warning level according to the interval in which the number of consecutive time periods is located.

[0393] Assume that there are three warning levels in total, and the three warning levels are low, medium, and high respectively. The period number interval (0, 2] corresponds to the low warning level, the period number interval (2, 6] corresponds to the medium warning level, and the period number interval (6, ∞) corresponds to the high warning level. If the continuous time is 5, the warning level is medium. If the continuous time is 10, the warning level is high.

[0394] In step 2630, issue a warning based on the warning level.

[0395] After determining the warning level, a warning can be issued based on the warning level.

[0396] The embodiments of the present disclosure can represent the warning level through various display methods on the virtual resource platform interface. Figure 27The interface shown sets the warning level to five levels, and the warning level is represented by the number of solid pentagrams. Figure 27 The warning level corresponding to the interface shown is three levels. In addition, the warning level can also be represented by the color of the warning message. For example, red represents a high warning level, yellow represents a medium warning level, and green represents a low warning level.

[0397] In another embodiment, the embodiments of the present disclosure can also set a time period threshold, and issue a warning when the number of consecutive time periods is greater than the continuous time period number.

[0398] In the embodiments of the virtual resource warning processing method from step 2610 to step 2630 above, it is executed according to a time period. In the case where the first difference exceeds the risk degree threshold, the number of consecutive time periods in which the first difference exceeds the risk degree threshold before the current time period is determined, and then the warning level is determined. This method issues a warning through the warning level, realizing hierarchical warning, and can further improve the security of virtual resource transaction processing.

[0399] In one embodiment, the training set of the target prediction model of the embodiments of the present disclosure, that is, the regression sum of squares (R-squared) of the first historical value of the statistical parameters on the target chain, is as high as 0.9, and the R-squared of the validation set is as high as 0.8, indicating that the target prediction model has strong interpretability. The top of the warning index is very consistent with the top of the virtual resources, the bottom of the warning index is very consistent with the bottom of the virtual resources, the warning index oscillates within a fixed range, and the accuracy of prediction and warning is very high, thus indicating that the security of virtual resource transaction processing is very high.

[0400] Determination of the risk degree threshold

[0401] In the embodiments of step 2410 and step 2420 above, if the first difference between the current actual total amount of virtual resources and the current predicted total amount of virtual resources exceeds the risk degree threshold, a warning is issued. In one embodiment, referring to Figure 28 , the risk degree threshold is determined by the following method:

[0402] Step 2810: Obtain the static attributes of the target user currently performing virtual resource transactions;

[0403] Step 2820: In the historical virtual resource transactions recorded on the target blockchain, obtain the associated transactions associated with the target user;

[0404] Step 2830: Input the associated transactions into the label attribute recognition model to obtain the label attributes of the target user;

[0405] Step 2840: Input the static attributes and label attributes into the risk degree threshold prediction model to obtain the risk degree threshold.

[0406] The following provides a detailed description of steps 2810 to 2840.

[0407] In step 2810, obtain the static attributes of the target user currently conducting virtual resource transaction processing.

[0408] The target user is the one currently conducting virtual resource transaction processing on the target blockchain. Refer to Figure 2A and Figure 2B , the target user is a user of the virtual resource platform, specifically user A.

[0409] Static attributes are the attributes of the target user themselves, and these attributes are fixed in a short period of time. For example, the age, occupation, and risk tolerance filled in by the user themselves, etc.

[0410] In step 2820, among the historical virtual resource transactions recorded on the target blockchain, obtain the associated transactions related to the target user.

[0411] Associated transactions are the transactions in the historical virtual resource transactions that are associated with the target user. For example, the target user opens a virtual resource account, the target user forwards virtual resources to other users, the target user receives virtual resources forwarded by other users, etc.

[0412] In step 2830, input the associated transactions into the label attribute recognition model to obtain the label attributes of the target user.

[0413] The label recognition model is a model for recognizing the label attributes of the target user. The model for label recognition takes the associated transactions as input and outputs the label attributes of the target user. The label attribute recognition model can summarize multiple associated transactions of the user to obtain the label attributes. For example, the actual risk tolerance of the target user, the virtual asset amount of the target user, the number of times the target user forwards resources to other users, the amount of forwarded resources, etc.

[0414] In step 2840, input the static attributes and label attributes into the risk degree threshold prediction model to obtain the risk degree threshold.

[0415] The risk degree threshold prediction model is used to predict the risk degree threshold of the target user. The risk degree threshold prediction model can predict the risk degree threshold based on the input static attributes and label attributes.

[0416] Refer to Figure 29, in the embodiment of the present disclosure, the static attributes of the target user are first determined, and then the associated transactions related to the target user are determined among multiple historical virtual resource transactions of the target blockchain, and the associated transactions are input into the label attribute recognition model to obtain the label attributes of the target user. Finally, the static attributes and the label attributes are used as the input of the risk degree threshold prediction model, so that the risk degree threshold prediction model outputs the risk degree threshold.

[0417] In the embodiments of the above steps 2810 to 2840, the associated transactions of the target user on the target blockchain are input into the label attribute recognition model to determine the label attributes, and then the label attributes and the static attributes of the target user are input into the risk degree threshold prediction model to obtain the risk degree threshold, and the risk degree threshold matches the target user, thereby realizing personalized warning and further improving the security of virtual resource transaction processing.

[0418] Processing of virtual resource quantity in the warning state

[0419] In the embodiments of the above 2410 and step 2420, if the first difference between the current actual total virtual resources and the current predicted total virtual resources exceeds the risk degree threshold, a warning is issued. In this case, in one embodiment, referring to Figure 30 , after step 2420, the virtual resource warning processing method further includes:

[0420] Step 3010: Determine the second difference between the first difference and the risk degree threshold;

[0421] Step 3020: Obtain the current virtual resource quantity in the resource pool of the target user;

[0422] Step 3030: Determine the virtual resource reduction amount based on the current virtual resource quantity and the second difference;

[0423] Step 3040: Reduce the current virtual resource quantity based on the virtual resource reduction amount.

[0424] The following describes steps 3010 to 3040 in detail.

[0425] In step 3010, the second difference between the first difference and the risk degree threshold is determined.

[0426] The second difference is the difference between the first difference and the risk degree threshold.

[0427] If the first difference is MB = M_log - PM_log and the risk degree threshold is N, then the second difference can be expressed as MB - N.

[0428] In step 3020, the current virtual resource quantity in the resource pool of the target user is obtained.

[0429] The resource pool is the location where the virtual resources of the target user are located on the target blockchain. The current virtual resource quantity is the number of virtual resources currently held by the target user on the target blockchain.

[0430] Refer to Figure 2A , the current virtual resource quantity of the target user on the target blockchain corresponding to the virtual resource platform is 1000.

[0431] In step 3030, based on the current virtual resource quantity and the second difference, determine the virtual resource reduction quantity.

[0432] The virtual resource reduction quantity is determined based on the current virtual resource quantity and the second difference. The virtual resource quantity is directly proportional to the second difference. The greater the second difference, the greater the virtual resource reduction quantity.

[0433] It should be noted that in the embodiments of the present disclosure, the virtual resource reduction quantity can be determined based on the current virtual resource quantity and the second difference in various ways. For example, construct a table of the second difference and the virtual resource reduction ratio, and then look up in the table based on the second difference to determine the virtual resource reduction ratio, and take the product of the virtual resource reduction ratio and the current virtual resource quantity as the virtual resource reduction quantity. Additionally, a reduction quantity prediction model can also be constructed, and the input of the reduction quantity prediction model is the current virtual resource quantity and the second difference, and the output of the reduction quantity prediction model is the virtual resource reduction quantity.

[0434] In step 3040, based on the virtual resource reduction quantity, reduce the current virtual resource quantity.

[0435] After determining the virtual resource reduction quantity, reduce the current virtual resource quantity in the resource pool of the target user.

[0436] Refer to Figure 11 , the virtual resource reduction quantity is 400. Through the warning message on the virtual resource platform interface, prompt user A to reduce the virtual resource quantity by 400. After that, user A can operate through the withdrawal control to reduce the current virtual resource quantity to 600.

[0437] After the embodiments of the above steps 3010 to 3040 issue a warning, based on the current virtual resource quantity in the resource pool of the target user, and the second difference between the first difference and the risk degree threshold, determine the virtual resource reduction quantity, which can further improve the security of virtual resource transaction processing.

[0438] It can be understood that although the steps in the above-mentioned various flowcharts are sequentially shown according to the indication of the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless there is a clear description in this embodiment, the execution of these steps has no strict order limit, and these steps can be executed in other orders. Moreover, at least a part of the steps in the above-mentioned flowchart may include multiple steps or multiple stages. These steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be executed alternately or in turn with at least a part of other steps or steps or stages in other steps.

[0439] It should be noted that in each specific embodiment of the present application, when it comes to performing relevant processing based on data related to object characteristics such as object attribute information or attribute information sets, the permission or consent of the object will be obtained first. Moreover, the collection, use, and processing of these data will comply with relevant laws, regulations, and standards. In addition, when the embodiments of the present application need to obtain object attribute information, the individual permission or individual consent of the object will be obtained by means of a pop-up window or jumping to a confirmation page. After clearly obtaining the individual permission or individual consent of the object, the necessary object-related data for the normal operation of the embodiments of the present application will be obtained.

[0440] Description of the device and equipment in the embodiments of the present disclosure

[0441] Figure 32 It is a schematic structural diagram of a virtual resource early warning processing device provided by the embodiments of the present disclosure. The virtual resource early warning processing device 3200 includes:

[0442] A first acquisition unit 3210, configured to acquire historical virtual resource transactions recorded on a target blockchain, and acquire historical transaction attributes from historical transaction attribute fields in the historical virtual resource transactions;

[0443] A classification unit 3220, configured to classify the historical virtual resource transactions based on the historical transaction attributes to obtain virtual resource transaction classes;

[0444] A first determination unit 3230, configured to determine first historical values of multiple on-chain statistical parameters of the virtual resource transaction class based on each historical virtual resource transaction in the virtual resource transaction class;

[0445] A second determination unit 3240, configured to, for each on-chain statistical parameter, determine a correlation coefficient between the on-chain statistical parameter and the total amount of virtual resources on the target blockchain based on the first historical value of the on-chain statistical parameter, and determine an overall correlation parameter of the on-chain statistical parameter based on the correlation coefficients corresponding to each virtual resource transaction class;

[0446] A third determination unit 3250, configured to determine a statistical parameter on a target chain from multiple on-chain statistical parameters based on an overall correlation parameter of each on-chain statistical parameter;

[0447] A training unit 3260, configured to train a target prediction model based on a first historical value of the statistical parameter on the target chain;

[0448] A second acquisition unit 3270, configured to acquire an actual value of the statistical parameter on the target chain at the current time, input the actual value into the target prediction model to obtain a current predicted total amount of virtual resources on the target blockchain, and issue a warning based on the current predicted total amount of virtual resources.

[0449] Optionally, the first acquisition unit 3210 is specifically configured to:

[0450] Acquire historical virtual resource blocks on the target blockchain;

[0451] Decompose the historical virtual resource blocks into historical virtual resource transactions.

[0452] Optionally, the historical transaction attribute is a historical transaction type;

[0453] The classification unit 3220 is specifically configured to:

[0454] Classify historical virtual resource transactions of the same historical transaction type into the same virtual resource transaction class.

[0455] Optionally, the historical transaction attribute is multiple historical transaction attributes, and the classification unit 3220 is specifically configured to:

[0456] Cluster multiple historical virtual resource transactions based on multiple historical transaction attributes of the historical virtual resource transactions by using a clustering algorithm to obtain virtual resource transaction classes.

[0457] Optionally, the first determination unit 3230 is specifically configured to:

[0458] In each historical time period, determine a first historical sub-value of multiple on-chain statistical parameters corresponding to the historical time period based on each historical virtual resource transaction in the virtual resource transaction class obtained in the historical time period;

[0459] For a single on-chain statistical parameter, generate a first historical sub-value vector based on the first historical sub-values obtained in each historical time period as the first historical value of the on-chain statistical parameter.

[0460] Optionally, the second determination unit 3240 is specifically configured to:

[0461] Obtain a correlation coefficient function, where the correlation coefficient function is a function of the first historical value and the total amount of virtual resources on the target blockchain;

[0462] Obtain the total amount of virtual resources on the target blockchain for the historical time period corresponding to the first historical value;

[0463] Substitute the first historical value and the total amount of virtual resources on the target blockchain into the correlation coefficient function to obtain the correlation coefficient.

[0464] Optionally, the second determination unit 3240 is specifically further configured to:

[0465] Obtain the number of virtual resources on the target blockchain for the historical time period corresponding to the first historical value;

[0466] Obtain the unit resource amount represented by a single virtual resource in the historical time period;

[0467] Based on the number of virtual resources on the target blockchain and the unit resource amount, determine the total amount of virtual resources on the target blockchain for the historical time period corresponding to the first historical value.

[0468] Optionally, the second determination unit 3240 is specifically further configured to:

[0469] Based on the correlation coefficients corresponding to each virtual resource transaction class, determine the overall correlation parameter of the on-chain statistical parameter, including:

[0470] Obtain the class weight of each virtual resource transaction class;

[0471] Based on the correlation coefficients and class weights of each virtual resource transaction class, calculate the overall correlation parameter of the on-chain statistical parameter.

[0472] Optionally, the third determination unit 3250 is specifically configured to:

[0473] Determine the on-chain statistical parameter with the largest overall correlation parameter as the target on-chain statistical parameter.

[0474] Optionally, the target prediction model is a linear regression model, and the linear regression model has a linear coefficient and an offset;

[0475] The training unit 3260 is specifically configured to:

[0476] Determine the first logarithm of the first historical value;

[0477] Obtain the total amount of virtual resources on the target blockchain for the historical time period corresponding to the first historical value;

[0478] Determine the second logarithm of the total amount of virtual resources on the target blockchain;

[0479] Use the first logarithm as the input of the linear regression model and the second logarithm as the output of the linear regression model to solve for the linear coefficient and the offset.

[0480] Optionally, the statistical parameters on the target chains are multiple statistical parameters on the target chains where the overall correlation parameter meets a predetermined condition; the linear regression model has multiple linear coefficients respectively corresponding to the multiple statistical parameters on the target chains;

[0481] The training unit 3260 is specifically further configured to:

[0482] Determine the first logarithm of each of the multiple first historical values of the multiple statistical parameters on the target chains;

[0483] Use the first logarithm of each of the multiple first historical values of the multiple statistical parameters on the target chains as the input of the linear regression model, and use the second logarithm as the output of the linear regression model to solve for the offset and the linear coefficients respectively corresponding to each statistical parameter on the target chain.

[0484] Optionally, the second obtaining unit 3270 is specifically configured to:

[0485] Obtain the actual values of the multiple statistical parameters on the target chains at the current time, input the actual values of the multiple statistical parameters on the target chains into the target prediction model, and perform operations based on the offset and the linear coefficients respectively corresponding to each statistical parameter on the target chain to obtain the current predicted total virtual resource amount.

[0486] Optionally, the statistical parameters on the target chains are multiple statistical parameters on the target chains where the overall correlation parameter meets a predetermined condition; the linear regression model includes multiple linear regression sub-models, and each linear regression sub-model has a linear coefficient and an offset corresponding to one statistical parameter on the target chain;

[0487] The training unit 3260 is specifically further configured to:

[0488] Determine the first logarithm of each of the multiple first historical values of the multiple statistical parameters on the target chains;

[0489] For each statistical parameter on the target chain, use the first logarithm of the first historical value of the statistical parameter on the target chain as the input of the linear regression sub-model corresponding to the statistical parameter on the target chain, and use the second logarithm as the output of the linear regression sub-model corresponding to the statistical parameter on the target chain to solve for the linear coefficient and the offset corresponding to the statistical parameter on the target chain.

[0490] Optionally, the second obtaining unit 3270 is specifically configured to:

[0491] Obtain the actual values of the multiple statistical parameters on the target chains at the current time, input the actual value of each statistical parameter on the target chain into the linear regression sub-model corresponding to the statistical parameter on the target chain to obtain the sub-predicted total virtual resource amount corresponding to the statistical parameter on the target chain;

[0492] Determine the current predicted total virtual resources based on the sub-predicted total virtual resources corresponding to the statistical parameters on each target chain and the statistical parameter weights of the statistical parameters on each target chain.

[0493] Optionally, the second acquisition unit 3270 is further specifically configured to:

[0494] Determine the first difference between the current actual total virtual resources and the current predicted total virtual resources on the target blockchain;

[0495] If the first difference exceeds the risk degree threshold, issue a warning.

[0496] Optionally, the virtual resource warning processing device further includes:

[0497] A third acquisition unit, configured to acquire the static attributes of the target user currently performing virtual resource transaction processing;

[0498] A fourth acquisition unit, configured to acquire the associated transactions associated with the target user in the historical virtual resource transactions recorded on the target blockchain;

[0499] A first input unit, configured to input the associated transactions into the label attribute recognition model to obtain the label attributes of the target user;

[0500] A second input unit, configured to input the static attributes and the label attributes into the risk degree threshold prediction model to obtain the risk degree threshold.

[0501] Optionally, the virtual resource warning processing device further includes:

[0502] A fourth determination unit, configured to determine the second difference between the first difference and the risk degree threshold;

[0503] A fifth acquisition unit, configured to acquire the current virtual resource amount in the resource pool of the target user;

[0504] A fifth determination unit, configured to determine the virtual resource reduction amount based on the current virtual resource amount and the second difference;

[0505] A reduction unit, configured to reduce the current virtual resource amount based on the virtual resource reduction amount.

[0506] Optionally, the second acquisition unit 3270 is further specifically configured to:

[0507] In the case where the first difference exceeds the risk degree threshold, detect the duration for which the first difference exceeds the risk degree threshold;

[0508] If the duration exceeds the predetermined duration threshold, issue a warning.

[0509] Optionally, the virtual resource warning processing method is executed in a time cycle;

[0510] The second acquisition unit 3270 is further specifically configured to:

[0511] If the first difference exceeds the risk threshold, determine the number of consecutive time periods in which the first difference exceeded the risk threshold before the current time period;

[0512] Based on the number of consecutive time periods, determine the warning level;

[0513] Based on the warning level, issue a warning.

[0514] Refer to Figure 33 , Figure 33 FIG. is a block diagram of a part of a terminal for implementing the virtual resource warning processing method according to an embodiment of the present disclosure. The terminal includes: a radio frequency (RF) circuit 3310, a memory 3315, an input unit 3330, a display unit 3340, a sensor 3350, an audio circuit 3360, a wireless fidelity (WiFi) module 3370, a processor 3380, and a power supply 3390 and other components. Those skilled in the art can understand that Figure 33 The shown terminal structure does not constitute a limitation on a mobile phone or a computer, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0515] The RF circuit 3310 can be used for receiving and sending signals during information reception or call processes. Specifically, after receiving the downlink information of the base station, it is given to the processor 3380 for processing; in addition, the designed uplink data is sent to the base station.

[0516] The memory 3315 can be used to store software programs and modules. The processor 3380 executes various functional applications and data processing of the content terminal by running the software programs and modules stored in the memory 3315.

[0517] The input unit 3330 can be used to receive input digital or character information, and generate key signal inputs related to the settings and function controls of the content terminal. Specifically, the input unit 3330 can include a touch panel 3331 and other input devices 3332.

[0518] The display unit 3340 can be used to display the input information or provided information and various menus of the content terminal. The display unit 3340 can include a display panel 3341.

[0519] The audio circuit 3360, the speaker 3361, and the microphone 3362 can provide an audio interface.

[0520] In this embodiment, the processor 3380 included in the terminal can execute the virtual resource warning processing method of the previous embodiment.

[0521] The terminals in the embodiments of the present disclosure include, but are not limited to, mobile phones, computers, intelligent voice interaction devices, intelligent household appliances, vehicle-mounted terminals, aircraft, etc. The embodiments of the present invention can be applied to various scenarios, including but not limited to content recommendation, data screening, etc.

[0522] Figure 34 The structural block diagram of a part of the server for implementing the virtual resource warning processing method of the embodiments of the present disclosure. The server may vary greatly due to configuration or performance, and may include one or more central processing units (CPUs) 3422 (for example, one or more processors) and a memory 3432, and one or more storage media 3430 for storing application programs 3442 or data 3444 (for example, one or more mass storage devices). Among them, the memory 3432 and the storage media 3430 may be transient storage or persistent storage. The program stored in the storage media 3430 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations on the server. Further, the central processing unit 3422 may be configured to communicate with the storage media 3430 and execute a series of instruction operations in the storage media 3430 on the server.

[0523] The server may further include one or more power supplies 3426, one or more wired or wireless network interfaces 3450, one or more input / output interfaces 3458, and / or one or more operating systems 3441, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.

[0524] The central processing unit 3422 in the server may be used to execute the virtual resource warning processing method of the embodiments of the present disclosure.

[0525] The embodiments of the present disclosure further provide a computer-readable storage medium, which is used to store program codes, and the program codes are used to execute the virtual resource warning processing methods of the foregoing various embodiments.

[0526] The embodiments of the present disclosure further provide a computer program product, which includes a computer program. The processor of the computer device reads and executes the computer program, so that the computer device executes to implement the above-mentioned virtual resource warning processing method.

[0527] In the description of the present disclosure and the above-mentioned accompanying drawings, terms such as "first", "second", "third", "fourth", etc. (if any) are used to distinguish similar contents, and do not necessarily describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "include" and "comprise" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or units does not necessarily limit to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.

[0528] It should be understood that in the present disclosure, "at least one (item)" means one or more, and "a plurality" means two or more. "And / or" is used to describe the association relationship of associated contents, indicating that there can be three relationships. For example, "A and / or B" can mean: only A exists, only B exists, and both A and B exist at the same time. Among them, A and B can be singular or plural. The character " / " generally means that the associated contents before and after are in an "or" relationship. "At least one (one) of the following" or its similar expression means any combination of these items, including any combination of single item (one) or plural items (ones). For example, at least one (one) of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0529] It should be understood that in the description of the embodiments of the present disclosure, the meaning of "a plurality (or multiple items)" is more than two. Understandings such as "greater than", "less than", "exceeding", etc. do not include the present number, and understandings such as "above", "below", "within", etc. include the present number.

[0530] In several embodiments provided by the present disclosure, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of units is only a logical function division. In actual implementation, there can be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. The displayed or discussed couplings or direct couplings or communication connections to each other can be indirect couplings or communication connections through some interfaces, devices or units, and can be in electrical, mechanical or other forms.

[0531] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or may be distributed over multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0532] In addition, the functional units in various embodiments of the present disclosure may be integrated in a processing unit, may exist separately as individual physical units, or two or more units may be integrated in one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.

[0533] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present disclosure, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, server 130, or network device, etc.) to execute all or part of the steps of the methods in various embodiments of the present disclosure. The aforementioned storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical discs that can store program codes.

[0534] It should also be understood that the various embodiments provided in the present disclosure can be combined arbitrarily to achieve different technical effects.

[0535] The above is a specific description of the embodiments of the present disclosure, but the present disclosure is not limited to the above embodiments. Those skilled in the art can also make various equivalent deformations or substitutions without departing from the spirit of the present disclosure, and these equivalent deformations or substitutions are all included within the scope defined by the claims of the present disclosure.

Claims

1. A method for virtual resource early warning processing, characterized in that Including: Obtain historical virtual resource transactions recorded on the target blockchain, and obtain historical transaction attributes from the historical transaction attribute fields in the historical virtual resource transactions; Classify the historical virtual resource transactions based on the historical transaction attributes to obtain virtual resource transaction classes; Based on each historical virtual resource transaction in the virtual resource transaction class, determine the first historical value of multiple on-chain statistical parameters of the virtual resource transaction class; For each on-chain statistical parameter, based on the first historical value of the on-chain statistical parameter, determine the correlation coefficient between the on-chain statistical parameter and the total amount of virtual resources on the target blockchain, and based on the correlation coefficients corresponding to each virtual resource transaction class, determine the overall correlation parameter of the on-chain statistical parameter; Based on the overall correlation parameters of each on-chain statistical parameter, determine the target on-chain statistical parameter among the multiple on-chain statistical parameters; Train a target prediction model based on the first historical value of the target on-chain statistical parameter; Obtain the actual value of the target on-chain statistical parameter at the current time, input the actual value into the target prediction model to obtain the current predicted total amount of virtual resources on the target blockchain, and issue a warning based on the current predicted total amount of virtual resources.

2. The virtual resource warning processing method according to claim 1, wherein, The obtaining of the historical virtual resource transactions recorded on the target blockchain includes: Obtain historical virtual resource blocks on the target blockchain; Decompose the historical virtual resource blocks into the historical virtual resource transactions.

3. The virtual resource early warning processing method according to claim 1, wherein The historical transaction attribute is the historical transaction type; The classifying of the historical virtual resource transactions based on the historical transaction attributes to obtain virtual resource transaction classes includes: Group the historical virtual resource transactions of the same historical transaction type into the same virtual resource transaction class.

4. The virtual resource early warning processing method according to claim 1, wherein The historical transaction attribute is multiple historical transaction attributes; The classifying of the historical virtual resource transactions based on the historical transaction attributes to obtain virtual resource transaction classes includes: Based on the multiple historical transaction attributes of the historical virtual resource transactions, use a clustering algorithm to cluster the multiple historical virtual resource transactions to obtain the virtual resource transaction classes.

5. The virtual resource early warning processing method according to claim 1, characterized in that, The determining of the first historical value of multiple on-chain statistical parameters of the virtual resource transaction class based on each historical virtual resource transaction in the virtual resource transaction class includes: In each historical time period, based on each historical virtual resource transaction in the virtual resource transaction class obtained in the historical time period, determine the first historical sub-value of the multiple on-chain statistical parameters corresponding to the historical time period; For a single on-chain statistical parameter, generate a first historical sub-value vector based on the first historical sub-values obtained in each historical time period as the first historical value of the on-chain statistical parameter.

6. The virtual resource early warning processing method according to claim 1, characterized in that The determining of the correlation coefficient between the on-chain statistical parameter and the total amount of virtual resources on the target blockchain for each on-chain statistical parameter based on the first historical value of the on-chain statistical parameter includes: Obtain a correlation coefficient function, where the correlation coefficient function is a function of the first historical value and the total amount of virtual resources on the target blockchain; Obtain the total amount of virtual resources on the target blockchain during the historical time period corresponding to the first historical value; Substitute the first historical value and the total amount of virtual resources on the target blockchain into the correlation coefficient function to obtain the correlation coefficient.

7. The virtual resource early warning processing method according to claim 6, wherein The obtaining the total amount of virtual resources on the target blockchain during the historical time period corresponding to the first historical value includes: Obtain the number of virtual resources on the target blockchain during the historical time period corresponding to the first historical value; Obtain the unit resource amount represented by a single virtual resource during the historical time period; Based on the number of virtual resources on the target blockchain and the unit resource amount, determine the total amount of virtual resources on the target blockchain during the historical time period corresponding to the first historical value.

8. The virtual resource early warning processing method according to claim 1, wherein, The determining the overall correlation parameter of the on-chain statistical parameter based on the correlation coefficients corresponding to each virtual resource transaction class includes: Obtain the class weights of each virtual resource transaction class; Based on the correlation coefficients and the class weights of each virtual resource transaction class, calculate the overall correlation parameter of the on-chain statistical parameter.

9. The virtual resource early warning processing method according to claim 1, wherein The determining the target on-chain statistical parameter among the multiple on-chain statistical parameters based on the overall correlation parameters of each on-chain statistical parameter includes: Determine the on-chain statistical parameter with the largest overall correlation parameter as the target on-chain statistical parameter.

10. The virtual resource early warning processing method according to claim 1, characterized in that, The target prediction model is a linear regression model, and the linear regression model has a linear coefficient and an offset; The training the target prediction model based on the first historical value of the target on-chain statistical parameter includes: Determine the first logarithm of the first historical value; Obtain the total amount of virtual resources on the target blockchain during the historical time period corresponding to the first historical value; Determine the second logarithm of the total amount of virtual resources on the target blockchain; Use the first logarithm as the input of the linear regression model and the second logarithm as the output of the linear regression model to solve for the linear coefficient and the offset.

11. The virtual resource early warning processing method according to claim 10, wherein, The target on-chain statistical parameter is multiple target on-chain statistical parameters whose overall correlation parameters meet a predetermined condition; The linear regression model has multiple linear coefficients corresponding to the multiple target on-chain statistical parameters respectively; The determining the first logarithm of the first historical value includes: determining the first logarithms of the respective first historical values of the multiple target on-chain statistical parameters; The using the first logarithm as the input of the linear regression model and the second logarithm as the output of the linear regression model to solve for the linear coefficient and the offset includes: using the first logarithms of the respective first historical values of the multiple target on-chain statistical parameters as the input of the linear regression model and the second logarithm as the output of the linear regression model to solve for the offset and the linear coefficients corresponding to each target on-chain statistical parameter respectively.

12. The virtual resource warning processing method according to claim 10, characterized in that, The statistical parameters on the target chain are multiple statistical parameters on the target chain where the overall correlation parameter meets a predetermined condition; the linear regression model includes multiple linear regression sub-models, and each of the linear regression sub-models has the linear coefficient and the offset corresponding to one of the statistical parameters on the target chain; The determining the first logarithm of the first historical value includes: determining the first logarithm of each of the first historical values of the multiple statistical parameters on the target chain; The using the first logarithm as the input of the linear regression model and the second logarithm as the output of the linear regression model to solve for the linear coefficient and the offset includes: for each of the statistical parameters on the target chain, using the first logarithm of the first historical value of the statistical parameter on the target chain as the input of the linear regression sub-model corresponding to the statistical parameter on the target chain, and using the second logarithm as the output of the linear regression sub-model corresponding to the statistical parameter on the target chain to solve for the linear coefficient and the offset corresponding to the statistical parameter on the target chain.

13. The virtual resource early warning processing method according to claim 1, characterized in that The issuing a warning based on the current predicted total virtual resource amount includes: Determining a first difference between the current actual total virtual resource amount on the target blockchain and the current predicted total virtual resource amount; If the first difference exceeds a risk degree threshold, issuing the warning.

14. The virtual resource warning processing method according to claim 13, characterized in that The risk degree threshold is determined by the following method: Obtaining the static attributes of the target user currently performing virtual resource transactions; In the historical virtual resource transactions recorded on the target blockchain, obtaining the associated transactions associated with the target user; Inputting the associated transactions into a label attribute recognition model to obtain the label attributes of the target user; Inputting the static attributes and the label attributes into a risk degree threshold prediction model to obtain the risk degree threshold.

15. The virtual resource early warning processing method according to claim 13, wherein, After issuing the warning if the first difference exceeds the risk degree threshold, the virtual resource warning processing method further includes: Determining a second difference between the first difference and the risk degree threshold; Obtaining the current virtual resource amount in the resource pool of the target user; Based on the current virtual resource amount and the second difference, determining the virtual resource reduction amount; Based on the virtual resource reduction amount, reducing the current virtual resource amount.

16. The virtual resource early warning processing method according to claim 13, wherein The virtual resource warning processing method is executed in a time period; The if the first difference exceeds the risk degree threshold, issuing the warning includes: If the first difference exceeds the risk degree threshold, determining the number of consecutive time periods in which the first difference exceeded the risk degree threshold before the current time period; Based on the number of consecutive time periods, determining the warning level; Based on the warning level, issuing the warning.

17. A virtual resource early warning processing device, characterized in that, Includes: A first obtaining unit, configured to obtain the historical virtual resource transactions recorded on the target blockchain, and obtain historical transaction attributes from the historical transaction attribute fields in the historical virtual resource transactions; A classification unit, configured to classify the historical virtual resource transactions based on the historical transaction attributes to obtain virtual resource transaction classes; A first determination unit, configured to determine a first historical value of a plurality of on-chain statistical parameters of the virtual resource transaction class based on each historical virtual resource transaction in the virtual resource transaction class; A second determination unit, configured to, for each of the on-chain statistical parameters, determine a correlation coefficient between the on-chain statistical parameter and the total amount of virtual resources on the target blockchain based on the first historical value of the on-chain statistical parameter, and determine an overall correlation parameter of the on-chain statistical parameter based on the correlation coefficients corresponding to each virtual resource transaction class; A third determination unit, configured to determine a target on-chain statistical parameter among the plurality of on-chain statistical parameters based on the overall correlation parameter of each of the on-chain statistical parameters; A training unit, configured to train a target prediction model based on the first historical value of the target on-chain statistical parameter; A second acquisition unit, configured to acquire an actual value of the target on-chain statistical parameter at the current time, input the actual value into the target prediction model to obtain a current predicted total amount of virtual resources on the target blockchain, and issue an early warning based on the current predicted total amount of virtual resources.

18. An electronic device, comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, it implements the virtual resource early warning processing method according to any one of claims 1 to 16.

19. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the virtual resource early warning processing method according to any one of claims 1 to 16.

20. A computer program product, which includes a computer program. The computer program is read and executed by a processor of a computer device, so that the computer device executes the virtual resource early warning processing method according to any one of claims 1 to 16.

Citation Information

Patent Citations

  • Resource matching method, device and apparatus

    CN110532092A

  • Data processing method and device, equipment and medium

    CN112417327A