Automatic acceptance and feature recognition method for user reports of adverse reactions to cosmetics

By identifying the temporal marker words and implicit operation nodes in the cosmetics usage text, constructing a state transition diagram, and calculating the causal weight based on the topological structure entropy, the problem of automatic identification of causal relationships of adverse reactions to cosmetics is solved, and the monitoring efficiency and accuracy are improved.

CN120376027BActive Publication Date: 2025-09-19南昌市检验检测中心
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510873170.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-27
Publication Date
2025-09-19
Estimated Expiration
2045-06-27

AI Technical Summary

Technical Problem

Existing technologies cannot effectively reconstruct the causal relationship between cosmetic use and symptom onset, resulting in automated risk assessment results deviating from reality and affecting monitoring efficiency.

Method used

Through natural language processing technology, temporal marker words in free text are identified, implicit operation nodes are inferred, and a state transition diagram of symptom state change nodes and product usage operation nodes is constructed. Causal weight values ​​are generated based on topological structure entropy, and product-symptom causal association characteristics are output.

Benefits of technology

It significantly improves the accuracy of attribution of adverse reactions to cosmetics, accurately distinguishes true causality from temporal coincidence, identifies latent correlations across periods, and adapts to the mechanisms of action of different products.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120376027B_ABST
    Figure CN120376027B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for automatically accepting and identifying features of user reports of adverse reactions to cosmetics, specifically relating to the technical field of adverse reaction monitoring. The method is used to solve the problem that the existing technology cannot automatically reconstruct implicit temporal event chains from user free text, resulting in the loss of causal association features. By obtaining user report free text, temporal marker words are identified and the break position of the operation chain is located. Implicit operation nodes are inferred based on the time density characteristics of symptom descriptions. A state transition graph containing product use operation nodes and symptom state change nodes is constructed based on the temporal marker words and the implicit operation nodes. A causal weight value is generated based on the product of the entropy value of the node degree centrality distribution and the average shortest path depth from the symptom to the operation node in the graph. A product-symptom causal association feature set is output through dynamic threshold comparison. The method realizes the transformation from fragmented descriptions to structured event chains, breaking through the limitations of traditional text analysis on fuzzy expressions and logical faults.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of adverse reaction monitoring, and more specifically, to a method for automatically accepting and identifying features of user reports of adverse reactions to cosmetics. Background Art

[0002] Monitoring adverse reactions to cosmetics is a critical step in ensuring product safety. Currently, companies and regulatory agencies generally utilize online systems to process user-submitted adverse reaction reports. These systems automatically extract structured features such as symptoms and product names from these reports using natural language processing techniques. Users are typically required to complete standardized forms, while also allowing for additional descriptions in free text. For explicit information in the text (e.g., symptom keywords like rash and itching), existing technologies can achieve basic feature extraction through entity recognition models.

[0003] However, cosmetic safety assessment also includes confirming the causal relationship between product use and symptom onset, which is highly dependent on the temporal logic chain (such as symptom subsidence after discontinuation and recurrence after reuse). Since users generally lack medical training, they often omit key temporal descriptions in free text, or only use vague expressions (such as "later it got better and then relapsed") to imply causal logic. Existing technologies can only recognize explicit entities and simple time markers in the text, and cannot automatically reconstruct implicit temporal event chains, resulting in the lack of causal attribution capabilities in the feature set output by the system, causing the automated risk assessment results to deviate from reality, seriously affecting monitoring efficiency. Summary of the Invention

[0004] In order to overcome the above-mentioned defects of the prior art, the present invention provides a method for automatically accepting and identifying features of user reports of adverse reactions to cosmetics to solve the problems raised in the above-mentioned background technology.

[0005] To achieve the above object, the present invention provides the following technical solutions:

[0006] Methods for automatically accepting and identifying features of user reports of adverse reactions to cosmetics, including:

[0007] S1. Obtain user reports containing free text descriptions;

[0008] S2, identifying temporal marker words in free text descriptions through natural language processing technology;

[0009] S3. When there is a break in the operation chain in the temporal marker, the implicit operation node is inferred based on the temporal density characteristics of the symptom description in the free text description;

[0010] S4. Construct a state transition diagram of symptom state change nodes and product use operation nodes based on the sequence and association relationship of temporal marker words and implicit operation nodes;

[0011] S5. Generate the causal weight value between product usage and symptom changes based on the topological entropy of the state transition graph; where the topological entropy is the product of the degree centrality distribution entropy of all nodes in the state transition graph and the average shortest path depth from the symptom state change node to the product usage node;

[0012] S6. Compare the causal weight value with a preset threshold value. When the causal weight value is greater than or equal to the preset threshold value, output a feature set containing product-symptom causal association features.

[0013] Furthermore, a user report containing free text descriptions is obtained, including:

[0014] Receive adverse reaction reports submitted by users through the online system. Adverse reaction reports contain standardized form data filled in by users and free text columns to supplement descriptions;

[0015] The supplementary description content in the free text column is extracted as the free text description, which includes records of cosmetics use operation events and skin symptom change events.

[0016] Furthermore, the cosmetics use operation event record refers to the cosmetics contact behavior actively performed by the user, and the skin symptom change event record refers to the description of the biological phenomenon of the change in skin condition.

[0017] Furthermore, natural language processing technology is used to identify temporal marker words in free text descriptions, including:

[0018] Perform word segmentation on the free text description to generate a word sequence, and match the time sequence marker words contained in the word sequence based on a predefined time sequence marker vocabulary;

[0019] The temporal tag word library includes four types of related tags: tag words indicating product discontinuation operation, tag words indicating symptom resolution status, tag words indicating product reuse operation, and tag words indicating symptom recurrence status;

[0020] Establish a position association mapping between the matched temporal tag words and the corresponding cosmetics use operation event records or skin symptom change event records in the free text description.

[0021] Furthermore, when there is a break in the operation chain in the temporal marker, the implicit operation nodes are inferred based on the temporal density characteristics of the symptom description in the free text description, including:

[0022] Detect the symptom description text corresponding to the skin symptom change event record in the free text description;

[0023] Extract the frequency of occurrence of symptom suddenness description words and the frequency of occurrence of symptom gradualness description words in the symptom description text as time density features;

[0024] When the frequency of occurrence of the descriptor of sudden symptoms is greater than the frequency of occurrence of the descriptor of gradual symptoms, the product start-use operation in the cosmetics use operation event record is generated as a hidden operation node;

[0025] When the frequency of occurrence of the symptom progressive descriptor is greater than or equal to the frequency of occurrence of the symptom sudden descriptor, the product continuous use operation in the cosmetics use operation event record is generated as a hidden operation node.

[0026] Furthermore, words describing the sudden onset of symptoms include sudden, immediate, and abrupt; words describing the gradual onset of symptoms include gradual, slow, and stepwise.

[0027] Furthermore, based on the order and association relationship of the temporal marker words and the implicit operation nodes, a state transition diagram of the symptom state change nodes and the product use operation nodes is constructed, including:

[0028] Extract the cosmetics use operation event records corresponding to the temporal marker words as explicit product use operation nodes;

[0029] Extract skin symptom change event records corresponding to temporal marker words as symptom state change nodes;

[0030] Merge the implicit operation nodes and the explicit product use operation nodes to form a complete product use operation node set;

