Method for predicting clothing sales trends by visually analyzing user behavior

By analyzing occlusion events in surveillance videos in the apparel retail sector, generating heat values ​​for apparel display areas and tracking heat changes, this technology solves the problems of privacy issues and converting occlusion behavior into heat indicators in existing technologies, thus enabling accurate prediction of apparel sales trends.

CN122157111APending Publication Date: 2026-06-05HEBEI SI WEI FUR CLOTHING CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HEBEI SI WEI FUR CLOTHING CO LTD
Filing Date
2026-03-14
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

In the apparel retail sector, existing technologies for predicting sales trends through visual analysis of consumer behavior present challenges in collecting and processing consumer privacy. Furthermore, they struggle to transform discrete occlusion behaviors into continuous popularity indicators and fail to capture the dynamic characteristics of popularity spreading from high-attention areas to surrounding areas, resulting in a relatively singular prediction dimension.

Method used

By acquiring surveillance video, we can identify areas of interest in the clothing display area, detect the start and end times of occlusion events, generate a heat value for the clothing display area, track changes in the heat value, and determine the popularity spread coefficient of the clothing by combining the heat change trends of adjacent areas.

Benefits of technology

It transforms discrete occlusion behaviors into continuous heat indicators, accurately reflects the actual level of attention to clothing display areas, eliminates local fluctuations caused by random consumer movement, clearly shows the overall trend of heat evolution, and provides accurate predictions of clothing fashion trends.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122157111A_ABST
    Figure CN122157111A_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of sales trend prediction, and particularly relates to a method for predicting clothing sales trend by visually analyzing user behavior, comprising: S1, acquiring monitoring video covering a plurality of clothing display areas, determining a region of interest of each clothing display area in each frame of the monitoring video; S2, detecting a similar proportion of each region of interest being occluded by foreground, and recording a starting time and an ending time of an occlusion event according to a change of the pixel proportion; S3, generating a heat value of the clothing display area based on a number of occlusion events of each clothing display area within a preset time window and a duration of each occlusion event; the heat value of the region is generated by dividing a continuous time axis into a preset time window, and counting the number of occlusion events and the cumulative duration within each time window, so as to convert discrete occlusion behavior into continuous heat index, and the actual attention degree of the clothing display area can be more accurately reflected by the heat index than single behavior count.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of sales trend forecasting technology, and more specifically to a method for predicting apparel sales trends by visually analyzing user behavior. Background Technology

[0002] In the apparel retail sector, visual analysis of consumer behavior has become an important tool for predicting sales trends. Traditional visual analysis methods assess clothing attention by statistically analyzing consumers' dwell time, number of attempts, or facial expressions. However, such methods involve the collection and processing of consumers' personal privacy, which has inherent flaws in terms of data compliance and consumer acceptance. Moreover, existing technologies mostly focus on single behavioral indicators of individual consumers, such as the duration of eye contact or the number of hand touches, lacking a comprehensive quantification of group attention and analysis of the dissemination patterns of attention. When multiple consumers pay attention to the same clothing area at different times, existing methods struggle to transform these discrete blocking behaviors into continuous heat indicators, and are unable to capture the dynamic characteristics of heat spreading from high-attention areas to surrounding areas, resulting in a relatively singular dimension for predicting clothing trends. Summary of the Invention

[0003] This invention addresses the technical problems existing in the prior art by providing a method for predicting clothing sales trends through visual analysis of user behavior.

[0004] The technical solution of this invention to solve the above-mentioned technical problems is as follows: A method for predicting clothing sales trends by visually analyzing user behavior, comprising the following steps: S1. Obtain surveillance video covering several clothing display areas, and determine the region of interest for each clothing display area in each frame of the surveillance video. S2. Detect the similarity ratio of each region of interest being occluded by the foreground, and record the start and end times of the occlusion event based on the change in the pixel ratio; S3. Based on the number of occlusion events and the duration of each occlusion event in each clothing display area within a preset time window, generate the heat value of the clothing display area. S4. Track the changes in popularity of the same clothing display area within a continuous time window to obtain a popularity change sequence. Extract the popularity peak from the popularity change sequence trajectory and combine it with the popularity change trend of adjacent areas to determine the popularity spread coefficient of the clothing.

