# Construction of Online Shopping Legal Protection Mechanism Based on Artificial Intelligence Technology

Authors: Pingyan Yan; Shimei Zhang
Journal: Mobile Information Systems
 (2022)

---

## Abstract

With the rapid development of the Internet and social economy, in the process of online shopping, a series of problems frequently occur, the most serious of which is tort and rights protection, but laws and regulations often lag behind the development of e-commerce transactions. Artificial intelligence technology embodies the exchange and use of digital information, which is an inevitable trend in the development of modern society. The research object of this research is students. Based on the connotation and significance of artificial intelligence technology, it aims to put forward effective solutions and suggestions to the law problems that arise in the online shopping process of students through some data analysis obtained by artificial intelligence technology, so as to provide reference for guiding student groups to form correct consumption concepts and promoting relevant institutions to maintain a safe and reasonable online shopping mechanism and platform environment. According to the above goals, this research combines the Agent technology in the field of artificial intelligence, proposes and builds a legal protection system framework that meets the requirements of online shoppers, discusses how to use the law to regulate infringement and rights protection in the process of online shopping, and has implications for improving the legal system in the process of online shopping.


---

## Body

## 1. Introduction

The 21st century is a rapidly developing information age, artificial intelligence is a derivative product of this age, and information technology has provided many conveniences to people’s lives. With the continuous advancement of science and technology, artificial intelligence has developed along with it, which has brought the trend of intelligence, and also saved the cost of manpower and material resources, which has greatly improved people’s quality of life. To ensure that artificial intelligence can be used safely, this is a basic requirement to promote the development of artificial intelligence technology. This technology is a technology involving reasoning and computing, and it mainly studies how to use machines to imitate human behavior and activities, that is, reasoning planning, designing, thinking, learning, and so on. The effective combination of artificial intelligence technology and the legal protection mechanism of online shopping can ensure the good operation of the mechanism.This article mainly protects consumers through the current laws in online shopping under artificial intelligence technology, breaking traditional methods and protecting information online or other methods. This protection mechanism based on artificial intelligence technology can better protect consumer information and allow consumers to better protect their rights. It is beneficial to promote consumers to consume, promote economic development, and is of great significance to economic progress.After a series of experimental analysis, it can be known that nearly half of the respondents were skeptical about the safety of online shopping, and in the actual transaction process, 44% of the subjects believed that the purchased products did not meet expectations. The prediction error of the online shopping protection mechanism based on artificial intelligence proposed in this article was relatively low, especially after many experiments, the minimum error reached 0.6. Compared with the original prediction mechanism, the error of our prediction protection mechanism was almost kept at about 0.65, lower than the original 0.75. At the same time, under our online shopping protection mechanism, people’s willingness to spend had increased significantly. After four experiments, people’s minimum consumption amount had risen to 175, and the willingness to spend had continued to rise, reaching a maximum of 0.65, which fully demonstrated the effectiveness of protection mechanism. From this, it can be known that the combination of artificial intelligence technology and protection mechanism can effectively protect the legitimate rights and interests of consumers and increase their willingness to consume.


## 2. Related Work

Regarding the legal protection mechanism, some scholars have conducted research on it:Maglio et al. aimed to measure the effective compliance of Italian listed companies with the Italian Guidelines on related party transaction recommendations and to assess the level of legal protection for minority shareholders in the Italian stock market. Using quantitative methods and conducting Ordinary Least Squares (OLS) regressions, Maglio R found that companies with higher market values and higher numbers of independent and non-executive directors could ensure higher compliance, and widely held companies had a positive effect on the level of legal protection for minority shareholders [1]. Lux critically reviewed a paper positing that cybercrime protected specific computer-related interests. On this basis, Lux pointed out, if these crimes involved the use of computer networks in addition to affecting computer software, then the recognition of benefits with these characteristics was justified. In order to define the object of legal protection, this research reflected the role of computer systems in the free development of individuals and the institutions that served it in the democratic rule of law [2]. Sukini and Lestari aimed to provide dental and oral therapists with legal protection to perform medical actions under the oral authorization of the dentist. A sociological judicial approach was employed, and the research norm used was a descriptive analytical method designed to illustrate the legal protections of dental and oral therapists when performing acts of oral assignment of medical care by dentists. The findings suggested that dentists and dental and oral therapists remained poorly informed about empowerment and legal protections [3]. Malko et al. analyzed the process and results of 30 years of judicial reform activities in contemporary Russia, and made specific recommendations for continuing reforms, improving the efficiency of the judicial system, and protecting human rights, freedoms, and legitimate interests. Its purpose was to confirm or refute the assumption that Russian judicial reform needed to be adjusted in order to continue to be the most important factor in building the rule of law and civil society. Research methods included analytical and synthesis methods, historical methods, comparative methods, and formal methods. The conclusion was that judicial reform was the most important factor in building the rule of law and civil society [4].The above-mentioned documents addressed various aspects of legal protection, including business, cyber, healthcare, reform, and other fields. However, in this process, none of them involved the latest technologies and hotspots, so there were some loopholes in the protection mechanism. Artificial intelligence technology can combine different fields and give them new connotations of the times. For this reason, the relevant research results of artificial intelligence technology were referred. Panahiazar et al. briefly discussed the nature of data in breast cancer research and the role of artificial intelligence in generating “smart data.” The biggest challenge was to create a system that made healthcare provider and patient data more intelligent, enabling more efficient clinical decision making, improving health outcomes, and ultimately managing healthcare outcomes and costs. Panahiazar et al. proposed the need for an AI-driven environment to address these challenges, and discussed ways to enhance breast cancer database research capabilities through AI applications and future directions [5]. Viet et al. aimed to provide a comprehensive review of the current application of artificial intelligence-based tools in simulating membrane processes and the feasibility of applying these models to other areas where membranes would be used in the future. The existing traditional mathematical models and their advantages and disadvantages were expounded. The definition and classification of state-of-the-art AI models, and the advantages of these models over traditional models were also discussed. In addition, the fundamental principles of membrane processes and the current state of application of artificial intelligence-based techniques in simulating the performance of these membrane systems were systematically reviewed. Finally, the implications and suggestions for future research were discussed [6]. Raknys et al. presented 21st century concepts and products of the Fourth Industrial Revolution, big data and artificial intelligence technologies, and their application opportunities in public governance and social policy. The strengths and weaknesses of big data, issues with data collection and use, and reliability were discussed. The strengths and weaknesses of big data were analyzed. Artificial intelligence technology was also more profoundly applied in many areas of public policy and the governance of the COVID-19 pandemic [7]. Cui expounded the application of artificial intelligence technology in the management of personnel files in colleges and universities; The role of artificial intelligence technology in program management on campus is proposed, and it will be used in the university system to optimize and improve the existing process and management of university archives management, and discussed how to improve the management strategies of personnel files in colleges and universities, simplify the complex file management process, and improve the management of security and preservation of archive content in file management system [8]. The above scholars involved the specific application fields of artificial intelligence technology, namely membrane system, public governance, and archives management, etc., which provided some references for the research of this paper. However, the above scholars have not continued to expand artificial intelligence technology to the level of legal protection mechanisms, and even some of them are only a brushstroke.


