Data acquisition method, system, electronic device and storage medium based on smart lock

The feature vector is established through the smart lock opening record, and the abnormality index is calculated by clustering analysis, which solves the problem of abnormal data identification in the smart home system, and realizes the accuracy of data analysis and efficient utilization of system resources.

CN119945821BActive Publication Date: 2025-06-06YIMAITONG (SHENZHEN) INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510423680.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-07
Publication Date
2025-06-06
Estimated Expiration
2045-04-07

AI Technical Summary

Technical Problem

It is difficult for smart home systems to effectively identify and filter abnormal data during data collection, resulting in bias in analysis results and increasing network traffic and system burden.

Method used

By acquiring the opening record of the smart lock, establishing a feature vector based on time and identity, performing clustering analysis, calculating the exception index of each data, deleting the exception data and uploading the remaining data.

Benefits of technology

It realizes accurate identification and filtering of abnormal data in smart home systems, improves the accuracy of data analysis, and reduces the computing burden of system resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119945821B_ABST
    Figure CN119945821B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of digital information transmission and processing technology, and in particular to a data acquisition method based on a smart lock, which first acquires the smart home information to be uploaded and stores it in a cache pool, then establishes a first feature vector and clusters it according to the difference between the collection time of the smart home information and the opening time of the smart lock opening record, and at the same time establishes a second feature vector and clusters it in combination with the smart lock opening record identity record, and finally realizes the identification of abnormal information according to the distribution difference between the first cluster cluster and the second cluster cluster. Compared with the prior art, the present invention uses the smart lock opening record as a benchmark, and performs two cluster analyses on the smart home information in the time dimension and the identity dimension respectively, so as to obtain analysis results from two different analysis angles, and then uses the distribution difference between the first cluster cluster and the second cluster cluster to more accurately identify and discard the abnormal smart home information, thereby realizing the goal of how the smart home system filters out abnormal data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of digital information transmission and processing, and in particular to a data acquisition method, system, electronic device and storage medium based on a smart lock. Background Art

[0002] During the operation of the smart home system, the system will continuously collect various life data in the home environment, aiming to predict and understand the user's behavior patterns through data analysis and pattern recognition technology. However, during the data collection process, the system may encounter the capture of abnormal data, the sources of which may include but are not limited to interference from external environmental factors, functional failures of sensor equipment, or manifestations of atypical user behavior.

[0003] The existence of abnormal data poses a challenge to the accuracy of data analysis in intelligent systems, as they may lead to deviations in analysis results, thus affecting the system's accurate prediction of user behavior. In addition, the uploading and processing of abnormal data may unnecessarily increase network traffic and the computing burden of system hardware, which is not conducive to the effective use of resources and the response efficiency of the system.

[0004] Therefore, in the data processing process of the smart home system, it is crucial to identify and filter out these meaningless abnormal data to ensure the efficient allocation of system resources and the accuracy of behavior analysis. Summary of the invention

[0005] Therefore, the present invention provides a data acquisition method, system, electronic device and storage medium based on a smart lock to solve the problem of how to filter out abnormal data in the smart home system in the prior art.

[0006] The present invention provides a data acquisition method based on a smart lock, comprising:

[0007] Obtain smart home information to be uploaded and store it in a cache pool, where each data includes collection time, device data and at least one information content;

[0008] Obtain smart lock opening records, each smart lock opening record includes opening time and identity record;

[0009] According to the difference between the collection time and the start time, a first feature vector is established for each smart home information in the cache pool;

[0010] Combined with the identity record, a second feature vector is established for each smart home information in the cache pool;

[0011] Clustering the multiple first feature vectors to obtain at least one first cluster;

[0012] Clustering the multiple second eigenvectors to obtain at least one second clustering cluster;

[0013] According to the difference between the distribution of the first feature vector corresponding to each smart home information in the first cluster and the distribution of the second feature vector corresponding to each smart home information in the second cluster, the abnormal index of each smart home information is calculated, and the abnormal index is used to characterize the abnormal degree of the smart home information;

[0014] Based on the abnormal index, the abnormal smart home information in the cache pool is deleted, and the remaining smart home information in the cache pool is uploaded.

[0015] The present invention also provides a preferred solution: according to the difference between the acquisition time and the start time, a first feature vector is established for each smart home information in the cache pool, including:

[0016] Acquire first target smart home information, where the first target smart home information is the smart home information for which a first feature vector is currently to be established;

[0017] According to the collection time of the first target smart home information, select the smart lock opening record whose opening time is before the collection time of the first target smart home information and closest to the collection time of the first target smart home information as the first target smart lock opening record;

