A personalized dietary risk assessment method and system based on user profiling

By using multimodal feature dimensionality reduction and user profile data parsing, standardized dietary risk assessment texts are generated, solving the problems of conflict and redundancy in multimodal data processing in existing technologies, and achieving efficient and reliable personalized dietary risk assessment.

CN122117413APending Publication Date: 2026-05-29LANZHOU UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
LANZHOU UNIV
Filing Date
2026-04-15
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

Existing personalized dietary risk assessment technologies cannot perform unified feature dimensionality reduction projection and structured parsing on multimodal source data, resulting in feature conflicts and redundant calculations during data processing. This makes it difficult to output a standardized and unified structured list of dietary components, and the lack of generative risk extrapolation and hash matching detection leads to insufficient efficiency and reliability in risk assessment.

Method used

By employing multimodal feature reduction and projection techniques to perform modal identification and content decoding on image and text data, combined with distributed reading and semantic enhancement parsing of user profile data, a structured component list is generated. Generative inference and hash matching detection are then performed to achieve permission determination and security screening of risk assessment text.

Benefits of technology

It improves the data processing efficiency and reliability of personalized dietary risk assessment, and ensures the safe and compliant output of assessment content by standardizing data processing procedures and accurately identifying and intercepting trigger conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122117413A_ABST
    Figure CN122117413A_ABST
Patent Text Reader

Abstract

The application provides a personalized dietary risk assessment method and system based on user portraits, relates to the technical field of data processing, and comprises the following steps: performing multi-modal feature dimension reduction projection on target user's to-be-processed source data to obtain a structured ingredient list; calling the archive data of the target user, performing attribute analysis on the archive data, and obtaining personalized constraint parameters of the target user; fusing and reconstructing the structured ingredient list and the personalized constraint parameters to obtain an analysis request instance; performing generative deduction on the analysis request instance to obtain a risk assessment text of the analysis request instance, performing hash matching detection on the analysis request instance, and obtaining an interception trigger condition of the analysis request instance; performing output permission judgment on the risk assessment text, and performing output screening on the risk assessment text based on the judgment result to obtain a risk assessment conclusion of the target user; and the application can improve the efficiency of the personalized dietary risk assessment based on user portraits.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing technology, and in particular to a personalized dietary risk assessment method and system based on user profiles. Background Technology

[0002] Existing personalized dietary risk assessment technologies only support single-modal data processing and cannot perform unified feature dimensionality reduction projection and structured parsing on multimodal source data. The data processing process is prone to feature conflicts and redundant calculations, making it difficult to output a standardized and unified structured list of dietary components. The processing efficiency of the data preprocessing stage is low.

[0003] Existing technologies do not build a dynamic constraint parsing mechanism based on user profile data, making it impossible to efficiently integrate and reconstruct dietary component data with user-personalized constraint parameters. Furthermore, they lack parallel processing logic for generative risk inference and hash matching detection, resulting in weak output permission determination and content filtering capabilities for risk assessment texts. Consequently, the overall efficiency and reliability of dietary risk assessment cannot meet the needs of practical applications. Therefore, how to improve the efficiency of personalized dietary risk assessment based on user profiles has become an urgent problem to be solved. Summary of the Invention

[0004] This invention provides a personalized dietary risk assessment method and system based on user profiles to solve the problems mentioned in the background art.

[0005] To achieve the above objectives, this invention provides a personalized dietary risk assessment method based on user profiles, comprising: S01. Perform multimodal feature dimensionality reduction projection on the source data to be processed of the target user to obtain a list of structured components of the source data to be processed; S02. Retrieve the target user's profile data and perform attribute parsing on the profile data to obtain the target user's personalized constraint parameters; S03. The structured component list and the personalized constraint parameters are fused and reconstructed to obtain the analysis request instance of the target user; S04. Generative deduction is performed on the analysis request instance to obtain the risk assessment text of the analysis request instance, and hash matching detection is performed on the analysis request instance to obtain the interception trigger condition of the analysis request instance; S05. Based on the interception triggering condition, determine the output permission of the risk assessment text, and based on the determination result, filter the output of the risk assessment text to obtain the risk assessment conclusion of the target user.

[0006] In a preferred embodiment, the step of performing multimodal feature dimensionality reduction projection on the source data to be processed from the target user to obtain a structured component list of the source data to be processed includes: Modality type identification is performed on the source data to be processed of the target user to obtain the modality attribution label of the source data to be processed; When the modality attribution label points to an image modality, the source data to be processed is subjected to visual content decoding to obtain an image recognition list of the source data to be processed. When the modality attribution label points to a text modality, semantic entity segmentation is performed on the source data to be processed to obtain a text recognition list of the source data to be processed. The conflict between the image recognition list and the text recognition list is resolved, and the resolved list is subjected to component normalization mapping to obtain the structured component list of the source data to be processed.

[0007] In a preferred embodiment, retrieving the target user's profile data and performing attribute parsing on the profile data to obtain the target user's personalized constraint parameters includes: Distributed reading of the target user's profile data is performed to obtain the target user's original record carrier; The original recording media are classified into document formats to obtain the media format tags of the original recording media; Based on the carrier format tag, a recursive field traversal is performed on the original record carrier to obtain a list of attribute fields of the original record carrier. Based on a pre-defined subject ontology lexicon, the attribute field list is subjected to concept mapping by field names to obtain a semantically enhanced field set for the attribute field list; Constraint threshold parsing is performed on the semantic enhancement field set to obtain personalized constraint parameters for the semantic enhancement field set.

[0008] In a preferred embodiment, the step of fusing and reconstructing the structured component list and the personalized constraint parameters to obtain the analysis request instance of the target user includes: Dynamic placeholder assembly is performed on the structured component list to obtain the field embedding carrier of the structured component list; The personalized constraint parameters are compiled into constraint expressions to obtain the constraint statements for the personalized constraint parameters; The field embedding carrier and the constraint statement are interleaved and arranged to obtain a spliced ​​carrier of the field embedding carrier and the constraint statement; The splicing carrier is compiled and formatted to obtain an analysis request instance of the splicing carrier.

[0009] In a preferred embodiment, the step of performing generative deduction on the analysis request instance to obtain the risk assessment text of the analysis request instance, and performing hash matching detection on the analysis request instance to obtain the interception trigger condition of the analysis request instance, includes: The analysis request instance is subjected to instruction domain separation to obtain the prompt prefix and core query content of the analysis request instance; The prompt prefix and the core query content are fused and injected with context to obtain a complete prompt carrier of the prompt prefix and the core query content; The complete prompt carrier is subjected to autoregressive generation to obtain the risk assessment text of the complete prompt carrier; The analysis request instance is serialized and arranged to obtain the constituent word sequence of the analysis request instance; The constituent word sequence is subjected to hash space projection to obtain the word fingerprint encoding sequence of the constituent word sequence; Based on a preset taboo word hash library, conflict matching is performed on the word fingerprint encoding sequence to obtain the interception triggering conditions of the analysis request instance.

