A method and system for generating a market environment analysis report
Patent Information
- Application Number
- CN202611171190.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-04
- Publication Date
- 2026-11-03
AI Technical Summary
Existing market environment analysis reports lack real-time trend detection solutions, resulting in significant waste of computing resources and an inability to accurately pinpoint the core drivers of trend shifts, leading to insufficient timeliness and accuracy in the analysis reports.
By acquiring time-series data on market popularity on social media platforms, multinomial fitting is performed using a sliding window to calculate derivative values, inflection point candidates are detected and verified, main causal dimensions are selected, and targeted data recall conditions are constructed for attribution analysis.
It achieves timely and accurate inflection point detection, reduces system resource consumption, improves the accuracy of attribution analysis, and can quickly respond to changes in market trends and support real-time market strategy adjustments.
Smart Images

Figure CN123030815A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence technology, and in particular to a method and system for generating market environment analysis reports. Background Technology
[0002] With the rapid development of content communities and social media platforms, the brand market environment is characterized by strong dynamism and rapid iteration. The popularity of product topics and user interaction in online content communities fluctuate rapidly over time. The core value of market analysis has shifted from periodically reviewing historical conditions to capturing trend shifts in real time and quickly identifying the causes of changes, which places higher demands on the timeliness and accuracy of analysis reports.
[0003] Existing market environment analysis reports have significant limitations in trend detection and attribution solutions. Static cross-sectional comparison methods can only achieve coarse-grained judgment of rises and falls in the cyclical dimension, and cannot pinpoint the specific time points of trend reversals, making it difficult to meet real-time early warning requirements. In particular, the first-order difference method judges the trend direction by the difference between adjacent data points, which is highly sensitive to the daily fluctuation noise inherent in social media and is prone to generating a large number of false trend signals. Offline batch change point detection algorithms require offline calculation based on the full historical data, which cannot support online real-time monitoring. Furthermore, when new data is added, the entire sequence must be recalculated, and the computational cost increases linearly with the amount of data.
[0004] A more critical flaw lies in the fact that all the aforementioned solutions, after identifying trend changes, employ an indiscriminate full-data recall strategy, pulling all notes before and after the inflection point for attribution analysis. However, aggregated popularity is influenced by multiple semantic dimensions such as user sentiment, product efficacy, and usage scenarios, while the core factors actually driving the inflection point are usually concentrated in only a few dimensions. Full-data recall not only results in a severe waste of computational and I / O resources but also dilutes the signal strength of the core dimensions, leading to attribution conclusions that tend to be averaged and unable to accurately pinpoint the core driving force of trend shifts. In large-scale scenarios with parallel monitoring of thousands of keywords, full-data queries also place enormous concurrent pressure on the underlying data warehouse, limiting the system's scalability. Summary of the Invention
[0005] The purpose of this invention is to provide a method for generating a market environment analysis report, comprising the following steps: Obtain time-series data of the market popularity of the target object on social media platforms. The time-series data includes an aggregated popularity sequence and component popularity sequences with D semantic dimensions, where D is a positive integer greater than or equal to 2. A sliding window of preset width slides on the aggregated heat sequence and the component heat sequence respectively. At each window position, a polynomial fit is performed on the data points within the window. Based on the fitting coefficients, the aggregated second derivative, aggregated first derivative, and component first derivative values at the window center point are calculated. The component first derivative values are cached in chronological order, and the aggregated first derivative values at each time point are cached in chronological order for subsequent inflection point candidate detection. Inflection point candidates are detected based on the sign change of the aggregated first derivative values at adjacent time points. When the aggregated first derivative value changes from positive to negative or from negative to positive, the corresponding time point is marked as an inflection point candidate. The aggregated second derivative value at the inflection point candidate time point is used to help determine whether the inflection point type is a peak or a trough. The inflection point is verified by the consistency of the sign of the aggregated first derivative values at subsequent time points. When the verification is successful, it is confirmed as a valid inflection point, and the inflection point position is recorded. ; In response to confirming the effective inflection point, the contribution weight of each semantic dimension to the effective inflection point is calculated based on the first derivative values of each cached component, and the set of main cause dimensions is selected according to the contribution weight. Based on the set of main cause dimensions, a targeted data recall condition is constructed, and only note data within a preset time range before and after the inflection point, and whose dimension label matches any dimension label in the set of main cause dimensions, is recalled. Perform inflection point attribution analysis based on the recalled notes data, and update the market environment analysis report based on the results of the inflection point attribution analysis.
[0006] Furthermore, the present invention also discloses a market environment analysis report generation system, comprising: The acquisition module is used to acquire time series data of the market popularity of the target object on social media platforms. The time series data includes an aggregated popularity sequence and component popularity sequences with D semantic dimensions, where D is a positive integer greater than or equal to 2. The processing module is used to slide a sliding window of preset width on the aggregated heat sequence and the component heat sequence respectively, perform polynomial fitting on the data points in the window at each window position, calculate the aggregated second derivative, aggregated first derivative and each component first derivative at the window center point according to the fitting coefficient, cache each component first derivative in time order, and cache the aggregated first derivative at each time point in time order for subsequent inflection point candidate detection. The recording module is used to detect inflection point candidates based on the sign changes of the aggregated first derivative values at adjacent time points. When the aggregated first derivative value changes from positive to negative or from negative to positive, the corresponding time point is marked as an inflection point candidate. The aggregated second derivative value at the inflection point candidate time point is used to help determine whether the inflection point type is a peak or a trough. The inflection point is verified by the consistency of the sign of the aggregated first derivative values at subsequent time points. When the verification is successful, the inflection point is confirmed as a valid inflection point, and the inflection point position is recorded. ; The filtering module is used to, in response to the confirmation of the effective inflection point, calculate the contribution weight of each semantic dimension to the effective inflection point based on the cached first derivative values of each component, and filter out the set of main cause dimensions according to the contribution weight. The recall module is used to construct targeted data recall conditions based on the main cause dimension set, and only recall note data within a preset time range before and after the inflection point, and whose dimension label matches any dimension label in the main cause dimension set. The analysis module is used to perform inflection point attribution analysis based on the recalled note data and update the market environment analysis report based on the inflection point attribution analysis results.
[0007] The beneficial effects of this application are as follows: Firstly, this invention balances the timeliness and accuracy of inflection point detection. It calculates the first and second derivatives of aggregation heat online using a sliding window quadratic polynomial fitting. Inflection point candidate marking is strictly based on the calculus extremum criterion of the first derivative changing from positive to negative (peak point) or from negative to positive (valley point), fundamentally avoiding the mathematical error of misidentifying curvature inflection points as trend peaks and troughs. Simultaneously, the second derivative is used to assist in distinguishing peak and trough types, and combined with a subsequent first derivative sign consistency verification mechanism, it effectively suppresses false alarms caused by daily fluctuation noise. The output inflection point signal is stable and reliable, and can be directly used for market trend early warning.
[0008] Secondly, this invention can significantly reduce the resource overhead of system operation. By pre-constructing multi-dimensional component heat sequences and caching the first derivative results of each dimension, after detecting an inflection point, there is no need to rescan the entire original data. The contribution of each dimension can be quickly calculated using only the cached derivative data. At the same time, based on the Pareto principle, core main factor dimensions are selected, and targeted data retrieval is performed only for the main factor dimensions, which reduces the amount of data for subsequent analysis, reduces the transmission and calculation overhead of invalid data, and reduces the concurrent query pressure on the database.
[0009] Third, this invention can significantly improve the accuracy of attribution analysis. By selectively recalling and filtering note data with irrelevant semantic dimensions, the input data for attribution analysis has a high degree of semantic focus, avoiding the dilution of core driving signals by irrelevant information. It can accurately locate the core semantic dimensions and specific discussion points that trigger trend shifts, and the output attribution conclusions directly address the core business question of why trends change, effectively supporting the rapid formulation and adjustment of market strategies. Attached Figure Description
[0010] Figure 1 This is a schematic diagram of a method flow proposed in an embodiment of this application.
[0011] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0012] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
[0013] This invention provides a method for generating market environment analysis reports, applicable to scenarios such as brand market monitoring, competitor analysis, and trend forecasting on social media platforms. It is particularly suitable for real-time market environment analysis and automatic report generation for product topics and industry keywords in content communities on internet social platforms. This method is executed by a market environment analysis system, which typically includes a data acquisition module, a semantic annotation module, a time-series calculation engine, an attribution analysis engine, a report generation module, and an underlying note database. Deployed on a cloud server or local industrial computer, it supports parallel real-time monitoring of hundreds to thousands of research keywords.
[0014] Example 1 like Figure 1 As shown, the method for generating a market environment analysis report according to the present invention includes the following steps: S1. Obtain the market popularity time series data of the target object on social media platforms. The time series data includes the aggregated popularity sequence and the component popularity sequences of D semantic dimensions, where D is a positive integer greater than or equal to 2. In this embodiment, the target object is the market research keyword to be monitored, such as a specific product name, category name, efficacy concept, or competitor brand name. The market popularity time series data is a time series data set that represents the market discussion popularity of the target object, statistically analyzed according to a preset time granularity. It includes a total popularity sequence with an aggregate dimension and D component popularity sequences with subdivided semantic dimensions.
[0015] Before performing this step, the system pre-defines the semantic dimension and calculates the component heat, specifically including the following sub-steps: S11. Pre-define D semantic tags and configure a corresponding keyword dictionary for each semantic tag. The semantic tags include at least one of the following types: user sentiment polarity tags, efficacy tags, usage scenario tags, price range tags, and user group tags. In this embodiment, the value of D is preset to a positive integer between 5 and 8 based on industry characteristics and analysis granularity. Taking skincare products in the beauty category as an example, five semantic dimensions can be set, with corresponding semantic tags: positive sentiment tag, wrinkle reduction tag, firming effect tag, emergency rescue scenario tag for those who stay up late, and sensitive skin tag. Each semantic tag corresponds to a pre-built keyword dictionary, which includes synonyms, related expressions, and commonly used colloquial expressions under that semantic meaning. Discussion content not covered by any of the above semantic tags is uniformly classified into the "Other" dimension to ensure the completeness of the heat decomposition.
[0016] S12. For each note, obtain the original text content of the note, the interaction weight value of the note, and the publication timestamp of the note; In this embodiment, the note data refers to content data posted by users on social media platforms, including text information such as the note body, title, and comments. The interaction weight value is calculated based on the number of likes, favorites, and comments of the note according to preset weights, and is used to characterize the note's dissemination influence and user attention. The posting timestamp is used to assign the note to a statistical period with a corresponding time granularity.
[0017] S13. Match the original text content with the D keyword dictionaries respectively. For the i-th semantic dimension, count the number of words in the original text content of the note that match the keyword dictionary corresponding to the i-th semantic dimension, and use it as the original hit vector value of the i-th semantic dimension. In this embodiment, the system employs a lightweight string matching algorithm to sequentially match the original text of a single note against D keyword dictionaries, counting the number of times each dictionary's words are matched in the text. A higher number of matched words indicates a stronger discussion intensity for the note in the corresponding semantic dimension. For sentiment polarity tags, a lightweight sentiment classification model can output a sentiment intensity value as the original hit vector value for that dimension.
[0018] S14. The product of the original hit vector value of the i-th semantic dimension and the interaction weight value is used as the component contribution value of the note in the i-th semantic dimension. In this embodiment, the component contribution value of a single note in a single semantic dimension is equal to the product of the original hit vector value of that dimension and the interaction weight value of that note. Through this calculation method, notes with higher dissemination influence have a larger contribution value in the corresponding semantic dimension, so that component popularity can simultaneously reflect the amount of discussion and the dissemination popularity.
[0019] S15. For each time point, sum up the component contribution values of all notes contained in that time point on the same semantic dimension to obtain the component heat value of each semantic dimension at that time point. S16. Arrange the component heat values at each moment in chronological order to obtain the component heat sequence of the D semantic dimensions; In this embodiment, each moment corresponds to a preset time granularity, such as a natural day, so each moment corresponds to one natural day. The component contribution values of all notes published on that day in the i-th semantic dimension are summed to obtain the component popularity value of that semantic dimension on that day; the component popularity values of all moments are arranged in order from morning to evening according to the date, thus forming the component popularity sequence of the i-th semantic dimension.
[0020] Correspondingly, the aggregated heat value at each moment of the aggregated heat sequence is equal to the sum of the component heat values of all D semantic dimensions and the heat values of the "other" dimensions at that moment. That is, the aggregated heat is the sum of the component heat values of all dimensions, ensuring that the aggregated heat and component heat values satisfy the summation relationship in numerical terms.
[0021] S2. Perform filtering preprocessing on the aggregated heat sequence and the D component heat sequences respectively to obtain a smoothed aggregated sequence and each smoothed component sequence; In this embodiment, the original aggregated heat series and component heat series exhibit significant diurnal fluctuation noise. For example, user activity is generally higher on weekends than on weekdays, causing periodic pulses in the heat values. Preprocessing with filtering to suppress high-frequency noise improves the accuracy of subsequent inflection point detection and reduces false inflection points. This step employs an exponentially weighted moving average filtering method, specifically including the following sub-steps: S21. Obtain the original aggregate heat value of the aggregate heat sequence at each time step, and the original component heat value of the i-th semantic dimension at each time step, i=1, 2, ..., D; S22. Calculate the current smoothed aggregation value at the current moment based on the original aggregation heat value, the preset first smoothing factor, and the historical smoothed aggregation value at the previous moment. Specifically, the product of the first smoothing factor and the original aggregation heat value is added to the product of the complement of the first smoothing factor and the historical smoothed aggregation value to obtain the current smoothed aggregation value. The current formula for calculating the smoothed aggregate value is as follows: ; in, The current smoothed aggregate value. As the first smoothing factor, This represents the original aggregation heat value at the current moment. This is the historical smoothed aggregate value from the previous moment.
[0022] S23. Based on the original component heat value, the preset second smoothing factor and the historical smoothed component value of the i-th semantic dimension at the previous moment, calculate the current smoothed component value of the i-th semantic dimension at the current moment. Specifically, multiply the product of the second smoothing factor and the original component heat value, and add the product of the complement of the second smoothing factor and the historical smoothed component value to obtain the current smoothed component value. The formula for calculating the current smooth component value is as follows: ; in, The smoothed component value of the i-th semantic dimension at the current time step. As the second smoothing factor, This represents the current moment's original component heat value for the i-th semantic dimension. The historical smoothing component value of the i-th semantic dimension at the previous moment.
[0023] S24. For each of the aggregate heat sequence and the D component heat sequences, repeat the above calculation in chronological order to obtain the smooth aggregate sequence and each smooth component sequence respectively. In this embodiment, the first smoothing factor and the second smoothing factor have the same value, ranging from 0.2 to 0.4 for daily frequency data, and 0.3 in the preferred embodiment. A larger smoothing factor results in a faster response of the filtered sequence to the original data, but a weaker smoothing effect; a smaller smoothing factor results in a stronger smoothing effect, but a greater response lag. The value of 0.3 achieves a good balance between noise suppression and trend response speed. For the initial time of the sequence, the original heat value is directly used as the corresponding smoothing value, serving as the initial value for iterative calculation.
[0024] After this step, the smoothed aggregate sequence and each smoothed component sequence retain the medium- and long-term trend, and eliminate high-frequency noise caused by daily random fluctuations and periodic weekend effects, providing a stable data foundation for subsequent inflection point detection.
[0025] S3. Slide a sliding window of a preset width on the aggregate heat sequence and the component heat sequence respectively. Perform polynomial fitting on the data points in the window at each window position. Calculate the aggregate second derivative, aggregate first derivative and the first derivative of each component at the center point of the window according to the fitting coefficients. Cache the first derivative of each component in chronological order. In this embodiment, a sliding window is used to extract local segments from time-series data for curve fitting, thereby calculating the local first and second derivatives to characterize the rate of change and curvature of the trend. Polynomial fitting employs a quadratic polynomial to fit the bending characteristics of the local trend, thus identifying inflection points. This step specifically includes the following sub-steps: S31. Obtain the preset width W of the sliding window, where W is an odd number greater than or equal to 5, so that the sliding window has a unique center moment; In this embodiment, W represents the number of data points contained in the sliding window. Choosing an odd number ensures that the window has a unique center point, and the derivative calculation corresponds to the time of the center point, guaranteeing the accuracy of the time series position. For daily frequency data, the preferred value for W is 7, meaning the window covers data for 7 consecutive days, which can capture short-term trend changes while retaining sufficient statistical stability.
[0026] S32. At each current time t, taking the current time t as the end point of the window, extract W aggregation heat values from the smooth aggregation sequence from time t-W+1 to time t to form an aggregation window data sequence. In this embodiment, the window slides forward over time, and moves one unit to the right for each new data point. At the current time t, the window covers a time range from t-W+1 to t, a total of W data points, and the center time of the window is t-(W-1) / 2.
[0027] It should be noted that when fitting the data with the current time t as the end point of the window, the derivative obtained corresponds to the time at the center of the window. The value obtained when the system receives data and completes calculations at time t represents the value at time t, not the current time t. This means that the derivative value obtained represents the value at time t. The rate of change of the trend at any given time. For daily data with W=7, the derivative calculated when the data arrives on day 7 corresponds to day 4. The system stores the derivative using its actual corresponding center time. It is cached as a time index, rather than using the data arrival time t as the index.
[0028] S33. Using the local index within the window as the independent variable and the W aggregated heat values as the dependent variable, the least squares method is used to fit a quadratic polynomial to obtain aggregated quadratic fitting coefficients, which include aggregated quadratic term coefficients, aggregated linear term coefficients, and aggregated constant term. In this embodiment, W data points within the window are assigned local indices 1, 2, ..., W sequentially as independent variable x, and the corresponding smoothed aggregated values are used as dependent variable y. A quadratic polynomial is fitted using the least squares method. ; Where a is the coefficient of the quadratic term, b is the coefficient of the linear term, and c is the constant term.
[0029] S34. Calculate the aggregated second derivative at the center time based on the aggregated quadratic term coefficients, and calculate the aggregated first derivative at the center time based on the aggregated linear term coefficients and the aggregated quadratic term coefficients; In this embodiment, the first derivative of the quadratic polynomial is calculated. Second derivative The calculation formula is as follows: ; ; Substituting the local index x=(W+1) / 2 corresponding to the center point of the window into the first derivative formula, we obtain the aggregated first derivative value at the center time. The aggregated second derivative value is 2a, which is independent of the x position and is a constant value throughout the entire window.
[0030] The first derivative represents the rate of increase or decrease in the popularity trend, while the second derivative represents the speed of change of the trend rate, that is, the direction and magnitude of the curvature of the curve, which is the core indicator for judging the trend reversal.
[0031] S35. For each semantic dimension i, extract the W component heat values from time t-W+1 to time t in the same way to form the component window data sequence of the i-th semantic dimension. Use the least squares method to fit the quadratic polynomial to obtain the component quadratic fitting coefficient of the i-th semantic dimension. Calculate the component first derivative value of the i-th semantic dimension at the center time based on the component quadratic fitting coefficient. In this embodiment, for the smoothed component sequence of each semantic dimension, the same window extraction, quadratic polynomial fitting, and differentiation calculation as the aggregation sequence are performed to obtain the first-order derivative and second-order derivative values of each component at the center time. The system stores the first-order derivative values of each semantic dimension in a circular queue cache in chronological order. The cache length L is determined based on the data range required for attribution calculation: attribution calculation requires reading the first-order derivative values of W times before and W times after the inflection point simultaneously, therefore the cache must at least cover the complete interval from W times before the inflection point to W times after the inflection point, i.e., the cache length L ≥ 2W + 1 (including the inflection point time). (Itself). Furthermore, considering the delay caused by the window center offset (W-1) / 2 during inflection point detection and the verification window M, the actual cache length is preferably L=2W+M+1 to ensure that complete data before and after the inflection point is not evicted when the inflection point is confirmed. The cache eviction strategy adopts a first-in, first-out (FIFO) approach. When new data is written, if the cache is full, the data with the earliest timestamp is evicted. Since the cache length is designed to be 2W+M+1, and the inflection point requires M time steps from candidate to confirmed, the W time steps of data before the inflection point and the M time steps of data generated after the inflection point are all retained in the cache during confirmation, satisfying the data requirements for preliminary attribution calculation.
[0032] The technical effect of the above-mentioned parallel fitting and caching mechanism is that when a valid inflection point is detected, the system does not need to backtrack the original data and re-execute the fitting calculation. It can directly read the first derivative value of the component at the corresponding time from the cache queue to complete the attribution calculation, keeping the calculation time of the attribution link at the constant level, and ensuring that the system can quickly complete the attribution analysis after the inflection point is confirmed.
[0033] S4. Detect inflection point candidates based on the sign change of the aggregated first derivative values at adjacent time points. When the aggregated first derivative value changes from positive to negative or from negative to positive, mark the corresponding time point as an inflection point candidate. Use the aggregated second derivative value at the inflection point candidate time point to help determine whether the inflection point type is a peak or a valley. Verify the inflection point by checking the consistency of the sign of the aggregated first derivative values at subsequent time points. When the verification is successful, confirm it as a valid inflection point and record the inflection point position. .
[0034] In this embodiment, the detection target is the local peaks (maximum points) and troughs (minimum points) of the market popularity time series, that is, the extreme turning points where the popularity trend changes from rising to falling or from falling to rising, which is different from the curvature inflection points that only represent the changes in the concavity and convexity of the curve. This scheme strictly follows the mathematical rules of determining extreme values by the sign change of the first derivative of calculus to complete the inflection point candidate labeling, abandoning the original erroneous logic of determining peaks and troughs by the sign change of the second derivative, and completely avoiding the problem of mathematical criterion errors. At the same time, through the sign consistency check of the subsequent verification window, false extreme value signals caused by daily noise and instantaneous fluctuations are filtered out, and finally reliable and valid peak and trough inflection points are output, and the corresponding inflection point time position is recorded. This step specifically includes the following sub-steps: S41. Obtain the aggregated first derivative values of adjacent time points (i.e., the current time point and the previous time point); In this embodiment, both the first-order and second-order derivative values of the aggregation are calculated and cached by the window quadratic polynomial fitting in step S3. The first-order derivative value is used to characterize the instantaneous rate of change of the current aggregation popularity. A positive first-order derivative value indicates that the market popularity is in an upward phase; a negative first-order derivative value indicates that the market popularity is in a downward phase. The reversal of the first-order derivative sign is the core mathematical basis for determining the peaks and troughs of the popularity trend.
[0035] S42. When the aggregate first derivative values of adjacent time points have opposite signs, the corresponding time point is marked as a candidate inflection point. This embodiment strictly adheres to the mathematical criteria for determining extreme points, using only the sign change of the first derivative crossing zero as the sole criterion for identifying inflection point candidates. If the aggregated first derivative value was positive at the previous moment and negative at the current moment, it indicates that market sentiment has shifted from a continuous rise to a continuous fall, and the corresponding moment is identified as a peak candidate. Conversely, if the aggregated first derivative value was negative at the previous moment and positive at the current moment, it indicates that market sentiment has shifted from a continuous fall to a continuous rise, and the corresponding moment is identified as a trough candidate. This step eliminates the original first derivative amplitude threshold determination logic, completely resolving the technical defect in traditional schemes that misidentify curvature inflection points as trend peaks and troughs.
[0036] S43. Starting from the candidate inflection point, obtain the aggregated first derivative values of M times within a preset verification window width M to form a verification data sequence. In this embodiment, the verification window width M is a preset fixed positive integer. For daily market popularity time series data, M is preferably set to 3. After marking the candidate inflection point, the system takes the candidate moment as the starting node and extracts the aggregated first derivative values of M consecutive moments to form a verification data sequence. This sequence is used to verify whether the sign reversal of the first derivative is a continuous and genuine trend reversal, eliminating false inflection points caused by instantaneous noise such as platform traffic fluctuations and abnormal daily user activity.
[0037] S44. Based on the direction of the sign change of the first derivative in step S42, directly determine the peak and valley type of the inflection point candidate and determine the expected verification direction: If the aggregated first derivative value at the previous time step is positive and the current time step is negative (i.e., changing from positive to negative), then the candidate is determined to be a peak point, and the expected verification direction is negative (i.e., the first derivative should continue to be negative at subsequent time steps); if the aggregated first derivative value at the previous time step is negative and the current time step is positive (i.e., changing from negative to positive), then the candidate is determined to be a valley point, and the expected verification direction is positive (i.e., the first derivative should continue to be positive at subsequent time steps). In this embodiment, the determination of peak and valley types is strictly based solely on the actual sign change direction of the first derivative, with the aggregated second derivative value serving only as optional curvature auxiliary verification information. When the sign of the aggregated second derivative is inconsistent with the peak and valley type indicated by the sign change direction of the first derivative (for example, the first derivative changes from positive to negative to indicate a peak, but the second derivative is positive), the peak and valley type is still determined based on the sign change direction of the first derivative. In this case, the second derivative does not participate in the determination of peak and valley types to avoid classification errors caused by conflicts in mathematical criteria.
[0038] S45. Determine whether the sign of each aggregated first derivative value in the verification data sequence is consistent with the expected direction, count the number of consistent moments, calculate the ratio of the number of consistent moments to M, and obtain the consistency ratio. This embodiment iterates through the aggregated first derivative values at all times within the verification data sequence, compares the sign of each first derivative value with the preset expected trend direction, counts the number of valid times with consistent signs, and calculates the trend consistency ratio using the following formula: ; In the formula: For consistency ratio, To verify the number of moments when the symbol within the window matches the expected direction, Sets the preset total width of the verification window.
[0039] S46. When the consistency ratio is greater than a preset second threshold, the candidate peak-valley inflection point is confirmed as a valid peak-valley inflection point, and the inflection point candidate time is recorded as the inflection point position. .
[0040] In this embodiment, the second threshold is preset as a confidence threshold, preferably 2 / 3. When the calculated consistency ratio is greater than this threshold, it proves that the current trend shift in popularity is statistically significant and sustainable, and is not caused by instantaneous data fluctuations. The candidate peak-valley inflection point is then confirmed as a valid inflection point, and the candidate time is recorded as the location of the valid inflection point. If the consistency ratio does not reach the preset threshold, the sign flip is determined to be a false fluctuation, the inflection point candidate is discarded, and the subsequent dimensional contribution calculation, data targeted recall, attribution analysis, and report update process are not triggered.
[0041] S5. In response to confirming the effective inflection point, calculate the contribution weight of each semantic dimension to the effective inflection point based on the first derivative values of each cached component, and filter out the main cause dimension set according to the contribution weight. In this embodiment, attribution analysis is triggered after the effective inflection point is confirmed. Its inputs are all from the first-order derivative values of each semantic dimension component cached in step S3, eliminating the need to reread the original time-series data or repeat fitting calculations, thus ensuring extremely low latency in the attribution process. This step quantifies the driving contribution of each dimension to the convergence inflection point by calculating the slope change magnitude of each dimension before and after the inflection point, and selects the core driving dimensions based on the Pareto principle. Specifically, it includes the following sub-steps: S51, with the aforementioned effective inflection point position To define the boundary, the window before the inflection point and the window after the inflection point are determined based on the preset width W of the sliding window. The window before the inflection point is the window starting from the first... -W time to the W consecutive time points from time -1, the window after the inflection point is from the first... +1 hour to the +W consecutive time points.
[0042] The aforementioned windowing requires a total of 20,000 first-order derivative values. It should be noted that the inflection point confirmation occurs at the Mth time after the inflection point candidate (i.e., time...). +M), at this point only data for M time intervals has been generated after the inflection point, and the data for time intervals from M+1 to W after the inflection point (i.e. +M+1 to The data for +W) has not yet been generated, so complete back window data cannot be obtained immediately upon confirmation. Therefore, this invention employs a two-stage attribution mechanism: Phase 1 (Preliminary Attribution): At the Inflection Point Confirmation Moment +M, the system uses the data from the W moments before the inflection point and the data from the M moments after the inflection point to perform preliminary attribution calculations and push early warning notifications; Phase Two (Complete Attribution Completion): When time progresses to... At time +W (i.e., when all data for the W time points after the inflection point has been generated), the system automatically triggers a complete attribution recalculation, recalculating the contribution weights using the complete data from the W time points before and after the inflection point and updating the report.
[0043] The cache length L is designed as L = 2W + M + 1 to ensure that... When performing a complete attribution calculation at time +W, all data from time W before the inflection point to time W after the inflection point are retained in the cache, without the need to backtrack the original data.
[0044] S52. For the i-th semantic dimension, extract the first-order derivative values of the front window at each time point before the inflection point from the cached first-order derivative values of each component and calculate their arithmetic mean as the average slope of the front window of the i-th semantic dimension. Extract the first-order derivative values of the back window at each time point after the inflection point and calculate their arithmetic mean as the average slope of the back window of the i-th semantic dimension. The formulas for calculating the average slope of the front window and the average slope of the back window are as follows: ; ; In the formula: Let be the average slope of the front window for the i-th semantic dimension. Let be the average slope of the window after the i-th semantic dimension. Let W be the first derivative value of the i-th semantic dimension at time τ, and W be the width of the sliding window. This is the effective inflection point location.
[0045] In this embodiment, the average slope of the front window represents the average rate of change of the semantic dimension over a period of time before the inflection point, while the average slope of the back window represents the average rate of change over a period of time after the inflection point. Using the window mean instead of the instantaneous value at the inflection point can eliminate the random noise caused by daily data fluctuations, ensuring that the attribution results reflect sustainable and statistically significant trend changes rather than instantaneous pulse signals.
[0046] S53. Calculate the absolute value of the difference between the average slope of the back window and the average slope of the front window, and use it as the absolute value of the slope change of the i-th semantic dimension. absolute value of slope change The calculation formula is as follows: ; In this embodiment, the absolute value of the slope change quantitatively characterizes the degree of change in the rate of change of popularity of this semantic dimension before and after the inflection point. The larger the value, the more drastic the trend reversal of this dimension, and the stronger its driving effect on the inflection point of aggregate popularity. The absolute value form is used because regardless of whether the dimension changes from an accelerating rise to a decelerating rise (peak scenario) or from an accelerating fall to a decelerating fall (valley scenario), the drasticness of its change is positively correlated with its contribution to the inflection point.
[0047] S54. Divide the absolute value of the slope change of the i-th semantic dimension by the sum of the absolute values of the slope changes of all D semantic dimensions to obtain the contribution weight of the i-th semantic dimension. The formula for calculating contribution weight is as follows: ; in, Let i be the contribution weight of the i-th semantic dimension. Let be the absolute value of the slope change in the i-th semantic dimension. This represents the sum of the absolute values of the slope changes across all semantic dimensions.
[0048] In this embodiment, the absolute change magnitude of each dimension is converted into relative contribution weights through normalization calculation, and the sum of the contribution weights of all dimensions is 1. The higher the contribution weight, the more likely that the semantic dimension is the main driving force that triggered the inflection point of this aggregation trend.
[0049] S55. Arrange the D semantic dimensions in descending order of contribution weight, and accumulate them one by one starting from the first weight after sorting. When the accumulation reaches or exceeds the preset accumulation threshold for the first time when the accumulation reaches the mth item, the first m semantic dimensions are taken as the main cause dimension set. The formula for determining the main factor dimension is as follows: ; in, Let be the contribution weight of the j-th semantic dimension after descending sorting, and m be the number of main factor dimensions obtained through filtering. The preset cumulative contribution threshold is preferably set to 0.80.
[0050] In this embodiment, the preset cumulative threshold is the Pareto threshold, preferably set to 0.80, meaning that accumulation stops when the cumulative contribution reaches 80%. This mechanism is based on empirical patterns in market communication: sudden shifts in market popularity are usually driven by a few core topic dimensions. By truncating with an 80% cumulative percentage, a few core driving dimensions can be adaptively selected, maximizing the reduction of the scope of subsequent data retrieval while ensuring the integrity of attribution.
[0051] For example, when a skincare product experiences a surge in popularity, the contribution weights of the five semantic dimensions, from highest to lowest, are as follows: wrinkle reduction effect 0.52, emergency rescue scenario 0.28, positive emotion 0.12, firming effect 0.05, and sensitive skin group 0.03. When these dimensions are accumulated to the second dimension, the cumulative weight is 0.52 + 0.28 = 0.80, which exactly reaches the preset cumulative threshold. Therefore, the main cause dimension set includes two dimensions: wrinkle reduction effect and emergency rescue scenario.
[0052] S56. Determine whether m is greater than half of D. If it is greater, determine that the current effective inflection point is a diffuse inflection point. Replace the step of constructing targeted data recall conditions based on the main cause dimension set with recalling all note data within a preset time range before and after the inflection point. In this embodiment, when the number of principal causal dimensions exceeds half of the total number of dimensions, it indicates that the current trend inflection point is not driven by a few core dimensions, but rather by a systemic shift formed by the simultaneous, small changes in a large number of dimensions; this is called a diffuse inflection point. In this situation, targeted recall can no longer effectively reduce the data range, and the system automatically retreats to a full-data recall mode to ensure the completeness of the attribution analysis. This retreat mechanism acts as an adaptive safety net, guaranteeing the robustness of the algorithm under all data distribution patterns. In the worst-case scenario, it automatically degrades to a level comparable to existing technologies, preventing any analytical omissions.
[0053] S6. Construct targeted data recall conditions based on the main cause dimension set, and only recall note data within a preset time range before and after the inflection point, where the dimension label matches any dimension label in the main cause dimension set; In this embodiment, the data retrieval process only performs targeted queries on the selected main cause dimensions, rather than indiscriminately pulling all notes before and after the inflection point, thereby significantly reducing I / O overhead and the computational load of subsequent analysis.
[0054] The system extracts semantic tags corresponding to each dimension in the main cause dimension set, such as "efficacy term - wrinkle reduction" and "scenario term - emergency treatment for staying up late," and constructs composite filtering conditions in the note database. The filtering conditions consist of two parts: one is the time range condition, which limits the posting time of the note to an inflection point. Within each N time unit before and after, N is a preset value. For daily frequency data, the preferred value is 7 to 14 days. In this embodiment, 7 days is used. The second is the semantic tag condition, which limits the dimension tag of the note to match any dimension tag in the main cause dimension set.
[0055] The system employs inverted index technology to implement the above queries. An inverted mapping from semantic tags to note IDs is pre-established for each note. During a query, the corresponding note is directly retrieved through the tag index. The query complexity is only proportional to the number of matched notes, and is independent of the total number of notes. Since the main cause dimension typically accounts for only about 20% of the total dimensions, the actual number of recalled notes is usually less than 20% of the total notes, significantly reducing the amount of data transmission and subsequent analysis processing.
[0056] When the system determines that a diffuse inflection point has been reached, the semantic tag conditions are automatically canceled, and only the time range conditions are retained. All note data within the preset time range before and after the inflection point are recalled, degenerating into a full recall mode.
[0057] S7. Perform inflection point attribution analysis based on the recalled notes data, and update the market environment analysis report based on the inflection point attribution analysis results; In this embodiment, the system sends the targeted recall of note data into a natural language analysis engine to perform refined inflection point attribution analysis. Because a large amount of irrelevant content has been pre-filtered from the input data, the analysis engine can perform reasoning within a highly focused semantic environment, avoiding the dilution of core signals by irrelevant information, resulting in more accurate and focused attribution conclusions.
[0058] The attribution analysis includes: clustering of popular discussion topics in the main causal dimension, extracting the specific topics and user discussion focus that rose the fastest during the inflection point, fine-grained analysis of changes in user sentiment, comparing the differences in the intensity of user sentiment towards each main causal dimension before and after the inflection point, and summarizing the content of representative notes, selecting notes with high dissemination and typicality for general presentation.
[0059] After the analysis is completed, the system incrementally updates the inflection point information and attribution conclusions to the market environment analysis report as independent chapters. The report includes: the timing of the inflection point, its type (peak / trough), a quantitative value of its intensity, a visual representation of the contribution percentage of each primary causal dimension, presenting the driving weights of each dimension in pie charts or bar charts, core attribution conclusions and summaries of representative viewpoints, and corresponding market strategy recommendations. The report visually displays the position of the inflection point within the overall trend using a timeline, allowing analysts to intuitively grasp key trend change points.
[0060] During continuous system operation, whenever a new valid inflection point is detected, the aforementioned attribution and incremental update process is executed to achieve near real-time dynamic iteration of the report. It should be noted that, due to the sliding window fitting mechanism requiring sufficient data points (W time points) and the confirmation mechanism for the validation window (M time points), there is a fixed system delay from data arrival to inflection point confirmation. This delay is equal to the sum of the window center offset (W-1) / 2 and the validation window width M. Taking W=7 and M=3 as an example, the derivative calculated when data arrives on day 7 corresponds to day 4 (window center offset (W-1) / 2=3 days), making day 4 a candidate inflection point. However, the derivatives required for the validation window on days 5, 6, and 7 can only be calculated after data arrives on days 8, 9, and 10, respectively. Therefore, the earliest inflection point is on day 10 (i.e.,...). +M+3= +6) is required to confirm and trigger preliminary attribution and alert push. Therefore, the delay in the preliminary attribution phase is from day 4 to day 10, a total of 6 days (i.e., M + (W-1) / 2). The 7th day after the inflection point required for complete attribution (i.e., ...) The derivative of +W = day 11 needs to wait until day 14 ( The system can only fit data after the data (W+(W-1) / 2) arrives. Therefore, the earliest update time for the complete attribution report is day 14, and the total delay for the system's complete attribution is from day 4 to day 14, totaling 10 days (i.e., W+(W-1) / 2). This delay is inherent to the sliding window fitting and confidence accumulation verification mechanism of this invention. The system marks the actual occurrence time when outputting the inflection point. (i.e., the window center time), rather than the confirmation time or report update time, ensuring the timeliness and lightweight nature of market environment analysis.
[0061] S8. Output and display the updated market environment analysis report in a visual format; This step is the final implementation stage of the methodology, transforming the incrementally updated analysis results into a report format that business personnel can directly read and interact with, completing the closed loop from data calculation to the output of market analysis value. Specifically, it includes the following sub-steps: S81. Generate standardized visualization components and embed them into the corresponding sections of the report; Based on the confirmed inflection point information and attribution analysis results, the system automatically generates corresponding visualization charts and inserts them into the relevant positions in the market environment analysis report: For aggregated popularity trends, a time-series line chart with inflection point annotations is generated, marking all valid inflection points on the curve with differentiated markers: peaks use the first type of marker, troughs use the second type, and the inflection point occurrence time is indicated next to the marker. When the mouse hovers over the marker, detailed parameters such as the magnitude of popularity change and the intensity of the inflection point are displayed. For dimensional contribution, a percentage pie chart is generated, intuitively presenting the weighted contribution of each main causal dimension to this inflection point. Other dimensions not included in the main causal dimension set are uniformly merged into the "Other" item for display. Based on the attribution analysis results, a topic popularity ranking list and keyword cloud are generated, arranging the core discussion topics and corresponding mention frequencies during the inflection point period from high to low discussion popularity.
[0062] S82, supports exporting reports in multiple formats and pushing inflection point early warnings; The system supports exporting complete market environment analysis reports into editable document formats, portable document formats, and online web page formats, meeting the needs of different scenarios such as business reporting, archiving, and sharing. For target objects with configured early warning rules, once a valid inflection point is confirmed for the first time and attribution analysis and report updates are completed, the system automatically pushes an inflection point early warning notification to the preset recipients. The notification includes the inflection point location, inflection point type, a summary of core attribution conclusions, and a link to the online report, ensuring that market analysts receive trend reversal signals as soon as possible.
[0063] S83 provides interactive drill-down analysis capabilities; The online market environment analysis report supports multi-level drill-down interaction: users can click on the corresponding display area of the main factor dimension to view the popularity trend of the independent components of that semantic dimension, the corresponding note list, and the content summary of representative notes. Users can click on the inflection point marker on the trend chart to expand and view the complete attribution analysis section of that inflection point and the data comparison of the time periods before and after it. This interactive capability allows analysts to delve deeper from macro trends to the original content, meeting the needs of in-depth market research.
[0064] It should be noted that, in addition to the conventional forward process, this invention includes a mechanism for handling anomalies at the engineering implementation boundary to ensure the robustness of the solution. Specifically: Firstly, if the component heat data is missing at certain times within the window before and after the inflection point due to platform data interface delays, collection anomalies, or other reasons, the system will automatically use linear interpolation between adjacent times to complete the data. If the amount of missing data exceeds one-third of the corresponding window length, the attribution analysis will be skipped, and only the inflection point location and the prompt "Insufficient data, attribution to be supplemented" will be marked in the report. The system will automatically trigger the supplementary calculation and report update after all the data is completed.
[0065] Secondly, if multiple candidates for the same inflection point are detected consecutively within a preset deduplication window (7 consecutive days), the system automatically merges them into the same inflection point event and selects the moment with the strongest trend reversal significance as the inflection point location. This avoids triggering multiple repeated alarms and report updates from the same round of trend changes.
[0066] Third, the system uses a calendar month as the calibration cycle to perform an offline full-scale inflection point review and full report update on all historical data, correcting deviations caused by the gradual accumulation of data in online real-time detection, and ensuring the accuracy of the reported data in the long term.
[0067] This invention also discloses a system for generating market environment analysis reports, comprising: The acquisition module is used to acquire time series data of the market popularity of the target object on social media platforms. The time series data includes an aggregated popularity sequence and component popularity sequences with D semantic dimensions, where D is a positive integer greater than or equal to 2. The processing module is used to slide a sliding window of preset width on the aggregated heat sequence and the component heat sequence respectively, perform polynomial fitting on the data points in the window at each window position, calculate the aggregated second derivative, aggregated first derivative and each component first derivative at the window center point according to the fitting coefficient, cache each component first derivative in time order, and cache the aggregated first derivative at each time point in time order for subsequent inflection point candidate detection. The recording module is used to detect inflection point candidates based on the sign changes of the aggregated first derivative values at adjacent time points. When the aggregated first derivative value changes from positive to negative or from negative to positive, the corresponding time point is marked as an inflection point candidate. The aggregated second derivative value at the inflection point candidate time point is used to help determine whether the inflection point type is a peak or a trough. The inflection point is verified by the consistency of the sign of the aggregated first derivative values at subsequent time points. When the verification is successful, the inflection point is confirmed as a valid inflection point, and the inflection point position is recorded. ; The filtering module is used to, in response to the confirmation of the effective inflection point, calculate the contribution weight of each semantic dimension to the effective inflection point based on the cached first derivative values of each component, and filter out the set of main cause dimensions according to the contribution weight. The recall module is used to construct targeted data recall conditions based on the main cause dimension set, and only recall note data within a preset time range before and after the inflection point, and whose dimension label matches any dimension label in the main cause dimension set. The analysis module is used to perform inflection point attribution analysis based on the recalled note data and update the market environment analysis report based on the inflection point attribution analysis results.
[0068] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, apparatus, article, or method. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, apparatus, article, or method that includes that element.
[0069] The above description is merely a preferred embodiment of the present invention and does not limit the scope of this application. Any equivalent results or equivalent process transformations made based on the content of the present invention's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the scope of protection of this application.
Claims
1. A method for generating a market environment analysis report, characterized in that, Includes the following steps: Obtain time-series data of the market popularity of the target object on social media platforms. The time-series data includes an aggregated popularity sequence and component popularity sequences with D semantic dimensions, where D is a positive integer greater than or equal to 2. A sliding window of preset width slides on the aggregated heat sequence and the component heat sequence respectively. At each window position, a polynomial fit is performed on the data points within the window. Based on the fitting coefficients, the aggregated second derivative, aggregated first derivative, and component first derivative values at the window center point are calculated. The component first derivative values are cached in chronological order, and the aggregated first derivative values at each time point are cached in chronological order for subsequent inflection point candidate detection. Inflection point candidates are detected based on the sign change of the aggregated first derivative values at adjacent time points. When the aggregated first derivative value changes from positive to negative or from negative to positive, the corresponding time point is marked as an inflection point candidate. The aggregated second derivative value at the inflection point candidate time point is used to help determine whether the inflection point type is a peak or a trough. The inflection point is verified by the consistency of the sign of the aggregated first derivative values at subsequent time points. When the verification is successful, it is confirmed as a valid inflection point, and the inflection point position is recorded. ; In response to confirming the effective inflection point, the contribution weight of each semantic dimension to the effective inflection point is calculated based on the first derivative values of each cached component, and the set of main cause dimensions is selected according to the contribution weight. Based on the set of main cause dimensions, a targeted data recall condition is constructed, and only note data within a preset time range before and after the inflection point, and whose dimension label matches any dimension label in the set of main cause dimensions, is recalled. Perform inflection point attribution analysis based on the recalled notes data, and update the market environment analysis report based on the results of the inflection point attribution analysis.
2. The method for generating a market environment analysis report according to claim 1, characterized in that, Before the step of obtaining the time-series data of the target object's market popularity on social media platforms, the method further includes: D semantic tags are predefined, and a corresponding keyword dictionary is configured for each semantic tag; For each note, obtain the original text content, interaction weight value, and publication timestamp of the note; The original text content is matched with the D keyword dictionaries respectively. The number of words that the note matches in each keyword dictionary is counted. The contribution value of the note in each semantic dimension is calculated based on the number of words that match and the interaction weight value. For each time step, the component contribution values of all notes included at that time step in the same semantic dimension are summed to obtain the component heat value of each semantic dimension at that time step. Arrange the component heat values at each moment in chronological order to obtain the component heat sequence of the D semantic dimensions.
3. The method for generating a market environment analysis report according to claim 1, characterized in that, Before the sliding window with a preset width slides over the aggregate heat sequence and the component heat sequence respectively, it further includes: The aggregated heat sequence and the D component heat sequences are respectively filtered and preprocessed to obtain a smoothed aggregated sequence and each smoothed component sequence; The sliding window with a preset width sliding on the aggregate heat sequence and the component heat sequence is replaced by: the sliding window with a preset width sliding on the smooth aggregate sequence and each smooth component sequence.
4. The method for generating a market environment analysis report according to claim 3, characterized in that, The step of performing filtering preprocessing on the aggregate heat sequence and the D component heat sequences respectively includes: Obtain the original aggregated heat value of the aggregated heat sequence at each time step, and the original component heat value of the i-th semantic dimension at each time step; The current smoothed aggregation value is calculated based on the original aggregation heat value, the preset first smoothing factor, and the historical smoothed aggregation value of the previous moment. Based on the original component heat value, the preset second smoothing factor, and the historical smoothed component value of the i-th semantic dimension at the previous time, calculate the current smoothed component value of the i-th semantic dimension at the current time. For each of the aggregate heat sequence and the D component heat sequences, the above calculation is repeated in chronological order to obtain the smooth aggregate sequence and each smooth component sequence.
5. The method for generating a market environment analysis report according to claim 1, characterized in that, The step of sliding a window of preset width across the aggregated heat sequence and the component heat sequence, performing polynomial fitting on the data points within the window at each window position, calculating the aggregated second derivative, aggregated first derivative, and component first derivative at the window center point based on the fitting coefficients, and caching the component first derivatives in chronological order, as well as caching the calculated aggregated first derivatives at each time point in chronological order, for use in subsequent inflection point candidate detection, includes: Obtain the preset width W of the sliding window, where W is an odd number, so that the sliding window has a unique center moment; At each current time t, with the current time t as the end point of the window, extract W aggregated heat values from the aggregated heat sequence from time t-W+1 to time t to form an aggregated window data sequence; Using the local index within the window as the independent variable and the W aggregated heat values as the dependent variable, a polynomial fit is performed to obtain the aggregated fit coefficients. Based on the aggregated fit coefficients, the aggregated second derivative and aggregated first derivative values at the center time are calculated. For each semantic dimension i, W component heat values from time t-W+1 to time t are extracted in the same way to form the component window data sequence of the i-th semantic dimension. Polynomial fitting is performed to obtain the component fitting coefficients of the i-th semantic dimension. The first derivative value of the component of the i-th semantic dimension at the center time is calculated based on the component fitting coefficients.
6. The method for generating a market environment analysis report according to claim 5, characterized in that, The process involves detecting inflection point candidates based on the sign changes of the aggregated first derivative values at adjacent time points. When the aggregated first derivative value changes from positive to negative or from negative to positive, the corresponding time point is marked as an inflection point candidate. The inflection point type (peak or trough) is determined by the aggregated second derivative value at the candidate inflection point time. This is verified by the consistency of the sign of the aggregated first derivative values at subsequent time points. When the verification is successful, it is confirmed as a valid inflection point, and the inflection point position is recorded. The steps include: Get the aggregate first derivative value at the current time and the aggregate first derivative value at the previous time. When the aggregated first derivative value at the current time has the opposite sign to the aggregated first derivative value at the previous time, the current time is marked as a candidate inflection point. Starting from the candidate inflection point, the aggregated first derivative values of M times within a preset verification window width M are obtained to form a verification data sequence; The peak and valley types of inflection point candidates are directly determined based on the direction of the sign change of the first derivative, and the expected verification direction is determined: if the aggregated first derivative value changes from positive to negative, the candidate is determined to be a peak point and the expected verification direction is negative; if the aggregated first derivative value changes from negative to positive, the candidate is determined to be a valley point and the expected verification direction is positive. Determine whether the sign of each aggregated first derivative value in the verification data sequence is consistent with the expected direction, count the number of consistent moments, calculate the ratio of the number of consistent moments to M, and obtain the consistency ratio. When the consistency ratio is greater than a preset second threshold, the candidate inflection point is confirmed as a valid inflection point, and the time of the candidate inflection point is recorded as the inflection point position. .
7. The method for generating a market environment analysis report according to claim 1, characterized in that, The step of calculating the contribution weight of each semantic dimension to the effective inflection point based on the first derivative values of each cached component, and filtering the set of main cause dimensions according to the contribution weight, includes: With the effective inflection point position As a boundary, the window before the inflection point and the window after the inflection point are determined according to the preset width W of the sliding window; For the i-th semantic dimension, extract the first-order derivative values of the front window at each time point within the window before the inflection point from the cached first-order derivative values of each component and calculate their arithmetic mean as the average slope of the front window of the i-th semantic dimension. Extract the first-order derivative values of the back window at each time point within the window after the inflection point and calculate their arithmetic mean as the average slope of the back window of the i-th semantic dimension. Calculate the absolute value of the difference between the average slope of the back window and the average slope of the front window, and use it as the absolute value of the slope change of the i-th semantic dimension. The contribution weight of each semantic dimension is calculated based on the absolute value of the slope change of each semantic dimension. The D semantic dimensions are arranged in descending order of contribution weight. Starting from the first weight after sorting, each dimension is accumulated. When the accumulated weight reaches or exceeds the preset accumulation threshold for the first time when the accumulation reaches the mth dimension, the first m semantic dimensions are taken as the main cause dimension set.
8. The method for generating a market environment analysis report according to claim 7, characterized in that, The step of arranging the D semantic dimensions in descending order of contribution weight, accumulating them item by item starting from the first weight after sorting, and using the first m semantic dimensions as the set of principal cause dimensions when the accumulation reaches or exceeds the preset accumulation threshold for the first time when the accumulation reaches the mth item, further includes: Determine whether m is greater than half of D. If it is greater, determine that the current effective inflection point is a diffuse inflection point. Replace the step of constructing targeted data recall conditions based on the main cause dimension set with recalling all note data within a preset time range before and after the inflection point.
9. A system for generating market environment analysis reports, characterized in that, include: The acquisition module is used to acquire time series data of the market popularity of the target object on social media platforms. The time series data includes an aggregated popularity sequence and component popularity sequences with D semantic dimensions, where D is a positive integer greater than or equal to 2. The processing module is used to slide a sliding window of preset width on the aggregated heat sequence and the component heat sequence respectively, perform polynomial fitting on the data points in the window at each window position, calculate the aggregated second derivative, aggregated first derivative and each component first derivative at the window center point according to the fitting coefficient, cache each component first derivative in time order, and cache the aggregated first derivative at each time point in time order for subsequent inflection point candidate detection. The recording module is used to detect inflection point candidates based on the sign changes of the aggregated first derivative values at adjacent time points. When the aggregated first derivative value changes from positive to negative or from negative to positive, the corresponding time point is marked as an inflection point candidate. The aggregated second derivative value at the inflection point candidate time point is used to help determine whether the inflection point type is a peak or a trough. The inflection point is verified by the consistency of the sign of the aggregated first derivative values at subsequent time points. When the verification is successful, the inflection point is confirmed as a valid inflection point, and the inflection point position is recorded. ; The filtering module is used to, in response to the confirmation of the effective inflection point, calculate the contribution weight of each semantic dimension to the effective inflection point based on the cached first derivative values of each component, and filter out the set of main cause dimensions according to the contribution weight. The recall module is used to construct targeted data recall conditions based on the main cause dimension set, and only recall note data within a preset time range before and after the inflection point, and whose dimension label matches any dimension label in the main cause dimension set. The analysis module is used to perform inflection point attribution analysis based on the recalled note data and update the market environment analysis report based on the inflection point attribution analysis results.