[0005] In a preferred embodiment, in step S1, the boundary of each clothing display area is defined in the initial frame image of the surveillance video, and the pixel area enclosed by the boundary is used as the reference region of interest of the clothing display area. The initial frame image is the first frame image of the surveillance video or a frame image specified by the operator. For each subsequent frame in the surveillance video, excluding the initial frame, the position and shape of the reference region of interest are mapped to the subsequent image using image registration technology. This obtains the region of interest corresponding to the clothing display area in the subsequent image. The image registration technology achieves spatial alignment based on feature point matching or pixel displacement calculation between adjacent frames.

[0006] In a preferred embodiment, in step S2, N consecutive frames of images are extracted from the surveillance video, where N is a preset number of sampling frames. For each pixel position in the image, the grayscale values ​​of the N frames of images at that pixel position are collected to form a set containing N grayscale values. The frequency of each grayscale value in the set is counted, and the grayscale value with the highest frequency is taken as the background grayscale value of the pixel position. After the frequency count and the selection of the highest frequency grayscale value are completed for all pixel positions, the background grayscale values ​​selected for each pixel position are arranged and combined according to the spatial arrangement of the original image to form a complete image, which is the background image. For each frame of the surveillance video as the current frame, a pixel-by-pixel difference operation is performed between the current frame and the background image to obtain a difference image. Pixels in the difference image whose pixel values ​​are greater than a preset difference threshold are marked as foreground points. All foreground points constitute the foreground region. The ratio of the number of pixels belonging to the foreground region to the total number of pixels in the region of interest is calculated as the occlusion pixel ratio of the current frame. When the occlusion pixel ratio changes from a state below a preset first threshold to a state not below a preset first threshold, the time point of the current frame is recorded as the occlusion start time. When the occlusion pixel ratio changes from a state not below a preset first threshold to a state below a preset first threshold, the time point of the current frame is recorded as the occlusion end time. The time period between the occlusion start time and the occlusion end time is determined as an occlusion event.

[0007] In a preferred embodiment, in step S3, the timeline of the monitoring video is divided into consecutive and equally long preset time windows. For each time window, the total number of occlusion events occurring in each clothing display area within that time window is counted as the number of occlusion events. For each time window, the duration of each occlusion event occurring in each clothing display area within that time window is calculated, and the durations of all occlusion events are summed as the cumulative duration. The number of occlusion events is multiplied by a first weighting coefficient to obtain a first contribution component. The cumulative duration is multiplied by a second weighting coefficient to obtain a second contribution component. The first contribution component and the second contribution component are added together to obtain the heat value of the clothing display area in that time window. The specific steps for calculating the duration of each occlusion event are as follows: The steps for calculating the duration of each occlusion event occurring within each time window include: reading the occlusion start time and occlusion end time of the occlusion event from the occlusion event record. The occlusion start time is the time point recorded when the proportion of occluded pixels changes from below the first threshold to not below the first threshold, and the occlusion end time is the time point recorded when the proportion of occluded pixels changes from not below the first threshold to below the first threshold. The time difference is obtained by subtracting the start time of occlusion from the end time of occlusion. This time difference is the duration of the occlusion event. When the start time and end time of an occlusion event are located in two adjacent time windows, the time window where the start time of the occlusion is located is taken as the time window to which the occlusion event belongs. However, only the time period between the start time of the occlusion and the end time of the time window is calculated as the duration within the time window, and the remaining part is included in the next time window. For each time window, the duration of all occlusion events belonging to that time window is calculated one by one to form a set of durations for each occlusion event within that time window.

[0008] In a preferred embodiment, in step S4, the heat values ​​of the same clothing display area in multiple consecutive preset time windows are obtained, the heat values ​​are arranged in the order of the time windows to obtain a heat value sequence, and the heat value sequence is smoothed to obtain a heat change trajectory. Locate all smoothed heat values ​​that are greater than the preset second threshold on the heat change trajectory. Extract the largest value from the located smoothed heat values ​​as the heat peak. Take the time window corresponding to the heat peak as the heat peak occurrence time. Start from the heat peak occurrence time and trace along the heat change trajectory until the smoothed heat value first drops below the preset second threshold as the heat decay time. The duration of heat is obtained by subtracting the time of heat peak from the time of heat decay. The heat change trajectory of multiple adjacent areas that are spatially adjacent to the clothing display area within the duration of heat is obtained. For each adjacent area, the smoothed heat value corresponding to the start time of the duration of heat is extracted from the heat change trajectory of the adjacent area as the start heat value, and the smoothed heat value corresponding to the end time of the duration of heat is extracted as the end heat value. The difference between the ending heat value and the starting heat value is calculated and compared with a preset trend threshold. If the difference is greater than the preset trend threshold, the heat change trend of the adjacent area is determined to be an upward trend. If the difference is less than the opposite of the preset trend threshold, it is determined to be a downward trend. If the difference is between the opposite of the preset trend threshold and the preset trend threshold, it is determined to be a stable trend. The number of adjacent areas that show an upward trend during the heat duration is counted as the second value. The heat duration is used as the first value. The first value and the second value are multiplied to obtain the product result. The product result is used as the epidemic propagation coefficient.