[0010] In a preferred embodiment, the step of performing hash space projection on the constituent word sequence to obtain the word fingerprint encoding sequence of the constituent word sequence includes: The semantic space is mapped onto the constituent word sequence to obtain the semantic vector of the constituent word sequence; Based on the archive data, the semantic vector is traced back to its historical co-occurrence to obtain the co-occurrence word set of the semantic vector; The co-occurrence word set is assigned a confidence score to obtain the confidence score set of the co-occurrence word set; Based on the personalized constraint parameters, the risk level is mapped to the constituent word sequence to obtain the risk weight sequence of the constituent word sequence; Based on the archive data, the timeliness coefficient of the constituent word sequence is derived to obtain the time decay factor of the constituent word sequence; Based on the semantic vector, the dynamic offset of the constituent word sequence is calculated, wherein the formula for calculating the dynamic offset is: ; In the formula, The first word in the constituent word sequence The dynamic offset of each word element It is a natural constant. The first word in the constituent word sequence The set of co-occurring lexical units, The first word in the constituent word sequence The word element and the first word element in the co-occurring word element set Cosine similarity of semantic vectors of each word element The first word in the co-occurrence lexicon set The confidence score of each word element. The number of elements in the co-occurring lexical set. The first word in the constituent word sequence Risk weight of each word element The first word in the constituent word sequence The time decay factor of each word element The first word in the constituent word sequence The semantic vector of each word element. The first word in the co-occurrence lexicon set The semantic vector of each word element; Based on a preset hash function, the semantic vector is converted into binary to obtain the original hash code of the semantic vector; Based on the dynamic offset, the original hash code is perturbed and replaced, and the perturbed hash code is compressed and encapsulated with a fixed length to obtain the word fingerprint encoding sequence that makes up the word sequence.

[0011] In a preferred embodiment, the step of determining output permissions for the risk assessment text based on the interception trigger condition, and filtering the output of the risk assessment text based on the determination result to obtain the risk assessment conclusion for the target user, includes: The interception triggering conditions are classified into conflict categories to obtain the blocking identifier and the downgrade identifier of the interception triggering conditions; Based on the blocking identifier, the entire risk assessment text is discarded, and a matching message is retrieved from a preset warning material library to obtain the blocking feedback carrier of the risk assessment text; Based on the downgrade identifier, the risk assessment text is located within a risk range to obtain the set of coordinates of the cutting points of the risk assessment text; Based on the set of cutting point coordinates, the risk assessment text is divided into a first segment set and a last segment set; Sensitive word masking is performed on the tail segment set to obtain a secure tail segment carrier for the tail segment set; The first segment set and the security tail segment carrier are connected and recombined to obtain the downgraded output carrier of the interception trigger condition; The blocking feedback carrier or the degradation output carrier is used as the risk assessment conclusion for the target user.

[0012] In a preferred embodiment, the step of classifying the interception triggering condition into conflict category levels to obtain the blocking identifier and downgrade identifier of the interception triggering condition includes: The interception triggering conditions are parsed using conflict term categories to obtain the allergen-level labels and metabolic contraindication-level labels of the interception triggering conditions; Based on the allergen level label, the hazard level of the interception triggering condition is classified. When the allergen level label points to the lethal allergen level, a blocking identifier for the interception triggering condition is generated. Based on the metabolic contraindication hierarchy label, the interception trigger condition is subjected to risk accumulation verification to obtain the downgrade identifier of the interception trigger condition.

[0013] In a preferred embodiment, the step of locating risk intervals in the risk assessment text based on the downgrade identifier to obtain a set of cut-off point coordinates for the risk assessment text includes: A sliding window scan is performed on the risk assessment text to obtain a sequence of candidate cut points for the risk assessment text; Calculate the cutting cost of the candidate cut point sequence, wherein the formula for calculating the cutting cost is: ; In the formula, Candidate cut points The cost of cutting The character position index of the candidate cut point sequence, For the candidate cut point Hit words on the left, For the candidate cut point All hit words on the left, For the candidate cut point Hit words on the left The starting character position, For the preset hit words Risk weights, It is a natural constant. The preset left-side distance attenuation factor, For the candidate cut point Hit words on the right, For the candidate cut point All the hit words on the right, For the candidate cut point Hit words on the right The position of the terminating character, For the preset hit words Risk weights, The preset right-side distance attenuation factor, The preset semantic breakage penalty coefficient, The preset slope factor, The center position of the paragraph in the risk assessment text; Based on the cutting cost, extract the minimum cost cutting point from the candidate cutting point sequence; Based on the minimum cost cutting point, the cutting boundary of the risk assessment text is calibrated to obtain the set of cutting point coordinates of the risk assessment text.

[0014] To address the above problems, the present invention also provides a personalized dietary risk assessment system based on user profiles, the system comprising: The data preprocessing module is used to perform multimodal feature dimensionality reduction projection on the source data to be processed of the target user to obtain a structured component list of the source data to be processed. The user profile parsing module is used to retrieve the profile data of the target user and perform attribute parsing on the profile data to obtain the personalized constraint parameters of the target user. The fusion and reconstruction module is used to fuse and reconstruct the structured component list and the personalized constraint parameters to obtain the analysis request instance of the target user; The dual-track deduction and detection module is used to perform generative deduction on the analysis request instance to obtain the risk assessment text of the analysis request instance, and to perform hash matching detection on the analysis request instance to obtain the interception trigger condition of the analysis request instance. The output adjudication module is used to determine the output permission of the risk assessment text based on the interception triggering conditions, and to filter the output of the risk assessment text based on the determination result, so as to obtain the risk assessment conclusion of the target user.

[0015] Compared with the prior art, the present invention has the following beneficial effects: 1. This invention utilizes multimodal feature dimensionality reduction projection technology to perform modality identification, content decoding, and conflict resolution on various types of source data, such as images and text. It can quickly generate standardized structured component lists, while simultaneously performing distributed reading, field traversal, and semantic enhancement parsing of user profile data. It accurately extracts personalized constraint parameters and achieves data fusion and reconstruction, which simplifies the dietary data processing workflow, standardizes the generation format of analysis request instances, and effectively improves the data processing and instance construction efficiency of personalized dietary risk assessment.

[0016] 2. This invention adopts a parallel processing mode of generative inference and hash matching detection, which can quickly generate risk assessment text and accurately identify interception trigger conditions. Combined with the output adjudication mechanism of conflict level classification, risk interval positioning and sensitive information masking, it completes the permission determination and security screening of assessment text. At the same time, it improves the accuracy of word matching through dynamic offset calculation and hash encoding perturbation encapsulation, which not only ensures the speed of risk assessment conclusion generation, but also realizes the safe and compliant output of assessment content, and comprehensively improves the operational efficiency and reliability of personalized dietary risk assessment. Attached Figure Description

[0017] Figure 1 This is a flowchart illustrating a personalized dietary risk assessment method based on user profiles, provided in an embodiment of the present invention. Figure 2 A functional block diagram of a personalized dietary risk assessment system based on user profiles provided in an embodiment of the present invention; The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0018] It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

