A method and device for publishing intelligent data based on time series
By using the extended DBSCAN algorithm and K-nearest neighbor merging criterion in time series data publishing, combining wavelet coefficients and the recursive DRP algorithm, and adding compressible noise, the problem that the K-anonymity algorithm cannot effectively prevent user speculation attacks and data quality degradation in time series data publishing is solved, and data privacy protection and quality improvement are achieved.
Patent Information
- Application Number
- CN202310965754.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-02
- Publication Date
- 2025-09-05
- Estimated Expiration
- 2043-08-02
AI Technical Summary
The existing K-anonymity algorithm cannot effectively prevent user speculation attacks in time series data publishing and causes a serious decline in data quality, which cannot meet the privacy protection requirements of time series data.
The extended DBSCAN algorithm and K-nearest neighbor merging criterion are used to divide the consistent and inconsistent regions in the attribute space. Combining wavelet coefficients with the recursive DRP algorithm, compressible noise is added to protect data privacy and improve data quality.
It effectively prevents speculation attacks and noise filtering attacks on original values, significantly improves the classification usefulness of published sequences, and ensures a balance between data privacy and availability.
Smart Images

Figure CN116991836B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data encryption, and in particular to a time series-based intelligent data publishing method and device. Background Art
[0002] Digital twinning is a technology based on computer simulation and virtual emulation that digitizes physical objects, systems, or processes and generates corresponding virtual models. Digital twinning technology has been widely applied in industrial manufacturing, urban planning, intelligent transportation, and other fields, improving production efficiency, reducing costs, and increasing resource utilization. Data publishing is a crucial step in digital twinning. Data publishing refers to the publication of data collected from simulated or real-world scenarios on public or private platforms for other users to access. This data can be used to verify and test the accuracy and reliability of simulation models and can also be used for other practical applications.
[0003] Most of the data captured in digital twins is time series data. Time series data is a very important data format and has been extensively applied in a wide range of fields. Time series data, whose values change dynamically over time, is suitable for recording environmental monitoring data, video surveillance data, medical data, financial transaction data, and real-time retail data. Furthermore, even when data does not meet the requirements for real-time recording but has temporal attributes, it can also be considered time series data, such as the average annual precipitation in a region over the past 100 years. A broader definition of time series data can also include genetic sequence data, image data, and text data. These data inevitably contain a large amount of user privacy information, so privacy protection is necessary when publishing data. However, due to the high-dimensional and temporal nature of time series data, traditional methods for publishing private data often result in a significant decline in data quality.
[0004] The K-anonymity algorithm is a relatively classic method for publishing private data. K-anonymity targets attacks on user identity speculation. It proposes that any piece of data in the database is guaranteed to have at least K-1 other pieces of data that are the same as it, thereby reducing the unique certainty of the record. In order to achieve the privacy level of K-anonymity, common methods are generalization and anonymization. Generalization refers to replacing the original value with a value with broader semantics (for example, replacing the date of birth with the year of birth). Since the new value has broader semantics, several records may have the same value at the same time, thus achieving the purpose of K-anonymity. Anonymity means that if a record cannot find K-1 identical values, then we will anonymize this record (the corresponding attribute value) with "*".
[0005] Classic K-anonymity is unsuitable for private time series data publishing for two main reasons. First, the application scenarios are different. K-anonymity primarily targets privacy threats, such as attackers inferring user identities and launching linkage attacks. Time series data publishing still faces the threat of user speculation. Second, there are data quality issues. Because K-anonymity involves generalizing and concealing multiple attributes, the high-dimensional nature of time series can severely degrade data quality after K-anonymization. Summary of the Invention
[0006] The embodiment of the present invention provides a method and device for intelligent data publishing based on time series. The technical solution is as follows:
[0007] In one aspect, a time series-based intelligent data publishing method is provided, which is implemented by an electronic device and includes:
[0008] S1. Based on the extended DBSCAN algorithm and the merging criteria of K-nearest neighbors, consistent and inconsistent regions are determined in the attribute space of the data to be released;
[0009] S2, obtaining all point datasets accords in the consistent region and all point datasets discords in the inconsistent region;
[0010] S3. Determine compressible noise to be added according to the wavelet coefficients of the data to be released;
[0011] S4. Based on the recursive DRP algorithm, the compressible noise is respectively assigned to each sequence in accords and each sequence in discords to obtain published data.
[0012] Optionally, the S1, based on the extended DBSCAN algorithm and the merging criteria of the K-nearest neighbor neighborhoods, determines consistent regions and inconsistent regions in the attribute space of the data to be published, including:
[0013] S11. Set a variable regionID, where the regionID is used to indicate the ID of the inconsistent region where each time series in the data to be published is located, and initialize the regionID of all time series to UNCHECKED.
[0014] S12. Traverse all time series in the data to be published. If the regionID of the current time series is UNCHECKED, execute the ExpandDiscordRegion function to expand the inconsistent region where the current time series is located and assign a value to the regionID of the current time series.
[0015] S13. If the regionID of the current time series is NONDISCORD, add a new inconsistent region and increase the number of the inconsistent region by 1;
[0016] S14, traverse all inconsistent regions, use the filter_criteria function to filter out inconsistent regions that do not meet the merging criteria of the K nearest neighbor neighborhood, and obtain all inconsistent regions;
[0017] S15. In the attribute space of the data to be published, determine consistent regions based on all inconsistent regions.
[0018] Optionally, the step S12 executes the ExpandDiscordRegion function to expand the inconsistent region where the current time series is located and assigns a value to the regionID of the current time series, including:
[0019] S121. Get the k nearest neighbor points of the current time series. If the k nearest neighbor points and the current time series belong to the same category, the current time series is determined to belong to the consistent neighborhood, and the regionID of the current time series is set to NONDISCORD, and the result is returned. If the k nearest neighbor points and the current time series belong to different categories, the current time series is added to the current inconsistent region, that is, the regionID of the current time series is assigned the number of the current inconsistent region.
[0020] S122, traverse all the nearest neighbor points of the current inconsistent region, and if the regionID of the current nearest neighbor point is UNCHECKED or NONDISCORD, add the current nearest neighbor point to the current inconsistent region;
[0021] S123: traverse the current inconsistent regions and merge the inconsistent regions that meet the merging conditions.
[0022] Optionally, the traversing of the current inconsistent regions in S123 and merging the inconsistent regions that meet the merging conditions may include:
[0023] S1231. Add all nearest neighbor points of the current inconsistent area to the candidate set;
[0024] S1232. Traverse each point in the candidate set. If the k nearest neighbor points of the current point belong to different categories from the current point, traverse the k nearest neighbor points of the current point. If the regionID of the current nearest neighbor point is NONDISCORD or UNCHECKED, add the current nearest neighbor point to the current inconsistent region. If the regionID of the current nearest neighbor point is UNCHECKED, add the current nearest neighbor point to the candidate set at the same time as adding the current nearest neighbor point to the current inconsistent region.
[0025] S1233. Pop the current point in the processed candidate set out of the candidate set.
[0026] Optionally, the step S3 of determining the compressible noise to be added according to the wavelet coefficients of the data to be published includes:
[0027] S21. Discretely decompose each time series in the data to be released according to the DWT algorithm to obtain the wavelet coefficients of each time series;
[0028] S22. Compare the absolute value of the wavelet coefficient with a preset threshold, determine the intermediate coefficient corresponding to the wavelet coefficient whose absolute value is greater than or equal to the preset threshold as the preset coefficient, and determine the intermediate coefficient corresponding to the wavelet coefficient whose absolute value is less than the preset threshold as 0;
[0029] S23, determining an intermediate noise sequence according to a Gaussian random noise function, a deviation threshold between the data to be released and the released data, and intermediate coefficients corresponding to the wavelet coefficients;
[0030] S24: Determine the compressible noise to be added according to the intermediate noise sequence and the DWT algorithm.
[0031] Optionally, the recursive DRP algorithm of S4 distributes the compressible noise to each sequence in accords and each sequence in discords respectively, including:
[0032] S31, obtaining a preset minimum noise threshold α 2 and the maximum noise threshold β 2 , set the variable perturbation to represent the residual amount of compressible noise, and set the initial k value, which is the k value in the K nearest neighbor neighborhood;
[0033] S32, compare perturbation with the first threshold, if perturbation is greater than the first preset threshold, assign a compressible noise with an amplitude of β to each time series in accords; if perturbation is less than or equal to the first threshold, assign a compressible noise with an amplitude of compressible noise, and jump to execute S35; wherein, the first threshold is |accords|×β 2 ;
[0034] S33 If k≤1, assign an amplitude of compressible noise, and jump to execute S35; if k>1, execute S34;
[0035] S34. Let k=k-1, perturbation=perturbation-|accords|×β 2 , go to execute S32;
[0036] S35. End the algorithm.
[0037] On the other hand, a time series-based intelligent data publishing device is provided, which is applied to the time series-based intelligent data publishing method, and includes:
[0038] The partitioning module is used to determine consistent and inconsistent regions in the attribute space of the data to be published based on the extended DBSCAN algorithm and the merging criteria of the K-nearest neighbor neighborhoods;
[0039] An acquisition module, configured to acquire all point datasets accords in the consistent region and all point datasets discords in the inconsistent region;
[0040] A determination module, configured to determine compressible noise to be added based on the wavelet coefficients of the data to be published;
[0041] The allocation module is used to allocate the compressible noise to each sequence in accords and each sequence in discords based on a recursive DRP algorithm to obtain published data.
[0042] Optionally, the division module is used to:
[0043] S11. Set a variable regionID, where the regionID is used to indicate the ID of the inconsistent region where each time series in the data to be published is located, and initialize the regionID of all time series to UNCHECKED.
[0044] S12. Traverse all time series in the data to be published. If the regionID of the current time series is UNCHECKED, execute the ExpandDiscordRegion function to expand the inconsistent region where the current time series is located and assign a value to the regionID of the current time series.
[0045] S13. If the regionID of the current time series is NONDISCORD, add a new inconsistent region and increase the number of the inconsistent region by 1;
[0046] S14, traverse all inconsistent regions, use the filter_criteria function to filter out inconsistent regions that do not meet the merging criteria of the K nearest neighbor neighborhood, and obtain all inconsistent regions;
[0047] S15. In the attribute space of the data to be published, determine consistent regions based on all inconsistent regions.
[0048] Optionally, the division module is used to:
[0049] S121. Get the k nearest neighbor points of the current time series. If the k nearest neighbor points and the current time series belong to the same category, the current time series is determined to belong to the consistent neighborhood, and the regionID of the current time series is set to NONDISCORD, and the result is returned. If the k nearest neighbor points and the current time series belong to different categories, the current time series is added to the current inconsistent region, that is, the regionID of the current time series is assigned the number of the current inconsistent region.
[0050] S122, traverse all the nearest neighbor points of the current inconsistent region, and if the regionID of the current nearest neighbor point is UNCHECKED or NONDISCORD, add the current nearest neighbor point to the current inconsistent region;
[0051] S123: traverse the current inconsistent regions and merge the inconsistent regions that meet the merging conditions.
[0052] Optionally, the division module is used to:
[0053] S1231. Add all nearest neighbor points of the current inconsistent area to the candidate set;
[0054] S1232. Traverse each point in the candidate set. If the k nearest neighbor points of the current point belong to different categories from the current point, traverse the k nearest neighbor points of the current point. If the regionID of the current nearest neighbor point is NONDISCORD or UNCHECKED, add the current nearest neighbor point to the current inconsistent region. If the regionID of the current nearest neighbor point is UNCHECKED, add the current nearest neighbor point to the candidate set at the same time as adding the current nearest neighbor point to the current inconsistent region.
[0055] S1233. Pop the current point in the processed candidate set out of the candidate set.
[0056] On the other hand, an electronic device is provided, comprising a processor and a memory, wherein the memory stores at least one instruction, and the at least one instruction is loaded and executed by the processor to implement the above-mentioned time series-based intelligent data publishing method.
[0057] On the other hand, a computer-readable storage medium is provided, wherein at least one instruction is stored in the storage medium, and the at least one instruction is loaded and executed by a processor to implement the above-mentioned time series-based intelligent data publishing method.
[0058] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention include at least:
[0059] In an embodiment of the present invention, consistent and inconsistent regions are identified in the attribute space of the data to be published based on an extended DBSCAN algorithm and a K-nearest neighbor merging criterion. All point datasets (accords) in the consistent regions and all point datasets (discords) in the inconsistent regions are obtained. Compressible noise to be added is determined based on the wavelet coefficients of the data to be published. Based on a recursive DRP algorithm, the compressible noise is assigned to each sequence in accords and each sequence in discords, respectively, to obtain the published data. Using the present invention, noise that can prevent filtering attacks can be added to a single sequence. The processed published data effectively prevents speculation attacks on the original values, effectively prevents noise filtering attacks, and significantly improves the classification usefulness of the published sequence. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0061] Figure 1 This is a flow chart of a time series-based intelligent data publishing method provided by an embodiment of the present invention;
[0062] Figure 2 1 is a schematic structural diagram of formation of an inconsistent region provided by an embodiment of the present invention;
[0063] Figure 3 is a pseudo code diagram of an algorithm for finding inconsistent regions provided by an embodiment of the present invention;
[0064] Figure 4 1 is a pseudo code diagram of an algorithm for extending inconsistent regions provided by an embodiment of the present invention;
[0065] Figure 5 is a pseudo code diagram of an algorithm for adding compressible noise provided by an embodiment of the present invention;
[0066] Figure 6 This is a block diagram of an intelligent data publishing device based on time series provided by an embodiment of the present invention;
[0067] Figure 7 It is a structural diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0068] In order to make the technical problems, technical solutions and advantages to be solved by the present invention clearer, a detailed description will be given below with reference to the accompanying drawings and specific embodiments.
[0069] The embodiment of the present invention provides a method for publishing intelligent data based on time series, which can be implemented by an electronic device, which can be a terminal or a server. Figure 1 The flowchart of the intelligent data publishing method based on time series is shown. The processing flow of the method may include the following steps:
[0070] S1. Based on the extended DBSCAN algorithm and the merging criteria of K-nearest neighbor neighborhoods, consistent and inconsistent regions are determined in the attribute space of the data to be released.
[0071] In a feasible implementation, for any point T in the attribute space of the data to be published i , 1≤i≤|TD|, forming a KnN (K nearest Neighbors, K nearest neighbors). If KnN k ∈{KnN i |l≤i≤|TD|},KnN j and KnN k are all inconsistent neighborhoods, and KnN j The core point is KnN k If there is a boundary point of , then the two inconsistent neighborhoods can be merged, and vice versa. Finally, all the merged inconsistent neighborhoods form an inconsistent region. Then, the attribute space of the data to be published is divided into inconsistent regions and consistent regions, as shown in the following diagram: Figure 2 As shown, dividing the data space can prepare for the reasonable distribution of subsequent random noise.
[0072] In the embodiment of the present invention, an extended DBSCAN (Density-Based Spatial Clustering of Applications with Noise) algorithm is used to find all inconsistent regions in the attribute space. In the extended DBSCAN algorithm, the merging criterion of the ε neighborhood in the original algorithm is replaced by the merging criterion of the K nearest neighbor neighborhood, and a criterion for processing shrinking regions is further added. Figure 3 The pseudo code algorithm of step S1 may include the following steps S11-S15:
[0073] S11. Set the variable regionID. The regionID is used to indicate the ID of the inconsistent region where each time series in the data to be published is located. Initialize the regionID of all time series to UNCHECKED.
[0074] In a feasible implementation, a variable region is set to represent the number of the current inconsistent region, and region=1 is initialized.
[0075] S12. Traverse all time series in the data to be published. If the regionID of the current time series is UNCHECKED, execute the ExpandDiscordRegion function to expand the inconsistent region where the current time series is located and assign a value to the regionID of the current time series.
[0076] Optionally, the ExpandDiscordRegion function of S12 implements the function of obtaining all points in the same inconsistent region as the current point each time starting from the current data point. Figure 4 The pseudo code algorithm of step S12 may include the following steps S121-S123:
[0077] S121. Get the k nearest neighbor points of the current time series. If the k nearest neighbor points and the current time series belong to the same category, the current time series is judged to belong to the consistent neighborhood, the regionID of the current time series is set to NONDISCORD, and the result is returned. If the k nearest neighbor points and the current time series belong to different categories, the current time series is added to the current inconsistent region, that is, the regionID of the current time series is assigned the number of the current inconsistent region.
[0078] In a feasible implementation, the nearest neighbor point can be represented by a variable neighbors.
[0079] Assign the regionID of the current time series to the number of the current inconsistent region, that is, set the regionID of the current time series to region.
[0080] S122: traverse all nearest neighbor points of the current inconsistent region. If the regionID of the current nearest neighbor point is UNCHECKED or NONDISCORD, add the current nearest neighbor point to the current inconsistent region.
[0081] In a feasible implementation, the current nearest neighbor point is added to the current inconsistent region, that is, the regionID of the current nearest neighbor point is set to region.
[0082] S123: traverse the current inconsistent regions and merge the inconsistent regions that meet the merging conditions.
[0083] Optionally, traversing the current inconsistent regions and merging the inconsistent regions that meet the merging conditions in S123 may specifically include the following steps S1231-S1233:
[0084] S1231. Add all nearest neighbor points of the current inconsistent area to the candidate set.
[0085] In a feasible implementation, the candidate set can be represented by a variable candidate.
[0086] S1232. Traverse each point in the candidate set. If the k nearest neighbor points of the current point belong to different categories from the current point, traverse the k nearest neighbor points of the current point. If the regionID of the current nearest neighbor point is NONDISCORD or UNCHECKED, add the current nearest neighbor point to the current inconsistent region. If the regionID of the current nearest neighbor point is UNCHECKED, add the current nearest neighbor point to the candidate set while adding it to the current inconsistent region.
[0087] In a feasible implementation, each point in the candidate set candidate can be represented by a variable candi; and the k nearest neighbor points of the current point can be represented by cneighbors.
[0088] S1233. Pop the current point in the processed candidate set out of the candidate set.
[0089] In one feasible implementation, each point in the candidate set is processed in a loop until the candidate set is empty.
[0090] S13. If the regionID of the current time series is NONDISCORD, add a new inconsistent region and increase the number of the inconsistent region by 1.
[0091] In a feasible implementation, the number of the inconsistent region is increased by 1, that is, region=region+1.
[0092] S14. Traverse all inconsistent regions and use the filter_criteria function to filter out inconsistent regions that do not meet the merging criteria of the K-nearest neighbor neighborhood to obtain all inconsistent regions.
[0093] S15. In the attribute space of the data to be published, determine consistent regions based on all inconsistent regions.
[0094] In a feasible implementation, after all inconsistent regions are determined in the attribute space of the data to be published, the remaining points are collectively determined as consistent regions.
[0095] S2. Get all point datasets accords in the consistent area and all point datasets discords in the inconsistent area.
[0096] S3. Determine the compressible noise to be added according to the wavelet coefficients of the data to be released.
[0097] In a feasible implementation, in order to prevent the added noise from being filtered, the embodiment of the present invention selects compressible noise to enhance data privacy. Specifically, only the noise P i Assigned to the wavelet coefficient with larger absolute value. If the absolute value of the coefficient is greater than the estimation threshold, add the standard deviation σ to it ij A random number with a mean of 0. The standard deviation of the random numbers assigned to each coefficient in J Reference Figure 5 The pseudo-code algorithm shown in FIG. 3 may include the following steps S21-S24:
[0098] S21. According to the DWT algorithm, each time series in the published data is discretely decomposed to obtain the wavelet coefficient of each time series.
[0099] In a feasible implementation, the DWT (Discrete Wavelet Transformation) algorithm is used to transform a time series of length m into a coefficient sequence of length m-1. The wavelet coefficient set is represented by coef, and the wavelet coefficient of the jth time series is represented by coef[j].
[0100] S22. Compare the absolute value of the wavelet coefficient with a preset threshold, determine the intermediate coefficient corresponding to the wavelet coefficient whose absolute value is greater than or equal to the preset threshold as the preset coefficient, and determine the intermediate coefficient corresponding to the wavelet coefficient whose absolute value is less than the preset threshold as 0.
[0101] In a feasible implementation, if j:|coef[j]|≥τ, then it is determined that coef[j] is greater than a preset threshold, and the set J={j:|coef[j]|≧τ} represents the subscript set of all wavelet coefficients greater than the threshold, and the intermediate coefficient p corresponding to the set j is j Assigned to Assign the intermediate coefficients corresponding to other wavelet coefficients to 0.
[0102] S23. Determine an intermediate noise sequence according to the Gaussian random noise function, a deviation threshold between the data to be published and the published data, and intermediate coefficients corresponding to the wavelet coefficients.
[0103] In a feasible implementation, a Gaussian random noise function GaussianRandom(0, σ i *p j ) calculates each intermediate noise in the intermediate noise sequence.
[0104] S24: Determine the compressible noise to be added according to the intermediate noise sequence and the DWT algorithm.
[0105] In a feasible implementation, the intermediate noise sequence is discretely transformed using the DWT algorithm, and the sequence obtained after the transformation is determined as the compressible noise P to be added. i By using wavelet coefficients as weights to distribute noise, the security of the data can be effectively improved.
[0106] S4. Based on the recursive DRP algorithm, compressible noise is assigned to each sequence in accords and each sequence in discords to obtain the published data.
[0107] In one feasible implementation, the present invention considers how to protect the original values of multiple time series from being leaked. A multi-time series database can be viewed as an n×m matrix, i.e., there are n sequences, each of length m. The generated random perturbations are distributed to the entire attribute space. The present invention defines two threshold limits: from a privacy perspective, a minimum privacy level is set, i.e., the minimum amount of noise, which can be achieved by using α 2 Refers to this minimum threshold. From the perspective of data usefulness, we set a maximum privacy level, that is, the maximum amount of noise, which can be expressed as β 2 Refers to this highest threshold. The present invention sets:
[0108]
[0109] where σ 2 is the deviation threshold between the original data and the published data.
[0110] On this basis, the specific execution steps of S4 may include the following steps S31-S35:
[0111] S31, obtaining a preset minimum noise threshold α 2 and the maximum noise threshold β 2 , set the variable perturbation to represent the residual amount of compressible noise, and set the initial k value.
[0112] The k value is the k value set in the above K nearest neighbor neighborhood.
[0113] S32, compare perturbation with the first threshold, if perturbation is greater than the first preset threshold, assign a compressible noise with an amplitude of β to each time series in accords; if perturbation is less than or equal to the first threshold, assign a compressible noise with an amplitude of compressible noise and jump to execute S35.
[0114] Among them, the first threshold is |accords|×β 2 .
[0115] S33 If k≤1, assign an amplitude of compressible noise and jump to execute S35; if k>1, execute S34.
[0116] S34. Let k=k-1, perturbation=perturbation-|accords|×β 2 , go to execute S32;
[0117] S35. End the algorithm.
[0118] In a feasible implementation, after the algorithm ends, the data to be published with added compressible noise can be obtained, which can be called published data. Adding noise based on the recursive region can effectively ensure the balance between data privacy and availability.
[0119] In an embodiment of the present invention, consistent and inconsistent regions are identified in the attribute space of the data to be published based on an extended DBSCAN algorithm and a K-nearest neighbor merging criterion. All point datasets (accords) in the consistent regions and all point datasets (discords) in the inconsistent regions are obtained. Compressible noise to be added is determined based on the wavelet coefficients of the data to be published. Based on a recursive DRP algorithm, the compressible noise is assigned to each sequence in accords and each sequence in discords, respectively, to obtain the published data. Using the present invention, noise that can prevent filtering attacks can be added to a single sequence. The processed published data effectively prevents speculation attacks on the original values, effectively prevents noise filtering attacks, and significantly improves the classification usefulness of the published sequence.
[0120] Figure 6 This is a block diagram of an intelligent data publishing device based on time series according to an exemplary embodiment, which is used in an intelligent data publishing method based on time series. Figure 6 The device includes a division module 610, an acquisition module 620, a determination module 630, and an allocation module 640, wherein:
[0121] A partitioning module 610 is configured to determine consistent regions and inconsistent regions in the attribute space of the data to be published based on an extended DBSCAN algorithm and a merging criterion of K-nearest neighbors;
[0122] An acquisition module 620 is configured to acquire all point datasets accords in the consistent region and all point datasets discords in the inconsistent region;
[0123] A determination module 630 is configured to determine compressible noise to be added based on the wavelet coefficients of the data to be published;
[0124] The allocation module 640 is configured to allocate the compressible noise to each sequence in accords and each sequence in discords based on a recursive DRP algorithm to obtain published data.
[0125] Optionally, the division module 610 is configured to:
[0126] S11. Set a variable regionID, where the regionID is used to indicate the ID of the inconsistent region where each time series in the data to be published is located, and initialize the regionID of all time series to UNCHECKED.
[0127] S12. Traverse all time series in the data to be published. If the regionID of the current time series is UNCHECKED, execute the ExpandDiscordRegion function to expand the inconsistent region where the current time series is located and assign a value to the regionID of the current time series.
[0128] S13. If the regionID of the current time series is NONDISCORD, add a new inconsistent region and increase the number of the inconsistent region by 1;
[0129] S14, traverse all inconsistent regions, use the filter_criteria function to filter out inconsistent regions that do not meet the merging criteria of the K nearest neighbor neighborhood, and obtain all inconsistent regions;
[0130] S15. In the attribute space of the data to be published, determine consistent regions based on all inconsistent regions.
[0131] Optionally, the division module 610 is configured to:
[0132] S121. Get the k nearest neighbor points of the current time series. If the k nearest neighbor points and the current time series belong to the same category, the current time series is determined to belong to the consistent neighborhood, and the regionID of the current time series is set to NONDISCORD, and the result is returned. If the k nearest neighbor points and the current time series belong to different categories, the current time series is added to the current inconsistent region, that is, the regionID of the current time series is assigned the number of the current inconsistent region.
[0133] S122, traverse all the nearest neighbor points of the current inconsistent region, and if the regionID of the current nearest neighbor point is UNCHECKED or NONDISCORD, add the current nearest neighbor point to the current inconsistent region;
[0134] S123: traverse the current inconsistent regions and merge the inconsistent regions that meet the merging conditions.
[0135] Optionally, the division module 610 is configured to:
[0136] S1231. Add all nearest neighbor points of the current inconsistent area to the candidate set;
[0137] S1232. Traverse each point in the candidate set. If the k nearest neighbor points of the current point belong to different categories from the current point, traverse the k nearest neighbor points of the current point. If the regionID of the current nearest neighbor point is NONDISCORD or UNCHECKED, add the current nearest neighbor point to the current inconsistent region. If the regionID of the current nearest neighbor point is UNCHECKED, add the current nearest neighbor point to the candidate set at the same time as adding the current nearest neighbor point to the current inconsistent region.
[0138] S1233. Pop the current point in the processed candidate set out of the candidate set.
[0139] Optionally, the determining module 630 is configured to:
[0140] S21. Discretely decompose each time series in the data to be released according to the DWT algorithm to obtain the wavelet coefficients of each time series;
[0141] S22. Compare the absolute value of the wavelet coefficient with a preset threshold, determine the intermediate coefficient corresponding to the wavelet coefficient whose absolute value is greater than or equal to the preset threshold as the preset coefficient, and determine the intermediate coefficient corresponding to the wavelet coefficient whose absolute value is less than the preset threshold as 0;
[0142] S23, determining an intermediate noise sequence according to a Gaussian random noise function, a deviation threshold between the data to be released and the released data, and intermediate coefficients corresponding to the wavelet coefficients;
[0143] S24: Determine the compressible noise to be added according to the intermediate noise sequence and the DWT algorithm.
[0144] Optionally, the allocation module 640 is configured to:
[0145] S31, obtaining a preset minimum noise threshold α 2 and the maximum noise threshold β 2 , set the variable perturbation to represent the residual amount of compressible noise, and set the initial k value, which is the k value in the K nearest neighbor neighborhood;
[0146] S32, compare perturbation with the first threshold, if perturbation is greater than the first preset threshold, assign a compressible noise with an amplitude of β to each time series in accords; if perturbation is less than or equal to the first threshold, assign a compressible noise with an amplitude of compressible noise, and jump to execute S35; wherein, the first threshold is |accords|×β 2 ;
[0147] S33 If k≤1, assign an amplitude of compressible noise, and jump to execute S35; if k>1, execute S34;
[0148] S34. Let k=k-1, perturbation=perturbation-|accords|×β 2 , go to execute S32;
[0149] S35. End the algorithm.
[0150] In an embodiment of the present invention, consistent and inconsistent regions are identified in the attribute space of the data to be published based on an extended DBSCAN algorithm and a K-nearest neighbor merging criterion. All point datasets (accords) in the consistent regions and all point datasets (discords) in the inconsistent regions are obtained. Compressible noise to be added is determined based on the wavelet coefficients of the data to be published. Based on a recursive DRP algorithm, the compressible noise is assigned to each sequence in accords and each sequence in discords, respectively, to obtain the published data. Using the present invention, noise that can prevent filtering attacks can be added to a single sequence. The processed published data effectively prevents speculation attacks on the original values, effectively prevents noise filtering attacks, and significantly improves the classification usefulness of the published sequence.
[0151] Figure 7 1 is a schematic diagram of the structure of an electronic device 700 provided in an embodiment of the present invention. The electronic device 700 may have relatively large differences due to different configurations or performances, and may include one or more processors (central processing units, CPU) 701 and one or more memories 702, wherein the memory 702 stores at least one instruction, and the at least one instruction is loaded and executed by the processor 701 to implement the steps of the above-mentioned Chinese text spelling checking method.
[0152] In an exemplary embodiment, a computer-readable storage medium is also provided, such as a memory including instructions, which can be executed by a processor in a terminal to perform the above-mentioned Chinese text spelling check method. For example, the computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0153] Those skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware, or by a program to instruct the relevant hardware, and the program may be stored in a computer-readable storage medium, which may be a read-only memory, a disk, or an optical disk, etc.
[0154] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A time series-based intelligent data publishing method, characterized in that: The method comprises: S1. Based on the extended DBSCAN algorithm and the merging criteria of K-nearest neighbors, consistent and inconsistent regions are determined in the attribute space of the data to be released; S2, obtaining all point datasets accords in the consistent region and all point datasets discords in the inconsistent region; S3. Determine compressible noise to be added according to the wavelet coefficients of the data to be released; S4. Based on a recursive DRP algorithm, the compressible noise is respectively assigned to each sequence in accords and each sequence in discords to obtain published data; The S1 method, based on the extended DBSCAN algorithm and the K-nearest neighbor merging criteria, determines consistent and inconsistent regions in the attribute space of the data to be published, including: S11. Set a variable regionID, where the regionID is used to indicate the ID of the inconsistent region where each time series in the data to be published is located, and initialize the regionID of all time series to UNCHECKED. S12. Traverse all time series in the data to be published. If the regionID of the current time series is UNCHECKED, execute the ExpandDiscordRegion function to expand the inconsistent region where the current time series is located and assign a value to the regionID of the current time series. S13. If the regionID of the current time series is NONDISCORD, add a new inconsistent region and increase the number of the inconsistent region by 1; S14, traverse all inconsistent regions, use the filter_criteria function to filter out inconsistent regions that do not meet the merging criteria of the K nearest neighbor neighborhood, and obtain all inconsistent regions; S15. Determine consistent regions in the attribute space of the data to be published based on all inconsistent regions; The step S3 of determining the compressible noise to be added according to the wavelet coefficients of the data to be published includes: S31. Discretely decompose each time series in the data to be released according to the DWT algorithm to obtain the wavelet coefficients of each time series; S32, comparing the absolute value of the wavelet coefficient with a preset threshold, determining the intermediate coefficient corresponding to the wavelet coefficient whose absolute value is greater than or equal to the preset threshold as the preset coefficient, and determining the intermediate coefficient corresponding to the wavelet coefficient whose absolute value is less than the preset threshold as 0; S33, determining an intermediate noise sequence according to a Gaussian random noise function, a deviation threshold between the data to be published and the published data, and intermediate coefficients corresponding to the wavelet coefficients; S34: Determine the compressible noise to be added according to the intermediate noise sequence and the DWT algorithm.
2. The method according to claim 1, characterized in that The step S12 executes the ExpandDiscordRegion function to expand the inconsistent region of the current time series and assigns a value to the regionID of the current time series, including: S121. Get the k nearest neighbor points of the current time series. If the k nearest neighbor points and the current time series belong to the same category, the current time series is determined to belong to the consistent neighborhood, and the regionID of the current time series is set to NONDISCORD, and the result is returned. If the k nearest neighbor points and the current time series belong to different categories, the current time series is added to the current inconsistent region, that is, the regionID of the current time series is assigned the number of the current inconsistent region. S122, traverse all the nearest neighbor points of the current inconsistent region, and if the regionID of the current nearest neighbor point is UNCHECKED or NONDISCORD, add the current nearest neighbor point to the current inconsistent region; S123: traverse the current inconsistent regions and merge the inconsistent regions that meet the merging conditions.
3. The method according to claim 2, characterized in that The step S123 of traversing the current inconsistent regions and merging the inconsistent regions that meet the merging conditions includes: S1231. Add all nearest neighbor points of the current inconsistent area to the candidate set; S1232. Traverse each point in the candidate set. If the k nearest neighbor points of the current point belong to different categories from the current point, traverse the k nearest neighbor points of the current point. If the regionID of the current nearest neighbor point is NONDISCORD or UNCHECKED, add the current nearest neighbor point to the current inconsistent region. If the regionID of the current nearest neighbor point is UNCHECKED, add the current nearest neighbor point to the candidate set at the same time as adding the current nearest neighbor point to the current inconsistent region. S1233. Pop the current point in the processed candidate set out of the candidate set.
4. The method according to claim 1, wherein The recursive DRP algorithm of S4 distributes the compressible noise to each sequence in accords and each sequence in discords respectively, including: S31, obtaining a preset minimum noise threshold α 2 and the maximum noise threshold β 2 , set the variable perturbation to represent the residual amount of compressible noise, and set the initial k value, which is the k value in the K nearest neighbor neighborhood; S32, compare perturbation with the first threshold, if perturbation is greater than the first threshold, assign a compressible noise with an amplitude of β to each time series in accords; if perturbation is less than or equal to the first threshold, assign a compressible noise with an amplitude of compressible noise, and jump to execute S35; wherein, the first threshold is |accords|×β 2 ; S33 If k≤1, assign an amplitude of compressible noise, and jump to execute S35; if k>1, execute S34; S34. Let k=k-1, perturbation=perturbation-|accords|×β 2 , turn Execute S32; S35. End the algorithm.
5. An intelligent data publishing device based on time series, characterized in that: The device comprises: The partitioning module is used to determine consistent and inconsistent regions in the attribute space of the data to be published based on the extended DBSCAN algorithm and the merging criteria of the K-nearest neighbor neighborhoods; An acquisition module, configured to acquire all point datasets accords in the consistent region and all point datasets discords in the inconsistent region; A determination module, configured to determine compressible noise to be added based on the wavelet coefficients of the data to be published; an allocation module, configured to allocate the compressible noise to each sequence in accords and each sequence in discords based on a recursive DRP algorithm, to obtain published data; Wherein, the division module is used to: S11. Set a variable regionID, where the regionID is used to indicate the ID of the inconsistent region where each time series in the data to be published is located, and initialize the regionID of all time series to UNCHECKED. S12. Traverse all time series in the data to be published. If the regionID of the current time series is UNCHECKED, execute the ExpandDiscordRegion function to expand the inconsistent region where the current time series is located and assign a value to the regionID of the current time series. S13. If the regionID of the current time series is NONDISCORD, add a new inconsistent region and increase the number of the inconsistent region by 1; S14, traverse all inconsistent regions, use the filter_criteria function to filter out inconsistent regions that do not meet the merging criteria of the K nearest neighbor neighborhood, and obtain all inconsistent regions; S15. Determine consistent regions in the attribute space of the data to be published based on all inconsistent regions; Wherein, the determining module is used to: S31. Discretely decompose each time series in the data to be released according to the DWT algorithm to obtain the wavelet coefficients of each time series; S32, comparing the absolute value of the wavelet coefficient with a preset threshold, determining the intermediate coefficient corresponding to the wavelet coefficient whose absolute value is greater than or equal to the preset threshold as the preset coefficient, and determining the intermediate coefficient corresponding to the wavelet coefficient whose absolute value is less than the preset threshold as 0; S33, determining an intermediate noise sequence according to a Gaussian random noise function, a deviation threshold between the data to be published and the published data, and intermediate coefficients corresponding to the wavelet coefficients; S34: Determine the compressible noise to be added according to the intermediate noise sequence and the DWT algorithm.
6. The device according to claim 5, characterized in that The partitioning module is used to: S121. Get the k nearest neighbor points of the current time series. If the k nearest neighbor points belong to the same category as the current time series, determine that the current time series belongs to the consistent neighborhood, set the regionID of the current time series to NONDISCORD, and return. If the k nearest neighbor points belong to different categories from the current time series, the current time series is added to the current inconsistent region, that is, the regionID of the current time series is assigned to the number of the current inconsistent region; S122, traverse all the nearest neighbor points of the current inconsistent region, and if the regionID of the current nearest neighbor point is UNCHECKED or NONDISCORD, add the current nearest neighbor point to the current inconsistent region; S123: traverse the current inconsistent regions and merge the inconsistent regions that meet the merging conditions.
7. The device according to claim 6, characterized in that The partitioning module is used to: S1231. Add all nearest neighbor points of the current inconsistent area to the candidate set; S1232. Traverse each point in the candidate set. If the k nearest neighbor points of the current point belong to different categories from the current point, traverse the k nearest neighbor points of the current point. If the regionID of the current nearest neighbor point is NONDISCORD or UNCHECKED, add the current nearest neighbor point to the current inconsistent region. If the regionID of the current nearest neighbor point is UNCHECKED, add the current nearest neighbor point to the candidate set at the same time as adding the current nearest neighbor point to the current inconsistent region. S1233. Pop the current point in the processed candidate set out of the candidate set.
Citation Information
Patent Citations
Data release privacy protection algorithm and system based on big data
CN111967045A
Dataset Quality for Synthetic Data Generation in Computer-Based Reasoning Systems
US20210326652A1