# Creation Characteristics of Music Piano Arrangement Based on Distributed Sensors

Authors: Chuan Cao
Journal: Mobile Information Systems
 (2022)

---

## Abstract

Music piano arrangement is a popular creation method among the public at present, which can play a role in the promotion of traditional culture and the combination of popular culture. However, the traditional method of analyzing the creative characteristics of musical piano arrangements has limitations, and it is not suitable for today’s public review era. In this paper, to address the limitations, distributed sensor technology is employed. It utilizes the Top-k query method, KNN (one of the most basic approaches in data mining classification technology is the proximity algorithm, often known as the K closest neighbor classification algorithm) algorithm, and fused balance algorithm to classify the creative features of musical piano arrangements. It collects 50 classic piano arrangements and studies its compositional style, melody, and tone. The data results showed that, for the style characteristics, each algorithm has a high recognition rate for passion songs, and the three errors are small; for the melody characteristics, because the KNN algorithm has a delay in determining the rising tempo, the overall melody is not grasped correctly, and the Top-k query method is not sensitive to the descending tempo, and the recognition rate is low; for the tonal characteristics, the Top-k query method has a larger range of low-key judgments, so that the number of identifications is larger. As for the energy consumption of the system, as the number of nodes increases, the energy consumption of the three algorithms also increases gradually. Among them, the Top-k query method has the largest energy consumption, exceeding 400 W at 180 nodes, and its energy consumption growth rate continues to increase. The fusion algorithm fluctuates greatly, while the KNN algorithm is stable. This shows that KNN algorithm is more stable in terms of system performance, and its characteristics can be better summarized in the creation and research of piano adaptation.


---

## Body

## 1. Introduction

The advent of Internet big data and the era of public review has provided new ideas for the creation of musical piano arrangements and has important literary value and significance for the study of the creative characteristics of piano arrangements. It can carry forward traditional piano music and bring new artistic value to the new era. However, the analysis of the creative characteristics of traditional piano pieces relies too much on the personal experience and evaluation criteria of judges or experts and needs to be improved. Since the piano was introduced into China, it has experienced many periods of development from the initial budding period to the formation of “Chinese style” piano music. In the whole process of piano music creation, piano arrangement is an important part and even the main field of piano music creation in some periods, which has played a huge role in promoting the formation of “Chinese style” piano music. Since the beginning of the twentieth century, the creation of Chinese piano music has been developing continuously from the initial study and exploration, through a lot of research and innovation. The arrangement changes without losing the charm of traditional music. Musical piano arrangement is a bright pearl in the vast ocean of Chinese piano music. It plays an important role in the entire history of Chinese piano music development and plays a certain role and significance for the inheritance and development of folk music in some regions. In addition, it provides a certain reference value for piano educators and performers. But at present, the domestic research on this is not comprehensive enough, and it still has the necessity and significance of in-depth exploration and research.Regarding the creation of musical piano arrangements, many scholars have carried out relevant research on this, including CYPESS studied the execution of key duet arrangements on piano instruments with different mechanisms and timbres, and it is a technique that helps participants to develop a sense of “compassion” for one another via shared experiences and emotions [1]. Rill and Hämäläinen introduced a PACE (Presence, Authenticity, Courage and Ecosystem Awareness) co-creation guide, planning co-creative projects from the point that collective creativity and insight are emerging attributes of the design experience. The guidance he provides helps ensure that the creative plan is valid, empowering, and relevant [2]. Wang devoted himself to the psychological differences of Chinese song traditions and analyzed the particularity of the character structure of modern writers in reconciling the melody [3]. Lynnyk revealed the universality of the composer’s talent through the analysis of various aspects of Rotislav Gonica’s works, and the scale of his works is mainly focused on piano performance [4]. Lytvyshchenko studied Nazarenko’s musical activities and analyzed the characteristics of his composition style. The result is that Nazarenko’s creative style is fresh and multifaceted, thanks to bright timbre, rich texture and range. The composer’s musical compositions become symphonic, extending far beyond the basic thematic material. Based on folk and author melodies, he created large, complex structures with vivid musical images. The work of Nazarenko necessitates a high degree of technical skill for the performer, an intellectual approach to comprehending all the subtleties of a musical language, and critical sound work [5]. However, these research methods are one-sided and have a strong subjective consciousness, so they are not applicable in the current era of public selection, and a more systematic method is needed to study the characteristics of piano arrangements.In order to study the characteristics of piano arrangement more objectively and comprehensively, some scholars put forward the method of using distributed sensors. Among them: Uysal and Filik proposed a novel sparse time difference of arrival (S-TDOA) estimation method for localizing low probability of intercept (LPI) signals using distributed sensors. Several simulations indicate that the proposed technique can estimate TDOA across dispersed sensors utilizing sparse multisensor data effectively, even at low signal-to-noise ratio [6]. Song et al. reviewed the working principle of BDG under various conditions and applied it to the research progress of distributed optical fiber sensors [7]. Sheng et al. studied the problem of angle of arrival (AOA) target tracking in three-dimensional (3D) space using multiple distributed sensors [8]. In distributed fiber optic sensors, the measurement range is usually limited to tens of kilometers due to input pump power limitations imposed by the presence of fiber attenuation and nonlinear effects. Nuno et al. studied a distributed amplification scheme using a continuous wave pumping scheme. The sensitivity at the worst point is greatly enhanced, and the ASD noise floor is decreased, thanks to this novel technology [9]. Ahmad et al. proposed a novel interrogation technique based on optical time-delay frequency domain reflectometry (OTS-FDR) for a fully distributed linear chi fiber grating (LCFBG) strain sensor with high spatial and temporal resolution and verified it experimentally [10]. However, these methods are not very efficient, time-consuming to implement and apply, and the calculation process is complicated, so they still need to be improved.The Top-k query method used in this paper is used to summarize and classify the compositional characteristics of piano pieces. According to the test results, there are 29 passionate songs classified by the Top-k query method, 12 low-pitched songs, and nine gentle songs; the KNN algorithm classified 30 passionate styles, 11 low songs, and nine gentle songs; the fusion algorithm obtained 30 passionate styles, nine rising temperaments, 11 low songs, and nine gentle songs. As for the energy consumption of the system, as the number of nodes increases, the energy consumption of the three algorithms also increases gradually. Among them, the Top-k query method consumes the most energy because its query process is slow, resulting in more energy consumption, while the fusion algorithm consumes the lowest energy consumption.The innovations of this paper are: (1) The literature retrieval method is used to analyze the collected relevant literature, and the existing research results are used to find the innovation points for this paper. (2) It uses the music analysis method to analyze the collected audio-visual data in detail, including the analysis of the musical structure in the works, the differences between the versions played by different composers, and the analysis of the melody and rhythm. (3) This paper uses the practice research method to perform the works in practice so as to understand the works in more detail, find out the difficulties that need to be paid attention to in the performance, and propose solutions.


