# Overall Thinking and System Design of Environmental Criminal Law in the Context of Risk Society

Authors: Bona Song
Journal: Mobile Information Systems
 (2022)

---

## Abstract

People are perplexed by the society’s complex and ever-changing risks, which increase their desire for safety. In light of this, and in light of the characteristics of environmental problems and environmental criminal law, this paper attempts to examine some concepts and system design in environmental criminal law using a holistic approach. A user intention understanding model based on attention and CNN (Convolutional Neural Network) is proposed in this paper. The text features are extracted using CNN, and the crime risk is predicted using RF (Random Forest). The user intention understanding model based on attention mechanism and CNN has the best effect, with an accuracy rate of 76.41 percent and a microaverage accuracy rate and recall rate of 75.85 percent, according to the experimental results. The RF prediction accuracy is the highest, at 0.794, which is higher than the SVM (Support Vector Machine) prediction accuracy of 0.784. It demonstrates that RF prediction results are more accurate and superior to SVM prediction results. The RF method’s prediction model can meet the needs of crime risk prediction, so it can be said that it points in the right direction for the effective use of data mining technology in this field.


---

## Body

## 1. Introduction

With the rapid development of science and technology, the ability of human beings to conquer and transform nature is unprecedentedly improved, which greatly satisfies the ever-expanding material desires of human beings. The survival and development of humans are increasingly threatened by environmental destruction and pollution. People’s anxiety and pain grow invisibly, as do the accusations and criticisms that follow [1]. The consequences of environmental degradation are frequently the result of long-term and sustained destruction, rather than a single action. The delay time is unpredictable and may affect the future, from the implementation of environmental damage to some serious harmful consequences. It is difficult to recover once a risk has turned into an environmental disaster [2, 3]. In today’s society, where environmental problems are becoming increasingly serious and the call for environmental protection is growing louder, how to fully exploit the role of criminal law in the field of environmental protection has piqued academic interest, and environmental criminal law has become a hot topic in academic circles across China in recent years.Environmental criminal law refers to the legal norms of environmental crimes represented by law, that is, major environmental crimes with social harmfulness and legal effect. The broad sense of environmental criminal law includes illegal activities related to the environment; strictly speaking, environmental criminal law refers to environmental criminal law and traditional criminal law, as well as environmental assets and environmental administrative law. Despite the fact that the risk society is not a new social type or stage, the social risks it exposes and explains are real and objective [4]. The main theme of criminal law has always been a criminal conviction, and the outcome of a criminal conviction is linked to important rights such as life, liberty, and property [5, 6]. What principles should be followed when punishing a specific behavior in order to maintain the balance between safety and freedom under criminal law? It is especially important to adhere to the core value of criminal law and the principle of moderate crime. Risks, according to Jouet and others, are characterized by uncertainty, irreversibility, uncontrollability, and immeasurability in the risk society, but the most concerning aspect is that people do not fully comprehend the risks that are occurring and have already occurred [7]. Abdool and others proposed that the abstract dangerous criminals be separated from the behavioral crime paradigm, as long as the defendant can prove that the behavior was legal at the time [8]. Security searches, according to Givna and others, are unquestionably justified in a risk society, but they must be well coordinated with other criminal law value searches [9]. Thammaboosadee et al. believe that improving the linkage mechanism between environmental law enforcement and criminal justice requires bettering the legislation linking the two, improving the long-term linkage mechanism between them, establishing and improving environmental law enforcement and criminal justice, and promoting the linkage between the two [10]. However, the current dire environmental situation in China demonstrates that the application of environmental administrative law and criminal justice in China has not yet fully realized its potential, particularly in terms of the effective connection between the two, and there are still many issues to consider.Although the network society is inextricably linked to the real world, it must rely on it to exist; however, it has distinct characteristics in terms of identity, ownership, order, and other factors, forming an independent living space distinct from the real world. Criminal justice has played a deterrent role in environmental crimes in the current state of deteriorating environmental quality, but it is primarily focused on resource destruction. Pollution crimes have little impact, and the ineffectiveness of judicial institutions in punishing environmental pollution crimes has emerged as the most serious issue in environmental criminal justice. Environmental pollution is one of the current social risks’ focal points. It is particularly important to explore the realistic path of China’s environmental criminal law in the risk society, to deal with the transformation of the risk society, and to build a sustainable criminal law and social adaptation mechanism as an environmental criminal law, based on the risk society theory and taking environmental crime as the breakthrough point.This paper’s innovations are primarily visible in two areas: (1) in today’s society, environmental and economic development is a major concern. From the theoretical perspective of risk society, this paper discusses the safeguarding role of criminal law in coordinating environmental and social development. (2) Crime prediction is the foundation for accurately and quickly suppressing crime. Accurate crime risk prediction can provide useful information for crime prevention decision-making, allow the police to better understand their situation, and increase the efficiency of their work. The investigation uses the decision tree analysis method for exploratory data mining with the sample data from the crime data mart, which results in a relatively successful mining idea and model, as well as an effective analysis conclusion.The innovations of this paper are mainly reflected in two aspects.Section 1 introduces the research background and significance and then introduces the main work of this paper. Section 2 mainly introduces the related research status of environmental criminal law. Section 3 puts forward the concrete methods and implementation of this research. Section 4 verifies the superiority and feasibility of this research model. Section 5 is the full text summary.


