Heterogeneous chain monitoring method and device based on information entropy, equipment and medium

By generating normalized feature values ​​and calculating information entropy, the monitoring cycle and computing resources are dynamically adjusted, solving the problem of cross-architecture resource mismatch in blockchain and achieving efficient resource matching and real-time optimization.

CN123185196APending Publication Date: 2026-11-27HANGZHOU QULIAN TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611040598.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-13
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

Existing technologies have fixed and isolated resource scheduling and parsing logic in cross-architecture and multi-protocol blockchain environments, leading to resource mismatch and analysis latency. This makes it difficult to achieve efficient, closed-loop real-time tracking of asset paths, especially with resource waste during transaction troughs and the inability to dynamically scale up during data surges.

Method used

By generating normalized feature values ​​and calculating information entropy, the monitoring cycle and computing resource allocation are dynamically adjusted to establish a unified cross-chain activity evaluation benchmark, match the degree of fluctuation in on-chain behavior, and optimize resource allocation.

Benefits of technology

It enables dynamic matching of resources in heterogeneous chain environments, reduces resource waste, ensures the real-time and stability of cross-chain asset flow analysis, and avoids unilateral resource tilting towards high-performance chains.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123185196A_ABST
    Figure CN123185196A_ABST
Patent Text Reader

Abstract

The application relates to a heterogeneous chain monitoring method and device based on information entropy, equipment and a storage medium. The method comprises the following steps: based on the feature data collected from the heterogeneous chain, a normalized feature value representing the activity degree of the chain behavior of the heterogeneous chain is generated; the information entropy of the heterogeneous chain is calculated according to the normalized feature value and the feature center vector of each transaction behavior in the heterogeneous chain, wherein the information entropy of the heterogeneous chain represents the behavior fluctuation degree of the heterogeneous chain; the monitoring period of the next round of monitoring the heterogeneous chain and the computing power resources required to be allocated for monitoring the heterogeneous chain are calculated according to the information entropy of the heterogeneous chain; and the heterogeneous chain is monitored according to the monitoring period of the heterogeneous chain and the computing power resources required to be allocated for monitoring the heterogeneous chain. The application can reduce the redundant cost while ensuring the real-time performance and stability of cross-protocol asset flow analysis.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of blockchain technology, and in particular to a heterogeneous chain monitoring method, apparatus, device, and storage medium based on information entropy. Background Technology

[0002] Currently, global distributed public blockchain message monitoring primarily relies on fixed-frequency polling or event subscription mechanisms based on remote procedure call interfaces. This mechanism involves deploying monitoring nodes globally, pre-setting static parsing templates and hard-coded filtering rules for different blockchain architectures, and employing linear load balancing strategies for task allocation. While this model achieves basic monitoring, its resource scheduling and parsing logic are fixed and isolated, lacking a unified understanding of the dynamic characteristics of the entire chain environment. In complex environments involving cross-architecture and multi-protocol systems, existing technologies suffer from resource mismatch and analysis latency issues. For example, fixed-frequency monitoring leads to significant performance polarization, resulting in a large amount of bandwidth and computing power being wasted during periods of low transaction activity, while during data surges or sudden risks, the inability to dynamically scale leads to task backlog, negating the real-time monitoring significance of asset flows. Due to the lack of a unified activity metric across models, the system struggles to perform weighted scheduling between heterogeneous chains, making high-value cross-chain activities easily buried in massive noise, hindering efficient, closed-loop real-time tracking of asset paths. Summary of the Invention

[0003] In view of the above, this application provides a heterogeneous chain monitoring method, apparatus, device and storage medium based on information entropy, the purpose of which is to solve the above-mentioned technical problems.

[0004] Firstly, this application provides a heterogeneous chain monitoring method based on information entropy, the method comprising: Based on the feature data collected from heterogeneous chains, normalized feature values ​​that characterize the on-chain activity level of heterogeneous chains are generated. Based on the normalized eigenvalues ​​and the feature center vector of each transaction behavior in the heterogeneous chain, the information entropy of the heterogeneous chain is calculated, whereby the information entropy of the heterogeneous chain characterizes the degree of behavioral fluctuation of the heterogeneous chain. Based on the information entropy of the heterogeneous chain, calculate the monitoring period for the next round of monitoring the heterogeneous chain and the computing power resources that need to be allocated for monitoring the heterogeneous chain; The heterogeneous chains are monitored based on their monitoring period and the computing resources required for monitoring.

[0005] Secondly, this application provides a heterogeneous chain monitoring device based on information entropy, the heterogeneous chain monitoring device based on information entropy includes: Generation module: Used to generate normalized feature values ​​that characterize the on-chain activity level of heterogeneous chains based on feature data collected from heterogeneous chains; The first calculation module is used to calculate the information entropy of the heterogeneous chain based on the normalized feature value and the feature center vector of each transaction behavior in the heterogeneous chain, wherein the information entropy of the heterogeneous chain characterizes the degree of behavioral fluctuation of the heterogeneous chain. The second calculation module is used to calculate the monitoring period for the next round of monitoring heterogeneous chains and the computing power resources that need to be allocated for monitoring heterogeneous chains based on the information entropy of the heterogeneous chains. Monitoring module: Used to monitor heterogeneous chains according to the monitoring period and the computing resources that need to be allocated to monitor the heterogeneous chains.

[0006] Thirdly, this application provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; Memory, used to store computer programs; When a processor executes a program stored in memory, it implements the steps of the heterogeneous chain monitoring method based on information entropy as described in any embodiment of the first aspect.

[0007] Fourthly, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps of the heterogeneous chain monitoring method based on information entropy as described in any embodiment of the first aspect.

