Sample sampling inspection plan automatic generation method and device based on multi-source supply and medium

By automatically generating a multi-source supply sample sampling plan, the problems of low sample sampling efficiency and inaccurate detection results in the prior art are solved, and the standardization of the sample sampling process and the reliability of the detection results are achieved.

CN119539575APending Publication Date: 2025-02-28SHANDONG INSPUR DIGITAL BUSINESS TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411556029.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-04
Publication Date
2025-02-28

AI Technical Summary

Technical Problem

The existing multi-source sample sampling plan mainly relies on manual experience, is inefficient and greatly affected by human factors, lacks standardization and objectivity, resulting in insufficient accuracy and reliability of the test results.

Method used

A method of automatic generation of sample sampling plan based on multi-source supply is adopted. By formulating supplier sampling line information, obtaining supplier inspection records, and calculating the number of samples to be inspected based on the annual planned quantity, and generating sampling lines to ensure the automation and standardization of sampling plan.

Benefits of technology

The sample sampling process is standardized and standardized, the influence of human factors is reduced, the accuracy and reliability of the test results are improved, and quality problems can be quickly identified and reported, and unqualified products are prevented from flowing into the market.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119539575A_ABST
    Figure CN119539575A_ABST
Patent Text Reader

Abstract

The invention discloses a sample sampling inspection plan automatic generation method and device based on multi-source supply and a medium, belongs to the technical field of supply chain sample sampling inspection, and aims to solve the technical problem of how to automatically generate a supply chain sample sampling inspection plan, ensure standardization and normalization of a sample sampling inspection process, reduce the influence of human factors and improve the sampling inspection efficiency. According to the technical scheme, the method comprises the steps that S1, supplier sampling inspection line information is formulated, one supplier maintains a plurality of lines, one line comprises a plurality of storage stations, the storage stations on the lines cannot be repeated, one storage station only exists in one line, and the supplier maintains a plurality of lines; the supplier line information is stored in a storage device for subsequent use; s2, supplier inspection is carried out, and supplier inspection records are obtained; and S3, after the supplier inspection is finished, automatically generating a sampling inspection plan.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of supply chain sample sampling, and in particular to a method, device and medium for automatically generating a sample sampling plan based on multi-source supply. Background Art

[0002] Supply chain sampling is an important part of ensuring product quality in the supply chain. The main purpose of supply chain sampling is to infer the quality status of the entire batch of products by inspecting some samples, thereby ensuring that product quality meets standards and customer requirements. This helps prevent defective products from entering the market, reduces quality risks and costs, and improves the stability and reliability of the supply chain.

[0003] At present, sampling inspection plans for multi-source supplies are mainly generated based on manual experience, which is not only inefficient but also greatly affected by human factors and lacks objectivity and representativeness.

[0004] Therefore, how to automatically generate supply chain sample sampling plans, ensure the standardization and regularization of the sample sampling process, reduce the impact of human factors, and improve the accuracy and reliability of test results is a technical problem that needs to be solved urgently. Summary of the invention

[0005] The technical task of the present invention is to provide a method, device and medium for automatically generating a sample sampling plan based on multi-source supply, so as to solve the problem of how to automatically generate a supply chain sample sampling plan, ensure the standardization and normalization of the sample sampling process, reduce the influence of human factors, and improve the accuracy and reliability of the test results.

[0006] The technical task of the present invention is achieved in the following way: a method for automatically generating a sample sampling plan based on multi-source supply, the method is specifically as follows:

[0007] S1. Formulate supplier sampling line information: a supplier maintains multiple lines, and a line includes multiple storage stations. The storage stations on the line cannot be repeated. A storage station only exists in one line. The supplier line information is stored in a storage device (such as a database) for subsequent use;

[0008] S2. Supplier inspection report, obtain supplier inspection report record;

[0009] S3. After the supplier's inspection report is completed, the sampling inspection plan is automatically generated.

[0010] Preferably, the automatic generation of the sampling inspection plan in step S3 is as follows:

[0011] S301, obtaining supplier inspection records sorted by time;

[0012] S302. Determine whether the total number of suppliers meets the supplier quantity limit (SUPPLIER_SUM_LIMIT) for inspection:

[0013] ①If not, jump to step S310;

[0014] ② If yes, execute step S303;

[0015] S303. Obtain the total number of samples reported by each supplier (s1:num1, s2:num2, s3:num3), and determine whether the number of samples reported by each supplier meets the sample quantity limit (SAMPLING_EACH_LIMIT) reported by each supplier:

[0016] ① If not, remove the supplier that does not meet the generation conditions and jump to step S301;

[0017] ② If yes, execute step S304;

[0018] S304. Total the number of samples reported by the supplier for inspection, and determine whether the total number of samples reported by the supplier meets the total number of samples reported by the supplier for inspection limit (SAMPLING_SUM_LIMIT):

[0019] ① If not, remove the supplier that does not meet the generation conditions and jump to step S301;

[0020] ② If yes, execute step S305;

[0021] S305, traverse the suppliers and determine the suppliers participating in the calculation;

[0022] S306. Calculate the number of samples to be inspected for each supplier based on the supplier's annual planned quantity;

[0023] S307. Calculate the actual quantity to be inspected of each supplier;

[0024] S308, traversing each supplier's line according to the supplier's line information, and generating a sampling line;

[0025] S309: Determine whether the automatic generation of the sampling inspection plan is successful:

[0026] ①. If yes, execute step S310;

[0027] ② If not, remove the supplier that does not meet the generation conditions and jump to step S301;

[0028] S310, end.

[0029] Preferably, when a supplier submits a sample inspection, the time of the supplier's sample inspection submission and the information of the storage station where the sample is located are recorded, and the time of the supplier's sample inspection submission and the information of the storage station where the sample is located are stored in a storage device with storage attributes.

[0030] Preferably, in step S305, traversing suppliers and determining suppliers participating in the calculation are specifically as follows:

[0031] Traverse the suppliers and calculate the total number of samples reported by the suppliers. When the total value is greater than the total number of samples reported by the supplier (SAMPLING_SUM_LIMIT), stop traversing and save the traversed suppliers and the corresponding number of reported samples to obtain the supplier objects participating in the calculation.

[0032] Among them, the traversed suppliers and the corresponding number of reported samples are stored in the sequence to be inspected.

[0033] Preferably, the calculation formula for the number of samples to be tested of each supplier in step S306 is as follows:

[0034] Number of samples to be inspected for each supplier = SAMPLING_SUM_LIMIT*RATIO

[0035] Among them, SAMPLING_SUM_LIMIT indicates the total number of samples reported by the supplier for inspection;

[0036] RATIO = supplier's planned purchase and storage quantity for the year / total purchase and storage quantity of participating suppliers for the year.

[0037] Preferably, the calculation rules for the actual quantity to be inspected of each supplier in step S307 are as follows:

[0038] (1) The quantity that supplier s1 calculated to be inspected is n1, but the quantity reported by supplier s1 is m1. Then the actual quantity that supplier s1 should inspect is m1, and the remainder is n1-m1.

[0039] (2) The quantity to be inspected by supplier S2 is N2, and the quantity reported by supplier S2 is M2. The situation is as follows:

[0040] ①If n2+(n1-m1)<m2, then the actual quantity to be inspected of supplier s2 is [n2+(n1-m1)];

[0041] ② If n2+(n1-m1)≥m2, the actual quantity to be inspected of supplier s2 is the maximum reported quantity m2 of supplier s2, and the remaining margin is [n2+(n1-m1)-m2];

[0042] (3) Continue to calculate the actual reported quantities of the remaining suppliers according to the rules of (1) and (2) until the allocation is completed, and then obtain the suppliers and their corresponding actual inspection data for this time.

[0043] Preferably, in step S308, the supplier lines are traversed according to the supplier line information to generate the sampling line as follows:

[0044] Query the detailed inspection records of each supplier in ascending time order and obtain the routes of each supplier;

[0045] Traverse each supplier's line, match the stacks contained in the storage and collection stations maintained in the line with the sample stacks reported in the records, and retain the final sampling plan results.

[0046] Preferably, the inspection sample stack is matched with the stacks contained in the stations in the line, as follows:

[0047] ① If there is exactly one route that meets the requirements, the corresponding route will be retained as the final result;

[0048] ② If multiple lines meet the requirements at the same time, the line with the earliest sample inspection time will be taken as the final result.

[0049] ③ If there are multiple routes that meet the requirements and the number of stacks on each route is greater than 3, the corresponding route is saved as the final result; the specific reason for saving the corresponding route as the final result is: the number of inspection reports from supplier s2 is m2, there are p2 on route 1, and (m2-p2) on route 2, then route 1 and route 2 are saved;