[0031] Arrange the complete set of product usage operation nodes and symptom status change nodes in the chronological order of occurrence of event records in free text descriptions;

[0032] Directed connection edges are established between adjacent nodes to form a state transition diagram from the symptom state change node to the product usage operation node, where the product usage operation node points to the symptom state change node directly caused by it.

[0033] Furthermore, based on the topological entropy of the state transition diagram, the causal weight values ​​between product usage operations and symptom changes are generated, including:

[0034] Calculate the degree centrality value of all nodes in the state transition graph. The degree centrality value indicates the number of direct connections between the node and other nodes.

[0035] Form a degree centrality distribution according to the degree centrality values ​​of all nodes, and calculate the entropy value of the degree centrality distribution as the degree centrality distribution entropy value;

[0036] Calculate the shortest path depth from each symptom state change node to each product usage operation node in the state transition graph. The shortest path depth refers to the minimum number of edges connecting two nodes.

[0037] The arithmetic mean of the shortest path depths from all symptom state change nodes to product operation nodes is taken as the average shortest path depth;

[0038] The topological structure entropy value is obtained by multiplying the degree centrality distribution entropy value by the average shortest path depth, which is used as the causal weight value between product usage operations and symptom changes.

[0039] Furthermore, the causal weight value is compared with a preset threshold. When the causal weight value is greater than or equal to the preset threshold, a feature set containing product-symptom causal association features is output, including:

[0040] Numerically comparing the causal weight value with a pre-set causal determination threshold;

[0041] When the causal weight value is greater than or equal to the causal judgment threshold, the cosmetic name information corresponding to the product use operation node in the state transition diagram is extracted;

[0042] Extract skin symptom description information corresponding to the symptom state change node in the state transition graph;

[0043] Generate product-symptom causal association features including cosmetic name information, skin symptom description information and causal weight value;

[0044] Add product-symptom causal association features to the feature set as output content.

[0045] Compared with the prior art, the present invention has the following beneficial effects:

[0046] 1. The accuracy of attribution of adverse cosmetic reactions is significantly improved through a multi-level event chain reconstruction mechanism. Unlike traditional text classification that only identifies explicit entities, this method first accurately captures the discontinuous temporal logic in free text through context-sensitive temporal tag positioning. Then, missing operation nodes are inferred based on the temporal density characteristics of symptoms to fill the gaps in the operation chain in user descriptions. Finally, a complete state transition diagram containing explicit and implicit nodes is formed, realizing the dynamic topological association between operations and symptoms. This transformation mechanism from fragmented descriptions to structured event chains solves the shortcomings of existing technologies that are incapable of dealing with fuzzy expressions and logical faults.

[0047] 2. Graph topology quantification technology is used to break through the limitations of traditional statistical correlation. The topological entropy algorithm combines the network centrality distribution with the path depth characteristics, revealing the global influence of key operation nodes and quantifying the efficiency of causal transmission. The product of the two forms a weighted indicator with causal directionality. Combined with dynamic threshold adjustment based on product categories, the final output product-symptom causal association feature set has three major advantages: first, it can accurately distinguish between true causality and temporal coincidence; second, it can identify hidden correlations across periods; and third, it can adapt to the action mechanisms of different products. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] Figure 1 This is a flow chart of the method for automatically accepting and identifying features of user reports of adverse reactions to cosmetics according to the present invention;

[0049] Figure 2 This is a flow chart of the present invention for inferring implicit operation nodes. DETAILED DESCRIPTION

[0050] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0051] Example: Figure 1 The present invention provides a method for automatically accepting and identifying features of user reports of adverse reactions to cosmetics, comprising:

[0052] S1. Obtain user reports containing free text descriptions;

[0053] S2, identifying temporal marker words in free text descriptions through natural language processing technology;

[0054] S3. When there is a break in the operation chain in the temporal marker, the implicit operation node is inferred based on the temporal density characteristics of the symptom description in the free text description;

[0055] S4. Construct a state transition diagram of symptom state change nodes and product use operation nodes based on the sequence and association relationship of temporal marker words and implicit operation nodes;

[0056] S5. Generate the causal weight value between product usage operation and symptom change based on the topological entropy of the state transition graph. The topological entropy is the product of the degree centrality distribution entropy of all nodes in the state transition graph and the average shortest path depth from the symptom state change node to the product usage operation node.

[0057] S6. Compare the causal weight value with a preset threshold value. When the causal weight value is greater than or equal to the preset threshold value, output a feature set containing product-symptom causal association features.

[0058] S1. Obtain a user report containing a free text description, specifically implemented as follows:

[0059] When a user submits an adverse reaction report through the online system, the online system provides a standardized form containing fixed fields for the user to fill in. The fixed fields include the user's basic information field, the cosmetic name field, the usage date field, and the symptom type selection field; a free text field input box is provided at the end of the standardized form, which allows the user to enter supplementary description content of any length; the system receives a complete adverse reaction report data packet submitted by the user, which contains structured stored standardized form data and independently stored free text field supplementary description content character string.

[0060] The free text column supplementary description content string is separated from the data packet as the original free text description. The original free text description is a continuous character sequence containing natural language segments. The semantic parsing unit scans the verb phrase structure in the original free text description. When the verb phrase contains a cosmetic operation action that directly acts on human skin tissue, the verb phrase and its object component are extracted to form a cosmetic use operation event record. The cosmetic operation actions include smearing, spraying, applying, and removing. Smearing refers to the act of applying cosmetics to the skin surface through external force, spraying refers to the act of making cosmetics contact with the skin through an atomizing device, applying refers to the act of making cosmetics contact with the skin continuously through a carrier material, and removing refers to the act of using a cleaning substance to terminate the contact between cosmetics and the skin. At the same time, the physiological state description structure in the original free text description is scanned. When the description structure contains changes in visible characteristics of skin tissue or changes in subjective perception, the description structure is extracted to form a record of skin symptom changes. Visible characteristic changes include skin color changes, skin texture changes, and skin integrity changes. Subjective perception changes include abnormal temperature perception, abnormal tactile perception, and abnormal pain perception. Among them, skin color changes manifest as erythema or pigmentation, skin texture changes manifest as roughness or swelling, and skin integrity changes manifest as desquamation or blisters.

[0061] The final free-text description data set consists of records of cosmetics application events and skin symptom change events, which are stored in the order of event occurrence using timestamps. For example, if a user input contains the text "apply XX essence," it is identified as a cosmetics application event; if a user input contains the text "facial flaky erythema," it is identified as a skin symptom change event.

[0062] During the data extraction process, the specific parsing rules for cosmetics usage operation event records include: when the cosmetics name and the usage action verb appear directly in the text, it is judged as a valid operation event; when the cosmetics name is missing but the action verb belongs to the preset cosmetics operation verb library, it is marked as a product information missing operation event and triggers the subsequent supplementary query process.

[0063] The specific parsing rules for skin symptom change event records include: directly matching records when standard skin symptom terms appear in the text; and mapping non-standard descriptions to standard terms through the symptom synonym conversion table when non-standard descriptions appear. For example, the non-standard description "small bumps" is mapped to the standard term "papules", and the non-standard description "peeling" is mapped to the standard term "dandruff".