[0008] The technical solutions provided in this application have the following advantages compared with the prior art: By generating normalized feature values, a unified cross-chain activity evaluation benchmark is established, enabling heterogeneous chains with different performance levels to compare their activity on the same scale, avoiding a one-way resource allocation bias towards high-performance chains. Information entropy is used to quantify the behavioral volatility of heterogeneous chains, transforming the dispersion of on-chain states into a calculable numerical indicator. The monitoring cycle is dynamically adjusted based on information entropy, ensuring a positive correlation between the frequency of data collection and the degree of on-chain volatility; that is, the cycle is shortened during high volatility to improve real-time performance, and lengthened during low volatility to reduce idle time. Dynamic allocation of computing resources based on information entropy allows high-volatility chains to receive more computing power to ensure throughput, while low-volatility chains receive less computing power to avoid resource idleness. This collaborative optimization of monitoring cycle and resource allocation can reduce redundancy costs while ensuring the real-time performance and stability of cross-protocol asset flow analysis. Attached Figure Description

[0009] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0010] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0011] Figure 1 This is a flowchart illustrating a preferred embodiment of the heterogeneous chain monitoring method based on information entropy in this application. Figure 2 This is a schematic diagram of a preferred embodiment of the heterogeneous chain monitoring device based on information entropy in this application. Figure 3 This is a schematic diagram of a preferred embodiment of the electronic device of this application; The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0012] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application. All other embodiments obtained by those skilled in the art based on the embodiments in this application without inventive effort are within the scope of protection of this application.

[0013] It should be noted that the use of terms such as "first" and "second" in this application is for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include at least one of those features. Furthermore, the technical solutions of the various embodiments can be combined with each other, but this must be based on the ability of those skilled in the art to implement them. If the combination of technical solutions is contradictory or impossible to implement, such a combination of technical solutions should be considered non-existent and not within the scope of protection claimed in this application.

[0014] Reference Figure 1 The diagram shown is a flowchart illustrating an embodiment of the heterogeneous chain monitoring method based on information entropy according to this application. The method is executed by an electronic device, which can be implemented by a software system and / or a hardware system. This heterogeneous chain monitoring method based on information entropy includes: Step S10: Based on the feature data collected from the heterogeneous chains, generate normalized feature values ​​that characterize the on-chain activity level of the heterogeneous chains. Step S20: Calculate the information entropy of the heterogeneous chain based on the normalized eigenvalues ​​and the feature center vector of each transaction behavior in the heterogeneous chain, wherein the information entropy of the heterogeneous chain characterizes the degree of behavioral fluctuation of the heterogeneous chain; Step S30: Based on the information entropy of the heterogeneous chain, calculate the monitoring period of the next round of monitoring the heterogeneous chain and the computing power resources that need to be allocated for monitoring the heterogeneous chain; Step S40: Monitor the heterogeneous chain according to the monitoring period of the heterogeneous chain and the computing power resources that need to be allocated to monitor the heterogeneous chain.

[0015] In blockchain cross-chain monitoring scenarios, heterogeneous chains refer to public chains that employ different consensus mechanisms, data formats, and interface protocols. For example, some chains use account models and Turing-complete smart contracts, some use UTXO models and finite scripts, and others use proof-of-history mechanisms and high-concurrency architectures. These heterogeneous chains exhibit orders of magnitude differences in performance metrics such as transactions per second, block size, and block time. If the activity of raw traffic data from heterogeneous chains is directly compared, the absolute number of transactions from high-performance chains will suppress that of low-performance chains, causing monitoring resources to continuously skew towards high-performance chains.

[0016] Since the performance metrics of heterogeneous chains are not on the same order of magnitude, this embodiment solves the problem of inconsistent dimensions through normalization. Specifically, the monitoring node establishes a communication connection with the nodes of the heterogeneous chain through a remote procedure call interface or an event subscription mechanism, and collects the raw on-chain data of the heterogeneous chain during the observation period. The raw on-chain data includes block header information, transaction list, transaction receipts, and event logs, etc., and extracts three indicators from the raw on-chain data: total number of transactions, number of different addresses, and transaction fee change rate.

[0017] The total number of transactions refers to the total number of confirmed transactions within the observation period, reflecting the absolute traffic scale of the heterogeneous chain. The number of distinct addresses refers to the total number of unique addresses involved in all transactions within the observation period, reflecting the spatial distribution breadth of participants on the heterogeneous chain. The transaction fee change rate refers to the ratio of the average transaction fee in the current observation period to the average transaction fee in the previous observation period, reflecting the dynamic changes in the degree of resource competition on the heterogeneous chain.

[0018] Historical statistical benchmarks for heterogeneous chains are obtained, including the historical maximum total number of transactions, the historical maximum number of distinct addresses, and the historical maximum fee change rate. The total number of transactions is divided by the historical maximum total number of transactions to obtain the normalized total transaction component; the number of distinct addresses is divided by the historical maximum number of distinct addresses to obtain the normalized number of distinct addresses component; and the fee change rate is divided by the historical maximum fee change rate to obtain the normalized fee change rate component. Normalized eigenvalues ​​are then calculated based on these three components. These normalized eigenvalues ​​map the original activity indicators of heterogeneous chains to dimensionless values ​​between 0 and 1, eliminating the differences in energy levels between heterogeneous chains and allowing for activity comparisons of chains with different architectures on the same scale.

[0019] For example, suppose chain F generates 10,000 transactions during the observation period, with a historical maximum of 50,000 transactions. Its total transaction count, after normalization, is 0.2. Chain G generates 2,000 transactions during the same period, with a historical maximum of 4,000 transactions. Its total transaction count, after normalization, is 0.5. Although chain F's absolute transaction volume is much higher than chain G's, the normalized result shows that chain G is currently at 50% of its historical peak activity, while chain F is only at 20%. Monitoring resources should be tilted towards chain G rather than chain F to prevent high-value cross-chain behavior from being drowned out by massive noise.