[0009] The beneficial effects of the present invention are: by dividing a continuous time axis into preset time windows and counting the number of occlusion events and the cumulative duration within each time window to generate a regional heat value, the present invention transforms discrete occlusion behaviors into continuous heat indicators, which can more accurately reflect the actual attention level of the clothing display area than a single behavior count. By tracking the changes in popularity values ​​of the same clothing display area within a continuous time window, the trajectory of popularity change is obtained. The popularity value sequence is smoothed to eliminate local fluctuations caused by random consumer movement, highlighting the overall trend of popularity evolution. The smoothed popularity change trajectory can clearly show the entire process of popularity rise, peak appearance, and popularity decline. Attached Figure Description

[0010] Figure 1 This is a flowchart of the method of the present invention. Detailed Implementation

[0011] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0012] In the description of this application, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the stated features. In the description of this application, "multiple" means two or more, unless otherwise explicitly specified.

[0013] In the description of this application, the term "for example" is used to mean "used as an example, illustration, or description." Any embodiment described as "for example" in this application is not necessarily to be construed as being more preferred or advantageous than other embodiments. The following description is provided to enable any person skilled in the art to make and use the invention. Details are set forth in the following description for purposes of explanation. It should be understood that those skilled in the art will recognize that the invention can be made without using these specific details. In other instances, well-known structures and processes will not be described in detail to avoid obscuring the description of the invention with unnecessary detail. Therefore, the invention is not intended to be limited to the embodiments shown, but is consistent with the broadest scope of the principles and features disclosed in this application.

[0014] like Figure 1 This embodiment provides a method for predicting apparel sales trends by visually analyzing user behavior, including the following steps: S1. Obtain surveillance video covering several clothing display areas, and determine the region of interest for each clothing display area in each frame of the surveillance video. Furthermore, in S1, the boundary of each clothing display area is defined in the initial frame image of the monitoring video, and the pixel area enclosed by the boundary is used as the reference region of interest of the clothing display area. The initial frame image is the first frame image of the monitoring video or a frame image specified by the operator. For each subsequent frame in the surveillance video, excluding the initial frame, the position and shape of the reference region of interest are mapped to the subsequent image using image registration technology. This obtains the region of interest corresponding to the clothing display area in the subsequent image. The image registration technology achieves spatial alignment based on feature point matching or pixel displacement calculation between adjacent frames.

[0015] It should be noted that the surveillance video is acquired by a camera device that is fixedly installed in the clothing store. The surveillance video is a video stream containing continuous time-series image frames. Its field of view covers multiple clothing display areas that are set up in advance in the store. Each clothing display area is a specific location in the physical space used to display one or more garments, such as a shelf, hanging rod, or the area where a mannequin is located. The purpose of acquiring the surveillance video is to provide raw image data for subsequent visual analysis and to ensure that the dynamic changes of each clothing display area can be recorded. In each frame of the surveillance video, the region of interest for each clothing display area is determined. For each frame of the surveillance video, a region of interest corresponding to each clothing display area needs to be independently established. The region of interest is a subset of pixels in the image that corresponds to the spatial location of the clothing display area. By defining the region of interest for each frame, the visual information of different clothing display areas can be isolated from each other, thereby enabling independent occlusion detection and other subsequent processing for each area. In the initial frame of the surveillance video, the boundary of each clothing display area is defined as the reference region of interest. The initial frame of the surveillance video can be the first frame of the video or a reference frame specified by the operator. In this initial frame, a closed boundary is defined for each clothing display area by manual selection or automatic recognition based on image features. The image area enclosed by this boundary is the reference region of interest for that clothing display area. When defining the boundary, it is necessary to ensure that the boundary completely covers the main body of the clothing and its adjacent space within the clothing display area. The boundary shape can be rectangular, polygonal, etc., to accurately match the actual display area. The reference region of interest serves as the spatial reference for locating the same display area in subsequent frames. The reference region of interest (ROI) is mapped to subsequent frames. After obtaining the reference ROI, image registration or feature point tracking techniques are used to transfer the position and shape information of the reference ROI in the initial frame to every subsequent frame of the surveillance video. Since the camera device may have slight displacement or the position of clothing in the scene may have slight changes, the mapping process must ensure that the ROI of each clothing display area in the subsequent frame corresponds spatially to the reference ROI of the initial frame. Through mapping, each subsequent frame obtains a ROI corresponding to the reference ROI of the initial frame, thereby achieving consistency of cross-frame analysis areas.