[0019] This application provides a personalized dietary risk assessment method based on user profiles. The executing entity of this personalized dietary risk assessment method includes, but is not limited to, at least one of the following electronic devices that can be configured to execute the method provided in this application: a server, a terminal, etc. In other words, the personalized dietary risk assessment method based on user profiles can be executed by software or hardware installed on a terminal device or a server device. The server includes, but is not limited to, a single server, a server cluster, a cloud server, or a cloud server cluster. The server can be an independent server or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms.

[0020] Reference Figure 1 The diagram shown is a flowchart illustrating a personalized dietary risk assessment method based on user profiles according to an embodiment of the present invention. In this embodiment, the personalized dietary risk assessment method based on user profiles includes: S01. Perform multimodal feature dimensionality reduction projection on the source data to be processed of the target user to obtain a list of structured components of the source data to be processed; In this embodiment of the invention, the step of performing multimodal feature dimensionality reduction projection on the source data to be processed from the target user to obtain a structured component list of the source data to be processed includes: Modality type identification is performed on the source data to be processed of the target user to obtain the modality attribution label of the source data to be processed; When the modality attribution label points to an image modality, the source data to be processed is subjected to visual content decoding to obtain an image recognition list of the source data to be processed. When the modality attribution label points to a text modality, semantic entity segmentation is performed on the source data to be processed to obtain a text recognition list of the source data to be processed. The conflict between the image recognition list and the text recognition list is resolved, and the resolved list is subjected to component normalization mapping to obtain the structured component list of the source data to be processed.

[0021] The system performs a complete traversal of each piece of source data to be processed for the target user, comprehensively examines the external presentation format of each piece of source data, accurately distinguishes between source data presented in image format and source data presented in text format, and assigns a unique format identifier to each piece of source data according to its corresponding presentation format. This format identifier directly serves as the modality attribution label for the source data to be processed.

[0022] For the source data to be processed that the modality attribution label points to the image modality, the entire visual content displayed by the image is completely analyzed, and all types of dietary ingredients, dietary components and various dietary substances contained in the image are accurately identified. Each dietary-related substance identified is recorded in text according to the order of identification. All dietary-related substances recorded in order form a complete list, which is the image recognition list of the source data to be processed.

[0023] For the source data to be processed where the modality attribution label points to the text modality, we comprehensively sort out all the text content expressed in the text, accurately extract the core text content in the text that is specifically used to describe dietary ingredients, dietary components, and dietary substances, and independently divide each core dietary-related text content according to the original order in the text. All the independently divided core dietary-related content together form a complete list, which is the text recognition list of the source data to be processed.

[0024] The system comprehensively compares each dietary-related substance in the image recognition list with each dietary-related substance in the text recognition list, accurately identifying the same dietary substance with different wording in the two lists. It also identifies the same dietary substance recorded repeatedly in the two lists, unifies the wording of the same dietary substance, and completely deletes the dietary substance records that appear repeatedly in the two lists, thus resolving the conflict between the image recognition list and the text recognition list.

[0025] After resolving conflicts, all dietary-related substances are systematically categorized and organized according to a pre-defined unified classification standard for dietary components. Dietary substances with the same attributes and categories are grouped under their corresponding classification items. Each dietary substance is standardized and organized according to a fixed and unified item arrangement format, clearly labeling the standard name and corresponding classification of each dietary substance. All standardized dietary substance items are combined in the classification order to form a complete list, which is the structured component list of the source data to be processed.

[0026] The beneficial effects include: by traversing the source data completely and assigning unique format identifiers based on the presentation format, the modality of each source data set can be accurately determined, laying a clear classification foundation for subsequent data processing. Performing complete visual content analysis and precise extraction of core textual content for source data of different modalities allows for the comprehensive acquisition of all dietary-related substance information, ensuring the integrity of the identification list. A comprehensive, item-by-item comparison of the two identification lists, standardizing the substance description format and deleting duplicate records, completely eliminates content conflicts between lists, ensuring the consistency of dietary substance information. Classifying, organizing, and standardizing all dietary substances according to unified classification standards creates a standardized and unified structured component list, improving the standardization and accuracy of dietary data processing and providing stable and complete data support for subsequent personalized dietary risk assessments.

[0027] S02. Retrieve the target user's profile data and perform attribute parsing on the profile data to obtain the target user's personalized constraint parameters; In this embodiment of the invention, retrieving the target user's profile data and performing attribute parsing on the profile data to obtain the target user's personalized constraint parameters includes: Distributed reading of the target user's profile data is performed to obtain the target user's original record carrier; The original recording media are classified into document formats to obtain the media format tags of the original recording media; Based on the carrier format tag, a recursive field traversal is performed on the original record carrier to obtain a list of attribute fields of the original record carrier. Based on a pre-defined subject ontology lexicon, the attribute field list is subjected to concept mapping by field names to obtain a semantically enhanced field set for the attribute field list; Constraint threshold parsing is performed on the semantic enhancement field set to obtain personalized constraint parameters for the semantic enhancement field set.

[0028] All file data of the target user are retrieved synchronously from multiple scattered storage locations to comprehensively obtain all file information related to the target user. The ownership information of each file data is checked one by one to ensure that all file data belongs to the target user and is complete. All retrieved file data is fully integrated, and irrelevant and redundant content is removed to form a unified and complete data carrier format, which is the original record carrier of the target user.

[0029] The document format type of each part of the data in the original record carrier is identified one by one. The format characteristics of different data are carefully distinguished. Data with the same format type are grouped together. The format classification of all data content is completed to ensure that each piece of data belongs to the corresponding format category. Each classified document format type is assigned a unique identification information, which is directly used as the carrier format label of the original record carrier.

[0030] Following the document format specifications corresponding to the carrier format label, starting from the beginning of the original record carrier, examine all data content layer by layer, extracting various fields from the data that represent user personal information, physical condition, dietary requirements, and health status. All extracted fields are completely retained without omitting any valid fields. Arrange all retained fields in the order of extraction, and the arranged fields together form a complete list, which is the attribute field list of the original record carrier.

[0031] Each field name in the attribute field list is matched one by one with the standard professional terms in the preset subject ontology thesaurus. The standard professional concept corresponding to each field name in the thesaurus is accurately located to ensure that the matching result is completely consistent with the actual meaning of the field. The original field name is replaced with the matched standard professional concept, so that each field has a clear and standardized professional semantic expression, improving the professionalism and standardization of the field content. All fields that have completed the standard professional concept replacement form a complete set, which is the semantically enhanced field set of the attribute field list.

[0032] For each field in the semantically enhanced field set, the corresponding dietary restrictions for users are thoroughly analyzed, the specific applicable conditions and execution boundaries of each restriction are clarified, and the specific execution standards for each restriction are determined. All the sorted restrictions, applicable conditions, and execution standards are systematically integrated to form unified constraint content. All the integrated constraint content together constitutes the complete parameter content, which is the personalized constraint parameter of the semantically enhanced field set.