[0020] After obtaining the normalized eigenvalues, it is necessary to quantify the fluctuations in on-chain activity levels across heterogeneous chains to determine whether the current period is stable or characterized by rapid change. On-chain activity levels refer to the overall activity level of the heterogeneous chain within the observation period, including information such as transaction frequency, address participation, and the intensity of fee competition. Information entropy, a mathematical tool in information theory used to measure the uncertainty and randomness of a system, is used in blockchain monitoring scenarios to quantify the dispersion of various transaction behaviors on heterogeneous chains. Specifically, the Euclidean distance between the normalized eigenvalues ​​and the feature center vectors of each transaction behavior is calculated to obtain the distance values ​​between the normalized eigenvalues ​​and the feature center vectors of each transaction behavior. Based on these distance values, the frequency of each transaction behavior is calculated, and then the information entropy is obtained.

[0021] For example, if a heterogeneous chain remains in a low-activity period during the observation period, the distance between the normalized eigenvalue and the feature center vector of the low-activity period is extremely small, indicating that the frequency of the low-activity period is absolutely dominant, while the frequencies of other transaction behaviors approach 0. In this case, the frequency distribution is highly concentrated, and the information entropy calculation result approaches 0, indicating extremely low behavioral fluctuations and a stable on-chain environment. Conversely, if a heterogeneous chain abruptly changes from a low-activity period to an abnormally congested period during the observation period, the distance between the normalized eigenvalue and the feature center vectors of each transaction behavior is dispersed, and the frequencies of various transaction behaviors all have significant values. In this case, the frequency distribution tends to be uniform, and the information entropy calculation result increases, indicating drastic behavioral fluctuations and a need to improve monitoring response speed.

[0022] Traditional fixed-frequency monitoring mechanisms continuously poll at high frequencies during periods of low activity in heterogeneous chains, resulting in a large amount of wasted bandwidth and computing power. Furthermore, during periods of market volatility or sudden security risks, the inability to dynamically scale leads to task backlog and response delays, creating performance polarization. To overcome the rigidity of fixed-frequency mechanisms, this embodiment dynamically adjusts the monitoring cycle and computing resources based on information entropy, matching the monitoring intensity to the volatility of on-chain behavior, and calculates the monitoring cycle for the next round of monitoring heterogeneous chains and the computing resources required for monitoring them.

[0023] The listening period refers to the time interval between two consecutive data acquisitions, and computing resources refer to the computing resource quota used for parsing and processing heterogeneous chain data. Specifically, the listening period is calculated based on information entropy, preset sensitivity, preset entropy threshold, and hardware performance boundaries. The hardware performance boundaries include the minimum and maximum listening periods. The information entropy is mapped to the listening period through a non-linear smoothing function to avoid drastic jumps near the threshold point.

[0024] Regarding computing resource allocation, the total number of heterogeneous chains currently being monitored is obtained, along with the information entropy of each chain. Based on these entropies and a preset sensitivity coefficient, the computing power allocation weight is calculated. The maximum available computing power is then multiplied by each allocation weight to determine the computing power resources to be allocated to each heterogeneous chain in the next round of monitoring. When the sensitivity coefficient is high, the computing power allocation weight is sharply concentrated on a few heterogeneous chains with the highest information entropy. When the sensitivity coefficient is low, the computing power allocation weight is distributed more evenly across all heterogeneous chains.

[0025] For example, suppose we are simultaneously monitoring two heterogeneous chains, chain F and chain G. Chain F currently has an information entropy of 0.9, chain G has an information entropy of 0.3, an entropy threshold of 0.7, a sensitivity of 2, a minimum monitoring period of 1 second, and a maximum monitoring period of 60 seconds. For chain F, the information entropy exceeds the entropy threshold, and after adjustment using a non-linear smoothing function, the monitoring period is shortened to approximately 20 seconds. For chain G, the information entropy is below the entropy threshold, and after adjustment, the monitoring period is extended to approximately 50 seconds. In terms of computing resource allocation, if the sensitivity coefficient is 2, the computing power allocation weight for chain F is approximately 77%, and for chain G, it is approximately 23%, indicating that monitoring resources are tilted towards the more volatile chain F.

[0026] After the monitoring period and computing resources are calculated, the monitoring node adjusts the time interval for the next collection of raw on-chain data from heterogeneous chains based on the calculated monitoring period. When the monitoring period is shortened, the data collection frequency increases; when the monitoring period is extended, the data collection frequency decreases. Simultaneously, the monitoring node adjusts the parsing capabilities allocated to heterogeneous chains based on the calculated computing resources. When computing resources increase, the data processing throughput is improved; when computing resources decrease, computing power is released to other highly volatile heterogeneous chains.

[0027] The monitoring nodes re-execute data collection and analysis on heterogeneous chains with adjusted monitoring cycles and computing resources. The newly collected data is then input into the normalized feature value generation process to continuously calculate the updated information entropy, thereby continuously optimizing the monitoring cycle and computing resources. For example, in the previous round of monitoring, chain F received a shorter monitoring cycle and more computing resources due to its higher information entropy. After a round of intensive monitoring, if the abnormal congestion on the chain is alleviated and the degree of behavioral fluctuation decreases, the information entropy calculated in the new round will decrease, the monitoring cycle will automatically extend, and the computing resources will automatically decrease. The monitoring intensity adapts to changes in the on-chain environment.

[0028] In one embodiment, generating normalized feature values ​​characterizing the on-chain behavior information of the heterogeneous chain based on feature data collected from the heterogeneous chain includes: During the predetermined monitoring period, the total number of transactions, the number of different addresses, and the rate of change of transaction fees are collected from the heterogeneous chains as the original three-dimensional feature data of the heterogeneous chains. The original three-dimensional feature data is cleaned to obtain cleaned three-dimensional feature data; Normalization is performed on the cleaned 3D feature data to generate normalized feature values ​​that characterize the on-chain activity of heterogeneous chains.