[0016] S2. Detect the similarity ratio of each region of interest being occluded by the foreground, and record the start and end times of the occlusion event based on the change in the pixel ratio; Furthermore, in S2, N consecutive frames of images are extracted from the surveillance video, where N is a preset number of sampling frames. For each pixel position in the image, the gray values ​​at that pixel position are collected from the N frames of images to form a set containing N gray values. The frequency of each gray value in the set is counted, and the gray value with the highest frequency is taken as the background gray value of the pixel position. After the frequency count and the selection of the highest frequency gray value are completed for all pixel positions, the background gray values ​​selected for each pixel position are arranged and combined according to the spatial arrangement of the original image to form a complete image, which is the background image. For each frame of the surveillance video as the current frame, a pixel-by-pixel difference operation is performed between the current frame and the background image to obtain a difference image. Pixels in the difference image whose pixel values ​​are greater than a preset difference threshold are marked as foreground points. All foreground points constitute the foreground region. The ratio of the number of pixels belonging to the foreground region to the total number of pixels in the region of interest is calculated as the occlusion pixel ratio of the current frame. When the occlusion pixel ratio changes from a state below a preset first threshold to a state not below a preset first threshold, the time point of the current frame is recorded as the occlusion start time. When the occlusion pixel ratio changes from a state not below a preset first threshold to a state below a preset first threshold, the time point of the current frame is recorded as the occlusion end time. The time period between the occlusion start time and the occlusion end time is determined as an occlusion event.

[0017] It should be noted that background modeling refers to using the pixel statistical characteristics of multiple consecutive frames in a surveillance video to construct a static scene image without foreground objects as a background image. In the clothing store scene, the background image reflects the visual characteristics of fixed facilities such as shelves and walls. The purpose of background modeling is to provide a reference benchmark for each subsequent frame. By comparing the current frame with the background image, the dynamic change area caused by consumers passing by or staying can be identified, i.e., the foreground area. Obtaining an accurate background image is a prerequisite for achieving foreground detection. The quality of the background image directly affects the accuracy of subsequent calculations of the occlusion pixel ratio. The foreground region is obtained by subtracting the current frame from the background image. The current frame refers to a frame in the surveillance video that needs to be detected for occlusion. The background image is a static reference image obtained through background modeling. The difference operation is to subtract the pixel values ​​at the same pixel position between the current frame and the background image to obtain a difference image. In the difference image, the positions with large changes in pixel values ​​correspond to objects that appear in the current frame but do not exist in the background image, such as consumers or shopping carts. Thresholding is performed on the difference image, and pixels whose pixel values ​​change beyond the preset difference threshold are marked as foreground points. The connected region formed by all foreground points is the foreground region. The foreground region represents the dynamic objects that occlude the clothing display area in the current frame. The occlusion pixel ratio is calculated as the percentage of pixels occupied by the foreground region within each region of interest (ROI). The ROI is the pixel region corresponding to the clothing display area in each frame of the surveillance video, and the foreground region is the pixel region containing the detected moving object in the current frame. A pixel-level intersection operation is performed between the ROI and the foreground region to obtain the number of pixels within the ROI that also belong to the foreground region. This intersection pixel count is divided by the total number of pixels in the ROI to obtain a value between 0 and 1. This value is the occlusion pixel ratio, which quantifies the degree to which the clothing display area is occluded by foreground objects in the current frame. A higher ratio indicates a larger occluded area, while a lower ratio indicates less or no occlusion. The occlusion start time is recorded when the occlusion pixel ratio changes from below the first threshold to above the first threshold, and the occlusion end time is recorded when the occlusion pixel ratio changes from above the first threshold to below the first threshold. The time period between the start and end times is considered as one occlusion event. The first threshold is a preset ratio value used to determine whether occlusion has occurred. For example, it can be set to 0.2% or 20%. The occlusion pixel ratio change of each region of interest is continuously observed in the time series of the monitoring video. When the occlusion pixel ratio of a frame first crosses from below the first threshold to above the first threshold, the corresponding time point of that frame is recorded as the occlusion start time, indicating that the foreground object has begun to occlude the clothing display area. In subsequent frames, when the occlusion pixel ratio drops from above the first threshold back to below the first threshold, the corresponding time point of that frame is recorded as the occlusion end time, indicating that the foreground object has left the area. The continuous time period from the occlusion start time to the occlusion end time is defined as a complete occlusion event. The occlusion event reflects the duration of a consumer's stay or activity in front of the clothing display area.

