Detection report generation method and system, electronic equipment and storage medium

By cleaning and feature extraction of food testing data, efficient and accurate food testing reports are generated, which solves the problems of low data processing efficiency and long report production time in the prior art, and improves the response speed of food safety analysis.

CN119941004APending Publication Date: 2025-05-06深圳市农产品质量安全检验检测中心(深圳市动植物疫病预防控制中心) +2
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411847952.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-16
Publication Date
2025-05-06

AI Technical Summary

Technical Problem

During the production of existing food testing and analysis reports, data processing efficiency is low and there is a lot of repetitive labor, which leads to a long time in the production of the report, which is unable to quickly respond to food safety analysis needs and increase public health risks.

Method used

A method and system for generating inspection report is proposed to generate accurate, professional and targeted food inspection reports by cleaning, extracting, generating and fusion of original food inspection data.

Benefits of technology

It improves the processing efficiency of food testing data, shortens the report production time, improves the efficiency of food testing analysis in response to food safety analysis, and reduces public health risks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119941004A_ABST
    Figure CN119941004A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a detection report generation method and system, electronic equipment and a storage medium, and belongs to the technical field of data processing. The method comprises the following steps: firstly, acquiring original food detection data of food to be detected, performing data cleaning processing on the original food detection data to obtain target food detection data, and performing feature extraction on the target food detection data to obtain basic quality features and deep exploration features; then, report generation demand information is obtained, a first food detection report is generated according to the report generation template, the report generation demand information, the basic quality features and the deep exploration features, and a second food detection report is generated according to the food safety detection database, the report generation demand information, the basic quality features and the deep exploration features; and fusing the first food detection report and the second food detection report into a target food detection report. According to the embodiment of the invention, the processing efficiency of the food detection data and the making efficiency of the food detection report can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a test report generation method and system, an electronic device and a storage medium. Background Art

[0002] In the existing food inspection and analysis report production process, data analysts need to organize food inspection data from different sources and produce food inspection and analysis reports according to different needs. However, the original food inspection data required for report production usually has the characteristics of large data volume and wide sources, which makes it difficult to process the original food inspection data volume. In addition, there is a lot of repetitive work in the data processing process, which makes the processing efficiency of the original food inspection data low. In addition, the format specifications and production requirements of each food inspection and analysis report are different, which will make the production time of food inspection and analysis reports longer, which may make it difficult for the report to meet the needs of timely response to food safety analysis, and may delay the notification of food safety issues and the implementation of corresponding control measures, thereby increasing public health risks.

[0003] Therefore, how to improve the processing efficiency of raw food inspection data and reduce the time of producing food inspection and analysis reports to improve the efficiency of food inspection and analysis in response to food safety analysis has become a technical problem that needs to be solved urgently. Summary of the invention

[0004] The main purpose of the embodiments of the present application is to propose a test report generation method and system, an electronic device and a storage medium, aiming to improve the processing efficiency of raw food test data and reduce the time for producing food test and analysis reports, so as to improve the efficiency of food test and analysis response to food safety analysis.

[0005] To achieve the above-mentioned purpose, a first aspect of an embodiment of the present application proposes a method for generating a test report, the method comprising: Obtaining original food testing data of the food to be tested; Performing data cleaning on the original food detection data to obtain target food detection data; Extracting features from the target food detection data to obtain food data features; wherein the food data features include: basic quality features and deep exploration features, the basic quality features characterizing the quality of the food to be detected, and the deep exploration features characterizing the distribution pattern, change trend of each target food detection data and the correlation between at least two target food detection data; Obtain report generation requirement information; Generate a report according to a preset report generation template, the report generation requirement information, the basic quality characteristics and the deep exploration characteristics to obtain a first food testing report; Generate a report according to a preset food safety testing database, the report generation requirement information, the basic quality characteristics and the deep exploration characteristics to obtain a second food testing report; The first food detection report and the second food detection report are merged to obtain a target food detection report of the food to be detected.

[0006] In some embodiments, performing data cleaning on the raw food detection data to obtain target food detection data includes: Performing abnormal data detection on the original food detection data to obtain abnormal detection information; selecting target cleaning data from the original food detection data according to the abnormality detection information; The target cleaned data is cleaned according to a preset abnormal data cleaning rule to obtain preliminary cleaned data; wherein the preliminary cleaned data includes a target classification label; Classify the preliminary cleansed data according to the target classification label to obtain data category information of the preliminary cleansed data; Verify the preliminary cleansed data according to preset data verification rules and the data category information to obtain verification information; The target food detection data is screened out from the preliminary cleaning data according to the verification information; wherein the verification information of the target food detection data represents that the data category passes the data verification rule.

[0007] In some embodiments, the cleaning process of the target cleaned data according to the preset abnormal data cleaning rule to obtain preliminary cleaned data includes: Performing format conversion processing on the target cleansing data according to a preset data format to obtain standard cleansing data; wherein the data formats of the standard cleansing data are the same; Obtaining attribute information of the food to be tested; Obtaining original classification labels of the standard cleaned data; Selecting the target classification label from preset candidate classification labels according to the attribute information; The original classification label of the target cleaned data is replaced according to the target classification label to obtain preliminary cleaned data.

[0008] In some embodiments, after verifying the preliminary cleansed data according to the preset data verification rule and the data category information to obtain verification information, the method further includes: Selected test data is screened out from the preliminary cleansed data according to the verification information; wherein the verification information of the selected test data indicates that the data category information does not pass the data verification rule; The abnormal data cleaning rules are optimized according to the selected detection data and the target food detection data.

[0009] In some embodiments, the report generation requirement information includes first format requirement information and first data requirement information, and the report generation is performed according to a preset report generation template, the report generation requirement information, the basic quality characteristics and the deep exploration characteristics to obtain a first food detection report, including: Filtering a first target report template from the report generation templates according to the first format requirement information; Selecting a target detection feature from the basic quality feature and the deep exploration feature according to the first data requirement information; The target detection feature is imported into the first target report template to obtain the first food detection report.

