| In recent years,electric bicycles have become more and more popular as an environmentally friendly new mode of transportation.Electric bicycle rental has also risen,and many electric bike rental software have appeared on the market.With the iterative update of software,many technical problems have arisen.The main technical problems include low security of dual-end communication,unreasonable memory management,and poor network request performance.This article will try to solve the above problem by the following measures.(1)Double-end communication encryption algorithm design.Android systems usually use AES,3DES and other encryption algorithms to encrypt data,but because the details of the implementation of these algorithms are open to the public,and once the lawless elements crack these algorithms,then the security of the data will not be guaranteed,so This article is mainly based on Android mobile phone operating system,through the design of a set of double-end communication encryption algorithm that client-server communication encryption algorithm to double-end communication content encryption processing.Based on the 3DES symmetric encryption algorithm,this algorithm uses IP substitution,adding interference fields,random selection of keystores,and segmented encryption according to the characteristics of the double-end communication,making the encryption algorithm with high encryption efficiency and low computational complexity.,Encryption is simple,etc.At the same time,the 3DES encryption algorithm used in the double-end communication encryption algorithm is improved,so that the key used for each 3DES encryption is random,that is to say each time the encryption key is not As such,this makes the 3DES algorithm used in custom communication encryption algorithms more secure.(2)Memory management optimization.Nowadays,electric bicycle rental software often causes memory overflow during use.In the process of developer coding,memory leaks may occur if the design is improper.Therefore,this system proposes the following solutions for memory overflow and memory leakage.a.Memory leak solution.Analyzing the memory overflow phenomenon of the electric bicycle rental system,it is found that in the process of loading large images,the memory overflow phenomenon is easy to occur.Therefore,the system designs a set of custom image loading libraries to solve such problems.In terms of code implementation,change the strong reference to a soft reference to prevent memory overflow.b.Memory leak solution.Leakage of collections and memory leaks caused by Context,etc.are optimized to avoid memory leaks.(3)Network request performance optimization.There are three main problems that need to be optimized during the client's network request.Power consumption is too fast,due to the long-term request for network data,it will lead to the problem of excessive power drop.Excessive traffic consumption is mainly due to repeated access to the same interface,resulting in multiple accesses to the same data.Unreasonable use of threads causes thread deadlocks to occur.Based on the above reasons,this article will manage the creation and destruction of threads through the thread pool,and cache the data to achieve the purpose of optimizing network performance.Through the above methods,this article effectively protects the communication security of the system,and makes reasonable optimization of memory and network requests.Therefore,the electric bicycle rental system designed in this paper has the advantages of high security,smooth running,and so on. |