[0050] ④ If there are multiple routes that meet the requirements and the number of samples submitted by the supplier on all routes is less than 3, then end the calculation, delete the supplier from the set obtained in step S301, and start the calculation again from step S302 until a record that meets the conditions is obtained;

[0051] ⑤ If after repeated calculations, the supplier set is empty and no route that meets the conditions is obtained, the sampling generation is terminated.

[0052] An electronic device comprising: a memory and at least one processor;

[0053] Wherein, the memory stores a computer program;

[0054] The at least one processor executes the computer program stored in the memory, so that the at least one processor performs the above-mentioned method for automatically generating a sample sampling plan based on multi-source supply.

[0055] A computer-readable storage medium stores a computer program, wherein the computer-readable storage medium can be executed by a processor to implement the above-mentioned method for automatically generating a sample sampling plan based on multi-source supply.

[0056] The method, device and medium for automatically generating a sample sampling plan based on multi-source supply of the present invention have the following advantages:

[0057] (1) The present invention ensures product quality by automatically generating sampling inspection plans, which can ensure the standardization and regularization of the sample sampling inspection process, reduce the influence of human factors, improve the accuracy and reliability of the test results, and can quickly identify and report quality problems, so that enterprises can take corrective measures in time to prevent substandard products from entering the market;

[0058] (II) The present invention improves efficiency and reduces costs by automatically generating sampling inspection plans, which can greatly reduce the time and error rate of manual operations and improve detection efficiency. On the one hand, through the method of automatically generating sampling inspection plans, enterprises can reduce their reliance on manual labor and reduce labor costs. On the other hand, information technology can also optimize sampling inspection strategies, reduce unnecessary sampling inspection times and sampling inspection scopes, thereby reducing the material cost and time cost of sampling inspections.

[0059] (III) The present invention can record detailed information of each batch of samples, including sample sources, test results, etc., to achieve full traceability of samples throughout their life cycle, strengthen traceability and compliance, and help enterprises better comply with relevant laws, regulations and industry standards, and reduce the risk of violations;

[0060] (IV) The present invention also helps enterprises achieve sustainable development. Through information technology, enterprises can monitor and manage the environmental protection of each link of the supply chain. For example, enterprises can require suppliers to provide information such as environmental certification reports to ensure that each link of the supply chain meets environmental protection requirements. At the same time, information technology can also help enterprises optimize resource utilization and reduce waste, reduce production costs and environmental pollution. This helps enterprises achieve economic benefits. BRIEF DESCRIPTION OF THE DRAWINGS

[0061] The present invention is further described below in conjunction with the accompanying drawings.

[0062] Attached Figure 1 A flowchart of the method for automatically generating a sampling inspection plan based on multi-source supply;

[0063] Attached Figure 2 A flowchart automatically generated for the sampling plan. DETAILED DESCRIPTION

[0064] The following detailed description is made of the method, device and medium for automatically generating a sample sampling plan based on multi-source supply according to the present invention with reference to the accompanying drawings and specific embodiments.

[0065] Embodiment 1:

[0066] As attached Figure 1As shown, this embodiment provides a method for automatically generating a sample sampling plan based on multi-source supply, and the method is specifically as follows:

[0067] S1. Formulate supplier sampling line information: a supplier maintains multiple lines, and a line includes multiple storage stations. The storage stations on the line cannot be repeated. A storage station only exists in one line. The supplier line information is stored in a storage device (such as a database) for subsequent use;

[0068] S2. Supplier inspection report, obtain supplier inspection report record;

[0069] S3. After the supplier's inspection report is completed, the sampling inspection plan is automatically generated.

[0070] As attached Figure 2 As shown, the automatic generation of the sampling inspection plan in step S3 of this embodiment is as follows:

[0071] S301, obtaining supplier inspection records sorted by time;

[0072] S302. Determine whether the total number of suppliers meets the supplier quantity limit (SUPPLIER_SUM_LIMIT) for inspection:

[0073] ①If not, jump to step S310;

[0074] ② If yes, execute step S303;

[0075] S303. Obtain the total number of samples reported by each supplier (s1:num1, s2:num2, s3:num3), and determine whether the number of samples reported by each supplier meets the sample quantity limit (SAMPLING_EACH_LIMIT) reported by each supplier:

[0076] ① If not, remove the supplier that does not meet the generation conditions and jump to step S301;

[0077] ② If yes, execute step S304;

[0078] S304. Total the number of samples reported by the supplier for inspection, and determine whether the total number of samples reported by the supplier meets the total number of samples reported by the supplier for inspection limit (SAMPLING_SUM_LIMIT):