## 2. Characteristics of Piano Music Based on Distributed Sensors

### 2.1. Distributed Sensors

Distributed sensor is a data collection and processing method of multisensor technology. Figure1 shows the overall structure of the distributed sensors used in this paper, where multiple sensors are used to collect and process the pitch, melody and other information of musical piano arrangements. These information are then processed into relevant data by computer, and aggregated into the database, and then feature analysis and summarize are carried out according to relevant algorithms [11].Figure 1
Overall structure of distributed sensors.In recent years, distributed sensor technology has attracted much attention, and many new query processing technologies have appeared. These new query methods specially designed for sensors take energy limitation, query quality and efficiency as necessary considerations. In this paper, some query algorithms are introduced and classified, among which Top-k query has a wide range of uses in the field of sensor network field environment monitoring, such as temperature monitoring, pollution monitoring,, etc. For example, an event is assumed to monitor the temperature of a large piano concert venue at all times with many concert halls. In order to ensure that the temperature of each concert hall can be known in real time, many nodes need to be arranged. When managers need to know which concert halls have the highest or lowest temperature, they need to run a Top-k query in the network to find the target concert hall. Therefore, the Top-k query is actually to return the sensor nodes whose sensing data readings are ranked in the top-k positions and their related sensing data reading information. In order to obtain the first k readings, the most direct method is to traverse all the nodes in the network, and then perform a comparison calculation. In this way, in fact, many node visits are meaningless for the final result. Therefore, in recent years, Top-k query optimization has always been a research hotspot in the sensor field, and many researchers and application personnel, from different perspectives, use different algorithms to optimize Top-k queries [12, 13].In addition, KNN algorithm is a commonly used classification algorithm, especially in the classification process of sensor data processing [14]. The KNN method is simple in idea, easy to understand, easy to implement, and does not need to estimate parameters. The main disadvantage of the algorithm in classification is that when the samples are unbalanced. In this paper, the KNN algorithm and the Top-k query method are used to compare and integrate, so as to study the creative characteristics of piano arrangements. The overall research method and process are shown in Figure 2.Figure 2
Research process of the compositional characteristics of piano arrangements.In Figure2, the performance of the piano arrangement is first recorded and monitored according to sensor induction, and then the obtained data are transmitted to the computer to form a database. It uses the KNN algorithm in this paper to process data, then summarizes all the processing results, and finally performs feature Summarize to obtain the specific style, melody, pitch, and other characteristics of the piano arrangement.


### 2.2. Top-k Query Method

