Interest point feature extraction method, device, electronic device and readable storage medium
By performing two-dimensional processing of the residence time of points of interest and performing wavelet decomposition, the problem of insufficient comprehensiveness of the points of interest in the prior art is solved, and accurate reflection and comparison of user behavior patterns are achieved.
Patent Information
- Application Number
- CN202411081022.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-08
- Publication Date
- 2024-11-15
- Estimated Expiration
- 2044-08-08
AI Technical Summary
The prior art lacks the mining of the relationship between different POIs when extracting the features of the point of interest, which leads to the fact that the statistical features of the points of interest cannot fully reflect the POI information.
By obtaining the residence time of multiple points of interest, performing two-dimensional processing and wavelet decomposition, extracting the characteristics of point of interest, and using wavelet decomposition, scale information in different directions and frequencies can be extracted to reflect the behavior pattern of the preset object.
The comprehensive extraction of the characteristics of the point of interest is realized, which can accurately reflect the user's behavior pattern and can be used to judge whether the behavior patterns of the two users are the same.
Smart Images

Figure CN118606685B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of big data technology, and in particular to a method, device, electronic device and readable storage medium for extracting feature of points of interest. Background Art
[0002] When a device with positioning function stops at a place, it will generate POI (Point Of Interest) data. For a large amount of POI data, the label of the POI data is obtained by associating it with the labeled map points of interest.
[0003] For mobile phone users, after obtaining the labels of the POI data of the user's mobile phone, statistical features based on the labels can be extracted and used to characterize the user's behavior patterns.
[0004] This statistical feature relies on the map POI labels on the one hand, and on the user's cognition to provide the required labels and statistical methods on the other hand, to obtain statistical features based on different scenarios. Since this method lacks the mining of the relationship between different POIs, the statistical features of the POIs obtained by this method cannot reflect the POI information comprehensively. Summary of the invention
[0005] The object of the present invention is to provide a method, device, electronic device and readable storage medium for extracting feature of points of interest, which can obtain feature of points of interest that fully reflect the device with positioning function.
[0006] The embodiments of the present invention can be implemented as follows:
[0007] In a first aspect, the present invention provides a method for extracting feature of interest points, the method comprising:
[0008] Acquire a plurality of points of interest, each of which represents the length of time that a preset object resides at different time points and / or in different areas;
[0009] Processing the plurality of interest points in two dimensions to obtain interest point images;
[0010] The interest point image is subjected to wavelet decomposition to obtain interest point features of the preset object.
[0011] In an optional implementation, the step of performing two-dimensional processing on the plurality of interest points to obtain interest point images includes:
[0012] Get the preset template image;
[0013] Determine a pixel point corresponding to each of the interest points in the preset template image;
[0014] Calculating a reference pixel value for each of the interest points;
[0015] The reference pixel value of each interest point is used to replace the original pixel value of the corresponding pixel point in the preset template image to obtain an interest point image.
[0016] In an optional implementation, the step of determining a pixel point corresponding to each of the interest points in the preset template image includes:
[0017] Sorting the plurality of interest points according to a preset order to obtain a sequence number of each interest point;
[0018] For any target interest point, if the target sequence number of the target interest point is the smallest, the preset central pixel point in the preset template image is used as the target pixel point corresponding to the target interest point; otherwise, the target pixel point corresponding to the target interest point in the preset template image is determined according to the target sequence number;
[0019] Each of the interest points is taken as the target interest point in turn, and finally the pixel point corresponding to each of the interest points in the preset template image is obtained.
[0020] In an optional embodiment, the pixels in the preset template image are divided into multiple layers, the first layer includes the preset central pixel and adjacent pixels centered on the preset central pixel, the areas covered by the pixels with larger layer numbers in any two adjacent layers in the remaining layers surround the areas covered by the pixels with smaller layer numbers and are adjacent to the areas covered by the pixels with smaller layer numbers, the pixels in each layer are divided into multiple groups, and the pixels in the same group are located in the same row or column, and the step of determining the target pixel corresponding to the target interest point in the preset template image according to the target sequence number includes:
[0021] Determine the target layer number of the target layer according to the target sequence number;
[0022] Determine the intra-layer position of the target pixel point in the target layer according to the target layer number and the target sequence number;
[0023] Determine the target group number of the target group and the group position of the target pixel point in the target group according to the intra-layer position and the target layer number;
[0024] The pixel position is determined according to the target layer number, the target group number and the position within the group, and the pixel point at the pixel position in the preset template image is used as the target pixel point.
[0025] In an optional implementation, the step of calculating the reference pixel value of each interest point includes:
[0026] For any target interest point, if the target interest point is an outlier among the multiple interest points, a preset value is used as the reference pixel value;
[0027] If the target interest point is not the outlier, the target interest point is mapped to a preset interval, and the mapping value of the target interest point in the preset interval is used as the reference pixel value.
[0028] In an optional implementation, the step of performing wavelet decomposition on the interest point image to obtain the interest point features of the preset object includes:
[0029] Performing wavelet decomposition on the interest point image to obtain a low-frequency signal matrix and a high-frequency signal matrix;
[0030] Extracting low-frequency coefficient features from the low-frequency signal matrix;
[0031] Extracting high-frequency coefficient features from the high-frequency signal matrix;
[0032] The low-frequency coefficient feature and the high-frequency coefficient feature are combined to obtain the interest point feature.
[0033] In an optional embodiment, the method further comprises:
[0034] Acquire a first point of interest feature of a first user and a second point of interest feature of a second user;
[0035] Calculating the similarity between the first interest point feature and the second interest point feature;
[0036] It is determined whether the behavior patterns of the first user and the second user are the same according to the similarity.
[0037] In a second aspect, the present invention provides a device for extracting feature of points of interest, the device comprising:
[0038] An acquisition module, used to acquire a plurality of interest points, each of which represents the length of time that a preset object stays at different time points and / or in different areas;
[0039] A processing module, used for performing two-dimensional processing on the plurality of interest points to obtain interest point images;
[0040] The decomposition module is used to perform wavelet decomposition on the interest point image to obtain the interest point features of the preset object.
[0041] In a third aspect, the present invention provides an electronic device, comprising a processor and a memory, wherein the memory is used to store a program, and the processor is used to implement a method for extracting feature of points of interest as described in any one of the aforementioned embodiments when executing the program.
[0042] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method for extracting feature of points of interest as described in any one of the aforementioned embodiments.
[0043] Compared with the prior art, the present invention obtains interest point images by two-dimensionally processing the interest points representing different time points and / or the duration of residence in different areas, and then performs wavelet decomposition on the interest point images to obtain interest point features that can comprehensively reflect the behavior patterns of preset objects. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.
[0045] Figure 1 This is an example flowchart of the method for extracting points of interest features provided in this embodiment.
[0046] Figure 2 This is an example diagram of the division of pixel points in the preset template image provided in this embodiment.
[0047] Figure 3 This is a block diagram of an example of an interest point feature extraction device provided in this embodiment.
[0048] Figure 4 An example block diagram of an electronic device provided in this embodiment.
[0049] Icons: 10 - electronic device; 11 - processor; 12 - memory; 13 - bus; 100 - interest point feature extraction device; 110 - acquisition module; 120 - processing module; 130 - decomposition module; 140 - judgment module. DETAILED DESCRIPTION
[0050] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.
[0051] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. 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.
[0052] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.
[0053] In the description of the present invention, it should be noted that if the terms "upper", "lower", "inside", "outside", etc. appear to indicate an orientation or position relationship, they are based on the orientation or position relationship shown in the accompanying drawings, or are the orientation or position relationship in which the product of the invention is usually placed when used. They are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention.
[0054] In addition, the terms “first”, “second”, etc., if used, are merely used to distinguish between the descriptions and should not be understood as indicating or implying relative importance.
[0055] It should be noted that, in the absence of conflict, the features in the embodiments of the present invention may be combined with each other.
[0056] Please refer to Figure 1 , Figure 1 The following is an example flow chart of the method for extracting feature of points of interest provided in this embodiment, and the method includes the following steps:
[0057] Step S101, obtaining a plurality of interest points, each of which represents the length of time that a preset object stays at a different time point and / or in a different area.
[0058] In this embodiment, the preset object is an object with a positioning function device, for example, it can be a drone or unmanned vehicle with a positioning function, or it can be a user carrying a mobile phone with a positioning function. Since it has a positioning function, the device will generate corresponding points of interest when the preset object resides at a certain time point or a certain area. Any two points of interest among the multiple points of interest can be at different time points when the points of interest are generated, or at different areas when the points of interest are generated, or at different time points and areas. Each point of interest represents the length of stay of the preset object. For example, if the user starts at time T1 and stays in area S1 for 2 hours, then the length of stay of the user at the point of interest generated at time T1 and area S1 is 2 hours.
[0059] Step S102: convert multiple interest points into two-dimensional images to obtain interest point images.
[0060] In this embodiment, the two-dimensional processing is to map each interest point to each pixel in a two-dimensional image, and the obtained two-dimensional image is the interest point image. The pixel value of each pixel in the interest point image is obtained according to the corresponding interest point.
[0061] Step S103, performing wavelet decomposition on the interest point image to obtain interest point features of a preset object.
[0062] In this embodiment, wavelet decomposition can decompose the interest point image into sub-images of different frequencies. The principle is to use wavelet functions as basis functions, and approximate the interest point image by continuously scaling and translating these basis functions, so as to extract the features of the interest point image at different time and frequency scales.
[0063] The above method provided in this embodiment processes multiple interest points into two dimensions to obtain interest point images, and then performs wavelet decomposition on the interest point images. Wavelet decomposition can be used to extract scale information of different directions and frequencies, thereby extracting correlation information between interest points, local information of different scales, and global information, and obtaining interest point features that can comprehensively reflect the behavior patterns of preset objects.
[0064] In this embodiment, in order to match the interest points with the pixel points, this embodiment provides an implementation method for obtaining the interest point image:
[0065] First, obtain the preset template image;
[0066] In this embodiment, in order to simplify the processing, the preset template image can be an image of a preset size, in which the pixel value of each pixel is a preset pixel value, for example, the preset pixel value is 0 or 255. In order to make the preset size more reasonable, it can be obtained according to the statistical distribution of the interest points of all preset objects within the preset time period and the preset range. For example, the preset size is determined according to m, and m is defined as the value of the square root of the sum of the number of interest points of all preset objects closest to the exponential power of 2. If m=16, the preset size is 16×16, and the preset template image can be represented by a 16×16 two-dimensional array.
[0067] Secondly, determine the pixel point corresponding to each interest point in the preset template image;
[0068] In this embodiment, one pixel in the preset template image corresponds to one interest point. Since the size of the preset template image is predetermined, the number of pixels therein is also determined accordingly. If the number of interest points is greater than the number of pixels, as an implementation method, interest points equal to the number of pixels can be taken from large to small, and they can be matched with the pixels in the preset template image. If the number of interest points is less than the number of pixels, the interest points can be matched with the pixels, and the remaining pixels that have no corresponding interest points can be ignored.
[0069] Third, calculate the reference pixel value of each interest point;
[0070] In this embodiment, since the pixel values of the image are all within a preset range, for example, for a grayscale image, the pixel values of its pixels are in [0,255], and the interest points representing the dwell time are usually not within this preset range, therefore, the interest points need to be mapped within the preset range in order to two-dimensionalize the interest points into interest point images. The values of the interest points mapped within the preset range are called reference pixel values.
[0071] In this embodiment, since the acquisition of interest points is affected by various factors such as the performance of the positioning device, software and hardware parameters, weather, and network, it is inevitable that the acquired interest points will be missing or wrong. In order to minimize the impact on the accuracy of the final interest point feature, this embodiment takes any interest point as the target interest point and provides an implementation method for calculating the reference pixel value of the interest point:
[0072] For any target interest point, if the target interest point is an outlier among multiple interest points, the preset value is used as the reference pixel value; if the target interest point is not an outlier, the target interest point is mapped to a preset interval, and the mapping value of the target interest point within the preset interval is used as the reference pixel value.
[0073] In this embodiment, the outlier is a plurality of interest points that are greatly different from other interest points. For the outlier, its reference pixel value adopts a preset value. In order to make the preset value more reasonable, the quartiles of the plurality of interest points can be used to determine the value. The quartile is to arrange the plurality of interest points from small to large, and use 3 points to divide all the plurality of interest points into 4 equal parts. The values corresponding to the positions of the 3 points are called quartiles, which are respectively recorded as (the first quartile, also called the lower quartile), (the second quartile, i.e. the median), (The third quartile is also called the upper quartile.) The formula for calculating the preset value can be: ,in, is the default value, is the upper quartile, The lower quartile.
[0074] In this embodiment, for non-outlier values, they are mapped to a preset interval, and their mapping values within the preset interval are used as reference pixel values. As an implementation method, a mapping function can be used to set the non-outlier values to a preset interval. The mapping function can be a linear function or an exponential function, etc.
[0075] Finally, the reference pixel value of each interest point is used to replace the original pixel value of the corresponding pixel in the preset template image to obtain the interest point image.
[0076] In this embodiment, each interest point can be matched with a pixel point in a preset template image according to a preset rule. This embodiment provides an implementation method:
[0077] First, multiple points of interest are sorted according to a preset order to obtain a sequence number for each point of interest;
[0078] In this embodiment, the preset order may be in descending order. Table 1 is an example of the order of interest points.
[0079] Table 1
[0080]
[0081] Among them, uid is the user ID, id is the serial number of the interest point, and value is the residence time represented by the interest point.
[0082] Secondly, for any target interest point, if the target sequence number of the target interest point is the smallest, the preset central pixel point in the preset template image is used as the target pixel point corresponding to the target interest point; otherwise, the target pixel point corresponding to the target interest point in the preset template image is determined according to the target sequence number;
[0083] In this embodiment, the preset center pixel point is a pixel point preset at the center position in the preset template image. The interest point with the smallest target serial number corresponds to the preset center pixel point, and the remaining interest points correspond to the pixel points in the preset template image in turn according to the preset rules. The preset rules can be set as needed. This embodiment provides an implementation method for corresponding the two in a spiral two-dimensional manner. This embodiment divides the pixel points in the preset template image into multiple layers. The first layer includes the preset center pixel point and adjacent pixel points centered on the preset center pixel point. The area covered by the pixel points with larger layer numbers in any two adjacent layers of the remaining layers surrounds the area covered by the pixel points with smaller layer numbers and is adjacent to the area covered by the pixel points with smaller layer numbers. The pixel points of each layer are divided into multiple groups. The pixel points of the same group are located in the same row or column. Please refer to Figure 2 , Figure 2 This is an example diagram of the division of pixels in the preset template image provided in this embodiment. Figure 2In the example, each square represents a pixel, and the number in the square indicates the serial number of the corresponding point of interest. Figure 2 The pixels in the image are divided into 4 layers, and the squares in each layer have the same color. The pixels in the first layer include the preset central pixel 1 and its adjacent pixels 2-9. The pixels in the second layer 10-25 surround the pixels in the first layer. The pixels in the third layer 26-49 surround the pixels in the second layer. The pixels in the fourth layer 50-81 surround the pixels in the third layer. In addition, the pixels in each layer are divided into four groups, and each group is located in the same row or column. Figure 2 Taking the second layer as an example, 10-13 are the first group, located in the same row; 14-17 are the second group, located in the same column; 18-21 are the third group, located in the same row; 22-25 are the fourth group, located in the same column, and the rest of the layers are similar, which will not be repeated here.
[0084] Based on the above division of pixel points into layers and groups, once the layer number, group number and position of a pixel point in the group are determined, the pixel point can be located. This embodiment provides a method for determining a target pixel point corresponding to a target point of interest:
[0085] (1) Determine the target layer number of the target layer according to the target sequence number;
[0086] (2) Determine the position of the target pixel in the target layer according to the target layer number and target sequence number;
[0087] (3) Determine the target group number of the target group and the position of the target pixel in the target group according to the position in the layer and the target layer number;
[0088] (4) Determine the pixel position according to the target layer number, target group number and position within the group, and use the pixel point at the pixel position in the preset template image as the target pixel point.
[0089] In this embodiment, as an implementation method, the group number is set to 0-3, the size of the preset template image is 16×16, and the sequence number in the group starts from 0. For example, the formula for calculating the target layer number is:
[0090]
[0091] Where n is the serial number of the target point of interest, is the target layer number, To round down.
[0092] The formula for calculating the position of the target pixel in the target layer is:
[0093]
[0094] in, is the intra-layer position of the target pixel in the target layer.
[0095] The formula for calculating the position of the target pixel in the target group is:
[0096]
[0097] in, is the position of the target pixel in the target group.
[0098] In this embodiment, taking the pixel position represented by row number and column number as an example, the formula for determining the pixel position according to the target layer number, target group number and position within the group is:
[0099]
[0100]
[0101]
[0102] in, is the target group number, is the row number in the pixel location, is the column number in the pixel position. Taking n=10 as an example, the above formula can be used to calculate:
[0103] layer: 2, in the 2nd layer posInLayer: 0, the 0th groupNumber of the 2nd layer: 0, the 0th group posInGroup: 0, the 0th row in the group: 8-layer=8-2=6, which is the 6th row and column: 8-layer+posInGroup=8-2+0=6, which is the 6th column
[0104] Therefore, the target pixel corresponding to the target interest point n=10 is the pixel in the 6th row and 6th column.
[0105] Taking n=13 as an example, we can calculate according to the above formula:
[0106] layer: 2, in the second layer posInLayer: 1, 13-(2*2-1)^2-1=3, which is the third in the second layer (starting from 0)
[0107] groupNumber: int(3 / 2 / 2)=0, group 0, int is rounded posInGroup: 3%4=3, the third row in the group: 8-layer=8-2=6, which is the sixth row and column: 8-layer+posInGroup = 8-2+3=9, which is the ninth column
[0108] Therefore, the target pixel corresponding to the target interest point n=13 is the pixel in the 6th row and the 9th column.
[0109] Finally, each interest point is taken as a target interest point in turn, and finally the pixel point corresponding to each interest point in the preset template image is obtained.
[0110] In this embodiment, after obtaining the interest point image, in order to obtain the interest point features, this embodiment provides an implementation method of extracting the interest point features by performing wavelet decomposition on the interest point image:
[0111] (1) Perform wavelet decomposition on the interest point image to obtain the low-frequency signal matrix and the high-frequency signal matrix;
[0112] (2) Extract low-frequency coefficient features from the low-frequency signal matrix;
[0113] (3) Extract high-frequency coefficient features from the high-frequency signal matrix;
[0114] (4) Combine the low-frequency coefficient features and the high-frequency coefficient features to obtain the interest point features.
[0115] In this embodiment, a preset wavelet function can be used for wavelet decomposition, and the wavelet function includes, but is not limited to, Daubechies function, Symlet wavelet function, etc. The Symlet wavelet system is usually expressed as symN (N=2,3,…,8), which has good regularity, is consistent with the dbN wavelet in terms of continuity, support length, filter length, etc., and has better symmetry, that is, it can reduce the phase distortion when analyzing and reconstructing the signal to a certain extent. This embodiment uses the Symlet 4 wavelet and the wavelet function with a decomposition level of 6, and its expression is as follows:
[0116]
[0117] illustrate:
[0118] : integer, representing the exponent of the scale factor. The scale factor controls the stretching or compression of the wavelet.
[0119] : integer, representing the exponent of the translation factor. The translation factor controls the translation of the wavelet in time.
[0120] : A fixed scale parameter, usually greater than 1, usually = 2. It is the basis of the scale factor and is used to scale the mother wavelet.
[0121] τ0: fixed time shift parameter, usually a positive number, generally = 1. It is the basis of the translation factor and is used to time-shift the mother wavelet.
[0122] : Normalization factor, used to ensure that the energy of the wavelet transform remains unchanged
[0123] : Mother wavelet function (mother wavelet), it is a basis function, all wavelet functions are obtained from it through scaling and translation transformation.
[0124] : The wavelet function after scale and translation transformation. By changing the values of (j) and (k), a series of different sub-wavelets can be generated to analyze different scales and positions of interest point images.
[0125] : This expression represents the scaling and translation of the wavelet function, where: Used to control the expansion and contraction (scaling transformation) of the wavelet function. Used to control the translation (time displacement) of the wavelet function.
[0126] As the value of j increases, a series of different sub-wavelets can be obtained. The scale parameters of these sub-wavelets increase in the form of 2 to the jth power.
[0127] The interest point image is represented by a two-dimensional matrix. When using this series of sub-wavelets, the two-dimensional matrix of the interest point image is discretely decomposed by wavelet, and the low-frequency signal matrix and high-frequency signal matrix after decomposition are extracted in layers. The low-frequency signal matrix is obtained after filtering with a preset low-pass filter, and the high-frequency signal matrix is obtained after filtering with a preset high-pass filter. The mean and standard deviation of each row coefficient of the high-frequency signal matrix and the low-frequency signal matrix are calculated respectively, and the high-frequency coefficient feature and the low-frequency coefficient feature are extracted. Finally, the high-frequency coefficient feature and the low-frequency coefficient feature are merged to obtain the interest point feature. The merging method can be to splice the two, for example, the low-frequency coefficient feature is connected after the high-frequency coefficient feature, or the high-frequency coefficient feature is connected after the low-frequency coefficient feature.
[0128] In this embodiment, since the interest point features can accurately reflect the user's behavior pattern, after obtaining the interest point features, they can be used as input to the user behavior pattern prediction model to predict the user's behavior pattern. It is also possible to compare the interest point features of two users to determine whether the behavior patterns of the two users are the same. This embodiment provides an implementation method for determining whether the behavior patterns of two users are the same:
[0129] First, obtain a first point of interest feature of a first user and a second point of interest feature of a second user;
[0130] Secondly, the similarity between the first interest point feature and the second interest point feature is calculated;
[0131] Finally, based on the similarity, it is determined whether the behavior patterns of the first user and the second user are the same.
[0132] The extraction method of the first interest point feature and the second interest point feature has been introduced in the above embodiment and will not be repeated here. The similarity between the first interest point feature and the second interest point feature can be measured by the distance between the two, such as the Euclidean distance, or by the cosine of the angle between the two.
[0133] In order to execute the corresponding steps in the above embodiment and each possible implementation method, an implementation method of the interest point feature extraction device 100 is given below. Figure 3 , Figure 3 The block diagram of the interest point feature extraction device provided in this embodiment. It should be noted that the basic principle and technical effect of the interest point feature extraction device 100 provided by the present invention are the same as those of the corresponding above-mentioned embodiments, which are not mentioned in this embodiment for the sake of brief description.
[0134] The interest point feature extraction device 100 includes an acquisition module 110 , a processing module 120 and a decomposition module 130 .
[0135] An acquisition module 110 is used to acquire a plurality of interest points, each of which represents the length of time that a preset object resides at different time points and / or in different areas;
[0136] The processing module 120 is used to perform two-dimensional processing on the multiple interest points to obtain interest point images;
[0137] The decomposition module 130 is used to perform wavelet decomposition on the interest point image to obtain interest point features of a preset object.
[0138] In an optional embodiment, the processing module 120 is specifically used to: obtain a preset template image; determine the pixel point corresponding to each interest point in the preset template image; calculate the reference pixel value of each interest point; replace the original pixel value of the corresponding pixel point in the preset template image with the reference pixel value of each interest point to obtain an interest point image.
[0139] In an optional embodiment, the processing module 120, when used to determine the pixel point corresponding to each interest point in the preset template image, is specifically used to: sort multiple interest points in a preset order to obtain a serial number of each interest point; for any target interest point, if the target serial number of the target interest point is the smallest, then the preset center pixel point in the preset template image is used as the target pixel point corresponding to the target interest point, otherwise, the target pixel point corresponding to the target interest point in the preset template image is determined according to the target serial number; each interest point is used as the target interest point in turn, and finally the pixel point corresponding to each interest point in the preset template image is obtained.
[0140] In an optional embodiment, the pixels in the preset template image are divided into multiple layers, the first layer includes a preset central pixel and adjacent pixels centered on the preset central pixel, the areas covered by pixels with larger layer numbers in any two adjacent layers in the remaining layers surround the areas covered by pixels with smaller layer numbers and are adjacent to the areas covered by pixels with smaller layer numbers, the pixels in each layer are divided into multiple groups, and the pixels in the same group are located in the same row or column, and the processing module 120 is specifically used to determine the target pixel corresponding to the target interest point in the preset template image according to the target sequence number, when used to determine the target layer number of the target layer according to the target sequence number; determine the intra-layer position of the target pixel in the target layer according to the target layer number and the target sequence number; determine the target group number of the target group and the intra-group position of the target pixel in the target group according to the intra-layer position and the target layer number; determine the pixel position according to the target layer number, the target group number and the intra-group position, and use the pixel at the pixel position in the preset template image as the target pixel.
[0141] In an optional embodiment, the processing module 120 is specifically used to calculate the reference pixel value of each interest point: for any target interest point, if the target interest point is an outlier among multiple interest points, a preset value is used as the reference pixel value; if the target interest point is not an outlier, the target interest point is mapped to a preset interval, and the mapping value of the target interest point within the preset interval is used as the reference pixel value.
[0142] In an optional embodiment, the decomposition module 130 is specifically used to: perform wavelet decomposition on the interest point image to obtain a low-frequency signal matrix and a high-frequency signal matrix; extract low-frequency coefficient features from the low-frequency signal matrix; extract high-frequency coefficient features from the high-frequency signal matrix; and merge the low-frequency coefficient features and the high-frequency coefficient features to obtain interest point features.
[0143] In an optional embodiment, the judgment module 140 is used to: obtain the first interest point feature of the first user and the second interest point feature of the second user; calculate the similarity between the first interest point feature and the second interest point feature; and determine whether the behavior patterns of the first user and the second user are the same based on the similarity.
[0144] The embodiment of the present invention also provides a block diagram of an electronic device 10. The electronic device 10 implements the interest point feature extraction method of the above embodiment. Figure 4 , Figure 4 This is a block diagram of an electronic device 10 provided in this embodiment. The electronic device 10 includes a processor 11, a memory 12 and a bus 13. The processor 11 and the memory 12 are connected via the bus 13.
[0145] The processor 11 may be an integrated circuit chip having signal processing capabilities. In the implementation process, each step of the interest point feature extraction method of the above embodiment may be completed by an integrated logic circuit of hardware in the processor 11 or by instructions in the form of software. The above processor 11 may be a general-purpose processor, including a CPU (Central Processing Unit), a NP (Network Processor), etc.; it may also be a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Logic Gate Array) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
[0146] The memory 12 is used to store a program for implementing the interest point feature extraction method. The program may be a software function module stored in the memory 12 in the form of software or firmware or solidified in the OS (Operating System) of the electronic device 10 .
[0147] After receiving the execution instruction, the processor 11 executes the program to implement the interest point feature extraction method of the above embodiment.
[0148] An embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the method for extracting feature of a point of interest as described in any one of the aforementioned embodiments is implemented.
[0149] In summary, an embodiment of the present invention provides a method, device, electronic device and readable storage medium for extracting point of interest features, the method comprising: obtaining multiple points of interest, each point of interest representing the length of time that a preset object resides at different time points and / or in different areas; two-dimensionally processing the multiple points of interest to obtain point of interest images; performing wavelet decomposition on the point of interest images to obtain point of interest features of the preset object. Compared with the prior art, the present embodiment has at least the following advantages: (1) by performing two-dimensional processing on multiple interest points to obtain an interest point image, and then performing wavelet decomposition on the interest point image, the wavelet decomposition can be used to extract scale information of different directions and frequencies, thereby extracting the association information between interest points, local information of different scales and global information, and obtaining interest point features that can fully reflect the behavior pattern of the preset object; (2) the obtained interest point features can be used to more accurately judge whether the behavior patterns of two users are the same; (3) the two-dimensional processing is performed using a preset template image, which simplifies the two-dimensional implementation process; (4) for outliers of multiple interest points, the preset value is used as a reference pixel value to reduce its influence on the accuracy of the final interest point feature; (5) the preset value is determined by using the upper quartile and the lower quartile, so that the reference pixel value of the outlier is more reasonable, so that the final interest point feature is more accurate; (5) the pixel points in the preset template image are layered and grouped, which facilitates the regularization of the method of determining the pixel points into a formula, thereby simplifying the processing process.
[0150] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Claims
1. A method for extracting feature of points of interest, characterized in that: The method comprises: Acquire a plurality of points of interest, each of which represents the length of time that a preset object resides at different time points and / or in different areas; Get the preset template image; Sorting the plurality of interest points according to a preset order to obtain a sequence number of each interest point; For any target interest point, if the target sequence number of the target interest point is the smallest, the preset central pixel point in the preset template image is used as the target pixel point corresponding to the target interest point; otherwise, the target pixel point corresponding to the target interest point in the preset template image is determined according to the target sequence number; Taking each of the interest points as the target interest point in turn, and finally obtaining the pixel point corresponding to each of the interest points in the preset template image; Calculating a reference pixel value for each of the interest points; Replace the original pixel value of the corresponding pixel point in the preset template image with the reference pixel value of each interest point to obtain an interest point image; Performing wavelet decomposition on the interest point image to obtain interest point features of the preset object; The pixels in the preset template image are divided into multiple layers, the first layer includes the preset central pixel and adjacent pixels centered on the preset central pixel, the areas covered by the pixels with larger layer numbers in any two adjacent layers in the remaining layers surround the areas covered by the pixels with smaller layer numbers and are adjacent to the areas covered by the pixels with smaller layer numbers, the pixels in each layer are divided into multiple groups, and the pixels in the same group are located in the same row or the same column, and the step of determining the target pixel corresponding to the target interest point in the preset template image according to the target sequence number includes: Determine the target layer number of the target layer according to the target sequence number; Determine the intra-layer position of the target pixel point in the target layer according to the target layer number and the target sequence number; Determine the target group number of the target group and the group position of the target pixel point in the target group according to the intra-layer position and the target layer number; The pixel position is determined according to the target layer number, the target group number and the position within the group, and the pixel point at the pixel position in the preset template image is used as the target pixel point.
2. The method for extracting feature of points of interest as claimed in claim 1, characterized in that: The step of calculating the reference pixel value of each interest point comprises: For any target interest point, if the target interest point is an outlier among the multiple interest points, a preset value is used as the reference pixel value; If the target interest point is not the outlier, the target interest point is mapped to a preset interval, and the mapping value of the target interest point in the preset interval is used as the reference pixel value.
3. The method for extracting feature of points of interest as claimed in claim 1, characterized in that: The step of performing wavelet decomposition on the interest point image to obtain the interest point features of the preset object comprises: Performing wavelet decomposition on the interest point image to obtain a low-frequency signal matrix and a high-frequency signal matrix; Extracting low-frequency coefficient features from the low-frequency signal matrix; Extracting high frequency coefficient features from the high frequency signal matrix; The low-frequency coefficient feature and the high-frequency coefficient feature are combined to obtain the interest point feature.
4. The method for extracting feature of points of interest as claimed in claim 1, characterized in that: The method further comprises: Acquire a first point of interest feature of a first user and a second point of interest feature of a second user; Calculating the similarity between the first interest point feature and the second interest point feature; It is determined whether the behavior patterns of the first user and the second user are the same according to the similarity.
5. A device for extracting feature of points of interest, characterized in that: The device comprises: An acquisition module, used to acquire a plurality of interest points, each of which represents the length of time that a preset object resides at different time points and / or in different areas; A processing module is used to: obtain a preset template image; sort the multiple interest points in a preset order to obtain a sequence number of each interest point; for any target interest point, if the target sequence number of the target interest point is the smallest, use the preset central pixel point in the preset template image as the target pixel point corresponding to the target interest point, otherwise, determine the target pixel point corresponding to the target interest point in the preset template image according to the target sequence number; use each of the interest points as the target interest point in turn, and finally obtain the pixel point corresponding to each of the interest points in the preset template image; calculate the reference pixel value of each of the interest points; replace the original pixel value of the corresponding pixel point in the preset template image with the reference pixel value of each of the interest points, and obtain an interest point image; A decomposition module, used for performing wavelet decomposition on the interest point image to obtain interest point features of the preset object; When the processing module is used to determine the target pixel point corresponding to the target interest point in the preset template image according to the target sequence number, it is specifically used to: divide the pixel points in the preset template image into multiple layers, the first layer includes the preset central pixel point and adjacent pixel points centered on the preset central pixel point, the area covered by the pixel points with a larger layer number in any two adjacent layers in the remaining layers surrounds the area covered by the pixel points with a smaller layer number and is adjacent to the area covered by the pixel points with a smaller layer number, the pixel points of each layer are divided into multiple groups, the pixel points of the same group are located in the same row or the same column, the target layer number of the target layer is determined according to the target sequence number; the layer position of the target pixel point in the target layer is determined according to the target layer number and the target sequence number; the target group number of the target group and the group position of the target pixel point in the target group are determined according to the layer position and the target layer number; the pixel position is determined according to the target layer number, the target group number and the group position, and the pixel point at the pixel position in the preset template image is used as the target pixel point.
6. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory is used to store a program, and the processor is used to implement the interest point feature extraction method according to any one of claims 1 to 4 when executing the program.
7. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed by a processor, the method for extracting feature of points of interest as described in any one of claims 1 to 4 is implemented.