[0079] ① If not, remove the supplier that does not meet the generation conditions and jump to step S301;

[0080] ② If yes, execute step S305;

[0081] S305, traverse the suppliers and determine the suppliers participating in the calculation;

[0082] S306. Calculate the number of samples to be inspected for each supplier based on the supplier's annual planned quantity;

[0083] S307. Calculate the actual quantity of each supplier to be inspected;

[0084] S308, traversing each supplier's line according to the supplier's line information, and generating a sampling line;

[0085] S309: Determine whether the automatic generation of the sampling inspection plan is successful:

[0086] ①. If yes, execute step S310;

[0087] ② If not, remove the supplier that does not meet the generation conditions and jump to step S301;

[0088] S310, end.

[0089] When the supplier in this embodiment submits sample inspection, the time of the supplier's sample inspection and the information of the storage station where the sample is located are recorded, and the time of the supplier's sample inspection and the information of the storage station where the sample is located are stored in a storage device with storage attributes.

[0090] In step S305 of this embodiment, the suppliers are traversed and the suppliers participating in the calculation are determined as follows:

[0091] Traverse the suppliers and calculate the total number of samples reported by the suppliers. When the total value is greater than the total number of samples reported by the supplier (SAMPLING_SUM_LIMIT), stop traversing and save the traversed suppliers and the corresponding number of reported samples to obtain the supplier objects participating in the calculation.

[0092] Among them, the traversed suppliers and the corresponding number of reported samples are stored in the sequence to be inspected.

[0093] The calculation formula for the number of samples to be tested of each supplier in step S306 of this embodiment is as follows:

[0094] Number of samples to be inspected for each supplier = SAMPLING_SUM_LIMIT*RATIO

[0095] Among them, SAMPLING_SUM_LIMIT indicates the total number of samples reported by the supplier for inspection;

[0096] RATIO = supplier's planned purchase and storage quantity for the year / total purchase and storage quantity of participating suppliers for the year.

[0097] In step S307 of this embodiment, the calculation rules for the actual quantity to be inspected of each supplier are as follows:

[0098] (1) The quantity that supplier s1 calculated to be inspected is n1, but the quantity reported by supplier s1 is m1. Then the actual quantity that supplier s1 should inspect is m1, and the remainder is n1-m1.

[0099] (2) The quantity to be inspected by supplier S2 is N2, and the quantity reported by supplier S2 is M2. The situation is as follows:

[0100] ①If n2+(n1-m1)<m2, then the actual quantity to be inspected of supplier s2 is [n2+(n1-m1)];

[0101] ② If n2+(n1-m1)≥m2, the actual quantity to be inspected of supplier s2 is the maximum reported quantity m2 of supplier s2, and the remaining margin is [n2+(n1-m1)-m2];

[0102] For example: the calculated quantity to be inspected by supplier s1 is 9, but the quantity reported by s1 is 6, so the actual quantity to be inspected by s1 is 6, and the remainder is 3; the quantity to be inspected by s2 is 13, and the quantity reported by s2 is 20. After comparison, it is found that 13+3<20, so the actual quantity to be inspected by s2 is 16 (3+13). If the quantity reported by s2 is less than 16, for example, only 15, then the maximum reported quantity of s2 is taken as the actual quantity to be inspected, that is, 15, and the remainder is retained as 1. According to this rule, the actual reported quantities of the remaining suppliers are calculated until the allocation is completed, and the suppliers and their corresponding actual quantities to be inspected this time are obtained.

[0103] (3) Continue to calculate the actual reported quantities of the remaining suppliers according to the rules of (1) and (2) until the allocation is completed, and then obtain the suppliers and their corresponding actual inspection data for this time.

[0104] In step S308 of this embodiment, the supplier lines are traversed according to the supplier line information to generate the sampling line as follows:

[0105] Query the detailed inspection records of each supplier in ascending time order and obtain the routes of each supplier;

[0106] Traverse each supplier's line, match the stacks contained in the storage and collection stations maintained in the line with the sample stacks reported in the records, and retain the final sampling plan results.

[0107] In this embodiment, the inspection sample stack is matched with the stacks contained in the stations in the line, as follows:

[0108] ① If there is exactly one route that meets the requirements, the corresponding route will be retained as the final result;

[0109] ② If multiple lines meet the requirements at the same time, the line with the earliest sample inspection time will be taken as the final result.