[0010] In some embodiments, the report generation requirement information further includes second format requirement information and second data requirement information, and the report generation is performed according to the preset food safety detection database, the report generation requirement information, the basic quality characteristics and the deep exploration characteristics to obtain the second food detection report, including: Filtering out a second target report template from the report generation template according to the second format requirement information; selecting a candidate detection feature from the basic quality feature and the deep exploration feature according to the second data demand information; Extracting historical detection data of the candidate detection feature from a preset food safety detection database according to the candidate detection feature; wherein the food safety detection database stores at least one of the following data of the food to be detected: historical food safety problem data, problem food detection data or problem food analysis data; Performing a problem risk assessment on the candidate detection feature according to the candidate detection feature and the historical detection data to obtain problem risk assessment information of the food to be detected; The problem risk assessment information, the candidate detection features and the historical detection data are imported into the second target report template to generate the second food detection report.

[0011] In some embodiments, after the first food test report and the second food test report are merged to obtain the target food test report of the food to be tested, the method further includes: Correcting the target food test report according to the target food test data to obtain a preliminary corrected test report; Performing content correction on the preliminary correction detection report according to a preset correction operation to obtain a candidate correction detection report; wherein the correction operation includes at least one of the following: logic correction, text correction, and image correction; Performing a completeness check on the candidate calibration test report to obtain completeness information; The candidate correction detection report is modified according to the completeness information to obtain a target correction detection report.

[0012] To achieve the above-mentioned purpose, a second aspect of an embodiment of the present application proposes a test report generation system, the system comprising: A data acquisition module, used to acquire original food testing data of the food to be tested; A data cleaning module, used to perform data cleaning processing on the original food detection data to obtain target food detection data; A feature extraction module, used to extract features from the target food detection data to obtain food data features; wherein the food data features include: basic quality features and deep exploration features, the basic quality features characterizing the quality of the food to be detected, and the deep exploration features characterizing the distribution pattern, change trend of each target food detection data and the correlation between at least two target food detection data; Demand acquisition module, used to obtain report generation demand information; A first report generation module, configured to generate a report according to a preset report generation template, the report generation requirement information, the basic quality characteristics and the deep exploration characteristics, to obtain a first food testing report; A second report generating module, configured to generate a report according to a preset food safety testing database, the report generating requirement information, the basic quality characteristics and the deep exploration characteristics, to obtain a second food testing report; The report fusion module is used to fuse the first food detection report and the second food detection report to obtain a target food detection report of the food to be detected.

[0013] To achieve the above-mentioned purpose, the third aspect of an embodiment of the present application proposes an electronic device, which includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the method described in the first aspect is implemented.

[0014] To achieve the above-mentioned purpose, the fourth aspect of an embodiment of the present application proposes a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described in the first aspect is implemented.

[0015] The test report generation method and system, electronic device and storage medium proposed in this application, firstly, the original food test data of the food to be tested is quickly cleaned to obtain accurate and available target food test data, so as to improve data processing efficiency. Then, by extracting the features of the target food test data, the basic quality features that can directly reflect the quality status of the food and the distribution pattern, change trend, and the depth exploration features of the correlation between different data are obtained, and the first food test report that directly reflects the quality status and the second food test report that integrates the data in the food safety detection database are generated respectively using the basic quality features and the depth exploration features, so that the food test report with accuracy, professionalism and pertinence can be generated. Finally, by integrating the first food test report and the second food test report, the target food test report is obtained, and compared with the artificially made food test report, the test report generation method indicated in the embodiment of this application can quickly generate the target food test report, shorten the time of report production, and can ensure the accuracy of the food test report, so as to improve the speed of the food test analysis report in response to the food test task, and provide efficient support for quickly determining whether the food to be tested has food safety problems, thereby improving the efficiency of food safety management. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 This is an optional flowchart of the test report generation method provided in the embodiment of the present application; Figure 2 yes Figure 1 Flow chart of step S102 in FIG. Figure 3 yes Figure 2 Flow chart of step S203 in FIG. Figure 4 This is another optional flow chart of the test report generation method provided in the embodiment of the present application; Figure 5 yes Figure 1 Flow chart of step S105 in FIG. Figure 6 yes Figure 1 Flow chart of step S106 in FIG. Figure 7 This is another optional flow chart of the test report generation method provided in the embodiment of the present application; Figure 8 It is a structural schematic diagram of a test report generating system provided in an embodiment of the present application; Fig. 9 It is a schematic diagram of the hardware structure of the electronic device provided in the embodiment of the present application. DETAILED DESCRIPTION

[0017] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0018] It should be noted that, although the functional modules are divided in the system schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the system or the order in the flowchart. The terms "first", "second", etc. in the specification, claims and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0019] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

[0020] First, some nouns involved in this application are analyzed: Artificial intelligence (AI) is a new technical science that studies and develops theories, methods, technologies and application systems for simulating, extending and expanding human intelligence. AI is a branch of computer science that attempts to understand the essence of intelligence and produce a new type of intelligent machine that can respond in a similar way to human intelligence. Research in this field includes robotics, speech recognition, image recognition, natural language processing and expert systems. AI can simulate the information process of human consciousness and thinking. AI is also a 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 knowledge to obtain the best results.

[0021] Natural language processing (NLP): NLP uses computers to process, understand and apply human languages ​​(such as Chinese, English, etc.). NLP is a branch of artificial intelligence and an interdisciplinary subject between computer science and linguistics. It is often referred to as computational linguistics. Natural language processing includes grammatical analysis, semantic analysis, and text understanding. Natural language processing is often used in technical fields such as machine translation, handwritten and printed character recognition, speech recognition and text-to-speech conversion, information intent recognition, information extraction and filtering, text classification and clustering, public opinion analysis and opinion mining. It involves data mining related to language processing, machine learning, knowledge acquisition, knowledge engineering, artificial intelligence research, and linguistic research related to language computing.