## 2. Related Work

### 2.1. Summary of Environmental Law Research

From the standpoint of environmental justice, some scholars have conducted a comprehensive study on the current state of environmental litigation in China. Currie and others believe that China’s courts have made some progress in providing environmental judicial relief, but that there are still a number of issues, and they propose strengthening environmental law practice theoretical research, developing a reasonable new mechanism of environmental litigation, improving the quality of judges, and reforming the judicial system [11]. From a different perspective, Otto proposed that environmental rights be treated as the subject of environmental crimes, which would not only help to protect environmental elements in criminal law but would also help to ensure judicial judgment and cooperation in international law [12]. According to Norrie et al., improving environmental legislation should incorporate five principles, including strengthening the environmental criminal protection principle and determining the principle of environmental crimes in conjunction with ecological laws [13]. The objective dimension of the evolution of the concept of environmental law, according to Helm and others, represents the development direction of international environmental law, indicating that this new legal department will take the lead in the world’s inevitable trend of integration [14]. Brady and others believe that investigating state responsibility for international environmental damage is impossible and that the problem should be solved by privatizing international environmental damage liability [15]. The definition and characteristics of environmental infringement, the composition of civil liability for environmental infringement, and the principle of imputation for environmental infringement are all addressed by Ramsay [16]. One of the elements of civil liability for environmental tort, according to Teichman and others, is “presumed causality” or “equivalent causality,” which differs from the inevitable causality in traditional civil tort [17].


### 2.2. Crime Prediction Research

The incipient risk in the risk society was not prevented in time, and its existence has evolved into a harmful crisis that will affect humanity’s future. Building an effective and timely risk prevention mechanism is an important part of developing public policy, and criminal policy is no exception. Bregant et al. developed a dynamic mathematical model of crime rate prediction by polynomial fitting and interpolation using a computer computing environment, which can quantitatively analyze crime factors with varying degrees of correlation [18]. Giacomantonio et al. created a crime risk monitoring and analysis model based on social data [19], addressing the current needs of public security departments to monitor potential criminals’ activities from a macro perspective. Goldman et al. [20] used RF (Random forest) to predict crime risk. Experiments show that using the RF method to select an index set can improve prediction accuracy significantly. The prediction model based on this method has higher accuracy and stability than neural networks and SVM (Support Vector Machine) and can meet the needs of crime risk prediction. Then, using the proposed algorithm, a large number of criminal records are analyzed in order to discover the law and trend of crime, understand the relationship between different criminal behaviors, and determine what types of criminal behaviors will be induced by which state.


## 2.1. Summary of Environmental Law Research

From the standpoint of environmental justice, some scholars have conducted a comprehensive study on the current state of environmental litigation in China. Currie and others believe that China’s courts have made some progress in providing environmental judicial relief, but that there are still a number of issues, and they propose strengthening environmental law practice theoretical research, developing a reasonable new mechanism of environmental litigation, improving the quality of judges, and reforming the judicial system [11]. From a different perspective, Otto proposed that environmental rights be treated as the subject of environmental crimes, which would not only help to protect environmental elements in criminal law but would also help to ensure judicial judgment and cooperation in international law [12]. According to Norrie et al., improving environmental legislation should incorporate five principles, including strengthening the environmental criminal protection principle and determining the principle of environmental crimes in conjunction with ecological laws [13]. The objective dimension of the evolution of the concept of environmental law, according to Helm and others, represents the development direction of international environmental law, indicating that this new legal department will take the lead in the world’s inevitable trend of integration [14]. Brady and others believe that investigating state responsibility for international environmental damage is impossible and that the problem should be solved by privatizing international environmental damage liability [15]. The definition and characteristics of environmental infringement, the composition of civil liability for environmental infringement, and the principle of imputation for environmental infringement are all addressed by Ramsay [16]. One of the elements of civil liability for environmental tort, according to Teichman and others, is “presumed causality” or “equivalent causality,” which differs from the inevitable causality in traditional civil tort [17].


## 2.2. Crime Prediction Research