[0033] The beneficial effects include: Simultaneous retrieval and complete integration of archival data from multiple locations enables comprehensive acquisition of relevant target user information; redundant content is removed to form standardized and unified original record carriers, ensuring the integrity and purity of the archival data. Categorizing and assigning unique identifiers to the original record carriers clarifies data format characteristics, providing a clear basis for subsequent data processing. Extracting and systematically arranging effective fields layer by layer ensures complete retention of core user information, forming a comprehensive and complete list of attribute fields. Matching and replacing field names with standard professional terminology standardizes semantic expression, enhancing the professionalism and recognizability of field information. In-depth analysis and integration of dietary restrictions allow for the precise generation of personalized constraint parameters tailored to the user's actual situation, providing a stable and accurate foundation for subsequent personalized dietary risk assessments.

[0034] S03. The structured component list and the personalized constraint parameters are fused and reconstructed to obtain the analysis request instance of the target user; In this embodiment of the invention, the step of fusing and reconstructing the structured component list and the personalized constraint parameters to obtain the analysis request instance of the target user includes: Dynamic placeholder assembly is performed on the structured component list to obtain the field embedding carrier of the structured component list; The personalized constraint parameters are compiled into constraint expressions to obtain the constraint statements for the personalized constraint parameters; The field embedding carrier and the constraint statement are interleaved and arranged to obtain a spliced ​​carrier of the field embedding carrier and the constraint statement; The splicing carrier is compiled and formatted to obtain an analysis request instance of the splicing carrier.

[0035] Iterate through each dietary component entry in the structured ingredient list, confirming the standard name, category, and component attributes of each entry. Set dedicated text fill positions at the beginning, core content connection, and end of each dietary component entry. Each text fill position is assigned a clear functional direction to connect to the corresponding related content. Strictly integrate all dietary component entries with completed text fill positions according to the original arrangement of the list, preserving the original logical relationship between the entries. The integrated complete content carrier is the field embedding carrier of the structured ingredient list.

[0036] We systematically analyze all dietary restrictions and applicable conditions included in the personalized constraint parameters, transforming each constraint into a clear and straightforward text description. We clarify the constraint target and execution standard corresponding to each text description, and connect all text descriptions sequentially according to the logical relationship of the constraint content. We remove redundant words and retain the core constraint information, so that the connected content can completely and accurately convey all personalized constraint requirements, forming a smooth and standardized unified text expression, which is the constraint statement of the personalized constraint parameters.

[0037] The constraint statement is divided into multiple independent constraint text fields according to the functional modules of the content. Each constraint text field is precisely placed inside the matching text filling position in the field embedding carrier. According to the arrangement order of the dietary component items in the field embedding carrier, the constraint text fields and dietary component items are alternately interspersed and combined to ensure that each dietary component item is matched with its corresponding constraint text field, maintaining the continuity and integrity of the overall content. The coherent whole content formed after combination is the splicing carrier of the field embedding carrier and the constraint statement.

[0038] A comprehensive review of all text content in the spliced ​​carrier is conducted, standardizing the expression format and sentence layout of all texts. The connection logic between sentences is adjusted, duplicate text information and redundant connecting words are deleted, and non-standard expressions are corrected. The overall content conforms to the preset text expression standards, ensuring that the logical hierarchy of the content is clear and the format is completely consistent. The complete content after comprehensive standardization and organization is the analysis request instance of the spliced ​​carrier.

[0039] The beneficial effects include: by setting dedicated text fill positions for the structured component list and integrating them, a field embedding carrier adapted for content embedding can be formed, providing a stable foundation for the docking of constraint content. Transforming personalized constraint parameters into standardized and fluent constraint statements ensures clear and complete expression of constraint information, facilitating precise matching with dietary component content. Alternating and combining constraint fields and field embedding carriers enables deep integration of dietary components and personalized constraints, ensuring the rationality and completeness of content connection. Comprehensive standardization of the splicing carriers unifies content format and logical hierarchy, forming standardized and compliant analysis request examples. This provides a uniformly formatted and logically clear analytical foundation for subsequent dietary risk assessments, improving the standardization and coherence of the overall processing flow.

[0040] S04. Generative deduction is performed on the analysis request instance to obtain the risk assessment text of the analysis request instance, and hash matching detection is performed on the analysis request instance to obtain the interception trigger condition of the analysis request instance; In this embodiment of the invention, the step of performing generative deduction on the analysis request instance to obtain the risk assessment text of the analysis request instance, and performing hash matching detection on the analysis request instance to obtain the interception trigger condition of the analysis request instance, includes: The analysis request instance is subjected to instruction domain separation to obtain the prompt prefix and core query content of the analysis request instance; The prompt prefix and the core query content are fused and injected with context to obtain a complete prompt carrier of the prompt prefix and the core query content; The complete prompt carrier is subjected to autoregressive generation to obtain the risk assessment text of the complete prompt carrier; The analysis request instance is serialized and arranged to obtain the constituent word sequence of the analysis request instance; The constituent word sequence is subjected to hash space projection to obtain the word fingerprint encoding sequence of the constituent word sequence; Based on a preset taboo word hash library, conflict matching is performed on the word fingerprint encoding sequence to obtain the interception triggering conditions of the analysis request instance.

[0041] The step of performing a hash space projection on the constituent word sequence to obtain the word fingerprint encoding sequence of the constituent word sequence includes: The semantic space is mapped onto the constituent word sequence to obtain the semantic vector of the constituent word sequence; Based on the archive data, the semantic vector is traced back to its historical co-occurrence to obtain the co-occurrence word set of the semantic vector; The co-occurrence word set is assigned a confidence score to obtain the confidence score set of the co-occurrence word set; Based on the personalized constraint parameters, the risk level is mapped to the constituent word sequence to obtain the risk weight sequence of the constituent word sequence; Based on the archive data, the timeliness coefficient of the constituent word sequence is derived to obtain the time decay factor of the constituent word sequence; Based on the semantic vector, the dynamic offset of the constituent word sequence is calculated, wherein the formula for calculating the dynamic offset is: ; In the formula, The first word in the constituent word sequence The dynamic offset of each word element It is a natural constant. The first word in the constituent word sequence The set of co-occurring lexical units, The first word in the constituent word sequence The word element and the first word element in the co-occurring word element set Cosine similarity of semantic vectors of each word element The first word in the co-occurrence lexicon set The confidence score of each word element. The number of elements in the co-occurring lexical set. The first word in the constituent word sequence Risk weight of each word element The first word in the constituent word sequence The time decay factor of each word element The first word in the constituent word sequence The semantic vector of each word element. The first word in the co-occurrence lexicon set The semantic vector of each word element; Based on a preset hash function, the semantic vector is converted into binary to obtain the original hash code of the semantic vector; Based on the dynamic offset, the original hash code is perturbed and replaced, and the perturbed hash code is compressed and encapsulated with a fixed length to obtain the word fingerprint encoding sequence that makes up the word sequence.

[0042] The entire text content of the request instance is analyzed segment by segment. The guiding statement and the core query statement are divided according to the functional attributes of the content. The guiding statement is extracted as its own text content, which serves as the prompt prefix for analyzing the request instance.