[0022] Large Language Model (LLM): LLM is a type of advanced artificial intelligence technology that is based on the principles of deep learning. It can understand and generate natural language by training on large amounts of text data, and can capture the complex patterns and structures of language. LLM can perform a variety of language tasks and is often used in technical fields such as text generation, translation, question answering, and text summarization. LLM usually requires prompts to guide it to understand and process a series of instructions or questions for input information and generate specific outputs. The prompt is usually a piece of text that can help the model understand the intent of the task more accurately, thereby producing more relevant and accurate outputs. For example, in the generation of food or agricultural product quality inspection reports, the prompt can contain specific queries or analysis requirements for the data. LLM analyzes the data based on these instructions and generates the corresponding report content. The data format for prompts to guide the LLM model to perform language tasks is as follows: Instruction: [instruction]; Input: [input]; Response: [Response].

[0023] In the traditional process of compiling food testing and analysis reports, data analysts face the challenge of integrating a large amount of food testing data from multiple channels and need to customize reports based on diverse needs. However, these raw data are not only huge in quantity but also complex in source, which increases the difficulty of data processing and leads to a large amount of repetitive work, thus reducing the efficiency of data processing. In addition, since each report has its own specific format and specification requirements, it takes a long time to compile the report, which not only makes it difficult to achieve a rapid response to food safety analysis, but also may delay the notification of food safety issues and the implementation of control measures, increasing the risk to public health.

[0024] Based on this, the embodiments of the present application provide a test report generation method and system, an electronic device and a storage medium, aiming to improve the processing efficiency of raw food test data, shorten the report production time, and thereby improve the efficiency of food test analysis response to food safety analysis.

[0025] The test report generation method and system, electronic device and storage medium provided in the embodiments of the present application are specifically described through the following embodiments. First, the test report generation method in the embodiments of the present application is described.

[0026] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Artificial Intelligence (AI) 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 knowledge to obtain the best results.

[0027] AI basic technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. AI software technologies mainly include computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning.

[0028] The test report generation method provided in the embodiment of the present application relates to the field of data processing technology. The test report generation method provided in the embodiment of the present application can be applied to a terminal, can also be applied to a server side, and can also be software running in a terminal or a server side. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, etc.; the server side can be configured as an independent physical server, or a server cluster or a distributed system composed of multiple physical servers, and can also be configured to provide cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and cloud servers for basic cloud computing services such as big data and artificial intelligence platforms; the software can be an application for implementing the test report generation method, etc., but is not limited to the above forms.

[0029] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.

[0030] Figure 1 is an optional flowchart of the test report generation method provided in the embodiment of the present application. Figure 1 The method may include but is not limited to steps S101 to S107.

[0031] Step S101, obtaining original food testing data of the food to be tested; Step S102, performing data cleaning processing on the original food detection data to obtain target food detection data; Step S103, extracting features from the target food detection data to obtain food data features; wherein the food data features include: basic quality features and deep exploration features, the basic quality features characterizing the quality of the food to be detected, and the deep exploration features characterizing the distribution pattern, change trend of each target food detection data and the correlation between at least two target food detection data; Step S104, obtaining report generation requirement information; Step S105, generating a report according to a preset report generation template, report generation requirement information, basic quality features, and deep exploration features to obtain a first food testing report; Step S106, generating a report according to a preset food safety testing database, report generation requirement information, basic quality characteristics and deep exploration characteristics to obtain a second food testing report; Step S107, merging the first food test report and the second food test report to obtain a target food test report of the food to be tested.

[0032] Steps S101 to S107 shown in the embodiment of the present application, firstly, by quickly cleaning the original food detection data of the food to be detected, accurate and available target food detection data are obtained to improve data processing efficiency. Then, by extracting features from the target food detection data, the basic quality features that can directly reflect the quality status of the food and the distribution pattern, change trend, and the depth exploration features of the correlation between different data are obtained, and the first food detection report that directly reflects the quality status and the second food detection report that integrates the data in the food safety detection database are generated using the basic quality features and the depth exploration features, respectively, to generate a food detection report with accuracy, professionalism and pertinence. Finally, by fusing the first food detection report and the second food detection report, the target food detection report is obtained, compared to the artificially made food detection report, the detection report generation method shown in the embodiment of the present application can quickly generate the target food detection report, shorten the time of report production, and can ensure the accuracy of the food detection report, thereby improving the speed of the food detection analysis report in response to the food detection task, for quickly determining whether the food to be detected has food safety problems and hidden dangers provide efficient support, and then improve the efficiency of food safety management.

[0033] After step S101 in some embodiments, the test report generation method illustrated in the embodiments of the present application may also perform cleaning processing on the original test data. For example, the operation steps of cleaning the original test data may include but are not limited to at least one of the following: converting the text content of the original test data into a consistent encoding format and uppercase form, or removing meaningless symbols and blank characters in the original test data.

[0034] See also Figure 2 In some embodiments, step S102 may include but is not limited to steps S201 to S206: Step S201, performing abnormal data detection on the original food detection data to obtain abnormal detection information; Step S202, selecting target cleaning data from the original food detection data according to the abnormality detection information; Step S203, cleaning the target cleaned data according to the preset abnormal data cleaning rules to obtain preliminary cleaned data; wherein the preliminary cleaned data includes the target classification label; Step S204, classifying the preliminary cleansed data according to the target classification label to obtain data category information of the preliminary cleansed data; Step S205, verifying the preliminary cleansed data according to preset data verification rules and data category information to obtain verification information; Step S206, filtering out target food detection data from the preliminary cleansing data according to the verification information; wherein the verification information of the target food detection data represents that the data category passes the data verification rule.

[0035] In step S201 of some embodiments, the original food detection data can be subjected to abnormal data detection through a large language model (LLM) guided by a prompt to obtain abnormal data detection information. Specifically, firstly, an abnormal data detection prompt is designed, and the abnormal data detection prompt includes but is not limited to: a description of abnormal data and abnormal data detection instructions. Then, the LLM is guided by the abnormal data detection prompt to perform abnormal data detection to obtain abnormal data detection information. Taking agricultural product quality data as the original food detection data as an example, the data format of guiding the LLM to perform abnormal data detection through the abnormal data detection prompt can be expressed as: prompt = "".