[0018] A first feature vector corresponding to the first target smart home information is established based on the first target smart home information and the first target smart lock opening record, wherein the elements in the first feature vector corresponding to the first target smart home information include a first difference value and multiple first feature values, the first difference value represents the difference between the opening time of the first target smart lock opening record and the collection time of the first target smart home information, and the multiple first feature values ​​respectively represent the device data and information content of the first target smart home information.

[0019] The present invention also provides a preferred solution: in the process of clustering a plurality of first eigenvectors to obtain at least one first cluster, the distance between two first eigenvectors is calculated by the following formula:

[0020] ;

[0021] in, is the distance between the two first eigenvectors, represents the difference between the two first difference values ​​respectively included in the two first eigenvectors, is the first preset weight, represents the difference of the first eigenvalues ​​of the same kind in two first eigenvectors, is the second preset weight.

[0022] The present invention also provides a preferred solution: the smart lock opening record also includes an entry and exit record indicating whether the current unlocking is an entry behavior or an exit behavior; clustering the multiple first feature vectors to obtain at least one first clustering cluster, including:

[0023] Obtain the entry and exit records in the smart lock opening records corresponding to the two target first feature vectors as the target entry and exit records, wherein the target first feature vectors are the two first feature vectors whose distance is to be calculated;

[0024] If at least one of the two target entry and exit records represents a leaving behavior, then the value of the first preset weight is reduced and the value of the second preset weight is increased;

[0025] The distance between the two target first feature vectors is calculated based on the adjusted first preset weight and the second preset weight.

[0026] The present invention also provides a preferred solution: combining the identity record, establishing a second feature vector for each smart home information in the cache pool, including:

[0027] Acquire second target smart home information, where the second target smart home information is the smart home information for which a second feature vector is currently to be established;

[0028] According to the collection time of the second target smart home information, select the smart lock opening record whose opening time is before the collection time of the second target smart home information and closest to the collection time of the second target smart home information as the second target smart lock opening record;

[0029] A second feature vector corresponding to the second target smart home information is established based on the second target smart home information and the second target smart lock opening record, wherein the elements in the second feature vector corresponding to the second target smart home information include an identity feature value and multiple second feature values, the identity feature value represents the identity record of the second target smart lock opening record, and the multiple second feature values ​​respectively represent the device data and information content of the second target smart home information.

[0030] The present invention also provides a preferred solution: in the process of clustering a plurality of second eigenvectors to obtain at least one second cluster, the distance between two second eigenvectors is calculated by the following formula:

[0031] ;

[0032] in, is the distance between the two second eigenvectors, represents the difference of the identity eigenvalues ​​of the two second eigenvectors, is the third preset weight, represents the difference of the second eigenvalues ​​of the same kind in two second eigenvectors, It is the fourth preset weight.

[0033] The present invention also provides a preferred solution: the smart lock opening record also includes a number record representing the number of people entering and exiting the lock this time; clustering multiple second feature vectors to obtain at least one second clustering cluster, including:

[0034] Obtain the number of people in the smart lock opening record corresponding to the two target second feature vectors as the target number record, wherein the target second feature vectors are the two second feature vectors whose distance is to be calculated;

[0035] If at least one of the two target number records represents more than one person, then the value of the third preset weight is reduced and the value of the fourth preset weight is increased;

[0036] The distance between the two target second feature vectors is calculated based on the adjusted third preset weight and the fourth preset weight.

[0037] The present invention also provides a data acquisition system based on a smart lock, comprising:

[0038] A home information acquisition unit, used to acquire smart home information to be uploaded and store it in a cache pool, each data including acquisition time, device data and at least one information content;

[0039] A smart lock record collection unit is used to obtain the smart lock opening record, each smart lock opening record includes the opening time and identity record;

[0040] A first feature analysis unit, configured to establish a first feature vector for each smart home information in the cache pool according to a difference between a collection time and a start-up time;

[0041] A second feature analysis unit, used to establish a second feature vector for each smart home information in the cache pool in combination with the identity record;

[0042] A first clustering unit, used for clustering the plurality of first feature vectors to obtain at least one first clustering cluster;

[0043] A second clustering unit, used for clustering the plurality of second feature vectors to obtain at least one second clustering cluster;

[0044] an abnormality analysis unit, used to calculate an abnormality index of each smart home information according to a difference between a distribution of a first feature vector corresponding to each smart home information in a first cluster and a distribution of a second feature vector corresponding to each smart home information in a second cluster, wherein the abnormality index is used to characterize an abnormal degree of the smart home information;

[0045] The data uploading unit is used to delete abnormal smart home information in the cache pool based on the abnormal index and upload the remaining smart home information in the cache pool.

[0046] The present invention also provides an electronic device, comprising:

[0047] Memory and processor;

[0048] The memory is used to store programs, and the processor is used to execute the steps in any one of the above-mentioned smart lock-based data acquisition methods when executing the program.

