Financial risk detection method and system based on variable-length particle swarm optimization, electronic equipment and storage medium
Through the financial risk detection method based on the variable-length particle swarm algorithm, discrete features of financial data are extracted and sorted, target features are screened out, and risk assessment is carried out, and the problems of inaccurate risk detection and slow convergence of particle swarm algorithms in the existing technology are solved, achieving more efficient and accurate risk detection.
Patent Information
- Application Number
- CN202411741660.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-29
- Publication Date
- 2025-03-21
AI Technical Summary
The existing financial risk detection model is analyzed in a linear manner and fails to effectively consider the nonlinearity and interaction of the financial system, resulting in inaccurate risk prediction and control. Traditional particle swarm algorithms are prone to fall into local optimality during the iteration process, with reduced population diversity and slow convergence.
The financial risk detection method based on the variable-length particle swarm algorithm is adopted. By extracting multiple discrete features of financial data, combining risk classification features, symmetric uncertain values, sorting features, initializing the particle swarm position and velocity, the target discrete features are screened out using the variable-length particle swarm algorithm, and risk assessment is performed through the pre-trained risk assessment model.
It improves the risk detection efficiency and accuracy of financial data, and can find the next optimal result of the financial risk detection model more quickly, reduces the input of the risk assessment model, thereby improving the accuracy of the model.
Smart Images

