Interactive noise self-prior perception and analysis system for smartphones

Interactive self-prior perception through smartphones, using adaptive noise data compression and coarse-grained audio modal evaluation technology, solves the problems of data redundancy and high energy consumption in noisy environment data collection systems, and achieves high efficiency of noise data Acquisition and accurate reconstruction, suitable for large-scale noise monitoring and analysis.

CN114745465BActive Publication Date: 2024-08-27SHENZHEN NOVOL DIGITAL CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210296620.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-24
Publication Date
2024-08-27
Estimated Expiration
2042-03-24

AI Technical Summary

Technical Problem

Existing noise environment data collection systems require a large number of sensor devices when the monitoring range is expanded, which increases overhead and makes it difficult to achieve fine-grained monitoring. Moreover, the interactive sensing system suffers from data redundancy, high energy consumption, low data accuracy, and insufficient personal privacy protection. problem.

Method used

Using smartphones for interactive self-prior perception data collection and reconstruction, through coarse-grained audio modal dynamic assessment and adaptive noise data compression technology, a small amount of noise data is used to reconstruct environmental noise information, and client and server systems are designed to realize noise Data visualization and processing ensure data credibility and privacy.

Benefits of technology

It effectively reduces the amount of data collection, improves the accuracy and collection efficiency of noise data, reduces equipment energy consumption, realizes the visualization of noise monitoring and analysis, and is suitable for large-scale applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114745465B
    Figure CN114745465B
Patent Text Reader

Abstract

This application proposes a data collection and reconstruction method based on interactive self-prior perception of smartphones. In view of the problems of data redundancy and high energy consumption in the processing process in the interactive perception system, it is proposed to integrate self-prior perception into the interactive perception noise detection system, and use a small amount of noise data to reconstruct the entire environmental noise data information, effectively reducing the amount of data collection. In order to improve the accuracy of the collected data, before collecting the noise data, a coarse-grained audio modal dynamic evaluation method is proposed to speculate on the application scenarios of participants in the perception task process; an environmental noise interactive perception system is designed and implemented, which solves the redundancy of noise data, ensures the credibility of data, protects personal privacy, and improves the collection efficiency. Participants can intuitively obtain the noise distribution in a specific area through heat maps, which plays a huge role in noise monitoring and analysis.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to an interactive noise perception analysis system for a smart phone, and in particular to an interactive noise self-prior perception analysis system for a smart phone, belonging to the technical field of interactive noise perception analysis. Background Art

[0002] As smartphones become more and more widely used, a new method of perceptual data collection has emerged, which is to complete perception tasks through different individuals together - interactive perception. Participants collect and store data that meets the requirements of the perception task through the sensors on their smartphones, and then process the collected data and push it to the server. The server will integrate and analyze all uploaded data to obtain the corresponding results. Finally, the results of the analysis are fed back to the participants for use. At present, interactive perception has been applied to a certain extent, such as driving route planning and environmental pollution monitoring.

[0003] Interactive perception can be seen as an extension and expanded application of wireless sensor networks. The theory and technology of wireless sensor networks are relatively mature, but there is still a certain distance to go before they can be widely used in urban perception. This includes the networking cost and price of sensor networks, which limit their large-scale application. In addition, the types of sensors deployed in sensor networks have a strong application relevance, and therefore lack flexibility and reusability for applications of different perception types.

[0004] Compared with wireless sensor networks, interactive sensing has the following characteristics: First, the deployment of interactive sensing nodes can be static or dynamic, and the sensing range can be flexibly adjusted according to different sensing tasks. Second, interactive sensing is people-centered. Participants are not only providers of sensing data, but also share the results of data shared by other participants. The entire sensing scale and demand are constantly changing with the changes in human needs.

[0005] In the interactive perception process, the entire data processing process is very important. The data processing process is mainly divided into four parts: data collection, data analysis, data upload and data push.

[0006] The side effects of noise pollution cannot be underestimated. It not only harms hearing, but also affects other physiological tissues of the human body. With the rapid growth of urban population and industrial manufacturing scale, noise pollution has also attracted more and more widespread attention. Effective and scientific real-time monitoring of noise pollution has become more meaningful.

[0007] In order to more accurately monitor noise pollution in real time, it is necessary to know the distribution of noise in time and space. The intensity of noise changes in real time. The noise intensity may vary greatly at the same location at different times. Use noise maps to display the distribution of noise. It depicts the noise distribution of a geographical area on the map, reflecting the changes of noise over time and space. Establish a real-time noise map to show the strength of noise at each location within a certain range, and update it in real time, providing data and information for the management of noise pollution in a region, which is also an important part of the digital city. It is of great significance to the environmental governance of the city and the noise analysis of the region.

[0008] In the existing environmental data collection systems, most of them need to pre-set sensor nodes. They need to pre-set sensor nodes near the existing standard noise meter, calibrate the noise data, and transmit the acquired data to the server through the sensor network. Finally, the server terminal draws a noise distribution map for participants to use. Most of the existing environmental data collection systems face the problem of deploying a large number of sensor devices when the monitoring range becomes larger, which undoubtedly increases the overhead and it is also very difficult to achieve fine-grained monitoring. In addition, during the monitoring process, it is difficult to dynamically change the monitoring range and monitoring data type.

[0009] Interactive perception is a new way of perception. Similar concepts include crowdsourcing and crowd intelligence perception. They all use participants' handheld mobile devices to actively or passively collect information about the surrounding environment to achieve the purpose of perception. Interactive perception systems are divided into three categories according to the different types of perception and the different ranges of perception: public perception, social perception, and personal perception.

[0010] In the data collection of existing interactive perception systems, there are mainly the following types of centralized data collection: some systems directly let all participants upload information, and there is a lot of redundancy in collection, transmission and storage, which is not conducive to encouraging participants to participate, and is not suitable for large-scale applications. Some systems analyze from the perspective of the similarity of the movement trajectories of participants and the fairness of allocating perception tasks, and propose to maximize the collection efficiency of the system while minimizing the energy consumption of the system, which reduces the energy consumption of the system, but lacks consideration for the data redundancy generated during the collection process. Some interactive perception systems take data redundancy into account. These systems mostly use synchronous communication methods, regard the location of participants as a known condition, and have high requirements for the location and collection capabilities of participants, but lack consideration for the energy consumption of participants' equipment, making it difficult to promote and apply.

[0011] Interactive perception systems and applications are emerging in an endless stream, but they are still far from being put into practical large-scale applications. Due to their many advantages, it can be expected that interactive perception systems can be widely popularized and applied in the future. However, there are still some technical problems that need to be further solved in this field, such as how to solve data redundancy, how to ensure the credibility of data, how to protect personal privacy, and how to improve collection efficiency.

[0012] In summary, the noise collection and analysis system in the prior art still has several problems and defects. The difficulties and problems to be solved in this application are mainly concentrated in the following aspects:

[0013] First, most existing noise environment data collection systems face the problem that when the monitoring range becomes larger, a large number of sensor devices need to be deployed, which undoubtedly increases the overhead and is also very difficult to achieve fine-grained monitoring. In addition, during the monitoring process, it is difficult to dynamically change the monitoring range and monitoring data type. In particular, the deployment cost of noise monitoring wireless sensor networks is very high, application development is inconvenient, and it is impossible to dynamically adjust the monitoring area and assign monitoring tasks. The existing technology lacks a dynamic system that fully utilizes widely used smartphones for noise collection and analysis;

[0014] Second, there are also problems in the application of the interactive perception system of the existing technology to environmental noise collection and analysis: First, directly asking all participants to upload information will result in a large amount of redundancy in collection, transmission and storage, which is not conducive to encouraging participants to participate and is not suitable for large-scale applications; second, there is a lack of corresponding measures from the perspective of the similarity of the movement trajectories of the participants and the fairness of the allocation of perception tasks. The interactive perception system consumes a lot of energy, and there is a lot of data redundancy and high energy consumption in the noise collection process; third, the requirements for the location and collection capabilities of the participants are too high, and there is a lack of consideration for the energy consumption and performance of the participants' equipment; the interactive perception system is still far from actual large-scale application, and it is unable to solve the data redundancy, ensure the credibility of the data, protect personal privacy, and improve the collection efficiency. It is difficult to be promoted and applied in the field of noise environment collection and analysis;

[0015] Third, the existing technology lacks a noise analysis system for environmental perception, and lacks the collection, processing and compressed transmission of noise data based on smartphones. In the system, participants can intuitively obtain the noise distribution of the area they are concerned about in the form of heat maps. Due to the limited resources of smartphone mobile terminals, reducing energy consumption and reducing the amount of data transmission in the entire system are key, but the existing technology does not have effective measures; there is no effective solution to the problems of data redundancy and high energy consumption in the processing process in the interactive perception noise detection system, and it is impossible to use a small amount of noise data to reconstruct the entire environmental noise data information, and the amount of data collected is very large; before collecting noise data, there is a lack of methods to infer the application scenarios of participants in the perception task process, the accuracy of the collected data is low, and the interactive noise data collection and reconstruction are difficult and cannot be promoted to practical applications;