[0029] During the predetermined monitoring period, the monitoring node establishes a communication connection with the nodes of the heterogeneous chain through a remote procedure call interface or an event subscription mechanism, and collects the total number of transactions, the number of different addresses, and the transaction fee change rate from the heterogeneous chain as the original three-dimensional feature data of the heterogeneous chain.

[0030] The original 3D feature data is cleaned to obtain cleaned 3D feature data. Data cleaning includes removing duplicate transaction records, filtering abnormal transaction fee values, and completing missing block data. Removing duplicate transaction records refers to identifying and eliminating cases where the same transaction is entered into the database multiple times due to network retransmissions. Filtering abnormal transaction fee values ​​involves setting a reasonable threshold for transaction fees and replacing extreme transaction fee values ​​exceeding the threshold with the median transaction fee within the monitoring period. Completing missing block data involves backtracking to fill in the transaction information of missing blocks when there are discontinuous block heights within the monitoring period.

[0031] Normalization can be achieved using the historical peak normalization method to obtain historical statistical benchmark values ​​for heterogeneous chains. These benchmark values ​​include the historical maximum total number of transactions, the historical maximum number of distinct addresses, and the historical maximum transaction fee change rate. The normalized transaction total component is obtained by dividing the cleaned total number of transactions by the historical maximum total number of transactions. Similarly, the normalized number of distinct addresses component is obtained by dividing the cleaned number of distinct addresses by the historical maximum number of distinct addresses. Finally, the normalized transaction fee change rate component is obtained by dividing the cleaned transaction fee change rate by the historical maximum transaction fee change rate. The normalized feature value is then calculated based on these three components. The specific formula is as follows:

[0032]

[0033] in, V i This represents the eigenvalue of the i-th heterogeneous chain. V tx This represents the total number of transactions within the observation period. V addr Indicates the number of distinct addresses involved in the transaction. V gas This indicates the rate of change in transaction fees. Let max( represent the normalized eigenvalue of the i-th heterogeneous chain) ) represents the maximum eigenvalue of the i-th heterogeneous chain in the historical statistical benchmark, min( ) represents the minimum eigenvalue of the i-th heterogeneous chain in the historical statistical benchmark.

[0034] Normalized eigenvalues ​​map the original activity index of heterogeneous chains to a dimensionless value in the range of 0 to 1. This value can eliminate the difference in energy levels between heterogeneous chains, allowing chains with different architectures to be compared in activity on the same scale.

[0035] In one embodiment, calculating the information entropy of the heterogeneous chain based on the normalized eigenvalues ​​and the feature center vector of each transaction behavior in the heterogeneous chain includes: Calculate the distance between the normalized eigenvalue and the feature center vector corresponding to each transaction behavior in the heterogeneous chain to obtain the distance value between the normalized eigenvalue and the feature center vector of each transaction behavior; Based on the distance value and the preset smoothing coefficient, the frequency of each transaction behavior in the heterogeneous chain is calculated; The information entropy of the heterogeneous chain is calculated based on the frequency of each transaction behavior in the chain.

[0036] For example, if the normalized eigenvalues ​​are 0.3, 0.2, and 0.1, the feature center vectors for the low-activity period are 0.2, 0.1, and 0.05, and the feature center vectors for the normal fluctuation period are 0.5, 0.4, and 0.3, then the Euclidean distance between the normalized eigenvalues ​​and the feature center vectors for the low-activity period is 0.122, and the Euclidean distance between the normalized eigenvalues ​​and the feature center vectors for the normal fluctuation period is 0.374. A smaller distance value for the low-activity period indicates that the current on-chain environment is closer to the low-activity period.

[0037] Based on the distance value and a preset smoothing coefficient, the frequency of each transaction behavior in the heterogeneous chain is calculated. The frequency distribution of each transaction behavior is calculated using a probability transformation function based on the distance value, while the smoothing coefficient controls the degree of influence of the distance value on the frequency distribution. For example, if the heterogeneous chain remains in a low-activity period during the monitoring period, the frequency of the low-activity period is 0.95, and the frequencies of other transaction behaviors are close to 0. In this case, the frequency distribution is highly concentrated, and the information entropy calculation result is close to 0, indicating extremely low behavioral fluctuations and a stable on-chain environment. Conversely, if the heterogeneous chain abruptly changes from a low-activity period to an abnormally congested period during the monitoring period, the frequencies of various transaction behaviors all have significant values, such as a low-activity period frequency of 0.3, a normal fluctuation period frequency of 0.2, a high-concurrency period frequency of 0.3, and an abnormally congested period frequency of 0.2. In this case, the frequency distribution tends to be uniform, and the information entropy calculation result is 1.97, indicating drastic behavioral fluctuations, an unstable on-chain environment, and a need to improve monitoring response speed.

[0038] Further, the step of calculating the frequency of each transaction behavior in the heterogeneous chain based on the distance value and a preset smoothing coefficient includes: Calculate the square of the distance between the normalized eigenvalue and the feature center vector of each transaction behavior, divide the square of the distance by twice the square of the smoothing coefficient, and take the negative value. The similarity score for each transaction behavior is obtained by performing an exponential operation on the negative values, and the total similarity score is obtained by summing the similarity scores of each transaction behavior. Divide the similarity score of each transaction behavior by the total similarity score to obtain the frequency of each transaction behavior in the heterogeneous chain.