Figure CN119671270A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of financial risk detection, and more specifically, to a financial risk detection method, system, electronic device and storage medium based on a variable-length particle swarm algorithm. Background Art
[0002] With the continuous development and complexity of the financial industry, financial institutions are facing more and more risk challenges. In order to effectively discover and manage these financial risks and ensure the safety of users' assets, financial institutions need to use scientific risk assessment models to evaluate and predict corresponding financial risks.
[0003] In the prior art, the corresponding financial risks are detected through the financial risk detection model analyzed in a linear manner. However, this method does not take into account the nonlinearity of the financial system, and does not clearly consider the interactions and instabilities within the financial risk detection model, resulting in the inability to effectively and accurately predict and control financial risks.
[0004] In order to solve the above problems, in the prior art, the traditional particle swarm optimization method can be used for the financial risk assessment model. However, as the number of iterations increases, the traditional particle swarm algorithm is prone to fall into the local optimum of the solution space, the population diversity decreases, and the convergence speed slows down, which makes the financial risk detection model unable to quickly produce the next optimal result. Summary of the invention
[0005] In view of this, the present application provides a financial risk detection method, system, electronic device and storage medium based on a variable-length particle swarm algorithm, with the purpose of improving the detection efficiency and accuracy of financial risks of financial data.
[0006] The first aspect of the present application provides a financial risk detection method based on a variable-length particle swarm algorithm, the method comprising:
[0007] Extracting multiple discrete features of the financial data, and combining a preset risk classification feature with each of the discrete features to obtain multiple discrete feature combinations;
[0008] For each of the discrete feature combinations, determining a symmetric uncertainty value of the discrete feature combination according to the risk classification features and discrete features in the discrete feature combination;
[0009] Sorting the discrete features according to the symmetry uncertainty values of the discrete feature combinations;
[0010] Initializing the position and velocity of each particle in the population of the variable-length particle swarm algorithm according to the sorted discrete features, and using the variable-length particle swarm algorithm after initializing the position and velocity of each particle to screen out multiple target discrete features from the sorted discrete features; wherein the number of each target discrete feature is less than the number of each discrete feature;
[0011] The risk assessment is performed according to each of the target discrete features through a pre-trained risk assessment model to obtain a risk assessment result of the financial data.
[0012] Optionally, for each discrete feature combination, determining the symmetric uncertainty value of the discrete feature combination according to the risk classification feature and the discrete feature in the discrete feature combination includes:
[0013] For each discrete feature combination, calculating an entropy function of the discrete features in the discrete feature combination and an entropy function of the risk classification function;
[0014] Calculating the joint distribution law between the risk classification feature and the discrete feature in the discrete feature combination;
[0015] Calculate the mutual information function value of the discrete feature combination according to the probability of the risk classification feature in the discrete feature combination at each value, the probability of the discrete feature at each value, and the joint distribution law between the risk classification feature and the discrete feature;
[0016] The symmetric uncertainty value of the discrete feature combination is determined according to the mutual information function value of the discrete feature combination and the entropy function of the discrete features and the entropy function of the risk classification features in the discrete feature combination.
[0017] Optionally, calculating the entropy function of the discrete features in the discrete feature combination and the entropy function of the risk classification function includes:
[0018] Determine all values of the discrete feature and all values of the risk classification feature, and calculate the probability of the discrete feature at each value and the probability of the risk classification feature at each value;
[0019] Calculating the entropy function of the discrete feature according to the probability of the discrete feature at each value;
[0020] According to the probability of the risk classification feature at each value, the entropy function of the risk classification feature is calculated.
[0021] Optionally, determining the symmetric uncertainty value of the discrete feature combination according to the mutual information function value of the discrete feature combination and the entropy function of the discrete features and the entropy function of the risk classification features in the discrete feature combination includes:
[0022] Calculating the sum of the entropy function of the discrete features and the entropy function of the risk classification features in the discrete feature combination;
[0023] The quotient of the mutual information function value of the discrete feature combination and the sum of the entropy function of the discrete features and the entropy function of the risk classification features in the discrete feature combination is calculated, and the symmetric uncertainty of the discrete feature combination is determined according to the quotient.
[0024] Optionally, the variable-length particle swarm algorithm after initializing the position and velocity of each particle screens out multiple target discrete features from the sorted discrete features, including:
[0025] The variable-length particle swarm algorithm after initializing the position and velocity of each particle is used to determine the current number of iterations, and to determine whether the current number of iterations is less than the maximum number of iterations; if the current number of iterations is less than the maximum number of iterations, the subset limit length of each particle is updated according to the current number of iterations and the current number of bits of each particle, and the local optimal solution of each particle and the global optimal solution of all particles are updated according to the subset limit length of each particle; the current number of iterations is controlled to increase by 1, the position and velocity of each particle are re-updated, and the execution is returned to determine whether the current number of iterations is less than the maximum number of iterations, until the current number of iterations is greater than the maximum number of iterations, and the global optimal solution is output; wherein the global optimal solution includes multiple target discrete features.
[0026] The second aspect of the present application provides a financial risk detection system based on a variable-length particle swarm algorithm, the system comprising:
[0027] A combining unit, used to extract multiple discrete features of financial data, and combine a preset risk classification feature with each of the discrete features to obtain multiple discrete feature combinations;
[0028] A first determining unit is used to determine, for each discrete feature combination, a symmetric uncertainty value of the discrete feature combination according to the risk classification feature and the discrete feature in the discrete feature combination;
[0029] A sorting unit, used for sorting each of the discrete features according to the symmetry uncertainty value of each combination of the discrete features;
[0030] A screening unit is used to initialize the position and velocity of each particle in the population of the variable-length particle swarm algorithm according to the sorted discrete features, and screen out a plurality of target discrete features from the sorted discrete features using the variable-length particle swarm algorithm after the positions and velocities of the particles are initialized; wherein the number of the target discrete features is less than the number of the discrete features;
[0031] The risk assessment unit is used to perform risk assessment according to each of the target discrete features through a pre-trained risk assessment model to obtain a risk assessment result of the financial data.
[0032] Optionally, the first determining unit includes:
[0033] A first calculation unit is used to calculate, for each discrete feature combination, an entropy function of the discrete features in the discrete feature combination and an entropy function of the risk classification function;
[0034] A second calculation unit is used to calculate the joint distribution law between the risk classification feature and the discrete feature in the discrete feature combination;
[0035] A third calculation unit is used to calculate the mutual information function value of the discrete feature combination according to the probability of the risk classification feature in the discrete feature combination at each value, the probability of the discrete feature at each value, and the joint distribution law between the risk classification feature and the discrete feature;
[0036] The second determining unit is used to determine the symmetric uncertainty value of the discrete feature combination according to the mutual information function value of the discrete feature combination and the entropy function of the discrete features and the entropy function of the risk classification features in the discrete feature combination.
[0037] Optionally, the first computing unit includes:
[0038] a fourth calculation unit, used to determine all values of the discrete feature and all values of the risk classification feature, and calculate the probability of the discrete feature at each value and the probability of the risk classification feature at each value;
[0039] A fifth calculation unit, configured to calculate an entropy function of the discrete feature according to the probability of the discrete feature at each value;
[0040] The sixth calculation unit is used to calculate the entropy function of the risk classification feature according to the probability of the risk classification feature at each value.
[0041] The third aspect of the present application provides an electronic device, comprising: a processor and a memory, wherein the processor and the memory are connected via a communication bus; wherein the processor is used to call and execute a program stored in the memory; and the memory is used to store a program, wherein the program is used to implement the financial risk detection method based on a variable-length particle swarm algorithm as provided in the first aspect of the present application.
[0042] The third aspect of the present application provides a computer-readable storage medium, in which computer-executable instructions are stored, and the computer-executable instructions are used to execute the financial risk detection method based on the variable-length particle swarm algorithm as provided in the first aspect of the present application.
[0043] The present application provides a financial risk detection method, system, electronic device and storage medium based on a variable-length particle swarm algorithm. The method extracts multiple discrete features of financial data, and combines a pre-set risk classification feature with each discrete feature to obtain multiple discrete feature combinations; for each discrete feature combination, the symmetric uncertainty value of the discrete feature combination is determined according to the risk classification feature and the discrete feature in the discrete feature combination; the discrete features are sorted according to the symmetric uncertainty values of the discrete feature combinations; the position and velocity of each particle in the population of the variable-length particle swarm algorithm are initialized according to the sorted discrete features, and the variable-length particle swarm algorithm after the position and velocity of each particle are initialized is used to screen out multiple target discrete features from the sorted discrete features; risk assessment is performed according to each target discrete feature through a pre-trained risk assessment model to obtain a risk assessment result of the financial data. The technical solution provided by the present application can first use the symmetric uncertainty values of each discrete feature combination to sort each discrete feature, so as to put the discrete features with a large correlation with the risk classification feature in the front, and use the sorted discrete features to initialize the position and speed of each particle in the variable-length particle swarm algorithm, so as to use the variable-length particle swarm algorithm after initializing the position and speed of each particle to screen out multiple target discrete features from the sorted discrete features, which can not only select the input of the risk assessment model, but also reduce the input of the risk assessment model, thereby providing the accuracy of the risk assessment model and risk assessment, that is, improving the detection efficiency and accuracy of financial risks of financial data. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
[0045] Figure 1 A flowchart of a financial risk detection method based on a variable-length particle swarm algorithm provided in an embodiment of the present application;
[0046] Figure 2 An example diagram of an image of a sigmoid activation function provided in an embodiment of the present application;
[0047] Figure 3 A schematic diagram of the structure of a financial risk detection system based on a variable-length particle swarm algorithm provided in an embodiment of the present application;
[0048] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0049] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0050] In this application, relational terms such as first and second, etc. are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the statement "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.
[0051] In order to better understand this application, the technical names involved in this application are explained below:
[0052] Particle Swarm Optimization Algorithm: An optimization algorithm inspired by the behavior of bird flocks. In the particle swarm optimization algorithm, the candidate solution set of the optimization problem constitutes the solution space searched by the particle swarm, and the search direction and speed of the particles will tend to the best performing particles based on the experience of the group. The particle swarm algorithm has the advantages of easy implementation, low time consumption, fast convergence speed, and no restrictions on the properties of the function being optimized. It is a widely used optimization algorithm.
[0053] See also Figure 1 , shows a flow chart of a financial risk detection method based on a variable-length particle swarm algorithm provided in an embodiment of the present application. The process based on the variable-length particle swarm algorithm can be specifically:
[0054] S101: extract multiple discrete features of financial data, and combine a pre-set risk classification feature with each discrete feature to obtain multiple discrete feature combinations.
[0055] In an embodiment of the present application, risk classification features related to financial risks can be pre-set; so that after obtaining a financial data set or financial data collected in the actual business of a financial institution, all discrete features in the financial data can be extracted, so that the risk classification features can be combined with each discrete feature of the financial data respectively to obtain multiple discrete feature combinations; wherein each discrete feature combination includes a risk classification feature and a discrete feature.
[0056] S102: For each discrete feature combination, determine the symmetric uncertainty value of the discrete feature combination according to the risk classification features and discrete features in the discrete feature combination.
[0057] In the process of specifically executing step S102, after obtaining multiple discrete feature combinations, for each discrete feature combination, the entropy function of the discrete features and the risk classification features in the discrete feature combination, as well as the mutual information function between the discrete features and the risk classification features (the mutual information function of the discrete feature combination) can be calculated, so as to determine the symmetric uncertainty value of the discrete feature combination based on the mutual information function value of the discrete feature combination and the entropy function of the discrete features and the entropy function of the risk classification features in the discrete feature combination.
[0058] Optionally, for each discrete feature combination, the process of determining the symmetric uncertainty value of the discrete feature combination based on the risk classification features and discrete features in the discrete feature combination can be specifically: the mutual information function value between the risk classification features and the discrete features in the discrete feature combination; wherein the mutual information function value of the discrete feature combination is the mutual information function value between the risk classification features and the discrete features in the discrete feature combination.
[0059] In the embodiment of the present application, by applying information theory of statistics based on probability theory, hidden information can be extracted from financial data, thereby enhancing the acquisition of potential information in financial data. Entropy is often used to describe the chaotic process of a system. The higher the entropy function value (entropy function), the more chaotic the system is. Experiments have shown that the entropy function is also very suitable for describing the amount of information contained in discrete features in financial data through the uncertainty of financial data. Among them, the smaller the entropy function value of the discrete feature, the smaller the uncertainty of the discrete feature, and the less useful information it contains, and vice versa; and the entropy function value can further quantitatively describe the interdependence between the discrete features of the financial data. Therefore, after obtaining multiple discrete feature combinations, for each discrete feature combination, the entropy function of the discrete feature and the entropy function of the risk classification feature in the discrete feature combination can be further calculated.
[0060] Optionally, the process of calculating the entropy function of the discrete feature and the entropy function of the risk classification function in the discrete feature combination can be specifically as follows: determine all values of the discrete feature and all values of the risk classification feature, and calculate the probability of the discrete feature at each value and the probability of the risk classification feature at each value; calculate the entropy function of the discrete feature based on the probability of the discrete feature at each value; calculate the entropy function of the risk classification feature based on the probability of the risk classification feature at each value.
[0061] The specific calculation method of the entropy function of discrete features is shown in formula (1).
[0062]
[0063] In formula (1), x is the value of the discrete feature, p(x) is the probability when the discrete feature X takes the value x, and H(X) is the entropy function of the discrete feature X.
[0064] It should be noted that, as can be seen from formula (1), the size of the entropy function of the discrete feature X is only related to the probability p(x) of each value x in the financial data; x is all the values of the discrete feature X. When the discrete feature X has only one value, p(x) = 1, that is, the entropy function is 0, indicating that the discrete feature X does not contain any valuable content for the risk classification problem. When the values of the discrete feature X are uniformly distributed, H(X) takes the largest value, that is, it contains more valuable content for the financial classification problem.
[0065] It should also be noted that the calculation method of the entropy function of the risk classification feature is the same as the calculation method of the entropy function of the discrete feature. Please refer to the calculation method of the entropy function of the discrete feature, and it will not be repeated in the embodiments of this application.
[0066] In the embodiment of the present application, mutual information is an important measurement method in information theory, which is used to describe the degree of correlation between two objects. It can more intuitively express the degree of dependence between objects and represents the amount of overlapping information between objects. Therefore, after obtaining multiple discrete feature combinations of financial data, the mutual information function value between the risk classification feature and the discrete feature in each discrete feature combination can be calculated. The amount of overlapping information between the discrete feature and the risk classification feature can be seen from the mutual information function.
[0067] In some embodiments, for each discrete combination, the joint distribution law between the risk classification feature and the discrete feature in the discrete feature combination can be calculated; the product of the probability of the risk classification feature in the discrete feature combination at each value and the probability of the discrete feature at each value is calculated, so as to calculate the mutual information function value between the risk classification feature in the discrete feature combination and the discrete feature according to the joint distribution law between the risk classification feature and the discrete feature in the discrete feature combination and the product of the probability of the risk classification feature in the discrete feature combination at each value and the probability of the discrete feature at each value. The calculation method of the mutual information function value between the risk classification feature and the discrete feature in the discrete feature combination is specifically shown in formula (2).
[0068]
[0069] Wherein, in formula (2), X is the discrete feature in the discrete feature combination, Y is the risk classification feature in the discrete feature combination, p(x,y) is the joint distribution law between the risk classification feature Y in the discrete feature combination and the discrete feature X, p(x) is the marginal distribution law (the probability when the discrete feature X takes the value x), p(y) is the marginal distribution law (the probability when the risk classification feature Y takes the value y), and I(X;Y) is the mutual information function value between the risk classification feature in the discrete feature combination and the discrete feature.
[0070] It should be noted that, as can be seen from formula (2), when the discrete feature X and the risk classification feature Y in the discrete feature combination are unrelated, that is, when the amount of overlapping information between the discrete feature and the risk classification feature is 0, the mutual information function value between the two is 0, which means that there is no dependency between the two. On the contrary, the higher the correlation between the two features, the larger the value of the mutual information function, and the more overlapping information they have.
[0071] In the embodiment of the present application, symmetrical uncertainty SU (symmetrical uncertainty) is a form of normalizing the value of mutual information (mutual information function value). By normalizing the result (mutual information function value), the common problem that mutual information tends to select multi-valued attributes is overcome, and the influence of different variable units on the results is avoided. The main purpose of this measurement indicator is to calculate the mutual information function value of discrete features and risk classification functions, and normalize it. Each discrete feature will get a value in the range of [0,1]. The smaller the value, the smaller the redundancy between features and the greater the degree of dependence. In other words, the smaller the SU value, the better.
[0072] Optionally, after calculating the mutual information function value of the discrete feature combination, the sum of the entropy function of the discrete features and the entropy function of the risk classification features in the discrete feature combination can be calculated; the quotient of the mutual information function value of the discrete feature combination and the sum of the entropy function of the discrete features and the entropy function of the risk classification features in the discrete feature combination is calculated, and the symmetric uncertainty of the discrete feature combination is determined according to the quotient, that is, the symmetric uncertainty between the discrete features and the risk classification features in the discrete feature combination is obtained. The specific calculation method of the symmetric uncertainty of the discrete feature combination is shown in formula (3).
[0073]
[0074] Wherein, in formula (3), C is the discrete feature in the discrete feature combination, f is the risk classification feature in the discrete feature combination, H(C) is the entropy function of the discrete feature, H(f) is the entropy function of the risk classification feature, I(C; f) is the mutual information function value between the discrete feature and the risk classification feature, and SU(C, f) is the symmetric uncertainty of the discrete feature combination.
[0075] S103: Sort the discrete features according to the symmetry uncertainty values of the discrete feature combinations.
[0076] In the specific process of executing step S103, after obtaining the symmetric uncertainty of each discrete feature combination, since the smaller the symmetric uncertainty, the smaller the redundancy and the greater the dependence between the discrete features and the risk classification features, the smaller the value of the symmetric uncertainty, the better; it can be seen that the symmetric uncertainty of the discrete feature combination can be used as the symmetric uncertainty of the discrete features in the discrete feature combination, so that each discrete feature can be sorted in order from small to large according to the value of the symmetric uncertainty of each discrete feature, that is, the smaller the value of the symmetric uncertainty of the discrete feature, the higher the ranking of the discrete feature in the discrete feature combination.
[0077] The applicant has found that in the traditional example swarm algorithm, the inertia weight adopts a linear decreasing strategy. This change strategy will lead to low particle search efficiency and easy to fall into the local optimum. Therefore, by selecting a random inertia weight strategy, the application can improve the global search ability of the variable-length particle swarm algorithm on the basis of maintaining population diversity, help particles jump out of the local optimum, and avoid particles from falling into premature convergence. The formula of the random inertia weight is shown in formula (4).
[0078]
[0079] In formula (4), ω max Represents the maximum value of the random inertia weight, ω minis the minimum value, t is the current iteration number of the variable length particle swarm algorithm, T Max is the maximum number of iterations of the variable-length particle swarm algorithm, and rand(j) is a random number uniformly distributed in [0,1].
[0080] It should be noted that the traditional example swarm algorithm can be a standard particle swarm algorithm (PSO). The PSO algorithm searches for the best solution in a space with a dimension of M, where N is the number of particles in the particle swarm group, and each particle represents a possible solution to the problem. The description form of each variable is shown in formulas (5)-(9):
[0081] X i (t) = [X i1 (t),X i2 (t),…,X iN (t)](5)
[0082] X ij (t) = [X 1j (t),X 2j (t),…,X Mj (t)](6)
[0083] V i (t)=[V i1 (t),V i2 (t),…,V iN (t)](7)
[0084] V ij (t)=[V 1j (t),V 2j (t),…,V Mj (t)](8)
[0085] Pbest i =[P i1 ,P i2 ,…,P iN ](9)
[0086] Among them, formulas (5)-(9) respectively represent that V represents the velocity of the particle, X represents the position of the particle, the first formula is the position of all particles in the particle swarm at the i-th iteration, which is an N*M matrix; the second formula is the position of a specific particle in the first formula, that is, the position of the j-th particle in the swarm at the i-th iteration, which is a 1*M matrix; the third formula is the velocity vector of all particles in the swarm at the i-th iteration, which is an N*M matrix; the fourth formula is the velocity of the j-th particle at the i-th iteration; the fifth formula is the optimal solution Pbest that all particles have ever obtained from the beginning of the execution to the i-th iteration i .
[0087] It should be noted that the rate update formula is a very core part of the PSO algorithm. The particles in the population update the speed of the next iteration through the current speed, thereby guiding the position of the particles in the next iteration. Formula (10) is affected by the combined effects of three parts: the first part is the speed V of the particle at the last iteration, indicating the state of the particle at the previous moment. This part is the memory term, which represents the impact of the current state on the next generation of particles. It is the continuation of the particle's self-state, thereby achieving the ability to balance global and local searches; the second part is the particle's self-cognition part, which represents the learning and continuation of each particle's own experience, so that the entire group has a stronger global search ability and tries to avoid falling into the local optimal solution; the last part is the social cognition part of the group (Social Modal), which reflects the collaborative characteristics between particles and represents the information sharing ability of the entire population.
[0088] The above three aspects together constitute the spatial search capability of the community.
[0089]
[0090] In formula (10), X represents the particle, V represents the velocity, r is a random uniform number between 0 and 1; c is called the learning factor, and its value range is usually between 0 and 2; k is the number of iterations, k+1 represents the next iteration of k, ω is the parameter of the PSO algorithm, and P i represents the optimal solution for the i-th particle, P G It represents the global optimal solution.
[0091] It should also be noted that, assuming that the larger the value of the particle, the better, the update method of the individual optimal value (best value) of PSO and the global optimal value of the population is shown in formula (11) and formula (12):
[0092] f x >f p , P ij (t) = X ij (t)(11)
[0093] f x >f G , G(t)=X ij (t)(12)
[0094] In formulas (11) and (12), f x is the value of the particle's current position calculated by the fitness function. In classification problems, the classification accuracy can also be used as the fitness function; f p is the best value ever achieved by the current particle; f Gis the maximum value reached by the entire group in all iterations. The update logic of the optimal solution is: record the individual optimal solution P of each particle in the first search ij (t) and the value and position of the global optimal solution G(t), and compare them with the previous optimal value in each subsequent generation of search. As long as the performance is better, the corresponding position and the value of the optimal solution are updated. This update method, combined with the speed formula (10), guides the particles to continuously approach a better solution space.
[0095] The applicant has found that when the classic BPSO algorithm is initialized, the value of each position in the particle will be compared with the threshold α, and the value of α is fixed at 0.5 throughout the optimization process. When the random number is greater than the threshold, the position of the current attribute of the particle is 1, indicating that this discrete feature is selected, otherwise it means that the discrete feature is not included in the feature subset represented by this particle. It can be seen that the threshold is directly related to the probability of whether the discrete feature is selected. α is 0.5, which means that in the conventional BPSO algorithm, the probability of the discrete feature being selected is 50%. However, this population position initialization method does not distinguish the contribution of different discrete features, and will not be adjusted according to the operation of the algorithm. During the entire life cycle of the algorithm execution, the number of selected discrete features will present a Gaussian distribution with half of n (the number of attributes of the entire set of discrete features) as the standard deviation, and the number of discrete features of most solution sets is still n / 2. For financial risk assessment models, the number of features of n / 2 is still too many and cannot achieve ideal results. Therefore, the present application obtains the contribution ranking of each discrete feature by using the symmetric uncertainty SU of the discrete feature as an evaluation index, so as to sort them in order from small to large, and the more discrete features at the front contain more information.
[0096] It should be noted that the classic BPSO algorithm is a standard particle swarm optimization algorithm used in the scenario of searching for the optimal solution in a continuous space. In the classification problem, the value of each position has two possibilities: 0 or 1, which respectively represents that the current particle does not select a discrete feature or selects a discrete feature. For example, the particle position in a population with N discrete features is an N-dimensional digital string consisting only of 0 and 1. Therefore, the speed and position update formula of BPSO needs to change the continuous random numbers to values of 0 or 1. The position update formula is shown in formula (13) and formula (14):
[0097]
[0098] In formulas (13)-(14), μ is a randomly generated number in the interval [0,1]. BPSO converts the speed in the range of [-4,4] to a value range of 0 to 1 through the sigmoid activation function (13). The image of the sigmoid activation function is as follows: Figure 2As shown in the figure, from the image of the sigmoid activation function, we can see that the greater the speed, the higher the probability of taking the value 1. When the speed is equal to 0, the probability of taking 0 or 1 is the same. represents the position of the jth column of the i-th example, represents the speed of the jth column of the i-th example.
[0099] S104: Initializing the position and velocity of each particle in the population of the variable-length particle swarm algorithm according to the sorting sequence number of each discrete feature.
[0100] In the embodiment of the present application, SU is used to calculate the symmetric uncertainty of all discrete features, and they are sorted in order from small to large. The more discrete features are at the front, the more information they contain. When the positions of each particle of the variable-length particle swarm algorithm are initialized, each discrete feature can be evenly divided into 4 regions according to the corresponding ranking number. The α value of each region is different. The larger the α of the front region, that is, the greater the possibility of the discrete feature being selected in the front region. This initialization mechanism makes the probability of each discrete feature being retained in the end different, and the top-ranked discrete features have a greater chance of being selected. This method not only ensures that each feature has a chance to be selected, but also realizes a greater probability of excellent features being passed down, so that the variable-length particle swarm algorithm is better combined with the discrete feature screening in the financial risk assessment model, which speeds up the convergence speed and reduces the number of discrete features in the final discrete feature set.
[0101] S105: Filtering out a plurality of target discrete features from the sorted discrete features using the variable-length particle swarm algorithm after initializing the position and velocity of each particle; wherein the number of each target discrete feature is less than the number of each discrete feature.
[0102] In the specific process of executing step S105, after obtaining the sorted discrete features, the position and speed of each particle in the population of the variable-length particle swarm algorithm can be initialized according to the sorted discrete features, so as to determine the current number of iterations using the variable-length particle swarm algorithm after initializing the position and speed of each particle, and judge whether the current number of iterations is less than the maximum number of iterations; if the current number of iterations is less than the maximum number of iterations, update the subset limit length of each particle according to the current number of iterations and the current number of bits of each particle, and update the local optimal solution Pbest of each particle and the global optimal solution Gbest of all particles according to the subset limit length of each particle; control the current number of iterations to increase by 1, re-update the position and speed of each particle, and return to execute to judge whether the current number of iterations is less than the maximum number of iterations, until the current number of iterations is greater than the maximum number of iterations, output the global optimal solution; wherein, the global optimal solution includes multiple target discrete features.
[0103] In the actual application process, the position and velocity of each particle in the population of the variable-length particle swarm algorithm are initialized according to the sorted discrete features, and the variable-length particle swarm algorithm after initializing the position and velocity of each particle is used to screen out multiple target discrete features from the sorted discrete features. The execution process is as follows:
[0104] A1: Initialize the position and velocity of each particle in the population of the variable-length particle swarm algorithm according to the sorted discrete features;
[0105] A2: After initializing the position and velocity of each particle in the population of the variable-length particle swarm algorithm according to the sorted discrete features, an initial feature subset of each particle will be obtained, where the initial feature subset of the particle is composed of the sorted discrete features;
[0106] A3: The variable-length particle swarm algorithm can determine the current number of iterations and determine whether the current number of iterations is less than the maximum number of iterations; if the current number of iterations is less than the maximum number of iterations, the length limit ratio of each particle can be determined according to the current number of iterations, and the subset limit length of each particle can be calculated according to the length limit ratio of each particle and the feature subset length; among them, if the current number of iterations is 1, then the feature subset of each particle is the initial feature subset, and accordingly, the feature subset length of each particle is the length of the initial feature subset;
[0107] A4: The variable-length particle swarm algorithm updates the feature subset of each particle according to the subset limit length of each particle;
[0108] A5: The variable-length particle swarm algorithm uses the knn classifier to calculate the classification accuracy of each particle as the algorithm's fitness function value, and uses the fitness function value to update the local optimal solution Pbest of each particle and the global optimal solution Gbest of all particles according to all feature subsets under each particle;
[0109] A6: The variable-length particle swarm algorithm controls the current iteration number to increase by 1, re-updates the position and speed of each particle, and returns to execute to determine whether the current iteration number is less than the maximum iteration number, that is, returns to execute A3;
[0110] A7: When the variable-length particle swarm algorithm determines that the current number of iterations is not less than the maximum number of iterations, it outputs a global optimal solution; wherein the global optimal solution includes multiple target discrete features.
[0111] It should be noted that, according to the length limit ratio of each particle and the feature subset length, the method of calculating the subset limit length of each particle is shown in formula (15), and the method of determining the length limit ratio of each particle according to the current number of iterations is shown in formula (16).
[0112] SubLen=ps×dim(15)
[0113]
[0114] Among them, it can be seen from formula (15) and formula (16) that SubLen represents the subset limit length of the particle, that is, the maximum number of valid discrete features that the particle may contain (that is, the maximum number of selected discrete features), dim represents the dimension of the problem, which is the number of all discrete features in each discrete feature, and ps is the length limit ratio; iter is the current number of iterations, and M is the maximum number of iterations set at the beginning of the VLPSO algorithm (variable length particle swarm algorithm). ps will continue to decrease as the algorithm runs, and the change process is divided into three stages: the value of ps in the first and second stages is fixed, and ps will become smaller in the second stage. Different stages are divided by the current number of iterations of the algorithm. The first stage is from the start of the algorithm to the number of iterations of the algorithm being 1 / 3 of the maximum number of iterations, the second stage is from 1 / 3 to 2 / 3, and the third stage is from 2 / 3 to the end of the algorithm. The value of ps in the third stage is no longer a fixed value. The value of ps will be determined according to the change of the global optimal solution Gbest of the particle swarm, and gnum is the number of times the global optimal solution has not been updated. When the value of the global optimal solution does not change after three iterations, the algorithm can be considered to have fallen into a local trap. VLPSO reduces ps at this time to force it to jump out of this local space. The ps in the third stage is no longer a fixed value, but decreases randomly according to the inertia coefficient each time. The length change mechanism directly sets the number of bits exceeding Sublen to zero each time the particle updates its position, greatly reducing the number of bits that need to be calculated.
[0115] For example, for a particle in the variable-length particle swarm algorithm, after updating the position and velocity of the particle in the variable-length particle swarm algorithm using the sorted discrete features, the feature subset of the particle can be (011001110110), where 1 indicates that the discrete feature is selected and 0 indicates that the discrete feature is not selected, that is, 1 indicates that the discrete feature of the corresponding sequence number is valid and 0 indicates that the discrete feature of the corresponding sequence number is invalid; dim is 12; assuming that the maximum number of iterations of the algorithm is 60; when the current number of iterations of the VLPSO algorithm is 1, it can be determined from formula 16 that ps is equal to 0.4, and then SubLen=12*0.4=4.8, at this time SubLen can be Round up to 5, that is, the obtained particle subset limit length is 5; it can be seen from the particle feature subset that seven bits are 1, which means that it contains 7 valid discrete features, and only the number of features limited by SubLen (5) is retained, and then the particle feature subset is updated according to the subset limit length of each particle to obtain the particle feature subset "011001110000", that is, assuming that the original feature subset of the particle includes discrete features {F2, F3, F6, F7, F8, F10, F11}, then the feature subset of the particle is updated using the particle subset limit length to obtain {F2, F3, F6, F7, F8}.
[0116] It should be noted that among the discrete features contained in the feature subset of the particle, the discrete features that exceed the subset limit length are directly set to 0, rather than discarding the digits behind the particle and shortening it directly, and the total length remains unchanged, so that each discrete feature still has a chance to be selected. And each time the fitness function value of the particle is calculated, the position of 0 does not need to participate in the calculation, which greatly saves the time of the algorithm.
[0117] It can be seen that the feature selection algorithm based on the variable-length particle swarm algorithm VLPSO can greatly reduce useless discrete features when building a risk assessment model, streamline the extracted discrete feature set, eliminate irrelevant influences to make the data analysis results better; and speed up the operation so that the model can be calculated online.
[0118] S106: Perform risk assessment based on each target discrete feature through the pre-trained risk assessment model to obtain a risk assessment result of the financial data.
[0119] In the specific process of executing step S106, the risk assessment model to be trained can be trained in advance with historical financial data to obtain a corresponding risk assessment model, so that after screening out multiple target discrete features from various discrete features of the financial data, each target discrete feature is input into the risk assessment model, so that the risk assessment model performs risk assessment according to each input target discrete feature, and obtains the risk assessment result of the financial data. The risk assessment result of the financial data is risky or risk-free.
[0120] It should be noted that the risk assessment model to be trained is the SVM classifier to be trained. Correspondingly, the pre-trained risk assessment model is the SVM classifier. Each target discrete feature is input into the SVM classifier, so that the SVM classifier divides the risk of financial data according to the input target discrete features, that is, divides the financial risk data into two categories: risky or non-risky.
[0121] The present application provides a financial risk detection method based on a variable-length particle swarm algorithm, which extracts multiple discrete features of financial data, and combines a pre-set risk classification feature with each discrete feature to obtain multiple discrete feature combinations; for each discrete feature combination, the symmetric uncertainty value of the discrete feature combination is determined according to the risk classification feature and the discrete feature in the discrete feature combination; the discrete features are sorted according to the symmetric uncertainty values of the discrete feature combinations; the position and velocity of each particle in the population of the variable-length particle swarm algorithm are initialized according to the sorted discrete features, and a plurality of target discrete features are screened out from the sorted discrete features using the variable-length particle swarm algorithm after the position and velocity of each particle are initialized; risk assessment is performed according to each target discrete feature through a pre-trained risk assessment model to obtain a risk assessment result of the financial data. The technical solution provided by the present application can first use the symmetric uncertainty values of each discrete feature combination to sort each discrete feature, so as to put the discrete features with a large correlation with the risk classification feature in the front, and use the sorted discrete features to initialize the position and speed of each particle in the variable-length particle swarm algorithm, so as to use the variable-length particle swarm algorithm after initializing the position and speed of each particle to screen out multiple target discrete features from the sorted discrete features, which can not only select the input of the risk assessment model, but also reduce the input of the risk assessment model, thereby providing the accuracy of the risk assessment model and risk assessment, that is, improving the detection efficiency and accuracy of financial risks of financial data.
[0122] Based on the above-mentioned financial risk detection method based on variable length particle swarm algorithm provided in the embodiment of the present application, correspondingly, the embodiment of the present application also provides a financial risk detection system based on variable length particle swarm algorithm, such as Figure 3As shown, the financial risk detection system based on variable-length particle swarm algorithm includes:
[0123] A combination unit 31 is used to extract multiple discrete features of financial data, and combine a preset risk classification feature with each discrete feature to obtain multiple discrete feature combinations;
[0124] A first determining unit 32 is used to determine, for each discrete feature combination, a symmetric uncertainty value of the discrete feature combination according to the risk classification feature and the discrete feature in the discrete feature combination;
[0125] A sorting unit 33, used to sort each discrete feature according to the symmetry uncertainty value of each discrete feature combination;
[0126] A screening unit 34 is used to initialize the position and velocity of each particle in the population of the variable-length particle swarm algorithm according to the sorted discrete features, and screen out a plurality of target discrete features from the sorted discrete features using the variable-length particle swarm algorithm after the positions and velocities of the particles are initialized; wherein the number of the target discrete features is less than the number of the discrete features;
[0127] The risk assessment unit 35 is used to perform risk assessment according to each target discrete feature through a pre-trained risk assessment model to obtain a risk assessment result of the financial data.
[0128] The specific principles and execution processes of each unit in the financial risk detection system based on the variable length particle swarm algorithm disclosed in the embodiment of the present application are the same as the financial risk detection method based on the variable length particle swarm algorithm disclosed in the above-mentioned embodiment of the present application. Please refer to the corresponding parts of the financial risk detection method based on the variable length particle swarm algorithm disclosed in the above-mentioned embodiment of the present application, and no further details will be given here.
[0129] The present application provides a financial risk detection system based on a variable-length particle swarm algorithm, which extracts multiple discrete features of financial data, and combines a pre-set risk classification feature with each discrete feature to obtain multiple discrete feature combinations; for each discrete feature combination, the symmetric uncertainty value of the discrete feature combination is determined according to the risk classification feature and the discrete feature in the discrete feature combination; the discrete features are sorted according to the symmetric uncertainty values of the discrete feature combinations; the position and velocity of each particle in the population of the variable-length particle swarm algorithm are initialized according to the sorted discrete features, and the variable-length particle swarm algorithm after the position and velocity of each particle are initialized is used to screen out multiple target discrete features from the sorted discrete features; risk assessment is performed according to each target discrete feature through a pre-trained risk assessment model to obtain a risk assessment result of the financial data. The technical solution provided by the present application can first use the symmetric uncertainty values of each discrete feature combination to sort each discrete feature, so as to put the discrete features with a large correlation with the risk classification feature in the front, and use the sorted discrete features to initialize the position and speed of each particle in the variable-length particle swarm algorithm, so as to use the variable-length particle swarm algorithm after initializing the position and speed of each particle to screen out multiple target discrete features from the sorted discrete features, which can not only select the input of the risk assessment model, but also reduce the input of the risk assessment model, thereby providing the accuracy of the risk assessment model and risk assessment, that is, improving the detection efficiency and accuracy of financial risks of financial data.
[0130] Optionally, the first determining unit includes:
[0131] A first calculation unit is used to calculate, for each discrete feature combination, an entropy function of the discrete features in the discrete feature combination and an entropy function of the risk classification function;
[0132] The second calculation unit is used to calculate the joint distribution law between the risk classification feature and the discrete feature in the discrete feature combination;
[0133] The third calculation unit is used to calculate the mutual information function value of the discrete feature combination according to the probability of the risk classification feature in the discrete feature combination at each value, the probability of the discrete feature at each value, and the joint distribution law between the risk classification feature and the discrete feature;
[0134] The second determining unit is used to determine the symmetric uncertainty value of the discrete feature combination according to the mutual information function value of the discrete feature combination and the entropy function of the discrete features in the discrete feature combination and the entropy function of the risk classification feature.
[0135] Optionally, the first computing unit includes:
[0136] A fourth calculation unit, used to determine all values of the discrete feature and all values of the risk classification feature, and calculate the probability of the discrete feature at each value and the probability of the risk classification feature at each value;
[0137] A fifth calculation unit, used to calculate the entropy function of the discrete feature according to the probability of the discrete feature at each value;
[0138] The sixth calculation unit is used to calculate the entropy function of the risk classification feature according to the probability of the risk classification feature at each value.
[0139] Optionally, the first determining unit includes:
[0140] a seventh calculation unit, used to calculate the sum of the entropy function of the discrete feature and the entropy function of the risk classification feature in the discrete feature combination;
[0141] The eighth calculation unit is used for calculating the quotient of the mutual information function value of the discrete feature combination and the sum of the entropy function of the discrete features and the entropy function of the risk classification features in the discrete feature combination, and determining the symmetric uncertainty of the discrete feature combination according to the quotient.
[0142] Optionally, a screening unit is provided, specifically for:
[0143] The variable-length particle swarm algorithm after initializing the position and velocity of each particle is used to determine the current number of iterations, and to determine whether the current number of iterations is less than the maximum number of iterations; if the current number of iterations is less than the maximum number of iterations, the subset limit length of each particle is updated according to the current number of iterations and the current number of bits of each particle, and the local optimal solution of each particle and the global optimal solution of all particles are updated according to the subset limit length of each particle; the current number of iterations is controlled to increase by 1, the position and velocity of each particle are re-updated, and the execution is returned to determine whether the current number of iterations is less than the maximum number of iterations, until the current number of iterations is greater than the maximum number of iterations, and the global optimal solution is output; wherein, the global optimal solution includes multiple target discrete features.
[0144] The present application embodiment provides an electronic device, such as Figure 4 As shown, the electronic device includes a processor 401 and a memory 402, the memory 402 is used to store program codes and data for financial risk detection based on a variable-length particle swarm algorithm, and the processor 401 is used to call the program instructions in the memory to execute the steps shown in the financial risk detection method based on a variable-length particle swarm algorithm in the above embodiment.
[0145] An embodiment of the present application provides a storage medium, which includes a storage program, wherein when the program is running, the device where the storage medium is located is controlled to execute the financial risk detection method based on the variable-length particle swarm algorithm shown in the above embodiment.
[0146] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system or system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. The system and system embodiments described above are merely schematic, in which the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0147] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0148] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
[0149] The above are only preferred implementations of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A financial risk detection method based on variable-length particle swarm algorithm, characterized in that: The method comprises: Extracting multiple discrete features of the financial data, and combining a preset risk classification feature with each of the discrete features to obtain multiple discrete feature combinations; For each of the discrete feature combinations, determining a symmetric uncertainty value of the discrete feature combination according to the risk classification features and discrete features in the discrete feature combination; Sorting the discrete features according to the symmetry uncertainty values of the discrete feature combinations; Initializing the position and velocity of each particle in the population of the variable-length particle swarm algorithm according to the sorted discrete features, and using the variable-length particle swarm algorithm after initializing the position and velocity of each particle to screen out multiple target discrete features from the sorted discrete features; wherein the number of each target discrete feature is less than the number of each discrete feature; The risk assessment is performed according to each of the target discrete features through a pre-trained risk assessment model to obtain a risk assessment result of the financial data.
2. The method according to claim 1, characterized in that The step of determining, for each discrete feature combination, a symmetric uncertainty value of the discrete feature combination according to the risk classification feature and the discrete feature in the discrete feature combination includes: For each discrete feature combination, calculating an entropy function of the discrete features in the discrete feature combination and an entropy function of the risk classification function; Calculating the joint distribution law between the risk classification feature and the discrete feature in the discrete feature combination; Calculate the mutual information function value of the discrete feature combination according to the probability of the risk classification feature in the discrete feature combination at each value, the probability of the discrete feature at each value, and the joint distribution law between the risk classification feature and the discrete feature; The symmetric uncertainty value of the discrete feature combination is determined according to the mutual information function value of the discrete feature combination and the entropy function of the discrete features and the entropy function of the risk classification features in the discrete feature combination.
3. The method according to claim 2, characterized in that Calculating the entropy function of the discrete features in the discrete feature combination and the entropy function of the risk classification function includes: Determine all values of the discrete feature and all values of the risk classification feature, and calculate the probability of the discrete feature at each value and the probability of the risk classification feature at each value; Calculating the entropy function of the discrete feature according to the probability of the discrete feature at each value; According to the probability of the risk classification feature at each value, the entropy function of the risk classification feature is calculated.
4. The method according to claim 1, characterized in that The determining the symmetric uncertainty value of the discrete feature combination according to the mutual information function value of the discrete feature combination and the entropy function of the discrete features in the discrete feature combination and the entropy function of the risk classification feature includes: Calculating the sum of the entropy function of the discrete features and the entropy function of the risk classification features in the discrete feature combination; The quotient of the mutual information function value of the discrete feature combination and the sum of the entropy function of the discrete features and the entropy function of the risk classification features in the discrete feature combination is calculated, and the symmetric uncertainty of the discrete feature combination is determined according to the quotient.
5. The method according to claim 1, characterized in that The variable-length particle swarm algorithm after initializing the position and speed of each particle screens out multiple target discrete features from the sorted discrete features, including: The variable-length particle swarm algorithm after initializing the position and velocity of each particle is used to determine the current number of iterations, and to determine whether the current number of iterations is less than the maximum number of iterations; if the current number of iterations is less than the maximum number of iterations, the subset limit length of each particle is updated according to the current number of iterations and the current number of bits of each particle, and the local optimal solution of each particle and the global optimal solution of all particles are updated according to the subset limit length of each particle; the current number of iterations is controlled to increase by 1, the position and velocity of each particle are re-updated, and the execution is returned to determine whether the current number of iterations is less than the maximum number of iterations, until the current number of iterations is greater than the maximum number of iterations, and the global optimal solution is output; wherein the global optimal solution includes multiple target discrete features.
6. A financial risk detection system based on variable length particle swarm algorithm, characterized in that: The system comprises: A combining unit, used to extract multiple discrete features of financial data, and combine a preset risk classification feature with each of the discrete features to obtain multiple discrete feature combinations; A first determining unit is used to determine, for each discrete feature combination, a symmetric uncertainty value of the discrete feature combination according to the risk classification feature and the discrete feature in the discrete feature combination; A sorting unit, used for sorting each of the discrete features according to the symmetry uncertainty value of each combination of the discrete features; A screening unit is used to initialize the position and velocity of each particle in the population of the variable-length particle swarm algorithm according to the sorted discrete features, and screen out a plurality of target discrete features from the sorted discrete features using the variable-length particle swarm algorithm after the positions and velocities of the particles are initialized; wherein the number of the target discrete features is less than the number of the discrete features; The risk assessment unit is used to perform risk assessment according to each of the target discrete features through a pre-trained risk assessment model to obtain a risk assessment result of the financial data.
7. The system according to claim 6, characterized in that The first determining unit includes: A first calculation unit is used to calculate, for each discrete feature combination, an entropy function of the discrete features in the discrete feature combination and an entropy function of the risk classification function; A second calculation unit is used to calculate the joint distribution law between the risk classification feature and the discrete feature in the discrete feature combination; A third calculation unit is used to calculate the mutual information function value of the discrete feature combination according to the probability of the risk classification feature in the discrete feature combination at each value, the probability of the discrete feature at each value, and the joint distribution law between the risk classification feature and the discrete feature; The second determining unit is used to determine the symmetric uncertainty value of the discrete feature combination according to the mutual information function value of the discrete feature combination and the entropy function of the discrete features and the entropy function of the risk classification features in the discrete feature combination.
8. The system according to claim 7, characterized in that The first computing unit comprises: a fourth calculation unit, used to determine all values of the discrete feature and all values of the risk classification feature, and calculate the probability of the discrete feature at each value and the probability of the risk classification feature at each value; A fifth calculation unit, configured to calculate an entropy function of the discrete feature according to the probability of the discrete feature at each value; The sixth calculation unit is used to calculate the entropy function of the risk classification feature according to the probability of the risk classification feature at each value.
9. An electronic device, characterized in that: include: A processor and a memory, wherein the processor and the memory are connected via a communication bus; wherein the processor is used to call and execute a program stored in the memory; The memory is used to store a program, and the program is used to implement the financial risk detection method based on the variable-length particle swarm algorithm as described in any one of claims 1-5.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to execute the financial risk detection method based on the variable-length particle swarm algorithm as described in any one of claims 1-5.