[0016] Fourth, the noise collection and analysis of the existing technology lacks a high-quality interactive perception system for environmental noise, lacks an overall design for the noise collection and analysis system, lacks a client system design, and is unable to complete sensor data acquisition, map service section design, and noise map generation, and lacks a server system design; the client lacks a smart phone equipped with an intelligent operating system to complete the collection and compression of noise data and send the data to the server, and participants cannot view the noise map on their mobile phones; the server lacks a Web service method based on the REST architecture, lacks a method for receiving data sent from the client, processing and reconstructing the data, realizing the processing of interactive perception data and the speculation of the participant status, and finally feeding back the reconstruction results to the client, and cannot realize the visualization of noise data, which is not conducive to intuitively observing the noise amount and distribution at the perception location. Summary of the invention

[0017] This application proposes data collection and reconstruction based on interactive self-prior perception of smart phones for environmental perception. In view of the problems of data redundancy and high energy consumption in the processing process in the interactive perception system, it is proposed to integrate self-prior perception into the interactive perception noise detection system, and use a small amount of noise data to reconstruct the entire environmental noise data information, effectively reducing the amount of data collection. In order to improve the accuracy of the collected data, before collecting the noise data, a coarse-grained coarse-grained audio modal dynamic evaluation method is proposed to speculate the application scenarios of the participants in the perception task process; an environmental noise interactive perception system is designed and implemented. The client uses a smart phone equipped with an intelligent operating system to collect and compress the noise data and send the data to the server. The participants can view the noise map on the mobile phone. The server adopts a Web service method based on the REST architecture, which is responsible for receiving the data sent from the client, processing and reconstructing the data, and finally feeding back the reconstruction results to the client, solving the redundancy of noise data, ensuring the credibility of the data, protecting personal privacy, and improving the collection efficiency. In the system, participants can intuitively obtain the noise distribution of the area they are concerned about in the form of a heat map, which has great practical significance and broad application prospects for noise monitoring and analysis;

[0018] In order to achieve the above technical effects, the technical solutions adopted in this application are as follows:

[0019] Smartphone interactive noise self-priori perception and analysis system, oriented to environmental perception, is based on the interactive noise analysis of smartphones, and applies self-priori perception to the interactive perception system. Through the design and development of smartphones and servers, the collection, processing and compressed transmission of noise data are realized. In the system, participants can intuitively obtain the noise distribution of the area they are concerned about in the form of heat maps, realizing an interactive self-priori perception noise detection system.

[0020] First, interactive self-prior sensing data collection and reconstruction, including: first, interactive noise data collection, second, adaptive noise data compression, and third, noise self-prior reconstruction;

[0021] Before collecting noise data, a coarse-grained audio modal dynamic evaluation method is proposed to infer the application scenarios of participants in the perception task process, so as to improve the accuracy of the collected data; based on the problems of redundant noise data and high energy consumption in the processing process in the interactive perception system, it is proposed to integrate self-prior perception into the interactive perception noise detection system, and use a small amount of noise data to reconstruct the entire environmental noise data information, so as to reduce the amount of data collected;

[0022] Second, design and implement an environmental noise interactive perception system, which includes the overall system design, client system design, including sensor data acquisition, map service module design, noise map generation, and server system design;

[0023] The client uses a smart phone equipped with an intelligent operating system to collect and compress noise data and send the data to the server, where participants can view the noise map on their mobile phones. The server uses a Web service based on the REST architecture to receive data sent from the client, process and reconstruct the data, realize the processing of interactive perception data and the inference of the participant's status, and finally feed back the reconstruction results to the client.

[0024] Smartphone interactive noise self-priori perception analysis system, further, interactive noise data collection: coarse-grained audio modal dynamic evaluation of smartphone usage scenarios and usage methods, participants are divided into static and dynamic types according to their motion state, and divided into closed space and open space according to the space where the participant's mobile phone is located. If the mobile phone is placed in a drawer indoors, it is considered to be a closed space in a static state. The noise data collected by the mobile phone is relatively small and cannot truly reflect the real-time noise data. In this state, the data reliability is low; when the participant is in motion and the mobile phone is exposed outdoors, if the participant uses a high acquisition frequency, it can better reflect the noise data of spatiotemporal characteristics and avoid the appearance of discrete and uninterrupted acquisition areas;

[0025] When determining the motion state of the mobile phone, the accelerometer in the mobile phone is used. The mobile phone accelerometer obtains the acceleration data changes in the three moving directions of the mobile phone, where the X-axis represents the acceleration in the left and right moving directions, the Y-axis represents the acceleration in the front and back moving directions, and the Z-axis represents the acceleration in the vertical moving direction; when the participant carrying the smart mobile terminal device is in motion, the acceleration of the three axes has a certain change, but the change pattern is not obvious, and when the motion posture is different, the acceleration change pattern of each axis is different. If the acceleration change on each axis is analyzed, it is bound to increase the complexity of the algorithm. This application introduces a new acceleration intensity vector CNU as a feature quantity:

[0026]

[0027] a x ,a y ,a z They are accelerations in three directions. The CNU feature quantity is used to avoid the complexity of analyzing the accelerations on three axes. Regardless of the motion state, the value of CNU will change greatly. CNU is used as the basis for judging the motion state.

[0028] When the participant is in a certain state of motion, CNU has a process of changing from a minimum value to a maximum value. When the participant is in a stationary state, the CNU area is stable and its size is between one gravitational acceleration g. This application sets 1.1g as the critical value for discrimination and calculates the average CNU of the participant 3 seconds after the start of the perception task. When CNU < 1.1g, the participant is in a stable state; when CNU ≥ 1.1g, the participant is in a state of motion;

[0029] When determining whether the mobile phone is in a closed space, the data read by the optical pulse proximity sensor is used to determine the space where the mobile phone is located, and values[0] is used to obtain parameters. When the distance is less than 1.6 cm, the value of values[0] is 0, and when the distance is greater than or equal to 1.5 cm, the value of values[0] is 5;

[0030] Analyze the data collected by the acceleration sensor and the optical pulse proximity sensor, make a rough estimate of the usage scenarios of the participants, and use this as a basis to filter the noise data provided by the participants;

[0031] The noise level is assessed on the mobile phone. When the client software is started, the microphone on the mobile phone senses the surrounding sound and calculates the decibel value. At the same time, the software obtains the current location information, i.e., longitude and latitude, and the current time through positioning, i.e., a triplet (timestamp, longitude and latitude, decibel value). This triplet is stored in the mobile phone to obtain a noise data record. The mobile phone only measures the size of the surrounding noise data without recording the sound around the participant. The recording file is not saved to protect the privacy of the participant.

[0032] The noise information is collected based on the participant's position. A target area G is selected and divided into N parts. Each part is a noise measurement unit. The data information x obtained in each noise measurement unit is i (i∈{1,2,3,…,N}) is converted into a vector form to represent the noise pollution in this target area:

[0033] x=(x1,x2,...x N ) T Formula 2

[0034] x is the complete data set, and the initial data x is reconstructed based on incomplete and random measurement data.

[0035] Smartphone interactive noise self-prior perception analysis system,Further, adaptive noise data compression: within a certain time period T, the participant collects noise data in the area required by the perception task, and the participant collects a string of data v s ,v sIt only contains part of the noise measurement data, namely the noise decibel value, location data information, and time cutoff information. First, v s Encoded into an M-dimensional vector y s ,y s =B s v s , where the observation matrix B s Setting: B s The middle is a M×L s The observation matrix contains only three elements: -1, 0, and 1, k'≈100:

[0036]

[0037] Observation matrix B s A pseudo-random number generator is used on each participant's mobile phone. The participant's mobile phone uses the generated observation matrix to reduce the dimension of the collected data. Only the vector after dimension reduction is sent to the server, which reduces the transmission traffic. During reconstruction, the server only needs the same pseudo-random number generator as the mobile phone. The observation matrix can be generated on the server and is consistent with the mobile phone.

[0038] If we add up the data from all n participants, we get y * =B * x * , where x * All v s The superposition of:

[0039]

[0040]

[0041] B * is a P×Q sparse sampling matrix, There are overlapped and missing data in x'. To restore the original x, we need to sort B in the order of the elements in x. * Rebuild so that:

[0042] y=CE=BGx Formula 6

[0043] Among them, C is the perception matrix and E is the sparse representation of x on the discrete cosine transform matrix G.

[0044] Smartphone interactive noise self-prior perception and analysis system,Furthermore, the specific steps of noise self-prior reconstruction are as follows:

[0045] Definition: Input: observation basis B, observation noise y, sparsity k,

[0046] Output: The noise signal s reconstructed by k-sparseness of x;

[0047] Initialization: residual of observed noise r0=y, reconstructed signal s0=0, index set T n =T n-1 ∪{k}, number of iterations n = 0;

[0048] Step 1: Calculate the inner product g of the residual of the observation noise and each column of the observation basis B n =B T r n-1 ;

[0049] Step 2: Find g n The largest element in, j = argmax | g n [i]|;

[0050] Step 3: Update the index set T n =T n-1 Y[j] and the index observation basis B T ,Y[*] is the index update function;

[0051] Step 4: Use the least squares method to find the approximate solution x n =(B T T ,B T ) -1 B T T y;

[0052] Step 5: Update the residual of the observation noise, r n =y-Gs n , where the number of iterations n = n + 1, G is the discrete cosine transform matrix;