[0036] Instruction: abnormal data detection content for agricultural product quality testing; Input: Detect abnormal data; Response: The abnormal situations that need to be handled in agricultural product quality data include: missing data, abnormal values, duplicate record information, and abnormal data classification or unclassified information.

[0037] In step S201 of other embodiments, the original food test data can be preliminarily screened according to the preset preliminary screening rules to obtain the preliminary screening data, and then the LLM guided by the prompt can be used to detect abnormal data to reduce the calculation amount and use cost of the LLM. Specifically, the preset preliminary screening rules can include but are not limited to at least one of the following: data quality check rules, data consistency verification rules, simple threshold test rules or automation rules. The data quality check rules are used to check whether there are missing values ​​or abnormal values ​​in the data set. The data consistency verification rules are used to ensure that the data is consistent from different sources or at different time points, for example: check whether the manufacturer data, detection equipment data or date data of the original food test data are reasonable. The simple threshold test rule is used to quickly detect the original food test data that exceeds the normal range. The specific simple threshold test rule can be actually set according to the needs of those skilled in the art, for example: set the data threshold according to the quality qualified range parameters of the food to be tested, so as to perform a preliminary quality test on the original food test data. The automation rule is used to filter data according to specific conditions or patterns, for example: detect the original food test data containing specific fields.

[0038] In step S203 of some embodiments, the abnormal data cleaning rules may include but are not limited to: data format conversion rules and data classification rules, wherein the data format conversion rules are used to convert the format of the target cleansing data according to a preset data format so that the format of the target cleansing data is the same; the data classification rules are used to reclassify the target cleansing data.

[0039] In some embodiments, the target cleansing data can be cleansed by the LLM guided by the prompt to obtain preliminary cleansing data. Specifically, firstly, an abnormal data cleaning prompt is designed, and the abnormal data cleaning prompt includes instructions for reclassifying the target cleansing data. Then, the target cleansing data is cleansed by the LLM guided by the abnormal data cleaning prompt to obtain preliminary cleansing data. Taking the abnormal data of agricultural products as the target cleansing data as an example, the data format of the target cleansing data cleansed by the LLM guided by the abnormal data cleaning prompt can be expressed as: prompt = "".

[0040] Instruction: Prompt words for cleaning abnormal data for agricultural product quality testing; Input: Cleaning abnormal agricultural product data; Response: Identify spaces, repeated values, and name labels in abnormal agricultural product data, remove spaces, quantifiers, and adjectives in the sample content, and select target classification labels from the "plant products" label, "livestock and poultry products" label, and "aquatic products" label according to the attribute information of the agricultural products to be tested, and replace the original classification labels of the abnormal agricultural product data according to the target classification labels.

[0041] In step S204 of some embodiments, the preliminary cleansed data is classified according to the target classification label to obtain data category information of the preliminary cleansed data. For example, for the preliminary cleansed data "20240719, No. 1 Primary School Canteen, Livestock and Poultry Products", where the target classification label is "Livestock and Poultry Products", "20240719, No. 1 Primary School Canteen, Livestock and Poultry Products" can be classified into the "Livestock and Poultry Products" category according to the target classification label "Livestock and Poultry Products".

[0042] In step S205 of some embodiments, the data verification rules may include but are not limited to category verification rules, and the category verification rules are used to verify whether the current category of the preliminary cleansing data is correct. On this basis, the preliminary cleansing data can be verified according to the preset data verification rules and data category information to obtain verification information. The verification information indicates whether the data category of the preliminary cleansing data passes the data verification rules.

[0043] In step S205 of other embodiments, the data verification rules may also include but are not limited to at least one of the following: accuracy verification rules, integrity verification rules, consistency verification rules or duplicate data verification rules. The accuracy verification rules are used to verify whether the values ​​of the preliminary cleaning data are correct and whether there are errors in the text. The integrity verification rules are used to check whether there are missing values ​​or blank fields in the preliminary cleaning data. The consistency verification rules are used to verify whether the preliminary cleaning data is consistent with the original food inspection data in terms of source information or time point information, for example: whether the preliminary cleaning data is consistent with the manufacturer data, inspection equipment data or date data of the original food inspection data. The duplicate data verification rules are used to verify whether there are duplicate preliminary cleaning data.

[0044] In the steps S201 to S206 shown in the embodiment of the present application, abnormal data detection is performed on the original food detection data to obtain abnormal detection information, and target cleaning data is selected from the original food detection data according to the abnormal detection information. Then, the target cleaning data is cleaned and processed according to the preset abnormal data cleaning rules to obtain preliminary cleaning data; wherein the preliminary cleaning data includes a target classification label; and the preliminary cleaning data is classified and processed according to the target classification label to obtain data category information of the preliminary cleaning data. Finally, the preliminary cleaning data is verified according to the preset data verification rules and data category information to obtain verification information, and the target food detection data is screened out from the preliminary cleaning data according to the verification information; wherein the verification information of the target food detection data represents the data category through the data verification rules. Therefore, the detection report generation method shown in the embodiment of the present application can realize automatic abnormal data detection, cleaning, classification and verification of the original food detection data, obtain accurate and reliable target food detection data, and at the same time improve the data processing efficiency of the original food detection data, which is convenient for subsequent food detection report generation according to the target food detection data.

[0045] See also Figure 3 In some embodiments, step S203 may include but is not limited to steps S301 to S305: Step S301, performing format conversion processing on the target cleansing data according to a preset data format to obtain standard cleansing data; wherein the data formats of the standard cleansing data are the same; Step S302, obtaining the attribute information of the food to be tested; Step S303, obtaining the original classification labels of the standard cleaned data; Step S304, selecting a target classification label from preset candidate classification labels according to the attribute information; Step S305 , replacing the original classification label of the target cleaned data according to the target classification label to obtain preliminary cleaned data.

[0046] In step S301 of some embodiments, the target cleaning data is converted into the same data format, which can ensure the consistency of the data to facilitate the subsequent food data feature extraction, while reducing errors caused by inconsistent formats in the process of generating food inspection reports.