[0039] In blockchain monitoring scenarios, directly using distance values ​​as the classification criterion can lead to transactions with smaller distance values ​​dominating, while the contributions of other transactions are ignored, resulting in an inability to reflect the gradual changes in the on-chain environment. Introducing a smoothing coefficient to exponentially decay distance values ​​ensures that transactions with larger distance values ​​still retain a certain probability contribution, avoiding abrupt changes in classification results. For example, the distance between the normalized feature value and the feature center vector during a low-activity period is 0.122, the square of the distance value is 0.015, the smoothing coefficient is 0.4, twice the square of the smoothing coefficient is 0.32, and 0.015 divided by 0.32 is negatively calculated as -0.047.

[0040] The similarity score for each trading behavior is obtained by performing an exponential operation on negative values. The total similarity score is then obtained by summing these scores. The exponential operation converts the negative distance penalty into a positive similarity metric; the smaller the distance value, the higher the similarity score, and vice versa, but the score is not zero. For example, performing an exponential operation on -0.047 yields a similarity score of 0.954 for low-activity periods. The distance values ​​between the normalized feature value and the feature center vectors of other trading behaviors are then processed using the same operation to obtain similarity scores of 0.031 for normal fluctuation periods, 0.010 for high-concurrency periods, and 0.005 for abnormally congested periods, for a total similarity score of 1.000.

[0041] The frequency of each transaction behavior in the heterogeneous chain is obtained by dividing the similarity score of each behavior by the total similarity score. Normalization ensures that the sum of the frequencies of all transactions is 1, forming a valid probability distribution. For example, the frequency during low-activity periods is 0.954 divided by 1.000, which equals 0.954; the frequency during normal fluctuation periods is 0.031 divided by 1.000, which equals 0.031; the frequency during high-concurrency periods is 0.010 divided by 1.000, which equals 0.010; and the frequency during abnormal congestion periods is 0.005 divided by 1.000, which equals 0.005. The frequency distribution is highly concentrated in low-activity periods, indicating that the current on-chain environment is stable. If the smoothing coefficient is increased to 0.8, the negative value at the same distance becomes -0.023, the similarity score during low-activity periods becomes 0.977, and the similarity scores of other transactions increase accordingly. The frequency distribution tends to be flatter, indicating that the larger the smoothing coefficient, the lower the system's sensitivity to distance differences, and the smoother the classification results. This allows monitoring nodes to adjust the classification sharpness according to actual needs. In high-security-sensitive scenarios, a smaller smoothing coefficient is used to quickly identify state transitions, while in resource-constrained scenarios, a larger smoothing coefficient is used to reduce computing power fluctuations caused by state switching. The formula for the information entropy of heterogeneous chains can be expressed as:

[0042]

[0043] in, Let represent the information entropy of the i-th heterogeneous chain. This represents the frequency of the j-th behavior. This represents the normalized eigenvalue of the i-th heterogeneous chain. C j The feature center vector representing the j-th behavior. The smoothing factor exp represents an exponential operation with the natural constant e as the base, and m represents the total number of transaction types, such as transfers, smart contract calls, cross-chain transactions, etc.

[0044] In one embodiment, calculating the monitoring period for the next round of monitoring the heterogeneous chain and the computing power resources required for monitoring the heterogeneous chain based on the information entropy of the heterogeneous chain includes: Based on the information entropy of the heterogeneous chain, the preset adjustment coefficient, and the minimum monitoring period, calculate the monitoring period of the next round of monitoring the heterogeneous chain; Based on the information entropy of the heterogeneous chain, the preset sensitivity coefficient, and the maximum available computing power resources, calculate the computing power resources that need to be allocated for the next round of monitoring the heterogeneous chain.

[0045] The monitoring period refers to the time interval between two consecutive data collections. By introducing an adjustment coefficient, the information entropy is mapped to the monitoring period, so that the monitoring frequency is positively correlated with the degree of fluctuation of on-chain behavior. The higher the information entropy, the shorter the monitoring period, and the lower the information entropy, the longer the monitoring period, thereby avoiding resource idleness during low-activity periods and lag during high-concurrency periods.

[0046] In multi-chain parallel monitoring scenarios, the total system computing power resources are limited. If evenly distributed across all heterogeneous chains, high-volatility chains will lose critical data due to insufficient computing power, while low-volatility chains will waste computing power due to excess resources. A sensitivity coefficient is used to control the degree to which computing power resources are concentrated on high-volatility chains. By converting information entropy into computing power allocation weights, heterogeneous chains with higher information entropy receive a larger proportion of computing power resources, and those with lower information entropy receive a smaller proportion. This achieves dynamic adaptive scheduling of global computing power, reducing redundancy costs while ensuring the real-time nature of cross-protocol asset flow analysis.

[0047] Furthermore, the calculation of the monitoring period for the next round of monitoring the heterogeneous chain based on the information entropy of the heterogeneous chain, a preset adjustment coefficient, and a minimum monitoring period includes: Calculate the difference between the information entropy and the preset entropy threshold, and multiply the difference by the preset adjustment coefficient to obtain the adjustment factor; The periodic adjustment coefficient is obtained by performing hyperbolic tangent function calculation on the adjustment factor; Use half of the sum of the preset minimum monitoring period and the preset maximum monitoring period as the base period. Use half the difference between the preset minimum monitoring period and the preset maximum monitoring period as the period adjustment range. Multiply the period adjustment range by the period adjustment coefficient to obtain the period offset, and subtract the period offset from the base period to obtain the monitoring period of the next round of monitoring heterogeneous chains.

[0048] The entropy threshold indicates the trigger point at which the system begins to shorten the monitoring cycle, and the adjustment coefficient controls the response speed of the monitoring cycle to changes in information entropy. When the information entropy is below the entropy threshold, the difference is negative, and the adjustment factor is also negative, indicating that the on-chain behavior is less volatile, thus the monitoring cycle can be extended to reduce resource consumption. When the information entropy is above the entropy threshold, the difference is positive, and the adjustment factor is positive, indicating that the on-chain behavior is more volatile, thus the monitoring cycle can be shortened to improve monitoring accuracy.