[0049] The present invention also provides a computer-readable storage medium for storing computer-readable programs or instructions. When the program or instructions are executed by a processor, the steps in any of the above-mentioned data acquisition methods based on smart locks can be implemented.

[0050] The beneficial effects of adopting the above embodiment are:

[0051] The present invention provides a data acquisition method based on a smart lock, which first acquires smart home information to be uploaded and stores it in a cache pool, then acquires the smart lock opening record, and establishes a first feature vector for each smart home information in the cache pool according to the difference between the collection time of the smart home information and the opening time of the smart lock opening record, and at the same time, in combination with the identity record of the smart lock opening record, establishes a second feature vector for each smart home information in the cache pool, and then clusters multiple first feature vectors and multiple second feature vectors respectively, calculates the abnormal index of each smart home information according to the distribution difference between the first clustering cluster and the second clustering cluster, realizes the identification of abnormal information, and uploads the non-abnormal smart home information in the cache pool to complete the filtering of abnormal data. In practice, the smart lock opening record is data that can directly reflect the residents' home habits (for most home systems, the smart home information collected only when the user is at home can reflect the user's habits). Therefore, compared with the prior art, the present invention takes the smart lock opening record as a benchmark, and performs a cluster analysis on the smart home information in the time dimension through the first eigenvector. At the same time, considering that the identity of the person who actually opens the smart lock may be different from the person corresponding to the smart home information, the second eigenvector is used to perform a second cluster analysis on the identity dimension to obtain analysis results from two different analysis angles, and then use the distribution difference between the first clustering cluster and the second clustering cluster to more accurately identify and discard abnormal smart home information, thereby achieving the goal of how the smart home system filters out abnormal data. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] Figure 1 A method flow chart of an embodiment of a data acquisition method based on a smart lock provided by the present invention;

[0053] Figure 2 A system structure diagram of an embodiment of a data acquisition system based on a smart lock provided by the present invention;

[0054] Figure 3 This is a schematic structural diagram of an electronic device provided by the present invention. DETAILED DESCRIPTION

[0055] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0056] Combination Figure 1 As shown, a specific embodiment of the present invention discloses a data acquisition method based on a smart lock, comprising:

[0057] S101, obtaining smart home information to be uploaded and storing it in a cache pool, each data including collection time, device data and at least one information content;

[0058] S102, obtaining smart lock opening records, each smart lock opening record includes an opening time and an identity record;

[0059] S103, establishing a first feature vector for each smart home information in the cache pool according to the difference between the collection time and the start time;

[0060] S104, combining the identity record, establishing a second feature vector for each smart home information in the cache pool;

[0061] S105, clustering the multiple first feature vectors to obtain at least one first cluster;

[0062] S106, clustering the multiple second feature vectors to obtain at least one second cluster;

[0063] S107, calculating an abnormality index of each smart home information according to a difference between a distribution of a first feature vector corresponding to each smart home information in the first cluster and a distribution of a second feature vector corresponding to each smart home information in the second cluster, where the abnormality index is used to characterize the abnormality degree of the smart home information;

[0064] S108. Delete abnormal smart home information in the cache pool based on the abnormal index, and upload the remaining smart home information in the cache pool.

[0065] The above process can be run in an independent device or integrated into a smart home device with sufficient computing power. The cache pool is a data structure for temporarily storing the collected smart home information. The smart home information is first diagnosed for abnormalities in the cache pool and then sent or uploaded to the corresponding behavior analysis server and other devices.

[0066] In this embodiment, smart home information is data collected by smart home facilities for behavioral analysis of users, wherein the collection time is the time when the smart home information is obtained (such as the time when the HVAC facilities are turned on, the time when the security system is triggered, the time when the lighting system is automatically turned on, the time when the curtains are automatically adjusted, etc. The records of these time points help the system analyze the user's daily activity patterns and living habits), the device data is the attribute information of the smart device itself (such as the type of device, model ID, installation location, software version, firmware update history, etc., this information helps to compare and analyze the identity of the user using the device), and the information content is the relevant information about the operation content performed by the smart device this time (such as the HVAC facility opening time, energy consumption data, food storage status of the smart refrigerator, washing cycle and water consumption of the smart washing machine, viewing history and volume adjustment of the smart TV, etc., this information helps the system to deeply understand the user's behavioral preferences and provide users with more accurate and personalized services).

[0067] The smart lock opening record is easy to understand. The opening time is the moment when the smart lock is opened each time, and the identity record refers to the identity information used to unlock the smart lock that is verified when the smart lock is opened.