The purpose of the Top-k query is to determine which nodes have the highest sensory data readings. Sensor nodes keep listening and update data regularly. Filter-based Top-k queries are ideal for this monitoring type of application. The filter-based Top-k query will only be passed upwards if the node data update can pass the filter. Through this way of limiting transmission, most of the data that do not contribute or contribute little to the final result can be filtered out, which effectively reduces the energy consumption [15, 16].The Top-k query method can be used to summarize and classify the compositional characteristics of piano pieces. It is assumed to be divided into five categories, which are expressed as follows:(1)Q=S,V,T,F,D.The node filter is actually a value range of the sensory data defined on the node, which is represented byrangeli,ui, li represents the lower limit of the interval, and ui represents the upper limit of the interval. In the initialization phase, the base station broadcasts a Top-k query to all nodes in the network, sorts the collected node data, and finds the Top-k query results. Since the base station has sufficient energy, it also undertakes to set a filter for each node, calculate the node filter interval and send the filter to the node for installation. Subsequently, each node periodically updates the data, and when the updated data of node i still belongs, there is no need to upload the update; otherwise, the update is uploaded to the base station. The base station recalculates the Top-k query according to the update data of each node. It calculates and changes filter settings, and so on. Therefore, this paper uses Top-k filtering, namely,(2)Filter:l1,u1,l2,u2…lk+1,uk+1.The filter conditions are as follows:(3)vi≤ui,vi+1≤ui+1≤li≤ui,lk+1≤vN.In the query optimization based on historical data, Top-k seeks and utilizes the historical data information obtained by each node to guide subsequent queries, thereby reducing energy consumption, that is, minimizing the number of queries and the amount of perception data. Each node contains query cache table, data cache table, and routing mechanism. When a query arrives at a node, the query cache table browses its own records. If it is found that the query has been executed, the query will not be forwarded, but the data will be extracted from the historical query results stored in the node and returned. Even if the query has not been executed, it is possible to obtain query results from historical query data by analyzing semantics. If none of the above operations can satisfy the query, the query will be forwarded according to the selected route [17].The basic query must be periodic and guaranteed to be broadcast to every node of the sensor network. The selection of the cycle should be frequent enough to ensure the accuracy of the data, and the life cycle of the entire network should be extended as much as possible. Each node only gets the top-k values from each of its children and saves it in the data buffer. After collecting the data of all child nodes, select Top-k values from these results and its own query results and pass them to its parent node. If the number of nodes in the subtree of a node is less than k, upload all the results on the subtree. In the specific implementation, a Boolean variable visited (value true or false) is set to indicate whether the node has been visited [18].


### 2.3. KNN Algorithm

This paper uses the KNN algorithm to summarize and analyze the creative characteristics of piano arrangements, so as to understand the specific creative characteristics of the arrangements. The KNN algorithm is the proximity algorithm. KNN query performs data collection by specifying the query pointQ and the sample size k, and the k nearest neighbor nodes geographically close to the query point Q. As shown in Figure 3, the points with different colors in the figure represent different types of information. When a new x value appears, it needs to be determined according to the categories of its nearest K points. The white point in the figure is the new x value, and the nearest K points are the points with the light blue attribute, then it is determined that x and light blue belong to the same class. Using KNN query, users can easily obtain node data of a region of interest (For example, some feature values of piano music, such as piano melody, pitch) [19, 20].Figure 3
Schematic diagram of KNN algorithm.Existing in-network KNN query processing techniques can be divided into network architecture-based algorithms and architecture-independent algorithms. The propagation and processing of queries in the former method are based on a specific sensor network structure. In these algorithms, sensor nodes are organized together according to the structure of clusters, and the sensor network is divided into MBRs of different sizes. Each rectangle covers a part of the area and takes any node in the area as its constituent member. Queries can be generated at any node. The node that generates the query passes the query to its class head node, the class head node, and determines whether the destination of the query is within the MBRs to which it belongs. If it is, run the -2-Home node KNN algorithm, if not, pass the query to its parent node to continue searching. However, the maintenance of the abovementioned network structure is a difficult problem because the communication of nodes is easily affected. In the dynamic system of sensor network, these maintenance work generate a lot of redundant communication cost and energy consumption. The second method does not establish a specific network structure in advance, but realizes the KNN query by calculating the appropriate propagation path through real-time processing in the network. KNN queries are injected into the network through an access point and then propagated along specific paths to designated sensor nodes, which transmit the collected data back to the access point. By propagating queries and collecting data along well-designed delivery lines, the overhead of maintaining the network structure is avoided. Obviously, the performance of the query (such as response time and energy consumption) is highly dependent on the circuit design. If the transmission line is long, the distance that data and queries need to travel will be extended, which will lead to longer response time and consume a lot of energy. Therefore, the design of the query line is important for the KNN query processing in the network. Moreover, since different applications have different performance (such as response time and energy consumption) requirements, it is necessary to set corresponding routes for specific application requirements.In this paper, the KNN algorithm is used to monitor the data collection process of the sensor. Suppose the tree structure of the sensor is shown in Figure4. Among them, R is the base station, i is the cluster sensor node, and a, b, and c are the subsensors of the type to which the i sensor belongs.Figure 4
Tree structure of sensors.Ifq is the energy consumption of transmitting a signal, r is the energy consumption of the returned signal, and C is the energy consumption of the sensor side, then(4)C=α+βn.Among them,α is the initial energy consumption and β is the transfer rate.For the workload of sensor query, it is expressed as follows:(5)QW=a+b,1−ε,a+c,1−ε.For the workload of sensor updating data, it is expressed as follows:(6)SW=a,1,b,1c,1i,1,r,1.Dynamic calculation, the update method is(7)STPullN=PullN+∑i=0CNST PullPushchN,STPushN=PushN+∑i=0CNSTPushchN,ST PullPushchN=minSTPullN,STPushN.Total energy calculation method is as follows:(8)costqi=transqi∗Cs+Ct∗lenqi.Among them,transqi represents the average data transfer value. Cs and Ct represent the initial energy consumption and unit energy consumption, respectively.The result that satisfies the data query is as follows:(9)resultqi,Nk=selqi,Nkepochi∗Nk.From this, the amount of information transmitted by queryqi can be obtained as follows:(10)transqi=∑k=1max_depthresultqi,Nk∗k.The Top-k query and KNN query are fused according to the balance variable in the following way:(11)balanceq1,q2=costq1+costq2−costq1∪q2.And whenbalance <0, it means that the energy consumption of fusion is greater than that of separate query, and fusion query is not considered here.In addition, if the acceptance sensor nodes are evenly distributed, then the energy consumption of any node is given by(12)Cs+Ct∗lenqi=1.The attributes of a node are denoted byL, and(13)L=lmax−lmin.Let(14)d=∑k=1max_depthNk·k.Finally, substituting into formula (10), we can get(15)costqi=transqi∗Cs+Ct∗lenqi=li2−li1/lmax−lminepochi∗d.In the KNN query processing technology in the network, the most typical one is the IKNN query algorithm. The purpose of the IKNN algorithm based on the query route is to reduce the number of node visits as much as possible on the premise of ensuring the accuracy. When thek nearest neighbor nodes are visited, the distribution and processing of the query is stopped immediately. The IKNN algorithm combines the distribution of queries and the collection of data. First, a propagation route is predefined in the query area according to a certain algorithm, and the KNN query is processed by traversing this route. The query starts to be sent to the home node, the home node sends detection information to the query area, and the sensing node D-node that receives the information transmits the collected sensing information to the query node Q-node. The current Q-node fuses the collected data and transmits the query result to another Q-node according to the predefined route. In this way, it is guaranteed that as few nodes as possible within the sensing area are visited.


## 2.1. Distributed Sensors

Distributed sensor is a data collection and processing method of multisensor technology. Figure1 shows the overall structure of the distributed sensors used in this paper, where multiple sensors are used to collect and process the pitch, melody and other information of musical piano arrangements. These information are then processed into relevant data by computer, and aggregated into the database, and then feature analysis and summarize are carried out according to relevant algorithms [11].Figure 1
Overall structure of distributed sensors.In recent years, distributed sensor technology has attracted much attention, and many new query processing technologies have appeared. These new query methods specially designed for sensors take energy limitation, query quality and efficiency as necessary considerations. In this paper, some query algorithms are introduced and classified, among which Top-k query has a wide range of uses in the field of sensor network field environment monitoring, such as temperature monitoring, pollution monitoring,, etc. For example, an event is assumed to monitor the temperature of a large piano concert venue at all times with many concert halls. In order to ensure that the temperature of each concert hall can be known in real time, many nodes need to be arranged. When managers need to know which concert halls have the highest or lowest temperature, they need to run a Top-k query in the network to find the target concert hall. Therefore, the Top-k query is actually to return the sensor nodes whose sensing data readings are ranked in the top-k positions and their related sensing data reading information. In order to obtain the first k readings, the most direct method is to traverse all the nodes in the network, and then perform a comparison calculation. In this way, in fact, many node visits are meaningless for the final result. Therefore, in recent years, Top-k query optimization has always been a research hotspot in the sensor field, and many researchers and application personnel, from different perspectives, use different algorithms to optimize Top-k queries [12, 13].In addition, KNN algorithm is a commonly used classification algorithm, especially in the classification process of sensor data processing [14]. The KNN method is simple in idea, easy to understand, easy to implement, and does not need to estimate parameters. The main disadvantage of the algorithm in classification is that when the samples are unbalanced. In this paper, the KNN algorithm and the Top-k query method are used to compare and integrate, so as to study the creative characteristics of piano arrangements. The overall research method and process are shown in Figure 2.Figure 2
Research process of the compositional characteristics of piano arrangements.In Figure2, the performance of the piano arrangement is first recorded and monitored according to sensor induction, and then the obtained data are transmitted to the computer to form a database. It uses the KNN algorithm in this paper to process data, then summarizes all the processing results, and finally performs feature Summarize to obtain the specific style, melody, pitch, and other characteristics of the piano arrangement.


## 2.2. Top-k Query Method

The purpose of the Top-k query is to determine which nodes have the highest sensory data readings. Sensor nodes keep listening and update data regularly. Filter-based Top-k queries are ideal for this monitoring type of application. The filter-based Top-k query will only be passed upwards if the node data update can pass the filter. Through this way of limiting transmission, most of the data that do not contribute or contribute little to the final result can be filtered out, which effectively reduces the energy consumption [15, 16].The Top-k query method can be used to summarize and classify the compositional characteristics of piano pieces. It is assumed to be divided into five categories, which are expressed as follows:(1)Q=S,V,T,F,D.The node filter is actually a value range of the sensory data defined on the node, which is represented byrangeli,ui, li represents the lower limit of the interval, and ui represents the upper limit of the interval. In the initialization phase, the base station broadcasts a Top-k query to all nodes in the network, sorts the collected node data, and finds the Top-k query results. Since the base station has sufficient energy, it also undertakes to set a filter for each node, calculate the node filter interval and send the filter to the node for installation. Subsequently, each node periodically updates the data, and when the updated data of node i still belongs, there is no need to upload the update; otherwise, the update is uploaded to the base station. The base station recalculates the Top-k query according to the update data of each node. It calculates and changes filter settings, and so on. Therefore, this paper uses Top-k filtering, namely,(2)Filter:l1,u1,l2,u2…lk+1,uk+1.The filter conditions are as follows:(3)vi≤ui,vi+1≤ui+1≤li≤ui,lk+1≤vN.In the query optimization based on historical data, Top-k seeks and utilizes the historical data information obtained by each node to guide subsequent queries, thereby reducing energy consumption, that is, minimizing the number of queries and the amount of perception data. Each node contains query cache table, data cache table, and routing mechanism. When a query arrives at a node, the query cache table browses its own records. If it is found that the query has been executed, the query will not be forwarded, but the data will be extracted from the historical query results stored in the node and returned. Even if the query has not been executed, it is possible to obtain query results from historical query data by analyzing semantics. If none of the above operations can satisfy the query, the query will be forwarded according to the selected route [17].The basic query must be periodic and guaranteed to be broadcast to every node of the sensor network. The selection of the cycle should be frequent enough to ensure the accuracy of the data, and the life cycle of the entire network should be extended as much as possible. Each node only gets the top-k values from each of its children and saves it in the data buffer. After collecting the data of all child nodes, select Top-k values from these results and its own query results and pass them to its parent node. If the number of nodes in the subtree of a node is less than k, upload all the results on the subtree. In the specific implementation, a Boolean variable visited (value true or false) is set to indicate whether the node has been visited [18].


## 2.3. KNN Algorithm

This paper uses the KNN algorithm to summarize and analyze the creative characteristics of piano arrangements, so as to understand the specific creative characteristics of the arrangements. The KNN algorithm is the proximity algorithm. KNN query performs data collection by specifying the query pointQ and the sample size k, and the k nearest neighbor nodes geographically close to the query point Q. As shown in Figure 3, the points with different colors in the figure represent different types of information. When a new x value appears, it needs to be determined according to the categories of its nearest K points. The white point in the figure is the new x value, and the nearest K points are the points with the light blue attribute, then it is determined that x and light blue belong to the same class. Using KNN query, users can easily obtain node data of a region of interest (For example, some feature values of piano music, such as piano melody, pitch) [19, 20].Figure 3
Schematic diagram of KNN algorithm.Existing in-network KNN query processing techniques can be divided into network architecture-based algorithms and architecture-independent algorithms. The propagation and processing of queries in the former method are based on a specific sensor network structure. In these algorithms, sensor nodes are organized together according to the structure of clusters, and the sensor network is divided into MBRs of different sizes. Each rectangle covers a part of the area and takes any node in the area as its constituent member. Queries can be generated at any node. The node that generates the query passes the query to its class head node, the class head node, and determines whether the destination of the query is within the MBRs to which it belongs. If it is, run the -2-Home node KNN algorithm, if not, pass the query to its parent node to continue searching. However, the maintenance of the abovementioned network structure is a difficult problem because the communication of nodes is easily affected. In the dynamic system of sensor network, these maintenance work generate a lot of redundant communication cost and energy consumption. The second method does not establish a specific network structure in advance, but realizes the KNN query by calculating the appropriate propagation path through real-time processing in the network. KNN queries are injected into the network through an access point and then propagated along specific paths to designated sensor nodes, which transmit the collected data back to the access point. By propagating queries and collecting data along well-designed delivery lines, the overhead of maintaining the network structure is avoided. Obviously, the performance of the query (such as response time and energy consumption) is highly dependent on the circuit design. If the transmission line is long, the distance that data and queries need to travel will be extended, which will lead to longer response time and consume a lot of energy. Therefore, the design of the query line is important for the KNN query processing in the network. Moreover, since different applications have different performance (such as response time and energy consumption) requirements, it is necessary to set corresponding routes for specific application requirements.In this paper, the KNN algorithm is used to monitor the data collection process of the sensor. Suppose the tree structure of the sensor is shown in Figure4. Among them, R is the base station, i is the cluster sensor node, and a, b, and c are the subsensors of the type to which the i sensor belongs.Figure 4
Tree structure of sensors.Ifq is the energy consumption of transmitting a signal, r is the energy consumption of the returned signal, and C is the energy consumption of the sensor side, then(4)C=α+βn.Among them,α is the initial energy consumption and β is the transfer rate.For the workload of sensor query, it is expressed as follows:(5)QW=a+b,1−ε,a+c,1−ε.For the workload of sensor updating data, it is expressed as follows:(6)SW=a,1,b,1c,1i,1,r,1.Dynamic calculation, the update method is(7)STPullN=PullN+∑i=0CNST PullPushchN,STPushN=PushN+∑i=0CNSTPushchN,ST PullPushchN=minSTPullN,STPushN.Total energy calculation method is as follows:(8)costqi=transqi∗Cs+Ct∗lenqi.Among them,transqi represents the average data transfer value. Cs and Ct represent the initial energy consumption and unit energy consumption, respectively.The result that satisfies the data query is as follows:(9)resultqi,Nk=selqi,Nkepochi∗Nk.From this, the amount of information transmitted by queryqi can be obtained as follows:(10)transqi=∑k=1max_depthresultqi,Nk∗k.The Top-k query and KNN query are fused according to the balance variable in the following way:(11)balanceq1,q2=costq1+costq2−costq1∪q2.And whenbalance <0, it means that the energy consumption of fusion is greater than that of separate query, and fusion query is not considered here.In addition, if the acceptance sensor nodes are evenly distributed, then the energy consumption of any node is given by(12)Cs+Ct∗lenqi=1.The attributes of a node are denoted byL, and(13)L=lmax−lmin.Let(14)d=∑k=1max_depthNk·k.Finally, substituting into formula (10), we can get(15)costqi=transqi∗Cs+Ct∗lenqi=li2−li1/lmax−lminepochi∗d.In the KNN query processing technology in the network, the most typical one is the IKNN query algorithm. The purpose of the IKNN algorithm based on the query route is to reduce the number of node visits as much as possible on the premise of ensuring the accuracy. When thek nearest neighbor nodes are visited, the distribution and processing of the query is stopped immediately. The IKNN algorithm combines the distribution of queries and the collection of data. First, a propagation route is predefined in the query area according to a certain algorithm, and the KNN query is processed by traversing this route. The query starts to be sent to the home node, the home node sends detection information to the query area, and the sensing node D-node that receives the information transmits the collected sensing information to the query node Q-node. The current Q-node fuses the collected data and transmits the query result to another Q-node according to the predefined route. In this way, it is guaranteed that as few nodes as possible within the sensing area are visited.


## 3. Simulation Test of the Creative Characteristics of Piano Arrangements

### 3.1. Test of the Characteristics of Composition Creation

This paper randomly selects 50 classic piano arrangements from a music website, and studies its creative characteristics, including creative style, creative melody, and creative tonal characteristics. It divides the style into passion, deep, and gentle and creates the melody into rising tempo, ups, and downs, and descending tempo, and the tones are divided into three types: high, medium, and low. In addition, there are many variations of piano music. Table1 shows the A-flat tuning mode, Table 2 is the A1-flat tuning mode, Table 3 is the A2-flat tuning mode, and Table 4 is the A3-flat tuning mode. Each method is applied to a different range or intro, climax, ending, and so on, of the piece.Table 1
Piano variations in A-flat.
Level 1 structureThemeLevel 2 structureIntroductionAConnectBTransitionLevel 3 structureBsubsensory bC dNumber of measures84 4 414 45TonalityB aBa bc big baBa bA baBa baTable 2
Piano variations in A1 flat.
Level 1 structureVariation 1Level 2 structureA1ConnectBTransitionLevel 3 structureA1 b1 b1C dNumber of measures4 4 414 45TonalityBa bc big baBa bA baBa baTable 3
Piano variations in A2 flat.
Level 1 structureVariation 2Level 2 structureA2BTransitionLevel 3 structureA2 b2 b2C dNumber of measures4 4 44 46TonalityBa bc big baBa bAbATable 4
Piano variations in A3 flat.
Level 1 structureVariation 3Level 2 structureA3TransitionEndLevel 3 structureA3 b3 b3Number of measures4 4 464 9TonalityBabAbAThe style characteristics tested in this paper are shown in Figure5. As can be seen from Figure 5, most of the 50 piano arrangements are in a more passionate style. For the Top-k query method, 29 songs are classified, and 30 songs are obtained for the KNN algorithm and the fusion balance algorithm, and the error is 1, and the error is small. It may be because the overall volume of the passionate song is loud, and the sensors are easier to identify. There are three kinds of low-pitched songs with errors, of which 12 are classified by the Top-k query method, 11 are obtained by the KNN algorithm, and nine are obtained by the fusion balance algorithm, this should be due to the inaccurate recognition caused by the low overall volume of the low-pitched song, so the error is larger. In addition, for gentle songs, the Top-k query method and the KNN algorithm get nine songs, while the fusion balance algorithm gets 11 songs. The reason is that the fusion balance algorithm will fuse the overall data information. It may be that the rhythm of the tune is similar, and it will be mistaken for a gentle style.Figure 5
Characteristics of the composition style of piano arrangements.The melody characteristics obtained from the test are shown in Figure6. Among these 50 piano arrangements, most of them are ascending temperament. There are 28 pieces classified by the Top-k query method, 23 pieces obtained by the KNN algorithm, and 29 pieces obtained by the fusion balance algorithm. The error between the KNN algorithm and the fusion balance algorithm is large, which may be because the KNN algorithm has a delay in determining the rising tempo, resulting in an insufficient grasp of the overall melody. There are three kinds of undulating songs with errors. Among them, there are 20 songs classified by the Top-k query method, 16 songs obtained by the KNN algorithm, and 12 songs obtained by the fusion balance algorithm, this is because the calculation speed of each algorithm is different, and the rising and falling speed of the undulating melody is fast, so there is an error. In addition, for songs with falling temperament, the Top-k query method obtains two songs, the KNN algorithm obtains 11 songs, and the fusion balance algorithm obtains nine songs. The error between the Top-k query method and the KNN algorithm is large, and the error is nine songs, which may be because the Top-k query method is not sensitive to the descending law and has a low recognition rate.Figure 6
The characteristics of the melody of the piano arrangement.The tonal characteristics obtained from the test are shown in Figure7. Among the 50 piano arrangements, most of them are high-key pieces, 27 are classified by the Top-k query method, 29 are obtained by the KNN algorithm, and 28 are obtained by the fusion balance algorithm. The three errors are small, indicating that the recognition rate of high-key tunes is high. There are three kinds of middle-key songs with errors, of which 10 are classified by the Top-k query method, 17 are obtained by the KNN algorithm, and 15 are obtained by the fusion balance algorithm. The error between the Top-k query method and the KNN algorithm is the largest, which may be caused by the difference in the recognition range of the midtones between the two. In addition, for low-key songs, the Top-k query method obtained 13 songs, while the KNN algorithm obtained six songs, and the fusion balance algorithm obtained five songs. Therefore, it can be seen that the Top-k query method has a larger range of low-key judgments, so that the number of identifications is larger.Figure 7
Tonal characteristics of piano arrangements.


### 3.2. System Performance Test

In this paper, the system energy consumption of the three algorithms is tested, and the data are analyzed according to the number of nodes and the number of queries. The system energy consumption of different numbers of nodes is shown in Figure8.Figure 8
System energy consumption for different number of nodes.As can be seen from Figure8, as the number of nodes increases, the energy consumption of the three algorithms also increases gradually. Among them, the Top-k query method has the largest energy consumption, which exceeds 400 W when there are 180 nodes. Because the query process is slow, the energy consumption will be more. The energy consumption of the fusion algorithm is low, because it directly obtains the data of the Top-k query method and the KNN algorithm for analysis, and the data calculation amount is small.The system energy consumption for different query times is shown in Figure9. The system energy consumption also increases with the increase of the number of queries. The energy consumption of the Top-k query method is also the largest, followed by KNN, and the fusion algorithm consumes less energy. The reason may be that as the number of queries increases, the Top-k query method will generate more data. In the next query, the additional data need to be calculated at the same time, and the calculation amount is larger and the power consumption is also increasing. The fusion algorithm is the same as the previous one, which is directly analyzed according to the data obtained by the Top-k query method and the KNN algorithm, so the energy consumption is low.Figure 9
System energy consumption for different query times.To further understand this increase in energy consumption, the energy consumption growth rates of different algorithms are plotted as shown in Figure10. With the increase of the number of queries, the energy consumption increase ratio of the Top-k query method also continues to increase, and the KNN algorithm has a fluctuating growth. The fusion algorithm has a large growth rate at the beginning, and then continues to decline. Because with the increase of the number of queries, the energy consumption of the fusion algorithm to obtain data from the two algorithms at the beginning will increase, but the calculation process is simple, so the speed decreases.Figure 10
Energy consumption growth of different algorithms at different query times.


## 3.1. Test of the Characteristics of Composition Creation

This paper randomly selects 50 classic piano arrangements from a music website, and studies its creative characteristics, including creative style, creative melody, and creative tonal characteristics. It divides the style into passion, deep, and gentle and creates the melody into rising tempo, ups, and downs, and descending tempo, and the tones are divided into three types: high, medium, and low. In addition, there are many variations of piano music. Table1 shows the A-flat tuning mode, Table 2 is the A1-flat tuning mode, Table 3 is the A2-flat tuning mode, and Table 4 is the A3-flat tuning mode. Each method is applied to a different range or intro, climax, ending, and so on, of the piece.Table 1
Piano variations in A-flat.
Level 1 structureThemeLevel 2 structureIntroductionAConnectBTransitionLevel 3 structureBsubsensory bC dNumber of measures84 4 414 45TonalityB aBa bc big baBa bA baBa baTable 2
Piano variations in A1 flat.
Level 1 structureVariation 1Level 2 structureA1ConnectBTransitionLevel 3 structureA1 b1 b1C dNumber of measures4 4 414 45TonalityBa bc big baBa bA baBa baTable 3
Piano variations in A2 flat.
Level 1 structureVariation 2Level 2 structureA2BTransitionLevel 3 structureA2 b2 b2C dNumber of measures4 4 44 46TonalityBa bc big baBa bAbATable 4
Piano variations in A3 flat.
Level 1 structureVariation 3Level 2 structureA3TransitionEndLevel 3 structureA3 b3 b3Number of measures4 4 464 9TonalityBabAbAThe style characteristics tested in this paper are shown in Figure5. As can be seen from Figure 5, most of the 50 piano arrangements are in a more passionate style. For the Top-k query method, 29 songs are classified, and 30 songs are obtained for the KNN algorithm and the fusion balance algorithm, and the error is 1, and the error is small. It may be because the overall volume of the passionate song is loud, and the sensors are easier to identify. There are three kinds of low-pitched songs with errors, of which 12 are classified by the Top-k query method, 11 are obtained by the KNN algorithm, and nine are obtained by the fusion balance algorithm, this should be due to the inaccurate recognition caused by the low overall volume of the low-pitched song, so the error is larger. In addition, for gentle songs, the Top-k query method and the KNN algorithm get nine songs, while the fusion balance algorithm gets 11 songs. The reason is that the fusion balance algorithm will fuse the overall data information. It may be that the rhythm of the tune is similar, and it will be mistaken for a gentle style.Figure 5
Characteristics of the composition style of piano arrangements.The melody characteristics obtained from the test are shown in Figure6. Among these 50 piano arrangements, most of them are ascending temperament. There are 28 pieces classified by the Top-k query method, 23 pieces obtained by the KNN algorithm, and 29 pieces obtained by the fusion balance algorithm. The error between the KNN algorithm and the fusion balance algorithm is large, which may be because the KNN algorithm has a delay in determining the rising tempo, resulting in an insufficient grasp of the overall melody. There are three kinds of undulating songs with errors. Among them, there are 20 songs classified by the Top-k query method, 16 songs obtained by the KNN algorithm, and 12 songs obtained by the fusion balance algorithm, this is because the calculation speed of each algorithm is different, and the rising and falling speed of the undulating melody is fast, so there is an error. In addition, for songs with falling temperament, the Top-k query method obtains two songs, the KNN algorithm obtains 11 songs, and the fusion balance algorithm obtains nine songs. The error between the Top-k query method and the KNN algorithm is large, and the error is nine songs, which may be because the Top-k query method is not sensitive to the descending law and has a low recognition rate.Figure 6
The characteristics of the melody of the piano arrangement.The tonal characteristics obtained from the test are shown in Figure7. Among the 50 piano arrangements, most of them are high-key pieces, 27 are classified by the Top-k query method, 29 are obtained by the KNN algorithm, and 28 are obtained by the fusion balance algorithm. The three errors are small, indicating that the recognition rate of high-key tunes is high. There are three kinds of middle-key songs with errors, of which 10 are classified by the Top-k query method, 17 are obtained by the KNN algorithm, and 15 are obtained by the fusion balance algorithm. The error between the Top-k query method and the KNN algorithm is the largest, which may be caused by the difference in the recognition range of the midtones between the two. In addition, for low-key songs, the Top-k query method obtained 13 songs, while the KNN algorithm obtained six songs, and the fusion balance algorithm obtained five songs. Therefore, it can be seen that the Top-k query method has a larger range of low-key judgments, so that the number of identifications is larger.Figure 7
Tonal characteristics of piano arrangements.


## 3.2. System Performance Test

In this paper, the system energy consumption of the three algorithms is tested, and the data are analyzed according to the number of nodes and the number of queries. The system energy consumption of different numbers of nodes is shown in Figure8.Figure 8
System energy consumption for different number of nodes.As can be seen from Figure8, as the number of nodes increases, the energy consumption of the three algorithms also increases gradually. Among them, the Top-k query method has the largest energy consumption, which exceeds 400 W when there are 180 nodes. Because the query process is slow, the energy consumption will be more. The energy consumption of the fusion algorithm is low, because it directly obtains the data of the Top-k query method and the KNN algorithm for analysis, and the data calculation amount is small.The system energy consumption for different query times is shown in Figure9. The system energy consumption also increases with the increase of the number of queries. The energy consumption of the Top-k query method is also the largest, followed by KNN, and the fusion algorithm consumes less energy. The reason may be that as the number of queries increases, the Top-k query method will generate more data. In the next query, the additional data need to be calculated at the same time, and the calculation amount is larger and the power consumption is also increasing. The fusion algorithm is the same as the previous one, which is directly analyzed according to the data obtained by the Top-k query method and the KNN algorithm, so the energy consumption is low.Figure 9
System energy consumption for different query times.To further understand this increase in energy consumption, the energy consumption growth rates of different algorithms are plotted as shown in Figure10. With the increase of the number of queries, the energy consumption increase ratio of the Top-k query method also continues to increase, and the KNN algorithm has a fluctuating growth. The fusion algorithm has a large growth rate at the beginning, and then continues to decline. Because with the increase of the number of queries, the energy consumption of the fusion algorithm to obtain data from the two algorithms at the beginning will increase, but the calculation process is simple, so the speed decreases.Figure 10
Energy consumption growth of different algorithms at different query times.


## 4. Conclusions

This paper first gives an overview of the overall content of the full text, and then introduces the background meaning of the piano arrangement in the introduction. It introduced the characteristics of distributed sensor technology and summarizes the innovation points. The related work part exemplifies some related researches, in order to understand the current situation of the related content researched in this paper. Then in the theoretical research part, the overall structure of distributed sensing technology is firstly introduced, followed by the research process of the characteristics of piano arrangement creation, and then the Top-k query method and KNN algorithm related content and specific calculation formulas are introduced. Finally, it is tested according to Top-k query method, KNN algorithm and its fusion algorithm. The results show that with the increase of the number of nodes, the energy consumption of the three algorithms has also gradually increased, exceeding 400 W at 180 nodes, and the energy consumption increase ratio of Top-k query method is also continuously growing. The KNN algorithm increases relatively ups and down, while the fusion algorithm grows greatly at the beginning, and then continues to slow down. That is, the Top-k query method, the energy consumption of Top-k query method is high, the energy consumption of fusion algorithm is small but unstable, the overall performance of KNN algorithm is stable, and it can better analyze and summarize the characteristics of piano adaptation.



---

*Source: 3086542-2022-08-19.xml*