[0049] The output range of the hyperbolic tangent function is from -1 to +1. When the adjustment factor approaches positive infinity, the periodic adjustment coefficient approaches 1; when the adjustment factor approaches negative infinity, the periodic adjustment coefficient approaches -1; and when the adjustment factor is 0, the periodic adjustment coefficient is 0. This avoids drastic changes in the monitoring period caused by small fluctuations in information entropy near the threshold point, thus achieving a smooth transition in the monitoring period.

[0050] The baseline period is defined as half the sum of the preset minimum and maximum listening periods, and the period adjustment range is defined as half the difference between the preset minimum and maximum listening periods. The minimum and maximum listening periods are determined by hardware performance limits; the minimum listening period represents the time interval corresponding to the highest sampling frequency supported by the hardware, and the maximum listening period represents the time interval corresponding to the lowest sampling frequency supported by the hardware. The baseline period is the central reference point for the listening period, and the period adjustment range is the maximum deviation of the listening period relative to the baseline period.

[0051] When the period adjustment coefficient is 1, the period offset equals the period adjustment range, and the listening period equals the minimum listening period, collecting data at the highest frequency. When the period adjustment coefficient is negative 1, the period offset equals the negative period adjustment range, and the listening period equals the maximum listening period, collecting data at the lowest frequency. For example, assuming the minimum listening period is 1 second and the maximum listening period is 60 seconds, the base period is 30.5 seconds, and the period adjustment range is 29.5 seconds. If the information entropy is 0.9, the entropy threshold is 0.7, and the adjustment coefficient is 2, then the difference is 0.2, the adjustment factor is 0.4, the period adjustment coefficient is approximately 0.38, the period offset is approximately 11.2 seconds, and the listening period is approximately 19.3 seconds. This allows the listening period to automatically scale according to the volatility of on-chain behavior. During periods of high volatility, the period is shortened to near the minimum listening period to ensure real-time performance, while during periods of low volatility, it is extended to near the maximum listening period to save resources, achieving dynamic adjustment of the collection frequency while avoiding system oscillations. The formula for calculating the listening period can be expressed as:

[0052] in, T next This indicates the monitoring period for the next round of monitoring heterogeneous chains. Tmax This indicates the preset maximum listening period. T min This indicates the preset minimum monitoring period. α Indicates sensitivity. β This represents the preset entropy threshold, which can be 0.7. Let represent the information entropy of the i-th heterogeneous chain.

[0053] Furthermore, the calculation of the computing resources required for the next round of monitoring the heterogeneous chain, based on the information entropy of the heterogeneous chain, a preset sensitivity coefficient, and available computing resources, includes: The sensitivity coefficient is multiplied by the information entropy of each heterogeneous chain to obtain the sensitivity entropy value of each heterogeneous chain. The sensitivity entropy value of each heterogeneous chain is exponentially calculated to obtain the computing power allocation base for each heterogeneous chain; Add up all the computing power allocation bases to get the total computing power allocation base. Divide each computing power allocation base by the total computing power allocation base to get the computing power resource weight that each heterogeneous chain needs to be configured. Multiply the available computing resources by the weight of the computing resources that each heterogeneous chain needs to be configured, and obtain the computing resources that each heterogeneous chain needs to be allocated for the next round of monitoring.

[0054] The sensitivity coefficient controls the degree to which computing resources are concentrated on high-volatility chains. A higher sensitivity coefficient indicates that computing resources are more concentrated on a few heterogeneous chains with the highest information entropy, while a lower sensitivity coefficient indicates a more even distribution of computing resources among the heterogeneous chains. For example, assuming three heterogeneous chains are monitored simultaneously, with chain A having an information entropy of 0.9, chain B having an information entropy of 0.5, and chain C having an information entropy of 0.2, and a sensitivity coefficient of 2, then the sensitivity entropy value for chain A is 1.8, for chain B it is 1.0, and for chain C it is 0.4.

[0055] An exponential operation is performed on the sensitivity entropy value of each heterogeneous chain to obtain the computing power allocation base for each chain. The exponential operation uses the natural constant as the base and the sensitivity entropy value as the exponent, converting the linearly changing sensitivity entropy value into an exponentially growing computing power allocation base, thus amplifying the resource gap between high-volatility and low-volatility chains. For example, the computing power allocation base for heterogeneous chain A is approximately 6.05, for heterogeneous chain B it is approximately 2.72, and for heterogeneous chain C it is approximately 1.49.

[0056] The total computing power allocation base is obtained by summing all the base values. Each base value is then divided by the total base value to obtain the computing power resource weight that each heterogeneous chain needs to be allocated. The computing power resource weight represents the proportion of each heterogeneous chain in the global computing power pool, and the sum of the computing power resource weights of all heterogeneous chains is 1. For example, if the total computing power allocation base is approximately 10.26, the computing power resource weight of heterogeneous chain A is approximately 0.59, the computing power resource weight of heterogeneous chain B is approximately 0.27, and the computing power resource weight of heterogeneous chain C is approximately 0.15.

[0057] Multiply the available computing power resources by the weight of the computing power resources required for each heterogeneous chain to obtain the computing power resources allocated to each heterogeneous chain in the next round of monitoring. Available computing power resources refer to the total computing power currently available for heterogeneous chain monitoring, including the number of CPU cores, memory capacity, and number of parsing threads. For example, assuming the available computing power resources are 100 computing units, heterogeneous chain A will be allocated 59 computing units, heterogeneous chain B will be allocated 27 computing units, and heterogeneous chain C will be allocated 15 computing units. This allows computing power resources to be dynamically allocated according to the volatility of each heterogeneous chain's behavior, with high-volatility chains receiving more computing power to ensure real-time parsing capabilities, and low-volatility chains receiving less computing power to avoid resource idleness. The formula for calculating the computing power resources allocated to each heterogeneous chain can be expressed as:

[0058] in, Let K represent the weight corresponding to the computing resources that need to be allocated to the i-th heterogeneous chain, and K represent the total number of heterogeneous chains currently being monitored. Let represent the information entropy of the i-th heterogeneous chain. This represents the preset sensitivity coefficient.

[0059] Reference Figure 2 The diagram shown is a functional module schematic of the heterogeneous chain monitoring device 100 based on information entropy in this application.

[0060] The heterogeneous chain monitoring device 100 based on information entropy described in this application is installed in an electronic device. Depending on the functions implemented, the heterogeneous chain monitoring device 100 based on information entropy includes a generation module 110, a first calculation module 120, a second calculation module 130, and a monitoring module 140. These modules can also be referred to as units, which are a series of computer program segments that can be executed by the processor of an electronic device and can perform a fixed function, and are stored in the memory of the electronic device.

[0061] In this embodiment, the functions of each module / unit are as follows: Generation module: Used to generate normalized feature values ​​that characterize the on-chain activity level of heterogeneous chains based on feature data collected from heterogeneous chains; The first calculation module is used to calculate the information entropy of the heterogeneous chain based on the normalized feature value and the feature center vector of each transaction behavior in the heterogeneous chain, wherein the information entropy of the heterogeneous chain characterizes the degree of behavioral fluctuation of the heterogeneous chain. The second calculation module is used to calculate the monitoring period for the next round of monitoring heterogeneous chains and the computing power resources that need to be allocated for monitoring heterogeneous chains based on the information entropy of the heterogeneous chains. Monitoring module: Used to monitor heterogeneous chains according to the monitoring period and the computing resources that need to be allocated to monitor the heterogeneous chains.

[0062] The specific implementation of the heterogeneous chain monitoring device based on information entropy in this application is largely the same as the specific implementation of the heterogeneous chain monitoring method based on information entropy described above, and will not be repeated here.

[0063] Reference Figure 3 The diagram shown is a schematic representation of a preferred embodiment of the electronic device of this application.

[0064] The electronic device includes a processor 111, a communication interface 112, a memory 113, and a communication bus 114, wherein the processor 111, the communication interface 112, and the memory 113 communicate with each other through the communication bus 114. Memory 113 is used to store computer programs, such as a heterogeneous chain monitoring program based on information entropy; Figure 3 Only an electronic device with components 111-114 is shown; however, it should be understood that it is not required to implement all of the components shown, and more or fewer components may be implemented instead.

[0065] In one embodiment of this application, when the processor 111 executes the program stored in the memory 113, it implements the heterogeneous chain monitoring method based on information entropy provided in any of the foregoing method embodiments, including: Based on the feature data collected from heterogeneous chains, normalized feature values ​​that characterize the on-chain activity level of heterogeneous chains are generated. Based on the normalized eigenvalues ​​and the feature center vector of each transaction behavior in the heterogeneous chain, the information entropy of the heterogeneous chain is calculated, whereby the information entropy of the heterogeneous chain characterizes the degree of behavioral fluctuation of the heterogeneous chain. Based on the information entropy of the heterogeneous chain, calculate the monitoring period for the next round of monitoring the heterogeneous chain and the computing power resources that need to be allocated for monitoring the heterogeneous chain; The heterogeneous chains are monitored based on their monitoring period and the computing resources required for monitoring.

[0066] For a detailed explanation of the above steps, please refer to the above. Figure 1 A flowchart illustrating an embodiment of the heterogeneous chain monitoring method based on information entropy.

[0067] Furthermore, this application also proposes a computer-readable storage medium that is both non-volatile and volatile. This computer-readable storage medium is any one or any combination of several of the following: hard disk, multimedia card, SD card, flash memory card, SMC, read-only memory (ROM), erasable programmable read-only memory (EPROM), portable compact disc read-only memory (CD-ROM), USB memory, etc. The computer-readable storage medium includes a data storage area and a program storage area. The program storage area stores a heterogeneous chain monitoring program based on information entropy. When executed by a processor, the heterogeneous chain monitoring program based on information entropy performs the following operations: Based on the feature data collected from heterogeneous chains, normalized feature values ​​that characterize the on-chain activity level of heterogeneous chains are generated. Based on the normalized eigenvalues ​​and the feature center vector of each transaction behavior in the heterogeneous chain, the information entropy of the heterogeneous chain is calculated, whereby the information entropy of the heterogeneous chain characterizes the degree of behavioral fluctuation of the heterogeneous chain. Based on the information entropy of the heterogeneous chain, calculate the monitoring period for the next round of monitoring the heterogeneous chain and the computing power resources that need to be allocated for monitoring the heterogeneous chain; The heterogeneous chains are monitored based on their monitoring period and the computing resources required for monitoring.

[0068] The specific implementation of the computer-readable storage medium in this application is largely the same as the specific implementation of the heterogeneous chain monitoring method based on information entropy described above, and will not be repeated here.

[0069] It should be noted that the sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, apparatus, article, or method. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, apparatus, article, or method that includes that element.

[0070] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware simulation platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes several instructions to cause a terminal device to execute the methods described in the various embodiments of this application.

[0071] The above are merely preferred embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.

Claims

1. A heterogeneous chain monitoring method based on information entropy, characterized in that, The method includes: Based on the feature data collected from heterogeneous chains, normalized feature values ​​that characterize the on-chain activity level of heterogeneous chains are generated. Based on the normalized eigenvalues ​​and the feature center vector of each transaction behavior in the heterogeneous chain, the information entropy of the heterogeneous chain is calculated, whereby the information entropy of the heterogeneous chain characterizes the degree of behavioral fluctuation of the heterogeneous chain. Based on the information entropy of the heterogeneous chain, calculate the monitoring period for the next round of monitoring the heterogeneous chain and the computing power resources that need to be allocated for monitoring the heterogeneous chain; The heterogeneous chains are monitored based on their monitoring period and the computing resources required for monitoring.