[0043] The core query statement is extracted as its own text content, which constitutes the core query content for analyzing the request instance.

[0044] By placing the hint prefix at the beginning of the text content and connecting the core query content to the end of the hint prefix, the two parts form a coherent and complete text, creating a unified contextual relationship between the hint prefix and the core query content. The integrated complete text content then serves as a comprehensive hint carrier for both the hint prefix and the core query content.

[0045] Following the logical order of the complete prompt carrier's text, the complete text expression related to dietary risk assessment is generated word by word and sentence by sentence. The content of the expression is continuously supplemented until a complete assessment text content is formed. The generated complete assessment text content is the risk assessment text of the complete prompt carrier.

[0046] Arrange each independent text unit in the analysis request instance in the order of their appearance, and organize all the independent text units into a continuous combination of text units. This combination of text units is the word sequence that makes up the analysis request instance.

[0047] Each character unit in the word sequence is mapped to a specific semantic expression, giving each character unit a clear semantic meaning. The combination of the semantic expressions corresponding to all character units forms the semantic vector of the word sequence.

[0048] Retrieve the target user's profile data, find the text units that co-occur with each semantic expression in the semantic vector, and summarize these co-occurring text units to form a unique set of text units, which is the co-occurrence word set of the semantic vector.

[0049] Based on the authenticity and validity of each text unit in the co-occurring word set in the archival data, each text unit is assigned a corresponding authenticity and validity judgment result. The set formed by combining all authenticity and validity judgment results is the confidence score set of the co-occurring word set.

[0050] By matching the dietary restrictions in the personalized constraint parameters, a corresponding risk level identifier is matched for each text unit in the word sequence. The sequence formed by the combination of all risk level identifiers is the risk weight sequence of the word sequence.

[0051] Based on the recording time of each item in the archival data, the effective time range corresponding to each text unit in the word sequence is determined. The time influence attribute of each text unit is determined according to the effective time range. The sequence formed by the combination of all time influence attributes is the time decay factor of the word sequence.

[0052] By combining the semantic vector's content, the association of co-occurring word sets, the determination results of the confidence score set, the level identifier of the risk weight sequence, and the influence attribute of the time decay factor, the semantic variation range of each text unit in the word sequence is determined. The semantic variation range of all text units is integrated to obtain the overall variation reference content, which is the dynamic offset of the word sequence.

[0053] According to the text conversion rules corresponding to the preset hash function, all semantic expressions in the semantic vector are converted into binary text codes one by one. The converted binary text codes are the original hash codes of the semantic vector.

[0054] Based on the dynamic offset change reference content, the arrangement position of each binary code in the original hash code is adjusted. After the code position adjustment is completed, all binary codes are integrated and encapsulated according to a fixed length. The encapsulated code content is the word fingerprint code sequence that makes up the word sequence.

[0055] The token fingerprint encoding sequence is compared one by one with the encoded content in the preset taboo token hash library to find the encoding content that matches the two. The corresponding risk triggering situation is determined based on the matched encoding content. This risk triggering situation is the interception triggering condition for the analysis request instance.

[0056] The dynamic offset of the corresponding word in the constituent word sequence is calculated by preset rules, where the natural constant is a fixed value. The co-occurrence word set of the corresponding word in the constituent word sequence is formed by retrieving the target user's profile data and summing up the text units that co-occur with the semantic expression of the word in the profile data. The cosine similarity of the semantic vectors of the corresponding word in the constituent word sequence and the corresponding word in the co-occurrence word set is obtained by multiplying the corresponding dimension values ​​of the semantic vectors of the two word elements one by one, summing them, then calculating the square root of the sum of the squares of all dimension values ​​of the two semantic vectors, and dividing the sum by the product of the two square root results. The confidence score of the corresponding word in the co-occurrence word set is assigned a corresponding judgment result based on the authenticity and validity of the word's appearance in the profile data. The number of elements in the co-occurring lexical set is obtained by counting the total number of lexical units contained in the co-occurring lexical set. The risk weight of the corresponding lexical unit in the lexical sequence is obtained by matching the corresponding risk level identifier to the dietary restriction requirements in the personalized constraint parameters. The time decay factor of the corresponding lexical unit in the lexical sequence is obtained by determining the effective time range of the lexical unit based on the recording time of the corresponding content in the archive data. The semantic vector of the corresponding lexical unit in the lexical sequence maps the corresponding text unit in the lexical sequence to the exclusive semantic expression content and integrates all the semantic expression content. The semantic vector of the corresponding lexical unit in the co-occurring lexical set maps the corresponding text unit in the co-occurring lexical set to the exclusive semantic expression content and integrates all the semantic expression content.

[0057] This preset rule is used to generate dynamic offsets of corresponding words in the constituent word sequence. By integrating multi-dimensional information such as word co-occurrence association, confidence validity, risk level, and time decay, it generates exclusive offset reference content that fits the actual situation of the target user. This provides a precise basis for subsequent bit perturbation and permutation of hash encoding, improves the uniqueness and matching accuracy of word fingerprint encoding sequence, and ensures the accuracy and reliability of interception trigger condition determination.

[0058] The values ​​of the preset rules exhibit a fixed correspondence as the co-occurrence association state, confidence validity state, risk level state, and time decay state of the lexical unit change. For lexical units with tight co-occurrence association, high confidence validity, clear risk level, and weak time decay impact, the values ​​of the corresponding dynamic offsets conform to the preset business logic. For lexical units with loose co-occurrence association, low confidence validity, ambiguous risk level, and strong time decay impact, the values ​​of the corresponding dynamic offsets conform to another preset business logic, ensuring that the generation of dynamic offsets fully meets the needs of actual application scenarios.

[0059] The beneficial effects include: by dividing and analyzing the functional attributes of request instances and extracting prompt prefixes and core query content, the content structure can be clearly decomposed, providing a stable basis for subsequent content integration. Contextual integration of prompt prefixes and core query content can form a logically coherent and complete prompt carrier, ensuring the rationality and completeness of the risk assessment text generation. Element arrangement and semantic mapping of the analyzed request instances can accurately extract the semantic information of text units. Combined with archival data to complete co-occurrence tracing and confidence determination, the authenticity and effectiveness of semantic information can be improved. Through risk level matching and time attribute determination, the association attributes of text units can be accurately obtained. Combined with dynamic offset adjustment hash encoding, a unique lexical fingerprint encoding sequence can be formed. After accurate comparison with the forbidden lexical database, the interception trigger conditions can be quickly determined, ensuring the accuracy and security of dietary risk assessment and improving the processing efficiency and reliability of the overall assessment process.

