Cotton seed test method and system
By employing a dual-sample parallel acquisition and automatic equipment simulation data switching mechanism, the problems of low efficiency, strong hardware dependence, and non-standard data management in the cotton variety evaluation system are solved, achieving efficient and reliable cotton variety evaluation data processing.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- XINJIANG ACAD OF AGRI SCI (XINJIANG BRANCH OF CHINESE ACAD OF AGRI SCI)
- Filing Date
- 2026-01-12
- Publication Date
- 2026-04-17
AI Technical Summary
Traditional cotton evaluation methods suffer from problems such as low data acquisition efficiency, serialized sample testing, poor system integration, strong hardware dependence, and non-standard data management.
It adopts a dual-sample parallel acquisition mechanism and an equipment detection and automatic simulation data switching mechanism to achieve rapid alternating testing of cotton samples, and automatically switches to simulation data mode when the equipment malfunctions, combined with intelligent computing and integrated data processing flow.
Significantly improves detection efficiency by over 60%, enhances system robustness, improves data processing efficiency by over 50%, achieves data accuracy of over 99.5%, optimizes user experience, and improves quality management level.
Smart Images

Figure CN121880717A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of agricultural information technology, and in particular to a method and system for cotton seed testing. Background Technology
[0002] Traditional cotton testing methods have the following technical shortcomings in cotton breeding and quality inspection: Data collection is inefficient: It relies on manual operation of independent instruments and equipment to read data, and then manually record it into paper documents or spreadsheets, which is cumbersome and prone to errors.
[0003] Serialization of sample testing: Existing systems typically use a single-sample testing mode, which cannot achieve rapid alternating testing of multiple samples, resulting in low overall testing efficiency.
[0004] Poor system integration: Data acquisition, calculation and storage are separated, requiring operators to frequently switch between different tools, which increases work complexity and the probability of errors.
[0005] Excessive hardware dependency: The existing system is tightly bound to specific hardware devices, and once the device fails or the connection is abnormal, the entire system will be paralyzed.
[0006] Inadequate data management: Manually recorded data is difficult to manage and trace in a unified manner, and lacks effective real-time monitoring and quality control methods. Summary of the Invention
[0007] In view of the above problems, the present invention is proposed to provide a cotton seed testing method and system that overcomes or at least partially solves the above problems.
[0008] According to one aspect of the present invention, a method for cotton seed evaluation is provided, the method comprising: Set the data storage path; Data was collected from two cotton samples alternately. Detects hardware device status and automatically switches to analog data mode when a device malfunctions; Collect data on seed cotton, lint cotton, and particle count; Automatically calculates garment weight, single bell weight, and sub-value; Batch write dual-sample data records to a storage file; Display historical data records.
[0009] Optionally, the alternating data collection of the two cotton samples specifically includes: Quick switching between Sample 1 and Sample 2; The collected data from the two samples are stored independently to ensure that the data is not mixed up; The interface display updates in real time to reflect the current status of the activated sample; It supports submitting the complete dataset of two samples at once.
[0010] Optionally, the step of detecting the hardware device status and automatically switching to analog data mode when the device malfunctions specifically includes: Periodically scan the device connection status of the COM port; Simulated data is generated using an algorithm based on the statistical characteristics of historical data; Automatically switch working modes based on equipment test results; Used to display device status and current operating mode information.
[0011] Optionally, the automatic calculation of garment portion and single-bell weight specifically includes: Lining percentage = (lint data / seed cotton data) × 100%; Single boll weight = Seed cotton data / Number of bolls.
[0012] Optionally, the display of historical data records specifically includes: data sorting, data filtering, data export, and historical tracing functions; The data sorting function supports sorting in ascending or descending order by any field; The data filtering function supports filtering and displaying records based on conditional expressions; The data export function supports exporting table data to Excel and CSV formats; The historical tracing function supports querying historical records by time range.
[0013] The present invention also provides a cotton seed testing system, which applies the cotton seed testing method according to any one of claims 1-5, wherein the cotton seed testing system comprises: The file configuration module is used to set the data storage path; The dual-sample parallel acquisition module is used to alternately acquire data from two cotton samples; The equipment detection and data simulation module is used to detect the status of hardware devices and automatically switch to simulation data mode when the device malfunctions. The data acquisition and processing module is used to collect data on seed cotton, lint cotton, and particle counts. The intelligent calculation module is used to automatically calculate the garment weight, single bell weight, and sub-value; The data submission and persistence module is used to write dual-sample data records to a storage file in batches; The real-time data preview module is used to display historical data records.
[0014] Optionally, the dual-sample parallel acquisition module specifically includes: The sample switching unit provides a graphical interface for quick switching between sample 1 and sample 2. A data caching unit is used to independently store the collected data of two samples; The status synchronization unit is used to update the interface display in real time to reflect the status of the currently activated sample; The batch submission unit supports submitting the complete dataset of two samples at once.
[0015] Optionally, the device detection and data simulation module specifically includes: a device status detection unit, a simulation data generation unit, a mode switching control unit, and a user prompt unit; The device status detection unit is used to periodically scan the device connection status of the COM port; The simulated data generation unit uses an algorithm based on the statistical characteristics of historical data to generate simulated data; The mode switching control unit automatically switches the working mode according to the equipment detection results; The user prompt unit is used to display device status and current operating mode information.
[0016] This invention provides a cotton quality assessment method and system. The cotton quality assessment method includes: setting a data storage path; alternately acquiring data from two cotton samples; detecting the hardware status and automatically switching to simulation data mode when the equipment malfunctions; acquiring seed cotton, lint cotton, and particle count data; automatically calculating lint percentage, single boll weight, and sub-value; batch writing the dual-sample data records to a storage file; and displaying historical data records. The invention introduces a dual-sample parallel acquisition mechanism and a device detection and automatic simulation data switching mechanism, enabling rapid alternating testing of two cotton samples and significantly improving testing efficiency. Simultaneously, the system can automatically switch to simulation data mode when the hardware is unavailable, improving the system's robustness and practicality. Through an integrated dual-sample data processing flow, the entire process of cotton quality assessment data, from parallel acquisition and intelligent calculation to batch storage, is automated, improving work efficiency by over 60%.
[0017] The above description is merely an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention and to implement it in accordance with the contents of the specification, and in order to make the above and other objects, features and advantages of the present invention more apparent and understandable, specific embodiments of the present invention are described below. Attached Figure Description
[0018] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0019] Figure 1A flowchart of a cotton seed testing method provided in an embodiment of the present invention; Figure 2 This is a block diagram of a cotton seed testing system provided in an embodiment of the present invention. Detailed Implementation
[0020] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
[0021] The terms "comprising" and "having," and any variations thereof, in the specification, embodiments, claims, and drawings of this invention are intended to cover non-exclusive inclusion, such as including a series of steps or units.
[0022] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments.
[0023] like Figure 1 As shown, a cotton variety evaluation method includes: Set the data storage path; Data was collected from two cotton samples alternately. Detects hardware device status and automatically switches to analog data mode when a device malfunctions; Collect data on seed cotton, lint cotton, and particle count; Automatically calculates garment weight, single bell weight, and sub-value; Batch write dual-sample data records to a storage file; Display historical data records.
[0024] like Figure 2 As shown, a cotton variety testing system includes: The file configuration module provides a graphical interface that allows users to specify the data storage file path. The default setting is the sample_data.xlsx file, but users can customize the storage path through the "Select File" function. A dual-sample parallel acquisition module is used to achieve rapid alternating data acquisition from two cotton samples, including: Sample switching unit: Provides a graphical radio button interface to enable quick switching between sample 1 and sample 2. The default logical order of seed cotton - lint cotton - sub-value acquisition is sample 1 first and sample 2 second. For example, sample 2 can only acquire seed cotton data after sample 1 has acquired seed cotton data.
[0025] Data caching unit: Independently stores the collected data for two samples, including seed cotton data, lint data, and particle count, ensuring that the data is not mixed up. Status synchronization unit: updates the interface display in real time to reflect the status of the currently activated sample; Batch Submission Unit: Supports submitting the complete dataset of two samples at once; The device detection and data simulation module is used to automatically detect the connection status of hardware devices. When the target device is detected to be connected normally, it reads data from the device. When the device is not connected or malfunctions, it automatically switches to the simulation data mode, generates logically consistent simulation data, and issues a warning prompt. The data acquisition and processing module is used to provide data acquisition functions for seed cotton, lint cotton, and sub-value data. Users can trigger data acquisition by clicking the corresponding button. Each data item is equipped with a clear button for data reset. The intelligent calculation module is used to automatically calculate key indicators such as lint percentage and single boll weight after the seed cotton and lint cotton data are ready, and the calculation results are displayed in real time in the specified area of the interface. The data submission and persistence module is used to write the confirmed sample number, raw data, calculation results and timestamp as a complete record to the specified file; The real-time data preview module is used to display all submitted historical data records in tabular form, including serial number, sample number, seed cotton data, lint data, lint percentage, single boll weight, sub-value, and time information.
[0026] The equipment testing and data simulation module includes: The device status detection unit is used to periodically scan the device connection status of the COM port; The simulation data generation unit uses an algorithm based on the statistical characteristics of historical data to generate simulation data; The mode switching control unit automatically switches the working mode based on the equipment detection results. The user prompt unit is used to display device status and current operating mode information.
[0027] The intelligent computing module uses the following calculation formula: Lining percentage = (lint data / seed cotton data) × 100%; Single boll weight = Seed cotton data / Number of bolls; The real-time data preview module supports: Data sorting function, sorting in ascending or descending order by any field; The data filtering function filters and displays records based on conditional expressions; The data export function supports exporting table data to Excel and CSV formats; The historical tracking function supports querying historical records by time range.
[0028] Example 1: System Architecture Implementation This invention employs a modular design, with each module communicating via a unified data bus. The system is developed using Python, employs the PyQt5 framework to build the graphical user interface, and uses an SQLite database for data storage.
[0029] Example 2: System Workflow The system workflow includes the following steps: System initialization: Start the system, load user configuration, and initialize various functional modules; Device detection: Automatically scans COM ports to detect the connection status of hardware devices; Mode determination: Determine the working mode (normal mode / simulation mode) based on the equipment test results; Data collection: The user enters the sample number and clicks the "Read Seed Cotton Data" and "Read Lint Cotton Data" buttons in sequence; Intelligent calculation: The system automatically calculates key indicators such as proofreading, number of inspections, and number of single inspections; Data verification: Users check the accuracy of the data and, if necessary, use the clear function to re-collect the data; Data submission: Click the "Submit Data to Excel" button, and the system will write the complete record to the file; Real-time preview: The data preview table updates automatically, displaying the latest submitted records.
[0030] Example 3: Exception Handling Mechanism When device detection fails, the system executes the following exception handling procedure: A warning message is displayed prominently on the interface: "COM port not found, using simulated data"; Record abnormal event logs, including the time of occurrence, the type of abnormality, and the handling measures; It provides a manual retry function, allowing users to retest the device status at any time; Simulated data is clearly marked in the records to avoid confusion with real data.
[0031] Through the above-described embodiments, the present invention effectively solves the technical defects of traditional cotton seed evaluation systems and achieves efficient, reliable, and intelligent data acquisition and processing.
[0032] Example 4: Comparison Experiment of Dual Sample Testing Efficiency. Through a comparative experiment with the traditional single sample testing system, the dual sample testing system of the present invention increases the number of samples completed in the same time by 62.3%, reduces the workload of operators by 45.8%, and reduces the data entry error rate from the traditional 3.2% to below 0.5%.
[0033] Beneficial effects: Revolutionary improvement in detection efficiency: Through the dual-sample parallel acquisition mechanism, rapid alternating testing of two samples is achieved, avoiding the equipment idle time of traditional single-sample testing, and improving detection efficiency by more than 60%.
[0034] The system robustness is significantly improved: the device detection and automatic simulation data switching mechanism effectively solves the problem of system paralysis caused by hardware dependence, ensuring that the system can still operate normally when the device is abnormal.
[0035] Data processing efficiency has been greatly improved: integrated processing of data acquisition, calculation and storage has been achieved, eliminating manual transcription and cross-tool operations, and improving work efficiency by more than 50%.
[0036] Data accuracy has been significantly improved: the automated data processing workflow minimizes human error, and the accuracy rate of key indicator calculations reaches over 99.5%.
[0037] Enhanced batch processing capabilities: Supports batch submission and storage of two sample data sets, significantly reducing the number of file operations and improving the standardization of data management.
[0038] User experience has been comprehensively optimized: the intuitive graphical interface, clear operation logic, and comprehensive prompts and feedback reduce the learning cost and difficulty of use for users.
[0039] Improved quality management: A complete traceability system and real-time monitoring function provide strong support for data auditing and quality control.
[0040] The above specific embodiments further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for cotton seed evaluation, characterized in that, The cotton variety testing methods include: Set the data storage path; Data was collected from two cotton samples alternately. Detects hardware device status and automatically switches to analog data mode when a device malfunctions; Collect data on seed cotton, lint cotton, and particle count; Automatically calculates garment weight, single bell weight, and sub-value; Batch write dual-sample data records to a storage file; Display historical data records.
2. The cotton seed testing method according to claim 1, characterized in that, The process of alternately collecting data from two cotton samples specifically includes: Quick switching between Sample 1 and Sample 2; The collected data from the two samples are stored independently to ensure that the data is not mixed up; The interface display updates in real time to reflect the current status of the activated sample; It supports submitting the complete dataset of two samples at once.
3. The cotton seed testing method according to claim 1, characterized in that, The specific steps of detecting the hardware device status and automatically switching to analog data mode when the device malfunctions include: Periodically scan the device connection status of the COM port; Simulated data is generated using an algorithm based on the statistical characteristics of historical data; Automatically switch working modes based on equipment test results; Used to display device status and current operating mode information.
4. The cotton seed testing method according to claim 1, characterized in that, The automatic calculation of garment weight and single bell weight specifically includes: Lining percentage = (lint data / seed cotton data) × 100%; Single boll weight = Seed cotton data / Number of bolls.
5. The cotton seed testing method according to claim 1, characterized in that, The display of historical data records specifically includes: data sorting, data filtering, data export, and historical tracing functions; The data sorting function supports sorting in ascending or descending order by any field; The data filtering function supports filtering and displaying records based on conditional expressions; The data export function supports exporting table data to Excel and CSV formats; The historical tracing function supports querying historical records by time range.
6. A cotton seed testing system, employing the cotton seed testing method according to any one of claims 1-5, characterized in that, The cotton testing system includes: The file configuration module is used to set the data storage path; The dual-sample parallel acquisition module is used to alternately acquire data from two cotton samples; The equipment detection and data simulation module is used to detect the status of hardware devices and automatically switch to simulation data mode when the device malfunctions. The data acquisition and processing module is used to collect data on seed cotton, lint cotton, and particle counts. The intelligent calculation module is used to automatically calculate the garment weight, single bell weight, and sub-value; The data submission and persistence module is used to write dual-sample data records to a storage file in batches; The real-time data preview module is used to display historical data records.
7. A cotton seed testing system according to claim 6, characterized in that, The dual-sample parallel acquisition module specifically includes: The sample switching unit provides a graphical interface for quick switching between sample 1 and sample 2. A data caching unit is used to independently store the collected data of two samples; The status synchronization unit is used to update the interface display in real time to reflect the status of the currently activated sample; The batch submission unit supports submitting the complete dataset of two samples at once.
8. A cotton seed testing system according to claim 6, characterized in that, The equipment detection and data simulation module specifically includes: an equipment status detection unit, a simulation data generation unit, a mode switching control unit, and a user prompt unit; The device status detection unit is used to periodically scan the device connection status of the COM port; The simulated data generation unit uses an algorithm based on the statistical characteristics of historical data to generate simulated data; The mode switching control unit automatically switches the working mode according to the equipment detection results; The user prompt unit is used to display device status and current operating mode information.