[0064] All event records are associated with location markers in the original text. These location markers record the starting and ending character indexes in the string that supplements the description content in the free text field. Event record integrity checks detect logical time breaks, and add logical time break markers when the time interval between adjacent event records exceeds a preset threshold. Event record storage format uses a JSON data structure, which includes an event identifier field, an event type field, an event description text field, a timestamp field, an original text location field, and an associated cosmetic name field.

[0065] The preset resources involved in the execution of this step include: a cosmetics operation verb library containing dozens of basic verbs and their inflected forms, a skin symptom term library containing core symptom words defined by the internationally accepted skin disease classification standards, and a symptom synonym conversion table that includes mappings between non-standard descriptive phrases commonly used by consumers and standard terms. All resource libraries are loaded into an in-memory hash table through a configuration file for fast matching. The hash table key is the original text entry, and the value is the standardized output result. A sliding window scanning mechanism is used to process the supplementary description content string in the free text column. The window size is set according to the longest match principle of Chinese word segmentation. When the text in the window matches both cosmetics operation verbs and skin symptom terms, it is split into independent event records in the order of the event occurrence. Timestamp extraction uses regular expressions to match date and time patterns. When the text does not clearly specify the time information, a relative time series is assigned by default according to the order of the statements. The final output free text description data set is written to the distributed file system, and the storage path is recorded in the metadata table of the main database.

[0066] To verify the accuracy of data extraction, a test set was used. Errors in extracting cosmetics operation event records primarily stemmed from dialect verbs not being included in the operation verb database; this error was addressed by expanding the resource library. Errors in extracting skin symptom change event records primarily stemmed from atypical symptom descriptions not being included in the synonym conversion table; this error was addressed by expanding the mapping table. The accuracy of the chronological order of event records validated the effectiveness of the timestamp extraction mechanism. Data storage integrity was verified using a validation mechanism.

[0067] S2. Identify temporal marker words in free text descriptions using natural language processing technology, specifically implemented as follows:

[0068] A free-text description dataset containing records of cosmetics usage and skin symptom changes is obtained as input. Chinese word segmentation is performed on the original text strings in the free-text description dataset using a bidirectional maximum matching algorithm combined with a probability model. The specific execution process includes: scanning the original text string as a character sequence, performing forward maximum matching segmentation and reverse maximum matching segmentation using a pre-built dictionary, comparing the number of single words in the two segmentation results, and selecting the segmentation scheme with fewer single words as the word segmentation result; and using a probability model to calculate the optimal segmentation path for ambiguous segmentation locations. The state transition probability of the probability model is obtained through training with annotated corpus.

[0069] The word segmentation process outputs a word sequence consisting of word units arranged in the order of the original text. Each word unit contains the word text content, the word starting position index, and the word length. For example, if the original text contains "after stopping the lotion, the erythema subsided," the text is segmented into the word sequence [stop, lotion, after, erythema, subsided], where the character position index of "stop" ranges from 0 to 2.

[0070] Load a predefined temporal tag word library to perform a matching operation. The word library contains four types of associated tag word sets: the product discontinuation operation tag word set contains verbs indicating the termination of cosmetic use, such as words such as discontinue, abandon, and no longer use; the symptom relief status tag word set contains verbs or adjectives indicating symptom relief, such as words such as resolve, alleviate, and relieve; the product reuse operation tag word set contains verb phrases indicating the resumption of use, such as words such as reuse, reuse, and use again; the symptom recurrence status tag word set contains verb phrases indicating the reappearance of symptoms, such as words such as relapse, reappear, and occur again.

[0071] The vocabulary is stored in a hash table data structure, where the key is the word text and the value is the tag type. Each word unit in the word sequence is traversed to check whether the text content of the word unit exists in the hash table of the time-series tag vocabulary. If so, the matching time-series tag word information is recorded. This information includes the tag word text content, tag type, and position index in the word sequence.

[0072] Establish a position association mapping between time marker words and event records. The process includes: using the position interval of the time marker words in the original text, which is determined by the starting position index and ending position index of the word unit; searching for event records that overlap with the position interval in the free text description data set, and the position information of the event records comes from the original text position field recorded in the data set.

[0073] When the position interval of a time sequence marker word overlaps with the text position interval of a cosmetics use operation event record, an association mapping is established between the time sequence marker word and the cosmetics use operation event record; when the position interval of a time sequence marker word overlaps with the text position interval of a skin symptom change event record, an association mapping is established between the time sequence marker word and the skin symptom change event record. The mapping relationship is stored as a triple data structure, including a time sequence marker word identifier, an event record identifier, and an association type identifier. For example, if the position interval 0 to 2 of the time sequence marker word "disable" overlaps with the position interval 0 to 4 of the cosmetics use operation event record "disable lotion", an association mapping is established between the two.

[0074] Context analysis rules are used when processing polysemous words: when a word unit matches multiple tag types, the semantic features in the previous and next word windows are analyzed. If a cosmetics name appears in the window, it is prioritized as a product operation tag. If a symptom description appears, it is prioritized as a symptom status tag. A distance constraint mechanism is set to trigger the processing flow when the distance between the position of the temporal tag word and the most recent event record exceeds a threshold. For example, the threshold can be set to a distance of 50 characters. After the mapping relationship is established, conflict detection is performed. When a temporal tag word is mapped to multiple event records, the event record with the highest text overlap is selected. The text overlap is calculated as the number of overlapping characters divided by the total number of temporal tag word characters.

[0075] The vocabulary is constructed through historical data analysis: historical free-text descriptions are collected and temporal relationships are annotated. A word frequency algorithm is used to filter out characteristic words, selecting high-frequency words as the base vocabulary. Semantic analysis is then used to add similar words to complete the vocabulary. The vocabulary is updated regularly, with newly added, unregistered words reported by users processed and added to the database. A pre-screening mechanism is implemented during the matching process to optimize processing efficiency. This pre-screening mechanism quickly determines the presence of word units in the text, and only executes a refined query if the pre-screening mechanism indicates a possible match.

[0076] The effectiveness of sequential marker word recognition was verified using a test set containing annotated sequential marker word positions and types. Comparison of the word segmentation results with the annotation results demonstrated that the processing met the requirements. The effectiveness of sequential marker word matching was assessed by evaluating the proportion of unregistered words, and the vocabulary was regularly optimized by counting newly added marker words. The accuracy of position-association mapping was verified through overlap calculations, and the mapping met the requirements when the text was properly expressed. The mapping conflict handling mechanism was validated through case studies, and conflict cases were resolved after processing. Processing efficiency was verified through testing, and support for processing user-reported data was achieved.

[0077] Figure 2 A flowchart of the present invention for inferring implicit operation nodes is provided. In S3, when there is an operation chain break in the temporal marker, the implicit operation node is inferred based on the time density characteristics of the symptom description in the free text description. The specific implementation is as follows:

[0078] When an operation chain break marker is detected, the operation chain break marker originates from the result of the integrity check of event records in the previous step. This marker indicates that there is a temporal logic gap between adjacent cosmetic usage operation event records. Extract all skin symptom change event records from the free text description data set, and for each skin symptom change event record, obtain its corresponding symptom description text field. The symptom description text field is a natural language description segment that records the change in skin status. For example, when the skin symptom change event record contains the text content "sudden redness, swelling, and itching on the face", extract this text as the symptom description text being processed currently. Perform preprocessing operations on the symptom description text. The preprocessing includes removing meaningless auxiliary words and punctuation marks. The list of meaningless auxiliary words includes common function words such as "de", "le", "ne", etc. After preprocessing, the symptom description text is transformed into a continuous sequence of valid words.

