Food safety data analysis system and method based on human-computer interaction
By using a human-computer interactive food safety data analysis system, and leveraging keyword data and raw material supplier risk assessments, personalized inspection methods and rectification strategies are generated. This solves the problem of incomplete food safety assessments in existing technologies, and achieves efficient and accurate food safety assessments and improved corporate compliance.
Patent Information
- Application Number
- CN202411046101.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-01
- Publication Date
- 2024-11-12
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In existing technologies, food safety assessment methods mainly rely on single-dimensional risk assessment, resulting in a single assessment result that cannot comprehensively and accurately assess the food safety risks of enterprises. Furthermore, the lack of timely data support and targeted inspection methods leads to incomplete and inaccurate food safety assessments of enterprises.
By using a human-computer interaction-based food safety data analysis system, we can obtain search information, evaluation information, and online review information of food companies. We can use the TextRank algorithm to extract keyword data, generate personalized inspection methods, and combine them with raw material supplier risk assessment to calculate the final food safety assessment value. We can also set keyword thresholds and term-related knowledge bases to generate rectification strategies.
It improves the efficiency and accuracy of food safety inspections, enhances food safety identification capabilities and consumer trust, ensures the validity of inspection results and corporate compliance, and provides timely adjustment strategies.
Smart Images

Figure CN118940957A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of food safety data analysis, and in particular to a food safety data analysis system and method based on human-computer interaction. Background Art
[0002] Food safety is the cornerstone of human health and is related to everyone's life safety and physical health. Corporate food safety issues are directly related to the sustainable development of the company, the health of consumers and the competitive position in the market. Food contamination or eating unsafe food may lead to health problems such as food poisoning and the spread of infectious diseases, and even endanger life in severe cases. Food safety is not only the responsibility of individual companies, but also involves the stability and reliability of the entire supply chain.
[0003] Food safety involves multiple fields and levels. Food safety standards may differ in different industries and regions, which makes it difficult to objectively quantify food safety diagnosis results. Food safety issues are often complex and diverse, and it is difficult to use a single indicator or method to conduct a comprehensive evaluation. The current enterprise food safety assessment method mainly focuses on single-dimensional risk assessment, which is usually an independent analysis of the company's food ingredients. Enterprise food safety assessment usually relies on food inspection reports. This safety risk assessment method often leads to a single risk assessment result. It relies only on a single source of data assessment and cannot accurately assess the company's food safety risks. There is no timely data support and targeted inspection methods for different problems of different companies. There are differences in time and standards only through spot check data or historical problems, which leads to one-sided enterprise food safety assessments that cannot fully and accurately assess the safety risk value of enterprise food. Summary of the invention
[0004] The purpose of the present invention is to provide a food safety data analysis system and method based on human-computer interaction to solve the problems raised in the above background technology.
[0005] In order to solve the above technical problems, the present invention provides the following technical solutions: a food safety data analysis system and method based on human-computer interaction.
[0006] The food safety data analysis system and method comprises the following steps:
[0007] Step S1, obtaining the search information, evaluation information and online comment information of the inspected food enterprise in the inspected quarter, and extracting the keyword entries corresponding to the inspected food enterprise in the inspected quarter, as well as the number of corresponding keyword entries, and recording the keyword entries and the number of corresponding keyword entries as keyword data;
[0008] Step S2, generating a personalized inspection method for the inspected food enterprise through the keyword data contained in the inspected food enterprise, inspecting the inspected food enterprise, and recording the inspection result as food safety assessment value 1;
[0009] Step S3: Set the keyword threshold to Obtain keyword data within the quarter being checked, recorded as keyword data 1, obtain historical keyword data within one year, recorded as keyword data 2. When keyword data 1 or keyword data 2 exceeds the set keyword threshold When the food business is inspected, it will be marked as a heavy inspection;
[0010] Step S4: According to the heavy check marked in step S5, the keyword threshold is exceeded Extract information of the corresponding food raw material supplier, calculate the risk value of the raw material supplier, and record the result as food safety assessment value 2;
[0011] Step S5, comprehensively calculating the food safety assessment value 1 obtained by the personalized inspection method and the food safety assessment value 2 obtained by calculating the risk value of the raw material supplier, and the comprehensive calculation result is expressed as the final food safety assessment value of the inspected food enterprise;
[0012] Step S6: Setting food safety assessment threshold Associate the knowledge base with the entry. When the final food safety assessment value exceeds the set food safety assessment threshold When the inspection is completed, the keyword data is combined with the knowledge base associated with the entries to generate the corresponding rectification strategy for the inspected food enterprise. Finally, the inspection data and rectification strategy are stored and recorded and sent to the inspected food enterprise.
[0013] The specific process of extracting keyword terms and quantities is as follows:
[0014] Step S1-1, using crawler technology to obtain relevant information of the inspected food company from various search engines, social media and online review website platforms;
[0015] Step S1-2: Perform text preprocessing on the information obtained in step S1-1, and use the TextRank algorithm to extract keyword entries and the number of entries, and record them as keyword data. The following formula is used to extract keyword data:
[0016]
[0017] In the formula, γ i Represented as node ω i The weight of δ is expressed as the damping coefficient, In(ω i ) represents all edges pointing to node ω iThe node set, Out(ω j ) is represented by node ω j The set of all outgoing nodes, |Out(ω j )|denoted as node ω j The number of outgoing edges of node ω j The degree.
[0018] The food company data obtained are all public non-commercial secret data, including comments on various platforms, search records, and comments from online shoppers.
[0019] Further, according to the keyword data obtained in step S1, a personalized inspection method matching the inspected food enterprise is generated, and the food safety assessment value generated by the corresponding inspection method is generated using the following formula:
[0020]
[0021] In the formula, ISO 企业 It is expressed as the result value of the personalized inspection of the inspected food enterprise, θ 检测值 It is expressed as the actual inspection value of the inspected food enterprise, θ min Expressed as the minimum value of the inspection standard range, θ max Expressed as the maximum value of the inspection standard range;
[0022] According to the keyword matching corresponding food enterprise problems, generate an adaptive inspection method, and the final result value of the inspected food enterprise is ISO 企业 Recorded as food safety assessment value one.
[0023] Furthermore, keyword thresholds are set based on keyword data corresponding to the company's historical issues. The keyword data obtained in step S1 and the keyword threshold set Make comparisons;
[0024] Keyword data is greater than the keyword threshold When the food business is inspected, it will be marked as a heavy inspection;
[0025] Keyword data is less than the keyword threshold When inspecting a food business, mark it as a routine inspection;
[0026] Routine inspections give priority to personalized targeted inspections generated by keywords, and then inspect items that need to be inspected to improve the efficiency and quality of inspections. The personalized targeted inspections generated by keywords can be used to effectively inspect the weaknesses of the inspected food companies, and the historical data obtained is a comprehensive calculation of the data of the inspected food companies within one year in reverse order.
[0027] Further, step S3 is performed to increase the value greater than the keyword threshold. The raw material supplier information corresponding to the keyword data is extracted, and the risk value of the corresponding raw material supplier is calculated with the risk value of the inspected food enterprise. The raw material supplier risk value calculation uses the following formula:
[0028]
[0029] In the formula, VaR 供应商 It is represented by the risk value of the raw material supplier, n is represented by the number of risk factors between the raw material supplier and the inspected food enterprise, It is represented by the score of the i-th factor of the raw material supplier, m is represented by the number of risk factors of the raw material supplier itself, SC j It is expressed as the score of the j-th risk factor of the raw material supplier itself, W′ j Expressed as the weight of the jth risk factor of the raw material supplier itself, ISO 供应商 It is expressed as food safety assessment value two;
[0030] First, extract the raw material supplier information corresponding to the keyword, calculate the risk value of the raw material supplier itself, incorporate the risk value of the raw material supplier itself into the risk value generated by the cooperation between the food enterprise and the raw material supplier, and calculate the risk value VaR of the raw material supplier. 供应商 Recorded as food safety assessment value 2.
[0031] Further, the food safety assessment value obtained in step S2 is ISO 企业 The food safety assessment value VaR obtained in step S4 供应商 =ISO 供应商 Calculate the final food safety assessment value. The specific calculation formula is as follows
[0032] ISO 总 =ISO 企业 +ISO 供应商
[0033] The final food safety assessment value is ISO 总 It is the sum of the food safety assessment value 1 of the inspected food company and the food safety assessment value 2 calculated as the risk value of the raw material supplier.
[0034] Setting food safety assessment thresholds The final food safety assessment value ISO calculated in step S5 is 总 Food safety assessment thresholds Make comparisons;
[0035] The specific steps for setting the entry-related knowledge base are as follows:
[0036] Collect, organize and clean food safety data, analyze and extract keywords for keyword strategy matching and searching, establish the association between knowledge base and management inspection, design database by sub-library and table to input and store data, create index, maintain and update the entry-related knowledge base; the entry-related knowledge base is the rectification strategy text that matches the corresponding keyword characteristics, and the adapted rectification strategy is searched through keywords;
[0037] when When When the food enterprise is inspected, it means that the inspection is unqualified; and the obtained keyword data is used to match the knowledge base of the entry to the rectification strategy, and finally the keyword data, rectification strategy, ISO 总 , ISO 企业 and ISO 供应商 The records are stored and sent to the inspected food business.
[0038] Further, a food safety data analysis system based on human-computer interaction includes an enterprise data crawler module, a keyword extraction module, an enterprise targeted inspection module, a safety assessment module, a matching strategy module and an enterprise inspection record storage module;
[0039] The enterprise data crawler module includes a policy request unit, an acquisition and parsing unit, and a deduplication storage unit; the policy request unit is used to match corresponding policies for enterprise data sources of different platforms and environments to ensure that the sent HTTP request can successfully obtain a network connection; the acquisition and parsing unit is used to parse and obtain HTML, JSON, pictures, food and other data of the data source after the connection is successful; the deduplication storage unit is used to confirm the uniqueness of each URL to avoid repeated crawling of a data source, and store the data obtained by the acquisition and parsing unit;
[0040] The keyword extraction module includes a text preprocessing unit, a feature extraction unit, a keyword scoring unit and a keyword output unit; the text preprocessing unit is used to convert the crawled original text into a suitable keyword extraction format and perform word segmentation and redundancy removal on the text; the feature extraction unit is used to perform feature extraction on the text after the preprocessing unit, and extract the relationship between the frequently appearing words and the word vectors; the keyword scoring unit performs statistical records on the frequently appearing words in the text, and performs key word search on the relationship described in the text, and scores the words that meet the conditions, and the higher the score, the more critical the word is in the text; the keyword output unit is used to extract the words screened out by the keyword scoring, convert them into visual text data, and output them to the keyword extraction module;
[0041] The enterprise targeted inspection module includes a keyword matching unit and a targeted inspection interface unit; the keyword matching unit is used to match all inspection methods of the corresponding food enterprise after identifying the keyword to generate a targeted inspection method; the targeted inspection interface unit is used to call out the corresponding indicator interface that needs to be inspected according to the generated targeted inspection method, and one interface realizes multiple adapted targeted inspection methods;
[0042] The safety assessment module includes a raw material supplier risk assessment unit and an enterprise food safety assessment unit; the raw material supplier risk assessment unit is used to evaluate the raw material supplier risk assessment calculation associated with the keyword, calculate it according to the raw material supplier's own risk factors, and use the calculation result as a cooperative risk factor for the cooperative risk calculation; the enterprise food safety assessment unit is used to evaluate the enterprise's own food safety and the risk calculation jointly generated by the enterprise and the raw material supplier, and uses the result calculated by the raw material supplier risk assessment unit as a risk factor to make a comprehensive food safety assessment on the inspection results.
[0043] The matching strategy module includes a keyword key unit and a strategy adaptation output unit; the keyword key unit is used to bind the input keyword to a key and use the key to enter the entry-related knowledge base; the strategy adaptation output unit is used to extract the rectification strategy for keyword adaptation in the entry-related knowledge base using the key and output the matched rectification strategy;
[0044] The enterprise inspection record storage module includes a data receiving storage unit and an access control unit; the data receiving storage unit is used to receive data output by each module and store the received data; the access control unit is used to set access rights and protect the data stored in the data receiving storage unit.
[0045] The system crawls food company data, extracts keywords to generate corresponding inspection methods for the company itself, conducts risk assessment on the inspection results of the inspection method, and then calculates the risks of raw material suppliers that meet the conditions. Finally, it comprehensively judges the comprehensive food safety assessment value of the inspected food company, and generates an adaptive adjustment strategy based on the knowledge base associated with the keyword threshold entry.
[0046] Compared with the prior art, the beneficial effects achieved by the present invention are as follows: the present invention crawls the data of the enterprise, extracts keywords, generates personalized and targeted inspection methods based on the keywords, and performs risk calculations on food enterprises and raw material suppliers that meet the conditions, and finally calculates the final food safety assessment value of the inspected food enterprise based on the food enterprises and raw material suppliers. The personalized and targeted inspection method generated by keywords effectively improves the inspection efficiency, enhances the accuracy and effectiveness of the inspection results, and effectively improves the quality of the inspection, avoiding the problem of inspecting unnecessary items and not inspecting important items. Through the comprehensive evaluation of food enterprise evaluation and raw material supplier evaluation, the food safety identification capability, the accuracy of the evaluation, the compliance of food enterprises and the trust of consumers, as well as the timeliness and effectiveness of the adjustment strategies of food enterprises are effectively improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:
[0048] Figure 1 It is a flow chart of a food safety data analysis method based on human-computer interaction of the present invention;
[0049] Figure 2 It is a schematic diagram of a keyword extraction process of a food safety data analysis method based on human-computer interaction of the present invention;
[0050] Figure 3 It is a module connection diagram of a food safety data analysis system based on human-computer interaction of the present invention. DETAILED DESCRIPTION
[0051] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. 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 creative work are within the scope of protection of the present invention.
[0052] See also Figure 1 The present invention provides a technical solution: a food safety data analysis system and method based on human-computer interaction
[0053] Step S1, obtaining the search information, evaluation information and online comment information of the inspected food enterprise in the inspected quarter, and extracting the keyword entries corresponding to the inspected food enterprise in the inspected quarter, as well as the number of corresponding keyword entries, and recording the keyword entries and the number of corresponding keyword entries as keyword data;
[0054] Step S1-1, using crawler technology to obtain relevant information of the inspected food company from various search engines, social media and online review website platforms;
[0055] Step S1-2: Perform text preprocessing on the information obtained in step S1-1, and use the TextRank algorithm to extract keyword entries and the number of entries, and record them as keyword data. The following formula is used to extract keyword data:
[0056]
[0057] In the formula, γ i Represented as node ω i The weight of δ is expressed as the damping coefficient, In(ω i ) represents all edges pointing to node ω i The node set, Out(ω j ) is represented by node ω j The set of all outgoing nodes, |Out(ω j )|denoted as node ω j The number of outgoing edges of node ω j The degree.
[0058] For example, the crawled text data is "Red Panda Biscuits are the specialty products of Food Company A, and this biscuit is very popular among students!".
[0059] After preprocessing the text, we get “Red Panda Biscuits, a specialty product of Food Company A, loved by students”;
[0060] Construct a text graph, that is, "Red Panda Biscuits, Food Company A", "Food Company A, Featured Products", "Featured Products, Popular", "Popular, Students", "Students, Love";
[0061] Set the initial weights to 1 and the damping coefficient δ to 0.85, according to the formula:
[0062]
[0063]
[0064] Using recursive calls, the weights of each word after several iterations are: Red Panda Biscuits is 1.3, Food Company A is 1.4, Featured Products is 0.9, Popular is 0.8, Students is 1.0, and Favorite is 0.9; finally the keywords "Red Panda Biscuits, Food Company A" are extracted.
[0065] Step S2, generating a personalized inspection method for the inspected food enterprise through the keyword data contained in the inspected food enterprise, inspecting the inspected food enterprise, and recording the inspection result as food safety assessment value 1;
[0066] Step S3: Set the keyword threshold to Obtain keyword data within the quarter being checked, recorded as keyword data 1, obtain historical keyword data within one year, recorded as keyword data 2. When keyword data 1 or keyword data 2 exceeds the set keyword threshold When the food business is inspected, it will be marked as a heavy inspection;
[0067] Step S4: According to the heavy check marked in step S5, the keyword threshold is exceeded Extract information of the corresponding food raw material supplier, calculate the risk value of the raw material supplier, and record the result as food safety assessment value 2;
[0068] Step S5, comprehensively calculating the food safety assessment value 1 obtained by the personalized inspection method and the food safety assessment value 2 obtained by calculating the risk value of the raw material supplier, and the comprehensive calculation result is expressed as the final food safety assessment value of the inspected food enterprise;
[0069] Step S6: Setting food safety assessment threshold Associate the knowledge base with the entry. When the final food safety assessment value exceeds the set food safety assessment threshold When the inspection is completed, the keyword data is combined with the knowledge base associated with the entries to generate the corresponding rectification strategy for the inspected food enterprise. Finally, the inspection data and rectification strategy are stored and recorded and sent to the inspected food enterprise.
[0070] The specific steps for setting up the entry-related knowledge base are as follows:
[0071] Collect, organize and clean food safety data, analyze and extract keywords for keyword strategy matching and searching, establish the association between knowledge base and management inspection, design database by sub-library and table to input and store data, create indexes, and maintain and update the knowledge base associated with entries;
[0072] According to the keyword data obtained in step S1, a personalized inspection method matching the inspected food enterprise is generated, and the food safety assessment value generated by the corresponding inspection method is generated using the following formula:
[0073]
[0074] In the formula, ISO 企业 It is expressed as the result value of the personalized inspection of the inspected food enterprise, θ 检测值 It is expressed as the actual inspection value of the inspected food enterprise, θmin Expressed as the minimum value of the inspection standard range, θ max Expressed as the maximum value of the inspection standard range, the result value of the inspected food enterprise ISO 企业 Recorded as food safety assessment value one.
[0075] For example, the inspection standard range is 98 to 100, and the inspection value of the inspected food enterprise is 99.05. Using the calculation formula of food safety assessment value 1, we can get:
[0076]
[0077] The final food safety assessment value of the inspected food company was 2.105.
[0078] Setting keyword thresholds The keyword data obtained in step S1 and the keyword threshold set Compare; when the keyword data is greater than the keyword threshold When the keyword data is less than the keyword threshold, the inspected food enterprise will be marked as a heavy inspection. When conducting a routine inspection, the inspected food business will be marked as a routine inspection.
[0079] Extract raw material supplier information for keywords that meet the conditions, and calculate the risk value of raw material suppliers using the following formula:
[0080]
[0081] In the formula, VaR 供应商 It is represented by the risk value of the raw material supplier, n is represented by the number of risk factors between the raw material supplier and the inspected food enterprise, It is represented by the score of the i-th factor of the raw material supplier, m is represented by the number of risk factors of the raw material supplier itself, SC j It is expressed as the score of the j-th risk factor of the raw material supplier itself, W′ j Expressed as the weight of the jth risk factor of the raw material supplier itself, ISO 供应商 Expressed as food safety assessment value 2, the risk value VaR of the raw material supplier will be calculated 供应商 Recorded as food safety assessment value 2.
[0082] For example, the financial stability weight of raw material supplier B is 0.3, the delivery capability weight is 0.25, the quality weight is 0.2, the compliance weight is 0.15, and the cooperation history weight is 0.1. The standardized corresponding values of raw material supplier B are: financial stability 0.8, delivery capability 0.9, quality 0.85, compliance 0.95, and cooperation history 0.9. The formula is used to calculate the food safety assessment value 2 of food company A and raw material supplier B. The calculation process is as follows:
[0083] VaR 供应商 =ISO 供应商 =0.3×0.8+0.25×0.9+0.2×0.85+0.15×0.95+0.1×0.9=0.855
[0084] The final food safety assessment value is ISO 总 The calculation of is as follows:
[0085] ISO 总 =ISO 企业 +ISO 供应商 =2.105+0.855=2.96
[0086] Finally, the final food safety assessment value ISO of food company A is calculated. 总 It is 2.96.
[0087] Setting food safety assessment thresholds The final food safety assessment value ISO calculated in step S5 is compared with the food safety assessment threshold Make comparisons;
[0088] when When When the food enterprise is inspected, it means that the inspection is unqualified; and the obtained keyword data is used to match the knowledge base of the entry to the rectification strategy, and finally the keyword data, rectification strategy, ISO 总 , ISO 企业 and ISO 供应商 The records are stored and sent to the inspected food company to complete the inspection of the food company.
[0089] For example, setting food safety assessment thresholds is 2.5, then the final food safety assessment value of food company A is ISO 总 If the product is unqualified, the keyword "Red Panda Biscuits, Food Company A" is matched with the entry-related knowledge base to adjust the strategy, and the adjustment strategy is "Please adjust the processing procedures and food parameters of noodle-made food, and confirm the quality of the raw materials!";
[0090] Send to business:
[0091] Keywords: "Red Panda Biscuits, Food Company A"
[0092] Adjustment strategy: Please adjust the food processing procedures and food parameters, and confirm whether there are any problems with the quality of the food! The parameters are as follows:
[0093] Flour: protein content between 8-12%;
[0094] pH value: between 6.5 and 7.5;
[0095] Total sugar content: between 20-40% depending on the type of biscuit;
[0096] Fat content: between 10-20%, depending on recipe and type;
[0097] Protein content: between 5-10%;
[0098] Total colony count: should comply with national food safety standards, such as no more than 10^4 CFU per gram;
[0099] Coliform bacteria: no more than 10 CFU per gram;
[0100] Mold and yeast: no more than 100 CFU per gram;
[0101] Pathogenic bacteria: such as Salmonella, Staphylococcus aureus, etc., should be not detected";
[0102] ISO 总 =2.96;
[0103] ISO 企业 =2.105;
[0104] ISO 供应商 =0.855;
[0105] A food safety data analysis system based on human-computer interaction includes an enterprise data crawler module, a keyword extraction module, an enterprise targeted inspection module, a safety assessment module, a matching strategy module and an enterprise inspection record storage module;
[0106] The enterprise data crawler module includes a policy request unit, an acquisition and parsing unit, and a deduplication storage unit; the policy request unit is used to match corresponding policies for enterprise data sources of different platforms and environments to ensure that the sent HTTP request can successfully obtain a network connection; the acquisition and parsing unit is used to parse and obtain HTML, JSON, pictures, food and other data of the data source after the connection is successful; the deduplication storage unit is used to confirm the uniqueness of each URL to avoid repeated crawling of a data source, and store the data obtained by the acquisition and parsing unit;
[0107] The keyword extraction module includes a text preprocessing unit, a feature extraction unit, a keyword scoring unit and a keyword output unit; the text preprocessing unit is used to convert the crawled original text into a suitable keyword extraction format and perform word segmentation and redundancy removal on the text; the feature extraction unit is used to perform feature extraction on the text after the preprocessing unit, and extract the relationship between the frequently appearing words and the word vectors; the keyword scoring unit performs statistical records on the frequently appearing words in the text, and performs key word search on the relationship described in the text, and scores the words that meet the conditions, and the higher the score, the more critical the word is in the text; the keyword output unit is used to extract the words screened out by the keyword scoring, convert them into visual text data, and output them to the keyword extraction module;
[0108] The enterprise targeted inspection module includes a keyword matching unit and a targeted inspection interface unit; the keyword matching unit is used to match all inspection methods of the corresponding food enterprise after identifying the keyword to generate a targeted inspection method; the targeted inspection interface unit is used to call out the corresponding indicator interface that needs to be inspected according to the generated targeted inspection method, and one interface realizes multiple adapted targeted inspection methods;
[0109] The safety assessment module includes a raw material supplier risk assessment unit and an enterprise food safety assessment unit; the raw material supplier risk assessment unit is used to evaluate the raw material supplier risk assessment calculation associated with the keyword, calculate it according to the raw material supplier's own risk factors, and use the calculation result as a cooperative risk factor for the cooperative risk calculation; the enterprise food safety assessment unit is used to evaluate the enterprise's own food safety and the risk calculation jointly generated by the enterprise and the raw material supplier, and uses the result calculated by the raw material supplier risk assessment unit as a risk factor to make a comprehensive food safety assessment on the inspection results.
[0110] The matching strategy module includes a keyword key unit and a strategy adaptation output unit; the keyword key unit is used to bind the input keyword to a key and use the key to enter the entry-related knowledge base; the strategy adaptation output unit is used to extract the rectification strategy for keyword adaptation in the entry-related knowledge base using the key and output the matched rectification strategy;
[0111] The enterprise inspection record storage module includes a data receiving storage unit and an access control unit; the data receiving storage unit is used to receive data output by each module and store the received data; the access control unit is used to set access rights and protect the data stored in the data receiving storage unit.
[0112] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.
[0113] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art can still modify the technical solutions described in the aforementioned embodiments or replace some of the technical features therein by equivalents. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A food safety data analysis method based on human-computer interaction, characterized in that: The food safety data analysis method comprises the following steps: Step S1, obtaining the search information, evaluation information and online comment information of the inspected food enterprise in the inspected quarter, and extracting the keyword entries corresponding to the inspected food enterprise in the inspected quarter, as well as the number of corresponding keyword entries, and recording the keyword entries and the number of corresponding keyword entries as keyword data; Step S2, generating a personalized inspection method for the inspected food enterprise through the keyword data contained in the inspected food enterprise, inspecting the inspected food enterprise, and recording the inspection result as food safety assessment value 1; Step S3: Set the keyword threshold to Obtain keyword data within the quarter being checked, recorded as keyword data 1, obtain historical keyword data within one year, recorded as keyword data 2. When keyword data 1 or keyword data 2 exceeds the set keyword threshold When the food business is inspected, it will be marked as a heavy inspection; Step S4: Check the heavy check according to step S3 to see if the keyword threshold is exceeded. Extract information of the corresponding food raw material supplier, calculate the risk value of the raw material supplier, and record the result as food safety assessment value 2; Step S5, comprehensively calculating the food safety assessment value 1 obtained by the personalized inspection method and the food safety assessment value 2 obtained by calculating the risk value of the raw material supplier, and the comprehensive calculation result is expressed as the final food safety assessment value of the inspected food enterprise; Step S6: Setting food safety assessment threshold Associate the knowledge base with the entry. When the final food safety assessment value exceeds the set food safety assessment threshold When the inspection is completed, the keyword data is combined with the knowledge base associated with the entries to generate the corresponding rectification strategy for the inspected food enterprise. Finally, the inspection data and rectification strategy are stored and recorded and sent to the inspected food enterprise.
2. A food safety data analysis method based on human-computer interaction according to claim 1, characterized in that: In step S1, the specific process of extracting the keyword terms and quantities is as follows: Step S1-1, using crawler technology to obtain relevant information of the inspected food company from various search engines, social media and online review website platforms; Step S1-2: Perform text preprocessing on the information obtained in step S1-1, and use the TextRank algorithm to extract keyword entries and the number of entries, and record them as keyword data. The following formula is used to extract keyword data: In the formula, γ i Represented as node ω i The weight of δ is expressed as the damping coefficient, In(ω i ) represents all edges pointing to node ω i The node set, Out(ω j ) is represented by node ω j The set of all outgoing nodes, |Out(ω j )|denoted as node ω j The number of outgoing edges of node ω j The degree.
3. A food safety data analysis method based on human-computer interaction according to claim 2, characterized in that: In step S2, based on the keyword data obtained in step S1, a personalized inspection method matching the inspected food enterprise is generated, and the food safety assessment value generated by the corresponding inspection method is generated using the following formula: In the formula, ISO 企业 It is expressed as the result value of the personalized inspection for the inspected food enterprise. It is expressed as the actual inspection value of the inspected food enterprise. Indicates the minimum value of the inspection standard range, Expressed as the maximum value of the inspection standard range; The result value of the food enterprise to be inspected is ISO 企业 Recorded as food safety assessment value one.
4. A food safety data analysis method based on human-computer interaction according to claim 3, characterized in that: In step S3, the specific process of marking as severe inspection is as follows: Set keyword thresholds based on keyword data corresponding to the company's historical issues The keyword data obtained in step S1 and the keyword threshold set Make comparisons; Keyword data is greater than the keyword threshold When the food business is inspected, it will be marked as a heavy inspection; Keyword data is less than the keyword threshold When conducting a routine inspection, the inspected food business will be marked as a routine inspection.
5. A food safety data analysis method based on human-computer interaction according to claim 4, characterized in that: In step S4, the specific calculation process of the food safety assessment value 2 is as follows: Through step S3, the value greater than the keyword threshold The raw material supplier information corresponding to the keyword data is extracted, and the risk value of the corresponding raw material supplier is calculated with the risk value of the inspected food enterprise. The raw material supplier risk value calculation uses the following formula: In the formula, VaR 供应商 It is represented by the risk value of the raw material supplier, n is represented by the number of risk factors between the raw material supplier and the inspected food enterprise, It is represented by the score of the i-th factor of the raw material supplier, m is represented by the number of risk factors of the raw material supplier itself, SC j It is expressed as the score of the j-th risk factor of the raw material supplier itself, W j ' represents the weight of the jth risk factor of the raw material supplier itself, ISO 供应商 It is expressed as food safety assessment value two; The risk value VaR of the raw material supplier will be calculated 供应商 Recorded as food safety assessment value 2.
6. A food safety data analysis method based on human-computer interaction according to claim 5, characterized in that: In step S5, the specific calculation process of the final food safety assessment value is as follows: The food safety assessment value obtained in step S2 is ISO 企业 The food safety assessment value VaR obtained in step S4 供应商 =ISO 供应商 Calculate the final food safety assessment value. The specific calculation formula is as follows: BIG 总 =ISO 企业 +ISO 供应商 The final food safety assessment value is ISO 总 The value is a comprehensive calculation of the food safety assessment value of the inspected food enterprise and the risk value calculation result of the raw material supplier.
7. A food safety data analysis method based on human-computer interaction according to claim 6, characterized in that: In step S6, the food safety assessment threshold is set The final food safety assessment value ISO calculated in step S5 is 总 Food safety assessment thresholds Make comparisons; The specific steps of setting the term-related knowledge base are as follows: Collect, organize and clean food safety data, analyze and extract keywords for keyword strategy matching and searching, establish the association between knowledge base and management inspection, design database by sub-library and table to input and store data, create indexes, and maintain and update the knowledge base associated with entries; when When When the food enterprise is inspected, it means that the food enterprise under inspection has failed the inspection; The obtained keyword data is used to match the knowledge base associated with the entry to the rectification strategy, and finally the keyword data, rectification strategy, ISO 总 , ISO 企业 and ISO 供应商 The records are stored and sent to the inspected food business.
8. A food safety data analysis system based on human-computer interaction, applied to a food safety data analysis method based on human-computer interaction according to any one of claims 1 to 7, characterized in that: The food safety data analysis system includes an enterprise data crawler module and a keyword extraction module; The enterprise data crawler module includes a policy request unit, an acquisition and parsing unit, and a deduplication storage unit; the policy request unit is used to match corresponding policies for enterprise data sources of different platforms and environments to ensure that the sent HTTP request can successfully obtain a network connection; the acquisition and parsing unit is used to parse and obtain HTML, JSON, pictures, food and other data of the data source after the connection is successful; the deduplication storage unit is used to confirm the uniqueness of each URL to avoid repeated crawling of a data source, and store the data obtained by the acquisition and parsing unit; The keyword extraction module includes a text preprocessing unit, a feature extraction unit, a keyword scoring unit and a keyword output unit; the text preprocessing unit is used to convert the crawled original text into a suitable keyword extraction format and perform word segmentation and redundancy removal on the text; the feature extraction unit is used to perform feature extraction on the text after the preprocessing unit, and extract the relationship between high-frequency words and words, as well as word vectors; the keyword scoring unit performs statistical records on the high-frequency words in the text, and performs key word search on the relationship described in the text, and scores the words that meet the conditions, and the higher the score, the more critical the word is in the text; the keyword output unit is used to extract the words screened out by the keyword scoring, convert them into visual text data, and output them to the keyword extraction module.
9. A food safety data analysis system based on human-computer interaction according to claim 8, characterized in that: The food safety data analysis system also includes an enterprise-specific inspection module and a safety assessment module; The enterprise targeted inspection module includes a keyword matching unit and a targeted inspection interface unit; the keyword matching unit is used to match all inspection methods of the corresponding food enterprise after identifying the keyword to generate a targeted inspection method; the targeted inspection interface unit is used to call out the corresponding indicator interface that needs to be inspected according to the generated targeted inspection method, and one interface realizes multiple adapted targeted inspection methods; The safety assessment module includes a raw material supplier risk assessment unit and an enterprise food safety assessment unit; the raw material supplier risk assessment unit is used to evaluate the raw material supplier risk assessment calculation associated with the keyword, calculate it according to the raw material supplier's own risk factors, and the calculation result is used as the cooperation risk factor for cooperation risk calculation; The enterprise food safety assessment unit is used to assess the enterprise's own food safety and the risk calculation jointly generated by the enterprise and the raw material supplier. The results calculated by the raw material supplier risk assessment unit are used as risk factors to make a comprehensive food safety assessment of the inspection results.
10. A food safety data analysis system based on human-computer interaction according to claim 8, characterized in that: The food safety data analysis system also includes a matching strategy module and an enterprise inspection record storage module; The matching strategy module includes a keyword key unit and a strategy adaptation output unit; the keyword key unit is used to bind the input keyword to a key and use the key to enter the entry-related knowledge base; the strategy adaptation output unit is used to extract the rectification strategy for keyword adaptation in the entry-related knowledge base using the key and output the matched rectification strategy; The enterprise inspection record storage module includes a data receiving storage unit and an access control unit; The data receiving storage unit is used to receive data output by each module and store the received data; the access control unit is used to set access rights and protect the data stored in the data receiving storage unit.
Citation Information
Patent Citations
Food safety risk assessment method and system
CN118134260A
Cooperative supervision method and system for food safety, electronic equipment and medium
CN118134432A
Identification code data updating method and system based on food safety collaborative inspection system
CN118365392A
Cited By
Food safety prediction method and system based on food sampling inspection monitoring qualification report
CN119721856A