[0018] S3. Based on the number of occlusion events and the duration of each occlusion event in each clothing display area within a preset time window, generate the heat value of the clothing display area. Furthermore, in S3, the timeline of the monitoring video is divided into consecutive and equally long preset time windows. For each time window, the total number of occlusion events occurring in each clothing display area within that time window is counted as the number of occlusion events. For each time window, the duration of each occlusion event occurring in each clothing display area within that time window is calculated, and the durations of all occlusion events are summed as the cumulative duration. The number of occlusion events is multiplied by a first weighting coefficient to obtain a first contribution component. The cumulative duration is multiplied by a second weighting coefficient to obtain a second contribution component. The first contribution component and the second contribution component are added together to obtain the heat value of the clothing display area in that time window. The specific steps for calculating the duration of each occlusion event are as follows: The steps for calculating the duration of each occlusion event occurring within each time window include: reading the occlusion start time and occlusion end time of the occlusion event from the occlusion event record. The occlusion start time is the time point recorded when the proportion of occluded pixels changes from below the first threshold to not below the first threshold, and the occlusion end time is the time point recorded when the proportion of occluded pixels changes from not below the first threshold to below the first threshold. The time difference is obtained by subtracting the start time of occlusion from the end time of occlusion. This time difference is the duration of the occlusion event. When the start time and end time of an occlusion event are located in two adjacent time windows, the time window where the start time of the occlusion is located is taken as the time window to which the occlusion event belongs. However, only the time period between the start time of the occlusion and the end time of the time window is calculated as the duration within the time window, and the remaining part is included in the next time window. For each time window, the duration of all occlusion events belonging to that time window is calculated one by one to form a set of durations for each occlusion event within that time window.

[0019] It should be noted that on the timeline of the surveillance video, the continuous time stream is divided into multiple preset time windows of equal length. Each time window serves as the basic time unit for calculating the heat value. The duration of the time window can be preset according to the analysis needs, such as five minutes, ten minutes, or thirty minutes. For each time window, it is necessary to independently summarize the occlusion event data for each clothing display area, because the occlusion events for each area are recorded independently. The division of preset time windows enables the heat value to reflect the dynamic changes in the attention paid to the clothing display area within different time periods. The system counts the number of occlusion events and the cumulative duration of all occlusion events within each time window. The number of occlusion events refers to the total number of occlusion events recorded for the same clothing display area within a time window. Each recorded occlusion start time and corresponding end time constitute a complete occlusion event. Therefore, the count is obtained by simply counting the number of occlusion events triggered within the time window. The cumulative duration of occlusion events is the sum of the durations of each occlusion event occurring within the time window. The duration of each occlusion event is calculated by subtracting the start time from the end time of the event. The cumulative duration reflects the total time consumers spend in front of the clothing display area. By counting the number of events and the cumulative duration, the discrete multiple occlusion behaviors within a time window are transformed into two comprehensive indicators. The popularity value of a window is calculated based on the frequency of occlusion events and the cumulative duration. This calculation considers both the frequency of occlusion events and the duration of each occlusion, as both collectively characterize consumer attention to the clothing display area. The frequency of occurrence reflects how often consumers stop or pass by, while the cumulative duration reflects the total time consumers spend there. Combining these two factors provides a more comprehensive quantification of the area's popularity level. In the specific calculation, the frequency of occurrence is multiplied by a first weighting coefficient to obtain the first contribution component, and the cumulative duration is multiplied by a second weighting coefficient to obtain the second contribution component. The first and second contribution components are then added together to obtain the popularity value. The first and second weighting coefficients are preset constants used to adjust the relative importance of frequency and duration in the popularity value. Using this calculation method, each time window receives a numerical popularity value; a higher value indicates a higher level of attention the clothing display area receives within that time window.