[0053] Step 6: If n>k and the convergence condition is met, stop the iteration, s r =s n , r=r n , output s r ,s n , otherwise go to the first step;

[0054] Given a discrete K sparse signal X, where the length N of the signal X varies, each curve represents a different N value, taking N = 50, 100, 500, the normalized sparsity of the noise signal X is s = k / n = 0.1, the oversampling rate c is the ratio of the number of noise measurements M to the sparsity k of the noise signal, and the observation matrix uses a random Gaussian matrix.

[0055] Smartphone interactive noise self-priori perception and analysis system,Further, the overall design of the system: the smartphone obtains the noise decibel value, location information and time information, which are uploaded to the server through the communication module. At the same time, the noise information obtained by the participant is displayed in real time. After the participant sends a request, the server feeds back the collected noise data to the participant, which is displayed in the form of a noise map on the client. The server sends and receives data through the communication module and processes the data through the data management module;

[0056] Based on smartphones, noise data is acquired and visualized through embedded sensors. The server side serves as the data processing center of the system, and is mainly responsible for data reception, storage, and other necessary processing on the server side. The data collected by participants are concentrated on the server side for noise self-prior reconstruction. The server uses a data management module to communicate with the MySQL cluster.

[0057] Smartphone interactive noise self-priori perception analysis system,Further, the client system design: using smart phones to complete data collection, storage, and upload, the client mainly includes: first, the collection of perception data, including noise information, positioning information, acceleration sensor information, proximity sensor information, and timestamp information; second, communication with the server, the client sends the acquired data information to the server, and receives the feedback results from the server; third, data visualization, through the heat map method, the noise data fed back to the client by the server is visualized, so that participants can intuitively observe the surrounding noise distribution;

[0058] Smartphones support the use of device sensors, provide drivers to manage sensor hardware, and monitor changes in the external environment perceived by sensor hardware through listeners. The specific steps for developing smart sensors are as follows:

[0059] Step 1: Get sensor services: The participant clicks the "Start Collection" button to trigger the collection process, and the application initializes the Sensor Manager;

[0060] Step 2: Get the specified type of sensor: Select the sensor to be used, use Sensor Manager to get the specified sensor to be monitored and add it;

[0061] Step 3: Register the listener: After acquiring the sensor, use Sensor Manager to add a registered listener for the target sensor. When the sensor senses changes in the environment, the listener returns the sensor value. At the same time, set the frequency of sensor collection in the listener.

[0062] Step 4: Data calculation and storage: After obtaining the sensor data, the sensor data is processed and persistently stored;

[0063] The client's noise detection uses the microphone sensor in the mobile phone. The unit of sound intensity is dB. The calculation formula for obtaining noise intensity data is as follows:

[0064]

[0065] P rms is the measured sound pressure, P ref is the sound pressure of the reference value;

[0066] The third-party map API is used to obtain the location information of participants on the noise detection system client. The specific process of obtaining longitude and latitude information is as follows:

[0067] 1) Download the third-party map SDK and prepare for XML configuration:

[0068] 2) Set the positioning conditions, setOpengps to open positioning, and setCoorType to return the coordinate type of the value;

[0069] 3)Register the listener registerLocationListener;

[0070] 4) Use StringBuffer to store the acquired data, getTime to get time, getLatitude to get latitude, and getLongitude to get longitude;

[0071] 5) Send a request, the listener works, and obtains time and longitude and latitude data;

[0072] The heat map included in the third-party map is used to represent the noise distribution. The noise information heat map display is implemented as follows:

[0073] 1) Use setMapStatus() to set the map status;

[0074] 2) Add a heat map in addHeatMap() to get the data List <data>And the heat map construction method publicHeat Map.Builderdata():

[0075] 3) Use List <data>The getLocations() method gets the data in the JSONArray. This method waits to be called in addHeatMap().

[0076] 4) The mobile phone sends a request to the server;

[0077] 5) Display noise map on mobile phone;

[0078] 6) Method to delete heat map: heatmap.removeHeatMap().

[0079] Smartphone interactive noise self-priori perception and analysis system,Further, sensor data acquisition: the core sensor data collection module is Sensor Data Collection,,proximity sensor, accelerometer, adopts Sensor EventListener listening interface to realize sensor real-time data acquisition,,adopts the Location Listener listening interface of third-party map to realize real-time geographic location information acquisition,,adopts d BSensor class to record sound to obtain the maximum amplitude;

[0080] (1) Initialize SensorManager by getting System Service (Context.SENSOR_SERVICE);

[0081] (2) Get the acceleration sensor data through get Default Sensor (Scnsor.TYPE_ACCELEROMETER);

[0082] (3) Register a listener to obtain data in real time, register Listener(listener, sensor, SensorManager.SENSOR_DELAY_NORMAL);

[0083] (4) Override the on Sensor Changed(Sensor Event event) method to obtain sensor data. The returned data structure is the event.values[] array.

[0084] (5) After the sensor object is used, the stop() method is used to release the sensor resources and cancel the sensor listening service, sensor Manager.unregister Listener (Sensor Event Listener listener);

[0085] Code implementation process for obtaining noise intensity: Use the startRecord() method of MediaRecorderDemo to implement noise recording, and the stopRecord() method to end noise acquisition. The specific process is as follows:

[0086] 1) Instantiate a MediaRecorder object;

[0087] 2) Set the audio: use setAudioSource() to set the audio source, use setOutputFormat() to set the audio output format, use setAudioEncoder() to set the output encoding method, and use setOutputFile() to set the location of the output file;

[0088] 3) prepare() to prepare for recording;

[0089] 4) start() officially starts recording;

[0090] 5) Call updateMicStatus() to calculate the specific audio intensity, send the value through handler.sendMessage(), and postDelayed() to send it intermittently with delay;

[0091] The calculation code of updateMicStatus() in process 5) is as follows: db = (int)((20×Math.log1O(ratio))×0.7), where 0.7 is multiplied to reduce the impact of extreme noise on the data, and type coercion is used to convert the double type into the int type;

[0092] Message is used to transmit message.what and message.obj data to handler. The former contains the transmitted code identifier, and the latter is the specific value of the noise intensity. handleMessage is used to receive data in MainActivity. Among them, switch(msg.what) judges the msg.what identifier. If the judgment is correct, setText(msg.obj.toString()) is used to convert the specific value in msg.obj into a string type and then display it. The Runnable() interface and handler.postDelayed() are used to implement the timer function. The entire updateMicStatus() is run intermittently to realize the timed update of data.

[0093] Smartphone interactive noise self-prior perception analysis system, further, map service section design: the specific process of map information acquisition:

[0094] 1) Setting up the third-party map usage environment: first register with the third-party map developer, then obtain the key, and download the jar package of the corresponding adopted function, put the jar package into the lib file of the software, perform update import in the software, and then add the corresponding permissions and keys in manifest.XML to complete the development environment setting;

[0095] 2) Create LocationService.java and set up third-party call related methods: it includes registerListener() and unregisterListener() to register and unregister third-party maps, as well as start() and stop() methods to implement positioning delegation;

[0096] 3) Create LocationApplication.java to initialize positioning and serve as the initial entry point for calling the map;

[0097] 4) Main interface noise detection, use setOnClickListener() to monitor it, map positioning is performed when pressed, and positioning is stopped when pressed again;

[0098] Create a new BDLocationListener in ManActivtyjava, in which onReceiveLocation() is used to receive positioning information, receiving a string type buffer StringBuffer, and then using location.getTime() to get the positioning time, location.getLatude() and location.getLongtitude() to get the longitude and latitude, and use location.getAddStr() to get the location information. After getting the positioning time and longitude and latitude information, store them locally and wait to be sent to the server. The positioning time and positioning location information are displayed in real time on the interface.

[0099] Interactive noise self-priori perception analysis system for smartphones. Further, the generation of noise maps: the noise map uses the heat map API provided by third-party maps, and displays the noise in the form of heat maps by customizing heat maps. The HeatMap.Builder constructor is used to complete custom tasks and realize the visualization of noise data. The following is the process of generating a custom heat map:

[0100] 1) Through List <latlng>The getLocations() method obtains the noise data sent by the server, obtains the input data stream through Scanner(inputStream), stores the String type data in arry, then traverses the array to obtain the longitude and latitude and noise values, and then puts the obtained data into list list.add(new LatLng(lat,Ing,noi));

[0101] 2) Create a new addHeatMap() method and add it to Thread(), and use the interface run() to call getLocations() to obtain server data, and use the heat map constructor HeatMap.Builder to set the data to be drawn, and use List <latlng>data = getLocations();

[0102] 3) After completing the settings, use build() to construct the heat map and use sendEmptyMessage(0) to send the value to handleMessage(Messagemsg) in the builder. After handleMessage confirms that it has received 0, use addHeatMap(heatmap) to add the heat map to complete the addition and display of the heat map.

[0103] Smartphone interactive noise self-priori perception analysis system,Further, the server-side system design: the server-side, as the data processing center, completes the analysis of the participant's usage scenario and the data communication with the mobile terminal, completes the data reception, storage and necessary processing required on the server side, the server-side adopts the REST architecture, and the server-side interface uses the URL as the resource identifier to communicate with the client;

[0104] MySQL is used as the system database. The information data layer consists of two parts: database and database access layer. The database access layer complies with JPA specifications when performing data storage, modification, and deletion operations.

[0105] The business layer of the Web server side consists of service interface, implementation and entity layer. The Web layer consists of two parts. The first part is the service portal layer, and the second part is the Web service layer. The former is responsible for the interface, and the latter is for the data request of the mobile client.

[0106] The server-side participant usage scenario is inferred, considering the movement state and physical position of the smartphone during the participant's collection process, using proximity sensors and linear acceleration sensors, using acceleration sensors to determine the participant's movement state and using proximity sensors to determine the state of the phone.

[0107] Compared with the prior art, the innovations and advantages of this application are:

[0108] First, this application applies widely used smartphones to noise monitoring, and proposes an interactive perception that completes data collection through different individuals. Participants collect and store data that meets the requirements of the perception task through smartphone sensors, and then process the collected data and push it to the server. The server will integrate and analyze all uploaded data to obtain the corresponding results. The deployment of perception nodes in this application can be static or dynamic, and the perception range can be flexibly adjusted according to different perception tasks; participants are both providers of perception data and can share the results brought by data shared by other participants. The entire perception scale and demand are constantly changing with changes in people's needs. Accurately obtain the distribution of noise in time and space, use noise maps to display the distribution of noise, and depict the noise distribution of a geographical area on the map to reflect the changes in noise over time and space. Establish a real-time noise map to show the strength of noise at each location within a certain range, and update it in real time, accurately monitor noise pollution in real time, and provide data and information for the governance of noise pollution in a region. It is also an important part of the digital city;

[0109] Second, the interactive noise self-prior perception and analysis system has the following advantages: First, in the process of collecting data, only a small amount of noise data information needs to be collected to reconstruct the global data information, compress the signal collection end, and hand over the complex data restoration part to the server for processing, which can reduce the energy consumption of the collection terminal; second, self-prior perception directly collects data, and the collection frequency is relatively low, so that the energy consumption of the sampling equipment can be reduced, and the requirements for transmission bandwidth can be reduced; third, it is safe, because self-prior perception is a self-prior to the data collected by the participants in the interactive perception system. The self-prior process is often completed through a random observation matrix, and the data after self-prior is transmitted to the server. If the data is intercepted during the transmission process, it is impossible to obtain the data collected by the participants through reverse decompression. It has important value in applying it to noise perception of smartphones;

[0110] Third, this application proposes data collection and reconstruction based on interactive self-prior perception of smart phones for environmental perception. In view of the problems of data redundancy and high energy consumption in the processing process in the interactive perception system, it is proposed to integrate self-prior perception into the interactive perception noise detection system, and use a small amount of noise data to reconstruct the entire environmental noise data information, effectively reducing the amount of data collection. In order to improve the accuracy of the collected data, before collecting the noise data, a coarse-grained audio modal dynamic evaluation method is proposed to speculate on the application scenarios of the participants in the perception task process. The feasibility and efficiency of the algorithm are proved through simulation experiments, and the collection, processing and compressed transmission of noise data are realized. In the system, participants can intuitively obtain the noise distribution of the area they are concerned about in the form of heat maps, which has great practical significance and broad application prospects for noise monitoring and analysis.

[0111] Fourth, this application designs and implements an interactive environmental noise perception system. The client uses a smart phone equipped with an intelligent operating system to collect and compress noise data and send the data to the server. Participants can view the noise map on their mobile phones. The server uses a Web service based on the REST architecture to receive data sent from the client, process and reconstruct the data, and finally feed back the reconstruction results to the client. This solves the redundancy of noise data, ensures the credibility of data, protects personal privacy, and improves collection efficiency. The visualization of noise data is achieved in the form of a heat map, so that participants can intuitively observe the amount and distribution of noise at the perception location, which is convenient for further analysis and application. BRIEF DESCRIPTION OF THE DRAWINGS

[0112] Figure 1 This is a classification diagram of the classification and analysis of smartphone usage status.

[0113] Figure 2 This is a layered comparison diagram of OSI, TSQ / IP and underwater acoustic communication network architecture.

[0114] Figure 3 It is a waveform diagram of the changes in CNU during a human body movement.

[0115] Figure 4 It is a schematic diagram of the original data of the self-prior perception simulation and performance experiment.

[0116] Figure 5 It is the result of the original image being processed by DCT to remove the absolute value and do descending processing.

[0117] Figure 6 It is the observation matrix diagram generated by the position information of the participants during the collection process.

[0118] Figure 7 This is a schematic diagram of the reconstructed data results when the number of participants is different.

[0119] Figure 8 This is the overall block diagram of the interactive noise self-prior perception analysis system for smartphones.

[0120] Fig. 9 This is the client design flow chart of the smartphone interactive noise self-prior perception analysis system.

[0121] Fig.10 It is a flow chart for obtaining, processing and displaying noise information from a priori perception.

[0122] Fig.11 It is a flowchart of self-prior perception noise information acquisition and termination.

[0123] Fig.12 It is the client noise heat map generation flow chart.

[0124] Fig.13 It is a flow chart that combines the two parts to speculate on the usage scenarios of participants.

[0125] Fig.14 This is a schematic diagram of the experimental scene in the fifth part.

[0126] Fig.15 This is the App interface of the noise analysis system participant’s mobile phone.

[0127] Fig.16 This is an example of some noise data collected by participant A in the morning.

[0128] Fig.17 This is an example diagram of the noise distribution in the morning period drawn in the experiment. Specific implementation methods

[0129] The following, in conjunction with the accompanying drawings, further describes the technical solution of the interactive noise self-prior perception analysis system for a smartphone provided by the present application, so that those skilled in the art can better understand the present application and implement it.

[0130] Compared with wireless sensor networks, interactive sensing systems have attracted much attention and have great application value because of their low deployment cost, convenient application development, and the ability to dynamically adjust the sensing area and assign sensing tasks.

[0131] This application proposes a noise interactive perception and analysis system based on smartphones for environmental perception, which realizes the collection, processing and compressed transmission of noise data. In the system, participants can intuitively obtain the noise distribution of the area they are concerned about in the form of heat maps.

[0132] In order to solve the problems of data redundancy and high energy consumption in the processing process in the interactive perception system, it is proposed to integrate self-prior perception into the interactive perception noise detection system, and use a small amount of noise data to reconstruct the entire environmental noise data information, effectively reducing the amount of data collection. In order to improve the accuracy of the collected data, before collecting noise data, a coarse-grained audio modal dynamic evaluation method is proposed to speculate on the application scenarios of participants in the perception task process. Finally, the feasibility of the algorithm is demonstrated through simulation experiments.

[0133] Finally, an interactive environmental noise perception system was designed and implemented. The client uses a smart phone equipped with an intelligent operating system to collect and compress noise data and send the data to the server. Participants can view the noise map on their mobile phones. The server uses a Web service based on the REST architecture to receive data sent from the client, process and reconstruct the data, and finally feed back the reconstruction results to the client.

[0134] 1. Data Acquisition and Reconstruction of Interactive Self-Prior Perception

[0135] Interactive perception systems have many advantages, but also many shortcomings. For smartphone mobile terminals, due to their limited resources, reducing energy consumption and reducing the amount of data transmission in the entire system are key. The initial signal can be accurately restored by a small number of linear projections, and data reconstruction is completely handed over to the server, which reduces the energy consumption of the participants' mobile phones and also reduces the amount of data transmission.

[0136] 1. Interactive noise data collection

[0137] Based on the fact that different usage scenarios and usage methods of smartphones will affect the authenticity, reliability and practicality of data, this application proposes to conduct a coarse-grained audio modal dynamic evaluation of the usage scenarios and usage methods of smartphones to improve the quality of the collected data and achieve the purpose of screening data. The classification and analysis of the mobile phone usage status is as follows: Figure 1 As shown: According to the movement state of the participants, the participants are divided into static and dynamic types, and according to the space where the participants' mobile phones are located, they are divided into closed space and open space. For example, if the mobile phone is placed in a drawer indoors, it is considered to be a closed space in a static state. The noise data collected by the mobile phone is relatively small and cannot truly reflect the real-time noise data. Therefore, the data reliability is low in this state; when the participants are in motion and the mobile phone is exposed outdoors, if the participants use a high collection frequency, it can better reflect the noise data of the spatiotemporal characteristics and avoid the appearance of discrete and uninterrupted collection areas.

[0138] When determining the motion state of the mobile phone, the acceleration sensor in the mobile phone is used, such as Figure 2 As shown, the mobile phone acceleration sensor obtains the acceleration data changes in the three moving directions of the mobile phone, where the X-axis represents the acceleration in the left and right moving directions, the Y-axis represents the acceleration in the front and back moving directions, and the Z-axis represents the acceleration in the vertical moving direction.

[0139] When a participant carrying a smart mobile terminal device is in motion, the acceleration in the three directions changes significantly. During the motion process, the acceleration of the three axes changes to a certain extent, but the change pattern is not obvious, and the acceleration change pattern of each axis is different when the motion posture is different. If the acceleration change on each axis is analyzed, the complexity of the algorithm will inevitably increase. Therefore, this application introduces a new acceleration intensity vector CNU as a feature quantity.

[0140]

[0141] a x ,a y ,a z They are accelerations in three directions respectively. The CNU feature quantity is used to avoid the complexity brought by analyzing the accelerations on the three axes, because no matter what the motion state is, the value of CNU will change greatly. CNU is used as the basis for judging the motion state. Figure 3 It is a waveform diagram of the changes in CNU during a human body movement.

[0142] When the participant is in a certain state of motion, CNU has a process of changing from the minimum to the maximum value. When the participant is in a static state, the CNU area is stable and its size is between one gravitational acceleration g. This application sets 1.1g as the critical value for discrimination and calculates the average CNU of the participant 3 seconds after the start of the perception task. When CNU < 1.1g, the participant is in a stable state. When CNU ≥ 1.1g, the participant is in a state of motion.

[0143] When determining whether the mobile phone is in a closed space, the smartphone optical pulse proximity sensor is used to make the determination. The optical pulse senses the distance between the mobile phone and the human body and is called during a call. When the mobile phone screen is close to the participant's face, the distance between the mobile phone and the human body is automatically measured. When the distance is less than a certain value, the screen will be turned off and no longer receive the participant's touch screen events, effectively preventing accidental touch events during the call. The data read by the optical pulse proximity sensor is used to determine the space where the mobile phone is located. Values[0] is used to obtain parameters. When the distance is less than 1.6cm, values[0] is 0. When the distance is greater than or equal to 1.5cm, values[0] is 5.

[0144] The data collected by the acceleration sensor and the optical pulse proximity sensor are analyzed to make a coarse-grained inference on the usage scenarios of the participants, and based on this, the noise data provided by the participants are screened.

[0145] The noise level is assessed through the mobile phone. When the client software is started, the mobile phone microphone senses the surrounding sound level and calculates the decibel value. At the same time, the software obtains the current location information, i.e., longitude and latitude, and the current time through positioning, i.e., a triplet (timestamp, longitude and latitude, decibel value). This triplet is stored in the mobile phone to obtain a noise data record. The mobile phone only measures the size of the surrounding noise data without recording the sound around the participant. The recording file is not saved to protect the privacy of the participant.

[0146] The noise information is collected based on the participant's position. A target area G is selected and divided into N parts. Each part is a noise measurement unit. The data information x obtained in each noise measurement unit is i (i∈{1,2,3,…,N}) is converted into a vector form to represent the noise pollution in this target area:

[0147] x=(x1,x2,...x N ) T Formula 2

[0148] x is the complete data set, and the initial data x is reconstructed based on incomplete and random measurement data.

[0149] 2. Adaptive Noise Data Compression

[0150] In a certain period of time T, the participants collected noise data in the area required by the perception task. The participants collected a string of data v s ,v s It only contains part of the noise measurement data, namely the noise decibel value, location data information, and time cutoff information. First, v s Encoded into an M-dimensional vector y s ,y s =B s v s , where the observation matrix B s Setting: B s The middle is a M×L s The observation matrix contains only three elements: -1, 0, and 1, k'≈100:

[0151]

[0152] Observation matrix B s A pseudo-random number generator is used on each participant's mobile phone. The participant's mobile phone uses the generated observation matrix to reduce the dimensionality of the collected data. Only the vectors after dimensionality reduction are sent to the server, which can reduce the transmission traffic. During reconstruction, the server only needs the same pseudo-random number generator as the mobile phone. The observation matrix can be generated on the server and consistent with the mobile phone.

[0153] If we add up the data from all n participants, we get y * =B * x * , where x * All v s The superposition of:

[0154]

[0155]

[0156] B * is a P×Q sparse sampling matrix, There are overlapped and missing data in x'. To restore the original x, we need to sort B in the order of the elements in x. * Rebuild so that:

[0157] y=CE=BGx Formula 6

[0158] Among them, C is the perception matrix and E is the sparse representation of x on the discrete cosine transform matrix G.

[0159] 3. Noise self-prior reconstruction

[0160] The specific steps of noise self-prior reconstruction are as follows:

[0161] Definition: Input: observation basis B, observation noise y, sparsity k,

[0162] Output: The noise signal s reconstructed by k-sparseness of x;

[0163] Initialization: residual of observed noise r0=y, reconstructed signal s0=0, index set T n =T n-1 ∪{k}, number of iterations n = 0;

[0164] Step 1: Calculate the inner product g of the residual of the observation noise and each column of the observation basis B n =B T r n-1 ;

[0165] Step 2: Find g n The largest element in, j = argmax | g n [i]|;

[0166] Step 3: Update the index set T n =T n-1 Y[j] and the index observation basis B T ,Y[*] is the index update function;

[0167] Step 4: Use the least squares method to find the approximate solution x n =(B T T ,B T ) -1 B T T y;

[0168] Step 5: Update the residual of the observation noise, r n =y-Gs n , where the number of iterations n = n + 1, G is the discrete cosine transform matrix;

[0169] Step 6: If n>k and the convergence condition is met, stop the iteration, s r =s n , r=r n , output s r ,s n , otherwise go to the first step;

[0170] Given a discrete K sparse signal X, where the length N of the signal X varies, each curve represents a different N value, taking N = 50, 100, 500, the normalized sparsity of the noise signal X is s = k / n = 0.1, the oversampling rate c is the ratio of the number of noise measurements M to the sparsity k of the noise signal, and the observation matrix uses a random Gaussian matrix.

[0171] 4. Self-priori perception simulation and performance analysis

[0172] Simulation scenario and parameter setting: In an area, select 600 measurement units, such as Figure 4 As shown: In a 3km×2km rectangular area, there are 600 100×100m areas, each with a height value, for a total of 600 height values.

[0173] The number of participants was set from 50 to 500, and a random walk model was used to randomly collect data in the target area. The walking speed was set at 0.2 to 2 m / s, and each walking time was 10 to 60 min. The pause time for each participant was 0 to 15 min, and the continuous data collection time was 24 h. Whenever a participant paused, data collection began.

[0174] Before conducting simulation experiments, the initial data is first subjected to sparse transformation to obtain the sparsity of the initial data and determine whether the data can be sparsely represented. The initial data is sparsely represented using DCT.

[0175] After removing the first value, the displayed result is sorted by removing the absolute value and in descending order, and the following is obtained: Figure 5 The results are shown. Figure 5 It can be seen that the values ​​of the initial data are mostly sparse and are 0, which proves that the initial data is sparse. To further obtain the sparsity of the initial data, the data with values ​​less than 500 after the sparse transformation are directly set to 0, and then the inverse transformation is performed. After the inverse transformation, the data has the largest value when the sequence number is 50, and the sparsity of the initial signal is estimated to be k≈50.

[0176] Performance analysis: Participants collect data while walking and collect data at pause points. Participants record their activity trajectories while moving in the area to be detected, and generate projections for the observations in the area during the collection process. That is, during the collection process, when a participant collects a data, the location information of the collection point is also recorded, and the data collected at this location is multiplied by the pseudo-random number generated by the pseudo-random number generator. When the next location data is collected, the above operation is repeated and superimposed with the last collected data. This process is performed until the data collection is completed, realizing the self-priority of the data at the collection end. The data sent by the participant to the server only includes the location information and the data information after the self-priority, reducing data redundancy. The observation matrix generated by the participant from the location information during the collection process is as follows: Figure 6 As shown, each location where a pseudo-random number generator generates a pseudo-random number is also the location where the participant collects data. The observation matrix performs a priori analysis on the data collected by each participant, and then projects the data from high dimension to low dimension, thereby reducing redundancy in the data transmission process.

[0177] The noise self-prior reconstruction result is as follows Figure 7 As shown, the reconstruction results when 50 to 500 participants are respectively given. In order to visually observe the comparison between the reconstructed results and the initial data, the reconstructed results are also drawn into a topographic map. Figure 7 The reconstructed data results are shown when the number of participants is different. When the number of participants is around 250, the reconstructed results are generally similar to the original dataset.

[0178] Figure 7 It is just a rough comparison of the reconstructed data and the initial data. The following introduces error analysis, and uses relative error to define the difference between the restored data set x^ and the initial data set x used: the larger the relative error, the worse the quality of the reconstructed signal, otherwise, it proves that the quality of the reconstructed signal is good. The expression of relative error is:

[0179]

[0180] When 250 participants are needed, the relative error ε is less than 0.025, that is, within the allowable error range, only 250 participants are needed, each participant providing one data to reconstruct the overall data in the entire noise measurement area.

[0181] The above simulation results verify that when the interactive self-prior perception data acquisition and reconstruction system is used, a small number of participants can be used to reconstruct the entire required noise data through the reconstruction algorithm without obtaining the information of each measurement unit, and the error can also be controlled within the allowable range with high accuracy.

[0182] 2. Overall system design

[0183] The smartphone obtains the noise decibel value, location information and time information, which are uploaded to the server through the communication module. At the same time, the noise information obtained by the participant is displayed in real time. After the participant makes a request, the server will feed back the collected noise data to the participant, which is displayed in the form of a noise map on the client. The server sends and receives data through the communication module and processes the data through the data management module.

[0184] Based on smartphones, noise data is acquired and visualized through embedded sensors. The server side is the data processing center of the system, which mainly receives and stores data and performs other necessary processing on the server side. The data collected by participants are concentrated on the server side for noise self-prior reconstruction. The server uses the data management module to communicate with the MySQL cluster. The entire system is as follows: Figure 8 shown.

[0185] 3. Client System Design

[0186] Smartphones are used to complete data collection, storage, and upload. The client mainly includes: first, the collection of sensor data, including noise information, positioning information, acceleration sensor information, proximity sensor information, and timestamp information; second, communication with the server, the client sends the acquired data information to the server, and receives the feedback results from the server; third, data visualization, through the heat map method, the noise data fed back from the server to the client is visualized, so that participants can intuitively observe the surrounding noise distribution. The flowchart of the entire client design is as follows Fig. 9 shown.

[0187] Smartphones support the use of device sensors, provide drivers to manage sensor hardware, and monitor changes in the external environment perceived by sensor hardware through listeners. The specific steps for developing smart sensors are as follows:

[0188] Step 1: Get sensor services: The participant clicks the "Start Collection" button to trigger the collection process, and the application initializes the Sensor Manager.

[0189] Step 2: Get the specified type of sensor: Select the sensor to be used, use Sensor Manager to get the specified sensor to be monitored and add it;

[0190] Step 3: Register the listener: After acquiring the sensor, use Sensor Manager to add a registered listener for the target sensor. When the sensor senses changes in the environment, the listener returns the sensor value. At the same time, set the frequency of sensor collection in the listener.

[0191] Step 4: Data calculation and storage: After obtaining the sensor data, the sensor data is processed and persistently stored;

[0192] The client's noise detection uses the microphone sensor in the mobile phone. The unit of sound intensity is dB. The calculation formula for obtaining noise intensity data is as follows:

[0193]

[0194] P rms is the measured sound pressure, P ref is the reference sound pressure (20 μPa), and the steps for starting and terminating noise data collection are as follows: Fig.10 and Fig.11 shown.

[0195] The third-party map API is used to obtain the location information of participants on the noise detection system client. The specific process of obtaining longitude and latitude information is as follows:

[0196] 1) Download the third-party map SDK and prepare for XML configuration:

[0197] 2) Set the positioning conditions, setOpengps to open positioning, and setCoorType to return the coordinate type of the value;

[0198] 3)Register the listener registerLocationListener;

[0199] 4) Use StringBuffer to store the acquired data, getTime to get time, getLatitude to get latitude, and getLongitude to get longitude;

[0200] 5) Send a request, the listener works, and obtains time and longitude and latitude data;

[0201] In order to facilitate participants to intuitively view the noise distribution, the heat map contained in the third-party map is used to represent the noise distribution. The noise information heat map display is implemented as follows:

[0202] 1) Use setMapStatus() to set the map status;

[0203] 2) Add a heat map in addHeatMap() to get the data List <data>And the heat map construction method publicHeat Map.Builderdata():

[0204] 3) Use List <data>The getLocations() method gets the data in the JSONArray. This method waits to be called in addHeatMap().

[0205] 4) The mobile phone sends a request to the server;

[0206] 5) Display noise map on mobile phone;

[0207] 6) Method to delete heat map: heatmap.removeHeatMap();

[0208] The noise heat map generation process is as follows Fig.12 shown.

[0209] 1. Sensor data acquisition

[0210] Sensor Data Collection is the core sensor data collection module. It uses the Sensor Event Listener interface to acquire sensor real-time data, the Location Listener interface of the third-party map to acquire real-time geographic location information, and the d BSensor class to record sound and obtain the maximum amplitude.

[0211] (1) Initialize SensorManager by getting System Service (Context.SENSOR_SERVICE);

[0212] (2) Get the acceleration sensor data through get Default Sensor (Scnsor.TYPE_ACCELEROMETER);

[0213] (3) Register a listener to obtain data in real time, register Listener(listener, sensor, SensorManager.SENSOR_DELAY_NORMAL);

[0214] (4) Override the on Sensor Changed(Sensor Event event) method to obtain sensor data. The returned data structure is the event.values[] array.

[0215] (5) After the sensor object is used, the stop() method is used to release the sensor resources and cancel the sensor listening service, sensor Manager.unregister Listener (Sensor Event Listener listener).

[0216] Code implementation process for obtaining noise intensity: Use the startRecord() method of MediaRecorderDemo to implement noise recording, and the stopRecord() method to end noise acquisition. The specific process is as follows:

[0217] 1) Instantiate a MediaRecorder object;

[0218] 2) Set the audio: use setAudioSource() to set the audio source, use setOutputFormat() to set the audio output format, use setAudioEncoder() to set the output encoding method, and use setOutputFile() to set the location of the output file;

[0219] 3) prepare() to prepare for recording;

[0220] 4) start() officially starts recording;

[0221] 5) Call updateMicStatus() to calculate the specific audio intensity, send the value through handler.sendMessage(), and send it with intermittent delay through postDelayed().

[0222] The calculation code of updateMicStatus() in process 5) is as follows: db = (int)((20×Math.log1O(ratio))×0.7), where multiplication by 0.7 reduces the impact of extreme noise on the data. At the same time, such high precision is not required here, and type coercion is used to convert the double type into the int type.

[0223] Message is used to transmit message.what and message.obj data to handler. The former contains the transmitted code identifier, and the latter is the specific value of the noise intensity. handleMessage is used to receive data in MainActivity. Among them, switch(msg.what) judges the msg.what identifier. If the judgment is correct, setText(msg.obj.toString()) is used to convert the specific value in msg.obj into a string type and then display it. The Runnable() interface and handler.postDelayed() are used to implement the timer function. The entire updateMicStatus() is run intermittently to realize the timed update of data.

[0224] (II) Map service section design

[0225] Specific process of obtaining map information:

[0226] 1) Setting up the third-party map usage environment: first register with the third-party map developer, then obtain the key, and download the jar package of the corresponding adopted function, put the jar package into the lib file of the software, perform update import in the software, and then add the corresponding permissions and keys in manifest.XML to complete the development environment setting;

[0227] 2) Create LocationService.java and set up third-party call related methods: it includes registerListener() and unregisterListener() to register and unregister third-party maps, as well as start() and stop() methods to implement positioning delegation;

[0228] 3) Create LocationApplication.java to initialize positioning and serve as the initial entry point for calling the map;

[0229] 4) Main interface noise detection, use setOnClickListener() to monitor it, map positioning is performed when pressed, and positioning is stopped when pressed again.

[0230] Create a new BDLocationListener in ManActivtyjava, in which onReceiveLocation() is used to receive positioning information, receiving a string type buffer StringBuffer, and then using location.getTime() to get the positioning time, location.getLatude() and location.getLongtitude() to get the longitude and latitude, and use location.getAddStr() to get the location information. After getting the positioning time and longitude and latitude information, store them locally and wait to be sent to the server. The positioning time and positioning location information are displayed in real time on the interface.

[0231] 3. Generation of noise maps

[0232] The noise map uses the heat map API provided by the third-party map. The noise is displayed in the form of a heat map by customizing the heat map. The HeatMap.Builder constructor is used to complete the custom task and realize the visualization of the noise data. The following is the process of generating a custom heat map:

[0233] 1) Through List <latlng>The getLocations() method obtains the noise data sent by the server, obtains the input data stream through Scanner(inputStream), stores the String type data in arry, then traverses the array to obtain the longitude and latitude and noise values, and then puts the obtained data into list list.add(new LatLng(lat,Ing,noi)).

[0234] 2) Create a new addHeatMap() method and add it to Thread(), and use the interface run() to call getLocations() to obtain server data, and use the heat map constructor HeatMap.Builder to set the data to be drawn, and use List <latlng>data = getLocations();

[0235] 3) After completing the settings, use build() to construct the heat map and use sendEmptyMessage(0) to send the value to handleMessage(Messagemsg) in the builder. After handleMessage confirms that it has received 0, use addHeatMap(heatmap) to add the heat map to complete the addition and display of the heat map.

[0236] 4. Server System Design

[0237] The server side serves as the data processing center, completing the analysis of the participants' usage scenarios and conducting data communications with mobile terminals, completing data reception, storage, and necessary processing on the server side. The server side adopts the REST architecture, and the server side interface uses URL as the resource identifier to communicate with the client.

[0238] MySQL is used as the system database. The information data layer consists of two parts: database and database access layer. The database access layer complies with JPA specifications when performing data storage, modification, and deletion operations.

[0239] The business layer of the Web server side is composed of service interface, implementation and entity layer. The Web layer is composed of two parts. The first part is the service portal layer and the second part is the Web service layer. The former is responsible for the interface and the latter is for data requests from mobile clients.

[0240] The server-side participant usage scenario inference considers the movement state and physical position of the smartphone during the participant's data collection process, uses a proximity sensor and a linear acceleration sensor, uses an acceleration sensor to determine the participant's movement state, and uses a proximity sensor to determine the state of the smartphone. Fig.13 It shows a flow chart combining the two parts to speculate the usage scenarios of the participants.

[0241] 5. System Experiment and Result Analysis

[0242] 1. Experimental method

[0243] The experimental site selected is the section from the entrance of a college of a certain university to the Guiyuan Restaurant. Fig.14 As shown, the length of this road is about 275m, the width is about 9m, and the area is about 1980m 2 . Five participants were selected. To ensure the same accuracy of the collected data, the participants all used Huawei P40 Pro phones. Data was collected in three time periods, namely 08:15-08:20 in the morning, 10:20-10:25 in the morning, and 17:30-17:35 in the afternoon. The participants collected and recorded data every 3 seconds, and sent the collected data to the server after self-priori processing.

[0244] (II) System display

[0245] like Fig.15 The figure shows the App interface on the participant's mobile phone. When the participant clicks the Start Detection button, the mobile App will automatically remind the participant whether to allow the program to access the microphone and obtain location information. After the participant agrees, the App will begin to obtain the sound data and positioning information around the participant. To ensure the accuracy of the data, the participant is required to expose the phone outdoors, and the participant can check the surrounding noise level in real time.

[0246] The client compresses the collected data and sends it to the server. After the server deploys the web service to the Tomcat server, it queries the wadl description file of the project.

[0247] (III) Analysis of experimental results

[0248] After receiving the noise data information reconstructed by the server on the mobile terminal, the participant constructs the heat map on the client. The construction of the heat map is mainly divided into the following steps:

[0249] (1) Initialize the third-party heat map, establish a basic base map, set the location where the participants start data collection, and set the zoom level of the third-party map to 20;

[0250] (2) Set the gradient colors colors and the starting value startpoints of the gradient colors. The parameters used are 5 color gradients, the color decibels are [0,0,255], [0,255,255], [0,255,0], [255,255,0], [255,0,0], and the starting value of the gradient color is startpoint = {0.45f, 0.55f, 0.65f, 0.95f, 1};

[0251] (3) According to the specific geographical location, the specific noise data is passed in, and then the data required for rendering the heat map is constructed through the WeightedData method according to the size of the passed in data;

[0252] (4) Add and display the heat map, instantiate the Heatmap layer, and use Heatmap.Builder() to construct the layer.

[0253] like Fig.16 and Fig.17 What is shown are some noise examples collected by participant A during the period of 08:15-08:20 in the morning and a noise heat map constructed based on the noise data collected by all participants. The data collected by the participants include time information, longitude and latitude, and the size of the noise data. From the data collected by participant A, it can be seen that the noise decibel values ​​in the detection area during this period are mostly over 50 decibels. It can be seen that the detection area has a large amount of traffic and high noise during this period. From the heat map, it can be seen that the color of the detection area during this period is darker, which corresponds to the specific value detected, and it can be known that this period in this area is the morning rush hour.< / latlng> < / latlng> < / data> < / data> < / latlng> < / latlng> < / data> < / data>

Claims

1. Smartphone interactive noise self-prior perception analysis system, characterized by: Environmental perception is based on the interactive noise analysis of smartphones, and the self-prior perception is applied to the interactive perception system. Through the design and development of smartphones and servers, the collection, processing and compressed transmission of noise data are realized. In the system, participants can intuitively obtain the noise distribution of the area they are concerned about in the form of heat maps, realizing an interactive self-prior perception noise detection system. First, interactive self-prior sensing data collection and reconstruction, including: first, interactive noise data collection, second, adaptive noise data compression, and third, noise self-prior reconstruction; Before collecting noise data, a coarse-grained audio modal dynamic evaluation method is proposed to infer the application scenarios of participants in the perception task process, so as to improve the accuracy of the collected data; based on the problems of redundant noise data and high energy consumption in the processing process in the interactive perception system, it is proposed to integrate self-prior perception into the interactive perception noise detection system, and use a small amount of noise data to reconstruct the entire environmental noise data information, so as to reduce the amount of data collected; Second, design and implement an environmental noise interactive perception system, which includes the overall system design, client system design, including sensor data acquisition, map service module design, noise map generation, and server system design; The client uses a smart phone equipped with an intelligent operating system to complete the collection and compression of noise data, and sends the data to the server, where participants view the noise map on their mobile phones. The server uses a Web service based on the REST architecture to receive data sent from the client, process and reconstruct the data, realize the processing of interactive perception data and the speculation of the participant's status, and finally feed back the reconstruction results to the client. Interactive noise data collection: Conduct a coarse-grained audio modal dynamic evaluation of the usage scenarios and usage methods of smartphones. According to the participants' motion state, the participants are divided into static and dynamic types. According to the space where the participants' mobile phones are located, they are divided into closed space and open space. If the mobile phone is placed in a drawer indoors, it is considered to be a closed space in a static state. The noise data collected by the mobile phone is relatively small and cannot truly reflect the real-time noise data. In this state, the data reliability is low; when the participants are in motion and the mobile phone is exposed outdoors, if the participants use a high acquisition frequency, the noise data with temporal and spatial characteristics can be better reflected to avoid the appearance of discrete and uninterrupted acquisition areas; When determining the motion state of the mobile phone, the accelerometer in the mobile phone is used. The mobile phone accelerometer obtains the acceleration data changes in the three moving directions of the mobile phone, where the X-axis represents the acceleration in the left and right moving directions, the Y-axis represents the acceleration in the front and back moving directions, and the Z-axis represents the acceleration in the vertical moving direction; when the participant carrying the smart mobile terminal device is in motion, the acceleration of the three axes has a certain change, but the change pattern is not obvious, and when the motion posture is different, the acceleration change pattern of each axis is different. If the acceleration change on each axis is analyzed, it is bound to increase the complexity of the algorithm. This application introduces a new acceleration intensity vector CNU as a feature quantity: a x ,a y ,a z They are accelerations in three directions. The CNU feature quantity is used to avoid the complexity of analyzing the accelerations on three axes. Regardless of the motion state, the value of CNU will change greatly. CNU is used as the basis for judging the motion state. When the participant is in a certain state of motion, CNU has a process of changing from a minimum value to a maximum value. When the participant is in a stationary state, the CNU area is stable and its size is between one gravitational acceleration g. This application sets 1.1g as the critical value for discrimination and calculates the average CNU of the participant 3 seconds after the start of the perception task. When CNU < 1.1g, the participant is in a stable state; when CNU ≥ 1.1g, the participant is in a state of motion; When determining whether the mobile phone is in a closed space, the data read by the optical pulse proximity sensor is used to determine the space where the mobile phone is located, and values[0] is used to obtain parameters. When the distance is less than 1.6 cm, the value of values[0] is 0, and when the distance is greater than or equal to 1.5 cm, the value of values[0] is 5; Analyze the data collected by the acceleration sensor and the optical pulse proximity sensor, make a rough estimate of the usage scenarios of the participants, and use this as a basis to filter the noise data provided by the participants; The noise level is assessed on the mobile phone. When the client software is started, the microphone on the mobile phone senses the surrounding sound and calculates the decibel value. At the same time, the software obtains the current location information, i.e., longitude and latitude, and the current time through positioning, i.e., a triplet (timestamp, longitude and latitude, decibel value). This triplet is stored in the mobile phone to obtain a noise data record. The mobile phone only measures the size of the surrounding noise data without recording the sound around the participant. The recording file is not saved to protect the privacy of the participant. The noise information is collected based on the participant's position. A target area G is selected and divided into N parts. Each part is a noise measurement unit. The data information x obtained in each noise measurement unit is i (i∈{1,2,3,…,N}) is converted into a vector form to represent the noise pollution in this target area: x=(x1,x2,...x N ) T Formula 2 x is the complete set of data, and the initial data x is reconstructed based on incomplete and random measurement data; Adaptive noise data compression: In a certain period of time T, the participants collect noise data in the area required by the perception task. The participants collect a string of data v s ,v s It only contains part of the noise measurement data, namely the noise decibel value, location data information, and time cutoff information. First, v s Encoded into an M-dimensional vector y s ,y s =B s v s , where the observation matrix B s Setting: B s The middle is a M×L s The observation matrix contains only three elements: -1, 0, and 1, k'≈100: Observation matrix B s A pseudo-random number generator is used on each participant's mobile phone. The participant's mobile phone uses the generated observation matrix to reduce the dimension of the collected data. Only the vector after dimension reduction is sent to the server, which reduces the transmission traffic. During reconstruction, the server only needs the same pseudo-random number generator as the mobile phone. The observation matrix can be generated on the server and is consistent with the mobile phone. If we add up the data from all n participants, we get y * =B * x * , where x * All v s The superposition of: B * is a P×Q sparse sampling matrix, P=M*n, In x, there are overlapped and missing data. To restore the original x, we perform B according to the order of the elements in x. * Rebuild so that: y=CE=BGx Formula 6 Where C is the perception matrix, E is the sparse representation of x on the discrete cosine transform matrix G; The specific steps of noise self-prior reconstruction are as follows: Definition: Input: observation basis B, observation noise y, sparsity k, Output: The noise signal s reconstructed by k-sparseness of x; Initialization: residual of observed noise r0=y, reconstructed signal s0=0, index set T n =T n-1 ∪{k}, number of iterations n = 0; Step 1: Calculate the inner product g of the residual of the observation noise and each column of the observation basis B n =B T r n-1 ; Step 2: Find g n The largest element in, j = argmax|g n [i]|; Step 3: Update the index set T n =T n-1 Y[j] and the index observation basis B T ,Y[*] is the index update function; Step 4: Use the least squares method to find the approximate solution x n =(B T T ,B T ) -1 B T T y; Step 5: Update the residual of the observation noise, r n =y-Gs n , where the number of iterations n = n + 1, G is the discrete cosine transform matrix; Step 6: If n>k and the convergence condition is met, stop the iteration, s r =s n , r=r n , output s r ,s n , otherwise go to the first step; Given a discrete K sparse signal X, where the length N of the signal X varies, each curve represents a different N value, taking N = 50, 100, 500, the normalized sparsity of the noise signal X is s = k / n = 0.1, the oversampling rate c is the ratio of the number of noise measurements M to the sparsity k of the noise signal, and the observation matrix uses a random Gaussian matrix.

2. According to claim 1, the smart phone interactive noise self-priori perception analysis system is characterized by: System overall design: The smartphone obtains noise decibel value, location information and time information, which are uploaded to the server through the communication module. At the same time, the noise information obtained by the participant is displayed in real time. After the participant makes a request, the server feeds back the collected noise data to the participant, which is displayed in the form of a noise map on the client. The server sends and receives data through the communication module and processes the data through the data management module. Based on smartphones, noise data is acquired and visualized through embedded sensors. The server side serves as the data processing center of the system, and is mainly responsible for data reception, storage, and other necessary processing on the server side. The data collected by participants are concentrated on the server side for noise self-prior reconstruction. The server uses a data management module to communicate with the MySQL cluster.

3. According to claim 1, the smart phone interactive noise self-prior perception analysis system is characterized by: Client system design: Smartphones are used to complete data collection, storage, and upload. The client mainly includes: first, the collection of sensor data, including noise information, positioning information, acceleration sensor information, proximity sensor information, and timestamp information; second, communication with the server, the client sends the acquired data information to the server, and receives feedback from the server; third, data visualization, through the heat map method, the noise data fed back from the server to the client is visualized, so that participants can intuitively observe the surrounding noise distribution; Smartphones support the use of device sensors, provide drivers to manage sensor hardware, and monitor changes in the external environment perceived by sensor hardware through listeners. The specific steps for developing smart sensors are as follows: Step 1: Get sensor services: The participant clicks the "Start Collection" button to trigger the collection process, and the application initializes the Sensor Manager; Step 2: Get the specified type of sensor: Select the sensor to be used, use Sensor Manager to get the specified sensor to be monitored and add it; Step 3: Register the listener: After acquiring the sensor, use Sensor Manager to add a registered listener for the target sensor. When the sensor senses changes in the environment, the listener returns the sensor value. At the same time, set the frequency of sensor collection in the listener. Step 4: Data calculation and storage: After obtaining the sensor data, the sensor data is processed and persistently stored; The client's noise detection uses the microphone sensor in the mobile phone. The unit of sound intensity is dB. The calculation formula for obtaining noise intensity data is as follows: P rms is the measured sound pressure, P ref is the sound pressure of the reference value; The third-party map API is used to obtain the location information of participants on the noise detection system client. The specific process of obtaining longitude and latitude information is as follows: 1) Download the third-party map SDK and prepare for XML configuration: 2) Set the positioning conditions, setOpengps to open positioning, and setCoorType to return the coordinate type of the value; 3)Register the listener registerLocationListener; 4) Use StringBuffer to store the acquired data, getTime to get time, getLatitude to get latitude, and getLongitude to get longitude; 5) Send a request, the listener works, and obtains time and longitude and latitude data; The heat map included in the third-party map is used to represent the noise distribution. The noise information heat map display is implemented as follows: 1) Use setMapStatus() to set the map status; 2) Add a heat map in addHeatMap() to get the data List <data> And the heat map construction method publicHeatMap.Builderdata():< / data> 3) Use List <data> The getLocations() method gets the data in the JSONArray. This method waits to be called in addHeatMap().< / data> 4) The mobile phone sends a request to the server; 5) Display noise map on mobile phone; 6) Method to delete heat map: heatmap.removeHeatMap().

4. The smart phone interactive noise self-a priori perception analysis system according to claim 1, characterized in that: Sensor data acquisition: The core sensor data acquisition module is Sensor Data Collection, which uses the proximity sensor and accelerometer to acquire real-time sensor data using the Sensor Event Listener interface, and the Location Listener interface of the third-party map to acquire real-time geographic location information. The dBSensor class is used to record sound and obtain the maximum amplitude. (1) Initialize SensorManager by getting System Service (Context.SENSOR_SERVICE); (2) Get the acceleration sensor data through get Default Sensor (Scnsor.TYPE_ACCELEROMETER); (3) Register a listener to obtain data in real time, register Listener(listener, sensor, SensorManager.SENSOR_DELAY_NORMAL); (4) Override the on Sensor Changed(Sensor Event event) method to obtain sensor data. The returned data structure is the event.values[] array. (5) After the sensor object is used, the stop() method is used to release the sensor resources and cancel the sensor listening service, sensor Manager.unregister Listener (Sensor Event Listener listener); Code implementation process for obtaining noise intensity: Use the startRecord() method of MediaRecorderDemo to implement noise recording, and the stopRecord() method to end noise acquisition. The specific process is as follows: 1) Instantiate a MediaRecorder object; 2) Set the audio: use setAudioSource() to set the audio source, use setOutputFormat() to set the audio output format, use setAudioEncoder() to set the output encoding method, and use setOutputFile() to set the location of the output file; 3) prepare() to prepare for recording; 4) start() officially starts recording; 5) Call updateMicStatus() to calculate the specific audio intensity, send the value through handler.sendMessage(), and postDelayed() to send it intermittently with delay; The calculation code of updateMicStatus() in process 5) is as follows: db = (int)((20×Math.log1O(ratio))×0.7), where 0.7 is multiplied to reduce the impact of extreme noise on the data, and type coercion is used to convert the double type into the int type; Message is used to transmit message.what and message.obj data to handler. The former contains the transmitted code identifier, and the latter is the specific value of the noise intensity. handleMessage is used to receive data in MainActivity. Among them, switch(msg.what) judges the msg.what identifier. If the judgment is correct, setText(msg.obj.toString()) is used to convert the specific value in msg.obj into a string type and then display it. The Runnable() interface and handler.postDelayed() are used to implement the timer function. The entire updateMicStatus() is run intermittently to realize the timed update of data.

5. According to claim 1, the smart phone interactive noise self-priori perception analysis system is characterized by: Map service section design: Specific process of obtaining map information: 1) Setting up the third-party map usage environment: first register with the third-party map developer, then obtain the key, and download the jar package of the corresponding adopted function, put the jar package into the lib file of the software, perform update import in the software, and then add the corresponding permissions and keys in manifest.XML to complete the development environment setting; 2) Create LocationService.java and set up third-party call related methods: it includes registerListener() and unregisterListener() to register and unregister third-party maps, as well as start() and stop() methods to implement positioning delegation; 3) Create LocationApplication.java to initialize positioning and serve as the initial entry point for calling the map; 4) Main interface noise detection, use setOnClickListener() to monitor it, map positioning is performed when pressed, and positioning is stopped when pressed again; Create a new BDLocationListener in ManActivtyjava, in which onReceiveLocation() is used to receive positioning information, receiving a string type buffer StringBuffer, and then using location.getTime() to get the positioning time, location.getLatude() and location.getLongtitude() to get the longitude and latitude, and use location.getAddStr() to get the location information. After getting the positioning time and longitude and latitude information, store them locally and wait to be sent to the server. The positioning time and positioning location information are displayed in real time on the interface.

6. The smart phone interactive noise self-priori perception analysis system according to claim 1, characterized in that: Generation of noise map: The noise map uses the heat map API provided by the third-party map. The noise is displayed in the form of a heat map by customizing the heat map. The HeatMap.Builder constructor is used to complete the custom task and realize the visualization of noise data. The following is the process of generating a custom heat map: 1) Through List <latlng> The getLocations() method obtains the noise data sent by the server, obtains the input data stream through Scanner(inputStream), stores the String type data in arry, then traverses the array to obtain the longitude and latitude and noise values, and then puts the obtained data into list list.add(newLatLng(lat,Ing,noi));< / latlng> 2) Create a new addHeatMap() method and add it to Thread(), and use the interface run() to call getLocations() to obtain server data, and use the heat map constructor HeatMap.Builder to set the data to be drawn, and use List <latlng> data = getLocations();< / latlng> 3) After completing the settings, use build() to construct the heat map and use sendEmptyMessage(0) to send the value to handleMessage(Messagemsg) in the builder. After handleMessage confirms that it has received 0, use addHeatMap(heatmap) to add the heat map to complete the addition and display of the heat map.

7. The smart phone interactive noise self-priori perception analysis system according to claim 1, characterized in that: Server system design: The server serves as a data processing center, completing the analysis of the participants' usage scenarios and data communication with mobile terminals, completing data reception, storage, and necessary processing on the server side. The server side adopts the REST architecture, and the server-side interface uses URL as a resource identifier to communicate with the client; MySQL is used as the system database. The information data layer consists of two parts: database and database access layer. The database access layer complies with JPA specifications when performing data storage, modification, and deletion operations. The business layer of the Web server side consists of service interface, implementation and entity layer. The Web layer consists of two parts. The first part is the service portal layer, and the second part is the Web service layer. The former is responsible for the interface, and the latter is for the data request of the mobile client. The server-side participant usage scenario is inferred, considering the movement state and physical position of the smartphone during the participant's collection process, using proximity sensors and linear acceleration sensors, using acceleration sensors to determine the participant's movement state and using proximity sensors to determine the state of the phone.