2. The heterogeneous chain monitoring method based on information entropy as described in claim 1, characterized in that, The process of generating normalized feature values ​​that characterize the on-chain behavior information of heterogeneous chains based on feature data collected from heterogeneous chains includes: During the predetermined monitoring period, the total number of transactions, the number of different addresses, and the rate of change of transaction fees are collected from the heterogeneous chains as the original three-dimensional feature data of the heterogeneous chains. The original three-dimensional feature data is cleaned to obtain cleaned three-dimensional feature data; Normalization is performed on the cleaned 3D feature data to generate normalized feature values ​​that characterize the on-chain activity of heterogeneous chains.

3. The heterogeneous chain monitoring method based on information entropy as described in claim 1, characterized in that, The step of calculating the information entropy of the heterogeneous chain based on the normalized eigenvalues ​​and the feature center vector of each transaction behavior in the heterogeneous chain includes: Calculate the distance between the normalized eigenvalue and the feature center vector corresponding to each transaction behavior in the heterogeneous chain to obtain the distance value between the normalized eigenvalue and the feature center vector of each transaction behavior; Based on the distance value and the preset smoothing coefficient, the frequency of each transaction behavior in the heterogeneous chain is calculated; The information entropy of the heterogeneous chain is calculated based on the frequency of each transaction behavior in the chain.

4. The heterogeneous chain monitoring method based on information entropy as described in claim 3, characterized in that, The step of calculating the frequency of each transaction behavior in the heterogeneous chain based on the distance value and a preset smoothing coefficient includes: Calculate the square of the distance between the normalized eigenvalue and the feature center vector of each transaction behavior, divide the square of the distance by twice the square of the smoothing coefficient, and take the negative value. The similarity score for each transaction behavior is obtained by performing an exponential operation on the negative values, and the total similarity score is obtained by summing the similarity scores of each transaction behavior. Divide the similarity score of each transaction behavior by the total similarity score to obtain the frequency of each transaction behavior in the heterogeneous chain.

5. The heterogeneous chain monitoring method based on information entropy as described in claim 1, characterized in that, The step of calculating the monitoring period for the next round of monitoring heterogeneous chains and the computing power resources required for monitoring heterogeneous chains based on the information entropy of the heterogeneous chains includes: Based on the information entropy of the heterogeneous chain, the preset adjustment coefficient, and the minimum monitoring period, calculate the monitoring period of the next round of monitoring the heterogeneous chain; Based on the information entropy of the heterogeneous chain, the preset sensitivity coefficient, and the maximum available computing power resources, calculate the computing power resources that need to be allocated for the next round of monitoring the heterogeneous chain.

6. The heterogeneous chain monitoring method based on information entropy as described in claim 5, characterized in that, The calculation of the monitoring period for the next round of monitoring the heterogeneous chain, based on the information entropy of the heterogeneous chain, a preset adjustment coefficient, and a minimum monitoring period, includes: Calculate the difference between the information entropy and the preset entropy threshold, and multiply the difference by the preset adjustment coefficient to obtain the adjustment factor; The periodic adjustment coefficient is obtained by performing hyperbolic tangent function calculation on the adjustment factor; Use half of the sum of the preset minimum monitoring period and the preset maximum monitoring period as the base period. Use half the difference between the preset minimum monitoring period and the preset maximum monitoring period as the period adjustment range. Multiply the period adjustment range by the period adjustment coefficient to obtain the period offset, and subtract the period offset from the base period to obtain the monitoring period of the next round of monitoring heterogeneous chains.

7. The heterogeneous chain monitoring method based on information entropy as described in claim 5, characterized in that, The calculation of the computing resources required for the next round of monitoring of the heterogeneous chain, based on the information entropy of the heterogeneous chain, the preset sensitivity coefficient, and the available computing resources, includes: The sensitivity coefficient is multiplied by the information entropy of each heterogeneous chain to obtain the sensitivity entropy value of each heterogeneous chain. The sensitivity entropy value of each heterogeneous chain is exponentially calculated to obtain the computing power allocation base for each heterogeneous chain; Add up all the computing power allocation bases to get the total computing power allocation base. Divide each computing power allocation base by the total computing power allocation base to get the computing power resource weight that each heterogeneous chain needs to be configured. Multiply the available computing resources by the weight of the computing resources that each heterogeneous chain needs to be configured, and obtain the computing resources that each heterogeneous chain needs to be allocated for the next round of monitoring.

8. A heterogeneous chain monitoring device based on information entropy, characterized in that, The device includes: Generation module: Used to generate normalized feature values ​​that characterize the on-chain activity level of heterogeneous chains based on feature data collected from heterogeneous chains; The first calculation module is used to calculate the information entropy of the heterogeneous chain based on the normalized feature value and the feature center vector of each transaction behavior in the heterogeneous chain, wherein the information entropy of the heterogeneous chain characterizes the degree of behavioral fluctuation of the heterogeneous chain. The second calculation module is used to calculate the monitoring period for the next round of monitoring heterogeneous chains and the computing power resources that need to be allocated for monitoring heterogeneous chains based on the information entropy of the heterogeneous chains. Monitoring module: Used to monitor heterogeneous chains according to the monitoring period and the computing resources that need to be allocated to monitor the heterogeneous chains.

9. An electronic device, characterized in that, It includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, when executing a program stored in memory, implements the heterogeneous chain monitoring method based on information entropy as described in any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the heterogeneous chain monitoring method based on information entropy as described in any one of claims 1 to 7.