[0020] S4. Track the changes in popularity of the same clothing display area within a continuous time window to obtain a popularity change sequence. Extract the popularity peak from the popularity change sequence trajectory and combine it with the popularity change trend of adjacent areas to determine the popularity spread coefficient of the clothing.

[0021] Furthermore, in step S4, the heat value of the same clothing display area in multiple consecutive preset time windows is obtained, the heat value is arranged in the order of the time windows to obtain a heat value sequence, and the heat value sequence is smoothed to obtain the heat change trajectory. Locate all smoothed heat values ​​that are greater than the preset second threshold on the heat change trajectory. Extract the largest value from the located smoothed heat values ​​as the heat peak. Take the time window corresponding to the heat peak as the heat peak occurrence time. Start from the heat peak occurrence time and trace along the heat change trajectory until the smoothed heat value first drops below the preset second threshold as the heat decay time. The duration of heat is obtained by subtracting the time of heat peak from the time of heat decay. The heat change trajectory of multiple adjacent areas that are spatially adjacent to the clothing display area within the duration of heat is obtained. For each adjacent area, the smoothed heat value corresponding to the start time of the duration of heat is extracted from the heat change trajectory of the adjacent area as the start heat value, and the smoothed heat value corresponding to the end time of the duration of heat is extracted as the end heat value. The difference between the ending heat value and the starting heat value is calculated and compared with a preset trend threshold. If the difference is greater than the preset trend threshold, the heat change trend of the adjacent area is determined to be an upward trend. If the difference is less than the opposite of the preset trend threshold, it is determined to be a downward trend. If the difference is between the opposite of the preset trend threshold and the preset trend threshold, it is determined to be a stable trend. The number of adjacent areas that show an upward trend during the heat duration is counted as the second value. The heat duration is used as the first value. The first value and the second value are multiplied to obtain the product result. The product result is used as the epidemic propagation coefficient.

[0022] It should be noted that for each clothing display area, from the first time window of the monitoring video to the last time window, each time window corresponds to a calculated heat value. These heat values ​​are arranged sequentially according to the time window, forming a time series composed of heat values. This time series directly reflects the original state of the heat of the clothing display area over time. However, due to the randomness and instantaneous fluctuations of the occlusion event, there may be individual time windows in the original series with abnormally high or low heat values. Such local fluctuations can interfere with the accurate judgment of the overall trend. Therefore, it is necessary to smooth the original heat value series. The smoothing process can use the moving average method, that is, for each time window, the average of the heat values ​​of the several adjacent time windows is taken as the smoothed heat value of that time window. By smoothing, the influence of random fluctuations is weakened, highlighting the overall trend of heat change. The heat value series obtained after smoothing is the heat change trajectory. The heat change trajectory is plotted with the time window as the horizontal axis and the smoothed heat value as the vertical axis, which can clearly show the evolution process of the heat of the clothing display area rising, falling, or remaining stable. The peak of popularity is defined as the point on the popularity trajectory where the popularity value exceeds the second threshold. The popularity trajectory consists of smoothed popularity values ​​corresponding to multiple consecutive time windows. The second threshold is a preset popularity value standard used to determine whether the popularity has reached a significant level worthy of attention. The specific value of the second threshold can be set based on historical data statistics or experience. For example, it can be set to twice the average popularity value of all clothing display areas. The smoothed popularity values ​​of all time windows are traversed on the popularity trajectory, and all smoothed popularity values ​​greater than the second threshold are filtered out. The largest value is found among these filtered popularity values. The time window corresponding to this maximum value is the time window in which the popularity peak occurs. This maximum value itself is the popularity peak, which represents the point in time when the clothing display area has reached the highest level of attention. The duration is calculated from the moment the heat index peaks to the moment the heat index decays below the second threshold. The moment the heat index peaks refers to the time point within the time window where the heat index peaks. To accurately calculate the duration, the center or beginning time of the time window is usually used as the representative time of that window. Starting from the moment the heat index peaks, the observation is carried out along the heat index change trajectory to subsequent time windows, tracking the decay process of the smoothed heat index value. When the smoothed heat index value first drops below the second threshold, the time of this time window is recorded as the moment the heat index decays below the second threshold. The time difference obtained by subtracting the moment the heat index peaks from the moment the heat index decays below the second threshold is the duration. The duration reflects the time it takes for the heat index to decay from its peak to a normal level. The longer the duration, the stronger the heat index maintenance ability of the clothing display area, and the slower the consumer attention fades. Simultaneously, the popularity trends of adjacent areas are analyzed during this time period. Adjacent areas refer to other clothing display areas that are spatially adjacent to the clothing display area. These areas may be located to the left or right, front or back, or other nearby positions in the store layout. During this duration, the popularity trajectory of each adjacent area is obtained, and the popularity values ​​of these adjacent areas are analyzed to determine whether they show an upward, downward, or stable trend. Specifically, the popularity values ​​of each adjacent area at the beginning and end of the time period can be calculated. If the popularity value at the end is higher than the popularity value at the beginning and the difference exceeds a preset trend threshold, it is determined to be an upward trend; if it is lower than the beginning and the difference exceeds the trend threshold, it is determined to be a downward trend. The popularity trends of each adjacent area are summarized, and the number or proportion of adjacent areas showing an upward trend is counted as the quantitative result of the popularity trend of adjacent areas. The combination of duration and the popularity trend of adjacent areas is used as the popularity spread coefficient. The popularity spread coefficient is a comprehensive indicator used to quantify the popularity characteristics and spread potential of the clothing displayed in the clothing display area. Duration is used as the first factor, and the quantified result of the popularity trend of adjacent areas is used as the second factor. The two are combined through a preset combination rule. For example, the duration can be multiplied by the number of adjacent areas showing an upward trend, or the duration can be multiplied by a weighting coefficient determined by the proportion of adjacent areas with an upward trend. The combined result is the popularity spread coefficient. The larger the coefficient value, the more popular the clothing is, the longer its popularity lasts, and the more its popularity spreads to the surrounding areas, indicating stronger popularity spread characteristics. The smaller the coefficient value, the more isolated the popularity is and the faster it fades. The popularity spread coefficient provides a basis for decision-making for subsequent adjustments to the clothing display position.