[0060] S05. Based on the interception triggering condition, determine the output permission of the risk assessment text, and based on the determination result, filter the output of the risk assessment text to obtain the risk assessment conclusion of the target user. In this embodiment of the invention, the step of determining output permissions for the risk assessment text based on the interception triggering condition, and filtering the output of the risk assessment text based on the determination result to obtain the risk assessment conclusion for the target user, includes: The interception triggering conditions are classified into conflict categories to obtain the blocking identifier and the downgrade identifier of the interception triggering conditions; Based on the blocking identifier, the entire risk assessment text is discarded, and a matching message is retrieved from a preset warning material library to obtain the blocking feedback carrier of the risk assessment text; Based on the downgrade identifier, the risk assessment text is located within a risk range to obtain the set of coordinates of the cutting points of the risk assessment text; Based on the set of cutting point coordinates, the risk assessment text is divided into a first segment set and a last segment set; Sensitive word masking is performed on the tail segment set to obtain a secure tail segment carrier for the tail segment set; The first segment set and the security tail segment carrier are connected and recombined to obtain the downgraded output carrier of the interception trigger condition; The blocking feedback carrier or the degradation output carrier is used as the risk assessment conclusion for the target user.

[0061] The process of classifying the interception triggering conditions into conflict categories to obtain the blocking and downgrading identifiers for the interception triggering conditions includes: The interception triggering conditions are parsed using conflict term categories to obtain the allergen-level labels and metabolic contraindication-level labels of the interception triggering conditions; Based on the allergen level label, the hazard level of the interception triggering condition is classified. When the allergen level label points to the lethal allergen level, a blocking identifier for the interception triggering condition is generated. Based on the metabolic contraindication hierarchy label, the interception trigger condition is subjected to risk accumulation verification to obtain the downgrade identifier of the interception trigger condition.

[0062] The step of locating risk intervals in the risk assessment text based on the downgrade identifier to obtain a set of coordinates for the cut-off points of the risk assessment text includes: A sliding window scan is performed on the risk assessment text to obtain a sequence of candidate cut points for the risk assessment text; Calculate the cutting cost of the candidate cut point sequence, wherein the formula for calculating the cutting cost is: ; In the formula, Candidate cut points The cost of cutting The character position index of the candidate cut point sequence, For the candidate cut point Hit words on the left, For the candidate cut point All hit words on the left, For the candidate cut point Hit words on the left The starting character position, For the preset hit words Risk weights, It is a natural constant. The preset left-side distance attenuation factor, For the candidate cut point Hit words on the right, For the candidate cut point All the hit words on the right, For the candidate cut point Hit words on the right The position of the terminating character, For the preset hit words Risk weights, The preset right-side distance attenuation factor, The preset semantic breakage penalty coefficient, The preset slope factor, The center position of the paragraph in the risk assessment text; Based on the cutting cost, extract the minimum cost cutting point from the candidate cutting point sequence; Based on the minimum cost cutting point, the cutting boundary of the risk assessment text is calibrated to obtain the set of cutting point coordinates of the risk assessment text.

[0063] The conflicting terms in the interception trigger conditions are broken down one by one, and conflicting terms related to allergens and those related to metabolic contraindications are distinguished. Allergen-related conflicting terms are assigned exclusive hierarchical labels, which are the allergen hierarchical labels of the interception trigger conditions.

[0064] Assign a unique hierarchical identifier to conflicting terms related to metabolic contraindications. This hierarchical identifier is the metabolic contraindication hierarchical label that intercepts the triggering conditions.

[0065] Verify the degree of harm corresponding to the allergen level label, confirm the specific allergen type pointed to by the allergen level label, and when the type is confirmed to be a fatal allergen, assign a unique blocking mark to the interception trigger condition. This blocking mark is the blocking identifier for the interception trigger condition.

[0066] We sort out the content of each metabolic contraindication corresponding to the metabolic contraindication level label, and confirm the risk level of each metabolic contraindication one by one. After completing the cumulative verification of all metabolic contraindication risks, we assign a unique downgrade mark to the interception trigger condition. This downgrade mark is the downgrade identifier of the interception trigger condition.

[0067] Once the interception trigger condition is confirmed to carry a blocking identifier, all risk assessment text content is discarded. Instead, a warning text content matching the current interception situation is searched from the preset warning material library. The found warning text content is used as exclusive feedback content, which serves as the blocking feedback carrier for the risk assessment text.

[0068] Starting from the initial character position of the risk assessment text, the viewing range is gradually moved according to a fixed character length, and the character positions in the text suitable for cutting are marked in sequence. All marked cutting character positions are arranged in chronological order, and the combination of the arranged positions is the candidate cutting point sequence of the risk assessment text.

[0069] For each cutting position in the candidate cutting point sequence, the information of the hit words to the left and right of that position is statistically analyzed. Combining the risk weight of the hit words, the character interval from the cutting position, and the influence of the center position of the text paragraph, the cutting loss corresponding to each cutting position is comprehensively analyzed. The analyzed cutting loss is the cutting cost of the candidate cutting point sequence.

[0070] By comparing the cutting costs of all cutting positions in the candidate cutting point sequence, the cutting position with the lowest cutting loss is selected, and this selected cutting position is the minimum cost cutting point in the candidate cutting point sequence.

[0071] Using the minimum cost cut point as the core, determine the specific cut boundaries of the risk assessment text, clarify the character position range corresponding to the cut boundaries, summarize all the determined cut boundary character positions, and the sum of the summarized character position combinations is the cut point coordinate set of the risk assessment text.

[0072] Based on the character positions corresponding to the coordinates of the cutting points, the risk assessment text is divided into two parts. The combination of the content at the beginning of the cutting position after the division is the first paragraph of the risk assessment text.

[0073] The combination of content located after the segmentation point constitutes the end segment of the risk assessment text.

[0074] Identify sensitive text content contained in the tail segment set, replace all sensitive text content with standardized text, and the tail segment set content after replacement is the secure tail segment carrier of the tail segment set.

[0075] The first segment is placed at the beginning, and the secure tail segment is connected to the end of the first segment, so that the two parts form a coherent and complete text. The integrated complete text is the downgraded output carrier for intercepting the trigger conditions.

[0076] Based on the identifier type corresponding to the interception trigger condition, either the blocking feedback carrier or the downgraded output carrier is selected as the final evaluation content, which is the risk assessment conclusion for the target user.

[0077] The character position index of the candidate cut point sequence is extracted one by one from the character number corresponding to each cut position in the candidate cut point sequence of the risk assessment text. The hit words to the left of the candidate cut point are extracted one by one from all risk-related words to the left of the candidate cut point. All hit words to the left of the candidate cut point are the complete set of all selected risk-related words on the left. The starting character position of the hit words to the left of the candidate cut point is recorded one by one from the position corresponding to the first character of each hit word in the text. The preset risk weight of the hit words is retrieved one by one from the exclusive risk level identifier set for each risk-related word in advance. The natural constant is a fixed standard value. The preset left distance decay factor is retrieved from the fixed value set in advance to measure the influence of the left word on the distance to the cut point. The hit words to the right of the candidate cut point are extracted from... All risk-related words to the right of the candidate cut point are filtered and extracted one by one. All hit words to the right of the candidate cut point are the complete set of all the selected risk-related words on the right. The position of the terminating character of the hit words to the right of the candidate cut point is obtained by recording the position of the last character of each hit word in the text. The preset right distance decay factor is obtained from a fixed value that is used to measure the influence of the right word on the distance from the cut point. The preset semantic break penalty coefficient is obtained from a fixed value that is used to measure the semantic break caused by the cut point deviating from the center of the paragraph. The preset slope factor is obtained from a fixed value that is used to adjust the rate of change of the semantic break penalty. The center position of the risk assessment text is obtained by taking the character number corresponding to the middle position after counting the total number of all characters in the risk assessment text.