[0110] ③ If there are multiple routes that meet the requirements and the number of stacks on each route is greater than 3, the corresponding route is saved as the final result; the specific reason for saving the corresponding route as the final result is: the number of inspection reports from supplier s2 is m2, there are p2 on route 1, and (m2-p2) on route 2, then route 1 and route 2 are saved;

[0111] ④ If there are multiple routes that meet the requirements and the number of samples submitted by the supplier on all routes is less than 3, then end the calculation, delete the supplier from the set obtained in step S301, and start the calculation again from step S302 until a record that meets the conditions is obtained;

[0112] ⑤ If after repeated calculations, the supplier set is empty and no route that meets the conditions is obtained, the sampling generation is terminated.

[0113] Embodiment 2:

[0114] This embodiment also provides an electronic device, including: a memory and a processor;

[0115] Wherein, the memory stores computer-executable instructions;

[0116] The processor executes the computer-executable instructions stored in the memory, so that the processor executes the method for automatically generating a sample sampling plan based on multi-source supply in any embodiment of the present invention.

[0117] The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The processor may be a microprocessor or any conventional processor, etc.

[0118] The memory can be used to store computer programs and / or modules. The processor realizes various functions of the electronic device by running or executing the computer programs and / or modules stored in the memory, and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application required for a function, etc.; the data storage area can store data created according to the use of the terminal, etc. In addition, the memory can also include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (SMC), a secure digital (SD) card, a flash memory card, at least one disk storage period, a flash memory device, or other volatile solid-state storage devices.

[0119] Embodiment 3:

[0120] This embodiment also provides a computer-readable storage medium, in which a plurality of instructions are stored, and the instructions are loaded by a processor, so that the processor executes the method A for automatically generating a sample sampling plan based on multi-source supply in any embodiment of the present invention. Specifically, a system or device equipped with a storage medium can be provided, on which a software program code for implementing the functions of any of the above embodiments is stored, and a computer (or CPU or MPU) of the system or device reads and executes the program code stored in the storage medium.

[0121] In this case, the program code itself read from the storage medium can realize the function of any one of the above-mentioned embodiments, and thus the program code and the storage medium storing the program code constitute a part of the present invention.

[0122] The storage medium embodiments for providing the program code include a floppy disk, a hard disk, a magneto-optical disk, an optical disk (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RYM, DVD-RW, DVD+RW), a magnetic tape, a non-volatile memory card, and a ROM. Alternatively, the program code can be downloaded from a server computer via a communication network.

[0123] In addition, it should be clear that the functions of any of the above embodiments can be implemented not only by executing the program code read by the computer, but also by enabling an operating system operating on the computer to complete part or all of the actual operations based on instructions from the program code.

[0124] In addition, it can be understood that the program code read from the storage medium is written to a memory provided in an expansion board inserted into the computer or written to a memory provided in an expansion unit connected to the computer, and then based on the instructions of the program code, a CPU installed on the expansion board or the expansion unit is enabled to perform part or all of the actual operations, thereby realizing the functions of any of the above-mentioned embodiments.

[0125] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for automatically generating a sample sampling plan based on multi-source supply, characterized in that: The method is as follows: S1. Formulate supplier sampling line information: a supplier maintains multiple lines, and a line includes multiple storage stations. The storage stations on the line cannot be repeated. A storage station only exists in one line. The supplier line information is stored in the storage device for subsequent use; S2. Supplier inspection report, obtain supplier inspection report record; S3. After the supplier's inspection report is completed, the sampling inspection plan is automatically generated.

2. The method for automatically generating a sample sampling plan based on multi-source supply according to claim 1, characterized in that: The automatic generation of the sampling inspection plan in step S3 is as follows: S301, obtaining supplier inspection records sorted by time; S302: Determine whether the total number of suppliers meets the limit on the number of suppliers required for inspection: ①If not, jump to step S310; ② If yes, execute step S303; S303. Obtain the total number of samples reported by each supplier (s1:num1, s2:num2, s3:num3), and determine whether the number of samples reported by each supplier meets the sample quantity limit for each supplier: ① If not, remove the supplier that does not meet the generation conditions and jump to step S301; ② If yes, execute step S304; S304. Total the number of samples reported by the supplier for inspection, and determine whether the total number of samples reported by the supplier meets the total number of samples reported by the supplier for inspection limit: ① If not, remove the supplier that does not meet the generation conditions and jump to step S301; ② If yes, execute step S305; S305, traverse the suppliers and determine the suppliers participating in the calculation; S306. Calculate the number of samples to be inspected for each supplier based on the supplier's annual planned quantity; S307. Calculate the actual quantity of each supplier to be inspected; S308, traversing each supplier's line according to the supplier's line information, and generating a sampling line; S309: Determine whether the automatic generation of the sampling inspection plan is successful: ①. If yes, execute step S310; ② If not, remove the supplier that does not meet the generation conditions and jump to step S301; S310, end.