[0047] In step S302 of some embodiments, the attribute information of the food to be tested may include, but is not limited to, at least one of the following: food type information, test application company information, food production address information, or food processing method information.

[0048] In step S303 of some embodiments, the original classification label can be pre-set by a person skilled in the art, or it can be automatically generated during the data cleaning process of the original food detection information, and this application does not impose any specific limitations.

[0049] In step S305 of some embodiments, the original classification label of the target cleaning data can be replaced according to the target classification label to obtain preliminary cleaning data. For example, for the target cleaning data "20210820, Shuiyu Brand Aquatic Products Sales Company, 1500g, Shuiyu Brand Crucian Carp", the original classification label is "Shuiyu Brand Crucian Carp", and the target classification label is "Aquatic Products". The "Shuiyu Brand Crucian Carp" label can be replaced according to the "Aquatic Products" label to obtain preliminary cleaning data "20210820, Shuiyu Brand Aquatic Products Sales Company, 1500g, Aquatic Products".

[0050] In the steps S301 to S305 shown in the embodiment of the present application, the target cleaning data is converted into a standard cleaning data according to a preset data format, wherein the data format of the standard cleaning data is the same. The attribute information of the food to be tested and the original classification label of the standard cleaning data are obtained, and the target classification label is selected from the preset candidate classification labels according to the attribute information, and the original classification label of the target cleaning data is replaced according to the target classification label to obtain preliminary cleaning data.

[0051] The test report generation method illustrated in the embodiment of the present application can realize automatic cleaning of target cleaning data, and obtain preliminary cleaning data with unified format and correct classification labels, so as to ensure the accuracy and availability of the preliminary cleaning data, so that the preliminary cleaning data in a specific classification can be quickly and accurately called in the subsequent feature extraction process, thereby improving the efficiency of data processing of the preliminary cleaning data. Figure 4 In some embodiments, after step S205, the method may further include but is not limited to steps S401 to S402: Step S401, selecting test data from the preliminary cleansing data according to verification information; wherein the verification information of the selected test data indicates that the data category information does not pass the data verification rule; Step S402, optimizing abnormal data cleaning rules according to the selected detection data and target food detection data.

[0052] In step S402 of some embodiments, the abnormal data cleaning rules can be optimized according to the selected detection data and the target food detection data. Specifically, the original classification label and the target classification label corresponding to the target food detection data are first obtained, and then an association relationship is established according to the original classification label and the target classification label, and the data classification rules are updated according to the association relationship, so that when the selected detection data including the original classification label is detected next time, the original classification label can be replaced with the target classification label according to the association relationship to achieve the cleaning process of the selected detection data.

[0053] In step S402 of some other embodiments, the selected detection data may be sampled according to preset sampling rules to obtain sampling information. If the sampling information indicates that the selected detection data does not need to be re-cleaned, the abnormal data cleaning rules are optimized according to the sampling information and the selected detection data to avoid repeated cleaning of the selected detection data. The sampling rules may include but are not limited to any of the following: random sampling, proportional sampling or stratified sampling. The specific sampling rules may be set according to the actual needs of those skilled in the art. The specific sampling process may be performed by a pre-trained artificial intelligence model or manually, and this application is not limited thereto.

[0054] In step S402 of other embodiments, after the selected detection data is manually sampled, the selected detection data may be manually modified to obtain modified detection data. Therefore, the detection report generation method shown in the embodiment of the present application may obtain modified detection data and sampling information, and clean the modified detection data according to the abnormal data cleaning rule. In the case where the modified detection data needs to be cleaned, the abnormal data cleaning rule needs to be optimized according to the modified detection data and the sampling information to avoid deleting the modified detection data as duplicate data.

[0055] After step S402 in some embodiments, the test report generation method illustrated in the embodiments of the present application also includes: iteratively cleaning the selected test data according to the optimized abnormal data cleaning rules, and iteratively optimizing the abnormal data cleaning rules until all the selected test data are cleaned into target food test data.

[0056] Steps S401 to S402 shown in the embodiment of the present application first select preliminary cleaned data whose data category information does not pass the data verification rules according to the verification information as the selected test data. Then, the abnormal data cleaning rules are optimized according to the selected test data and the target food test data to construct a dynamic selected test data processing and abnormal data cleaning rule optimization cycle. Therefore, the test report generation method illustrated in the embodiment of the present application can improve the degree of automation of data processing for selected test data, save the labor cost required for cleaning abnormal data, and ensure the high accuracy and reliability of food test data.

[0057] In some embodiments, the basic quality features may include, but are not limited to, at least one of the following: a feature of the total amount of food to be tested, a data category feature, a category anomaly assessment feature, or a category qualification assessment feature. The specific basic quality features may be set according to the actual needs of those skilled in the art, and this application does not limit them. Specifically, the feature of the total amount of food to be tested is used to describe the total amount data of the food to be tested; the data category feature is used to describe the food category of the food to be tested; the category anomaly assessment feature is used to describe the anomaly rate of the food to be tested in its category; and the category qualification assessment feature is used to describe the qualification rate of the food to be tested in its category.

[0058] In some embodiments, the deep exploration features may include, but are not limited to, at least one of the following: data correlation features, data clustering features, data time series features, or data autocorrelation features. The specific deep exploration features may be set according to the actual needs of those skilled in the art, and this application does not limit them. Specifically, the data correlation feature is used to describe the correlation between at least two target food detection data; the data clustering feature is used to describe the similarity between at least two target food detection data; the data time series feature is used to describe the trend of target food detection data changing over time; the data autocorrelation feature is used to describe the periodic change pattern of target food detection data.

[0059] In steps S103 to S104 of other embodiments, the inspection report generation method illustrated in the embodiments of the present application can also first obtain report generation requirement information, extract report generation requirement data based on the report generation requirement information, and then extract basic quality features and deep exploration features from the report generation requirement data.