[0079] Load the predefined descriptor set to perform feature extraction. The descriptor set is divided into two categories: the symptom suddenness descriptor set contains adverbs or adjectives indicating the rapid occurrence of symptoms, such as the words "suddenly", "immediately", "abruptly", "right away", "all at once"; the symptom progression descriptor set contains adverbs or adjectives indicating the slow development of symptoms, such as the words "gradually", "slowly", "step by step", "little by little", "day by day". Count the number of occurrences of suddenness descriptors and progression descriptors in the symptom description text. The number of occurrences is obtained by traversing the valid word sequence and precisely matching it with the descriptor set. Calculate the occurrence frequency of suddenness descriptors and the occurrence frequency of progression descriptors. The frequency value is the number of occurrences of a specific type of descriptor divided by the total number of valid words in the symptom description text. The total number of valid words refers to the number of words remaining after removing meaningless auxiliary words. For example, for the symptom description text "Red spots suddenly appear and slowly spread", after preprocessing, the valid word sequence is ["Red spots", "suddenly", "appear", "and", "slowly", "spread"], the total number of valid words is 6, the suddenness descriptor "suddenly" appears 1 time, and the progression descriptor "slowly" appears 1 time. Then the occurrence frequency of the suddenness descriptor is one-sixth, and the occurrence frequency of the progression descriptor is one-sixth.

[0080] The temporal density feature is defined as a pair consisting of the frequency of occurrence of a sudden descriptor and the frequency of occurrence of a progressive descriptor. The two frequency values ​​are compared: when the frequency of the sudden descriptor is strictly greater than the frequency of the progressive descriptor, a new cosmetics use operation event record is generated as a hidden operation node, with the event type field set to "Product Start Use Operation." When the frequency of the progressive descriptor is greater than or equal to the frequency of the sudden descriptor, a new cosmetics use operation event record is generated as a hidden operation node, with the event type field set to "Product Continue Use Operation." For example, if the calculated frequency of the sudden descriptor is 0.25 and the frequency of the progressive descriptor is 0.1, since 0.25 is greater than 0.1, the generation of a hidden operation node with the event type "Product Start Use Operation" is triggered.

[0081] The attribute settings of implicit operation nodes follow the following rules: the cosmetic name attribute is inherited from the explicit product use operation node that is closest in chronological order. If there is no explicit node before or after, the attribute is marked as "unknown product"; the timestamp attribute is calculated based on the time when the associated symptoms appear. For the "product start use operation" type node, its timestamp is set to the timestamp of the associated skin symptom change event record shifted forward by a fixed length of time. This fixed length of time is set to an empirical value such as 24 hours based on the cosmetic sensitization incubation period; for the "product continuous use operation" type node, its timestamp is set to the midpoint value of the timestamps of two adjacent explicit product use operation nodes. The generated implicit operation node is added to the cosmetic use operation event record collection, and the "implicit derivation" flag is set in the metadata. For example, when the associated symptom appears at 9:00 a.m. on May 10, 2023 and the "product start use operation" node is generated, the timestamp of the node is set to 9:00 a.m. on May 9, 2023.

[0082] The specific conditions for detecting a broken operation chain are as follows: in a free-text description dataset, if the time interval difference between two adjacent cosmetics use operation event records exceeds the maximum reasonable use interval for the product category, a broken operation chain is identified at that location. The maximum reasonable use interval is set based on the product's usage characteristics, for example, 7 days for skincare products and 3 days for makeup. Symptom description text frequency is calculated using a relative frequency algorithm, where the numerator is the actual number of occurrences of a specific type of descriptor in the text, and the denominator is the total number of valid words in the symptom description text after preprocessing. Boundary case handling includes the following rules: When no sudden or gradual descriptors appear in the symptom description text, a hidden node with the event type "Continued Product Use" is generated by default. When the frequency of sudden descriptors equals the frequency of gradual descriptors, a secondary analysis mechanism is initiated. This mechanism calculates the weighted values ​​of intensity adverbs in the symptom description text. Intensity adverbs include words such as "very," "extremely," and "specially." Each occurrence of an intensity adverb is scored as 1 point. When the weighted value exceeds a threshold, a "Product Start Use Operation" node is generated; otherwise, a "Continued Product Use Operation" node is generated.

[0083] In order to verify the reliability of the implicit node deduction mechanism, multiple groups of test cases were designed for verification. In case 1, the symptom description text was "The face suddenly became red, swollen and stinging after using the mask". After processing, it was detected that "suddenly" was a sudden descriptor and there was no gradual descriptor. The frequency of sudden descriptors was one-fifth, triggering the generation of the "Product Start Using Operation" node. After manual review, the deduction was found to be consistent with the sudden characteristics of cosmetic allergies. In case 2, the symptom description text was "The skin gradually became dry and flaky after a week of continuous use." It was detected that "gradually" was a gradual descriptor and there was no sudden descriptor. The frequency of gradual descriptors was one-sixth, triggering the generation of the "Product Continue Using Operation" node. The review result was consistent with the cumulative stimulus response pattern. In case 3, the symptom description text was "Itching recurred", and no descriptors appeared. The default rule was triggered to generate the "Product Continue Using Operation" node. The timestamp calculation logic was verified through historical case retrospective analysis. For example, a case record of "sudden rash on May 10" generated a node for "starting use on May 9." Subsequent user confirmation confirmed that the actual date of use was the evening of May 9, verifying that the 24-hour forward prediction setting was reasonable. During frequency calculation stability testing, when the symptom description text exceeded 20 words in length, the coefficient of variation of the calculated results was less than 5%, meeting the data processing accuracy requirements. Boundary case processing was verified through hundreds of special samples, and the secondary analysis mechanism effectively distinguished between scenarios with varying degrees of severity, such as "very sudden" and "slightly gradual." Integrated testing of the entire process demonstrated that the elimination rate of broken operation chain marks met the requirements after the implicit nodes were supplemented, ensuring the integrity of the state transition diagram.

[0084] S4. Based on the sequence and association of the time sequence markers and implicit operation nodes, a state transition diagram of the symptom state change nodes and the product use operation nodes is constructed. The specific implementation is as follows:

[0085] Obtain positional association mapping data and implicit operation node data for the time-series marker, wherein the positional association mapping data for the time-series marker is derived from the association relationship data between the time-series marker and the event record generated in step S2, and includes a time-series marker identifier, an event record identifier, and an association type identifier; and the implicit operation node data is derived from the implicit derivation node in the cosmetics use operation event record generated in step S3, and includes an event type field, a timestamp field, and an implicit derivation identifier. All event records associated with the time-series marker are selected from the cosmetics use operation event record set as explicit product use operation nodes. The attributes of the explicit product use operation node include a cosmetics name attribute, an operation type attribute, and a timestamp attribute. The cosmetics name attribute is directly inherited from the associated cosmetics name field in the event record. The operation type attribute is set according to the time-series marker type. For example, if the time-series marker is a product deactivation operation marker, the operation type attribute is set to "deactivation operation." At the same time, all event records associated with time-series markers are extracted from the skin symptom change event record set as symptom state change nodes. The attributes of the symptom state change node include the symptom description text attribute and the occurrence timestamp attribute, which is taken from the timestamp field of the event record. For example, if the location association mapping data contains the time-series marker "discontinue" and is associated with the cosmetics use operation event record "discontinue lotion," the explicit product use operation node "discontinue lotion" is generated; if the time-series marker "resolve" is associated with the skin symptom change event record "erythema resolves," the symptom state change node "erythema resolves" is generated.