The incipient risk in the risk society was not prevented in time, and its existence has evolved into a harmful crisis that will affect humanity’s future. Building an effective and timely risk prevention mechanism is an important part of developing public policy, and criminal policy is no exception. Bregant et al. developed a dynamic mathematical model of crime rate prediction by polynomial fitting and interpolation using a computer computing environment, which can quantitatively analyze crime factors with varying degrees of correlation [18]. Giacomantonio et al. created a crime risk monitoring and analysis model based on social data [19], addressing the current needs of public security departments to monitor potential criminals’ activities from a macro perspective. Goldman et al. [20] used RF (Random forest) to predict crime risk. Experiments show that using the RF method to select an index set can improve prediction accuracy significantly. The prediction model based on this method has higher accuracy and stability than neural networks and SVM (Support Vector Machine) and can meet the needs of crime risk prediction. Then, using the proposed algorithm, a large number of criminal records are analyzed in order to discover the law and trend of crime, understand the relationship between different criminal behaviors, and determine what types of criminal behaviors will be induced by which state.


## 3. Methodology

### 3.1. Realistic Prospect of China’s Environmental Criminal Law under the Risk Society

The application of environmental administrative law and criminal justice has inherent coherence and interrelation. The environmental protection administrative organ will only consider transferring the case to the judicial organ if the polluting behavior violates the standards of environmental administrative regulations and reaches a certain level. To put it another way, the environmental administrative law enforcement procedure comes first, and the environmental criminal justice procedure heavily relies on the environmental administrative law enforcement procedure in terms of transfer procedures and starting standards. Although humans have established various governance countermeasures to deal with risks, social risk theory shows that these systems and countermeasures systematically generate and create risks, and the system itself may be a source of risks. Excessive expansion or contraction of the scope of criminal law intervention can result in not only the elimination of risks but also a worsening of the social security situation. China’s risks have both typical and endogenous features of the global risk society, demonstrating the risk overlapping trend. The establishment of the right to buy and sell is based on ownership in legal philosophy, but it can be seen from the original intention of the environment that the environment has no “ownership” but only a “benefit right.” To put it another way, one must have a reasonable right to the environment. It is impossible to sell the right to live in decent conditions without owning property. It is clear that selling environmental rights is a deceptive practice.The certainty of an action is the premise of its risk coefficient, which means that the scope of beneficiaries, audiences, and risk bearers of the action is fixed, certain, or even constant. Determine the fundamental standards of behavior in the second step. Determine the final result of the damage and the method of compensation in the third step. When risk becomes a common feature of modern society, it is clear that traditional criminal law will no longer be able to bear the burden of risk control, and criminal law’s role will be restructured to include risk control as a central axis. Crime is a byproduct of human society’s coexistence. Crime, according to criminology, is the result of the interaction of individual and social factors. There are both interests and interests in the process of these contradictions as long as there are various interdependent and mutually exclusive contradictions in human society. Things that are difficult for social organisms to digest and accept will be produced by the engine of social progress. Crime will occur when these things reach saturation.In a risk society, safety has become the most important value choice for criminal law, and risk management has become an important task for criminal law, but this does not mean that criminal law in a risk society prohibits all risks. China’s criminal law legislation and criminal law theory both value the role of criminal results in its constitution when it comes to specific crimes stipulated in the criminal law. There are many crimes that, according to the criminal law, do not constitute a crime but directly specify the number or circumstances of economic and property crimes. Environmental crime is a type of legal crime that results from people’s short-sightedness in recognizing the importance of environmental and ecological interests in economic activities. Only the creation of a special environmental court can compensate for the environmental court’s shortcomings in the long run. Of course, specialized environmental judicial institutions should not be established for the sake of being established, but rather for the purpose of pursuing the purpose and value of environmental litigation, constantly exploring procedural practice and constantly establishing and improving the legal system to protect them.I believe that the advancement of the discipline of environmental criminal law will become increasingly important in future social development and that the discipline will eventually become self-contained. Of course, resolving this issue is extremely beneficial in demonstrating the importance of environmental criminal law. Environmental crimes are punished in a way that emphasizes the protection of people’s environmental ethics rather than destroying environmental laws and regulations. This is an abstract dangerous criminal who violates legal interests, but the problem is that the most common feature of environmental crimes is potential damage. In practice, some environmental crimes may not be able to quantify their criminal damage over a specific time period, but their damage may increase geometrically over time. China’s criminal law should selectively expand the eligible punishments among the existing punishments in the future. On the one hand, it will aid in the removal of institutional barriers to national environmental crime governance; on the other hand, when punishing environmental crimes, it will be able to truly balance crimes and punishments.


### 3.2. Legal Intention Identification