[0068] In practice, the smart lock opening record is data that can directly reflect the residents' home habits (for most home systems, the smart home information collected only when the user is at home can reflect the user's habits). Therefore, compared with the prior art, the present invention takes the smart lock opening record as a benchmark, and performs a cluster analysis on the smart home information in the time dimension through the first eigenvector. At the same time, considering that the identity of the person who actually opens the smart lock may be different from the person corresponding to the smart home information, the second eigenvector is used to perform a second cluster analysis on the identity dimension to obtain analysis results from two different analysis angles, and then use the distribution difference between the first clustering cluster and the second clustering cluster to more accurately identify and discard abnormal smart home information, thereby achieving the goal of how the smart home system filters out abnormal data.

[0069] Further, in a preferred embodiment, the above step S103, based on the difference between the acquisition time and the start time, establishes a first feature vector for each smart home information in the cache pool, specifically including:

[0070] Acquire first target smart home information, where the first target smart home information is the smart home information for which a first feature vector is currently to be established;

[0071] According to the collection time of the first target smart home information, select the smart lock opening record whose opening time is before the collection time of the first target smart home information and closest to the collection time of the first target smart home information as the first target smart lock opening record;

[0072] A first feature vector corresponding to the first target smart home information is established based on the first target smart home information and the first target smart lock opening record, wherein the elements in the first feature vector corresponding to the first target smart home information include a first difference value and multiple first feature values, the first difference value represents the difference between the opening time of the first target smart lock opening record and the collection time of the first target smart home information, and the multiple first feature values ​​respectively represent the device data and information content of the first target smart home information.

[0073] In the above-mentioned first eigenvector, the first eigenvalue is the result obtained by encoding the device data and information content of the smart home information itself (the specific encoding method can adopt any existing technology, which will not be explained in detail in this article). The first eigenvalue can represent the behavioral characteristics of the user's use of the smart home device this time. On this basis, this embodiment adds a first difference value to represent the time relationship between the smart home information and the smart lock opening record, so as to add a reference feature of the smart home information in the time dimension, thereby realizing the elimination of abnormal data using the data of the smart lock.

[0074] Specifically, for example, an employee may have an irregular time to go home after get off work, but will take a shower as soon as he gets home. At this time, he will turn on the smart water heater and other smart home devices in the bathroom. Through the encoding method of the first eigenvector in this embodiment, the first eigenvalue is used to represent the behavioral characteristics of the employee, and the first difference value is used to represent the regularity of his work and rest. Since the first difference value in this embodiment is the difference between the time when the smart water heater is turned on and the time when the smart lock is turned on, no matter when the employee goes home, as long as the smart home information conforms to normal habits, this embodiment will cluster the corresponding first eigenvector into the same cluster cluster (under the same behavioral characteristics) to achieve high fault tolerance. And those abnormal data that do not conform to work and rest habits will be reflected by the clustering results, and preliminary abnormal data filtering will be achieved.

[0075] Furthermore, in a preferred embodiment, in the above step S105, in the process of clustering the multiple first feature vectors to obtain at least one first cluster, the distance between two first feature vectors is calculated by the following formula:

[0076] ;

[0077] in, is the distance between the two first eigenvectors, represents the difference between the two first difference values ​​respectively included in the two first eigenvectors, is the first preset weight, represents the difference of the first eigenvalues ​​of the same kind in two first eigenvectors, is the second preset weight.

[0078] In the clustering process of this embodiment, the Euclidean distance is used to measure the distance between the two first eigenvectors. The significance of the above formula is that, in combination with the characteristics of the first eigenvector in this embodiment, the existing Euclidean distance measurement method is improved, wherein the first preset weight and the second preset weight corresponding to the first difference value and the first eigenvalue distance are respectively established, so as to adjust the influence of the two data on the clustering scale and improve the flexibility of this method. For example, for smart home information closely related to people's work and rest, such as lighting, HVAC, washing, etc., the value of the first preset weight can be appropriately increased to improve the accuracy of clustering analysis, while for data with a lesser degree of correlation with people's work and rest, such as water purifier flushing, air purification, dehumidification, and maintaining hygiene and cleanliness, the value of the first preset weight can be appropriately reduced, and the value of the second preset weight can be increased.

[0079] In addition, it can be understood that the above distance measurement method can be applied to any clustering method, such as evaluating the distance between two points in K-means clustering, and evaluating the distance between two clusters in DBSCAN clustering (essentially calculating the distance between two first eigenvectors). This embodiment does not limit the specific clustering method used.

[0080] Furthermore, in a preferred embodiment, the smart lock opening record also includes an entry and exit record indicating whether the current unlocking is an entry behavior or an exit behavior. On this basis, the above step S105, clustering the multiple first feature vectors to obtain at least one first clustering cluster, includes:

[0081] Obtain the entry and exit records in the smart lock opening records corresponding to the two target first feature vectors as the target entry and exit records, wherein the target first feature vectors are the two first feature vectors whose distance is to be calculated;

[0082] If at least one of the two target entry and exit records represents a leaving behavior, then the value of the first preset weight is reduced and the value of the second preset weight is increased;

[0083] The distance between the two target first feature vectors is calculated based on the adjusted first preset weight and the second preset weight.

[0084] The advantage of this embodiment is that in the process of clustering, when calculating the distance, the first preset weight and the second preset weight are further dynamically adjusted according to the entry and exit situation actually reflected by the smart lock data. If at least one of the two target entry and exit records represents the leaving behavior, it indicates that the smart lock opening record referenced by the two first feature vectors for calculating the distance this time has the situation of the user leaving. At this time, the reference of these two first feature vectors may be inaccurate (because the smart home information corresponding to the first feature vector is obtained after someone leaves), so the first preset weight should be lowered and the second preset weight should be increased, so that the distance measurement is more inclined to the behavioral characteristics themselves, thereby reducing the error caused by inaccurate reference to the smart lock opening record.

[0085] It is understandable that how a smart lock determines whether a person enters or exits can be achieved by any existing means, such as combining image recognition technology or infrared sensing technology. The specific method is an existing technology that can be understood by people in this field and is not the focus of the present invention, so the present invention will not explain it in detail.

[0086] Furthermore, since this embodiment uses the most recent smart lock opening record as a reference, and it is common for multiple people to share a smart lock in practice, it is inevitable that there will be reference errors. For example, user A and user B live together, and the smart lock opening record before user A uses the smart home information generated by the smart home device is generated by B opening the door lock. At this time, user A's smart home information and user B's smart lock opening record are used to establish the first feature vector respectively, which is obviously inaccurate. Therefore, in order to eliminate the above defects, this embodiment further uses the dimension of user identity to perform abnormal analysis on the smart home information.

[0087] Specifically, in a preferred embodiment, the above step S104, combining the identity record, establishes a second feature vector for each smart home information in the cache pool, specifically including:

[0088] Acquire second target smart home information, where the second target smart home information is the smart home information for which a second feature vector is currently to be established;

[0089] According to the collection time of the second target smart home information, select the smart lock opening record whose opening time is before the collection time of the second target smart home information and closest to the collection time of the second target smart home information as the second target smart lock opening record;

[0090] A second feature vector corresponding to the second target smart home information is established based on the second target smart home information and the second target smart lock opening record, wherein the elements in the second feature vector corresponding to the second target smart home information include an identity feature value and multiple second feature values, the identity feature value represents the identity record of the second target smart lock opening record, and the multiple second feature values ​​respectively represent the device data and information content of the second target smart home information.

[0091] It can be understood that if the first target smart home information and the second target smart home information are the same, the corresponding first target smart lock opening record and the second target smart lock opening record are also the same record. The different names in this embodiment are only for the convenience of logical expression.

[0092] In the above second feature vector, the second feature value is also the result obtained by encoding the device data and information content of the smart home information itself (similarly, the specific encoding method can adopt any existing technology, which will not be explained in detail in this article). The second feature value can represent the behavioral characteristics of the user's use of the smart home device this time. On this basis, this embodiment adds an identity feature value, which represents the identity correspondence between the second target smart home information and the selected second target smart lock opening record, so as to add a reference feature of the smart home information in the identity dimension, thereby realizing the elimination of abnormal data using the data of the smart lock again.

[0093] Theoretically, if the smart home information is regular data that is not abnormal, and all users who share the smart lock do not perform any abnormal behavior, then even if the first target smart home information and the first target smart lock opening record correspond to errors, the distribution results of the first clustering cluster and the second clustering cluster should be the same. Based on this idea, this embodiment uses the second feature vector for clustering again to eliminate the error caused by inconsistent identity correspondence during the clustering of the first feature vector, thereby improving the accuracy of abnormal data screening.

[0094] Furthermore, in a preferred embodiment, in the above step S106, in the process of clustering the plurality of second eigenvectors to obtain at least one second cluster, the distance between two second eigenvectors is calculated by the following formula:

[0095] ;

[0096] in, is the distance between the two second eigenvectors, represents the difference of the identity eigenvalues ​​of the two second eigenvectors, is the third preset weight, represents the difference of the second eigenvalues ​​of the same kind in two second eigenvectors, It is the fourth preset weight.

