[BACK]
Journal of New Media
DOI:10.32604/jnm.2022.027883
images
Article

Design of Middle School Chemistry Experiment Simulation System Based on Apriori Algorithm

Guwei Li1, Zhou Li1,*, Cong Zheng1 and Zhengyuan Li2

1Zhejiang Dongfang Polytechnic, WenZhou, 325000, China
2Nagoya City University, Nagoya, 23100-2, Japan
*Corresponding Author: Zhou Li. Email: 2679392892@qq.com
Received: 27 January 2022; Accepted: 28 February 2022

Abstract: Aiming at the safety problems of toxic, flammable and explosive chemicals used in middle school chemical experiments, such as human poisoning, skin corrosion, fire or explosion caused by improper experimental operation, a virtual simulation method of chemical experiments based on unity is proposed. Due to the need to analyze and compare the data in chemical experiments, summarize the experimental characteristics and data relevance. Therefore, based on the Apriori algorithm, this method deeply excavates the data obtained in the chemical experiment, uses Maya to model the experimental environment, uses unity to design the interactive functions in the experimental process, and uses visual effect graph technology, shader graph technology and other methods to realize the special effect simulation of various chemical experiments. With this method, the virtual simulation prototype system of middle school chemistry experiment is developed. The example shows that this method can vividly and realistically reproduce the simulation effect of chemical experiment, find the correlation between the experimental data, classification, properties and the overall characteristics of the data, describe and predict the development trend of the data, so as to make better use of these data to provide support for chemical experiment, and not only solve the problems of poisoning, corrosion of skin and It also solves the problems that it is difficult to scientifically compare data and find data relevance in traditional chemical experiments.

Keywords: Apriori; chemical experiment; virtual reality

1  Introduction

Middle school chemistry laboratories generally store a large number of chemicals, which are flammable, explosive and corrosive. In the process of chemical experiment, because students are not familiar with the experimental process and the operation is not standardized, it is often easy to cause safety problems such as fire, explosion and corrosion of human skin. The aging of chemical experimental instruments, poor laboratory conditions, aging power supply lines, bad weather and other factors will also bring many potential safety problems. In addition, in the process of traditional chemical experiment, it is difficult to compare various experimental data and find the deep correlation between the data. These problems seriously affect the accuracy and effectiveness of chemical experiment results.

To solve these problems, a virtual simulation method of chemical experiment based on unity is proposed. Based on the Apriori algorithm, this method deeply excavates the data obtained in the chemical experiment, uses Maya to model the experimental environment [1], uses unity to design the interactive functions in the experimental process, and uses visual effect graph technology, shader graph technology and other methods to realize the special effect simulation of various chemical experiments. With this method, the virtual simulation prototype system of middle school chemistry experiment is developed. The example shows that this method can vividly and realistically reproduce the simulation effect of chemical experiment, find the correlation between the experimental data, classification, properties and the overall characteristics of the data, describe and predict the development trend of the data [2], so as to make better use of these data to provide support for chemical experiment, and not only solve the problems of poisoning, corrosion of skin and It also solves the problems that it is difficult to scientifically compare data and find data relevance in traditional chemical experiments.

2  The Concept of Apriori Algorithm

Apriori algorithm is an original algorithm for mining frequent itemsets for Boolean association rules proposed by Agrawal et al. [3]. As we will see, the name of the algorithm is based on the fact that the algorithm uses a priori knowledge of the properties of frequent sets. Apriori algorithm uses an iterative method called layer by layer search, and k itemsets are used to explore (k+1) itemsets. Firstly, by scanning the database, the count of each item is accumulated, and the items that meet the minimum support are collected to find the set of frequent 1 item set [4]. The set is recorded as L1. Then, L1 is used to find the set L2 of frequent 2 itemsets, and L2 is used to find L3. This goes on until no more frequent k itemsets can be found. Finding each Lk requires a full database scan. In order to improve efficiency, the important property of Apriori is that all non empty subsets of frequent itemsets must also be frequent. Fig. 1 shows the Apriori algorithm. How to use this property: connection step and pruning step.

images

Figure 1: Apriori algorithm

2.1 Connection Step

