CN113887950A - Method, system and storage medium for automatic sampling inspection of pharmaceutical raw materials - Google Patents

Method, system and storage medium for automatic sampling inspection of pharmaceutical raw materials Download PDF

Info

Publication number
CN113887950A
CN113887950A CN202111162687.5A CN202111162687A CN113887950A CN 113887950 A CN113887950 A CN 113887950A CN 202111162687 A CN202111162687 A CN 202111162687A CN 113887950 A CN113887950 A CN 113887950A
Authority
CN
China
Prior art keywords
sampling
bar code
goods
batch
sample
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111162687.5A
Other languages
Chinese (zh)
Inventor
谷雄
吴剑敏
包卿
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Mingdu Zhiyun Zhejiang Technology Co Ltd
Original Assignee
Mingdu Zhiyun Zhejiang Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Mingdu Zhiyun Zhejiang Technology Co Ltd filed Critical Mingdu Zhiyun Zhejiang Technology Co Ltd
Priority to CN202111162687.5A priority Critical patent/CN113887950A/en
Publication of CN113887950A publication Critical patent/CN113887950A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • G06Q10/063Operations research, analysis or management
    • G06Q10/0631Resource planning, allocation, distributing or scheduling for enterprises or organisations
    • G06Q10/06311Scheduling, planning or task assignment for a person or group
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • G06Q10/063Operations research, analysis or management
    • G06Q10/0639Performance analysis of employees; Performance analysis of enterprise or organisation operations
    • G06Q10/06393Score-carding, benchmarking or key performance indicator [KPI] analysis
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • G06Q10/063Operations research, analysis or management
    • G06Q10/0639Performance analysis of employees; Performance analysis of enterprise or organisation operations
    • G06Q10/06395Quality analysis or management
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/04Manufacturing
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Business, Economics & Management (AREA)
  • Human Resources & Organizations (AREA)
  • Engineering & Computer Science (AREA)
  • Strategic Management (AREA)
  • Economics (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Development Economics (AREA)
  • Educational Administration (AREA)
  • General Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • Marketing (AREA)
  • Tourism & Hospitality (AREA)
  • Physics & Mathematics (AREA)
  • Game Theory and Decision Science (AREA)
  • Quality & Reliability (AREA)
  • Operations Research (AREA)
  • Manufacturing & Machinery (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Primary Health Care (AREA)
  • Medical Treatment And Welfare Office Work (AREA)

Abstract

The invention discloses a control method, a system and a storage medium for automatic sampling inspection of pharmaceutical raw materials, which comprises the steps of analyzing a sampling inspection instruction of the pharmaceutical raw materials, inquiring the quantity of the pharmaceutical raw materials in a corresponding batch according to batch information of the pharmaceutical raw materials to be inspected, generating an inspection request form of the pharmaceutical raw materials to be inspected, receiving the inspection request form and acquiring sampling working parameters of the inspection request form, calling a preset sample configuration value if the sampling working parameters are first sampling parameters, inputting corresponding goods bar code information acquired from the batch of the pharmaceutical raw materials into a sampling inspection sample information base according to the preset sample configuration value, and performing equal-probability sampling on goods in the pharmaceutical raw materials to be inspected and inputting the extracted goods bar code information into the sampling inspection sample information base if the sampling working parameters are second sampling parameters. The random sampling analysis of the corresponding goods in the application form can be realized, the manual intervention on the sampled goods is reduced, and the automatic sampling based on the batch of the medicine raw materials is realized.

Description

Automatic sampling inspection control method and system for medicine raw materials and storage medium
Technical Field
The invention relates to the field of intelligent manufacturing, in particular to a method and a system for controlling automatic sampling inspection of medicine raw materials and a storage medium.
Background
In recent years, production management of drug administration enterprises has brought considerable pressure along with various influences of deepening of national supervision on drug enterprises, frequent emergence of regulations and gradual convergence of the regulations to the international world. Various pharmaceutical enterprises also gradually begin to recognize the importance of improving the production efficiency of medicines and improving the quality control of raw materials, and a plurality of pharmaceutical enterprises gradually increase the investment on the quality control of raw materials.
However, most pharmaceutical enterprises are carrying out quality management work at present, and when medicine quality inspection is carried out, in the process of quality inspection on medicine raw materials, a large amount of manual sampling operations are still carried out on batch materials by using workers, the process of manually screening and sampling materials is time-consuming and labor-consuming, the problem of manual intervention or interference in sampling is more serious in manual screening and sampling, and the requirement on compliance is difficult to meet.
Disclosure of Invention
The invention provides a control method for automatic sampling inspection of medicine raw materials, aiming at the defects in the prior art, and the control method comprises the following steps:
s1, analyzing the sampling instruction of the medicine raw material, and generating sampling working parameters according to the attribute of the medicine raw material, the batch information of the medicine raw material to be detected or the sampling mode information, wherein the sampling working parameters comprise a first sampling parameter and a second sampling parameter;
s2, inquiring the quantity of the raw materials of the medicines in the corresponding batch according to the batch information of the raw materials of the medicines to be detected, and generating a request for testing the raw materials to be detected, wherein the request for testing the raw materials to be detected comprises but is not limited to one or more of sampling working parameters, the batch of the raw materials to be detected, the identity information of a submitter and the number of preset sampling samples;
and S3, receiving the request form and obtaining the sampling working parameters, if the request form is the first sampling parameter, calling a preset sample configuration value, inputting the corresponding goods bar code information obtained from the batch of raw materials into the sampling sample information base according to the preset sample configuration value, and if the request form is the second sampling parameter, sampling the goods in the raw materials to be detected at equal probability, and inputting the extracted goods bar code information into the sampling sample information base.
Preferably, the step S3 specifically includes:
s31, if the sampling working parameter is the second sampling parameter, the batch of the raw material to be detected is obtained, and when the batch of the raw material to be detected is only one batch, all the goods bar code tables in the batch of the raw material are obtained from the raw material information database according to the batch of the raw material to be detected;
s32, judging whether the quantity of the goods in the batch of raw materials is less than or equal to the preset sampling sample quantity, if so, inputting all the goods bar codes into a sampling sample information base;
and S33, if the quantity of the goods in the batch of raw materials is larger than the preset sampling sample quantity, calling a preset sampling strategy corresponding to the property of the pharmaceutical raw materials to carry out equal-probability sampling on the goods bar codes in the goods bar code table, and inputting the extracted goods bar code information into a sampling sample information base.
Preferably, the step S33 specifically includes:
s331, if the quantity of the goods in the batch of raw materials is greater than the preset sampling number, sequentially inputting k pieces of goods bar code information arranged in a goods bar code table into a first sample library, wherein k is not greater than the preset sampling number m, and inputting each subscript of the goods bar code information entering the first sample library into a second sample library;
s332, sequentially judging whether the current goods bar code information is recorded into a first sample library or not according to the probability of k/(k +1) of the remaining goods bar code information in the goods bar code table, recording the subscript of the goods bar code information into a second sample library when the new goods bar code information is recorded into the first sample library, randomly selecting one piece of goods bar code information from the first sample library, moving the goods bar code information out of the first sample library, and taking the first sample library as a sampling inspection sample information library after all the goods bar code information in the goods bar code table is traversed.
Preferably, the step S32 specifically includes:
s321, analyzing all the goods bar code tables in the batch of raw materials to obtain the quantity of the goods in the batch of raw materials, and inputting all the goods bar codes into a sampling inspection sample information base if the quantity of the goods is less than a first preset value;
s322, if the quantity of the goods is larger than a first preset value, the first preset value is lower than a preset sampling number, and the preset sampling number is smaller than a second preset value, the root number of the quantity of the goods is rounded to be used as an adjustment sample base number;
s322, if the quantity of the goods is larger than the first preset value and the preset sampling number is larger than the second preset value, taking half of the root number rounding value of the quantity of the goods as the base number of the adjusting sample.
Preferably, the step S3 further includes:
s34, if the sampling working parameter is the second sampling parameter, the batch of the raw material to be detected is obtained, when the batch of the raw material to be detected is a plurality of batches, all the goods bar codes in each batch of the raw material are obtained from the raw material information database, and whether the goods bar codes of each batch are mixed or not is judged according to the production information of each batch and then is recorded into a first goods bar code table;
s35, if the goods bar code information of each batch is mixed and then recorded into a first goods bar code table, the goods bar code information in the first goods bar code table is randomly selected by adopting a random arrangement algorithm to carry out position interchange on the goods bar code information to form a second goods bar code table, the randomness of the second goods bar code table is verified to be in accordance with the preset probability, then the goods in the second goods bar code table are sampled at equal probability, and the extracted goods bar code information is recorded into a sampling inspection sample information base.
The invention also discloses a control system for automatic sampling inspection of the raw materials of the medicine, which comprises the following components: the analysis module is used for analyzing the sampling instruction of the medicine raw material and generating sampling working parameters according to the attribute of the medicine raw material, the batch information of the medicine raw material to be detected or the sampling mode information, wherein the sampling working parameters comprise a first sampling parameter and a second sampling parameter; the test request form generation module is used for inquiring the quantity of the medicine raw materials in the corresponding batch according to the batch information of the medicine raw materials to be detected and generating a test request form of the raw materials to be detected, wherein the test request form of the raw materials to be detected comprises but is not limited to one or more of sampling working parameters, the batch of the raw materials to be detected, submitting person identity information and preset sampling sample number; the sampling module is used for receiving the application form for examination and acquiring sampling working parameters of the application form, calling a preset sample configuration value if the sampling parameter is a first sampling parameter, inputting the corresponding goods bar code information acquired from the batch of raw materials into the sampling sample information base according to the preset sample configuration value, and performing equal-probability sampling on the goods in the batch of raw materials to be detected if the sampling parameter is a second sampling parameter, and inputting the extracted goods bar code information into the sampling sample information base.
Preferably, the sampling module specifically includes: the goods bar code table acquisition module is used for acquiring a raw material batch to be detected when the sampling working parameter is the second sampling parameter, and acquiring all goods bar code tables in the raw material batch from the raw material information database according to the raw material batch to be detected when the raw material batch to be detected is only one batch; the first sample module is used for inputting all the goods bar codes into the sampling sample information base when the quantity of the goods in the batch of raw materials is less than or equal to the preset sampling sample quantity; and the second sample module is used for calling a preset sampling strategy corresponding to the property of the pharmaceutical raw material to carry out equal probability sampling on each product bar code in the product bar code table when the quantity of the products in the batch of raw materials is greater than the preset sampling sample quantity, and inputting the extracted product bar code information into a sampling sample information base.
Preferably, the second sample block specifically includes: the information input module is used for sequentially inputting k pieces of goods bar code information arranged in the goods bar code table into a first sample library when the number of the goods in the batch of raw materials is larger than the preset sampling sample number, wherein k is not larger than the preset sampling sample number m, and the subscript of each piece of goods bar code information entering the first sample library is input into a second sample library; and the sample judging module is used for sequentially judging whether the current goods bar code information is input into the first sample library or not according to the probability of k/(k +1) of the residual goods bar code information in the goods bar code table, inputting the subscript of the goods bar code information into the second sample library when new goods bar code information is input into the first sample library, randomly selecting one piece of goods bar code information from the first sample library, moving the selected goods bar code information out of the first sample library, and taking the first sample library as a sampling inspection sample information library after all the goods bar code information in the goods bar code table is traversed.
The invention also discloses a medicine raw material automatic sampling control device which comprises a memory, a processor and a computer program which is stored in the memory and can run on the processor, wherein the processor realizes the steps of any one of the medicine raw material automatic sampling control methods when executing the computer program.
The invention also discloses a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to realize the steps of the automatic sampling inspection control method for the medicine raw materials.
The automatic sampling control method and the system for the medicine raw materials generate different sampling working parameters according to the attributes of the medicine raw materials, the batch information or the sampling mode information of the medicine raw materials to be detected, then inquire the quantity of the medicine raw materials in the corresponding batch according to the batch information of the medicine raw materials to be detected, generate a request for testing the raw materials to be detected, and then automatically select different sampling modes according to the request for testing the raw materials and the working parameters to sample the corresponding batch of the goods. The method and the device realize flexible configuration of goods quality inspection strategies, can generate a sampling schedule after receiving the request-to-test application form, and improve the flow circulation efficiency of the request-to-test process. The method can realize random sampling analysis of the goods corresponding to the quality management application form and find the quality difference of the goods in batches. The method is suitable for large base numbers of goods, avoids human factor guidance, reduces manual intervention on sampled goods, and avoids the problem of incomplete quality inspection coverage caused by sampling without hashing. Finally, automatic sampling of medicines based on batches is achieved, the problems of low efficiency and easiness in manual sampling are solved, medicine enterprises are helped to better control the quality of medicines, the speed and the efficiency of quality inspection of raw materials of pharmaceutical enterprises are improved, and the production progress of medicines is accelerated.
Additional aspects and advantages of the invention will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the invention.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
fig. 1 is a schematic flow chart of the automatic sampling inspection control method for pharmaceutical raw materials disclosed in this embodiment.
Fig. 2 is a schematic flowchart of step S3 disclosed in this embodiment.
Fig. 3 is a schematic flowchart of step S32 disclosed in this embodiment.
Fig. 4 is a schematic flowchart of step S33 disclosed in this embodiment.
Fig. 5 is another specific flowchart of step S3 disclosed in this embodiment.
Fig. 6 is a schematic flowchart of step S34 disclosed in this embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the drawings of the embodiments of the present invention. It is to be understood that the embodiments described are only a few embodiments of the present invention, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the described embodiments of the invention without any inventive step, are within the scope of protection of the invention.
In the description of the present invention, it is to be understood that the terms "first", "second" and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implying any number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of the present invention, "a plurality" means two or more unless specifically defined otherwise.
In the present invention, unless otherwise expressly specified or limited, the terms "mounted," "connected," "secured," and the like are to be construed broadly and can, for example, be fixedly connected, detachably connected, or integrally connected; can be mechanically or electrically connected; they may be connected directly or indirectly through intervening media, or they may be interconnected between two elements. The specific meanings of the above terms in the present invention can be understood by those skilled in the art according to specific situations.
In the present invention, unless otherwise expressly stated or limited, "above" or "below" a first feature means that the first and second features are in direct contact, or that the first and second features are not in direct contact but are in contact with each other via another feature therebetween. Also, the first feature being "on," "above" and "over" the second feature includes the first feature being directly on and obliquely above the second feature, or merely indicating that the first feature is at a higher level than the second feature. A first feature being "under," "below," and "beneath" a second feature includes the first feature being directly under and obliquely below the second feature, or simply meaning that the first feature is at a lesser elevation than the second feature.
The pharmaceutical industry has seen a great deal of growth in recent years, and there are also many challenges. With the increase of the supervision of the medicine enterprises by the state, the frequent departure of the laws and regulations, the gradual convergence of the laws and regulations and the international influence and other aspects, the medicine administration enterprises bring considerable pressure. Medicine enterprises do not break to recognize the importance of improving the production efficiency of medicines and improving the quality control of raw materials, and a plurality of pharmaceutical enterprises gradually increase the investment on the quality control of raw materials. However, through research on domestic pharmaceutical enterprises and research on national policy and regulation, it is found that in quality management work of pharmaceutical enterprises, a large amount of manual sampling operations of batch materials still exist in the quality inspection process, and the process is time-consuming and labor-consuming. The manual screening and sampling mode has the defects of low sampling efficiency and the possibility of manual intervention sampling, and the requirement on compliance is difficult to meet. In order to solve the defects, the invention provides a method for controlling the automatic sampling of the raw materials of the medicines, which can realize the automatic sampling of the medicines based on batches, solve the problems of low efficiency and easy error of manual sampling, help medicine enterprises to better control the quality of the medicines, meet the requirements of national regulations, accelerate the raw material quality inspection speed of pharmaceutical enterprises, improve the quality inspection efficiency and accelerate the production progress of the medicines. As shown in fig. 1, the method for controlling automatic sampling inspection of pharmaceutical raw materials disclosed in this embodiment specifically includes the following steps.
Step S1, analyzing the sampling instruction of the medicine raw material, and generating sampling working parameters according to the attribute of the medicine raw material, the batch information of the medicine raw material to be detected or the sampling mode information, wherein the sampling working parameters comprise a first sampling parameter and a second sampling parameter. In this embodiment, the first sampling parameter is non-automatic sampling, and the second sampling parameter is automatic sampling.
Whether each item is automatically sampled may form a data structure,
{
"Autosample": 1,// automatic sampling 1 automatic sampling 0 non-automatic sampling
}
The automatically sampled goods may be formed into a data structure,
Figure BDA0003290739460000051
Figure BDA0003290739460000061
the autoSample field is used for marking whether the sampling mode of the medicine raw material is automatic sampling or not and is used as basic data when receiving a request for examination and application. The barcode id field is the randomly sampled goods barcode information and also serves as the basic data for generating the sampling plan.
Step S2, the quantity of the raw materials of the medicine in the corresponding batch is inquired according to the batch information of the raw materials of the medicine to be detected, and a request for the inspection of the raw materials to be detected is generated, wherein the request for the inspection of the raw materials to be detected includes but is not limited to one or more of sampling working parameters, the batch of the raw materials to be detected, the identity information of a submitter and the number of predetermined sampling samples. Wherein the predetermined sampling number is the number of samples required to be sampled in the sampling operation.
And step S3, receiving the request for examination and obtaining the sampling working parameters, if the request is the first sampling parameter, calling a preset sample configuration value, inputting the corresponding goods bar code information obtained from the batch of raw materials into the sampling sample information base according to the preset sample configuration value, and if the request is the second sampling parameter, sampling the goods in the batch of raw materials to be examined at equal probability, and inputting the extracted goods bar code information into the sampling sample information base.
In this embodiment, the autoSample field is used to mark whether the sampling mode of the pharmaceutical material is automatic sampling, and is used as the basic data when receiving the request form. The barcode id field is the randomly sampled goods barcode information and also serves as the basic data for generating the sampling plan. After the two basic data are obtained, the receiving result, namely the sampling schedule data, is persisted after the basic data are calculated when the request-to-check application list is received. Any relational, non-relational database, such as MySQL, SqlServer, Oracle, MongoDB, Elasticissearch, etc., may be selected for persistence of the sample plan data. The first sampling parameter is non-automatic sampling, that is, the corresponding goods bar code information obtained from the batch of raw materials is input into the sampling inspection sample information base according to a set sample configuration value, and the sample configuration value can be a specific sampling rule, for example, sampling according to the goods bar code information interval or sampling according to a preset goods bar code judgment mode, and the like.
As shown in fig. 2, in this embodiment, step S3 specifically includes:
and step S31, if the sampling working parameter is the second sampling parameter, acquiring the batch of the raw material to be detected, and acquiring all the goods bar code tables in the batch of the raw material from the raw material information database according to the batch of the raw material to be detected when the batch of the raw material to be detected is only one batch.
Step S32, determining whether the quantity of the goods in the batch of raw materials is less than or equal to the predetermined number of the sampling samples, if so, inputting all the goods bar codes into the sampling sample information base.
As shown in fig. 3, the step S32 specifically includes:
step S321, analyzing all the goods bar code tables in the batch of raw materials to obtain the quantity of the goods in the batch of raw materials, and inputting all the goods bar codes into the sampling inspection sample information base if the quantity of the goods is less than a first preset value.
Step S322, if the quantity of the goods is larger than a first preset value, the first preset value is lower than the preset sampling number, and the preset sampling number is smaller than a second preset value, the root number of the quantity of the goods is rounded and used as the base number of the adjustment sample.
In step S322, if the quantity of the goods is greater than the first preset value and the predetermined sampling number is greater than the second preset value, half of the root number rounding value of the quantity of the goods is used as the adjustment sample base number.
Specifically, all the goods bar code information List < Long > bar code ids corresponding to the batch is inquired according to the batch number of the request for verification application, and if the number n of the goods bar code information bar code ids corresponding to the batch is less than 3, that is, in this embodiment, the minimum sampling number, that is, the first preset value is set to 3, the bar code ids is directly returned as the sampling record. Otherwise, firstly carrying out root cutting operation on n and rounding up to obtain a sampling reference number i, wherein if m is less than or equal to 300, the sampling number m is i +1, otherwise, m is i/2+ 1. And randomly taking the barcode IDs as a data source and the m as the sampling number, and returning the barcode IDs as a random sampling record if n of the barcode IDs is less than the sampling number m during random value taking.
And step S33, if the quantity of the goods in the batch of raw materials is larger than the preset sampling sample quantity, calling a preset sampling strategy corresponding to the property of the pharmaceutical raw materials to carry out equal probability sampling on the goods bar codes in the goods bar code table, and inputting the extracted goods bar code information into a sampling sample information base.
As shown in fig. 4, the step S33 specifically includes the following steps.
Step S331, if the quantity of the goods in the batch of raw materials is greater than the preset sampling number, sequentially inputting k pieces of goods bar code information arranged in the goods bar code table into a first sample library, wherein k is not greater than the preset sampling number m, and inputting each subscript of the goods bar code information entering the first sample library into a second sample library.
Step S332, sequentially judging whether the current goods bar code information is recorded into a first sample library or not according to the probability of k/(k +1) of the remaining goods bar code information in the goods bar code table, recording the subscript of the goods bar code information into a second sample library when the new goods bar code information is recorded into the first sample library, randomly selecting one piece of goods bar code information from the first sample library, moving the goods bar code information out of the first sample library, and taking the first sample library as a sampling inspection sample information library after all the goods bar code information in the goods bar code table is traversed.
Specifically, in this embodiment, for random sampling of a single batch, the total amount of data is limited, and we need to randomly select k samples from the batch, which requires equal probability of each sample being selected. Using a custom sampling algorithm, first put k numbers into a first sample library, followed by each number (>k) The probability of k/k +1 is used for exchanging the data into the first sample library, and one number in the first sample library is randomly selected for exchanging the data. For n (n)>K) if at each time
Figure BDA0003290739460000071
Determines whether to put it into the first sample library up to n, then finally each element is chosen with equal probability, i.e. is
Figure BDA0003290739460000072
Let some element α, and α ≦ n, then the probability that it was last selected is: probability of its selection [ elements after it have not been selected + elements after it have been selected ] without replacing alpha]Namely:
Figure BDA0003290739460000081
Figure BDA0003290739460000082
defining n as the total size of the list to be extracted and m as the number of samples to be extracted. To ensure that the probability of each sample being drawn is
Figure BDA0003290739460000083
The first sample is pressed
Figure BDA0003290739460000084
For the second sample, if the first sample is decimated, its probability of being decimated is
Figure BDA0003290739460000085
If the first sample is not drawn, its probability of being drawn is
Figure BDA0003290739460000086
The probability that the second sample is drawn is
Figure BDA0003290739460000087
Figure BDA0003290739460000088
For the ith sample, the probability of being drawn is
Figure BDA0003290739460000089
Where k is the number of previously decimated samples, k<M. I.e. the ith sample, m-k samples need to be taken out of the remaining n-i +1 samples if k samples have been taken out earlier. When the automatic sampling record is associated with the request for examination and application form, all the bar code information List of the goods corresponding to the batch is inquired according to the batch number of the request for examination form<Long>The barcode ids, if the number n of barcode ids is less than 3, is returned directly as a sample record. Otherwise, firstly carrying out root cutting operation on n and rounding up to obtain a sampling reference number i, wherein if m is less than or equal to 300, the sampling number m is i +1, otherwise, m is i/2+ 1. And randomly taking the barcode IDs as a data source and the m as the sampling number, and returning the barcode IDs as a random sampling record if n of the barcode IDs is less than the sampling number m during random value taking.
In particular embodiments, a function random (List) may be defined<Long>barcode ids, int m), the method is used for randomly selecting m barcode information from barcode ids batch barcode information, defining the number of the barcode information which has been extracted, namely, the second sample library checkedNum ═ m, the total number of batch barcode information len ═ barcode ids<Long>list, key value pair Map<int,Long>A checkedMap to mark whether a random value subscript exists and an array int [ 2 ] with a size of m]result is used to store the first m elements in the total bar code barcode bits sampled, in the cycle for (int i ═ 0; i)<m; i + +) put the first m elements directly into result [ i + ] in the array]Get (i), in cycles for (int i ═ m; i)<len; probability of m +1 elements in i + +)Sampling, firstly calculating a Random index int index (Random. nextInt (i +1) (here, a Java Api existing function Random is used), and if the index is less than the number m to be sampled, if the index does not include the index at this time in the checkedMap, assigning barcode IDs]If (r)<m)result[r]Get (i), here just mentioned above, extracted to probability
Figure BDA00032907394600000810
The embodiment (1) is described. Then record the index of the index currently drawn randomly into the checkedMap. And returning a result array as a sampling result set after the two cycles are finished, and finally inputting the sampling result set, namely the extracted goods bar code information into a sampling inspection sample information base. Meanwhile, the random sampling algorithm fully considers the comparison between the number of the sampling samples and the total number, records the random sampling subscript, and avoids repeated sampling of a certain product, so that the method has stronger universality and can improve the sampling efficiency and the coverage range of quality inspection.
In other embodiments, as shown in fig. 5, the step S3 further includes:
and step S34, if the sampling working parameter is the second sampling parameter, acquiring the batch of the raw material to be detected, and when the batch of the raw material to be detected is a plurality of batches, acquiring all the goods bar codes in each batch of the raw material from the raw material information database, and judging whether the goods bar code information of each batch is mixed or not according to the production information of each batch and then inputting the mixed goods bar codes into the first goods bar code table.
Specifically, the production time interval of each batch of raw materials to be detected before and after each batch of production information is obtained, if the production time interval of multiple batches of production information is less than the preset time, the product bar code information of the batches is mixed and then is recorded into a first product bar code table, otherwise, the product bar code information of each batch is separately recorded into the corresponding product bar code table.
As shown in fig. 6, in the present embodiment, step S34 specifically includes:
step S341, obtaining a batch time span of each batch of the raw materials to be detected, where the batch time span is a time interval between the earliest produced goods and the latest produced goods in the batch of the raw materials to be detected.
Step S342, calculating a production time interval between the batches of the raw materials to be inspected, wherein the production time interval is a time interval between the latest produced goods in the raw materials to be inspected in the earlier batch and the earliest produced goods in the raw materials to be inspected in the later batch.
Step S343, traversing the batch time span and the production time interval of each batch of raw materials to be detected, obtaining one or more related batches of raw material groups to be detected, wherein the related batches of raw materials to be detected are the batches of raw materials to be detected, the proportion of the production time interval of the two batches of raw materials to be detected to the sum of the two batches of time spans is lower than a preset value, and recording the information of the bar codes of all batches of the goods in the related batches of raw material groups to be detected into the same first goods bar code table after mixing. The preset value can be preset before the inspection according to the actual condition of the goods to be inspected, for example, if the preset value is set to 1, when the time interval between the latest produced goods in the previous lot of the goods to be inspected in the two lots of the goods to be inspected and the earliest produced goods in the next lot of the goods to be inspected is less than or equal to the sum of the time spans of the two lots, the two lots of the goods to be inspected are marked as related lots. The production time of the raw materials to be detected between related batches is close, so that the processing environment state, the equipment state and the raw material parameters of the two batches are very close during production, and the raw materials to be detected can be approximately used as the raw materials produced with the same production parameters for mixed sampling inspection. When the two batches of raw materials to be detected are not considered to be related batches, namely the proportion of the production time interval of the two batches of raw materials to be detected to the sum of the time span of the two batches exceeds a preset value, due to the fact that the production interval time of goods in the two batches is too long, when various batches of goods are produced and processed, the equipment states of the two batches of raw materials are different due to different working time, the processing deviation caused by working loss can be different when the raw materials are produced, or some environmental parameters in the processing environment are slightly different due to different seasons, or the internal parameters are slightly different due to the fact that part of the raw materials adopt different suppliers due to too long interval time, so that partial influence is caused on the final parameters to be sampled and inspected of the two batches, the two batches of raw materials to be detected are more suitable for being respectively and individually sampled, and the problem that the possible reject ratio of goods in one batch is high can be timely found, therefore, the quality state of the whole goods can be accurately obtained, and meanwhile, the goods in the problem batch can be more effectively positioned.
Step S35, if the goods bar code information of each batch is mixed and then recorded into a first goods bar code table, the goods bar code information in the first goods bar code table is randomly selected by adopting a random arrangement algorithm to carry out position interchange on the goods bar code information to form a second goods bar code table, the second goods bar code table is subjected to randomness verification to meet the preset probability, then the goods in the second goods bar code table are sampled at equal probability, and the extracted goods bar code information is recorded into a sampling inspection sample information base. The sampling inspection sample information base stores sampling inspection sample groups respectively corresponding to the second goods bar code tables and sampling inspection sample groups corresponding to the remaining goods of the independent batches which are not mixed because the related batches do not exist.
The step S35 specifically includes:
and step S351, randomly selecting the goods bar code information in the first goods bar code table by adopting a random arrangement algorithm to carry out position interchange on the goods bar code information, and then forming a second goods bar code table.
Specifically, when performing the mixed sampling inspection on a plurality of batches, the data sets of the plurality of batches are mixed and scrambled, and in order to ensure that the data sets of the plurality of batches are arranged in a random and chaotic manner, in this embodiment, a random scrambling algorithm is adopted to randomly select elements for exchanging. Firstly, defining a method randInt min, int max for obtaining a random integer in a closed interval [ min, max ], calling random. nextnt (min, max) to obtain a random value between [ min, max ], then defining a random scrambling algorithm shuffle (List < Long > List), defining a defined variable length ═ list.size () in the algorithm, randomly selecting an element by circularly calling randInt (i, length-1), and then exchanging the ith bit data list.get (i) ═ list.get (rand) in the List.
Step S352, after the randomness verification is carried out on the second goods bar code table to meet the preset probability, whether the quantity of the goods in the second goods bar code table is smaller than or equal to the preset sampling sample quantity or not is judged, and if yes, all the goods bar codes are recorded into a sampling sample information base. Wherein, a Monte Carlo method can be adopted to verify that the result set after data exchange in the above steps is random enough, and the times of all permutation and combination of the list are listed to be made into a histogram display. Assuming that list is {1, 2, 3,4}, after each scrambling, the frequency corresponding to the obtained scrambling result is added by one and repeated for 100 ten thousand times, and if the total times of occurrence of each result are similar, the probability of occurrence of each result should be equal.
And S353, if the quantity of the goods is larger than the preset sampling sample quantity, calling a preset sampling strategy corresponding to the property of the drug raw material to carry out equal-probability sampling on the goods bar codes in the goods bar code table, and inputting the extracted goods bar code information into a sampling sample information base.
The step S353 specifically includes:
step S3531, if the number of the goods in the second goods bar code table is larger than the preset sampling number, sequentially inputting the k pieces of goods bar code information before arrangement in the goods bar code table into a first sample library, wherein k is not larger than the preset sampling number m, and inputting the subscript of each piece of goods bar code information entering the first sample library into a second sample library.
Step S3532, whether the current goods bar code information is recorded into a first sample library or not is sequentially judged according to the probability of k/(k +1) of the remaining goods bar code information in the goods bar code table, when new goods bar code information is recorded into the first sample library, the subscript of the goods bar code information is recorded into a second sample library, one piece of goods bar code information is randomly selected from the first sample library and is moved out of the first sample library, and the first sample library is used as a sampling inspection sample information library until all the goods bar code information in the goods bar code table is traversed.
Specifically, similar to the step S33, k samples are randomly selected from the second item barcode table obtained by mixing the barcode information of the items in each batch, and the probability of each sample being selected is required to be equal. Using a custom sampling algorithm, first put k numbers into a first sample library, followed by each number (>k) All exchange the probability of k/k +1 into the first sample libraryAnd randomly selecting a number in the first sample library for exchanging when exchanging. For n (n)>K) if at each time
Figure BDA0003290739460000111
Determines whether to put it into the first sample library up to n, then finally each element is chosen with equal probability, i.e. is
Figure BDA0003290739460000112
Let some element α, and α ≦ n, then the probability that it was last selected is: probability of its selection [ elements after it have not been selected + elements after it have been selected ] without replacing alpha]Namely:
Figure BDA0003290739460000113
Figure BDA0003290739460000114
defining n as the total size of the list to be extracted and m as the number of samples to be extracted. To ensure that the probability of each sample being drawn is
Figure BDA0003290739460000115
The first sample is pressed
Figure BDA0003290739460000116
For the second sample, if the first sample is decimated, its probability of being decimated is
Figure BDA0003290739460000117
If the first sample is not drawn, its probability of being drawn is
Figure BDA0003290739460000118
The probability that the second sample is drawn is
Figure BDA0003290739460000119
Figure BDA00032907394600001110
For the ith sample, the probability of being drawn is
Figure BDA00032907394600001111
Where k is the number of previously decimated samples, k<M. That is, when the ith sample is extracted, if k samples are extracted, m-k samples need to be extracted from the remaining n-i +1 samples, and after all the item bar code information in the second item bar code table is traversed, the first sample library is recorded into the sampling inspection sample information library.
After the subsequent goods in the sampling inspection sample information base are sampled and inspected, if the goods qualification rates of the sampling inspection sample groups respectively corresponding to the second goods bar code tables and the sampling inspection sample groups corresponding to the remaining goods of the independent batches which are not mixed because the related batches do not exist are higher than the preset value, the goods bar code information in all batches can be mixed and then recorded into a third goods bar code table, then the goods bar code information in the third goods bar code table is randomly selected by adopting a random arrangement algorithm to carry out position interchange on the goods bar code information to form a fourth goods bar code table, the goods in the fourth goods bar code table are sampled at equal probability, and the extracted goods bar code information is recorded into the sampling inspection sample information base and then is sampled and inspected to obtain the integral qualification rate.
If at least one of the qualification rates of the goods in the sampling sample group corresponding to the sampling sample group respectively corresponding to each second goods barcode table and the sampling sample group corresponding to the remaining goods of the independent batch which are not mixed because the related batch does not exist is lower than the preset value, the warning information is directly sent to the corresponding sampling sample group or the independent batch of the goods, and the whole mixed sampling inspection is not carried out any more.
In the embodiment, the related batch groups are defined according to the relationship between the production time interval of the raw materials to be detected in each batch and the time span between batches, the related batches can be directly mixed and then integrally sampled, and the unrelated batches can be separately sampled, so that the problem that the defective rate of the raw material goods in a specific batch is possibly high can be found in time, the quality state of the whole goods can be accurately obtained, and meanwhile, the problem batch goods can be more effectively positioned.
In other embodiments, a system for controlling automatic sampling of pharmaceutical raw materials is also disclosed, comprising: the analysis module is used for analyzing the sampling instruction of the medicine raw material and generating sampling working parameters according to the attribute of the medicine raw material, the batch information of the medicine raw material to be detected or the sampling mode information, wherein the sampling working parameters comprise a first sampling parameter and a second sampling parameter. The test request form generation module is used for inquiring the quantity of the medicine raw materials in the corresponding batch according to the batch information of the medicine raw materials to be detected and generating a test request form of the raw materials to be detected, wherein the test request form of the raw materials to be detected comprises but is not limited to one or more of sampling working parameters, the batch of the raw materials to be detected, submitting person identity information and preset sampling sample number. The sampling module is used for receiving the application form for examination and acquiring sampling working parameters of the application form, calling a preset sample configuration value if the sampling parameter is a first sampling parameter, inputting the corresponding goods bar code information acquired from the batch of raw materials into the sampling sample information base according to the preset sample configuration value, and performing equal-probability sampling on the goods in the batch of raw materials to be detected if the sampling parameter is a second sampling parameter, and inputting the extracted goods bar code information into the sampling sample information base.
In this embodiment, the sampling module specifically includes: the goods bar code table acquisition module is used for acquiring a raw material batch to be detected when the sampling working parameter is the second sampling parameter, and acquiring all goods bar code tables in the raw material batch from the raw material information database according to the raw material batch to be detected when the raw material batch to be detected is only one batch; the first sample module is used for inputting all the goods bar codes into the sampling sample information base when the quantity of the goods in the batch of raw materials is less than or equal to the preset sampling sample quantity; and the second sample module is used for calling a preset sampling strategy corresponding to the property of the pharmaceutical raw material to carry out equal probability sampling on each product bar code in the product bar code table when the quantity of the products in the batch of raw materials is greater than the preset sampling sample quantity, and inputting the extracted product bar code information into a sampling sample information base.
In this embodiment, the second sample module specifically includes: the information input module is used for sequentially inputting k pieces of goods bar code information arranged in the goods bar code table into a first sample library when the number of the goods in the batch of raw materials is larger than the preset sampling sample number, wherein k is not larger than the preset sampling sample number m, and the subscript of each piece of goods bar code information entering the first sample library is input into a second sample library; and the sample judging module is used for sequentially judging whether the current goods bar code information is input into the first sample library or not according to the probability of k/(k +1) of the residual goods bar code information in the goods bar code table, inputting the subscript of the goods bar code information into the second sample library when new goods bar code information is input into the first sample library, randomly selecting one piece of goods bar code information from the first sample library, moving the selected goods bar code information out of the first sample library, and taking the first sample library as a sampling inspection sample information library after all the goods bar code information in the goods bar code table is traversed.
The specific functions of the above-mentioned automatic sampling control system for pharmaceutical raw materials correspond to those of the automatic sampling control method for pharmaceutical raw materials disclosed in the previous embodiments one to one, so that detailed descriptions thereof are omitted, and reference may be made to the above-mentioned embodiments of the automatic sampling control method for pharmaceutical raw materials. It should be noted that, in the present specification, the embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments may be referred to each other.
In still other embodiments, there is provided an automatic drug substance sampling control device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the automatic drug substance sampling control method described in the above embodiments.
The automatic sampling control device for the pharmaceutical raw materials can include, but is not limited to, a processor and a memory. It will be understood by those skilled in the art that the schematic diagram is merely an example of an automatic drug substance sampling control device, and does not constitute a limitation of an automatic drug substance sampling control device, and may include more or less components than those shown, or some components in combination, or different components, for example, the automatic drug substance sampling control device may further include an input/output device, a network access device, a bus, etc.
The Processor may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. The general purpose processor may be a microprocessor or the processor may be any conventional processor or the like, the processor is a control center of the apparatus for automatic sampling control of pharmaceutical raw materials, and various interfaces and lines are used to connect various parts of the entire apparatus for automatic sampling control of pharmaceutical raw materials.
The memory can be used for storing the computer program and/or the module, and the processor can realize various functions of the device for controlling the automatic sampling inspection of the drug raw materials by operating or executing the computer program and/or the module stored in the memory and calling the data stored in the memory. The memory may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required for at least one function, and the like, and the memory may include a high speed random access memory, and may further include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), at least one magnetic disk storage device, a Flash memory device, or other volatile solid state storage device.
The automatic sampling inspection control device for the medicine raw materials can be stored in a computer readable storage medium if the automatic sampling inspection control device is realized in the form of a software functional unit and is sold or used as an independent product. Based on such understanding, all or part of the processes in the method according to the above embodiments may be implemented by a computer program, which may be stored in a computer readable storage medium and executed by a processor, so as to implement the steps of the above embodiments of the method for controlling automatic sampling of pharmaceutical raw materials. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.
In summary, the above-mentioned embodiments are only preferred embodiments of the present invention, and all equivalent changes and modifications made in the claims of the present invention should be covered by the claims of the present invention.