[0023] It should be noted that the descriptions of each embodiment in the above embodiments have different focuses. For parts that are not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

[0024] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0025] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0026] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0027] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0028] Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including both the preferred embodiments and all changes and modifications falling within the scope of the invention.

[0029] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.

Claims

1. A method for predicting apparel sales trends by visually analyzing user behavior, characterized in that: Includes the following steps: S1. Obtain surveillance video covering several clothing display areas, and determine the region of interest for each clothing display area in each frame of the surveillance video. S2. Detect the similarity ratio of each region of interest being occluded by the foreground, and record the start and end times of the occlusion event based on the change in the pixel ratio; S3. Based on the number of occlusion events and the duration of each occlusion event in each clothing display area within a preset time window, generate the heat value of the clothing display area. S4. Track the changes in popularity of the same clothing display area within a continuous time window to obtain a popularity change sequence. Extract the popularity peak from the popularity change sequence trajectory and combine it with the popularity change trend of adjacent areas to determine the popularity spread coefficient of the clothing.

2. The method for predicting apparel sales trends by visually analyzing user behavior according to claim 1, characterized in that, In step S1, the boundary of each clothing display area is defined in the initial frame image of the monitoring video, and the pixel area enclosed by the boundary is used as the reference region of interest of the clothing display area. The initial frame image is the first frame image of the monitoring video or a frame image specified by the operator. For each subsequent frame in the surveillance video, excluding the initial frame, the position and shape of the reference region of interest are mapped to the subsequent image using image registration technology. This obtains the region of interest corresponding to the clothing display area in the subsequent image. The image registration technology achieves spatial alignment based on feature point matching or pixel displacement calculation between adjacent frames.

3. The method for predicting apparel sales trends by visually analyzing user behavior according to claim 1, characterized in that, In step S2, N consecutive frames of images are extracted from the surveillance video, where N is a preset number of sampling frames. For each pixel position in the image, the grayscale values ​​of the N frames at that pixel position are collected to form a set containing N grayscale values. The frequency of each grayscale value in the set is counted, and the grayscale value with the highest frequency is taken as the background grayscale value of the pixel position. After the frequency statistics and the selection of the highest frequency grayscale value are completed for all pixel positions, the background grayscale values ​​selected for each pixel position are arranged and combined according to the spatial arrangement of the original image to form a complete image, which is the background image.

