| CPC G06F 21/16 (2013.01) [G06F 17/14 (2013.01)] | 9 Claims |

|
1. A watermark embedding method based on service invocation data, characterized by comprising the following steps:
obtaining invocation data based on service, and preprocessing the invocation data;
obtaining key data through screening the preprocessed invocation data based on relevant weights, then, adding timestamps to the key data to obtain enhanced data; including:
a, calculating relevant weights applied to the invocation data:
![]() wherein, a maximum value of data E is represented by max(E), a minimum value of data E is represented by min(E), and a relevant weight of data E is represented by
(E), an initial relevant weight of data E is represented by o(E), and a proportion of a category to which data E belongs in random sampling C is represented by (cs(C)), a proportion of data invoked by class b is represented by (b), an ath nearest neighbor data of class b invocation data is represented by ga, a data value of correlation E is represented by C[E], a sampling data value of an ath invocation data E of a nearest neighbor is represented by sa[E], an ath sampling data is represented by sa, a category to which data belongs in random sampling C is represented by cs(C), and a quantity of sampled data is represented by , in addition, a nearest neighbor data is represented by g, a difference in correlation E between an invocation data C and a sampling data sa is represented by df(E, C, sa), and a difference in nearest neighbor ga between the invocation data C and the sampling data sa is represented by df(E, C, ga);performing a descending sort on the invocation data according to the relevant weights, presetting a threshold for these weights, and subsequently screening the dependent sets based on this threshold;
mapping a position of an exploratory factor and the dependent set, and an expression is:
![]() wherein, a mapping function is represented by
(·), the ath data related to the ith exploratory factor is represented by qi,a, the random number is represented by r, and the natural constant is represented by e, then, calculating a fitness value of the exploratory factor:![]() wherein, the fitness is represented by R, a misclassification rate is represented by er, the number of data in a dependent set is represented by M, an importance of the misclassification rate is represented by α, an importance of a dependent subset is represented by ω, and the number of selected dependent subsets is represented by ML;
comparing the fitness of the exploratory factor, updating a global and local optimal solutions, and updating the position of exploratory factor, and the expression is:
![]() wherein, a velocity of an ith exploratory factor in a d-dimension is represented by θi,d, the position of the ith exploratory factor in the d-dimension is represented by qi,d, an inertia weight of the exploratory factor is represented by ψ, and the learning factors are represented by β1 and β2, in addition, random constants are represented by r1 and r2, a global optimal position is represented by qsi,d, an individual optimal position is represented by bsi,d, and an updated position of the exploratory factor is represented by θi,d;
implementing an adaptive t-distribution perturbation strategy, iterating continuously until a maximum quantity of iterations is reached, and then, outputting screened remaining data as the key data;
b, calculating a nearest point and the distance to the key data:
![]() wherein, the distance from the pth nearest neighbor point to a cth key data point is represented by
c(p), the dimension is represented by d, the number of dimensions is represented by e, a cth sample in the dth dimension is represented by Qcd, and the pth nearest neighbor point in the dth dimension is represented by Qpd;calculating a sum of distances from nearest neighbors of a sample point to the key data:
![]() wherein, the number of the nearest neighbors is represented by
, and a sum of the distances between the cth key data and the nearest neighbors is represented by ;performing a descending sort according to the sum of distances, presetting a range of values for neighborhood parameters, and distributing the neighborhood parameters equally to a neighborhood based on the sum of distances between the key data and neighboring points, and the expression is:
![]() ![]() wherein, the neighborhood parameter is represented by
, the maximum value of the neighborhood parameter is represented by max, and the minimum value of the neighborhood parameter is represented by min, in addition, the sum of the distances between a first key data and the neighboring points is represented by , the control parameter is represented by ζ, and the maximum value of the sum of distances between the key data and the neighboring points is represented by ;calculating weights of local neighbors and the weights of an original local linear structure:
![]() wherein, an enhanced weight is represented by χw, the weight of a neighboring sequence structure between the key data Qc and the yth neighbor is represented by Ucy, the weight of the original local linear structure is represented by χL, and a 2-norm function is represented by ∥·∥2, in addition, a yth neighbor of the key data is represented by Ucy, a cth key data is represented by Qc, the minimum parameter value function is represented by argmin(·), and an attenuation coefficient between the cth key data and a yth neighbor is represented by ψcy;
calculating the importance weight:
ϕ=δ1χh+δ2χL
wherein, an importance weight is represented by ϕ, the weight of a neighboring sequence structure is represented by χh, the sequence coefficient is represented by δ1, and a linear coefficient is represented by δ2;
taking the nearest neighbor points corresponding to the importance weights greater than or equal to 0.372 as insertion points for timestamps, and then, the enhanced data can be output by inserting timestamps;
selecting a contribution degree of enhanced data to obtain high-quality data, then, encoding the high-quality data to generate encoded data; including:
calculating the distance between the enhanced data:
![]() wherein, a dissimilarity degree between a jth and a sth data is represented by ωjs, the distance between the jth and sth data is represented by ρjs, the conditional probability is represented by
, and the numerical distance between the jth and the sth data is represented by kjs;calculating a cumulative contribution of the enhanced data:
![]() wherein, the cumulative contribution degree is represented by
, the jth explained variance ratio is represented by ξj, an offset value between the jth and the sth data is represented by Fjs, the distance is represented by ρ, a genetic factor is represented by υ, and an average offset value is represented by F;outputting the enhanced data with a cumulative contribution greater than 1 as high-quality data;
constructing a data watermark embedding model by employing the encoded data; and then, inputting the service invocation data to be embedded into the data watermark embedding model, and thus the embedding results can be output.
|