Claims (10)

1. A control method for automatic sampling inspection of medicine raw materials is characterized by comprising the following steps:
s1, analyzing the sampling instruction of the medicine raw material, and generating sampling working parameters according to the attribute of the medicine raw material, the batch information of the medicine raw material to be detected or the sampling mode information, wherein the sampling working parameters comprise a first sampling parameter and a second sampling parameter;
s2, inquiring the quantity of the raw materials of the medicines in the corresponding batch according to the batch information of the raw materials of the medicines to be detected, and generating a request for testing the raw materials to be detected, wherein the request for testing the raw materials to be detected comprises but is not limited to one or more of sampling working parameters, the batch of the raw materials to be detected, the identity information of a submitter and the number of preset sampling samples;
and S3, receiving the request form and obtaining the sampling working parameters, if the request form is the first sampling parameter, calling a preset sample configuration value, inputting the corresponding goods bar code information obtained from the batch of raw materials into the sampling sample information base according to the preset sample configuration value, and if the request form is the second sampling parameter, sampling the goods in the raw materials to be detected at equal probability, and inputting the extracted goods bar code information into the sampling sample information base.
2. The method for controlling automatic spot check of pharmaceutical raw materials according to claim 1, wherein the step S3 specifically includes:
s31, if the sampling working parameter is the second sampling parameter, the batch of the raw material to be detected is obtained, and when the batch of the raw material to be detected is only one batch, all the goods bar code tables in the batch of the raw material are obtained from the raw material information database according to the batch of the raw material to be detected;
s32, judging whether the quantity of the goods in the batch of raw materials is less than or equal to the preset sampling sample quantity, if so, inputting all the goods bar codes into a sampling sample information base;
and S33, if the quantity of the goods in the batch of raw materials is larger than the preset sampling sample quantity, calling a preset sampling strategy corresponding to the property of the pharmaceutical raw materials to carry out equal-probability sampling on the goods bar codes in the goods bar code table, and inputting the extracted goods bar code information into a sampling sample information base.
3. The method for controlling automatic spot check of pharmaceutical raw materials according to claim 2, wherein the step S33 specifically includes:
s331, if the quantity of the goods in the batch of raw materials is greater than the preset sampling number, sequentially inputting k pieces of goods bar code information arranged in a goods bar code table into a first sample library, wherein k is not greater than the preset sampling number m, and inputting each subscript of the goods bar code information entering the first sample library into a second sample library;
s332, sequentially judging whether the current goods bar code information is recorded into a first sample library or not according to the probability of k/(k +1) of the remaining goods bar code information in the goods bar code table, recording the subscript of the goods bar code information into a second sample library when the new goods bar code information is recorded into the first sample library, randomly selecting one piece of goods bar code information from the first sample library, moving the goods bar code information out of the first sample library, and taking the first sample library as a sampling inspection sample information library after all the goods bar code information in the goods bar code table is traversed.
4. The method for controlling automatic spot check of pharmaceutical raw materials according to claim 3, wherein the step S32 specifically comprises:
s321, analyzing all the goods bar code tables in the batch of raw materials to obtain the quantity of the goods in the batch of raw materials, and inputting all the goods bar codes into a sampling inspection sample information base if the quantity of the goods is less than a first preset value;
s322, if the quantity of the goods is larger than a first preset value, the first preset value is lower than a preset sampling number, and the preset sampling number is smaller than a second preset value, the root number of the quantity of the goods is rounded to be used as an adjustment sample base number;
and S323, if the quantity of the goods is greater than the first preset value and the preset sampling number is greater than the second preset value, taking half of the root number rounding value of the quantity of the goods as an adjustment sample base number.
5. The method for controlling automatic spot check of pharmaceutical raw materials according to claim 4, wherein the step S3 further comprises:
s34, if the sampling working parameter is the second sampling parameter, the batch of the raw material to be detected is obtained, when the batch of the raw material to be detected is a plurality of batches, all the goods bar codes in each batch of the raw material are obtained from the raw material information database, and whether the goods bar codes of each batch are mixed or not is judged according to the production information of each batch and then is recorded into a first goods bar code table;
s35, if the goods bar code information of each batch is mixed and then recorded into a first goods bar code table, the goods bar code information in the first goods bar code table is randomly selected by adopting a random arrangement algorithm to carry out position interchange on the goods bar code information to form a second goods bar code table, the randomness of the second goods bar code table is verified to be in accordance with the preset probability, then the goods in the second goods bar code table are sampled at equal probability, and the extracted goods bar code information is recorded into a sampling inspection sample information base.
6. The utility model provides an automatic selective examination control system of medicine raw materials which characterized in that includes:
the analysis module is used for analyzing the sampling instruction of the medicine raw material and generating sampling working parameters according to the attribute of the medicine raw material, the batch information of the medicine raw material to be detected or the sampling mode information, wherein the sampling working parameters comprise a first sampling parameter and a second sampling parameter;
the test request form generation module is used for inquiring the quantity of the medicine raw materials in the corresponding batch according to the batch information of the medicine raw materials to be detected and generating a test request form of the raw materials to be detected, wherein the test request form of the raw materials to be detected comprises but is not limited to one or more of sampling working parameters, the batch of the raw materials to be detected, submitting person identity information and preset sampling sample number;
the sampling module is used for receiving the application form for examination and acquiring sampling working parameters of the application form, calling a preset sample configuration value if the sampling parameter is a first sampling parameter, inputting the corresponding goods bar code information acquired from the batch of raw materials into the sampling sample information base according to the preset sample configuration value, and performing equal-probability sampling on the goods in the batch of raw materials to be detected if the sampling parameter is a second sampling parameter, and inputting the extracted goods bar code information into the sampling sample information base.
7. The automatic sampling control system for pharmaceutical raw materials according to claim 6, wherein the sampling module specifically comprises:
the goods bar code table acquisition module is used for acquiring a raw material batch to be detected when the sampling working parameter is the second sampling parameter, and acquiring all goods bar code tables in the raw material batch from the raw material information database according to the raw material batch to be detected when the raw material batch to be detected is only one batch;
the first sample module is used for inputting all the goods bar codes into the sampling sample information base when the quantity of the goods in the batch of raw materials is less than or equal to the preset sampling sample quantity;
and the second sample module is used for calling a preset sampling strategy corresponding to the property of the pharmaceutical raw material to carry out equal probability sampling on each product bar code in the product bar code table when the quantity of the products in the batch of raw materials is greater than the preset sampling sample quantity, and inputting the extracted product bar code information into a sampling sample information base.
8. The automatic sampling control system for pharmaceutical raw materials according to claim 7, wherein the second sample module specifically comprises:
the information input module is used for sequentially inputting k pieces of goods bar code information arranged in the goods bar code table into a first sample library when the number of the goods in the batch of raw materials is larger than the preset sampling sample number, wherein k is not larger than the preset sampling sample number m, and the subscript of each piece of goods bar code information entering the first sample library is input into a second sample library;
and the sample judging module is used for sequentially judging whether the current goods bar code information is input into the first sample library or not according to the probability of k/(k +1) of the residual goods bar code information in the goods bar code table, inputting the subscript of the goods bar code information into the second sample library when new goods bar code information is input into the first sample library, randomly selecting one piece of goods bar code information from the first sample library, moving the selected goods bar code information out of the first sample library, and taking the first sample library as a sampling inspection sample information library after all the goods bar code information in the goods bar code table is traversed.
9. An automatic drug substance sampling control device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: the processor, when executing the computer program, realizes the steps of the method according to any of claims 1-5.
10. A computer-readable storage medium storing a computer program, characterized in that: the computer program realizing the steps of the method according to any of claims 1-5 when executed by a processor.
CN202111162687.5A 2021-09-30 2021-09-30 Method, system and storage medium for automatic sampling inspection of pharmaceutical raw materials Pending CN113887950A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111162687.5A CN113887950A (en) 2021-09-30 2021-09-30 Method, system and storage medium for automatic sampling inspection of pharmaceutical raw materials

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111162687.5A CN113887950A (en) 2021-09-30 2021-09-30 Method, system and storage medium for automatic sampling inspection of pharmaceutical raw materials