Environmental issues have become a common problem for governments around the world since we entered the risk society. Most countries have formulated or revised environmental criminal legislation in order to effectively combat serious environmental problems such as ozone layer destruction, desertification, sharp declines in biodiversity, and global warming and to prevent further deterioration of environmental problems. Environmental criminal law, in this wave, exhibits some new trends that are distinct from traditional criminal law. The subjective guilt of some environmental crimes in Chinese criminal law is easy to identify, but the causality in judicial identification is very complicated, and the behavior means are technical, just like environmental pollution crimes. This demonstrates that the subjective aspect of the actor is very important, the proof is difficult, and environmental crimes are treated leniently, so the principle of strict liability can be used to compensate for the principle of fault’s shortcomings. It can also adjust to macropolitical trends in risky social and environmental issues. Traditional legal services, with the advancement of information technology, are clearly unable to meet the new requirements of legal services in the new era. The application of new computer technologies such as data analysis and machine learning in the legal service system can effectively solve many problems in the implementation of legal services through rational technical application and bold technological innovation.In this section, I propose a method to identify users’ intention of legal advice based on attention mechanism and CNN (Convolutional Neural Network). We extract text features based on CNN’s feature extraction model and cover a linear layer for more detailed feature distribution fitting. Finally, we use the softmax regression model for classification [21, 22]. The basic structure of the model is shown in Figure 1.Figure 1
Basic structure of the model.The input model is a word vector matrix composed of word vectors output by users’ legitimate query statements after the trained word vector model. The word vector matrix adjusted by global context semantics is calculated by the attention mechanism, and the residual is connected to be superimposed on this basis. Then, the semantic features are extracted by CNN, and then the feature distribution is fitted by multilayer linear network. Finally, the probability of each category is generated by softmax regression for classification.The attention mechanism used in this chapter adopts the similarity calculation method based on dot product, and its similarity calculation process can be formally expressed as follows:(1)fQ,K=QKTdk.Here,dk is the dimension of QK, which is the result of a linear transformation of the word vector input matrix X.(2)Q=XWQ,K=XWk.The model adds a residual connection to the sublayer where the attention mechanism is operated and then inputs it into CNN for semantic feature extraction, which is expressed by the following formula:(3)y=attentionQ,K,V+X.When calculating the slope of parameter adjustment by the back propagation algorithm of residual link, the derivative is equivalent to adding identity 1, so even if the original derivative is small, the error can still be effectively back-propagated. Therefore, residual connection solves the gradient loss problem well.CNN is used to extract semantic features of user consultation data based on the attention mechanism. CNN extracts various semantic features through multiple convolution kernels and filters semantic features through the pooling layer. The basic structure of CNN is shown in Figure2.Figure 2
CNN extracts text features.After initialization, you can input a new feature vectorx and then calculate the stimulation level of the input binary pattern vector to the output layer unit, that is, the weighted sum of the input vector and the bottom-up weight vector.(4)yj=∑i=1nbijxi∀j∈1,n.Among these outputs, only the largestyj is compared in the third stage, as shown in the following equation:(5)yj∗=maxjyj.The ReLU activation function is widely used in CNN. Because of the convolution calculation of the convolution kernel, only the part whose response is greater than 0 is kept, that is, only the information with high correlation and the information with low correlation are kept, and less than 0 is set to 0. CNN’s pooling layer uses maximum pooling, that is, only the largest features in the region are maintained, and maximum pooling has small displacement invariance.


### 3.3. Comparative Analysis and Prediction of Crime Rate