[0060] See also Figure 5 In some embodiments, the report generation requirement information includes but is not limited to: first format requirement information and first data requirement information; step S105 may include but is not limited to steps S501 to S503: Step S501, selecting a first target report template from report generation templates according to first format requirement information; Step S502, selecting target detection features from basic quality features and deep exploration features according to the first data requirement information; Step S503, importing the target detection features into the first target report template to obtain the first food detection report.

[0061] In step S501 of some embodiments, the report generation template may be a report template pre-set by a person skilled in the art according to the layout requirements to ensure that the format and layout of the food inspection report finally generated meet specific standards. The report generation template may also be automatically generated according to specific layout requirements by a pre-trained automated template generation model, which not only reduces the need for manual participation, but also shortens the time for report production, making the report generation process smoother and more efficient. In addition, the use of an automated template generation model can also quickly adapt to changes in layout requirements. When the format and layout format standards of the food inspection report are updated, the automated template generation model can quickly generate a new template without the need for technicians to manually modify the report generation template, thereby improving the flexibility of food inspection report production.

[0062] After step S502 in some embodiments, the test report generation method illustrated in the embodiments of the present application can also visualize the target detection features to obtain a target detection image to intuitively display the quality of the food to be tested. Specifically, the target detection image can include but is not limited to at least one of the following forms: a chart, a graph, or a heat map, which is not limited in the present application.

[0063] In step S503 of some embodiments, the first food inspection report evaluates and displays the quality of the food to be inspected by integrating basic quality features and deep exploration features.

[0064] Steps S501 to S503 illustrated in the embodiment of the present application screen out a first target report template from the report generation template according to the first layout requirement information, select target detection features from the basic quality features and the deep exploration features according to the first data requirement information, and then import the target detection features into the first target report template to obtain a first food inspection report. The inspection report generation method illustrated in the embodiment of the present application can efficiently and accurately produce a food safety inspection report that meets the layout requirements and contains the necessary quality conditions, thereby providing an easy-to-understand view of the basic quality conditions of the food to be inspected, and helping food quality regulatory agencies understand the safety conditions and quality levels of food.

[0065] See also Figure 6 In some embodiments, the report generation requirement information further includes but is not limited to: second format requirement information and second data requirement information; step S106 may include but is not limited to steps S601 to S605: Step S601, selecting a second target report template from the report generation templates according to the second format requirement information; Step S602, selecting candidate detection features from basic quality features and deep exploration features according to the second data requirement information; Step S603, extracting historical detection data of the candidate detection features from a preset food safety detection database according to the candidate detection features; wherein the food safety detection database stores at least one of the following data of the food to be detected: historical food safety problem data, problem food detection data, or problem food analysis data; Step S604, performing a problem risk assessment on the candidate detection features according to the candidate detection features and historical detection data, and obtaining problem risk assessment information of the food to be detected; Step S605, importing the problem risk assessment information, candidate detection features and historical detection data into a second target report template to generate a second food detection report.

[0066] In step S603 of some embodiments, the food safety detection database stores at least one of the following data of the food to be detected: historical food safety problem data, problem food detection data and problem food analysis data, wherein the historical food safety problem data describes the safety problems that have occurred in the food to be detected, and is used to identify the potential risk patterns of the food to be detected and prevent food safety incidents; the problem food detection data describes the specific information closely related to the food safety problems to be detected, and is used to track the specific circumstances of the safety problems of the food to be detected; the problem food analysis data describes the causes of the safety problems of the food to be detected, the preventive measures for the safety problems and the recommended information. The data stored in the food safety detection database helps to predict and prevent possible food safety problems, and provides a basis for formulating risk management strategies and emergency plans. The form of data stored in the food safety detection database includes but is not limited to at least one of the following: food safety policies, problem analysis reports or documents, which are not limited in this application.

[0067] In step S604 of some embodiments, a problem risk assessment is performed on the candidate detection features according to the candidate detection features and the historical detection data to obtain the problem risk assessment information of the food to be tested. The problem risk assessment information of the food to be tested describes the possibility of safety problems in the food to be tested, the scope of influence of the safety problems, and the degree of health damage caused by the safety problems. The problem risk assessment can be performed through the prompt-guided LLM or through other food problem risk assessment models, and this application does not make specific restrictions.

[0068] In step S605 of some embodiments, the second food test report may include, but is not limited to, at least one of the following in-depth analysis information on the target food test data: assessment information on food safety risks, prediction information on food quality change trends, and solutions for dealing with food safety issues. Therefore, the second food test report can display the food safety hazards of the food to be tested and the corresponding preventive measures, which helps to predict and prevent possible food safety issues and provide a basis for formulating food safety risk management strategies and emergency plans.

[0069] Steps S601 to S605 shown in the embodiment of the present application, first, according to the second format requirement information, the second target report template is screened out from the report generation template, and the candidate detection feature is selected from the basic quality feature and the deep exploration feature according to the second data requirement information. Then, the candidate detection feature is selected from the basic quality feature and the deep exploration feature according to the second data requirement information. Finally, the candidate detection feature is evaluated for problem risk according to the candidate detection feature and the historical detection data, and the problem risk assessment information of the food to be detected is obtained, and the problem risk assessment information, the candidate detection feature and the historical detection data are imported into the second target report template to generate the second food detection report. Therefore, the detection report generation method illustrated in the embodiment of the present application can automatically assess the food safety risk of the food to be detected, and the assessment situation is described by the second food detection report, which improves the efficiency and accuracy of the food safety risk assessment, and intuitively shows the food safety risk assessment information of the food to be detected, so as to improve the response speed of the food safety regulatory agency to food safety issues.

[0070] In step S107 of some embodiments, the first food inspection report and the second food inspection report are merged to obtain a target food inspection report of the food to be inspected. The specific steps may include but are not limited to any of the following: content merging, data comparison, data replacement and structural optimization of the first food inspection report based on the second food inspection report.