3. The method for automatically generating a sample sampling plan based on multi-source supply according to claim 2, characterized in that: When a supplier submits a sample inspection, the time of the supplier's sample inspection submission and the information of the storage station where the sample is located are recorded, and the time of the supplier's sample inspection submission and the information of the storage station where the sample is located are stored in a storage device with storage attributes.

4. The method for automatically generating a sample sampling plan based on multi-source supply according to claim 2, characterized in that: In step S305, the supplier traversal and determination of the supplier participating in the calculation are as follows: Traverse the suppliers and calculate the total number of samples reported by the suppliers. When the total value is greater than the total number of samples reported by the supplier, stop traversing and save the traversed suppliers and the corresponding number of reported samples to obtain the supplier objects participating in the calculation. Among them, the traversed suppliers and the corresponding number of reported samples are stored in the sequence to be inspected.

5. The method for automatically generating a sample sampling plan based on multi-source supply according to claim 2, characterized in that: The calculation formula for the number of samples to be tested of each supplier in step S306 is as follows: Number of samples to be inspected for each supplier = SAMPLING_SUM_LIMIT*RATIO Among them, SAMPLING_SUM_LIMIT indicates the total number of samples reported by the supplier for inspection; 6. The method for automatically generating a sample sampling plan based on multi-source supply according to claim 2, characterized in that: Step S307 The calculation rules for the actual quantity to be inspected of each supplier are as follows: (1) The quantity that supplier s1 calculated to be inspected is n1, but the quantity reported by supplier s1 is m1. Then the actual quantity that supplier s1 should inspect is m1, and the remainder is n1-m1. (2) The quantity to be inspected by supplier S2 is N2, and the quantity reported by supplier S2 is M2. The situation is as follows: ①If n2+(n1-m1)<m2, then the actual quantity to be inspected of supplier s2 is [n2+(n1-m1)]; ② If n2+(n1-m1)≥m2, the actual quantity to be inspected of supplier s2 is the maximum reported quantity m2 of supplier s2, and the remaining margin is [n2+(n1-m1)-m2]; (3) Continue to calculate the actual reported quantities of the remaining suppliers according to the rules of (1) and (2) until the allocation is completed, and then obtain the suppliers and their corresponding actual inspection data for this time.

7. The method for automatically generating a sample sampling plan based on multi-source supply according to claim 2, characterized in that: In step S308, the supplier lines are traversed according to the supplier line information to generate the sampling line as follows: Query the detailed inspection records of each supplier in ascending time order and obtain the routes of each supplier; Traverse each supplier's line, match the stacks contained in the storage and collection stations maintained in the line with the sample stacks reported in the records, and retain the final sampling plan results.

8. The method for automatically generating a sample sampling plan based on multi-source supply according to claim 2, characterized in that: Match the inspection sample stack with the stacks contained in the stations in the line, as follows: ① If there is exactly one route that meets the requirements, the corresponding route will be retained as the final result; ② If multiple lines meet the requirements at the same time, the line with the earliest sample inspection time will be taken as the final result. ③ If there are multiple routes that meet the requirements and the number of stacks on each route is greater than 3, the corresponding route is saved as the final result; the specific reason for saving the corresponding route as the final result is: the number of inspection reports from supplier s2 is m2, there are p2 on route 1, and (m2-p2) on route 2, then route 1 and route 2 are saved; ④ If there are multiple routes that meet the requirements and the number of samples submitted by the supplier on all routes is less than 3, then end the calculation, delete the supplier from the set obtained in step S301, and start the calculation again from step S302 until a record that meets the conditions is obtained; ⑤ If after repeated calculations, the supplier set is empty and no route that meets the conditions is obtained, the sampling generation is terminated.

9. An electronic device, characterized in that: include: memory and at least one processor; Wherein, the memory stores a computer program; The at least one processor executes the computer program stored in the memory, so that the at least one processor performs the method for automatically generating a sample sampling plan based on multi-source supply as described in any one of claims 1 to 8.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which can be executed by a processor to implement the method for automatically generating a sample sampling plan based on multi-source supply as described in any one of claims 1 to 8.