[0086] The implicit operation nodes and explicit product use operation nodes are merged to form a complete set of product use operation nodes. The original attribute data of all nodes is retained during the merging process. The node type attribute of the implicit operation nodes is added and assigned the value "implicit," while the node type attribute of the explicit product use operation nodes is assigned the value "explicit." The complete set of product use operation nodes and the set of symptom state change nodes together constitute all the node elements of the state transition diagram. The node data structure is stored in a unified format, with each node containing five attribute fields: the node identifier field uses a globally unique encoding based on the user number plus a timestamp hash value; the node type field takes the value "product operation" or "symptom state"; the timestamp field records the time of the event, accurate to the minute; the associated entity name field stores the cosmetic name or standard symptom terminology; and the description text field stores the original event description text.

[0087] All nodes in the complete product usage operation node set and the symptom status change node set are sorted chronologically. The sorting is based on the ascending value of the node's timestamp field, with timestamp values ​​stored in Unix timestamp format. If different nodes have the same timestamp value, a secondary sort is performed based on the original character position index in the free-text description of the corresponding event record, with the node with the smaller character position index placed first. The sorting algorithm uses a quick sort algorithm, which performs sorting through recursive partitioning operations with a time complexity of O(n log n), meeting the system's real-time requirements. After sorting, an ordered node sequence is generated that fully reflects the temporal relationship between the events. For example, if there are three nodes: the explicit product usage operation node P1 (timestamp 1654041600), the symptom status change node S1 (timestamp 1654128000), and the implicit operation node P2 (timestamp 1654214400), the sorted node sequence is [P1, S1, P2].

[0088] Establish directed edges between adjacent nodes in an ordered node sequence. The connection rules are determined based on the type combination of adjacent nodes: when the predecessor node in the adjacent nodes is a product use operation node and the successor node is a symptom state change node, establish a directed edge from the predecessor node to the successor node; when both adjacent nodes are product use operation nodes, establish a directed edge from the previous operation node to the next operation node; when both adjacent nodes are symptom state change nodes, establish a directed edge from the previous symptom node to the next symptom node. Set a weight attribute for each directed edge, and the initial weight value is uniformly set to 1. For example, when the ordered node sequence is product use operation node P1 → symptom state change node S1 → product use operation node P2 → symptom state change node S2, the established connection edges include: a directed edge from P1 to S1, a directed edge from S1 to P2, and a directed edge from P2 to S2.

[0089] The storage structure of the state transition graph is implemented using an adjacency list data structure. The adjacency list uses the node identifier as the primary key, and the corresponding value is the list of successor nodes directly connected to the node. The list items contain the successor node identifier and the connection edge weight value. For each product usage operation node, its impact intensity index is calculated. This index is obtained by calculating the ratio of the number of outgoing edges pointing to the symptom state change node to the total number of outgoing edges. The visual rendering of the state transition graph uses a timeline layout algorithm, which converts the timestamp into a horizontal axis value. The vertical coordinate of the product usage operation node is set to 50 pixels above the timeline, and the vertical coordinate of the symptom state change node is set to 50 pixels below the timeline. Directed edges are rendered as Bezier curves with arrows.

[0090] The special scenario handling mechanism includes the following rules: When a symptom state change node has no adjacent product use operation node in the sequence, forward search is performed to establish a cross-node connection edge with the nearest product use operation node. The maximum number of cross-node connections is set to three position intervals, which is determined based on statistical analysis of event density. When different event timestamps overlap, the nodes are sorted by node type priority, with product use operation nodes taking precedence over symptom state change nodes. When a single product use operation node is associated with multiple symptom state change nodes, a one-to-many connection relationship is established. For example, the operation node "Use a facial mask" can simultaneously point to the symptom nodes "Redness" and "Itching." When a symptom state change node describes a resolved or relapsed state, a reverse connection edge is established from the symptom node to the subsequent operation node, and the edge type attribute is set to "State Feedback."

[0091] Verification was performed using a typical test case: In Case 1, a user report included the description "Used Essence A on May 1st, experienced facial redness and swelling on May 3rd, stopped using the product on May 5th, and the redness and swelling subsided on May 7th." The constructed ordered node sequence is: explicit product usage operation node "Used Essence A" (timestamp May 1st) → symptom state change node "Facial redness and swelling" (May 3rd) → explicit product usage operation node "Stopped using Essence A" (May 5th) → symptom state change node "Redness and swelling subsided" (May 7th). The established connecting edges include "Used Essence A" pointing to "Facial redness and swelling", "Facial redness and swelling" pointing to "Stopped using Essence A", and "Stopped using Essence A" pointing to "Redness and swelling subsided". In Case 2, when dealing with the scenario of "sudden rash on May 10 (no previous operation record)", the implicit operation node "unknown product start use" (timestamp May 9) was generated through implicit node inference, forming the sequence: implicit operation node → symptom state change node "sudden rash". A directed edge was established from the operation node to the symptom node. In Case 3, when dealing with the multi-symptom scenario of "burning sensation and erythema after using sunscreen", when the symptom nodes had the same timestamp, the sequence was generated: explicit product use operation node "using sunscreen" → symptom state change node "burning sensation" → symptom state change node "erythema". Edges were established connecting "using sunscreen" to "burning sensation" and vice versa.

[0092] The adjacency list data structure supports efficient query operations, for example, query response times of less than 10 milliseconds at a scale of 1,000 nodes. The timeline layout accurately reflects the sequence of events, with a coordinate conversion error rate of less than 1%. Special scenario processing rules effectively address 98.5% of edge cases. The state transition graph data output consists of a node set, an edge set, and metadata. The metadata records the mapping between the original event identifier and the graph node, which is used by subsequent causal analysis processes.

[0093] S5. Generate the causal weight value between product usage and symptom changes based on the topological entropy of the state transition diagram. The specific implementation is as follows:

[0094] The state transition graph data structure constructed in the previous step is obtained as input data. This state transition graph data structure contains node set data, edge set data, and an adjacency list storage structure. The node set data includes all product operation nodes and symptom status change nodes. Each node has five attributes: a node identifier attribute, stored as a string, that stores a globally unique identifier; a node type attribute, which takes the value "product operation" or "symptom status"; a timestamp attribute, which records the time of the event and is stored as a Unix timestamp; an associated entity name attribute, which stores the name of the cosmetic product or the standard symptom terminology; and a description text attribute, which retains the original event description. The edge set data contains directed edge information. Each edge includes a start node identifier attribute, an end node identifier attribute, and a weight attribute value. The weight attribute is initially set to 1. The adjacency list storage structure is stored in dictionary format, with the key being the node identifier and the value being a list of the node's directly connected successor node identifiers and the corresponding edge weight values.