[0071] See also Figure 7 In some embodiments, after step S107, the method may further include but is not limited to steps S701 to S704: Step S701, correcting the target food test report according to the target food test data to obtain a preliminary corrected test report; Step S702, performing content correction on the preliminary correction detection report according to a preset correction operation to obtain a candidate correction detection report; wherein the correction operation includes at least one of the following: logic correction, text correction and image correction; Step S703, performing a completeness check on the candidate calibration test report to obtain completeness information; Step S704: modify the candidate correction detection report according to the completeness information to obtain a target correction detection report.

[0072] In step S701 of some embodiments, the information correction prompt may be used to guide the LLM model to perform information correction on the candidate correction test report to obtain a preliminary correction test report, so as to ensure the accuracy and correctness of the information and data in the preliminary correction test report.

[0073] In step S702 of some embodiments, the content correction prompt may be used to instruct the LLM model to perform content correction on the preliminary correction detection report to obtain a candidate correction detection report. For example, when the correction operation includes logic correction, text correction, and image correction, the data format of the content correction prompt instructing the LLM model to perform content correction may be expressed as prompt="".

[0074] Instruction: You are a senior expert in manuscript angles and are good at using LLM. I will provide you with prompts for manuscript proofreading, and you will improve the prompts according to the requirements of the report proofreading work; Input: Proofread the generated document; Response: Proofread the report: Check the logical structure of the report to ensure that the arguments are clear, the evidence is sufficient, and the reasoning is reasonable; check the correctness of grammar, spelling, and punctuation to ensure that the language is standardized and accurate; ensure that the format of the report (such as title, subtitle, font, font size, line spacing, page margins, etc.) meets the requirements; check whether the charts and illustrations are clear and the annotations are accurate.

[0075] In step S703 of some embodiments, the integrity correction prompt can be used to instruct the LLM model to perform a completeness check on the candidate correction detection report to obtain completeness information, which represents whether the content of the candidate correction detection report is complete, for example: whether the candidate correction detection report includes appendices and attachments.

[0076] In step S704 of some embodiments, if the completeness information indicates that the content of the candidate correction test report is incomplete, the missing content in the candidate correction test report is generated to obtain a target correction test report to ensure that the content of the target correction test report is complete, thereby providing a detailed, accurate and reliable food safety test report.

[0077] In steps S701 to S704 shown in the embodiment of the present application, first, information correction and content correction are performed on the target food test report to obtain a candidate corrected test report, then the candidate corrected test report is checked for completeness to obtain completeness information, and finally, the candidate corrected test report is modified according to the completeness information to obtain a target corrected test report, so as to improve the accuracy and completeness of the target corrected test report, and improve the clarity and professionalism of the target corrected test report.

[0078] See also Figure 8 The embodiment of the present application also provides a test report generation system, which can implement the above test report generation method, and the system includes: The data acquisition module 801 is used to acquire the original food testing data of the food to be tested; The data cleaning module 802 is used to perform data cleaning processing on the original food detection data to obtain the target food detection data; The feature extraction module 803 is used to extract features from the target food detection data to obtain food data features; wherein the food data features include: basic quality features and deep exploration features, the basic quality features represent the quality of the food to be detected, and the deep exploration features represent the distribution pattern, change trend of each target food detection data and the correlation between at least two target food detection data; The requirement acquisition module 804 is used to acquire the report generation requirement information; A first report generation module 805 is used to generate a report according to a preset report generation template, report generation requirement information, basic quality features and deep exploration features to obtain a first food testing report; A second report generating module 806 is used to generate a report according to a preset food safety testing database, report generation requirement information, basic quality characteristics and deep exploration characteristics to obtain a second food testing report; The report fusion module 807 is used to fuse the first food detection report and the second food detection report to obtain a target food detection report of the food to be detected.

[0079] The specific implementation of the test report generation system is basically the same as the specific implementation of the above-mentioned test report generation method, and will not be repeated here.

[0080] The embodiment of the present application also provides an electronic device, the electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the above-mentioned detection report generation method when executing the computer program. The electronic device can be any intelligent terminal including a tablet computer, a car computer, etc.

[0081] See also Fig. 9 , Fig. 9The hardware structure of an electronic device of another embodiment is illustrated, and the electronic device includes: The processor 901 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application; The memory 902 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 902 can store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 902, and the processor 901 calls and executes the detection report generation method of the embodiment of this application; Input / output interface 903, used to implement information input and output; Communication interface 904, used to realize communication interaction between the device and other devices, which can be realized through wired mode (such as USB, network cable, etc.) or wireless mode (such as mobile network, WIFI, Bluetooth, etc.); A bus 905 that transmits information between various components of the device (e.g., the processor 901, the memory 902, the input / output interface 903, and the communication interface 904); The processor 901 , the memory 902 , the input / output interface 903 and the communication interface 904 are connected to each other in communication within the device via a bus 905 .

[0082] An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned detection report generation method is implemented.

[0083] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0084] The test report generation method and system, electronic device and storage medium provided by the embodiment of the present application, firstly, by quickly cleaning the original food test data of the food to be tested, accurate and available target food test data are obtained to improve data processing efficiency. Then, by extracting features of the target food test data, the basic quality characteristics that can directly reflect the quality status of food and the distribution pattern, change trend, and the depth exploration characteristics of the correlation between different data are obtained, and the first food test report that directly reflects the quality status and the second food test report that integrates the data in the food safety detection database are generated using the basic quality characteristics and the depth exploration characteristics, respectively, to generate a food test report with accuracy, professionalism and pertinence. Finally, by integrating the first food test report and the second food test report, the target food test report is obtained, compared to the artificial production of food test reports, the test report generation method indicated in the embodiment of the present application can quickly generate the target food test report, shorten the time of report production, and can ensure the accuracy of the food test report, thereby improving the speed of the food test analysis report response food test task, for quickly determining whether the food to be tested has food safety problems and hidden dangers provide efficient support, and then improve the efficiency of food safety management.

[0085] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0086] Those skilled in the art will appreciate that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.

[0087] The system embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment.

[0088] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.

[0089] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0090] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "At least one of the following (items)" or similar expressions refers to any combination of these items, including any combination of single items (items) or plural items (items). For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

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

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