## 3. Artificial Intelligence Technology and Online Shopping

### 3.1. Artificial Intelligence Technology

An important part of the computer technology system is artificial intelligence. In turn, an important foundation of artificial intelligence is artificial intelligence. The two complement each other and accompany each other. Artificial intelligence, also known as mechanical intelligence, is what people call AI in the daily lives. It is a new technical science that studies and develops theories, methods, techniques, and application systems for simulating, extending, and expanding human intelligence. Its basic principle is to simulate the way of human thinking, so that people can process data information in a fast, efficient, and very accurate way. Among them, “artificial” refers to the main direction of human action goals, and “intelligence” refers to the combination of human and procedural thinking methods for processing and analysis according to the needs of social life and production. For example, the procedural tasks of mechanical production include safety management and inspection, document classification, etc. [9].Artificial intelligence is presented on the computer in two ways: One is computer language, which makes the system more intelligent, but this method only focuses on the final result, so it is also called an engineering method; the other is simulation, the process and results of this method need to be synchronized with human behavior.In recent years, the theoretical knowledge of artificial intelligence has been continuously researched and enriched, artificial intelligence technology has been continuously developed and gradually improved, and the application fields are also very wide, involving many aspects of daily production and life, including search engines, face or fingerprint recognition, expert systems (Intelligent computer program system that simulates human experts to solve domain problems), and driverless technology. They have also brought a lot of convenience to people’s life and work, and human beings have entered the era of intelligence unknowingly. In addition, the research on artificial intelligence has also extended to the level of philosophy and cognitive psychology. Figure1 reflects the main application fields and scenarios of current artificial intelligence. Specifically, the more mature robotics and speech recognition technologies are now supported by artificial intelligence, and ultimately meet the actual needs of different users [10].Figure 1
Current main application fields of artificial intelligence.This technology simulates people’s way of thinking through computer and algorithm programs, so that it can achieve the same thinking ability as human beings, so that it can flexibly handle and deal with some more complex problems. For example, this technology has played an important role in the operation and management of enterprises. The specific performance is that this technology can simplify complex management problems while ensuring the effect of management, thereby enabling the management of enterprises. The cost is greatly reduced, and the comprehensive competitiveness of the enterprise is improved. The concept of artificial intelligence was proposed in the 1950s and has been applied with the development of the times, such as the PK between the deep blue computer and the chess master, the game between AlphaGo and professional Go player Lee Sedol, which fully reflect the power of the technology in terms of data operation and learning ability [11]. The framework of artificial intelligence technology is shown in Figure 2.Figure 2
Framework of artificial intelligence technology.Artificial intelligence is a highly comprehensive and inclusive discipline, which integrates the theory and control theory of computer and logic. In recent years, there has been a new direction and branch of artificial intelligence research, namely Agent technology, which is mainly based on the needs of distributed artificial intelligence research. Among them, Agent refers to a certain type of entity with intelligent characteristics. It inputs environmental information through sensors, has strong autonomy in the process of processing and decision making, and uses actuators to complete tasks. Agent technology has a series of characteristics: It can operate spontaneously without the control of outsiders, and plan different behaviors for different target requirements; its structure is distributed, and agents will interact and cooperate. Therefore, the resources of the system can be fully shared and integrated to optimize its performance [12]. Its basic architecture is shown in Figure 3.Figure 3
Basic structure of agent.The basic process of Agent is: first accept the signal from the external environment, perceive the change of its state in real time, use the algorithm to process the input signal, and then output the result to the outside world to form a cognitive response. In this process, the two will interact for many times [13]. In order to express this process more three-dimensionally, it is shown in Figure 4.Figure 4
Agent working process.To understand and successfully apply artificial intelligence technology to the legal protection mechanism of online shopping, its advantages must be first understood. In order to ensure the safe use of online shopping platforms, it is necessary to eliminate various threats in the process. The ability of artificial intelligence to learn and deal with problems is very powerful, especially when encountering some nonlinear problems. It can quickly filter out useful information from a large amount of information and identify it. Most of the programs formulated by artificial intelligence can effectively improve the security of online shopping [14]. As is known to all, the traditional network technology requires a lot of manpower and material resources, while the emerging artificial intelligence technology consumes a very small amount of resources, and the calculation speed of the optimal solution is faster.


### 3.2. Online Shopping