[0097] Similarly, in the clustering process, this embodiment still uses the Euclidean distance to measure the distance between the two second eigenvectors to control the consistency of the variables and the clustering of the first eigenvector. The significance of the above formula is that, in combination with the characteristics of the second eigenvector in this embodiment, the existing Euclidean distance measurement method is improved, wherein the corresponding third preset weight and fourth preset weight are respectively established for the identity feature value and the second eigenvalue distance, so as to adjust the influence of the two data on the clustering scale and improve the flexibility of this method. For example, for smart home information corresponding to public facilities such as bathrooms and living rooms, the value of the third preset weight can be appropriately reduced to improve the accuracy of clustering analysis, while for smart home information corresponding to non-public facilities such as personal computers, lighting in personal bedrooms, curtains, etc., the value of the third preset weight can be appropriately increased and the value of the fourth preset weight can be reduced to enhance the accuracy of identity recognition of this method.

[0098] In addition, it can be understood that, similarly, the above distance measurement method can be applied to any clustering method, such as evaluating the distance between two points in K-means clustering, evaluating the distance between two clusters in DBSCAN clustering (essentially also calculating the distance between two second eigenvectors). This embodiment does not limit the specific clustering method used.

[0099] Furthermore, in a preferred embodiment, the smart lock opening record also includes a number record representing the number of people entering and exiting the lock. On this basis, the above step S106, clustering the multiple second feature vectors to obtain at least one second clustering cluster, includes:

[0100] Obtain the number of people in the smart lock opening record corresponding to the two target second feature vectors as the target number record, wherein the target second feature vectors are the two second feature vectors whose distance is to be calculated;

[0101] If at least one of the two target number records represents more than one person, then the value of the third preset weight is reduced and the value of the fourth preset weight is increased;

[0102] The distance between the two target second feature vectors is calculated based on the adjusted third preset weight and the fourth preset weight.

[0103] This embodiment further combines the number of people records to achieve further precise and dynamic adjustment of the third preset weight and the fourth preset weight. If at least one of the two target number records represents more than one person, it indicates that the accuracy of the identity correspondence of the smart lock opening record referenced by the two first feature vectors for calculating the distance this time is more difficult to distinguish. In this case, the third preset weight should be lowered and the fourth preset weight should be increased to make the distance measurement more inclined to the behavioral characteristics themselves, thereby further reducing the error caused by inaccurate reference smart lock opening records.

[0104] It is understandable that how the smart lock determines the number of people entering and exiting can also be achieved by any existing means, such as combining image recognition technology or infrared sensing technology. The specific method is the existing technology that can be understood by people in this field and is not the focus of the present invention, so the present invention will not explain it in detail.

[0105] Furthermore, after obtaining the first cluster and the second cluster, step S107 can be performed to calculate the abnormality index of each smart home information according to the difference between the distribution of the first feature vector corresponding to each smart home information in the first cluster and the distribution of the second feature vector corresponding to each smart home information in the second cluster. The abnormality index is used to characterize the degree of abnormality of the smart home information.

[0106] The specific rules for calculating the anomaly index can be flexibly determined according to the actual situation. For example, the number of vectors in the first cluster where a certain smart home information is located and the number of vectors in the second cluster where it is located can be counted. If the difference between these two numbers is too large or both are small values ​​at the same time, it means that the smart home information may be abnormal data. At this time, you can choose to discard it to improve the accuracy of data upload.

[0107] Combination Figure 2 As shown, the present invention also provides a data acquisition system based on a smart lock, comprising:

[0108] The home information acquisition unit 210 is used to acquire the smart home information to be uploaded and store it in the cache pool, each data includes the collection time, device data and at least one information content;

[0109] A smart lock record collection unit 220 is used to obtain a smart lock opening record, each smart lock opening record includes an opening time and an identity record;

[0110] A first feature analysis unit 230, for establishing a first feature vector for each smart home information in the cache pool according to the difference between the collection time and the start time;

[0111] The second feature analysis unit 240 is used to establish a second feature vector for each smart home information in the cache pool in combination with the identity record, specifically including:

[0112] A first clustering unit 250 is used to cluster the multiple first feature vectors to obtain at least one first cluster;

[0113] A second clustering unit 260, configured to cluster the plurality of second feature vectors to obtain at least one second cluster;

[0114] The abnormality analysis unit 270 is used to calculate the abnormality index of each smart home information according to the difference between the distribution of the first feature vector corresponding to each smart home information in the first cluster and the distribution of the second feature vector corresponding to each smart home information in the second cluster, where the abnormality index is used to characterize the abnormality degree of the smart home information;

[0115] The data uploading unit 280 is used to delete abnormal smart home information in the cache pool based on the abnormal index and upload the remaining smart home information in the cache pool.

[0116] It should be noted here that the corresponding system provided in the above embodiments can implement the technical solutions described in the above method embodiments. The specific implementation principles of the above modules or units can be found in the corresponding contents in the above method embodiments, which will not be repeated here.

[0117] refer to Figure 3 , shows a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. In this embodiment, the electronic device includes:

[0118] Memory 310 and processor 320;

[0119] The memory 310 is used to store programs, and the processor 320 is used to execute the data acquisition method based on the smart lock in the above embodiment when executing the program.

[0120] This embodiment also provides a computer-readable storage medium, on which a data acquisition program based on a smart lock is stored. When the data acquisition program based on a smart lock is executed by a processor, the steps in the above embodiment can be implemented.

[0121] The present invention provides a data acquisition method based on a smart lock, which first acquires smart home information to be uploaded and stores it in a cache pool, then acquires the smart lock opening record, and establishes a first feature vector for each smart home information in the cache pool according to the difference between the collection time of the smart home information and the opening time of the smart lock opening record, and at the same time, in combination with the identity record of the smart lock opening record, establishes a second feature vector for each smart home information in the cache pool, and then clusters multiple first feature vectors and multiple second feature vectors respectively, calculates the abnormal index of each smart home information according to the distribution difference between the first clustering cluster and the second clustering cluster, realizes the identification of abnormal information, and uploads the non-abnormal smart home information in the cache pool to complete the filtering of abnormal data. In practice, the smart lock opening record is data that can directly reflect the residents' home habits (for most home systems, the smart home information collected only when the user is at home can reflect the user's habits). Therefore, compared with the prior art, the present invention takes the smart lock opening record as a benchmark, and performs a cluster analysis on the smart home information in the time dimension through the first eigenvector. At the same time, considering that the identity of the person who actually opens the smart lock may be different from the person corresponding to the smart home information, the second eigenvector is used to perform a second cluster analysis on the identity dimension to obtain analysis results from two different analysis angles, and then use the distribution difference between the first clustering cluster and the second clustering cluster to more accurately identify and discard abnormal smart home information, thereby achieving the goal of how the smart home system filters out abnormal data.

[0122] It should be noted that the various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0123] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A data acquisition method based on a smart lock, characterized in that: include: Obtain smart home information to be uploaded and store it in a cache pool, where each data includes collection time, device data and at least one information content; Obtain smart lock opening records, each smart lock opening record includes opening time and identity record; According to the difference between the collection time and the start time, a first feature vector is established for each smart home information in the cache pool; Combined with the identity record, a second feature vector is established for each smart home information in the cache pool; Clustering the multiple first feature vectors to obtain at least one first cluster; Clustering the multiple second eigenvectors to obtain at least one second clustering cluster; According to the difference between the distribution of the first feature vector corresponding to each smart home information in the first cluster and the distribution of the second feature vector corresponding to each smart home information in the second cluster, the abnormal index of each smart home information is calculated, and the abnormal index is used to characterize the abnormal degree of the smart home information; Delete abnormal smart home information in the cache pool based on the abnormal index, and upload the remaining smart home information in the cache pool; According to the difference between the acquisition time and the start time, a first feature vector is established for each smart home information in the cache pool, including: Acquire first target smart home information, where the first target smart home information is the smart home information for which a first feature vector is currently to be established; According to the collection time of the first target smart home information, select the smart lock opening record whose opening time is before the collection time of the first target smart home information and closest to the collection time of the first target smart home information as the first target smart lock opening record; A first feature vector corresponding to the first target smart home information is established according to the first target smart home information and the first target smart lock opening record, wherein the elements in the first feature vector corresponding to the first target smart home information include a first difference value and a plurality of first feature values, the first difference value represents the difference between the opening time of the first target smart lock opening record and the collection time of the first target smart home information, and the plurality of first feature values ​​respectively represent the device data and the information content of the first target smart home information; In the process of clustering the multiple first eigenvectors to obtain at least one first cluster, the distance between two first eigenvectors is calculated by the following formula: ; in, is the distance between the two first eigenvectors, represents the difference between the two first difference values ​​respectively included in the two first eigenvectors, is the first preset weight, represents the difference of the first eigenvalues ​​of the same kind in two first eigenvectors, is the second preset weight, is the summation symbol.

2. The data acquisition method based on the smart lock according to claim 1 is characterized in that: The smart lock opening record also includes an entry and exit record indicating whether the current unlocking is an entry behavior or an exit behavior; clustering the multiple first feature vectors to obtain at least one first clustering cluster, including: Obtain the entry and exit records in the smart lock opening records corresponding to the two target first feature vectors as the target entry and exit records, wherein the target first feature vectors are the two first feature vectors whose distance is to be calculated; If at least one of the two target entry and exit records represents a leaving behavior, then the value of the first preset weight is reduced and the value of the second preset weight is increased; The distance between the two target first feature vectors is calculated based on the adjusted first preset weight and the second preset weight.