4. The method for predicting apparel sales trends by visually analyzing user behavior according to claim 2, characterized in that, For each frame of the surveillance video as the current frame, a pixel-by-pixel difference operation is performed between the current frame and the background image to obtain a difference image. Pixels in the difference image whose pixel values ​​are greater than a preset difference threshold are marked as foreground points. All foreground points constitute the foreground region. The ratio of the number of pixels belonging to the foreground region to the total number of pixels in the region of interest is calculated as the occlusion pixel ratio of the current frame. When the occlusion pixel ratio changes from a state below a preset first threshold to a state not below a preset first threshold, the time point of the current frame is recorded as the occlusion start time. When the occlusion pixel ratio changes from a state not below a preset first threshold to a state below a preset first threshold, the time point of the current frame is recorded as the occlusion end time. The time period between the occlusion start time and the occlusion end time is determined as an occlusion event.

5. The method for predicting apparel sales trends by visually analyzing user behavior according to claim 1, characterized in that, In step S3, the timeline of the monitoring video is divided into consecutive and equally long preset time windows. For each time window, the total number of occlusion events occurring in each clothing display area within that time window is counted as the number of occlusion events. For each time window, the duration of each occlusion event occurring in each clothing display area within that time window is calculated, and the durations of all occlusion events are summed as the cumulative duration. The number of occlusion events is multiplied by a first weighting coefficient to obtain a first contribution component. The cumulative duration is multiplied by a second weighting coefficient to obtain a second contribution component. The first contribution component and the second contribution component are added together to obtain the heat value of the clothing display area in that time window.

6. The method for predicting apparel sales trends by visually analyzing user behavior according to claim 5, characterized in that, The specific steps for calculating the duration of each occlusion event are as follows: The steps for calculating the duration of each occlusion event occurring within each time window include: reading the occlusion start time and occlusion end time of the occlusion event from the occlusion event record. The occlusion start time is the time point recorded when the proportion of occluded pixels changes from below the first threshold to not below the first threshold, and the occlusion end time is the time point recorded when the proportion of occluded pixels changes from not below the first threshold to below the first threshold. The time difference is obtained by subtracting the start time of occlusion from the end time of occlusion. This time difference is the duration of the occlusion event. When the start time and end time of an occlusion event are located in two adjacent time windows, the time window where the start time of the occlusion is located is taken as the time window to which the occlusion event belongs. However, only the time period between the start time of the occlusion and the end time of the time window is calculated as the duration within the time window, and the remaining part is included in the next time window. For each time window, the duration of all occlusion events belonging to that time window is calculated one by one to form a set of durations for each occlusion event within that time window.

7. The method for predicting apparel sales trends by visually analyzing user behavior according to claim 1, characterized in that, In step S4, the heat value of the same clothing display area in multiple consecutive preset time windows is obtained, the heat value is arranged in the order of the time windows to obtain a heat value sequence, and the heat value sequence is smoothed to obtain the heat change trajectory. Locate all smoothed heat values ​​that are greater than a preset second threshold on the heat change trajectory. Extract the largest value from the located smoothed heat values ​​as the heat peak. Take the time window corresponding to the heat peak as the heat peak occurrence time. Start from the heat peak occurrence time and trace along the heat change trajectory until the smoothed heat value first drops below the preset second threshold as the heat decay time.

8. The method for predicting apparel sales trends by visually analyzing user behavior according to claim 7, characterized in that, The duration of heat is obtained by subtracting the time of heat peak from the time of heat decay. The heat change trajectory of multiple adjacent areas that are spatially adjacent to the clothing display area within the duration of heat is obtained. For each adjacent area, the smoothed heat value corresponding to the start time of the duration of heat is extracted from the heat change trajectory of the adjacent area as the start heat value, and the smoothed heat value corresponding to the end time of the duration of heat is extracted as the end heat value. The difference between the ending heat value and the starting heat value is calculated and compared with a preset trend threshold. If the difference is greater than the preset trend threshold, the heat change trend of the adjacent area is determined to be an upward trend. If the difference is less than the opposite of the preset trend threshold, it is determined to be a downward trend. If the difference is between the opposite of the preset trend threshold and the preset trend threshold, it is determined to be a stable trend. The number of adjacent areas that show an upward trend during the heat duration is counted as the second value. The heat duration is used as the first value. The first value and the second value are multiplied to obtain the product result. The product result is used as the epidemic propagation coefficient.