Multiple conflicts of interest exist when it comes to environmental issues. First and foremost, environmental pollution resulting from resource development and utilization, as well as economic development, may result in intergenerational conflicts. Future generations must bear the scarcity of resources and environment caused by predecessors’ deterioration by inheriting the material and technological civilizations created by predecessors. Second, environmental issues will involve conflicts of interest among different interest groups, even in the same era. As a result, environmental criminal law and its system design must be considered in the context of a larger ideological framework that includes environmental administrative law. This means that negligence is only considered negligence when it jeopardizes the stability and tranquility of life, body, and public life, or when state officials seriously breach the duty of care, resulting in a violation of legal rights. This concept expands the scope of moral care from simple people to other creatures and holds that people are just a species like other things in nature and that everything must conform to nature’s intrinsic value, regardless of people’s identities.From the perspective of the social network, people’s interaction in the social environment can be expressed as a relationship-based pattern or rule, and the rule pattern based on this relationship reflects the social structure. Quantitative analysis of this structure is a social network. The attributes of criminal information are complex, and there are too many indicators in modeling, which easily leads to overfitting of the prediction model, thus reducing the accuracy of actual prediction. At the same time, a large number of crime data, noise, incompleteness, fuzziness, and randomness also make the selection of index set particularly important in crime risk prediction.RF is a combination classification method in which independent sampling is used to generate training data for a single tree, and candidate split attributes for each internal node in a single tree are chosen at random from all candidate attributes. Voting determines the final result of RF classification for each decision tree. The interval function, which represents the interval between the average number of correct classifications and the average number of incorrect classifications, can be used to assess the classification model’s accuracy and certainty. The classification model performs better when the number of correct classifications exceeds the number of incorrect classifications. As a result, the classification model’s generalization error is defined as follows:(6)PE∗=PX,YmgX,Y<0.The generalization error is extended to RF andhkX=hX,Θ, where Θ represents the parameter vector of a single decision tree. With the increase of the number of classification trees in the forest, according to the law of large numbers, the generalization error converges almost everywhere, and the formula is as follows:(7)PX,YPΘhX,Θ=y−maxPΘhX,Θ=j<0j≠Y.This shows that RF is robust to noise and outliers, and there is no overfitting problem.The classification model is most effectively represented by a decision tree, in which each internal node of the tree represents a test of an attribute, each branch represents a test output, and each leaf node represents a class or class distribution. In the process of building a tree, pruning is needed to detect and remove noise and outliers in training data, so as to improve the classification accuracy of unknown data. According to the branching order, the decision tree is shown in Figure3.Figure 3
Decision tree of the potential risk of illegal crime.In order to quantify these activities, three measurement values of activity, concentration, and risk are introduced here as the main indicators to measure the activities of a region from a macro perspective.Within a fixed time periodT, count the activities of key personnel in this area, record 1 activity point for each activity, and form the total activity Dact of this area within this time period after summarizing the records of the whole area. It can be expressed by the following formula:(8)Dact=∑Dnetbar+Dhotel+Dflight.Here, Dnetbar indicates the number of times key personnel surf the Internet in Internet cafes, Dhotel indicates the number of times key personnel register for accommodation, and Dflight indicates the number of times key personnel take flights.Aggregation counts the number of members of the mined community and takes this number as the aggregationDaggr of the region in this time period.Within a fixed time periodT, the weighted comprehensive situation of activity and aggregation degree in this area. Risk Drisk can be expressed by the following formula:(9)Drisk=∑i=1mri×Pacti+∑j=1nrcj×Raggrj.Here, Pacti represents a single key person who meets the activity requirements, ri represents the basic risk weight of this person, and rcj indicates the number of repeated occurrences of the relationship.It can be seen from this formula that the risk degree is not only related to the number of key personnel in the activity but also related to the number of gathering times and the risk degree of key personnel themselves. Therefore, the risk index can be used as a comprehensive consideration of the number of activities, the number of activities, the types of activities, and the gathering situation of key personnel in this area.


## 3.1. Realistic Prospect of China’s Environmental Criminal Law under the Risk Society

The application of environmental administrative law and criminal justice has inherent coherence and interrelation. The environmental protection administrative organ will only consider transferring the case to the judicial organ if the polluting behavior violates the standards of environmental administrative regulations and reaches a certain level. To put it another way, the environmental administrative law enforcement procedure comes first, and the environmental criminal justice procedure heavily relies on the environmental administrative law enforcement procedure in terms of transfer procedures and starting standards. Although humans have established various governance countermeasures to deal with risks, social risk theory shows that these systems and countermeasures systematically generate and create risks, and the system itself may be a source of risks. Excessive expansion or contraction of the scope of criminal law intervention can result in not only the elimination of risks but also a worsening of the social security situation. China’s risks have both typical and endogenous features of the global risk society, demonstrating the risk overlapping trend. The establishment of the right to buy and sell is based on ownership in legal philosophy, but it can be seen from the original intention of the environment that the environment has no “ownership” but only a “benefit right.” To put it another way, one must have a reasonable right to the environment. It is impossible to sell the right to live in decent conditions without owning property. It is clear that selling environmental rights is a deceptive practice.The certainty of an action is the premise of its risk coefficient, which means that the scope of beneficiaries, audiences, and risk bearers of the action is fixed, certain, or even constant. Determine the fundamental standards of behavior in the second step. Determine the final result of the damage and the method of compensation in the third step. When risk becomes a common feature of modern society, it is clear that traditional criminal law will no longer be able to bear the burden of risk control, and criminal law’s role will be restructured to include risk control as a central axis. Crime is a byproduct of human society’s coexistence. Crime, according to criminology, is the result of the interaction of individual and social factors. There are both interests and interests in the process of these contradictions as long as there are various interdependent and mutually exclusive contradictions in human society. Things that are difficult for social organisms to digest and accept will be produced by the engine of social progress. Crime will occur when these things reach saturation.In a risk society, safety has become the most important value choice for criminal law, and risk management has become an important task for criminal law, but this does not mean that criminal law in a risk society prohibits all risks. China’s criminal law legislation and criminal law theory both value the role of criminal results in its constitution when it comes to specific crimes stipulated in the criminal law. There are many crimes that, according to the criminal law, do not constitute a crime but directly specify the number or circumstances of economic and property crimes. Environmental crime is a type of legal crime that results from people’s short-sightedness in recognizing the importance of environmental and ecological interests in economic activities. Only the creation of a special environmental court can compensate for the environmental court’s shortcomings in the long run. Of course, specialized environmental judicial institutions should not be established for the sake of being established, but rather for the purpose of pursuing the purpose and value of environmental litigation, constantly exploring procedural practice and constantly establishing and improving the legal system to protect them.I believe that the advancement of the discipline of environmental criminal law will become increasingly important in future social development and that the discipline will eventually become self-contained. Of course, resolving this issue is extremely beneficial in demonstrating the importance of environmental criminal law. Environmental crimes are punished in a way that emphasizes the protection of people’s environmental ethics rather than destroying environmental laws and regulations. This is an abstract dangerous criminal who violates legal interests, but the problem is that the most common feature of environmental crimes is potential damage. In practice, some environmental crimes may not be able to quantify their criminal damage over a specific time period, but their damage may increase geometrically over time. China’s criminal law should selectively expand the eligible punishments among the existing punishments in the future. On the one hand, it will aid in the removal of institutional barriers to national environmental crime governance; on the other hand, when punishing environmental crimes, it will be able to truly balance crimes and punishments.


## 3.2. Legal Intention Identification

Environmental issues have become a common problem for governments around the world since we entered the risk society. Most countries have formulated or revised environmental criminal legislation in order to effectively combat serious environmental problems such as ozone layer destruction, desertification, sharp declines in biodiversity, and global warming and to prevent further deterioration of environmental problems. Environmental criminal law, in this wave, exhibits some new trends that are distinct from traditional criminal law. The subjective guilt of some environmental crimes in Chinese criminal law is easy to identify, but the causality in judicial identification is very complicated, and the behavior means are technical, just like environmental pollution crimes. This demonstrates that the subjective aspect of the actor is very important, the proof is difficult, and environmental crimes are treated leniently, so the principle of strict liability can be used to compensate for the principle of fault’s shortcomings. It can also adjust to macropolitical trends in risky social and environmental issues. Traditional legal services, with the advancement of information technology, are clearly unable to meet the new requirements of legal services in the new era. The application of new computer technologies such as data analysis and machine learning in the legal service system can effectively solve many problems in the implementation of legal services through rational technical application and bold technological innovation.In this section, I propose a method to identify users’ intention of legal advice based on attention mechanism and CNN (Convolutional Neural Network). We extract text features based on CNN’s feature extraction model and cover a linear layer for more detailed feature distribution fitting. Finally, we use the softmax regression model for classification [21, 22]. The basic structure of the model is shown in Figure 1.Figure 1
Basic structure of the model.The input model is a word vector matrix composed of word vectors output by users’ legitimate query statements after the trained word vector model. The word vector matrix adjusted by global context semantics is calculated by the attention mechanism, and the residual is connected to be superimposed on this basis. Then, the semantic features are extracted by CNN, and then the feature distribution is fitted by multilayer linear network. Finally, the probability of each category is generated by softmax regression for classification.The attention mechanism used in this chapter adopts the similarity calculation method based on dot product, and its similarity calculation process can be formally expressed as follows:(1)fQ,K=QKTdk.Here,dk is the dimension of QK, which is the result of a linear transformation of the word vector input matrix X.(2)Q=XWQ,K=XWk.The model adds a residual connection to the sublayer where the attention mechanism is operated and then inputs it into CNN for semantic feature extraction, which is expressed by the following formula:(3)y=attentionQ,K,V+X.When calculating the slope of parameter adjustment by the back propagation algorithm of residual link, the derivative is equivalent to adding identity 1, so even if the original derivative is small, the error can still be effectively back-propagated. Therefore, residual connection solves the gradient loss problem well.CNN is used to extract semantic features of user consultation data based on the attention mechanism. CNN extracts various semantic features through multiple convolution kernels and filters semantic features through the pooling layer. The basic structure of CNN is shown in Figure2.Figure 2
CNN extracts text features.After initialization, you can input a new feature vectorx and then calculate the stimulation level of the input binary pattern vector to the output layer unit, that is, the weighted sum of the input vector and the bottom-up weight vector.(4)yj=∑i=1nbijxi∀j∈1,n.Among these outputs, only the largestyj is compared in the third stage, as shown in the following equation:(5)yj∗=maxjyj.The ReLU activation function is widely used in CNN. Because of the convolution calculation of the convolution kernel, only the part whose response is greater than 0 is kept, that is, only the information with high correlation and the information with low correlation are kept, and less than 0 is set to 0. CNN’s pooling layer uses maximum pooling, that is, only the largest features in the region are maintained, and maximum pooling has small displacement invariance.


## 3.3. Comparative Analysis and Prediction of Crime Rate