Publications (1)

Publication Number Publication Date
CN113887950A true CN113887950A (en) 2022-01-04

Family

ID=79004954

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111162687.5A Pending CN113887950A (en) 2021-09-30 2021-09-30 Method, system and storage medium for automatic sampling inspection of pharmaceutical raw materials

Country Status (1)

Country Link
CN (1) CN113887950A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115630861A (en) * 2022-10-10 2023-01-20 明度智云(浙江)科技有限公司 Quality inspection strategy self-adaptive adjusting method, device and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105891797A (en) * 2016-03-30 2016-08-24 南京机电职业技术学院 Small target detection method based on sea clutter nonlinear characteristics
CN111523805A (en) * 2020-04-23 2020-08-11 青岛奥利普自动化控制系统有限公司 Method and device for inspecting incoming goods
WO2020233330A1 (en) * 2019-05-20 2020-11-26 深圳壹账通智能科技有限公司 Batch testing method, apparatus, and computer-readable storage medium
CN113159516A (en) * 2021-03-24 2021-07-23 国网浙江省电力有限公司宁波供电公司 Three-dimensional visual information analysis system based on power grid operation data

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105891797A (en) * 2016-03-30 2016-08-24 南京机电职业技术学院 Small target detection method based on sea clutter nonlinear characteristics
WO2020233330A1 (en) * 2019-05-20 2020-11-26 深圳壹账通智能科技有限公司 Batch testing method, apparatus, and computer-readable storage medium
CN111523805A (en) * 2020-04-23 2020-08-11 青岛奥利普自动化控制系统有限公司 Method and device for inspecting incoming goods
CN113159516A (en) * 2021-03-24 2021-07-23 国网浙江省电力有限公司宁波供电公司 Three-dimensional visual information analysis system based on power grid operation data

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115630861A (en) * 2022-10-10 2023-01-20 明度智云(浙江)科技有限公司 Quality inspection strategy self-adaptive adjusting method, device and storage medium