A set of candidate k itemsets is generated by connecting Lk−1 with itself [5], the candidate item set is marked as Ck. Let L1 and L2 be itemsets in Lk−1. The notation Li [j] represents the j-th item in Li. For example, L1 [k-2] represents the penultimate item of L1. For convenience, Apriori assumes that the items in a transaction or itemset are sorted in dictionary order [6]. For the (k-1) itemset Li, it means sorting the items so that Li [1] < Li [2] <… < Li[k-1]. Execute connection Lk−1 ⋈ Lk−1, where the elements of Lk−1 are connectable if their first (k-2) items are the same. That is, the elements L1 and L2 of LK−1 are connectable if (L1 [1] = L2 [1]) Λ (L1 [2] = L2 [2]) Λ… Λ (L1[k-2] = L2[k-2]) Λ (L1[k-1] < L2[k-1]). The condition L1[k-1] < L2[k-1] is only to ensure that there is no repetition [7]. The result itemsets generated by connecting L1 and L2 are L1 [1], L1 [2], L1[k-1], L2[k-1]. The characteristics of the Apriori algorithm are shown in Fig. 2.

images

Figure 2: The characteristics of the Apriori algorithm

2.2 Pruning Step

Ck is a superset of Lk, that is, the members of Ck can be or not frequent [8], but all frequent k itemsets are included in Ck. Scan the database to determine the count of each candidate in Ck, so as to determine Lk. However, Ck may be very large, so the amount of calculation involved is very large. To compress Ck, the apriori property can be used in the following ways. Any non frequent (k-1) itemset is not a subset of frequent k itemsets [9]. Therefore, if the (k-1) item subset of the candidate k item set is not in Lk−1, the candidate can not be frequent, so it can be deleted from Ck. This subset test can be done quickly using the hash tree of all frequent itemsets. The flow of Apriori algorithm is shown in Fig. 3.

images

Figure 3: The flow of Apriori algorithm

3  Virtual Reality System of Chemical Experiment Based on Apriori

The chemical experiment virtual reality system based on Apriori uses Maya to model the experimental environment, unity to design the interactive functions in the experimental process, and visual effect graph technology [10], shader graph technology and other methods to realize the special effects simulation of various chemical experiments [11]. At the same time, the system will release two platforms, one is VR platform and the other is mobile platform [12]. Students can experience rich chemical experiment [13] interaction functions with the help of VR helmets and mobile phones, which can ensure the safety of experiments and enhance the interest of classroom experiments [14].

3.1 Development Process of Chemical Experiment Virtual Reality System

To develop the VR fire hazard troubleshooting system, we first need to understand all the hidden dangers of fire in the dormitory [15], store the information of these hidden danger points, use 3dsmax to model and texture map the dormitory scene, establish an exquisite model corresponding to all the hidden danger points, import it into the unity engine [16], and develop the interactive function module of hidden danger point troubleshooting in the unity engine, Use intersecting ball detection technology and adding explosion point technology to add fire and explosion effects for each hidden danger point [17], design eye-catching UI, provide clear experience for the experimenter, and finally release the generated system to HTC vive [18]. The overall process is shown in Fig. 4.

images

Figure 4: The overall process of development system

3.2 Maya Technology

Maya is a powerful 3D animation software produced by Autodesk company [19]. It has many applications in the fields of 3D modeling, film and television animation and film and television special effects [20]. The most commonly used modeling method is polygon modeling. Developers can finely control each point of the model by pinching clay figurines. The operation mode of modeling is very novel. The new software upgrades the UV module, which is very convenient for UV exhibition, especially suitable for VR applications [21]. Therefore, this paper selects Maya to model, UV process and map the dormitory scene.

3.3 Unity Technology

The virtual reality system of chemical experiment has very high requirements for the authenticity of three-dimensional scenes, so it needs an engine that can produce 3A pictures [22]. In addition, many interactive functions and the production of UI interface need to be added, and the realization of these functions and effects needs unity. Unity is an engine for developing 3D games, especially the mobile game market, which accounts for a large proportion. The development language is c# language. It is an engine based on component-oriented development and compatible with all platforms. In this paper, unity is used to realize the special effect display and interaction functions. Unity development is component-oriented development, and this project mainly uses the visual effect graph module. The powerful effect and control of this module are the key to our realization of realistic special effects. The shader graph module is also a necessary method for us to realize the physical rendering effect [23].

3.4 Visual Effect Graph Technology

There are a large number of experimental effects in chemical experiments, which are difficult to achieve by traditional CG technology, especially close to the photo effect [24]. At the same time, the operation efficiency should be considered. Using unity's latest visual effect graph technology can ensure the smooth operation of the system and achieve near photo effect. Visual effect graph technology is a new technology launched after unity 2018.3. It is actually a new special effect tool. It is similar to the original particle system, but its most intuitive feature is the visual node, which supports programming and runs on GPU [25]. Fig. 5 shows the interface of visual effect graph.

images

Figure 5: The flow of Apriori algorithm

These features enable it to support a larger amount of graphic computation and provide a more flexible development space for developers and creators. Therefore, it can be used to make a large number of 3A level special effects in the game [26]. For example: various chemical reaction effects in the required chemical experiments in this system. Fig. 6 shows the Explosion effect.

images

Figure 6: The Explosion effect

3.5 Shader Graph Technology

To use shader graph, you need to install shader graph package and universal RP package (lightweight RP before unity 2019.3). Create and configure SRP (programmable rendering pipeline), and then create a new PBR graph. Open the PBR graph file to start setting the material effect based on physical rendering.

Through the connection of various nodes and debugging parameters, the edge luminous effect shown in Fig. 7 can be obtained.

images

Figure 7: The edge luminous effect

4  Case Studing

Flame and Mars effects realized by visual effect graph technology are added to the scene, and all material rendering is realized based on shader graph technology. Add the real-time interactive UI interface and the data information obtained based on the Apriori algorithm. According to the research, this system enables students to use VR handle to control experimental instruments and equipment, and produce preset chemical effects in real time. Students can use this system to complete all chemical experiments, the effect is very realistic, and can feed back the relevance of the obtained data to the experimenter.

5  Conclusions

In order to solve the problems of safety, accuracy and effectiveness of experimental data in the process of chemical experiment, a chemical experiment virtual reality system based on Apriori algorithm is studied. Maya is used to model the experimental environment, unity is used to design the interactive function in the process of experiment, and visual effect graph technology, shader graph technology and other methods are used, Realize the special effect simulation of various chemical experiments. With this method, the virtual simulation prototype system of middle school chemistry experiment is developed. The example shows that this method can vividly and realistically reproduce the simulation effect of chemical experiment, find the correlation between the experimental data, classification, properties and the overall characteristics of the data, describe and predict the development trend of the data, so as to make better use of these data to provide support for chemical experiment, and not only solve the problems of poisoning, corrosion of skin and It also solves the problems that it is difficult to scientifically compare data and find data relevance in traditional chemical experiments.

Acknowledgement: We would like to thank Professor Zhang for his technical support during the preparation of this manuscript.

Funding Statement: The authors received no specific funding for this study.

Conflicts of Interest: The authors declare that they have no conflicts of interest regarding the present study.

References

 1.  C. W. Ahn and R. S. Ramakrishna, “A genetic algorithm for shortest path routing problem and the sizing of populations,” IEEE Transactions on Evolutionary Computation, vol. 6, no. 6, pp. 566–579, 2002. [Google Scholar]

 2.  S. Xia, “Application of maya in film 3D animation design,” in 2011 3rd Int. Conf. on Computer Research and Development, Shanghai, China, pp. 357–360, 2011. [Google Scholar]

 3.  G. Can, J. Odobez and D. Gatica-Perez, “Maya codical glyph segmentation: A crowdsourcing approach,” IEEE Transactions on Multimedia, vol. 20, no. 3, pp. 711–725, 2018. [Google Scholar]

 4.  J. Kinsman and D. Asher, “Orbital dynamics of highly probable but rare orionid outbursts possibly observed by the ancient maya,” Monthly Notices of the Royal Astronomical Society, vol. 493, no. 1, pp. 551–558, 2020. [Google Scholar]

 5.  S. Pei and K. Chang, “Odd ramanujan sums of complex roots of unity,” IEEE Signal Processing Letters, vol. 14, no. 1, pp. 20–23, 2007. [Google Scholar]

 6.  D. Jakelić and A. A. de Moura, “Tensor products, characters, and blocks of finite-dimensional representations of quantum affine algebras at roots of unity,” International Mathematics Research Notices, vol. 2011, no. 18, pp. 4147–4199, 2011. [Google Scholar]

 7.  M. Zhu, “Regular representations of quantum groups at roots of unity,” International Mathematics Research Notices, vol. 2010, no. 15, pp. 3039–3065, 2010. [Google Scholar]

 8.  B. Schroeder, S. Tripathi and H. Tang, “Triplet-aware scene graph embeddings,” in 2019 IEEE/CVF Int. Conf. on Computer Vision Workshop (ICCVW), Seoul, Korea (Southpp. 1783–1787, 2019. [Google Scholar]

 9.  F. Peng, L. Yin, L. Zhang and M. Long, “CGR-GAN: CG facial image regeneration for antiforensics based on generative adversarial network,” IEEE Transactions on Multimedia, vol. 22, no. 10, pp. 2511–2525, 2020. [Google Scholar]

10. W. Lee and S. Hong, “28 GHz RF front-end structure using CG LNA as a switch,” IEEE Microwave and Wireless Components Letters, vol. 30, no. 1, pp. 94–97, 2020. [Google Scholar]

11. G. Vigueras and J. M. Orduña, “On the use of GPU for accelerating communication-aware mapping techniques,” The Computer Journal, vol. 59, no. 6, pp. 836–847, 2016. [Google Scholar]

12. S. Keskin and T. Kocak, “GPU-Based gigabit LDPC decoder,” IEEE Communications Letters, vol. 21, no. 8, pp. 1703–1706, 2017. [Google Scholar]

13. J. Xu and W. Chen, “Convolutional neural network-based identity recognition using ecg at different water temperatures during bathing,” Computers, Materials & Continua, vol. 71, no. 1, pp. 1807–1819, 2022. [Google Scholar]

14. S. Mahmoud and A. Salman, “Cost estimate and input energy of floor systems in low seismic regions,” Computers, Materials & Continua, vol. 71, no. 2, pp. 2159–2173, 2022. [Google Scholar]

15. A. A. Almazroi and R. Sher, “Covid-19 cases prediction in Saudi Arabia using tree-based ensemble models,” Intelligent Automation & Soft Computing, vol. 32, no. 1, pp. 389–400, 2022. [Google Scholar]

16. M. Sharma and B. Pathik, “Crow search algorithm with improved objective function for test case generation and optimization,” Intelligent Automation & Soft Computing, vol. 32, no. 2, pp. 1125–1140, 2022. [Google Scholar]

17. C. Huang and C. Huang, “Cvae-gan emotional ai music system for car driving safety,” Intelligent Automation & Soft Computing, vol. 32, no. 3, pp. 1939–1953, 2022. [Google Scholar]

18. A. Rudniy, “Data warehouse design for big data in academia,” Computers, Materials & Continua, vol. 71, no. 1, pp. 979–992, 2022. [Google Scholar]

19. Y. Ma, Y. Wang, X. Mei, C. Liu, X. Dai et al., “Visible/infrared combined 3D reconstruction scheme based on nonrigid registration of multi-modality images with mixed features,” IEEE Access, vol. 7, pp. 19199–19211, 2019. [Google Scholar]

20. Y. Altmann, S. McLaughlin and M. E. Davies, “Fast online 3D oeconstruction of dynamic scenes from individual single-photon detection events,” IEEE Transactions on Image Processing, vol. 29, pp. 2666–2675, 2020. [Google Scholar]

21. Y. Gao, “An improved shortest route algorithm in vehicle navigation system,” in 2010 3rd Int. Conf. on Advanced Computer Theory and Engineering(ICACTE), Chengdu, China, pp. 363–366, 2010. [Google Scholar]

22. C. W. Ahn and R. S. Ramakrishna, “A genetic algorithm for shortest path routing problem and the sizing of populations,” IEEE Transactions on Evolutionary Computation, vol. 6, no. 6, pp. 566–579, 2002. [Google Scholar]

23. S. Palpandi and T. Meeradevi, “Development of efficient classification systems for the diagnosis of melanoma,” Computer Systems Science and Engineering, vol. 42, no. 1, pp. 361–371, 2022. [Google Scholar]

24. S. Mishra and M. Prakash, “Digital mammogram inferencing system using intuitionistic fuzzy theory,” Computer Systems Science and Engineering, vol. 41, no. 3, pp. 1099–1115, 2022. [Google Scholar]

25. A. Alrosan, W. Alomoush, M. Alswaitti, K. Alissa, S. Sahran et al., “Automatic data clustering based mean best artificial bee colony algorithm,” Computers, Materials & Continua, vol. 68, no. 2, pp. 1575–1593, 2021. [Google Scholar]

26. H. L. Yang, C. Q. Hu, G. W. Li, J. C. Fan, “A fire escape simulation system based on the dijkstra algorithm,” Computer Systems Science and Engineering, vol. 39, no. 3, pp. 365–372, 2021. [Google Scholar]

images This work is licensed under a Creative Commons Attribution 4.0 International License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.