3. The data acquisition method based on the smart lock according to claim 1 is characterized in that: Combined with the identity record, a second feature vector is established for each smart home information in the cache pool, including: Acquire second target smart home information, where the second target smart home information is the smart home information for which a second feature vector is currently to be established; According to the collection time of the second target smart home information, select the smart lock opening record whose opening time is before the collection time of the second target smart home information and closest to the collection time of the second target smart home information as the second target smart lock opening record; A second feature vector corresponding to the second target smart home information is established based on the second target smart home information and the second target smart lock opening record, wherein the elements in the second feature vector corresponding to the second target smart home information include an identity feature value and multiple second feature values, the identity feature value represents the identity record of the second target smart lock opening record, and the multiple second feature values ​​respectively represent the device data and information content of the second target smart home information.

4. The data acquisition method based on the smart lock according to claim 3 is characterized in that: In the process of clustering the multiple second eigenvectors to obtain at least one second cluster, the distance between two second eigenvectors is calculated by the following formula: ; in, is the distance between the two second eigenvectors, represents the difference of the identity eigenvalues ​​of the two second eigenvectors, is the third preset weight, represents the difference of the second eigenvalues ​​of the same kind in two second eigenvectors, It is the fourth preset weight.

5. The data acquisition method based on the smart lock according to claim 4 is characterized in that: The smart lock opening record also includes a record of the number of people entering and exiting the lock; Clustering the multiple second feature vectors to obtain at least one second clustering cluster includes: Obtain the number of people in the smart lock opening record corresponding to the two target second feature vectors as the target number record, wherein the target second feature vectors are the two second feature vectors whose distance is to be calculated; If at least one of the two target number records represents more than one person, then the value of the third preset weight is reduced and the value of the fourth preset weight is increased; The distance between the two target second feature vectors is calculated based on the adjusted third preset weight and the fourth preset weight.

6. A data acquisition system based on a smart lock, characterized in that: include: A home information acquisition unit, used to acquire smart home information to be uploaded and store it in a cache pool, each data including acquisition time, device data and at least one information content; A smart lock record collection unit is used to obtain the smart lock opening record, each smart lock opening record includes the opening time and identity record; A first feature analysis unit, configured to establish a first feature vector for each smart home information in the cache pool according to a difference in a collection time and a start time; A second feature analysis unit, used to establish a second feature vector for each smart home information in the cache pool in combination with the identity record; A first clustering unit, used for clustering the plurality of first feature vectors to obtain at least one first clustering cluster; A second clustering unit, used for clustering the plurality of second feature vectors to obtain at least one second clustering cluster; an abnormality analysis unit, used to calculate an abnormality index of each smart home information according to a difference between a distribution of a first feature vector corresponding to each smart home information in a first cluster and a distribution of a second feature vector corresponding to each smart home information in a second cluster, wherein the abnormality index is used to characterize an abnormal degree of the smart home information; A data uploading unit, used to delete abnormal smart home information in the cache pool based on the abnormal index, and upload the remaining smart home information in the cache pool; According to the difference between the acquisition time and the start time, a first feature vector is established for each smart home information in the cache pool, including: Acquire first target smart home information, where the first target smart home information is the smart home information for which a first feature vector is currently to be established; According to the collection time of the first target smart home information, select the smart lock opening record whose opening time is before the collection time of the first target smart home information and closest to the collection time of the first target smart home information as the first target smart lock opening record; A first feature vector corresponding to the first target smart home information is established according to the first target smart home information and the first target smart lock opening record, wherein the elements in the first feature vector corresponding to the first target smart home information include a first difference value and a plurality of first feature values, the first difference value represents the difference between the opening time of the first target smart lock opening record and the collection time of the first target smart home information, and the plurality of first feature values ​​respectively represent the device data and the information content of the first target smart home information; In the process of clustering the multiple first eigenvectors to obtain at least one first cluster, the distance between two first eigenvectors is calculated by the following formula: ; in, is the distance between the two first eigenvectors, represents the difference between the two first difference values ​​respectively included in the two first eigenvectors, is the first preset weight, represents the difference of the first eigenvalues ​​of the same kind in two first eigenvectors, is the second preset weight, is the summation symbol.

7. An electronic device, characterized in that: include: Memory and processor; The memory is used to store programs, and the processor is used to execute the steps in the data acquisition method based on the smart lock as described in any one of claims 1-5 when executing the program.

8. A computer-readable storage medium, characterized in that: Used to store computer-readable programs or instructions, which, when executed by a processor, can implement the steps in the data acquisition method based on a smart lock as described in any one of claims 1-5 above.

Citation Information

Patent Citations

  • Building engineering construction data intelligent management system

    CN116186634A

  • Intelligent household electrical appliance fault automatic diagnosis and closed loop system and method based on big data

    CN118502398A