Similar Documents

Publication Publication Date Title
CN113434485B (en) Data quality health degree analysis method and system based on multidimensional analysis technology
O'Brien et al. Locally estimating core numbers
WO2021036452A1 (en) Real-time data deduplication counting method and device
CN113887950A (en) Method, system and storage medium for automatic sampling inspection of pharmaceutical raw materials
CN113485988A (en) Data quality monitoring method and device and computer readable storage medium
CN110728605A (en) Block chain based open type supervision platform and execution method thereof
CN117171761A (en) A scheduling method and device for vulnerability scanning mode
JP5523753B2 (en) Production index information generation apparatus, program, and production information generation method
CN111913945A (en) Data management method and device and storage medium
CN113887949B (en) Medicine multi-batch mixing sampling control method, system and storage medium
JP2020166711A (en) Counter, counting method, counting program, and recording medium
CN106649358A (en) Data acquisition method and apparatus
CN112989153B (en) Data processing method and device and computer equipment
CN108335052A (en) On-line Product checking method and system
CN111191086B (en) Test data identification method
CN117666507A (en) MES-based digital laboratory management method, system and medium
CN119130690A (en) A method and system for optimizing the placement of snail bait based on growth cycle
CN117648513A (en) Target website content acquisition method based on java platform
CN118803822A (en) A method and device for determining a common site of a base station
CN112783942B (en) Block chain-based data acquisition quality verification method, system, device and medium
CN104376355B (en) The method that chemical fingerprint is converted into Quick Response Code in a kind of retrospect of traditional Chinese medicine quality
CN117474452B (en) Material full life cycle management method
CN112148624A (en) Method and system for processing automatic test report of digital television radio frequency performance
CN118229155B (en) Mobile phone motherboard function test management method and system
CN116052798B (en) Electronic recipe management method, system and storage medium for production execution system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination