Clustering cluster set updating method and device, equipment, medium and program product
By performing cluster processing and update on the mobile terminal client, the problem of slow update speed of cluster cluster sets in the prior art is solved, and a cluster cluster set update that quickly adapts to the latest data is realized.
Patent Information
- Application Number
- CN202411928447.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-25
- Publication Date
- 2025-03-28
AI Technical Summary
In the prior art, the update speed of cluster cluster sets is slower and requires the network to obtain from the server side. It is impossible to ensure that the current cluster cluster set is suitable for the latest data.
Clustering processing is performed on the mobile terminal through the client, generating and updating cluster cluster sets. The specific steps include generating an initial cluster cluster set based on the device data and clustering algorithm, performing clustering processing on the new device data, obtaining clustering device data and noise data, and performing clustering processing when the noise data reaches the threshold, and updating the cluster cluster set.
It realizes instant update of cluster cluster cluster collections without relying on the server, improving update speed and adaptability to the latest data.
Smart Images

Figure CN119719825A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of data processing, and in particular to a method, apparatus, device, medium and program product for updating a cluster set. Background Art
[0002] With the development of mobile terminals, more and more users listen to songs through music applications on mobile terminals. In order to better understand the user's operating behavior habits, the music application can cluster the user's operating behavior data into one or more cluster sets after obtaining the user's authorization.
[0003] In the related art, the cluster set is usually sent to the client of the mobile terminal through the network after the classification is completed on the server side.
[0004] However, such clustering cluster sets are updated slowly and need to rely on the network to obtain them from the server before they can be updated. There is no guarantee that the current clustering cluster sets are suitable for the latest data. Summary of the invention
[0005] The present application provides a method, apparatus, device, medium and program product for updating a cluster set. The technical solution includes at least one of the following aspects.
[0006] According to one aspect of an embodiment of the present application, a method for updating a cluster set is provided. The method is executed by a client, and the client runs in a mobile terminal. The method includes:
[0007] Generate a first cluster set based on the i-th device data corresponding to the mobile terminal and a clustering algorithm, where i is a positive integer;
[0008] Perform clustering processing on the (i+1)th device data to obtain clustered device data and noise data, where the clustered device data and the noise data carry corresponding labels, respectively, and the labels are used to indicate the cluster clusters and noise data corresponding to the clustered device data;
[0009] When the amount of noise data reaches a first threshold, clustering is performed on the noise data to obtain at least one first cluster;
[0010] Based on at least one first cluster, updating the first cluster set to a second cluster set;
[0011] Repeat the above update steps to continuously update the cluster set.
[0012] According to another aspect of an embodiment of the present application, a device for updating a cluster set is provided, the device having a client running thereon, and the device comprising:
[0013] A generating module, configured to generate a first clustering cluster set based on the i-th device data corresponding to the mobile terminal and a clustering algorithm, where i is a positive integer;
[0014] A processing module, used to perform clustering processing on the (i+1)th device data to obtain clustered device data and noise data, wherein the clustered device data and the noise data carry corresponding labels respectively, and the labels are used to indicate the cluster clusters and noise data corresponding to the clustered device data;
[0015] A processing module, configured to perform clustering processing on the noise data to obtain at least one first cluster when the amount of the noise data reaches a first threshold;
[0016] An updating module, configured to update the first cluster set to a second cluster set based on at least one first cluster;
[0017] The update module is used to repeat the above update steps to continuously update the cluster set.
[0018] According to another aspect of an embodiment of the present application, a computer device is provided, comprising: a processor and a memory, wherein at least one program is stored in the memory; the processor is configured to execute at least one program in the memory to implement the above-mentioned method for updating the cluster set.
[0019] According to another aspect of an embodiment of the present application, a computer-readable storage medium is provided, in which at least one program is stored. The at least one program is loaded and executed by a processor to implement the above-mentioned method for updating the cluster set.
[0020] According to another aspect of an embodiment of the present application, a computer program product or a computer program is provided, which includes computer instructions, the computer instructions are stored in a computer-readable storage medium, a processor obtains the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to implement the above-mentioned method for updating the clustering cluster set.
[0021] The technical solution provided by the embodiments of the present application may have the following beneficial effects:
[0022] The method generates a first clustering cluster set based on the i-th device data and a clustering algorithm, performs clustering processing on the i+1-th device data to obtain clustered device data and noise data, and then performs clustering processing on the noise data when the amount of noise data reaches a first threshold to obtain at least one first cluster cluster, updates the first clustering cluster set to a second clustering cluster set based on the first cluster cluster, and repeats the above updating steps in this way, thereby continuously updating the clustering cluster set. The update can be completed without interacting with the server side, thereby improving the update speed of the clustering cluster set and improving the possibility of correctly clustering the latest data. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0024] Figure 1 A schematic diagram of a computer system provided by an exemplary embodiment of the present application is shown;
[0025] Figure 2 A schematic diagram showing a method for updating a cluster set provided by an exemplary embodiment of the present application is shown;
[0026] Figure 3 A schematic diagram of a cluster provided by an exemplary embodiment of the present application is shown;
[0027] Figure 4 A flow chart of a method for updating a cluster set provided by an exemplary embodiment of the present application is shown;
[0028] Figure 5 A flow chart of a method for updating a cluster set provided by an exemplary embodiment of the present application is shown;
[0029] Figure 6 A flow chart of a method for updating a cluster set provided by an exemplary embodiment of the present application is shown;
[0030] Figure 7 A schematic diagram of a clustering process provided by an exemplary embodiment of the present application is shown;
[0031] Figure 8 A flow chart of a method for updating a cluster set provided by an exemplary embodiment of the present application is shown;
[0032] Fig. 9 A flow chart of a method for updating a cluster set provided by an exemplary embodiment of the present application is shown;
[0033] Fig.10 A block diagram of a device for updating a cluster set provided by an exemplary embodiment of the present application is shown;
[0034] Fig.11 A schematic diagram of the structure of a mobile terminal provided by an exemplary embodiment of the present application is shown. DETAILED DESCRIPTION
[0035] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.
[0036] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0037] The terms used in this application are for the purpose of describing specific embodiments only and are not intended to limit this application. The singular forms of "a", "said" and "the" used in this application and the appended claims are also intended to include plural forms unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.
[0038] It should be noted that the object information (including but not limited to object device information, object personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the object or fully authorized by all parties, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.
[0039] It should be understood that, although the terms first, second, etc. may be used in the present application to describe various information, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present application, the first parameter may also be referred to as the second parameter, and similarly, the second parameter may also be referred to as the first parameter. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0040] First, some of the terms used in this application are explained:
[0041] Clustering: refers to grouping the data in a dataset into multiple clusters, so that the similarity between data in the same cluster is higher, while the similarity between data in different clusters is lower.
[0042] Normalization: refers to scaling the data so that the scaled data falls into a smaller range, such as [0,1] or [-1,1]. The purpose of normalization is to eliminate the impact of different dimensions and numerical ranges of data, making different features comparable, and also helping to improve the convergence speed and performance of some algorithms.
[0043] Figure 1 The schematic diagram of a computer system provided by an exemplary embodiment of the present application is shown. The computer system 100 includes: a terminal 110 and a server 120 .
[0044] The terminal 110 is installed and runs an application 111 that supports song playback. The application 111 includes any one of a listening application, a song application, a singing application, a live broadcast application, a short video application, a video on demand application, a social application, an office application, a game application, a takeaway application, an online shopping application, a financial application, a life service application, a navigation application, a medical application, a learning application, and a mini program. In some embodiments, the application 111 is a client. When the terminal 110 runs the application 111, the user interface of the application 111 is displayed on the screen of the terminal 110. The terminal 110 is a terminal used by the user 112, and the user account of the user 112 can be logged in to the application 111. In the embodiment of the present application, the words user, user account, account, user, etc. used to represent the subject using the application 111 have the same meaning. The terminal 110 can refer to one of multiple terminals. Optionally, the device type of the terminal 110 includes: at least one of a smart phone, a tablet computer, a smart watch, an e-book reader, an MP3 player, an MP4 player, and a laptop computer.
[0045] The terminal 110 is connected to the server 120 via a wireless network or a wired network.
[0046] The server 120 includes at least one of a single server, multiple servers, a cloud computing platform, and a virtualization center. The server 120 is used to provide background services for the application 111 that supports song playback. Optionally, the server 120 undertakes the main computing work and the terminal 110 undertakes the secondary computing work; or, the server 120 undertakes the secondary computing work and the terminal 110 undertakes the main computing work; or, the server 120 and the terminal 110 adopt a distributed computing architecture for collaborative computing.
[0047] In some embodiments, the server 120 includes a processor 121, a user account database 122, a song providing module 123, and a user-oriented input / output interface (I / O Interface) 124. The processor 121 is used to load instructions stored in the server 120 and process data in the user account database 122 and the song providing module 123; the user account database 122 is used to store data of user accounts used by the terminal 110 and other terminals, such as the user account's avatar, the user account's nickname, the virtual currency owned by the user account, etc.; the song providing module 123 is used to provide audio files of songs; the user-oriented I / O interface 124 is used to establish communication and exchange data with the terminal 110 through a wireless network or a wired network.
[0048] In combination with the above introduction to the implementation environment involved in the present application, the method provided in the embodiment of the present application will be described below.
[0049] With the development of mobile terminals, more and more users listen to songs through music applications on mobile terminals. In order to better understand the user's operating behavior habits, music applications can cluster the user's operating behavior data into one or more cluster sets after obtaining user authorization. In related technologies, cluster sets are usually sent to the client of the mobile terminal through the network after the classification is completed on the server side. However, such cluster sets have a slow update speed and need to rely on the network to obtain from the server side before they can be updated. There is no guarantee that the current cluster set is suitable for the latest data.
[0050] In order to solve the above problems, the present application proposes a method for updating a cluster set. Figure 2 A schematic diagram of a method for updating a cluster set provided by an exemplary embodiment of the present application is shown. The method is executed by a client, and the client runs in a mobile terminal. The method includes at least one of the following steps.
[0051] Step 210: Obtain the i-th device data.
[0052] In some embodiments, the i-th device data includes: at least one of first data, second data, third data, fourth data, fifth data, and sixth data;
[0053] Among them, the first data is used to indicate the signal strength of the mobile terminal, the second data is used to indicate the remaining power of the mobile terminal, the third data is used to indicate the charging status of the mobile terminal, the fourth data is used to indicate the song playing status of the mobile terminal, the fifth data is used to indicate the Bluetooth device connected to the mobile terminal; the sixth data is used to indicate the current posture of the mobile terminal.
[0054] Exemplarily, the i-th device data includes: sensor data 201 , Bluetooth data 202 , Wireless Fidelity (WiFi) data 203 , battery data 204 , and application (APP) status data 205 .
[0055] Among them, sensor data 201 is used to indicate the current posture of the mobile terminal, Bluetooth data 202 is used to indicate the Bluetooth device connected to the mobile terminal, WiFi data 203 is used to indicate the signal strength of the mobile terminal, battery data 204 is used to indicate the remaining power of the mobile terminal, and APP status data 205 is used to indicate the song playing status of the mobile terminal.
[0056] For example, the sensor data 201 includes at least one of first sensor data, second sensor data, third sensor data, and fourth sensor data. The first sensor data is collected by a gravity sensor of the mobile terminal, the second sensor data is collected by an acceleration sensor of the mobile terminal, the third sensor data is collected by an azimuth sensor of the mobile terminal, and the fourth sensor data is collected by a gyroscope sensor of the mobile terminal. The current posture of the mobile terminal is indicated by using at least one of the first to fourth sensor data.
[0057] For another example, the value of Bluetooth data 202 is the index of the Bluetooth device to which the mobile terminal is connected; the value of WiFi data 203 is 0-4, and the larger the value, the stronger the signal strength of the mobile terminal; the value of battery data 204 is 1-5, and the larger the value, the more remaining power the mobile terminal has; the value of APP status data 205 is 0 or 1, which is used to indicate whether the mobile terminal is currently playing a song, and a value of 0 indicates that the mobile terminal is not currently playing a song, and a value of 1 indicates that the mobile terminal is currently playing a song.
[0058] Step 220: Perform normalization processing.
[0059] In some embodiments, normalization processing is performed on the i-th device data to obtain normalized features.
[0060] Exemplarily, normalization processing is performed on sensor data 201 in the i-th device data. Taking sensor data 201 as the second sensor data collected by the acceleration sensor of the mobile terminal as an example, the second sensor data is first preprocessed, for example, the second sensor data is converted according to a preset indicator to obtain the preprocessed second sensor data, including: the number of acceleration peaks, the average interval of acceleration peaks, the standard deviation of the interval of acceleration peaks, the average value of the Euclidean distance of acceleration, and the standard deviation of the Euclidean distance of acceleration. Afterwards, normalization processing is performed on the preprocessed second sensor data to obtain normalized features.
[0061] Step 230: Generate a first cluster set.
[0062] In some embodiments, a first clustering cluster set is generated based on the normalized features and the clustering algorithm. The clustering cluster set may also be referred to as a clustering model, which is not limited in the embodiments of the present application.
[0063] Optionally, the clustering algorithm is a density-based clustering algorithm, such as a density-based spatial clustering algorithm with noise (Density-Based Spatial Clustering of Applications with Noise, DBSCAN). DBSCAN implements clustering based on the density of data points. If the density of data points in an area exceeds a certain threshold, DBSCAN will divide these data points into a cluster. At the same time, DBSCAN can also identify noise points in the data set (i.e., data points that do not belong to any cluster). For example, when analyzing the second sensor data (acceleration data), acceleration data points with high density may be clustered into clusters, while single acceleration data points far away from other acceleration data points may be regarded as noise points.
[0064] Figure 3 FIG. 1 shows a schematic diagram of a cluster provided by an exemplary embodiment of the present application. Figure 3 In the example, the client performs clustering through DBSCAN. The parameter Epsilon (eps, ε) of DBSCAN is set to 0.5. The parameter Epsilon is a parameter used to determine the neighborhood radius of a point, that is, all points within the ε range of a point are considered to be neighbors of the point. The parameter MinPts (minimum number of points) of DBSCAN is set to 10. The parameter MinPts indicates the number of points that must be included in the ε neighborhood of a point in order for the point to become a core point, or a cluster center. Clustering through DBSCAN results in 6 types of labels: label 1, label 2, label 3, label 4, label 5, and label 6. Among them, label 1 corresponds to cluster 301, label 2 corresponds to cluster 302, label 3 corresponds to cluster 303, label 4 corresponds to cluster 304, label 5 corresponds to cluster 305, and label 6 corresponds to cluster 306.
[0065] Step 240: Perform clustering processing on the (i+1)th device data.
[0066] In some embodiments, clustering processing is performed on the (i+1)th device data to obtain clustered device data and noise data, the clustered device data and the noise data respectively carry corresponding labels, and the labels are used to indicate the cluster clusters and noise data corresponding to the clustered device data.
[0067] The (i+1)th device data includes multiple groups of device data (also referred to as multiple pieces of device data), and performing clustering processing on the (i+1)th device data refers to performing clustering processing on the multiple groups of device data.
[0068] For example, the i+1th device data includes 200 groups of device data, each of which includes sensor data and APP status data. Clustering is performed on the i+1th device data, that is, clustering is performed on the 200 groups of device data to obtain 180 groups of clustered device data and 20 groups of noise data, wherein the clustered device data includes 100 groups of data corresponding to label 1 and 80 groups of data corresponding to label 2.
[0069] The cluster center corresponding to the 100 groups of data corresponding to label 1 is (0.6, 1), that is, the value of the sensor data is 0.6, and the value of the APP status data is 1. For example, data 1 (0.599, 1) and data 2 (0.601, 1) are both data corresponding to label 1.
[0070] The cluster center corresponding to the 80 groups of data corresponding to label 2 is (0.1, 0), that is, the value of the sensor data is 0.1, and the value of the APP status data is 0. For example, data 3 (0.101, 0) and data 4 (0.102, 0) are both data corresponding to label 2.
[0071] In some embodiments, the label value corresponding to the noise data is -1.
[0072] For example, data 5 (0.255, 1) and data 6 (0.623, 0) are far away from the two cluster centers in the above example, and both are noise data with a label value of -1.
[0073] In some embodiments, the client includes a clustering database 200 , and the method further includes: storing the clustering device data and the noise data in the clustering database 200 .
[0074] Step 250: When the amount of noise data reaches a first threshold, clustering processing is performed on the noise data.
[0075] In some embodiments, the step of storing the clustering device data and the noise data in the clustering database 200 triggers the client to determine whether the amount of noise data reaches a first threshold. If the amount of noise data does not reach the first threshold, the client does not perform any action; if the amount of noise data reaches the first threshold, the client performs clustering processing on the noise data to obtain at least one first clustering cluster.
[0076] Performing clustering processing on noise data refers to performing clustering processing on noise data in multiple groups of device data. For example, the i+1th device data includes 200 groups of device data. After performing clustering processing on the i+1th device data, 20 groups of noise data are obtained. When the number of noise data reaches a first threshold, clustering processing is performed on the noise data; when the number of noise data does not reach the first threshold, no processing is performed.
[0077] The first threshold may be a preset value, for example, set to 100 groups (also referred to as 100 items). For example, when the number of noise data reaches 100 groups, clustering is performed on the noise data to obtain a first cluster, and the label value corresponding to the first cluster is 7.
[0078] In some embodiments, when the noise ratio reaches a first threshold, clustering processing is performed on the noise data, where the noise ratio is the ratio of the noise data to the sum of the clustering device data and the noise data.
[0079] For example, the first threshold is 20%, and there are 20 groups of noise data and 80 groups of clustering device data. Then, the noise ratio is 20% at this time, reaching the first threshold, so clustering processing is performed on the noise data.
[0080] In some other embodiments, when the noise data meets the clustering condition, clustering processing is performed on the noise data. The clustering condition includes but is not limited to: the amount of noise data reaches the average amount of different types of data in the clustering device data; or the amount of noise data reaches 90% of the average amount of different types of data in the clustering device data. This embodiment of the application is not limited to this.
[0081] For example, the clustering device data includes 20 groups of data corresponding to label 1, 40 groups of data corresponding to label 2, and 30 groups of data corresponding to label 3, that is, the average number of different types of data in the clustering device data is 30 groups. Then, when the number of noise data reaches 30 groups, clustering processing is performed on the noise data.
[0082] In some embodiments, when the amount of noise data reaches a first threshold, clustering processing is performed on the noise data to obtain at least one first cluster and remaining noise data.
[0083] Generally, after performing clustering processing on noise data, there will still be noise data that cannot be clustered. This part of noise data can be called residual noise data.
[0084] Step 260: Update the first cluster set to a second cluster set.
[0085] In some embodiments, based on at least one first cluster, a first set of clusters is updated to a second set of clusters.
[0086] Exemplarily, the first cluster set includes clusters corresponding to label 1, label 2, label 3, label 4, label 5, and label 6, and when the label corresponding to the first cluster is 7, the updated second cluster set includes clusters corresponding to label 1, label 2, label 3, label 4, label 5, label 6, and label 7.
[0087] Step 270: Repeat the above updating steps to continuously update the cluster set.
[0088] For example, clustering is performed on the (i+2)th device data to obtain first clustering device data and first noise data, wherein the first clustering device data and the first noise data respectively carry corresponding labels, and the labels are used to indicate the clustering cluster corresponding to the first clustering device data and the first noise data;
[0089] When the sum of the quantities of the first noise data and the remaining noise data reaches a first threshold, clustering is performed on the first noise data and the remaining noise data to obtain at least one third cluster.
[0090] Based on at least one third cluster, the second cluster set is updated to a third cluster set.
[0091] By repeating the above updating steps, the second cluster set can be updated to the third cluster set. Similarly, the third cluster set can be updated to the fourth cluster set, and so on.
[0092] To summarize, the method provided in this embodiment generates a first clustering cluster set based on the i-th device data and the clustering algorithm, and then performs clustering processing on the i+1-th device data to obtain clustered device data and noise data. Then, when the amount of noise data reaches a first threshold, clustering processing is performed on the noise data to obtain at least one first cluster cluster, and the first clustering cluster set is updated to a second clustering cluster set based on the first cluster cluster, and so on, repeating the above updating steps, thereby continuously updating the clustering cluster set, and the update can be completed without interacting with the server side, thereby improving the update speed of the clustering cluster set and improving the possibility of correctly clustering the latest data.
[0093] The method provided in this embodiment also performs normalization processing on the i-th device data to obtain normalized features, generates a first clustering set based on the normalized features and a clustering algorithm, simplifies the calculation of the i-th device data, and improves the efficiency of generating the first clustering set.
[0094] The method provided in this embodiment also lists different types of i-th device data and adapts different types of i-th device data in different usage scenarios to meet actual needs, thereby improving the applicability of the method.
[0095] Figure 4 A flowchart of a method for updating a cluster set provided by an exemplary embodiment of the present application is shown. The method is executed by a client, and the client runs in a mobile terminal. The method includes at least one of the following steps.
[0096] Step 410: Generate a first cluster set based on the i-th device data corresponding to the mobile terminal and a clustering algorithm, where i is a positive integer.
[0097] In the embodiment of the present application, the cluster set may also be referred to as a cluster model, which is not limited. That is, step 410 may also be expressed as: generating a first cluster model based on the i-th device data corresponding to the mobile terminal and the clustering algorithm.
[0098] The client in this application runs in a mobile terminal, which includes a computer device that can be used while on the move. The client includes any one of a listening client, a song client, a singing client, a live client, a short video client, a video-on-demand client, a social client, an office client, a game client, a takeaway client, an online shopping client, a financial client, a life service client, a navigation client, a medical client, a learning client, and a mini-program.
[0099] In some embodiments, the i-th device data is an i-th batch of device data, including multiple groups of device data.
[0100] Device data is data used to represent the status of a mobile terminal. Each set of device data includes, but is not limited to, sensor data, Bluetooth data, WiFi data, battery data, APP status data, and other data.
[0101] Optionally, the clustering algorithm is a density-based clustering algorithm, such as DBSCAN. DBSCAN implements clustering based on the density of data points. If the density of data points in an area exceeds a certain threshold, DBSCAN will divide these data points into a cluster. At the same time, DBSCAN can also identify noise points in the data set (i.e., data points that do not belong to any cluster). For example, when analyzing the distribution of cities on a map, high-density urban areas can be clustered into clusters, while individual cities isolated in large open areas may be regarded as noise points. It should be noted that in addition to using DBSCAN, a hierarchical density-based spatial clustering algorithm with noise (Hierarchical Density-Based Spatial Clustering of Applications with Noise, HDBSCAN) or a clustering algorithm based on point sorting to determine the cluster structure (Ordering Points To Identify the Clustering Structure, OPTICS) can also be used. The embodiments of the present application do not limit the clustering algorithm used.
[0102] For example, in Figure 3 In the example, the first cluster set includes clusters corresponding to label 1, label 2, label 3, label 4, label 5, and label 6.
[0103] Step 420: Perform clustering processing on the (i+1)th device data to obtain clustered device data and noise data.
[0104] The clustering device data and the noise data carry corresponding labels respectively, and the labels are used to indicate the clustering clusters and noise data corresponding to the clustering device data.
[0105] Clustering refers to grouping the data in a dataset into multiple clusters, so that the similarity between data in the same cluster is high, while the similarity between data in different clusters is low. Clustered device data is data that has a high similarity with data in a certain cluster, and noise data is data that has a low similarity with data in all clusters.
[0106] The (i+1)th device data includes multiple groups of device data (also referred to as multiple pieces of device data), and performing clustering processing on the (i+1)th device data refers to performing clustering processing on the multiple groups of device data.
[0107] For example, the i+1th device data includes 200 groups of device data, each of which includes sensor data and APP status data. Clustering is performed on the i+1th device data, that is, clustering is performed on the 200 groups of device data to obtain 180 groups of clustered device data and 20 groups of noise data, wherein the clustered device data includes 100 groups of data corresponding to label 1 and 80 groups of data corresponding to label 2.
[0108] The cluster center corresponding to the 100 groups of data corresponding to label 1 is (0.6, 1), that is, the value of the sensor data is 0.6, and the value of the APP status data is 1. For example, data 1 (0.599, 1) and data 2 (0.601, 1) are both data corresponding to label 1.
[0109] The cluster center corresponding to the 80 groups of data corresponding to label 2 is (0.1, 0), that is, the value of the sensor data is 0.1, and the value of the APP status data is 0. For example, data 3 (0.101, 0) and data 4 (0.102, 0) are both data corresponding to label 2.
[0110] Data 5 (0.255, 1) and data 6 (0.623, 0) are far away from the above two cluster centers and are both noise data with a label value of -1.
[0111] Step 430: When the amount of noise data reaches a first threshold, clustering is performed on the noise data to obtain at least one first cluster.
[0112] Performing clustering processing on noise data refers to performing clustering processing on noise data in multiple groups of device data. For example, the i+1th device data includes 200 groups of device data. After performing clustering processing on the i+1th device data, 20 groups of noise data are obtained. When the number of noise data reaches a first threshold, clustering processing is performed on the noise data; when the number of noise data does not reach the first threshold, no processing is performed.
[0113] In some embodiments, the first threshold is a preset value, for example, set to 100 groups (also referred to as 100 items).
[0114] When the amount of noise data reaches the first threshold, the first cluster obtained by clustering is relatively accurate. If the amount of noise data is lower than the first threshold, clustering may fail to obtain the first cluster or the obtained first cluster may be inaccurate.
[0115] Exemplarily, when the number of noise data reaches 100 groups, clustering is performed on the noise data to obtain one first cluster, and the label value corresponding to the first cluster is 7.
[0116] In some embodiments, when the amount of noise data reaches a first threshold, clustering processing is performed on the noise data to obtain at least one first cluster and remaining noise data.
[0117] Generally, after performing clustering processing on noise data, there will still be noise data that cannot be clustered. This part of noise data can be called residual noise data.
[0118] Step 440: Based on at least one first cluster, update the first cluster set to a second cluster set.
[0119] Exemplarily, the first cluster set includes clusters corresponding to label 1, label 2, label 3, label 4, label 5, and label 6, and when the label corresponding to the first cluster is 7, the updated second cluster set includes clusters corresponding to label 1, label 2, label 3, label 4, label 5, label 6, and label 7.
[0120] Step 450: Repeat the above updating steps to continuously update the cluster set.
[0121] For example, clustering is performed on the (i+2)th device data to obtain first clustering device data and first noise data, wherein the first clustering device data and the first noise data respectively carry corresponding labels, and the labels are used to indicate the clustering cluster corresponding to the first clustering device data and the first noise data;
[0122] When the sum of the quantities of the first noise data and the remaining noise data reaches a first threshold, clustering is performed on the first noise data and the remaining noise data to obtain at least one third cluster.
[0123] Based on at least one third cluster, the second cluster set is updated to a third cluster set.
[0124] By repeating the above updating steps, the second cluster set can be updated to the third cluster set. Similarly, the third cluster set can be updated to the fourth cluster set, and so on.
[0125] To summarize, the method provided in this embodiment generates a first clustering cluster set based on the i-th device data and the clustering algorithm, and then performs clustering processing on the i+1-th device data to obtain clustered device data and noise data. Then, when the amount of noise data reaches a first threshold, clustering processing is performed on the noise data to obtain at least one first cluster cluster, and the first clustering cluster set is updated to a second clustering cluster set based on the first cluster cluster, and so on, repeating the above updating steps, thereby continuously updating the clustering cluster set, and the update can be completed without interacting with the server side, thereby improving the update speed of the clustering cluster set and improving the possibility of correctly clustering the latest data.
[0126] Figure 5 A flowchart of a method for updating a cluster set provided by an exemplary embodiment of the present application is shown. The method is executed by a client, and the client runs in a mobile terminal. The method includes at least one of the following steps.
[0127] Step 411: Obtain the i-th device data.
[0128] In some embodiments, the i-th device data includes multiple sets of device data, and obtaining the i-th device data includes at least one of the following:
[0129] In response to the operation of starting the client, obtaining a set of device data in the i-th device data;
[0130] In response to an operation of clicking a first control, obtaining a set of device data in the i-th device data, where the first control is any control included in the client;
[0131] In response to an operation of switching the currently played music, a set of device data in the i-th device data is acquired.
[0132] For example, in response to the operation of starting the client, a set of device data is obtained, and the set of device data includes: sensor data, Bluetooth data, WiFi data, battery data, APP status data, etc. In response to the operation of clicking the first control, another set of device data is obtained; in response to the operation of switching the currently playing music, another set of device data is obtained, and the multiple sets of device data obtained constitute the i-th device data.
[0133] Exemplarily, when the user starts the client, the client obtains a set of device data in the i-th device data; or, when the user clicks the play control of the client, the client obtains a set of device data in the i-th device data; or, when the user chooses to jump to the next song, the client obtains a set of device data in the i-th device data.
[0134] The scenarios for obtaining the i-th device data may also include other scenarios, which are not limited in the embodiments of the present application. By listing different scenarios for obtaining the i-th device data, the method for obtaining the i-th device data is adapted according to the actual usage scenarios to meet actual needs and improve the applicability of the method.
[0135] In some embodiments, the i-th device data and the (i+1)-th device data are divided based on a preset rule.
[0136] For example, the preset rule is to divide the i-th device data and the i+1-th device data based on the specified quantity threshold. For example, if the quantity threshold is 100 groups, then the i-th device data to the i+99th device data obtained by the client are the i-th device data, and the i+100th device data to the i+199th device data obtained are the i+1-th device data.
[0137] For another example, the preset rule is to divide the i-th device data and the i+1-th device data based on the specified period. For example, if the specified period is 10 seconds, then the device data acquired from the i-th second to the i+9th second is the i-th device data, and the device data acquired from the i+10th second to the i+19th second is the i+1-th device data. The embodiments of the present application do not limit the preset rules.
[0138] In some embodiments, the i-th device data includes: at least one of first data, second data, third data, fourth data, fifth data, and sixth data;
[0139] Among them, the first data is used to indicate the signal strength of the mobile terminal, the second data is used to indicate the remaining power of the mobile terminal, the third data is used to indicate the charging status of the mobile terminal, the fourth data is used to indicate the song playing status of the mobile terminal, the fifth data is used to indicate the Bluetooth device connected to the mobile terminal; the sixth data is used to indicate the current posture of the mobile terminal.
[0140] Exemplarily, the first data is used to indicate the signal strength of the mobile terminal, such as the wireless local area network (WLAN) signal strength of the mobile terminal. For example, the value of the first data is 0-4, and a larger value indicates a stronger signal strength of the mobile terminal.
[0141] The second data is used to indicate the remaining power of the mobile terminal. For example, the value of the second data is 1-5, and a larger value indicates more remaining power of the mobile terminal.
[0142] The third data is used to indicate the charging status of the mobile terminal. For example, the value of the third data is 1-5, 1 indicates that the mobile terminal is performing fast wired charging, 2 indicates that the mobile terminal is performing slow wired charging, 3 indicates that the mobile terminal is performing fast wireless charging, 4 indicates that the mobile terminal is performing slow wireless charging, and 5 indicates that the mobile terminal is not charging.
[0143] The fourth data is used to indicate the song playing state of the mobile terminal. For example, the value of the fourth data is 0 or 1, which is used to indicate whether the mobile terminal is currently playing a song. The value of the fourth data is 0 to indicate that the mobile terminal is not currently playing a song, and the value of the fourth data is 1 to indicate that the mobile terminal is currently playing a song.
[0144] The fifth data is used to indicate the Bluetooth device connected to the mobile terminal. For example, the value of the fifth data is the index of the Bluetooth device connected to the mobile terminal.
[0145] The sixth data includes at least one of first sensor data, second sensor data, third sensor data and fourth sensor data, wherein the first sensor data is collected by a gravity sensor of the mobile terminal, the second sensor data is collected by an acceleration sensor of the mobile terminal, the third sensor data is collected by an azimuth sensor of the mobile terminal, and the fourth sensor data is collected by a gyroscope sensor of the mobile terminal.
[0146] Step 412: When the amount of the i-th device data reaches a second threshold, clustering processing is performed on the i-th device data based on a clustering algorithm to obtain at least one second cluster.
[0147] In some embodiments, the second threshold is a preset value, for example, set to 500 groups.
[0148] When the amount of initial device data reaches the second threshold, the second cluster obtained by clustering is more accurate. If clustering is performed when the amount of initial device data is lower than the second threshold, the second cluster may not be obtained or the obtained second cluster may be inaccurate.
[0149] For example, when the number of the i-th device data reaches 500 groups, clustering is performed on the i-th device data to obtain 6 second clusters, and the label values corresponding to the second clusters are 1 to 6 respectively.
[0150] The i-th device data includes multiple groups of device data (also referred to as multiple pieces of device data), and performing clustering processing on the i-th device data refers to performing clustering processing on the multiple groups of device data.
[0151] For example, the i-th device data includes 500 sets of device data, each of which includes sensor data and APP status data. Clustering is performed on the i+1-th device data, that is, clustering is performed on the 500 sets of device data to obtain 450 sets of clustered device data and 50 sets of noise data. The clustered device data includes multiple sets of data corresponding to labels 1 to 6. For specific clustering details, refer to Figure 2 Step 240 of the embodiment will not be described in detail here.
[0152] Step 413: Based on at least one second cluster, a first cluster set is obtained.
[0153] For example, based on the six second clusters, a first cluster set is obtained. When clustering is performed on subsequent device data, it will be clustered into one of the six second clusters, or processed as noise data.
[0154] Step 420: Perform clustering processing on the (i+1)th device data to obtain clustered device data and noise data.
[0155] Specific implementation details refer to Figure 4 Step 420 of the embodiment will not be described in detail here.
[0156] Step 430: When the amount of noise data reaches a first threshold, clustering is performed on the noise data to obtain at least one first cluster.
[0157] For example, when the number of noise data reaches 100 groups, clustering is performed on the noise data to obtain one first cluster, and the label value corresponding to the first cluster is 7.
[0158] In some embodiments, when the noise ratio reaches a first threshold, clustering processing is performed on the noise data, where the noise ratio is the ratio of the noise data to the sum of the clustering device data and the noise data.
[0159] For example, the first threshold is 20%, and there are 20 groups of noise data and 80 groups of clustering device data. Then, the noise ratio is 20% at this time, reaching the first threshold, so clustering processing is performed on the noise data.
[0160] In some other embodiments, when the noise data meets the clustering condition, clustering processing is performed on the noise data. The clustering condition includes but is not limited to: the amount of noise data reaches the average amount of different types of data in the clustering device data; or the amount of noise data reaches 90% of the average amount of different types of data in the clustering device data. This embodiment of the application is not limited to this.
[0161] For example, the clustering device data includes 20 groups of data corresponding to label 1, 40 groups of data corresponding to label 2, and 30 groups of data corresponding to label 3, that is, the average number of different types of data in the clustering device data is 30 groups. Then, when the number of noise data reaches 30 groups, clustering processing is performed on the noise data.
[0162] Step 441: Based on at least one first cluster and at least one second cluster, update the first cluster set to a second cluster set.
[0163] For example, based on 1 first cluster and 6 second clusters, the first cluster set is updated to the second cluster set. The clusters included in the first cluster set correspond to label 1, label 2, label 3, label 4, label 5, label 6, and the updated second cluster set includes clusters corresponding to label 1, label 2, label 3, label 4, label 5, label 6, label 7.
[0164] Step 450: Repeat the above updating steps to continuously update the cluster set.
[0165] Specific implementation details refer to Figure 4 Step 450 of the embodiment will not be described in detail here.
[0166] In summary, the method provided in this embodiment, by enumerating different types of i-th device data, adapts different types of i-th device data in different usage scenarios, meets actual needs, and improves the applicability of the method.
[0167] The method provided in this embodiment also performs clustering processing on the i-th device data based on a clustering algorithm when the amount of i-th device data reaches a second threshold, so as to obtain at least one second cluster cluster, thereby improving the accuracy of the at least one second cluster cluster obtained, and further improving the accuracy of the first cluster cluster set obtained subsequently.
[0168] Figure 6 A flowchart of a method for updating a cluster set provided by an exemplary embodiment of the present application is shown. The method is executed by a client, and the client runs in a mobile terminal. The method includes at least one of the following steps.
[0169] Step 405: Perform normalization processing on the i-th device data corresponding to the mobile terminal to obtain normalized features.
[0170] Normalization refers to scaling the data so that the scaled data falls into a smaller range, such as [0, 1] or [-1, 1].
[0171] In some embodiments, normalization processing is performed on the i-th device data corresponding to the mobile terminal according to a feature processing code instance to obtain normalized features, and the feature processing code instance is a code instance pre-registered in the software development framework.
[0172] Within the software development framework, by pre-registering (i.e., pre-defining and storing) some code instances or functions for feature processing, when data needs to be processed (such as normalization), these feature processing code instances can be directly called, thereby reducing duplication of work and improving the efficiency of feature processing.
[0173] Figure 7 A schematic diagram of a clustering process provided by an exemplary embodiment of the present application is shown.
[0174] The following description is made by taking the i-th device data as the original data 701 collected by the acceleration sensor as an example. Figure 7In the example, the client obtains the raw data 701 collected by the acceleration sensor, and then performs preprocessing, such as converting the raw data 701 into an index according to a preset index, and determining the data feature 702 corresponding to the raw data 701. The data feature 702 includes: the number of peaks, the average interval of peaks, the standard deviation of the peak interval, the average value of the Euclidean distance, and the standard deviation of the Euclidean distance. The client then normalizes the data feature 702 to obtain the normalized feature 703.
[0175] Step 415: Generate a first clustering cluster set based on the normalized features and the clustering algorithm.
[0176] like Figure 7 As shown, the client clusters the normalized features 703 using a clustering algorithm such as DBSCAN to generate a first cluster set.
[0177] Exemplarily, 0.060241 and 0.605392 are clustered into one cluster, and the corresponding label value is 1; 0.133929 and 0.136027 are clustered into one cluster, and the corresponding label value is 2; 0.562824 is noise data, and the corresponding label value is -1.
[0178] Step 420: Perform clustering processing on the (i+1)th device data to obtain clustered device data and noise data.
[0179] Specific implementation details refer to Figure 4 Step 420 of the embodiment will not be described in detail here.
[0180] Step 430: When the amount of noise data reaches a first threshold, clustering is performed on the noise data to obtain at least one first cluster.
[0181] Specific implementation details refer to Figure 4 Step 430 of the embodiment will not be described in detail here.
[0182] Step 440: Based on at least one first cluster, update the first cluster set to a second cluster set.
[0183] Specific implementation details refer to Figure 4 Step 440 of the embodiment will not be described in detail here.
[0184] Step 450: Repeat the above updating steps to continuously update the cluster set.
[0185] Specific implementation details refer to Figure 4 Step 450 of the embodiment will not be described in detail here.
[0186] In summary, the method provided in this embodiment performs normalization processing on the i-th device data to obtain normalized features, generates a first clustering set based on the normalized features and a clustering algorithm, simplifies the calculation of the i-th device data, and improves the efficiency of generating the first clustering set.
[0187] Figure 8 A flowchart of a method for updating a cluster set provided by an exemplary embodiment of the present application is shown. The method is executed by a client, the client runs in a mobile terminal, the client includes a cluster database, and the method includes at least one of the following steps.
[0188] Step 410: Generate a first cluster set based on the i-th device data corresponding to the mobile terminal and a clustering algorithm.
[0189] Specific implementation details refer to Figure 4 Step 410 of the embodiment will not be described in detail here.
[0190] Step 420: Perform clustering processing on the (i+1)th device data to obtain clustered device data and noise data.
[0191] Specific implementation details refer to Figure 4 Step 420 of the embodiment will not be described in detail here.
[0192] Step 425: Store the clustering device data and noise data into the clustering database.
[0193] Among them, the label value corresponding to the noise data is -1.
[0194] The clustering database is a local database used to store clustering device data and noise data. The label value corresponding to the noise data is -1, and the label value corresponding to the clustering device data is 1, 2, 3, 4, etc., so as to accurately distinguish the clustering device data from the noise data.
[0195] Step 435: After the clustering device data and the noise data are stored in the clustering database, when the amount of the noise data reaches a first threshold, clustering processing is performed on the noise data to obtain at least one first cluster.
[0196] The step of storing the clustering device data and the noise data in the clustering database triggers the client to determine whether the amount of the noise data reaches a first threshold.
[0197] When the amount of noise data does not reach the first threshold, the client does not perform any action; when the amount of noise data reaches the first threshold, the client performs clustering processing on the noise data to obtain at least one first clustering cluster.
[0198] The first threshold may be a preset value, for example, set to 100 groups. For example, when the number of noise data reaches 100 groups, clustering is performed on the noise data to obtain a first cluster, and the label value corresponding to the first cluster is 7.
[0199] Step 440: Based on at least one first cluster, update the first cluster set to a second cluster set.
[0200] Specific implementation details refer to Figure 4 Step 440 of the embodiment will not be described in detail here.
[0201] Step 450: Repeat the above updating steps to continuously update the cluster set.
[0202] Specific implementation details refer to Figure 4 Step 450 of the embodiment will not be described in detail here.
[0203] To sum up, the method provided in this embodiment stores the clustering device data and noise data in the local clustering database of the client, thereby not relying on an external database server, thereby ensuring the security of the clustering device data and noise data, while improving the storage and / or reading speed of the clustering device data and noise data, thereby improving the update speed of the clustering cluster set.
[0204] In the above embodiment, steps with the same sequence number can be considered as the same step. Figure 4 The corresponding embodiments, Figure 5 The corresponding embodiments, Figure 6 The corresponding embodiments and Figure 8 The corresponding embodiments may be implemented individually or in combination, and this application does not limit this.
[0205] For example, the i-th device data is the first batch of device data (initial device data) acquired by the mobile terminal, and the i+1-th device data is the subsequent device data acquired by the mobile terminal. Fig. 9 A flowchart of a method for updating a cluster set provided by an exemplary embodiment of the present application is shown. The method includes at least one of the following steps.
[0206] Step 910: Obtain initial device data.
[0207] In some embodiments, the initial device data includes: sensor data 201 , Bluetooth data 202 , WiFi data 203 , battery data 204 , and APP status data 205 .
[0208] Specific implementation details refer to Figure 2 Step 210 of the embodiment will not be described in detail here.
[0209] Step 920: Perform normalization processing.
[0210] In some embodiments, a normalization process is performed on the initial device data to obtain normalized features.
[0211] Specific implementation details refer to Figure 2 Step 220 of the embodiment and Figure 7 The embodiments are not described in detail here.
[0212] Step 930: Determine whether the first clustering is completed.
[0213] The client determines whether the first clustering is completed according to whether the first clustering cluster set exists. If the first clustering cluster set exists, it is determined that the first clustering is completed and step 940 is executed; if the first clustering cluster set does not exist, it is determined that the first clustering is not completed and step 941 is executed.
[0214] Step 941: Store the initial device data into the clustering database.
[0215] Since the first clustering is not completed, the initial device data is stored in the clustering database. After that, the device data is continuously acquired and stored in the clustering database as the initial device data. When the initial device data is accumulated until the amount reaches the second threshold, step 942 is executed.
[0216] Step 942: When the amount of the initial device data reaches a second threshold, clustering is performed on the initial device data based on a clustering algorithm to obtain at least one second cluster.
[0217] The second threshold is a preset value, for example, set to 500 groups. When the number of initial device data reaches the second threshold, the second cluster obtained by clustering is more accurate. If the number of initial device data is lower than the second threshold, clustering processing may fail to obtain the second cluster, or the obtained second cluster may be inaccurate.
[0218] Step 943: Based on at least one second clustering cluster, obtain a first clustering cluster set.
[0219] For example, based on the six second clusters, a first cluster set is obtained. When clustering is performed on subsequent device data, it will be clustered into one of the six second clusters, or processed as noise data.
[0220] Step 940: Perform clustering processing on subsequent device data.
[0221] In some embodiments, clustering processing is performed on subsequent device data to obtain clustered device data and noise data, where the clustered device data and noise data carry corresponding labels respectively, and the labels are used to indicate the cluster clusters and noise data corresponding to the clustered device data.
[0222] Since the first clustering is completed, after performing clustering processing on the subsequent device data, the labels corresponding to the clustered device data and the noise data can be obtained according to the first cluster cluster set provided by the clustering database 200. For example, the value corresponding to the label carried by the clustered device data is any one of 1 to 6; the value corresponding to the label carried by the noise data is -1.
[0223] Step 950: Store the clustering device data and noise data into the clustering database.
[0224] Step 960: When the amount of noise data reaches a first threshold, clustering processing is performed on the noise data.
[0225] The step of storing the clustering device data and the noise data in the clustering database triggers the client to determine whether the amount of the noise data reaches a first threshold.
[0226] In some embodiments, when the amount of noise data does not reach the first threshold, the client does not perform any action; when the amount of noise data reaches the first threshold, the client performs clustering processing on the noise data to obtain at least one first clustering cluster.
[0227] Step 970: Update the first cluster set to the second cluster set.
[0228] In some embodiments, based on at least one first cluster, a first set of clusters is updated to a second set of clusters.
[0229] Exemplarily, the first cluster set includes clusters corresponding to label 1, label 2, label 3, label 4, label 5, and label 6, and when the label corresponding to the first cluster is 7, the updated second cluster set includes clusters corresponding to label 1, label 2, label 3, label 4, label 5, label 6, and label 7.
[0230] Step 980: Repeat the above updating steps to continuously update the cluster set.
[0231] For example, clustering is performed on the device data after the subsequent device data to obtain first clustered device data and first noise data, wherein the first clustered device data and the first noise data respectively carry corresponding labels, and the labels are used to indicate the cluster cluster corresponding to the first clustered device data and the first noise data;
[0232] When the sum of the quantities of the first noise data and the remaining noise data reaches a first threshold, clustering is performed on the first noise data and the remaining noise data to obtain at least one third cluster.
[0233] Based on at least one third cluster, the second cluster set is updated to a third cluster set.
[0234] By repeating the above updating steps, the second cluster set can be updated to the third cluster set. Similarly, the third cluster set can be updated to the fourth cluster set, and so on.
[0235] Fig.10 A block diagram of a device for updating a cluster set provided by an exemplary embodiment of the present application is shown. The device can be implemented as a computer device or as a part of a computer device through software or hardware or a combination of both. The device runs a client and includes:
[0236] A generating module 1010, configured to generate a first clustering cluster set based on the i-th device data corresponding to the apparatus and a clustering algorithm, where i is a positive integer;
[0237] The processing module 1020 is used to perform clustering processing on the (i+1)th device data to obtain clustered device data and noise data, where the clustered device data and the noise data carry corresponding labels, respectively, and the labels are used to indicate the cluster clusters and noise data corresponding to the clustered device data;
[0238] A processing module 1020 is used to perform clustering processing on the noise data to obtain at least one first cluster when the amount of noise data reaches a first threshold;
[0239] An updating module 1030, configured to update the first cluster set to a second cluster set based on at least one first cluster;
[0240] The updating module 1030 is used to repeat the above updating steps to continuously update the clustering set.
[0241] In a possible design of this embodiment, the acquisition unit 1011 in the generation module 1010 is used to acquire the i-th device data;
[0242] The processing unit 1012 in the generating module 1010 is configured to perform clustering processing on the i-th device data based on a clustering algorithm to obtain at least one second cluster cluster when the amount of the i-th device data reaches a second threshold;
[0243] The generating unit 1013 in the generating module 1010 is configured to obtain a first cluster set based on at least one second cluster.
[0244] In a possible design of this embodiment, the updating module 1030 is configured to update the first cluster set to the second cluster set based on at least one first cluster and at least one second cluster.
[0245] In a possible design of this embodiment, the i-th device data includes multiple sets of device data, and the acquiring unit 1011 is configured to perform at least one of the following:
[0246] In response to the operation of starting the client, obtaining a set of device data in the i-th device data;
[0247] In response to an operation of clicking a first control, a set of device data in the i-th device data is acquired, where the first control is any control included in the client;
[0248] In response to an operation of switching the currently played music, a set of device data in the i-th device data is acquired.
[0249] In a possible design of this embodiment, the processing module 1020 is further used to perform normalization processing on the i-th device data corresponding to the apparatus to obtain normalized features.
[0250] In a possible design of this embodiment, the generating module 1010 is used to generate a first clustering cluster set based on the normalized features and the clustering algorithm.
[0251] In a possible design of this embodiment, the client includes a clustering database, and the processing module 1020 is also used to store the clustering device data in the clustering database;
[0252] Among them, the label value corresponding to the noise data is -1.
[0253] In a possible design of this embodiment, the processing module 1020 is used to store the clustering device data in the clustering database, and then, when the amount of noise data reaches a first threshold, perform clustering processing on the noise data to obtain at least one first clustering cluster.
[0254] In a possible design of this embodiment, the i-th device data includes: at least one of first data, second data, third data, fourth data, fifth data and sixth data;
[0255] Among them, the first data is used to indicate the signal strength of the device, the second data is used to indicate the remaining power of the device, the third data is used to indicate the charging status of the device, the fourth data is used to indicate the song playing status of the device, the fifth data is used to indicate the Bluetooth device connected to the device; the sixth data is used to indicate the current posture of the device.
[0256] This embodiment is described by taking one generating module 1010 , one processing module 1020 and one updating module 1030 as an example, and the number of the generating modules 1010 , the processing modules 1020 and the updating modules 1030 is not limited.
[0257] For an introduction to the functions of the generation module 1010, please refer to Figure 4The content of step 410 in the embodiment, Figure 5 The contents of step 411, step 412 and step 413 in the embodiment are as follows: Figure 6 The content of step 415 in the embodiment.
[0258] For an introduction to the functions of the processing module 1020, please refer to Figure 4 The contents of step 420 and step 430 in the embodiment are: Figure 6 The content of step 405 in the embodiment, Figure 8 The contents of step 425 and step 435 in the embodiment.
[0259] For an introduction to the functions of update module 1030, please refer to Figure 4 The contents of step 440 and step 450 in the embodiment are as follows: Figure 5 The content of step 441 in the embodiment.
[0260] An embodiment of the present application further provides a computer device, which includes: a processor and a memory, wherein at least one program is stored in the memory, and the processor is used to execute at least one program in the memory to implement the clustering cluster set update method provided by the above method embodiments.
[0261] In some embodiments, the above-mentioned computer device is a mobile terminal. Fig.11 A schematic diagram of the structure of a mobile terminal provided by an exemplary embodiment of the present application is shown.
[0262] Typically, the mobile terminal 1100 includes a processor 1101 and a memory 1102 .
[0263] The processor 1101 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 1101 may be implemented in at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), and programmable logic array (PLA). The processor 1101 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a central processing unit (CPU); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 1101 may be integrated with a graphics processing unit (GPU), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 1101 may also include an artificial intelligence (AI) processor, which is used to process computing operations related to machine learning.
[0264] The memory 1102 may include one or more computer-readable storage media, which may be non-transitory. The memory 1102 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 1102 is used to store at least one instruction, which is used to be executed by the processor 1101 to implement the update method of the clustering cluster set provided in the method embodiment of the present application.
[0265] In some embodiments, the mobile terminal 1100 may further optionally include: a peripheral device interface 1103 and at least one peripheral device. The processor 1101, the memory 1102 and the peripheral device interface 1103 may be connected via a bus or a signal line. Each peripheral device may be connected to the peripheral device interface 1103 via a bus, a signal line or a circuit board. Specifically, the peripheral device includes: at least one of a radio frequency circuit 1104, a display screen 1105, a camera assembly 1106, an audio circuit 1107 and a power supply 1108.
[0266] The peripheral device interface 1103 may be used to connect at least one peripheral device related to input / output (I / O) to the processor 1101 and the memory 1102. In some embodiments, the processor 1101, the memory 1102, and the peripheral device interface 1103 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 1101, the memory 1102, and the peripheral device interface 1103 may be implemented on a separate chip or circuit board, which is not limited in the embodiments of the present application.
[0267] The radio frequency circuit 1104 is used to receive and transmit radio frequency (RF) signals, also known as electromagnetic signals. The radio frequency circuit 1104 communicates with the communication network and other communication devices through electromagnetic signals. The radio frequency circuit 1104 converts the electrical signal into an electromagnetic signal for transmission, or converts the received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 1104 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, etc. The radio frequency circuit 1104 can communicate with other mobile terminals through at least one wireless communication protocol. The wireless communication protocol includes but is not limited to: the World Wide Web, a metropolitan area network, an intranet, various generations of mobile communication networks (2G, 3G, 4G and 5G), a wireless local area network and / or a wireless fidelity (Wireless Fidelity, WiFi) network. In some embodiments, the radio frequency circuit 1104 may also include circuits related to near field communication (NFC), which is not limited in this application.
[0268] The display screen 1105 is used to display a user interface (UI). The UI may include graphics, text, icons, videos, and any combination thereof. When the display screen 1105 is a touch display screen, the display screen 1105 also has the ability to collect touch signals on the surface or above the surface of the display screen 1105. The touch signal can be input to the processor 1101 as a control signal for processing. At this time, the display screen 1105 can also be used to provide virtual buttons and / or virtual keyboards, also known as soft buttons and / or soft keyboards. In some embodiments, the display screen 1105 can be one, arranged on the front panel of the mobile terminal 1100; in other embodiments, the display screen 1105 can be at least two, respectively arranged on different surfaces of the mobile terminal 1100 or in a folding design; in some further embodiments, the display screen 1105 can be a flexible display screen, arranged on a curved surface or a folding surface of the mobile terminal 1100. Even, the display screen 1105 can also be arranged as a non-rectangular irregular figure, that is, a special-shaped screen. The display screen 1105 can be made of materials such as a liquid crystal display (LCD), an organic light-emitting diode (OLED), etc.
[0269] The camera assembly 1106 is used to capture images or videos. Optionally, the camera assembly 1106 includes a front camera and a rear camera. Typically, the front camera is arranged on the front panel of the mobile terminal 1100, and the rear camera is arranged on the back of the mobile terminal. In some embodiments, there are at least two rear cameras, which are any one of a main camera, a depth of field camera, a wide-angle camera, and a telephoto camera, so as to realize the fusion of the main camera and the depth of field camera to realize the background blur function, the fusion of the main camera and the wide-angle camera to realize panoramic shooting and virtual reality (VR) shooting function or other fusion shooting functions. In some embodiments, the camera assembly 1106 may also include a flash. The flash can be a monochrome temperature flash or a dual-color temperature flash. A dual-color temperature flash refers to a combination of a warm light flash and a cold light flash, which can be used for light compensation at different color temperatures.
[0270] The audio circuit 1107 may include a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, and convert the sound waves into electrical signals and input them into the processor 1101 for processing, or input them into the RF circuit 1104 to achieve voice communication. For the purpose of stereo acquisition or noise reduction, there may be multiple microphones, which are respectively arranged at different parts of the mobile terminal 1100. The microphone may also be an array microphone or an omnidirectional acquisition microphone. The speaker is used to convert the electrical signal from the processor 1101 or the RF circuit 1104 into sound waves. The speaker may be a traditional film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can not only convert the electrical signal into sound waves audible to humans, but also convert the electrical signal into sound waves inaudible to humans for purposes such as ranging. In some embodiments, the audio circuit 1107 may also include a headphone jack.
[0271] The power supply 1108 is used to power various components in the mobile terminal 1100. The power supply 1108 can be an alternating current, a direct current, a disposable battery, or a rechargeable battery. When the power supply 1108 includes a rechargeable battery, the rechargeable battery can be a wired rechargeable battery or a wireless rechargeable battery. A wired rechargeable battery is a battery charged through a wired line, and a wireless rechargeable battery is a battery charged through a wireless coil. The rechargeable battery can also be used to support fast charging technology.
[0272] In some embodiments, the mobile terminal 1100 further includes one or more sensors 1109 , including but not limited to: an acceleration sensor 1110 , a gyroscope sensor 1111 , a pressure sensor 1112 , an optical sensor 1113 , and a proximity sensor 1114 .
[0273] The acceleration sensor 1110 can detect the magnitude of acceleration on the three coordinate axes of the coordinate system established by the mobile terminal 1100. For example, the acceleration sensor 1110 can be used to detect the components of gravity acceleration on the three coordinate axes. The processor 1101 can control the touch display screen 1105 to display the user interface in a horizontal view or a vertical view according to the gravity acceleration signal collected by the acceleration sensor 1110. The acceleration sensor 1110 can also be used for collecting game or user motion data.
[0274] The gyro sensor 1111 can detect the body direction and rotation angle of the mobile terminal 1100, and the gyro sensor 1111 can cooperate with the acceleration sensor 1110 to collect the user's 3D actions on the mobile terminal 1100. The processor 1101 can implement the following functions based on the data collected by the gyro sensor 1111: motion sensing (such as changing the UI according to the user's tilt operation), image stabilization during shooting, game control, and inertial navigation.
[0275] The pressure sensor 1112 can be set on the side frame of the mobile terminal 1100 and / or the lower layer of the touch display screen 1105. When the pressure sensor 1112 is set on the side frame of the mobile terminal 1100, it can detect the user's holding signal of the mobile terminal 1100, and the processor 1101 performs left and right hand recognition or shortcut operations according to the holding signal collected by the pressure sensor 1112. When the pressure sensor 1112 is set on the lower layer of the touch display screen 1105, the processor 1101 controls the operability controls on the UI interface according to the user's pressure operation on the touch display screen 1105. The operability controls include at least one of a button control, a scroll bar control, an icon control, and a menu control.
[0276] The optical sensor 1113 is used to collect the ambient light intensity. In one embodiment, the processor 1101 can control the display brightness of the touch display screen 1105 according to the ambient light intensity collected by the optical sensor 1113. Specifically, when the ambient light intensity is high, the display brightness of the touch display screen 1105 is increased; when the ambient light intensity is low, the display brightness of the touch display screen 1105 is reduced. In another embodiment, the processor 1101 can also dynamically adjust the shooting parameters of the camera assembly 1106 according to the ambient light intensity collected by the optical sensor 1113.
[0277] The proximity sensor 1114, also called a distance sensor, is usually arranged on the front panel of the mobile terminal 1100. The proximity sensor 1114 is used to collect the distance between the user and the front of the mobile terminal 1100. In some embodiments, when the proximity sensor 1114 detects that the distance between the user and the front of the mobile terminal 1100 is gradually decreasing, the processor 1101 controls the touch display screen 1105 to switch from the screen-on state to the screen-off state; when the proximity sensor 1114 detects that the distance between the user and the front of the mobile terminal 1100 is gradually increasing, the processor 1101 controls the touch display screen 1105 to switch from the screen-off state to the screen-on state.
[0278] Those skilled in the art will understand that Fig.11 The structure shown in the figure does not constitute a limitation on the mobile terminal 1100, and may include more or less components than those shown in the figure, or combine certain components, or adopt a different component arrangement.
[0279] An embodiment of the present application further provides a computer device, which includes: a processor and a memory, wherein at least one program is stored in the memory; the processor is used to execute at least one program in the memory to implement the clustering cluster set update method provided by the above method embodiments.
[0280] The embodiment of the present application further provides a computer-readable storage medium, in which at least one program is stored. The at least one program is loaded and executed by a processor to implement the updating method of the clustering cluster set provided by the above-mentioned method embodiments.
[0281] An embodiment of the present application also provides a computer program product, which includes computer instructions. The computer instructions are stored in a computer-readable storage medium. A processor obtains the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to implement the clustering cluster set update method provided in the above-mentioned method embodiments.
[0282] It should be understood that the "plurality" mentioned in this article refers to two or more. "And / or" describes the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects are in an "or" relationship.
[0283] Those skilled in the art should be aware that in one or more of the above examples, the functions described in the embodiments of the present application can be implemented with hardware, software, firmware, or any combination thereof. When implemented using software, these functions can be stored in a computer-readable storage medium or transmitted as one or more instructions or codes on a computer-readable storage medium. Computer-readable storage media include computer storage media and communication media, wherein the communication media include any media that facilitates the transmission of a computer program from one place to another. The storage medium can be any available medium that a general or special-purpose computer can access.
[0284] The above are only optional embodiments of the present application and are not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application.
Claims
1. A method for updating a cluster set, characterized in that: The method is executed by a client, and the client runs in a mobile terminal. The method includes: Generate a first cluster set based on the i-th device data corresponding to the mobile terminal and a clustering algorithm, where i is a positive integer; Performing clustering processing on the (i+1)th device data to obtain clustered device data and noise data, wherein the clustered device data and the noise data respectively carry corresponding labels, and the labels are used to indicate the cluster clusters corresponding to the clustered device data and the noise data; When the amount of the noise data reaches a first threshold, clustering the noise data to obtain at least one first cluster; Based on the at least one first cluster, updating the first cluster set to a second cluster set; Repeat the above updating steps to continuously update the cluster set.
2. The method according to claim 1, characterized in that The generating a first cluster set based on the i-th device data corresponding to the mobile terminal and a clustering algorithm includes: Acquire the i-th device data; When the amount of the i-th device data reaches a second threshold, clustering the i-th device data based on the clustering algorithm to obtain at least one second cluster; Based on the at least one second cluster, the first cluster set is obtained.
3. The method according to claim 2, characterized in that The updating of the first cluster set to a second cluster set based on the at least one first cluster includes: Based on the at least one first clustering cluster and the at least one second clustering cluster, the first clustering cluster set is updated to the second clustering cluster set.
4. The method according to claim 2 or 3, characterized in that: The i-th device data includes multiple sets of device data, and the acquiring of the i-th device data includes at least one of the following: In response to starting the operation of the client, obtaining a set of device data in the i-th device data; In response to an operation of clicking a first control, obtaining a set of device data in the i-th device data, wherein the first control is any control included in the client; In response to an operation of switching the currently playing music, a set of device data in the i-th device data is acquired.
5. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: Normalization processing is performed on the i-th device data corresponding to the mobile terminal to obtain normalized features.
6. The method according to claim 5, characterized in that The generating a first cluster set based on the i-th device data corresponding to the mobile terminal and a clustering algorithm includes: The first clustering cluster set is generated based on the normalized features and the clustering algorithm.
7. The method according to any one of claims 1 to 6, characterized in that: The client includes a clustering database, and the method further includes: storing the clustering device data and the noise data in the clustering database; The label value corresponding to the noise data is -1.
8. The method according to claim 7, characterized in that When the amount of the noise data reaches a first threshold, clustering the noise data to obtain at least one first cluster includes: After the clustering device data and the noise data are stored in the clustering database, when the amount of the noise data reaches a first threshold, clustering processing is performed on the noise data to obtain the at least one first cluster.
9. The method according to any one of claims 1 to 8, characterized in that: The i-th device data includes: at least one of first data, second data, third data, fourth data, fifth data and sixth data; Among them, the first data is used to indicate the signal strength of the mobile terminal, the second data is used to indicate the remaining power of the mobile terminal, the third data is used to indicate the charging status of the mobile terminal, the fourth data is used to indicate the song playing status of the mobile terminal, the fifth data is used to indicate the Bluetooth device connected to the mobile terminal; and the sixth data is used to indicate the current posture of the mobile terminal.
10. A device for updating a cluster set, characterized in that: The device runs a client, and the device includes: A generating module, configured to generate a first clustering cluster set based on the i-th device data corresponding to the apparatus and a clustering algorithm, where i is a positive integer; A processing module, configured to perform clustering processing on the (i+1)th device data to obtain clustered device data and noise data, wherein the clustered device data and the noise data respectively carry corresponding labels, and the labels are used to indicate the cluster clusters corresponding to the clustered device data and the noise data; The processing module is used for performing clustering processing on the noise data to obtain at least one first cluster when the amount of the noise data reaches a first threshold; An updating module, configured to update the first cluster set to a second cluster set based on the at least one first cluster; The updating module is used to repeat the above updating steps to continuously update the cluster set.
11. A computer device, characterized in that: The computer device comprises: a processor and a memory, wherein at least one program is stored in the memory; the processor is used to execute the at least one program in the memory to implement the method for updating the cluster set according to any one of claims 1 to 9.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores at least one program, and the at least one program is loaded and executed by a processor to implement the method for updating a cluster set according to any one of claims 1 to 9.
13. A computer program product, characterized in that The computer program product includes computer instructions, which are stored in a computer-readable storage medium. A processor obtains the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to implement the method for updating the cluster set as described in any one of claims 1 to 9.