Online shopping, also known as online transactions, is expressed in English as online/Internet shopping. It mainly refers to the process of transactions between enterprises or individuals, between enterprises and individuals or governments through the network. It is an important form of e-commerce and can be operated through devices such as computers, tablets, and mobile phones. The main process of online shopping is that the seller publishes the product information to be sold on the online shopping platform, the buyer then judges and purchases according to the detailed description and pictures, and then the two parties communicate on the platform. The buyer places an order and pays, and the seller accepts it. Then, there are a series of processes including logistics delivery, and buyer’s receipt, etc. Common trading platforms in daily life mainly include B2B, B2C, C2C, etc. [15].Online shopping is very popular, especially among young people, because of its convenience, affordability, and virtuality. Online shopping uses artificial intelligence technology to achieve 24-hour sales and services. People will not be limited by time and space when purchasing products. At the same time, the online shopping platform has also improved the corresponding screening function, so that users can choose their favorite products faster. Best of all, when it comes to shopping around, shopping online takes far less effort than a brick-and-mortar store, and can be easily accomplished with the twitch of a mouse. Because the outlets do not involve procedural requirements, and there are no rent, water, and electricity costs, the operating costs are greatly reduced, so the price of the same product online is much cheaper than offline. In addition, buyers and sellers do not meet face to face at all, various operations are completed with electronic data information, and the terms of the transaction contract are also presented in a paperless form [16], which protects personal privacy to a certain extent. But it also created some uneasy feelings for consumers.Under normal circumstances, the infringement problems that consumers will encounter when shopping online mainly include: serious inconsistency between the physical object and the picture description; the seller’s return promise is not fulfilled; personal information leakage; loss or damage of express packages; frequent harassment of business advertising information and the merchant does not issue an invoice; the e-commerce unilaterally cancels the order and many more. However, in response to these problems, consumer groups have different attitudes toward rights protection. Some will choose to protect their rights, but it depends on the price of the product, while others will not choose to protect their rights. They feel that more things are worse than less things, and some people do not understand the way of rights protection at all.Among them, some difficulties that consumers are likely to encounter in the process of rights protection include: It takes a long time and may not achieve the desired effect; the process is very cumbersome; the supervision of product transactions is not enough; there are not many ways to protect rights; most of the customer service consultants are robots; the source identification of the purchased products is time-consuming and labor-intensive, etc. Figure5 shows the conceptual flow of online shopping.Figure 5
Conceptual process illustration of online shopping.When the legitimate rights and interests of consumers are violated, people usually contact the seller directly and make a complaint to the e-commerce platform. In serious cases, they may report it. In addition, the Consumers Association is also an important and powerful rights protection organization. Some people have summarized the reasons for the frequent occurrence of infringement incidents, mainly including: Sellers lack the spiritual quality of integrity; transaction rules are not sound enough; logistics services are not perfect, but the most important thing is that consumers’ awareness of rights protection is relatively weak.Because the prices of online commodities are relatively cheap, consumers choose online shopping, and when consumers buy counterfeit products, their economic losses are not very large. Some seller stores often use the method of “rebate for good reviews” to improve the positive rate of the store, or to let consumers hide the real situation of the product, or even contact the buyer directly and threaten consumers to delete negative ratings with malicious words or phone harassment. In addition, because online shopping is very convenient, there are fewer restrictions on jurisdictional rules, which also leads to a certain degree of difficulty in safeguarding rights [17].Therefore, it is very necessary to guide students to form a rational and healthy consumption concept. First of all, consumers need to have a general understanding of the purchased products and merchants, and pay attention to verify their authenticity, especially the detailed description of the pictures. When people’s own rights and interests are violated, they must have the courage to take up the weapon of law to protect themselves, of course, the premise is to save the relevant invoice data. The administration of industry and commerce should become the main maker of online shopping transaction contracts, in which operators need to undertake the obligation to prompt specific terms and notify changes to terms. In addition, sellers have some major obligations in the transaction process, such as providing product information, ensuring product quality, complying with contract terms, protecting buyer information, no abuse of standard terms and exemptions and so on. From a legal perspective, the Consumer Rights Protection Law provides several important ways to resolve transaction conflicts, including reconciliation between transaction parties, civil mediation and litigation, administrative appeals, and contract dispute arbitration [18].Of course, online shopping reflects the psychological construction process of behavior subjects to a certain extent. To successfully conduct marketing and trading on e-commerce platforms, it is necessary to grasp the psychological characteristics of consumers, which can be embodied in optimizing the user experience of online shopping platforms. Figure6 summarizes the experience optimization design process of the online shopping platform.Figure 6
The flow experience model of online shopping platform.From Figure6, it can see the importance of consumer experience, and its influence on online shopping is very large. After research and investigation, SPSS statistical analysis tool can effectively measure the dimension correlation of consumer experience. This tool is easy to operate and powerful, and it is the earliest statistical analysis software in the world. The details are shown in Table 1.Table 1
Reliability analysis results of each dimension.
Dimension title serial number rangeSurvey topics of each dimensionAlphaQ1-Q4Brand0.879Q5-Q9Usability0.883Q10-Q14Content0.891Q15-Q19Functionality0.912Q20-Q22User resources0.881Total reliability value0.964


### 3.3. Legal Protection Mechanism

The concept of mechanism comes from the ancient Greek language and writing system. With the advent of the Industrial Revolution, the term was often used in fields such as industrial production and medical research. Literally, it refers to the independent and mutually unified relationship between structures with certain functions and their operating modes, and this relationship is for each element of an organism. Today, the term is also used in the field of sociology, and the meaning is different. Various systems in human society are mainly related to the change and setting of the rights of functional departments [19].Legal mechanism refers specifically to the legal system and how the system operates. The mechanism is based on the institutions and the system, and promotes the coordination and unity of the two through construction and improvement. Legal mechanisms have the function of protecting or safeguarding rights and interests. Under the strong legal protection mechanism, general online shopping platform management includes business processes such as user login and identity authentication [20], as shown in Figure 7.Figure 7
Login and identity authentication.In addition, in response to the problem of information leakage of online shoppers, a series of technical methods are applied in the legal protection mechanism to avoid this problem, as shown in Table2.Table 2
Main methods of privacy protection.
Related fieldsMain technical methods adoptedUniversal privacy protection methodData encryption, generalization, data disruption, randomizationPrivacy protection in data miningClustering, classification, and association rule miningPrivacy protection in data publishingT - proximity, L - diversity, K -anonymityFor example, when a protection mechanism uses the K-anonymity algorithm model, the information of online shopping users will haveK identical tuples, as shown in Table 3.Table 3
User information original and anonymous data table.
IdSexAgeCodeItems1Male20370000C2Male22370500T3Male20370100K4Male23370500S5Female30371000M6Female32371600N7Female31371400B8Female33371800PIDSEXAGECODEITEMS1Male2∗370∗c2Male2∗370∗t3Male2∗370∗k4Male2∗370∗s5Female3∗371∗m6Female3∗371∗n7Female3∗371∗b8Female3∗371∗p


### 3.4. Principle of Online Shopping Security Mechanism Based on Agent Technology

It is assumed thatD is the training set of the online shopping security mechanism, in which the data number of each sample is specific, they together form a one-tuple, and each attribute corresponds to a different data category. Assuming that there is a total of n categories, there are Di samples of category Xi in the training set, D and Di represent the probability that any data included in Xi, the expected information expression required to classify of these data is given by formula (1).(1)UD1,D2,…,Dn=−∑i=1nDiDlog2DiD,i=1,2,…,n.Entropy ofS can be obtained by dividing the expected information according to the attributes S, that is, the weighted average value, is as given by formula (2).(2)WS=∑k=1bS1k+S+…+SnkSOS1k+S+…+Snk.According to the above formula, the information gain of the security mechanism can be obtained, and the expression is given by formula (3).(3)GainS=OD1,D2,…,Dn−WS.From formula (3), it can be known that the information gain is positively correlated with the security degree of the mechanism. Therefore, this indicator should be chosen as the key indicator for evaluating the security mechanism.In order to better improve the protection mechanism of online shopping security, this paper designed an online shopping platform and conducted in-depth research on it. Special attention should be paid to the fact that the online shopping platform can reflect the security level of the shopping platform.The online shopping platform is defined asl, and the degree of security is defined as v. It is assumed pl to represent the browsing time of online shopping users on the online shopping platform; M is used to represent the total number of web pages involved in text or image parsing during the online shopping process; rc represents the minimum value of security, and ry represents the maximum value of security level; that is, the span of the security degree v is ry−rc, so the calculation formula of the browsing stay time of online shopping users on the web page is given by formula (4).(4)W=∑l=1Mpl.From formula (4), it can be known that the calculation formula of the duration of the security degree of the online shopping platform is given by formula (5).(5)Rv=ry−rc+n⋅W,Dv is assumed as the safety score of the online shopping platform, which is a weighted sum of data including the safety duration of the online shopping platform, the number of visits, browsing time, and the number of favorites. The formula for calculating this score is given by formula (6).(6)Dv=η⋅Rv+θ⋅Gv+ω⋅Qv.Among them,η, θ, and ω all refer to the influencing factors of the security degree of online shopping, and all three of them are constants.According to the above formula (6), it can be known that whenDv≥B1, the security level of the online shopping platform is extremely high; when B0≤Dv≤B1, the security level of the online shopping platform is extremely low. Among them, B0 and B1 refer to the threshold Dv of the safety score of the online shopping platform.Assuming thatKlong refers to the long-term security status of the online shopping platform and Dshort refers the short-term security status of the online shopping platform, the security model of the online shopping platform can be expressed as given by formulas (7), (8), and (9).(7)Y=Klong,Dshort,(8)Klong=r1,e1,r1,access,r2,e2,r2,access,…,rm,em,rm,access,(9)Dshort=r1,e1,r1,access,r2,e2,r2,access,…,rm′,em′,rm′,access.Among them,m refers to the feature vector of long-term security of online shopping, m′ refers to the feature vector of short-term security of online shopping.According to formulas (7)–(9), both of them are composed of several multi-sources, ri referring to the online shopping security features of each tuple, ei representing the weight of these features, and ri,access representing the access time record of the online shopping platform.The weight calculation formula of online shopping safety feature words is given by formula (10).(10)rgisg=rgji×isgj×logNmj.Among them,rgji refers to the term frequency of online shopping safety feature words i in web pages j; isgj=logN/mj refers to the inverse web page obtained by dividing the total number of web pages viewed by online shopping users N by the number of web pages including online shopping security terms mj, and then taking the logarithm.The Euclidean distance theorem is also introduced, it measures the absolute distance between two points in a multi-dimensional space, and the distanceszi′,Ui′ from all sample points zi′i′=1,2κ in the online shopping safety sample S to each center Ui′ in turn according to this theorem is calculated, so the calculation formula is given by formula (11).(11)si′,j′=yi′1−yj′12+…+yi′l−yj′l2.In the formula (11),yi′1,yi′2,…,yi′l and yj′1,yj′2,…,yj′l represent the two l-dimension security sample objects of online shopping in the security sample, respectively.What follows is the calculation ofUi′ value to serve as a new cluster center for online shopping safety:(12)Uσ=∑i′=1σyiG.Among them,Uσ refers to the center position of the σ th cluster of online shopping safety; G refers to the number of online shopping safety sample objects in the σ th cluster.The criterion function in the online shopping safety sampleS is defined as F, also known as the squared error criterion. To keep this criterion constant, the following calculations are performed, as given by formula (13).(13)F=∑i′=1σ∑q∈Sq−Ui′2.Among them,F represents the sum of the square errors of all online shopping safety sample objects in the sample S. In this process, the smaller the sum of errors, the closer the sample is to the criterion function, and the larger the sum of errors, the farther away from the criterion function. In order to make this error as small as possible, a minimum value ε is defined, which represents the minimum value between the sample data and the criterion function. The calculation process of the minimum error is as given by formula (14).(14)Smin=fF−ε⟶a<ε,Fmin=∑i=1σq−f2∑i=1εq−∑j−1εf.In this process, if the squared error of the sample minus a value approaches a constant infinitelya, and the constant is less than the minimum value defined, then the error at this time can be called its minimum value.At the same time, in order to ensure the safety of online shopping, the growth rate of the number of IP per unit time also need to be calculated, and monitor them in real time to prevent the theft and abuse of IP.IP growth rate per unit time is given by formula (15).(15)v=12Vtp−Vt−1pΔt⋅2nn+1!.Among them,v represents the IP allocation speed per unit time, Vtp represents the initial speed of IP at the moment t of time, Δt is the increment of time, which is always positive. On the network, IP automatic allocation and IP monitoring are implemented by DHCP, but it cannot monitor private domains, so IP static allocation is introduced.The monitoring process of IP is as given by formula (16).(16)m=Ct28⋅Ct×Ct−1−2,d=2m+nCt⋅Ct−1.Among them,m represents the unit quantity in the IP allocation process, and its original value is 28, which represents the total number of bits of the C class network. Ct Indicates the total number of IP allocations at this moment, excluding broadcast IP and its own IP loop. d indicates the number of IP accommodated by a unit channel in the network during this process, and the total number is 2m+n.In this way, the IP can be initially estimated, but the risk of online shopping does not only exist in the platform access time and IP region, so next the environment of the payer and the payee will be checked through the network. This builds the last line of defense for online shopping.(17)Es=∫0nxE0−xEndx,(18)E0=Fx⋅bx⋅rieiri∑0nbxi+fxi.In formulas (17)and(18), Es represents the secure payment environment, and its value is obtained under the combined action of the payer’s security environment E0 and the payee’s environment En. Among them, the security environment of the payer is mainly affected by the time error b, security feature coefficient r and feature weight e. Among them, U represents the expected information, rgisg represents the weight of the security feature word, and S represents the weighted average.Based on the above technologies and algorithms, the protection of online shopping can be initially realized, but in real life. There are many traps in online shopping, and new network technologies emerge one after another, so the protection mechanisms and technologies of online shopping must be improved in the process of practice to continue to escort consumers.


## 3.1. Artificial Intelligence Technology

An important part of the computer technology system is artificial intelligence. In turn, an important foundation of artificial intelligence is artificial intelligence. The two complement each other and accompany each other. Artificial intelligence, also known as mechanical intelligence, is what people call AI in the daily lives. It is a new technical science that studies and develops theories, methods, techniques, and application systems for simulating, extending, and expanding human intelligence. Its basic principle is to simulate the way of human thinking, so that people can process data information in a fast, efficient, and very accurate way. Among them, “artificial” refers to the main direction of human action goals, and “intelligence” refers to the combination of human and procedural thinking methods for processing and analysis according to the needs of social life and production. For example, the procedural tasks of mechanical production include safety management and inspection, document classification, etc. [9].Artificial intelligence is presented on the computer in two ways: One is computer language, which makes the system more intelligent, but this method only focuses on the final result, so it is also called an engineering method; the other is simulation, the process and results of this method need to be synchronized with human behavior.In recent years, the theoretical knowledge of artificial intelligence has been continuously researched and enriched, artificial intelligence technology has been continuously developed and gradually improved, and the application fields are also very wide, involving many aspects of daily production and life, including search engines, face or fingerprint recognition, expert systems (Intelligent computer program system that simulates human experts to solve domain problems), and driverless technology. They have also brought a lot of convenience to people’s life and work, and human beings have entered the era of intelligence unknowingly. In addition, the research on artificial intelligence has also extended to the level of philosophy and cognitive psychology. Figure1 reflects the main application fields and scenarios of current artificial intelligence. Specifically, the more mature robotics and speech recognition technologies are now supported by artificial intelligence, and ultimately meet the actual needs of different users [10].Figure 1
Current main application fields of artificial intelligence.This technology simulates people’s way of thinking through computer and algorithm programs, so that it can achieve the same thinking ability as human beings, so that it can flexibly handle and deal with some more complex problems. For example, this technology has played an important role in the operation and management of enterprises. The specific performance is that this technology can simplify complex management problems while ensuring the effect of management, thereby enabling the management of enterprises. The cost is greatly reduced, and the comprehensive competitiveness of the enterprise is improved. The concept of artificial intelligence was proposed in the 1950s and has been applied with the development of the times, such as the PK between the deep blue computer and the chess master, the game between AlphaGo and professional Go player Lee Sedol, which fully reflect the power of the technology in terms of data operation and learning ability [11]. The framework of artificial intelligence technology is shown in Figure 2.Figure 2
Framework of artificial intelligence technology.Artificial intelligence is a highly comprehensive and inclusive discipline, which integrates the theory and control theory of computer and logic. In recent years, there has been a new direction and branch of artificial intelligence research, namely Agent technology, which is mainly based on the needs of distributed artificial intelligence research. Among them, Agent refers to a certain type of entity with intelligent characteristics. It inputs environmental information through sensors, has strong autonomy in the process of processing and decision making, and uses actuators to complete tasks. Agent technology has a series of characteristics: It can operate spontaneously without the control of outsiders, and plan different behaviors for different target requirements; its structure is distributed, and agents will interact and cooperate. Therefore, the resources of the system can be fully shared and integrated to optimize its performance [12]. Its basic architecture is shown in Figure 3.Figure 3
Basic structure of agent.The basic process of Agent is: first accept the signal from the external environment, perceive the change of its state in real time, use the algorithm to process the input signal, and then output the result to the outside world to form a cognitive response. In this process, the two will interact for many times [13]. In order to express this process more three-dimensionally, it is shown in Figure 4.Figure 4
Agent working process.To understand and successfully apply artificial intelligence technology to the legal protection mechanism of online shopping, its advantages must be first understood. In order to ensure the safe use of online shopping platforms, it is necessary to eliminate various threats in the process. The ability of artificial intelligence to learn and deal with problems is very powerful, especially when encountering some nonlinear problems. It can quickly filter out useful information from a large amount of information and identify it. Most of the programs formulated by artificial intelligence can effectively improve the security of online shopping [14]. As is known to all, the traditional network technology requires a lot of manpower and material resources, while the emerging artificial intelligence technology consumes a very small amount of resources, and the calculation speed of the optimal solution is faster.


## 3.2. Online Shopping

Online shopping, also known as online transactions, is expressed in English as online/Internet shopping. It mainly refers to the process of transactions between enterprises or individuals, between enterprises and individuals or governments through the network. It is an important form of e-commerce and can be operated through devices such as computers, tablets, and mobile phones. The main process of online shopping is that the seller publishes the product information to be sold on the online shopping platform, the buyer then judges and purchases according to the detailed description and pictures, and then the two parties communicate on the platform. The buyer places an order and pays, and the seller accepts it. Then, there are a series of processes including logistics delivery, and buyer’s receipt, etc. Common trading platforms in daily life mainly include B2B, B2C, C2C, etc. [15].Online shopping is very popular, especially among young people, because of its convenience, affordability, and virtuality. Online shopping uses artificial intelligence technology to achieve 24-hour sales and services. People will not be limited by time and space when purchasing products. At the same time, the online shopping platform has also improved the corresponding screening function, so that users can choose their favorite products faster. Best of all, when it comes to shopping around, shopping online takes far less effort than a brick-and-mortar store, and can be easily accomplished with the twitch of a mouse. Because the outlets do not involve procedural requirements, and there are no rent, water, and electricity costs, the operating costs are greatly reduced, so the price of the same product online is much cheaper than offline. In addition, buyers and sellers do not meet face to face at all, various operations are completed with electronic data information, and the terms of the transaction contract are also presented in a paperless form [16], which protects personal privacy to a certain extent. But it also created some uneasy feelings for consumers.Under normal circumstances, the infringement problems that consumers will encounter when shopping online mainly include: serious inconsistency between the physical object and the picture description; the seller’s return promise is not fulfilled; personal information leakage; loss or damage of express packages; frequent harassment of business advertising information and the merchant does not issue an invoice; the e-commerce unilaterally cancels the order and many more. However, in response to these problems, consumer groups have different attitudes toward rights protection. Some will choose to protect their rights, but it depends on the price of the product, while others will not choose to protect their rights. They feel that more things are worse than less things, and some people do not understand the way of rights protection at all.Among them, some difficulties that consumers are likely to encounter in the process of rights protection include: It takes a long time and may not achieve the desired effect; the process is very cumbersome; the supervision of product transactions is not enough; there are not many ways to protect rights; most of the customer service consultants are robots; the source identification of the purchased products is time-consuming and labor-intensive, etc. Figure5 shows the conceptual flow of online shopping.Figure 5
Conceptual process illustration of online shopping.When the legitimate rights and interests of consumers are violated, people usually contact the seller directly and make a complaint to the e-commerce platform. In serious cases, they may report it. In addition, the Consumers Association is also an important and powerful rights protection organization. Some people have summarized the reasons for the frequent occurrence of infringement incidents, mainly including: Sellers lack the spiritual quality of integrity; transaction rules are not sound enough; logistics services are not perfect, but the most important thing is that consumers’ awareness of rights protection is relatively weak.Because the prices of online commodities are relatively cheap, consumers choose online shopping, and when consumers buy counterfeit products, their economic losses are not very large. Some seller stores often use the method of “rebate for good reviews” to improve the positive rate of the store, or to let consumers hide the real situation of the product, or even contact the buyer directly and threaten consumers to delete negative ratings with malicious words or phone harassment. In addition, because online shopping is very convenient, there are fewer restrictions on jurisdictional rules, which also leads to a certain degree of difficulty in safeguarding rights [17].Therefore, it is very necessary to guide students to form a rational and healthy consumption concept. First of all, consumers need to have a general understanding of the purchased products and merchants, and pay attention to verify their authenticity, especially the detailed description of the pictures. When people’s own rights and interests are violated, they must have the courage to take up the weapon of law to protect themselves, of course, the premise is to save the relevant invoice data. The administration of industry and commerce should become the main maker of online shopping transaction contracts, in which operators need to undertake the obligation to prompt specific terms and notify changes to terms. In addition, sellers have some major obligations in the transaction process, such as providing product information, ensuring product quality, complying with contract terms, protecting buyer information, no abuse of standard terms and exemptions and so on. From a legal perspective, the Consumer Rights Protection Law provides several important ways to resolve transaction conflicts, including reconciliation between transaction parties, civil mediation and litigation, administrative appeals, and contract dispute arbitration [18].Of course, online shopping reflects the psychological construction process of behavior subjects to a certain extent. To successfully conduct marketing and trading on e-commerce platforms, it is necessary to grasp the psychological characteristics of consumers, which can be embodied in optimizing the user experience of online shopping platforms. Figure6 summarizes the experience optimization design process of the online shopping platform.Figure 6
The flow experience model of online shopping platform.From Figure6, it can see the importance of consumer experience, and its influence on online shopping is very large. After research and investigation, SPSS statistical analysis tool can effectively measure the dimension correlation of consumer experience. This tool is easy to operate and powerful, and it is the earliest statistical analysis software in the world. The details are shown in Table 1.Table 1
Reliability analysis results of each dimension.
Dimension title serial number rangeSurvey topics of each dimensionAlphaQ1-Q4Brand0.879Q5-Q9Usability0.883Q10-Q14Content0.891Q15-Q19Functionality0.912Q20-Q22User resources0.881Total reliability value0.964


## 3.3. Legal Protection Mechanism

The concept of mechanism comes from the ancient Greek language and writing system. With the advent of the Industrial Revolution, the term was often used in fields such as industrial production and medical research. Literally, it refers to the independent and mutually unified relationship between structures with certain functions and their operating modes, and this relationship is for each element of an organism. Today, the term is also used in the field of sociology, and the meaning is different. Various systems in human society are mainly related to the change and setting of the rights of functional departments [19].Legal mechanism refers specifically to the legal system and how the system operates. The mechanism is based on the institutions and the system, and promotes the coordination and unity of the two through construction and improvement. Legal mechanisms have the function of protecting or safeguarding rights and interests. Under the strong legal protection mechanism, general online shopping platform management includes business processes such as user login and identity authentication [20], as shown in Figure 7.Figure 7
Login and identity authentication.In addition, in response to the problem of information leakage of online shoppers, a series of technical methods are applied in the legal protection mechanism to avoid this problem, as shown in Table2.Table 2
Main methods of privacy protection.
Related fieldsMain technical methods adoptedUniversal privacy protection methodData encryption, generalization, data disruption, randomizationPrivacy protection in data miningClustering, classification, and association rule miningPrivacy protection in data publishingT - proximity, L - diversity, K -anonymityFor example, when a protection mechanism uses the K-anonymity algorithm model, the information of online shopping users will haveK identical tuples, as shown in Table 3.Table 3
User information original and anonymous data table.
IdSexAgeCodeItems1Male20370000C2Male22370500T3Male20370100K4Male23370500S5Female30371000M6Female32371600N7Female31371400B8Female33371800PIDSEXAGECODEITEMS1Male2∗370∗c2Male2∗370∗t3Male2∗370∗k4Male2∗370∗s5Female3∗371∗m6Female3∗371∗n7Female3∗371∗b8Female3∗371∗p


## 3.4. Principle of Online Shopping Security Mechanism Based on Agent Technology

It is assumed thatD is the training set of the online shopping security mechanism, in which the data number of each sample is specific, they together form a one-tuple, and each attribute corresponds to a different data category. Assuming that there is a total of n categories, there are Di samples of category Xi in the training set, D and Di represent the probability that any data included in Xi, the expected information expression required to classify of these data is given by formula (1).(1)UD1,D2,…,Dn=−∑i=1nDiDlog2DiD,i=1,2,…,n.Entropy ofS can be obtained by dividing the expected information according to the attributes S, that is, the weighted average value, is as given by formula (2).(2)WS=∑k=1bS1k+S+…+SnkSOS1k+S+…+Snk.According to the above formula, the information gain of the security mechanism can be obtained, and the expression is given by formula (3).(3)GainS=OD1,D2,…,Dn−WS.From formula (3), it can be known that the information gain is positively correlated with the security degree of the mechanism. Therefore, this indicator should be chosen as the key indicator for evaluating the security mechanism.In order to better improve the protection mechanism of online shopping security, this paper designed an online shopping platform and conducted in-depth research on it. Special attention should be paid to the fact that the online shopping platform can reflect the security level of the shopping platform.The online shopping platform is defined asl, and the degree of security is defined as v. It is assumed pl to represent the browsing time of online shopping users on the online shopping platform; M is used to represent the total number of web pages involved in text or image parsing during the online shopping process; rc represents the minimum value of security, and ry represents the maximum value of security level; that is, the span of the security degree v is ry−rc, so the calculation formula of the browsing stay time of online shopping users on the web page is given by formula (4).(4)W=∑l=1Mpl.From formula (4), it can be known that the calculation formula of the duration of the security degree of the online shopping platform is given by formula (5).(5)Rv=ry−rc+n⋅W,Dv is assumed as the safety score of the online shopping platform, which is a weighted sum of data including the safety duration of the online shopping platform, the number of visits, browsing time, and the number of favorites. The formula for calculating this score is given by formula (6).(6)Dv=η⋅Rv+θ⋅Gv+ω⋅Qv.Among them,η, θ, and ω all refer to the influencing factors of the security degree of online shopping, and all three of them are constants.According to the above formula (6), it can be known that whenDv≥B1, the security level of the online shopping platform is extremely high; when B0≤Dv≤B1, the security level of the online shopping platform is extremely low. Among them, B0 and B1 refer to the threshold Dv of the safety score of the online shopping platform.Assuming thatKlong refers to the long-term security status of the online shopping platform and Dshort refers the short-term security status of the online shopping platform, the security model of the online shopping platform can be expressed as given by formulas (7), (8), and (9).(7)Y=Klong,Dshort,(8)Klong=r1,e1,r1,access,r2,e2,r2,access,…,rm,em,rm,access,(9)Dshort=r1,e1,r1,access,r2,e2,r2,access,…,rm′,em′,rm′,access.Among them,m refers to the feature vector of long-term security of online shopping, m′ refers to the feature vector of short-term security of online shopping.According to formulas (7)–(9), both of them are composed of several multi-sources, ri referring to the online shopping security features of each tuple, ei representing the weight of these features, and ri,access representing the access time record of the online shopping platform.The weight calculation formula of online shopping safety feature words is given by formula (10).(10)rgisg=rgji×isgj×logNmj.Among them,rgji refers to the term frequency of online shopping safety feature words i in web pages j; isgj=logN/mj refers to the inverse web page obtained by dividing the total number of web pages viewed by online shopping users N by the number of web pages including online shopping security terms mj, and then taking the logarithm.The Euclidean distance theorem is also introduced, it measures the absolute distance between two points in a multi-dimensional space, and the distanceszi′,Ui′ from all sample points zi′i′=1,2κ in the online shopping safety sample S to each center Ui′ in turn according to this theorem is calculated, so the calculation formula is given by formula (11).(11)si′,j′=yi′1−yj′12+…+yi′l−yj′l2.In the formula (11),yi′1,yi′2,…,yi′l and yj′1,yj′2,…,yj′l represent the two l-dimension security sample objects of online shopping in the security sample, respectively.What follows is the calculation ofUi′ value to serve as a new cluster center for online shopping safety:(12)Uσ=∑i′=1σyiG.Among them,Uσ refers to the center position of the σ th cluster of online shopping safety; G refers to the number of online shopping safety sample objects in the σ th cluster.The criterion function in the online shopping safety sampleS is defined as F, also known as the squared error criterion. To keep this criterion constant, the following calculations are performed, as given by formula (13).(13)F=∑i′=1σ∑q∈Sq−Ui′2.Among them,F represents the sum of the square errors of all online shopping safety sample objects in the sample S. In this process, the smaller the sum of errors, the closer the sample is to the criterion function, and the larger the sum of errors, the farther away from the criterion function. In order to make this error as small as possible, a minimum value ε is defined, which represents the minimum value between the sample data and the criterion function. The calculation process of the minimum error is as given by formula (14).(14)Smin=fF−ε⟶a<ε,Fmin=∑i=1σq−f2∑i=1εq−∑j−1εf.In this process, if the squared error of the sample minus a value approaches a constant infinitelya, and the constant is less than the minimum value defined, then the error at this time can be called its minimum value.At the same time, in order to ensure the safety of online shopping, the growth rate of the number of IP per unit time also need to be calculated, and monitor them in real time to prevent the theft and abuse of IP.IP growth rate per unit time is given by formula (15).(15)v=12Vtp−Vt−1pΔt⋅2nn+1!.Among them,v represents the IP allocation speed per unit time, Vtp represents the initial speed of IP at the moment t of time, Δt is the increment of time, which is always positive. On the network, IP automatic allocation and IP monitoring are implemented by DHCP, but it cannot monitor private domains, so IP static allocation is introduced.The monitoring process of IP is as given by formula (16).(16)m=Ct28⋅Ct×Ct−1−2,d=2m+nCt⋅Ct−1.Among them,m represents the unit quantity in the IP allocation process, and its original value is 28, which represents the total number of bits of the C class network. Ct Indicates the total number of IP allocations at this moment, excluding broadcast IP and its own IP loop. d indicates the number of IP accommodated by a unit channel in the network during this process, and the total number is 2m+n.In this way, the IP can be initially estimated, but the risk of online shopping does not only exist in the platform access time and IP region, so next the environment of the payer and the payee will be checked through the network. This builds the last line of defense for online shopping.(17)Es=∫0nxE0−xEndx,(18)E0=Fx⋅bx⋅rieiri∑0nbxi+fxi.In formulas (17)and(18), Es represents the secure payment environment, and its value is obtained under the combined action of the payer’s security environment E0 and the payee’s environment En. Among them, the security environment of the payer is mainly affected by the time error b, security feature coefficient r and feature weight e. Among them, U represents the expected information, rgisg represents the weight of the security feature word, and S represents the weighted average.Based on the above technologies and algorithms, the protection of online shopping can be initially realized, but in real life. There are many traps in online shopping, and new network technologies emerge one after another, so the protection mechanisms and technologies of online shopping must be improved in the process of practice to continue to escort consumers.


## 4. Construction of Legal Protection Mechanism for Online Shopping

In order to better understand some influencing factors in the process of online shopping safety, this study conducted a random questionnaire with a total of 500 questionnaires, of which 480 were valid questionnaires, and the effective questionnaire rate was 96%. The questionnaire was anonymous. The basic situation of the survey is as shown in Figure8.Figure 8
Basic information of online shopping research.The survey results showed that nearly half of the respondents were skeptical about the safety of online shopping, and 44% of the respondents believed that the purchased products did not meet expectations during the actual transaction process. Among them, they are most concerned about the satisfaction of product functional requirements, and most people will choose products with guaranteed quality. Then, their satisfaction with after-sales service was investigated, and the results showed that 11% were dissatisfied with the quality of after-sales service.In order to verify the unique role of artificial intelligence technology in online shopping, the original online shopping protection mechanism was optimized. At the same time, in order to relieve consumers’ doubts about the safety of online shopping, an online shopping prediction protection mechanism based on the artificial intelligence protection mechanism was added to protect consumers’ rights and interests in advance. The error comparison of the prediction mechanism is shown in Figure9.Figure 9
Comparison of prediction mechanism errors.Figure9 shows that the prediction error of the artificial intelligence-based online shopping protection mechanism proposed by the article is relatively low, especially after many experiments, the minimum error reaches 0.6. Compared with the original prediction mechanism, the error of the prediction protection mechanism is almost kept at around 0.65, which is lower than the original 0.75, which fully demonstrates the effectiveness of the prediction protection mechanism.Under such a protection mechanism, the external indicators of online shopping were further quantified to explore the impact of the mechanism on consumers’ online shopping behavior. The comparison of online shopping indicators under the protection mechanism is shown in Figure10.Figure 10
Comparison of online shopping indicators under the protection mechanism.Figure10 shows that the external indicators of online shopping are better under the AI-based predictive protection mechanism. Among them, the safety of online shopping has increased to 70%, and people’s interest in online shopping has also risen to 65%, which shows that people have more sense of consumption security under the protection mechanism.However, the consumer sense of security in the above research is only a quantified indicator, and it cannot specifically describe people’s willingness to consume. Therefore, the minimum consumption amount and consumption willingness of people under this mechanism need to be explored. The consumption amount and willingness of people under the online shopping protection mechanism are shown in Figure11.Figure 11
People’s minimum consumption amount and willingness under the online shopping protection mechanism.Figure11 shows that people’s willingness to spend increases significantly under our online shopping protection mechanism. Among them, after four experiments, people’s minimum consumption amount rose to 175, and the willingness to spend continued to rise, reaching a maximum of 0.65, which fully showed that under the protection mechanism, consumers were more willing and more assured to consume.


## 5. Conclusion

The application of artificial intelligence technology can effectively improve the security and practicability of legal protection mechanisms, prevent and resolve various risks, ensure network security, and make it better serve consumers. This paper used artificial intelligence technology to build a legal protection mechanism for online shopping, integrated artificial intelligence into the field of network security, and deeply studied the challenges encountered in the online shopping process, which truly protected the legitimate rights and interests of buyers and made the consumer economy move toward a healthier In the direction of development. It can be effectively and reliably guaranteed in terms of security, so as to achieve the take-off of the network economy. Through the analysis of the protection mechanism of online shopping, it provides a certain reference for the legislative department to improve the relevant legislation of online shopping and form a legal system for the protection of consumer rights and interests of online shopping. Although this paper proposed a protection mechanism based on artificial intelligence, due to time reasons, the article did not conduct a detailed comparison of the effects of different protection mechanisms. In the future, the article will focus on different protection mechanisms, and on this basis, upgrade and adjust the AI protection mechanism.



---

*Source: 5438320-2022-09-14.xml*