Multiple conflicts of interest exist when it comes to environmental issues. First and foremost, environmental pollution resulting from resource development and utilization, as well as economic development, may result in intergenerational conflicts. Future generations must bear the scarcity of resources and environment caused by predecessors’ deterioration by inheriting the material and technological civilizations created by predecessors. Second, environmental issues will involve conflicts of interest among different interest groups, even in the same era. As a result, environmental criminal law and its system design must be considered in the context of a larger ideological framework that includes environmental administrative law. This means that negligence is only considered negligence when it jeopardizes the stability and tranquility of life, body, and public life, or when state officials seriously breach the duty of care, resulting in a violation of legal rights. This concept expands the scope of moral care from simple people to other creatures and holds that people are just a species like other things in nature and that everything must conform to nature’s intrinsic value, regardless of people’s identities.From the perspective of the social network, people’s interaction in the social environment can be expressed as a relationship-based pattern or rule, and the rule pattern based on this relationship reflects the social structure. Quantitative analysis of this structure is a social network. The attributes of criminal information are complex, and there are too many indicators in modeling, which easily leads to overfitting of the prediction model, thus reducing the accuracy of actual prediction. At the same time, a large number of crime data, noise, incompleteness, fuzziness, and randomness also make the selection of index set particularly important in crime risk prediction.RF is a combination classification method in which independent sampling is used to generate training data for a single tree, and candidate split attributes for each internal node in a single tree are chosen at random from all candidate attributes. Voting determines the final result of RF classification for each decision tree. The interval function, which represents the interval between the average number of correct classifications and the average number of incorrect classifications, can be used to assess the classification model’s accuracy and certainty. The classification model performs better when the number of correct classifications exceeds the number of incorrect classifications. As a result, the classification model’s generalization error is defined as follows:(6)PE∗=PX,YmgX,Y<0.The generalization error is extended to RF andhkX=hX,Θ, where Θ represents the parameter vector of a single decision tree. With the increase of the number of classification trees in the forest, according to the law of large numbers, the generalization error converges almost everywhere, and the formula is as follows:(7)PX,YPΘhX,Θ=y−maxPΘhX,Θ=j<0j≠Y.This shows that RF is robust to noise and outliers, and there is no overfitting problem.The classification model is most effectively represented by a decision tree, in which each internal node of the tree represents a test of an attribute, each branch represents a test output, and each leaf node represents a class or class distribution. In the process of building a tree, pruning is needed to detect and remove noise and outliers in training data, so as to improve the classification accuracy of unknown data. According to the branching order, the decision tree is shown in Figure3.Figure 3
Decision tree of the potential risk of illegal crime.In order to quantify these activities, three measurement values of activity, concentration, and risk are introduced here as the main indicators to measure the activities of a region from a macro perspective.Within a fixed time periodT, count the activities of key personnel in this area, record 1 activity point for each activity, and form the total activity Dact of this area within this time period after summarizing the records of the whole area. It can be expressed by the following formula:(8)Dact=∑Dnetbar+Dhotel+Dflight.Here, Dnetbar indicates the number of times key personnel surf the Internet in Internet cafes, Dhotel indicates the number of times key personnel register for accommodation, and Dflight indicates the number of times key personnel take flights.Aggregation counts the number of members of the mined community and takes this number as the aggregationDaggr of the region in this time period.Within a fixed time periodT, the weighted comprehensive situation of activity and aggregation degree in this area. Risk Drisk can be expressed by the following formula:(9)Drisk=∑i=1mri×Pacti+∑j=1nrcj×Raggrj.Here, Pacti represents a single key person who meets the activity requirements, ri represents the basic risk weight of this person, and rcj indicates the number of repeated occurrences of the relationship.It can be seen from this formula that the risk degree is not only related to the number of key personnel in the activity but also related to the number of gathering times and the risk degree of key personnel themselves. Therefore, the risk index can be used as a comprehensive consideration of the number of activities, the number of activities, the types of activities, and the gathering situation of key personnel in this area.


## 4. Experiment and Results