[0078] This rule is used to calculate the cutting cost of candidate cutting points. It comprehensively measures the rationality of each candidate cutting point by considering three dimensions: the risk impact of hitting words on the left, the risk impact of hitting words on the right, and the semantic break penalty of the cutting point deviating from the center of the paragraph. This provides an accurate basis for selecting the cutting point with the minimum cost, ensuring that the cutting position can not only fully avoid the splitting of risky words, but also reduce semantic breaks, thus ensuring the integrity and security of the text after cutting. This provides reliable support for subsequent text cutting and sensitive word masking.

[0079] The value of this rule has a fixed correspondence with the change of the cut point position. When the cut point is close to the hit word on the left, the risk impact on the left conforms to the preset high-impact business logic. When the cut point is close to the hit word on the right, the risk impact on the right conforms to the preset high-impact business logic. When the cut point is far from the paragraph center, the semantic break penalty conforms to the preset high-penalty business logic. Finally, the value of the cut cost is completely consistent with the actual situation of the cut position, ensuring that the selected minimum cost cut point completely conforms to the preset business logic.

[0080] The beneficial effects include: by deconstructing conflicting terms and classifying allergens and metabolic contraindications into hierarchical labels, the system can accurately distinguish the conflict types of dietary risks, generate blocking and downgrading labels based on the degree of harm, and achieve accurate risk level determination. For blocking labels, the system directly discards the risk text and retrieves matching warning content, enabling rapid output of safe blocking feedback and avoiding the transmission of high-risk information. By using a sliding window scanning and cost-based segmentation analysis to determine the minimum cost cutting point, the system can accurately locate text segmentation boundaries, ensuring the rationality of text segmentation. Masking sensitive words in the end segment set and recombining it with the beginning segment set can eliminate sensitive content while retaining effective assessment information, forming a compliant downgrading output carrier. Filtering output content based on label type throughout the process ensures the safety and compliance of risk assessment conclusions, improving the rigor and security of personalized dietary risk assessment output.

[0081] like Figure 2 The diagram shown is a functional block diagram of a personalized dietary risk assessment system based on user profiles provided in an embodiment of the present invention.

[0082] The personalized dietary risk assessment system 10 based on user profiles described in this invention can be installed in an electronic device. Depending on the functions implemented, the personalized dietary risk assessment system 10 based on user profiles may include a data preprocessing module 11, a user profile parsing module 12, a fusion and reconstruction module 13, a dual-track deduction and detection module 14, and an output decision module 15. The modules described in this invention can also be referred to as units, which are a series of computer program segments that can be executed by the processor of an electronic device and can perform a fixed function, and are stored in the memory of the electronic device.

[0083] In this embodiment, the functions of each module / unit are as follows: The data preprocessing module 11 is used to perform multimodal feature dimensionality reduction projection on the source data to be processed of the target user to obtain a structured component list of the source data to be processed. The user profile parsing module 12 is used to retrieve the profile data of the target user and perform attribute parsing on the profile data to obtain the personalized constraint parameters of the target user. The fusion and reconstruction module 13 is used to fuse and reconstruct the structured component list and the personalized constraint parameters to obtain the analysis request instance of the target user. The dual-track deduction and detection module 14 is used to perform generative deduction on the analysis request instance to obtain the risk assessment text of the analysis request instance, and to perform hash matching detection on the analysis request instance to obtain the interception trigger condition of the analysis request instance. The output adjudication module 15 is used to determine the output permission of the risk assessment text based on the interception triggering condition, and to filter the output of the risk assessment text based on the determination result, so as to obtain the risk assessment conclusion of the target user.

[0084] In the several embodiments provided by this invention, it should be understood that the disclosed methods and systems can be implemented in other ways. For example, the system embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and other division methods may be used in actual implementation.

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

[0086] Furthermore, the functional modules in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or in the form of hardware plus software functional modules.

[0087] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.

[0088] This application embodiment can acquire and process relevant data based on artificial intelligence technology. Artificial intelligence is the theory, method, technology, and application system that uses digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to obtain optimal results.

[0089] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.

Claims

1. A personalized dietary risk assessment method based on user profiles, characterized in that, The method includes: S01. Perform multimodal feature dimensionality reduction projection on the source data to be processed of the target user to obtain a list of structured components of the source data to be processed; S02. Retrieve the target user's profile data and perform attribute parsing on the profile data to obtain the target user's personalized constraint parameters; S03. The structured component list and the personalized constraint parameters are fused and reconstructed to obtain the analysis request instance of the target user; S04. Generative deduction is performed on the analysis request instance to obtain the risk assessment text of the analysis request instance, and hash matching detection is performed on the analysis request instance to obtain the interception trigger condition of the analysis request instance; S05. Based on the interception triggering condition, determine the output permission of the risk assessment text, and based on the determination result, filter the output of the risk assessment text to obtain the risk assessment conclusion of the target user.

2. The personalized dietary risk assessment method based on user profiles as described in claim 1, characterized in that, The process of performing multimodal feature dimensionality reduction projection on the source data to be processed from the target user yields a structured component list of the source data to be processed, including: Modality type identification is performed on the source data to be processed of the target user to obtain the modality attribution label of the source data to be processed; When the modality attribution label points to an image modality, the source data to be processed is subjected to visual content decoding to obtain an image recognition list of the source data to be processed. When the modality attribution label points to a text modality, semantic entity segmentation is performed on the source data to be processed to obtain a text recognition list of the source data to be processed. The conflict between the image recognition list and the text recognition list is resolved, and the resolved list is subjected to component normalization mapping to obtain the structured component list of the source data to be processed.

3. The personalized dietary risk assessment method based on user profiles as described in claim 1, characterized in that, The process of retrieving the target user's profile data and parsing the profile data to obtain the target user's personalized constraint parameters includes: Distributed reading of the target user's profile data is performed to obtain the target user's original record carrier; The original recording media are classified into document formats to obtain the media format tags of the original recording media; Based on the carrier format tag, a recursive field traversal is performed on the original record carrier to obtain a list of attribute fields of the original record carrier. Based on a pre-defined subject ontology lexicon, the attribute field list is subjected to concept mapping by field names to obtain a semantically enhanced field set for the attribute field list; Constraint threshold parsing is performed on the semantic enhancement field set to obtain personalized constraint parameters for the semantic enhancement field set.

4. The personalized dietary risk assessment method based on user profile as described in claim 1, characterized in that, The process of fusing and reconstructing the structured component list and the personalized constraint parameters to obtain the analysis request instance of the target user includes: Dynamic placeholder assembly is performed on the structured component list to obtain the field embedding carrier of the structured component list; The personalized constraint parameters are compiled into constraint expressions to obtain the constraint statements for the personalized constraint parameters; The field embedding carrier and the constraint statement are interleaved and arranged to obtain a spliced ​​carrier of the field embedding carrier and the constraint statement; The splicing carrier is compiled and formatted to obtain an analysis request instance of the splicing carrier.