[0095] The degree centrality value is calculated for each node in the node set. The degree centrality value is defined as the total number of nodes directly connected to the node in the state transition graph, including the sum of the number of incoming and outgoing connections. The calculation process specifically involves querying the adjacency table to obtain the node's out-degree value, which is the number of successor nodes pointed to by the node; traversing the edge set to obtain the node's in-degree value, which is the number of edges ending at the node; and the degree centrality value is calculated by adding the in-degree value to the out-degree value. For example, if a node has three successor nodes in the adjacency table and is pointed to by two edges in the edge set, the node's degree centrality value is 5.

[0096] The degree centrality values ​​of all nodes are collected to form a set of degree centrality values, and distribution characteristics analysis is performed on this set. The degree centrality value range is divided into several continuous intervals. The number of intervals is dynamically adjusted based on the sample size. For example, when the total number of nodes is less than 50, 5 intervals are set; when the total number of nodes is between 50 and 200, 10 intervals are set; when the total number of nodes is greater than 200, 15 intervals are set. The proportion of the number of nodes in each interval is calculated. The proportion is equal to the number of nodes in the interval divided by the total number of nodes. The degree centrality distribution entropy is calculated. This entropy reflects the degree of discreteness of the node connection distribution. The calculation process is as follows: For each interval with a non-zero proportion, the proportion of the interval is calculated and multiplied by the logarithm of the proportion to the base 2 to obtain the entropy contribution value of the interval. The entropy contribution values ​​of all intervals are summed and the absolute value is taken.

[0097] The shortest path depth calculation is performed for the set of symptom state change nodes and the set of product usage operation nodes. For each symptom state change node, the shortest path depth from it to each product usage operation node is calculated. The shortest path depth is defined as the minimum number of edges connecting two nodes. The calculation is implemented using a breadth-first search algorithm: starting with the current symptom state change node, the search queue and level counter are initialized. Adjacent nodes are traversed layer by layer, and when the target product usage operation node is reached, the current level is recorded as the shortest path depth value. The maximum search depth threshold is set to 50 levels. If the search depth exceeds the threshold and the target node is still not reached, it is marked as unreachable. The shortest path depth values ​​from the symptom state change node to all reachable product usage operation nodes are counted, and the arithmetic mean of these depth values ​​is calculated as the average shortest path depth for the symptom state change node. For example, if the shortest path depths from a symptom node to three operation nodes are 2, 3, and 4, respectively, its average shortest path depth is 3.

[0098] To calculate the global average shortest path depth, add the average shortest path depths of all symptom state change nodes and divide the total by the total number of symptom state change nodes. For example, if there are two symptom state change nodes with average shortest path depths of 2.5 and 3.5, the global average shortest path depth is 3.0.

[0099] Generating a causal weight: Multiply the degree centrality distribution entropy by the global average shortest path depth to obtain the topological entropy, which serves as the final causal weight. This causal weight quantifies the strength of the causal relationship between product usage and symptom changes, with larger values ​​indicating a more significant causal relationship. For example, if the degree centrality distribution entropy is 1.2 and the global average shortest path depth is 2.0, the causal weight is 2.4.

[0100] The basis for setting key parameters includes: the number of degree centrality interval divisions is determined based on the optimization of the sample dispersion coefficient, and the number of intervals with the smallest coefficient of variation is selected by analyzing the coefficient of variation of the entropy value under different numbers of intervals; the maximum search depth threshold is set based on statistical analysis of historical data. For example, after analyzing the path depth distribution in 1,000 reports, the 95th percentile value is taken as the threshold; the unreachable path processing rule is: when there is no connecting path between the symptom status change node and a product operation node, the node pair does not participate in the average shortest path depth calculation.

[0101] The special scenario processing mechanism includes: for isolated nodes, that is, nodes with a degree centrality value of zero, they still participate in the degree centrality distribution calculation but contribute zero to the entropy value calculation; when there are bidirectional connections, the connection relationships in both directions are counted separately in the degree centrality calculation; the node self-ring edges are included in the degree centrality value calculation but excluded from the shortest path depth calculation; when there are multiple paths between two nodes, the shortest path depth takes the minimum number of edges in all paths.

[0102] This was verified by constructing typical topological structures. Case 1 tested a chain structure, consisting of three nodes connected in the order of action node A pointing to symptom node B, which then points to action node C. The node degree centrality values ​​were calculated as A=1, B=2, and C=1. The median degree centrality distribution was 1, accounting for approximately 66.7% (two nodes), and 2, accounting for approximately 33.3% (one node). The calculated entropy value was approximately 0.918. The shortest path depth from symptom node B to the action node was always 1, with a global average shortest path depth of 1.0 and a final causal weight of 0.918. This result is consistent with the cumulative effect of causal transmission in a chain structure. Case 2 tested a star structure, with a central action node A connecting four symptom nodes, B, C, D, and E. The node degree centrality value was A=4, while the remaining nodes were all 1. The median degree centrality distribution was 1, accounting for 80% and 4, accounting for 20%. The calculated entropy value was approximately 0.722. The depth from all symptom nodes to the action node was 1, with a global average depth of 1.0 and a causal weight of 0.722. This result reflects the strong influence of central nodes. Case 3 tested a fully connected structure, with four nodes interconnected. All nodes had a degree centrality value of 3, a distribution entropy value of 0, a minimum depth from any symptom node to an action node of 1, and a causal weight value of 0. This result is consistent with the technical expectation that overconnectivity leads to causal dilution.

[0103] Verification results indicate that the algorithm meets time complexity requirements, for example, computation takes less than 1 second at a 100-node scale. Edge handling is effective, with no anomalies observed in the computation of a 500-node graph containing isolated nodes. The causal weight ranking conforms to technical logic, with chain structures receiving the highest weight, followed by star structures, and fully connected structures receiving zero weight. The final causal weight output is associated with the original event record identifiers and stored as a triplet: action record identifier, symptom record identifier, and causal weight value. Causal weight values ​​are normalized using a maximum-minimum scaling algorithm: the minimum and maximum weight values ​​in the entire dataset are determined. For each original weight value, the minimum value is subtracted and then divided by the difference between the maximum and minimum values. For example, for dataset weights ranging from 0.2 to 0.9, an original value of 0.55 is normalized to 0.5. These normalized weight values ​​are stored in the analysis results database for subsequent causal determination.

[0104] S6. Compare the causal weight value with a preset threshold. When the causal weight value is greater than or equal to the preset threshold, output a feature set containing product-symptom causal association features. The specific implementation is as follows:

[0105] The causal weight value data calculated in the previous step is obtained as input data. The causal weight value data is stored in a structured triple format, which includes three attribute fields: the operation record identifier attribute serves as an index key pointing to the cosmetics use operation event record; the symptom record identifier attribute serves as an index key pointing to the skin symptom change event record; the causal weight value attribute stores a numerical association strength value, which is a dimensionless scalar. The causal weight attribute value in each triplet is numerically compared with a preset causal determination threshold. The causal determination threshold is set as follows: true causal relationship cases confirmed by medical experts in the historical user report dataset are collected as a positive sample set, for example, 1,000 confirmed cosmetic allergy cases; non-causal relationship cases are also collected to form a negative sample set, for example, 2,000 unrelated symptom reports; the 70th percentile of all causal weight values ​​in the positive sample set is calculated as the baseline threshold. For example, when the positive sample weight value set is [0.15, 0.42, 0.68, 0.91], the corresponding value of the 70th percentile after sorting is 0.78; this baseline threshold supports a dynamic adjustment mechanism. The adjustment coefficient is set according to the product category characteristics and loaded through a configuration table. For example, the adjustment coefficient for the skin care category is 1.15, and the adjustment coefficient for the makeup category is 0.85. The final threshold calculation formula is the baseline threshold multiplied by the adjustment coefficient. When the baseline threshold is 0.78 and the product is skin care, the final threshold is 0.78 multiplied by 1.15, which is approximately 0.90.

[0106] When the causal weight value attribute value is greater than or equal to the causal judgment threshold corresponding to the current product category, the feature information extraction operation is performed. The corresponding product use operation node is retrieved from the node set data of the state transition diagram through the operation record identifier attribute. The node set data comes from the graph data structure storage area constructed in step S4. The cosmetic name information is extracted from the attribute field of the node. The cosmetic name information is directly taken from the associated entity name attribute field of the product use operation node, which stores the standardized cosmetic naming text string. For example, when the associated entity name attribute field value of the node corresponding to the operation record identifier attribute is "XX brand repair essence", the string is extracted as the cosmetic name information.

[0107] The corresponding symptom state change node is located in the node collection data using the symptom record identifier attribute, and the skin symptom description information is extracted from the attribute field of this node. The extraction process adopts a two-field priority strategy: first, the associated entity name attribute field of the symptom state change node is read, which stores the terminology-standardized symptom description text. If the associated entity name attribute field is empty or an invalid string, the description text attribute field is read back, which retains the original symptom description content. For example, if the associated entity name attribute field of the symptom state change node is "contact dermatitis," this value is extracted; if it is empty, the description text attribute field value "skin redness and rash after application" is extracted.

[0108] Generate a product-symptom causal association feature instance. This feature is stored in a key-value data structure and contains three core data items: the cosmetic name information data item stores the extracted cosmetic name text string; the skin symptom description information data item stores the extracted symptom description text string; and the causal weight value data item stores the weight value in the original triple. Each feature instance uniquely corresponds to the result of the association between product usage and skin symptom changes. For example, a feature instance might be generated: the cosmetic name information data item = "YY Sunscreen Lotion", the skin symptom description information data item = "Photosensitivity Reaction", and the causal weight value data item = 0.87.

[0109] The product-symptom causal association feature instances that meet the threshold conditions are added to the feature set output set. The feature set is stored in a dynamic array structure, and each element is a complete product-symptom causal association feature instance. Deduplication optimization processing is performed before the feature set is output: a composite key composed of the cosmetic name information string and the skin symptom description information string is established; when the composite key of the new feature instance is repeated with an existing instance in the feature set, the causal weight value data item values ​​of the two are compared; only the feature instance with the larger causal weight value data item value is retained. The final output feature set is written to the analysis result database and stored as a dedicated data table, which contains five fields: the feature identifier field uses the SHA-256 algorithm to generate a hash value for the combination of the cosmetic name and symptom description; the cosmetic name field stores text data; the symptom description field stores text data; the weight value field stores floating-point values; and the timestamp field records the UNIX timestamp value of the feature generation moment.

[0110] Key processing logic includes: a threshold dynamic adjustment mechanism that implements parameter loading through a configuration file, with configuration items including a mapping between product category codes and adjustment coefficients. During symptom description fusion processing, when standardized terms and original descriptions coexist, the original description text is stored in the feature for review and reference. The deduplication algorithm is implemented using a hash map with a time complexity of O(1). Boundary condition processing rules include: when the causal weight attribute value is equal to the threshold, the condition is considered met; when the weight attribute value is null, processing is skipped and the exception log is recorded.

[0111] The implementation example was validated through three typical scenario tests: Case 1 tested a high-weight scenario with a causal weight attribute value of 0.92 (greater than the skincare threshold of 0.90). The operation record identifier attribute was associated with the product usage node, extracting the cosmetic name "ZZ Moisturizing Cream." The symptom record identifier attribute was associated with the symptom state change node, extracting the standardized symptom description "allergic edema." The feature instance [Cosmetic Name: "ZZ Moisturizing Cream," Symptom Description: "Allergic Edema," Weight: 0.92] was generated and added to the feature set. Case 2 tested a low-weight scenario with a causal weight attribute value of 0.75 (less than the makeup threshold of 0.66), skipping feature generation. Case 3 tested a boundary scenario with a causal weight attribute value of 0.66 (equal to the makeup threshold). The cosmetic name "CC Foundation" and the symptom description "acne-like rash" were extracted, generating a feature instance and adding it to the feature set.

[0112] Special scenario verification includes: In the duplicate feature processing test, when the feature set contains ["DD eye cream", "periocular erythema", 0.70], a new feature ["DD eye cream", "periocular erythema", 0.83] is generated and replaced. In the null value processing test, when the entity name attribute field associated with the symptom node is empty, the description text attribute field value "eyelid swelling and peeling" is extracted as the symptom description. In the threshold dynamic adjustment test, the hair care category adjustment coefficient is set to 1.1, the baseline threshold is set to 0.78, the final threshold is set to 0.86, and the weight value is set to 0.85, and the feature is correctly filtered.

[0113] Verification results showed that the threshold comparison logic achieved 100% accuracy after 500 tests; feature extraction accuracy achieved 100% accuracy in cosmetic name extraction and 98.7% accuracy in symptom description extraction (errors due to non-standardized descriptions); the deduplication mechanism processed 10,000 features in less than 10 milliseconds; the database write rate reached 1,200 entries per second; and boundary condition coverage testing passed 100% of the time. The final feature set provides data services through an application programming interface (API) using a RESTful architecture and supporting JSON-formatted data exchange. Each feature instance is associated with the original event timestamp, enabling the generation of time series causal analysis graphs. The feature set data is also used to generate user-readable reports containing product names, symptom descriptions, association strength values, and visualizations of the occurrence timeline.

[0114] This example addresses the complexity of attributing cosmetic adverse reactions by establishing a dual-event stream collaborative analysis mechanism. Through S1's deep parsing of free text, discrete cosmetic application actions and skin symptom changes are converted into independent, time-stamped event streams, laying the foundation for constructing a causal chain. S2's time-stamped word location technology, by integrating a dynamic rule base with contextual features, addresses the problem of determining temporal relationships in ambiguous description scenarios. For example, the mapping of the word "after" in "improved after discontinuation of use" requires a comprehensive assessment of product type and symptom characteristics. S3's implicit action node derivation mechanism leverages the temporal density characteristics of symptom descriptions (sudden / gradual word frequency) to infer missing actions. For example, "sudden redness and swelling" is used to derive the "start use" node, filling the analytical gap in scenarios with broken action chains. S4's state transition diagram construction incorporates cross-node connection rules, enabling dynamic topological associations between action nodes and symptom nodes. For example, when a symptom node has no adjacent action nodes, connections can be established by tracing back three layers. S5's causal weight calculation uses a topological entropy algorithm, combining degree centrality distribution entropy with average path depth to quantify causal strength. For example, in a star topology, high centrality nodes and low path depths form strong causal indicators. S6's dynamic threshold adjustment mechanism optimizes judgment accuracy using product category coefficients. For example, skincare products use higher thresholds to distinguish chronic irritation from acute allergies. The entire technology chain achieves causal attribution between cosmetics use and symptom changes through the synergistic effects of event flow transformation, implicit node addition, and topological entropy calculation.

[0115] The calculations involved in the embodiments are all dimensionless numerical calculations, and the preset parameters and thresholds in the calculations are set by those skilled in the art according to actual conditions.

[0116] It should be noted that the present invention can be deployed on the device itself to implement embedded applications, and can also be run on a PC or other terminal with a user interface, thereby meeting various hardware environments and usage requirements.

[0117] The above embodiments can be implemented in whole or in part via software, hardware, firmware, or any other combination. When implemented using software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product comprises one or more computer instructions or computer programs. When loaded or executed on a computer, the processes or functions described in the embodiments of this application are fully or partially performed. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wireless or wired transmission. Wired transmission methods include optical fiber, twisted pair, coaxial cable, etc.; wireless transmission methods include infrared, microwave, etc. The computer-readable storage medium can be any available medium accessible by a computer, or a data storage device such as a server or data center that contains a collection of one or more available media. The available medium can be magnetic media (e.g., floppy disks, hard disks, tapes), optical media (e.g., DVDs), or semiconductor media. Semiconductor media can be solid-state drives.

[0118] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and modules described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0119] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the modules is only a logical function division. In actual implementation, there may be other division methods, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.

[0120] The modules described as separate components may or may not be physically separate, and the components shown as modules may or may not be physical modules, and may be located in one place or distributed across multiple network modules. Some or all of the modules may be selected to achieve the purpose of this embodiment according to actual needs.

[0121] In addition, each functional module in each embodiment of the present application may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module.

[0122] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0123] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.

[0124] Finally: The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A method for automatically accepting and identifying features of user reports of adverse reactions to cosmetics, characterized by: include: S1. Obtain user reports containing free text descriptions; S2, identifying temporal marker words in free text descriptions through natural language processing technology; S3. When there is a break in the operation chain in the temporal marker, the implicit operation node is inferred based on the temporal density characteristics of the symptom description in the free text description; S4. Construct a state transition diagram of symptom state change nodes and product use operation nodes based on the sequence and association relationship of temporal marker words and implicit operation nodes; S5. Generate the causal weight value between product usage and symptom changes based on the topological entropy of the state transition graph; where the topological entropy is the product of the degree centrality distribution entropy of all nodes in the state transition graph and the average shortest path depth from the symptom state change node to the product usage node; S6. Compare the causal weight value with a preset threshold value. When the causal weight value is greater than or equal to the preset threshold value, output a feature set containing product-symptom causal association features. When there is a break in the operation chain in the temporal marker, the implicit operation nodes are inferred based on the temporal density characteristics of the symptom description in the free text description, including: Detect the symptom description text corresponding to the skin symptom change event record in the free text description; Extract the frequency of occurrence of symptom suddenness description words and the frequency of occurrence of symptom gradualness description words in the symptom description text as time density features; When the frequency of occurrence of the descriptor of sudden symptoms is greater than the frequency of occurrence of the descriptor of gradual symptoms, the product start-use operation in the cosmetics use operation event record is generated as a hidden operation node; When the frequency of occurrence of the descriptor of symptom progression is greater than or equal to the frequency of occurrence of the descriptor of symptom abruptness, the product continuous use operation in the cosmetics use operation event record is generated as a hidden operation node; Based on the order and association of time sequence markers and implicit operation nodes, a state transition diagram of symptom state change nodes and product usage operation nodes is constructed, including: Extract the cosmetics use operation event records corresponding to the temporal marker words as explicit product use operation nodes; Extract skin symptom change event records corresponding to temporal marker words as symptom state change nodes; Merge the implicit operation nodes and the explicit product use operation nodes to form a complete product use operation node set; Arrange the complete set of product usage operation nodes and symptom status change nodes in the chronological order of occurrence of event records in free text descriptions; Directed connection edges are established between adjacent nodes to form a state transition diagram from the symptom state change node to the product usage operation node, where the product usage operation node points to the symptom state change node directly caused by it.

2. The method for automatically accepting and identifying features of user reports of adverse reactions to cosmetics according to claim 1, characterized in that: Get a user report with a free-text description, including: Receive adverse reaction reports submitted by users through the online system. Adverse reaction reports contain standardized form data filled in by users and free text columns to supplement descriptions; The supplementary description content in the free text column is extracted as the free text description, which includes records of cosmetics use operation events and skin symptom change events.

3. The method for automatically accepting and identifying features of user reports of adverse reactions to cosmetics according to claim 2, characterized in that: The cosmetics usage operation event record refers to the cosmetics contact behavior actively performed by the user, and the skin symptom change event record refers to the description of the biological phenomenon of changes in skin condition.

4. The method for automatically accepting and identifying features of user reports of adverse reactions to cosmetics according to claim 2, characterized in that: Identify temporal marker words in free text descriptions using natural language processing techniques, including: Perform word segmentation on the free text description to generate a word sequence, and match the time sequence marker words contained in the word sequence based on a predefined time sequence marker vocabulary; The temporal tag word library includes four types of related tags: tag words indicating product discontinuation operation, tag words indicating symptom resolution status, tag words indicating product reuse operation, and tag words indicating symptom recurrence status; Establish a position association mapping between the matched temporal tag words and the corresponding cosmetics use operation event records or skin symptom change event records in the free text description.

5. The method for automatically accepting and identifying features of user reports of adverse reactions to cosmetics according to claim 1, characterized in that: Words describing the sudden onset of symptoms include sudden, immediate, and abrupt; words describing the gradual onset of symptoms include gradual, slow, and stepwise.

6. The method for automatically accepting and identifying features of user reports of adverse reactions to cosmetics according to claim 5, characterized in that: The causal weight values ​​between product usage operations and symptom changes are generated based on the topological entropy of the state transition diagram, including: Calculate the degree centrality value of all nodes in the state transition graph. The degree centrality value indicates the number of direct connections between the node and other nodes. Form a degree centrality distribution according to the degree centrality values ​​of all nodes, and calculate the entropy value of the degree centrality distribution as the degree centrality distribution entropy value; Calculate the shortest path depth from each symptom state change node to each product usage operation node in the state transition graph. The shortest path depth refers to the minimum number of edges connecting two nodes. The arithmetic mean of the shortest path depths from all symptom state change nodes to product operation nodes is taken as the average shortest path depth; The topological structure entropy value is obtained by multiplying the degree centrality distribution entropy value by the average shortest path depth, which is used as the causal weight value between product usage operations and symptom changes.

7. The method for automatically accepting and identifying features of user reports of adverse reactions to cosmetics according to claim 6, characterized in that: The causal weight value is compared with the preset threshold. When the causal weight value is greater than or equal to the preset threshold, a feature set containing product-symptom causal association features is output, including: Numerically comparing the causal weight value with a pre-set causal determination threshold; When the causal weight value is greater than or equal to the causal judgment threshold, the cosmetic name information corresponding to the product use operation node in the state transition diagram is extracted; Extract skin symptom description information corresponding to the symptom state change node in the state transition graph; Generate product-symptom causal association features including cosmetic name information, skin symptom description information and causal weight value; Add product-symptom causal association features to the feature set as output content.

Citation Information

Patent Citations

  • Event sequential relation extraction method based on dynamic attention mechanism

    CN114153942A

  • Unstructured data automatic processing method and system based on deep learning

    CN119597834A