[0093] In addition, each functional module in each embodiment of the present application can be integrated into a processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The above integrated modules can be implemented in the form of hardware or software functional modules.

[0094] If the integrated module is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store programs.

[0095] The preferred embodiments of the present application are described above with reference to the accompanying drawings, but the scope of the rights of the present application is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present application should be within the scope of the rights of the present application.

Claims

1. A method for generating a test report, characterized in that: The method comprises: Obtaining original food testing data of the food to be tested; Performing data cleaning on the original food detection data to obtain target food detection data; Extracting features from the target food detection data to obtain food data features; wherein the food data features include: basic quality features and deep exploration features, the basic quality features characterizing the quality of the food to be detected, and the deep exploration features characterizing the distribution pattern, change trend of each target food detection data and the correlation between at least two target food detection data; Obtain report generation requirement information; Generate a report according to a preset report generation template, the report generation requirement information, the basic quality characteristics and the deep exploration characteristics to obtain a first food testing report; Generate a report according to a preset food safety testing database, the report generation requirement information, the basic quality characteristics and the deep exploration characteristics to obtain a second food testing report; The first food detection report and the second food detection report are merged to obtain a target food detection report of the food to be detected.

2. The method according to claim 1, characterized in that The data cleaning process is performed on the raw food detection data to obtain the target food detection data, including: Performing abnormal data detection on the original food detection data to obtain abnormal detection information; selecting target cleaning data from the original food detection data according to the abnormality detection information; The target cleaned data is cleaned according to a preset abnormal data cleaning rule to obtain preliminary cleaned data; wherein the preliminary cleaned data includes a target classification label; Classify the preliminary cleansed data according to the target classification label to obtain data category information of the preliminary cleansed data; Verify the preliminary cleansed data according to preset data verification rules and the data category information to obtain verification information; The target food detection data is screened out from the preliminary cleaning data according to the verification information; wherein the verification information of the target food detection data represents that the data category passes the data verification rule.

3. The method according to claim 2, characterized in that The step of cleaning the target cleaned data according to the preset abnormal data cleaning rules to obtain preliminary cleaned data includes: Performing format conversion processing on the target cleansing data according to a preset data format to obtain standard cleansing data; wherein the data formats of the standard cleansing data are the same; Obtaining attribute information of the food to be tested; Obtaining original classification labels of the standard cleaned data; Selecting the target classification label from preset candidate classification labels according to the attribute information; The original classification label of the target cleaned data is replaced according to the target classification label to obtain preliminary cleaned data.

4. The method according to claim 3, characterized in that After verifying the preliminary cleansed data according to the preset data verification rule and the data category information to obtain verification information, the method further includes: Selected test data is screened out from the preliminary cleansed data according to the verification information; wherein the verification information of the selected test data indicates that the data category information does not pass the data verification rule; The abnormal data cleaning rules are optimized according to the selected detection data and the target food detection data.

5. The method according to claim 1, characterized in that The report generation requirement information includes first format requirement information and first data requirement information. The report generation is performed according to a preset report generation template, the report generation requirement information, the basic quality characteristics and the deep exploration characteristics to obtain a first food test report, including: Filtering a first target report template from the report generation templates according to the first format requirement information; Selecting a target detection feature from the basic quality feature and the deep exploration feature according to the first data requirement information; The target detection feature is imported into the first target report template to obtain the first food detection report.

6. The method according to claim 5, characterized in that The report generation requirement information further includes second format requirement information and second data requirement information. The report generation is performed according to the preset food safety detection database, the report generation requirement information, the basic quality characteristics and the deep exploration characteristics to obtain a second food detection report, including: Filtering out a second target report template from the report generation template according to the second format requirement information; selecting a candidate detection feature from the basic quality feature and the deep exploration feature according to the second data demand information; Extracting historical detection data of the candidate detection feature from a preset food safety detection database according to the candidate detection feature; wherein the food safety detection database stores at least one of the following data of the food to be detected: historical food safety problem data, problem food detection data or problem food analysis data; Performing a problem risk assessment on the candidate detection feature according to the candidate detection feature and the historical detection data to obtain problem risk assessment information of the food to be detected; The problem risk assessment information, the candidate detection features and the historical detection data are imported into the second target report template to generate the second food detection report.

7. The method according to claim 1, characterized in that After the first food test report and the second food test report are merged to obtain the target food test report of the food to be tested, the method further includes: Correcting the target food test report according to the target food test data to obtain a preliminary corrected test report; Performing content correction on the preliminary correction detection report according to a preset correction operation to obtain a candidate correction detection report; wherein the correction operation includes at least one of the following: logic correction, text correction, and image correction; Performing a completeness check on the candidate calibration test report to obtain completeness information; The candidate correction detection report is modified according to the completeness information to obtain a target correction detection report.

8. A test report generating system, characterized in that: The system comprises: A data acquisition module, used to acquire original food testing data of the food to be tested; A data cleaning module, used to perform data cleaning processing on the original food detection data to obtain target food detection data; A feature extraction module, used to extract features from the target food detection data to obtain food data features; wherein the food data features include: basic quality features and deep exploration features, the basic quality features characterizing the quality of the food to be detected, and the deep exploration features characterizing the distribution pattern, change trend of each target food detection data and the correlation between at least two target food detection data; Demand acquisition module, used to obtain report generation demand information; A first report generation module, configured to generate a report according to a preset report generation template, the report generation requirement information, the basic quality characteristics and the deep exploration characteristics, to obtain a first food testing report; A second report generating module, used to generate a report according to a preset food safety testing database, the report generating requirement information, the basic quality characteristics and the deep exploration characteristics, to obtain a second food testing report; The report fusion module is used to fuse the first food detection report and the second food detection report to obtain a target food detection report of the food to be detected.

9. An electronic device, characterized in that The electronic device comprises a memory and a processor, the memory stores a computer program, and the processor implements the test report generating method according to any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the detection report generating method according to any one of claims 1 to 7 is implemented.

Citation Information

Cited By

  • Report generation method and device, storage medium, electronic equipment and program product

    CN121766277A