5. The personalized dietary risk assessment method based on user profile as described in claim 1, characterized in that, The process of generatively inferring the analysis request instance to obtain its risk assessment text, and performing hash matching detection on the analysis request instance to obtain its interception trigger conditions, includes: The analysis request instance is subjected to instruction domain separation to obtain the prompt prefix and core query content of the analysis request instance; The prompt prefix and the core query content are fused and injected with context to obtain a complete prompt carrier of the prompt prefix and the core query content; The complete prompt carrier is subjected to autoregressive generation to obtain the risk assessment text of the complete prompt carrier; The analysis request instance is serialized and arranged to obtain the constituent word sequence of the analysis request instance; The constituent word sequence is subjected to hash space projection to obtain the word fingerprint encoding sequence of the constituent word sequence; Based on a preset taboo word hash library, conflict matching is performed on the word fingerprint encoding sequence to obtain the interception triggering conditions of the analysis request instance.

6. The personalized dietary risk assessment method based on user profile as described in claim 5, characterized in that, The step of performing a hash space projection on the constituent word sequence to obtain the word fingerprint encoding sequence of the constituent word sequence includes: The semantic space is mapped onto the constituent word sequence to obtain the semantic vector of the constituent word sequence; Based on the archive data, the semantic vector is traced back to its historical co-occurrence to obtain the co-occurrence word set of the semantic vector; The co-occurrence word set is assigned a confidence score to obtain the confidence score set of the co-occurrence word set; Based on the personalized constraint parameters, the risk level is mapped to the constituent word sequence to obtain the risk weight sequence of the constituent word sequence; Based on the archive data, the timeliness coefficient of the constituent word sequence is derived to obtain the time decay factor of the constituent word sequence; Based on the semantic vector, the dynamic offset of the constituent word sequence is calculated, wherein the formula for calculating the dynamic offset is: ; In the formula, The first word in the constituent word sequence The dynamic offset of each word element It is a natural constant. The first word in the constituent word sequence The set of co-occurring lexical units, The first word in the constituent word sequence The word element and the first word element in the co-occurring word element set Cosine similarity of semantic vectors of each word element The first word in the co-occurrence lexicon set The confidence score of each word element. The number of elements in the co-occurring lexical set. The first word in the constituent word sequence Risk weight of each word element The first word in the constituent word sequence The time decay factor of each word element The first word in the constituent word sequence The semantic vector of each word element. The first word in the co-occurrence lexicon set The semantic vector of each word element; Based on a preset hash function, the semantic vector is converted into binary to obtain the original hash code of the semantic vector; Based on the dynamic offset, the original hash code is perturbed and replaced, and the perturbed hash code is compressed and encapsulated with a fixed length to obtain the word fingerprint encoding sequence that makes up the word sequence.

7. The personalized dietary risk assessment method based on user profile as described in claim 1, characterized in that, The process of determining output permissions for the risk assessment text based on the interception trigger condition, and filtering the output of the risk assessment text based on the determination result to obtain the risk assessment conclusion for the target user, includes: The interception triggering conditions are classified into conflict categories to obtain the blocking identifier and the downgrade identifier of the interception triggering conditions; Based on the blocking identifier, the entire risk assessment text is discarded, and a matching message is retrieved from a preset warning material library to obtain the blocking feedback carrier of the risk assessment text; Based on the downgrade identifier, the risk assessment text is located within a risk range to obtain the set of coordinates of the cutting points of the risk assessment text; Based on the set of cutting point coordinates, the risk assessment text is divided into a first segment set and a last segment set; Sensitive word masking is performed on the tail segment set to obtain a secure tail segment carrier for the tail segment set; The first segment set and the security tail segment carrier are connected and recombined to obtain the downgraded output carrier of the interception trigger condition; The blocking feedback carrier or the degradation output carrier is used as the risk assessment conclusion for the target user.

8. The personalized dietary risk assessment method based on user profile as described in claim 7, characterized in that, The process of classifying the interception triggering conditions into conflict categories to obtain the blocking and downgrading identifiers for the interception triggering conditions includes: The interception triggering conditions are parsed using conflict term categories to obtain the allergen-level labels and metabolic contraindication-level labels of the interception triggering conditions; Based on the allergen level label, the hazard level of the interception triggering condition is classified. When the allergen level label points to the lethal allergen level, a blocking identifier for the interception triggering condition is generated. Based on the metabolic contraindication hierarchy label, the interception trigger condition is subjected to risk accumulation verification to obtain the downgrade identifier of the interception trigger condition.

9. The personalized dietary risk assessment method based on user profile as described in claim 7, characterized in that, The step of locating risk intervals in the risk assessment text based on the downgrade identifier to obtain a set of coordinates for the cut-off points of the risk assessment text includes: A sliding window scan is performed on the risk assessment text to obtain a sequence of candidate cut points for the risk assessment text; Calculate the cutting cost of the candidate cut point sequence, wherein the formula for calculating the cutting cost is: ; In the formula, Candidate cut points The cost of cutting The character position index of the candidate cut point sequence, For the candidate cut point Hit words on the left, For the candidate cut point All hit words on the left, For the candidate cut point Hit words on the left The starting character position, For the preset hit words Risk weights, It is a natural constant. The preset left-side distance attenuation factor, For the candidate cut point Hit words on the right, For the candidate cut point All the hit words on the right, For the candidate cut point Hit words on the right The position of the terminating character, For the preset hit words Risk weights, The preset right-side distance attenuation factor, The preset semantic breakage penalty coefficient, The preset slope factor, The center position of the paragraph in the risk assessment text; Based on the cutting cost, extract the minimum cost cutting point from the candidate cutting point sequence; Based on the minimum cost cutting point, the cutting boundary of the risk assessment text is calibrated to obtain the set of cutting point coordinates of the risk assessment text.

10. A personalized dietary risk assessment system based on user profiles, characterized in that, The system for implementing the personalized dietary risk assessment method based on user profiles as described in claim 1 includes: The data preprocessing module is used to perform multimodal feature dimensionality reduction projection on the source data to be processed of the target user to obtain a structured component list of the source data to be processed. The user profile parsing module is used to retrieve the profile data of the target user and perform attribute parsing on the profile data to obtain the personalized constraint parameters of the target user. The fusion and reconstruction module is used to fuse and reconstruct the structured component list and the personalized constraint parameters to obtain the analysis request instance of the target user; The dual-track deduction and detection module is used to perform generative deduction on the analysis request instance to obtain the risk assessment text of the analysis request instance, and to perform hash matching detection on the analysis request instance to obtain the interception trigger condition of the analysis request instance. The output adjudication module is used to determine the output permission of the risk assessment text based on the interception triggering conditions, and to filter the output of the risk assessment text based on the determination result, so as to obtain the risk assessment conclusion of the target user.