The number of convolution kernels will affect the accuracy of the model. Theoretically, the higher the number of convolution kernels, the more types of text feature extraction. In this section, related experiments are carried out on the influence of the number of convolution kernels on the model accuracy. In the experiment, only the number of convolution kernels was changed, and the linear layer was a single linear layer without an activation function. The experimental results are shown in Figure4.Figure 4
Influence of convolution kernel number on model accuracy.The experimental results show that with the increase of convolution kernels, the accuracy, precision, recall rate, and F1 value of the training model are improved. However, during the experiment, as the number of convolution kernels increases, the time spent in each round of model training will also increase. The user legal consultation data obtained from the legal service network in the experiment were randomly divided into 60% data as the training set, 25% data as the test set, and 15% data as the verification set. The experimental results are shown in Figure5.Figure 5
Model comparison experiment results.With an accuracy rate of 76.41 percent and a microaverage accuracy rate of 75.85 percent, the user intention understanding model based on CNN and the attention mechanism proposed in this chapter has the best effect. When compared to other models, all of the indexes have improved; with the accuracy rate increasing by 3.27 percent and the microaverage accuracy rate and recall rate increasing by 2.68 percent when compared to ref [18] model. At the same time, we can see that the structural design of each sublayer of the model proposed in this paper improves the effect of feature extraction and text fitting when compared to the comparative model. Table 1 shows the accuracy rate, recall rate, and F1 value of CNN in each category.Table 1
CNN experimental results of various categories.
CategoryPrediction (%)Recall (%)F1 (%)Ecological destruction63.3150.1260.33River pollution45.4760.6487.24air pollution78.6691.5449.86Heavy metal contamination86.9639.6677.21Administrative proceedings55.0446.3780.36Criminal defense82.9486.2590.21It can be seen that in the category with a large amount of data, the results of each index are higher than those in the category with a small amount of data, which shows that the problem of uneven data distribution has some influence on the experimental results. For the category with a large amount of data, the retrieval rate is relatively high and the accuracy rate is relatively low, but there is a little difference. This shows that the model proposed in this paper has a good fitting effect for the categories with a large amount of data, but for the categories with a small amount of data, because of the small number of samples in the data set, the characteristics of the samples are not obvious, and the learning of their characteristics is not very comprehensive, but it has a good classification effect for the learned characteristics.According to this model, we used online registration data of ten Internet cafes for one week in an experimental database and simulated key personnel data as the data source of the test. The test step is to analyze the characteristics of the data source first, then use the data to generate a relational table, extract more from the community, calculate the activity, aggregation degree, and risk, and finally compare the results with the characteristics. The distribution of Internet records in data sources by time period is shown in Table2.Table 2
Distribution of Internet users within a week.
TimeNumber of Internet usersMonday683Tuesday796Wednesday863Thursday724Friday966Saturday1124Sunday1867One hour is defined as the time range condition for establishing the relationship table. The relationship table is established within one hour after the staff surf the Internet from the data. Because there is no actual history here, the key basic risk weight personnel is 1. In order to verify the early warning effect of the model, several key personnel records of the same Internet cafe online are artificially added to the database. The indicators of activity, aggregation degree, and risk degree calculated after independent community are shown in Figure6.Figure 6
Test result.From the test results, it can be seen that the key personnel are inactive on weekdays, and although the activity has increased on weekends, it is generally in line with the actual online trend. On Wednesday, the gathering trend was obviously abnormal and the risk increased. At this time, the monitoring personnel can query the target key personnel online on Wednesday in the relationship table. Therefore, the three index values calculated by the model can basically reflect the activity trend of key personnel and can reflect the abnormal situation to a certain extent, so that relevant personnel can make a more detailed analysis. SVM is used to map the original data into a new high-dimensional space by nonlinear mapping. In this new high-dimensional space, a hyperplane can be obtained by applying the linear model to separate the original data. The nonlinear transformation of input data into higher dimensional space is carried out with the help of kernel function.In order to compare the effectiveness of each model, a reference model is added as a standard. Generally speaking, the model setting is considered meaningful only when the accuracy is greater than that of the reference model. The accuracy of the reference model refers to the maximum accuracy that can be achieved without using any indicators for prediction, that is, the proportion of the majority classes. Because the data used in this paper have almost no class imbalance problem, the accuracy of the reference model is about 50%. The final calculation results of this experiment are shown in Figures7 and 8.Figure 7
SVM model prediction results.Figure 8
RF model prediction results.It can be seen that the prediction accuracy of RF is the highest, reaching 0.794, which is higher than the 0.784 of SVM. It shows that RF prediction results are more accurate and superior than SVM in predicting crime risk. In terms of recall rate, the predicted recall rate of RF is also the highest, reaching 0.729, which is higher than 0.69 of SVM. It shows that for all criminal suspects with serious criminal tendencies, the prediction results of RF have greater coverage than SVM. Based on the results of various aspects, it can be concluded that the RF model is better at predicting crime risk.


## 5. Conclusions

Environmental criminal law is showing a preventive trend, environmental interests are gradually becoming independent, dangerous crime legislation is showing an expanding trend, and strict liability is constantly being introduced into criminal crimes from the perspective of risk society. Environmental issues are unavoidable byproducts of modern economic development, and pollution cannot be eliminated under current scientific and technological conditions. With an accuracy rate of 76.41 percent and a microaverage accuracy rate of 75.85 percent, the user intention understanding model based on CNN and the attention mechanism proposed in this paper has the best effect. In terms of prediction accuracy, RF has the highest score of 0.794, which is higher than SVM’s score of 0.784. We should not only impose criminal penalties for environmental pollution but also increase noncriminal penalties. This, too, I believe, will become a focus of social attention in the future. On this foundation, real-time adjustment and interpretation to adapt to changing times can help criminal law play a more protective role and protect our living environment.



---

*Source: 3353217-2022-07-30.xml*