CN113657772A - Sample detection distribution method, device and equipment - Google Patents

Sample detection distribution method, device and equipment Download PDF

Info

Publication number
CN113657772A
CN113657772A CN202110955037.XA CN202110955037A CN113657772A CN 113657772 A CN113657772 A CN 113657772A CN 202110955037 A CN202110955037 A CN 202110955037A CN 113657772 A CN113657772 A CN 113657772A
Authority
CN
China
Prior art keywords
detection
point
sampling
points
sampling point
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
CN202110955037.XA
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.)
Neusoft Corp
Original Assignee
Neusoft Corp
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 Neusoft Corp filed Critical Neusoft Corp
Priority to CN202110955037.XA priority Critical patent/CN113657772A/en
Publication of CN113657772A publication Critical patent/CN113657772A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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/06312Adjustment or analysis of established resource schedule, e.g. resource or task levelling, or dynamic rescheduling
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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/06315Needs-based resource requirements planning or analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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/10Office automation; Time management

Abstract

The embodiment of the application discloses a sample detection distribution method, a sample detection distribution device and sample detection distribution equipment, and the method comprises the steps of obtaining the position of a sampling point, the maximum sampling number of the sampling point, the position of a detection point and the maximum detection number of the detection point. And according to the sampling points and the positions of the detection points, distributing each sampling point to the nearest detection point. And judging whether to adjust the first detection point of the selected first sampling point. If yes, the first sampling point is distributed to the second detection point when the direct distribution condition is met. And when the switching distribution condition is met, distributing the first sampling point to the second detection point and distributing the second sampling point of the second detection point to the first detection point. And after the adjustment is finished or when the first detection point is not required to be adjusted, reselecting the first sampling point and the subsequent steps until a preset stop condition is reached, and outputting the detection points distributed by the sampling points. The method can save labor cost by using terminal equipment, and can realize reasonable distribution between sampling points and detection points.

Description

Sample detection distribution method, device and equipment
Technical Field
The present application relates to the field of data processing technologies, and in particular, to a method, an apparatus, and a device for sample detection and distribution.
Background
Generally, after a sampling point acquires a collected sample, the sample needs to be sent to a detection point for detection within a specified time so as to ensure the detection quality of the sample.
And a corresponding relation exists between the sampling point and the detection point, and the sample collected by the sampling point can be sent to the corresponding specified detection point. Therefore, the detection point corresponding to each sampling point needs to be determined, and the sampling points and the detection points need to be reasonably distributed.
At present, sampling points and detection points are mainly distributed manually, manual distribution can cause high labor cost, and distribution schemes can possibly not meet actual requirements.
Disclosure of Invention
In view of this, embodiments of the present application provide a method, an apparatus, and a device for sample detection allocation, which are used to implement automatic allocation of sampling points and detection points, save labor cost, and enable an allocation scheme to meet actual requirements.
In order to solve the above problem, the technical solution provided by the embodiment of the present application is as follows:
a method of sample testing distribution, the method comprising:
acquiring the position of a sampling point, the maximum sampling number of the sampling point, the positions of detection points and the maximum detection number of the detection points, wherein the sum of the maximum detection numbers of the detection points is greater than the sum of the maximum sampling numbers of the sampling points;
distributing each sampling point to a nearest detection point according to the positions of the sampling points and the positions of the detection points;
selecting a first sampling point;
judging whether the first sampling point needs to adjust the first detection point or not;
if the first sampling point needs to adjust the first detection point, the first sampling point is allocated to a second detection point when a direct allocation condition is met, and the first sampling point is allocated to the second detection point and a second sampling point of the second detection point is allocated to the first detection point when an exchange allocation condition is met, so that the adjustment of the first sampling point is completed;
and after the adjustment of the first sampling point is finished, or if the first sampling point does not need to be adjusted to the first detection point, re-executing the steps of selecting the first sampling point and the subsequent steps until a preset stop condition is reached, and outputting the detection points distributed by the sampling points.
In a possible implementation manner, the selecting a first sampling point includes:
sequencing the sampling points from large to small according to the maximum sampling number of the sampling points to generate a sequencing result of the sampling points;
and selecting first sampling points one by one according to the sequencing result of the sampling points.
In a possible implementation manner, the determining whether the first sampling point needs to be adjusted to the first detection point includes:
judging whether the distributed detection number of first detection points to which the first sampling points belong is greater than the maximum detection number of the first detection points;
judging whether a first detection point to which the first sampling point belongs is a detection point closest to the first sampling point;
if the distributed detection number of the first detection points to which the first sampling points belong is larger than the maximum detection number of the first detection points, or the first detection points to which the first sampling points belong are not the detection points closest to the first sampling points, determining that the first sampling points need to adjust the first detection points to which the first sampling points belong;
and if the distributed detection number of the first detection points to which the first sampling points belong is not more than the maximum detection number of the first detection points, and the first detection points to which the first sampling points belong are the detection points closest to the first sampling points, determining that the first sampling points do not need to adjust the first detection points.
In a possible implementation manner, the allocating the first sampling point to a second detection point when a direct allocation condition is satisfied, and allocating the first sampling point to the second detection point and allocating a second sampling point of the second detection point to the first detection point when an exchange allocation condition is satisfied, to complete the adjustment of the first sampling point includes:
selecting second detection points in sequence from small to large according to the distance between the second detection points and the first sampling point, wherein the second detection points do not comprise the first detection points;
when a direct distribution condition is met, distributing the first sampling point to the second detection point;
when the switching distribution condition is met, distributing the first sampling point to the second detection point and distributing a second sampling point of the second detection point to the first detection point;
and when the direct distribution condition and the exchange distribution condition are not met, re-executing the steps of selecting a second detection point according to the distance sequence of the first sampling point and the subsequent steps until the second detection point does not exist, and finishing the adjustment of the first sampling point.
In a possible implementation manner, the allocating the first sampling point to the second detection point and the second sampling point of the second detection point to the first detection point when the swap allocation condition is satisfied includes:
selecting second sampling points in a descending order according to the distance between the second sampling point of the second detection point and the second detection point;
if the switching distribution condition is met, distributing the first sampling point to the second detection point and distributing the second sampling point to the first detection point;
and if the switching distribution condition is not met, selecting a second sampling point according to the sequence of the distance between the second sampling point of the second detection point and the second detection point from large to small and the subsequent steps are executed again until the second sampling point does not exist.
In one possible implementation, characterized in that,
the direct distribution condition is that the distributable detection number of the second detection points is greater than or equal to the maximum sampling number of the first sampling points;
the switching allocation condition is that when the allocated detection number of the first detection point is larger than the maximum detection number of the first detection point, the assignable detection number of the second detection points plus the maximum sampling number of the second sampling points is greater than or equal to the maximum sampling number of the first sampling points, and the assignable detection number of the first detection points plus the maximum sampling number of the first sampling points is greater than or equal to the maximum sampling number of the second sampling points, or, when the distributed detection number of the first detection point to which the first sampling point belongs is less than or equal to the maximum detection number of the first detection point, the distance between the first sampling point and the first detection point plus the distance between the second sampling point and the second detection point is greater than the distance between the first sampling point and the second detection point plus the distance between the second sampling point and the first detection point.
In a possible implementation manner, the preset stop condition is that the number of traversals of the selected first sampling point reaches a threshold, or after the first sampling point is selected in a traversable manner, the first detection point to which the first sampling point belongs is not changed.
A sample testing dispensing device, the device comprising:
the device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring the position of a sampling point, the maximum sampling number of the sampling point, the position of a detection point and the maximum detection number of the detection point, and the sum of the maximum detection numbers of the detection points is greater than the sum of the maximum sampling numbers of the sampling points;
the distribution unit is used for distributing each sampling point to the nearest detection point according to the positions of the sampling points and the positions of the detection points;
the selecting unit is used for selecting a first sampling point;
the judging unit is used for judging whether the first sampling point needs to adjust the first detection point or not;
the adjusting unit is used for allocating the first sampling point to a second detection point when a direct allocation condition is met if the first sampling point needs to be adjusted, and allocating the first sampling point to the second detection point and allocating a second sampling point of the second detection point to the first detection point when an exchange allocation condition is met, so that the adjustment of the first sampling point is completed;
and the execution unit is used for re-executing the selection of the first sampling point and the subsequent steps after the adjustment of the first sampling point is finished or if the first sampling point does not need to adjust the first detection point, and outputting the detection points distributed by the sampling points until a preset stop condition is reached.
A sample testing dispensing device, comprising: the system comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor, wherein when the processor executes the computer program, the sample detection distribution method is realized.
A computer readable storage medium having stored therein instructions which, when run on a terminal device, cause the terminal device to perform the sample detection assignment method as described above.
Therefore, the embodiment of the application has the following beneficial effects:
the embodiment of the application provides a sample detection distribution method, a sample detection distribution device and sample detection distribution equipment, and the method, the device and the equipment are used for acquiring the position of a sampling point, the maximum sampling number of the sampling point, the position of a detection point and the maximum detection number of the detection point. And the sum of the maximum detection number of all the detection points is greater than the sum of the maximum sampling number of all the sampling points so as to determine that the detection points can meet the requirements of the sampling points. First, according to the positions of the sampling points and the positions of the detection points, each sampling point is allocated to the nearest detection point. The allocation is initial allocation, and if there is a possibility that the detection points allocated to the sampling points do not meet the requirement, readjustment needs to be performed based on the result of the initial allocation. Further, a first sample point is selected from all the sample points. And judging whether the first detection point of the first sampling point needs to be adjusted or not. And if necessary, distributing the first sampling point to the second detection point when the direct distribution condition is met. And when the direct distribution condition is not met but the exchange distribution condition is met, distributing the first sampling point to the second detection point and distributing the second sampling point of the second detection point to the first detection point to finish the adjustment of the first sampling point. And after the adjustment of the first sampling point is finished or when the first detection point to which the first sampling point belongs does not need to be adjusted, reselecting the first sampling point and the subsequent steps until a preset stop condition is reached, and outputting the detection points distributed by the sampling points. And readjusting the result of the initial distribution to ensure that the detection points distributed to the sampling points meet the requirements of the sampling points. And the whole process can be realized by the terminal equipment, the traditional manual distribution mode is replaced, and the labor cost is saved.
Drawings
Fig. 1 is a schematic diagram of an example scenario provided in an embodiment of the present application;
fig. 2 is a flowchart of a sample detection distribution method according to an embodiment of the present disclosure;
FIG. 3 is a flow chart of another sample testing and dispensing method provided in the embodiments of the present application;
fig. 4 is a flowchart of a sample testing and dispensing apparatus according to an embodiment of the present disclosure.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present application more comprehensible, embodiments accompanying the drawings are described in detail below.
In order to facilitate understanding and explaining the technical solutions provided by the embodiments of the present application, the following first describes the background art of the embodiments of the present application.
Generally, after a sample is collected at a sampling point, for example, a nucleic acid sample is collected, the sample needs to be sent to a detection point for detection within a specified time so as to ensure the detection quality of the sample.
And a corresponding relation exists between the sampling point and the detection point, and the corresponding relation needs to be determined in advance, so that the sample collected by the sampling point can be sent to the corresponding specified detection point. The corresponding relation between the sampling points and the detection points is determined, and the sampling points and the detection points are reasonably distributed, so that the method is of great importance.
At present, sampling points and detection points are mainly distributed manually, manual distribution can cause high labor cost, and a distribution scheme may not meet actual requirements.
Based on this, the embodiment of the application provides a sample detection distribution method, a sample detection distribution device and sample detection distribution equipment. In order to facilitate understanding of the sample detection and distribution method provided in the embodiments of the present application, the following description is made with reference to a scenario example shown in fig. 1. Referring to fig. 1, the figure is a schematic diagram of a framework of an exemplary application scenario provided in an embodiment of the present application.
In practical application, the positions of all sampling points and the positions of all detection points are firstly obtained, and the maximum sampling number of the sampling points, the positions of the detection points and the maximum detection number of the detection points are obtained. And determining that the sum of the maximum detection number of each detection point is greater than the sum of the maximum sampling number of each sampling point, so that the detection capability of the detection points can meet the requirement.
Then, each sampling point is allocated to the nearest detection point according to the position of the sampling point and the position of the detection point. The allocation process can be regarded as an initial allocation process for allocating the detection points according to the distance between the sampling points and the detection points, and an initial allocation result is generated. For example, the sampling point a in the initial allocation result is allocated to the nearest B detection point.
However, in the above initial allocation result generated based on the distance only, the sampling point and the detection point may be allocated unreasonably. Based on the initial distribution result, the affiliated detection point of the sampling point is adjusted. In specific implementation, the first sampling point is selected from all the sampling points. And judging whether the first sampling point needs to adjust the first detection point.
And if the first sampling point needs to adjust the first detection point, distributing the first sampling point to the second detection point when the direct distribution condition is met, distributing the first sampling point to the second detection point and distributing the second sampling point of the second detection point to the first detection point when the exchange distribution condition is met, and finishing the adjustment of the first sampling point.
And after the adjustment of the first sampling point is finished, or if the first sampling point does not need to adjust the first detection point, judging whether a preset stop condition is reached, and if so, outputting the detection points distributed by the sampling points. If not, the first sampling point is selected again and the subsequent steps are executed until the preset stop condition is reached.
It is to be appreciated that the sample detection assignment method provided by the above embodiments may be implemented by a terminal device, which may be any user device that is currently existing, developing, or developed in the future and that is capable of interacting with each other via any form of wired and/or wireless connection (e.g., Wi-Fi, LAN, cellular, coaxial cable, etc.), including but not limited to: smart wearable devices, smart phones, non-smart phones, tablets, laptop personal computers, desktop personal computers, minicomputers, midrange computers, mainframe computers, and the like, either now in existence, under development, or developed in the future. The embodiments of the present application are not limited in any way in this respect.
Those skilled in the art will appreciate that the block diagram shown in fig. 1 is only one example in which embodiments of the present application may be implemented. The scope of applicability of the embodiments of the present application is not limited in any way by this framework.
Based on the above description, the sample detection and distribution method provided in the present application will be described in detail below with reference to the accompanying drawings.
Referring to fig. 2, the flowchart of a sample detection distribution method provided in an embodiment of the present application is shown, where the method may be executed by a terminal device. As shown in fig. 2, the method may include S201-S207:
s201: and acquiring the position of the sampling point, the maximum sampling number of the sampling point, the positions of the detection points and the maximum detection number of the detection points, wherein the sum of the maximum detection numbers of the detection points is greater than the sum of the maximum sampling numbers of the sampling points.
A sampling point, such as a nucleic acid sample sampling point, is used to perform the collection of the sample. A detection spot, such as a nucleic acid sample detection spot, is used to perform detection of the sample.
In practical application, sampling point information of a sampling point and detection point information of a detection point are obtained. The sampling point information includes at least a position of the sampling point and a maximum sampling number of the sampling point. The detection point information includes at least a position of the detection point and a maximum number of detections of the detection point.
As an alternative example, the position of the sampling point or the position of the detection point is represented by latitude and longitude information.
The maximum sampling number characterizes the sampling capability of the sampling point, and the maximum detection number characterizes the detection capability of the detection point. The sum of the maximum detection number of each detection point needs to be larger than the sum of the maximum sampling number of each sampling point, so that the detection capability of the detection points can meet the requirement.
S202: and allocating each sampling point to the nearest detection point according to the position of the sampling point and the position of the detection point.
After the positions of the sampling points and the detection points are determined, the distance between each sampling point and each detection point can be calculated according to the positions of the sampling points and the positions of the detection points. Based on this, the closest detection point to each sampling point can be determined, and the respective sampling point is assigned to the closest detection point. That is, the sample collected at the sampling point is assigned to the nearest detection point to the sampling point for detection.
The distance between the sampling point and the detection point can be an Euclidean distance, and can also be used for planning a route for a map or planning driving time consumption for the map, and can be determined according to actual requirements in an actual application scene, and the determination is not limited here.
S203: and selecting a first sampling point.
It will be appreciated that assigning a sample point to the nearest detection point may be the case where the sample point and detection point assignment is not reasonable. For example, the number of assigned detections for the closest detection point of the sampling points is greater than the maximum number of detections for the detection point, resulting in the closest detection point not being able to detect samples for all of the sampling points assigned. In this case, the associated detection points of the sampling points obtained in S202 need to be adjusted so that the sampling points and the detection points can be reasonably distributed.
Based on this, the first sampling point needs to be selected from all the sampling points to traverse, and whether the current detection point of the first sampling point is proper or not is judged. Wherein the first sample point is one of all the sample points.
As a preferred example, in order to make the allocation between the sampling point and the detection point reasonable, the detection point to which the sampling point with high sampling capability belongs may be adjusted first, and the sampling point with high sampling capability may be allocated to an appropriate detection point. And then adjusting the affiliated detection points of the sampling points with weak sampling capability. Therefore, the situation that no detection point receives when the sampling point with strong sampling capacity is distributed in the later period can be avoided, the affiliated detection point of the sampling point with weak sampling capacity can be conveniently adjusted in the subsequent period, and the execution time of the sample detection distribution method is improved.
In specific implementation, an embodiment of the present application provides a specific implementation manner for selecting a first sampling point, including:
a1: and sequencing the sampling points from large to small according to the maximum sampling number of the sampling points to generate a sequencing result of the sampling points.
It will be appreciated that the maximum number of samples of a sample point characterizes the sampling capability of the sample point, the greater the maximum number of samples, the greater the sampling capability of the sample point.
For example, the number of sampling points and detection points is m and n, respectively. Sorting the sampling points from large to small according to the maximum sampling number of the sampling points and forming a sequence a, wherein a is [ a ]1,a2,...,aq]And q is less than or equal to m. Wherein,a1The sampling point with the strongest sampling capability in the q sampling points is provided, and the rest are a2,...,aq. q is the maximum number of sample points in the sequence.
A2: and selecting first sampling points one by one according to the sequencing result of the sampling points.
Namely, according to the sequencing result of the sampling points, the sampling points are selected one by one from the first sampling point sequencing result to be used as the first sampling point.
For example, a is selected first1Then sequentially select a2,...,aq
S204: and judging whether the first sampling point needs to adjust the first detection point. If the first detection point is required to be adjusted, executing S205; if the first probing point does not need to be adjusted, S206 is executed.
And after the first sampling point is selected, whether the current first detection point of the first sampling point needs to be adjusted or not is judged. If the first detection point needs to be adjusted, the following step S205 is performed. If not, the following S206 is performed.
For example, the first sampling point is aiQ is less than or equal to i, and i is initialized to 1. i may characterize the position of the selected first sample point in the sequence. The first sampling point currently belongs to the first detection point is
Figure BDA0003219899790000101
Determine whether adjustment is required
Figure BDA0003219899790000102
If necessary, the detection point is adjusted.
In a possible implementation manner, the present embodiment provides a specific implementation manner for determining whether the first sampling point needs to be adjusted, which is described in detail in following B1-B4.
S205: and if the first sampling point needs to adjust the first detection point, distributing the first sampling point to the second detection point when the direct distribution condition is met, distributing the first sampling point to the second detection point and distributing the second sampling point of the second detection point to the first detection point when the exchange distribution condition is met, and finishing the adjustment of the first sampling point.
If the first detection point of the first sampling point needs to be adjusted, two adjustment modes exist.
First, when the direct allocation condition is satisfied, the first sampling point is allocated to the second detection point.
The direct allocation condition is that the allocable detection number of the second detection points is greater than or equal to the maximum sampling number of the first sampling points.
It can be understood that when the first detection point of the first sampling point needs to be adjusted (see, specifically, B1-B4 in the following embodiments), the first detection point of the first sampling point needs to be adjusted to be the second detection point. For example, when the detection capability of the first detection point is insufficient (the first adjustment condition of B1-B4), based on this, if the assignable number of detections of the second detection point is greater than or equal to the maximum number of samples of the first sampling point, it indicates that the second detection point has sufficient detection capability to receive the samples of the first sampling point. The first sampling point may be directly assigned to the second detection point.
In a possible implementation manner, the embodiment of the present application provides a specific implementation manner for allocating the first sampling point to the second detection point when the direct allocation condition is satisfied, and refer to C1-C4 below. It will be appreciated that this approach is primarily the approach of determining the second detection point, on the basis of which the direct dispensing condition needs to be fulfilled.
And secondly, when the direct distribution condition is not met and the exchange distribution condition is met, distributing the first sampling point to the second detection point and distributing the second sampling point of the second detection point to the first detection point to finish the adjustment of the first sampling point.
It can be understood that when the first sampling point needs to be adjusted from the first detection point to the second detection point, but the direct allocation condition is not satisfied, it indicates that the assignable detection number of the second detection point does not satisfy the maximum sampling number of the first sampling point. At this time, whether the switching distribution condition is met or not can be judged, if yes, the first sampling point is distributed to the second detection point, the second sampling point of the second detection point is distributed to the first detection point, and switching is completed.
There are two exchange allocation conditions, and one of them is satisfied. The exchange allocation conditions are understood as follows:
the first type of the switching distribution condition is that when the distributed detection number of the first detection points is larger than the maximum detection number of the first detection points, the distributable detection number of the second detection points plus the maximum sampling number of the second sampling points is larger than or equal to the maximum sampling number of the first sampling points, and the distributable detection number of the first detection points plus the maximum sampling number of the first sampling points is larger than or equal to the maximum sampling number of the second sampling points.
It will be appreciated that the assignable number of detections for the first detection point and the assignable number of detections for the second detection point is the maximum number of detections minus the number of detections assigned. The first sampling point has been allocated to the first detection point according to the current allocation pattern, and the second sampling point has been allocated to the second detection point according to the current allocation pattern.
If the detection capability of the first detection point is determined to be insufficient (that is, the number of distributed detections of the first detection point is greater than the maximum number of detections of the first detection point) after the distribution is performed according to the current distribution mode, the first detection point needs to be adjusted to the second detection point. But it is determined that the second detection point does not satisfy the direct allocation condition, it is necessary to determine whether the switching allocation condition is satisfied, and if so, allocate the first sampling point to the second detection point and allocate the second sampling point of the second detection point to the first detection point.
During actual switching, the maximum sampling number of the second sampling point needs to be taken out from the allocated detection number of the second detection point, and after the maximum sampling number of the second sampling point is taken out, the allocable detection number of the second detection point plus the maximum sampling number of the second sampling point is the actual allocable detection number of the second detection point.
At this time, if the assignable detection number of the second detection point plus the maximum sampling number of the second sampling point (i.e. actually, the assignable detection number of the second detection point) is greater than or equal to the maximum sampling number of the first sampling point, it indicates that the second detection point still has sufficient or just suitable detection capability after the first sampling point is assigned to the second detection point. Similarly, the assignable detection number of the first detection point plus the maximum sampling number of the first sampling point is greater than or equal to the maximum sampling number of the second sampling point, which indicates that the detection capability of the first detection point is sufficient or just suitable after the second sampling point is assigned to the first detection point.
And secondly, the exchange distribution condition is that when the distributed detection number of the first detection points to which the first sampling points belong is less than or equal to the maximum detection number of the first detection points, the distance between the first sampling point and the first detection points plus the distance between the second sampling point and the second detection points is greater than the distance between the first sampling point and the second detection points plus the distance between the second sampling point and the first detection points.
And if the distributed detection number of the first detection points to which the first sampling points belong is less than or equal to the maximum detection number of the first detection points, the detection capability of the first detection points before the switching is sufficient. At this time, the distance between the first sampling point and the first detection point plus the distance between the second sampling point and the second detection point is required to be greater than the distance between the first sampling point and the second detection point plus the distance between the second sampling point and the first detection point, that is, the total distance between two sampling points after the exchange and the corresponding detection point is required to be smaller than that before the exchange. In addition, the detection capability of the two detection points participating in the exchange after the exchange is ensured to be sufficient. It will be appreciated that in this case, the distance is optimised after adjustment rather than before adjustment.
In a possible implementation manner, the embodiment of the present application provides a specific implementation manner for allocating the first sampling point to the second detection point when the swap allocation condition is satisfied, see, for example, C1-C4 below. It will be appreciated that this approach is primarily the approach of determining the second detection point, on the basis of which the swap assignment condition needs to be fulfilled.
It is to be understood that the second detection point is one of the other detection points than the first detection point. The second detection point fits the first sampling point in both detectability and distance.
It should be noted that after the adjustment of the first sampling point is completed, the optimization of the first sampling point may be considered to be successful, the number of sampling points successfully optimized in a single traversal is recorded, and S206 is executed.
S206: and judging whether a preset stop condition is reached, if so, executing S207, otherwise, returning to S203.
After the adjustment of the first sampling point is completed, or when the first sampling point does not need to adjust the first detection point, whether a preset stop condition is reached is judged. The preset stopping condition is that the number of traversals of the selected first sampling point reaches a threshold value, or after the first sampling point is selected in a traversable mode, the first detection point to which the first sampling point belongs is not changed. The selection of the threshold is not limited in the embodiment of the application, and the selection can be performed according to the actual requirements of the actual application scene.
It can be understood that all sampling points satisfying the adjustment condition need to be adjusted for the associated detection point. After all the sampling points are traversed once (i.e. the first sampling point is selected to end), all the sampling points need to be traversed again to avoid the situation that the distribution of the sampling points and the detection points is not proper. For this, a threshold value is set. And recording the traversal times after all the sampling points are traversed every time. When the traversal times reach the threshold value, the traversal of all the sampling points is not carried out, and the optimization between the sampling points and the detection points is considered to be completed.
In addition, after the first sampling points are selected in a traversing mode, the first detection points to which the first sampling points belong are not changed, all the sampling points and the corresponding detection points are suitable, and optimization is not needed. At this point, the traversal of all sample points is also stopped. As an alternative example, that none of the first detection points to which the first sample points belong is changed can be represented by accumulating the number of successfully optimized sample points in S205 in a single traversal, i.e., when the number is 0 after traversing a time of the sample points, it indicates that none of the first detection points to which the first sample points belong is changed.
It is understood that, in S203-S206, after the adjustment of the first sampling point is completed or if the first sampling point does not need to be adjusted, the selection of the first sampling point and the subsequent steps are executed again until the preset stop condition is reached.
S207: and outputting the detection points distributed by each sampling point.
The embodiment of the application provides a sample detection distribution method, which is used for acquiring the positions of sampling points, the maximum sampling number of the sampling points, the positions of detection points and the maximum detection number of the detection points. And the sum of the maximum detection number of all the detection points is greater than the sum of the maximum sampling number of all the sampling points so as to determine that the detection points can meet the requirements of the sampling points. First, according to the positions of the sampling points and the positions of the detection points, each sampling point is allocated to the nearest detection point. The allocation is initial allocation, and if there is a possibility that the detection points allocated to the sampling points do not meet the requirement, readjustment needs to be performed based on the result of the initial allocation. Further, a first sample point is selected from all the sample points. And judging whether the first detection point of the first sampling point needs to be adjusted or not. And if necessary, distributing the first sampling point to the second detection point when the direct distribution condition is met. And when the direct distribution condition is not met but the exchange distribution condition is met, distributing the first sampling point to the second detection point and distributing the second sampling point of the second detection point to the first detection point to finish the adjustment of the first sampling point. And after the adjustment of the first sampling point is finished or when the first detection point to which the first sampling point belongs does not need to be adjusted, reselecting the first sampling point and the subsequent steps until a preset stop condition is reached, and outputting the detection points distributed by the sampling points. And readjusting the result of the initial distribution to ensure that the detection points distributed to the sampling points meet the requirements of the sampling points. And the whole process can be realized by the terminal equipment, the traditional manual distribution mode is replaced, and the labor cost is saved.
In a possible implementation manner, an embodiment of the present application provides a specific implementation manner of determining whether a first sampling point needs to be adjusted on a first detection point in S204, including:
b1: and judging whether the distributed detection number of the first detection points to which the first sampling points belong is greater than the maximum detection number of the first detection points.
The first detecting points have a maximum detecting number limit, and therefore, it is necessary to determine whether the allocated detecting number of the first detecting points to which the first sampling points belong exceeds the maximum detecting number of the first detecting points, so as to determine whether the first detecting points are overloaded.
B2: and judging whether the first detection point to which the first sampling point belongs is the closest detection point to the first sampling point.
Since the sampling point needs to be within a prescribed time, the sampled sample is carried to the detection point. Therefore, the distance between the sampling point and the detection point is an important factor to be considered in the dispensing process. And each sampling point is allocated with a detection point closest to the sampling point as far as possible so as to meet the transportation efficiency of the sample.
It should be noted that in the embodiment of the present application, "nearest" means that a detected point closest to a sampling point is a nearest detected point. However, if the selected first detection point proves to be unable to receive the sample of the first sampling point, that is, the number of the allocated detections of the first detection point is greater than the maximum number of the first detection points (it can be understood that the detection capability of the first detection point is insufficient), the next closest detection point is selected as the new closest detection point of the first sampling point, and so on.
B3: and if the distributed detection number of the first detection points to which the first sampling points belong is larger than the maximum detection number of the first detection points, or the first detection points to which the first sampling points belong are not the detection points closest to the first sampling points, determining that the first sampling points need to adjust the first detection points to which the first sampling points belong.
In the embodiment of the present application, one condition that the first detection point to which the first sampling point belongs needs to be adjusted is that when the detection number of the allocated samples is greater than the maximum detection number, the first detection point cannot completely detect the allocated samples. At this time, the distribution relationship between the first sampling point and the first detection point is not reasonable, and the first detection point needs to be adjusted. It is understood that the adjusted first detection point, although not actually closest in distance to the first sampling point, is the case of the "second closest detection point" explained in B2. It can be understood as the "nearest detection point" of the first sampling point on the basis of satisfying the condition that the detection capability of the adjusted detection point is sufficient.
In addition, in the embodiment of the present application, another situation that the first detection point to which the first sampling point belongs needs to be adjusted is to determine whether the first detection point to which the first sampling point belongs is the closest detection point to the first sampling point, and when the first detection point to which the first sampling point belongs is not the closest detection point to the first sampling point, it is determined that the first sampling point needs to adjust the first detection point to which the first sampling point belongs. B4: and if the distributed detection number of the first detection points to which the first sampling points belong is not more than the maximum detection number of the first detection points, and the first detection point to which the first sampling points belong is the detection point closest to the first sampling points, determining that the first sampling points do not need to adjust the first detection points.
If the distributed detection number of the first detection points to which the first sampling points belong is not more than the maximum detection number of the first detection points, and the first detection points to which the first sampling points belong are the detection points closest to the first sampling points, the fact that the first detection points to which the first sampling points belong are closest to the first sampling points and the detection capability of the first detection points to which the first sampling points belong is not overloaded is shown, and the detection capability is sufficient. At this time, the correspondence between the first detection point to which the first sampling point belongs and the first sampling point is appropriate, and adjustment of the belonging first detection point is not required.
And judging whether the first sampling point needs to be adjusted to the first detection point based on the descriptions of B1-B4, and adjusting the first detection point when the first sampling point needs to be adjusted so that the first sampling point can be matched with the adjusted corresponding detection point.
In a possible implementation manner, an embodiment of the present application provides a specific implementation method for implementing S205, including:
c1: and selecting second detection points in sequence from small to large according to the distance from the first sampling point, wherein the second detection points do not comprise the first detection points.
Since the nearest detection point is assigned to the sampling point in S202. When the first sampling point needs to be adjusted to the first detection point (for example, because the detection capability of the first detection point is not sufficient, i.e., the situation in B1-B4), it is required to adjust the first detection point to the second detection point, and the second detection point is the next-to-near detection point.
In specific implementation, the second detection points are selected according to the sequence from small to large of the distance from the first sampling point. For example, after sorting, the sequence B is generated, B ═ B1,B2,...,Bn-1],B1Is the next closest detection point to the first sampling point compared to the first detection point, B2,...,Bn-1The distance from the first sample point is incremented. When B is present1If the subsequent direct distribution condition and the exchange distribution condition are not satisfied, B is selected again2The judgment is made for the "next closest point". That is, the second detection point B is selected from the sequence B in sequencejJ ≦ n-1, j may characterize the position of the second detection point in the sequence, and j ≦ 1 is initialized. Wherein the second detection point does not include the first detection point.
C2: and when the direct distribution condition is met, distributing the first sampling point to the second detection point.
When the direct allocation condition is met, the allocable detection number of the second detection point is larger than or equal to the maximum sampling number of the first sampling point, and the second detection point has enough detection capability to receive the samples of the first sampling point. At this time, the first sampling point is directly assigned to the second detection point. In this case, the detection capability of the second detection point can directly satisfy the first sampling point, and the second detection point is a next-nearest detection point compared to the first detection point. That is, the second detection point satisfies the requirement of the first sampling point in terms of both detection capability and distance.
For example, when BjWhen the direct distribution condition is satisfied, directly distributing BjAs a second detection point, the first sampling point is assigned to the second detection point. When B is presentjIf the direct allocation condition is not satisfied, C3 is performed to determine whether the swap allocation condition is satisfied.
C3: and when the switching distribution condition is met, distributing the first sampling point to the second detection point and distributing the second sampling point of the second detection point to the first detection point.
The second detection point has initially satisfied the condition on distance, i.e. is the "next closest detection point" compared to the first detection point, at which point, if the swap assignment condition can be satisfied, the first detection point is assigned to the second detection point and the second sampling point of the second detection point is assigned to the first detection point.
In one possible implementation, the embodiment of the present application provides a specific implementation manner for implementing C3. The method may be understood as a method for selecting the second sampling point, and specifically includes:
c31: and selecting second sampling points according to the sequence of the distance between the second sampling point of the second detection point and the second detection point from large to small.
It will be appreciated that the second sampling points are dependent sampling points of the second detection point.
Wherein, the meaning of the subsidiary sampling point is as follows: if a sample of a sample is destined for a particular checkpoint for detection, that sample is referred to as a dependent sample of that checkpoint.
For example, according to the second detection point BjSecond sampling point and second detection point BjThe distance of (a) is sorted from big to small, the generated sequence is b, b ═ b1,b2,...,br],r≤m。b1,b2,...,brAre all the second sample points. r is the maximum number of second samples in the sequence. Can use bkTo represent the second sample point, where k ≦ r. k characterizes the position of the second sample point in the sequence.
C32: if the swap assignment condition is satisfied, the first sample point is assigned to the second detection point and the second sample point is assigned to the first detection point.
For example, when the swap assignment condition is satisfied, b iskAnd aiAnd carrying out exchange. Then aiIs assigned to BjB is mixingkIs assigned to
Figure BDA0003219899790000181
C33: and if the switching distribution condition is not met, selecting a second sampling point and subsequent steps in a descending order according to the distance between the second sampling point of the second detection point and the second detection point until the second sampling point does not exist.
And when the switching distribution condition is not met, reselecting the second sampling point for judgment until the second sampling point does not exist.
In addition, when the second sampling point does not satisfy the condition all the time, the second detection point is determined not to satisfy the swap allocation condition.
C4: and when the direct distribution condition and the exchange distribution condition are not met, re-executing the steps of selecting the second detection point according to the distance sequence from the first sampling point and the subsequent steps until the second detection point does not exist, and finishing the adjustment of the first sampling point.
And when the direct distribution condition is not met and the exchange distribution condition is not met, re-executing the steps of selecting the second detection point according to the distance sequence from the first sampling point and the subsequent steps until the second detection point does not exist, and finishing the adjustment of the first sampling point.
Based on the above description of C1-C4, the second detection point is determined in a distance-preferred manner such that the second detection point fits the first sampling point in both detectability and distance.
Referring to fig. 3, fig. 3 is a flowchart of another sample testing and distributing method provided in the embodiment of the present application. The method can be applied to terminal equipment. As shown in fig. 3, the method includes S301 to S313:
s301: and acquiring the position of the sampling point, the maximum sampling number of the sampling point, the positions of the detection points and the maximum detection number of the detection points, wherein the sum of the maximum detection numbers of the detection points is greater than the sum of the maximum sampling numbers of the sampling points.
S302: and allocating each sampling point to the nearest detection point according to the position of the sampling point and the position of the detection point.
S303: and setting a traversal time threshold and the number of first sampling points of single traversal accumulation successful optimization, wherein the initialization values are all 0.
S304: and sequencing the sampling points from large to small according to the maximum sampling number of the sampling points to generate a sampling point sequencing result, and selecting first sampling points one by one according to the sampling point sequencing result.
S305: and judging that the traversal of the current traversal has finished the first sampling point. If not, executing S306; if yes, the number of traversal times is increased by one, and S312 is performed.
S306: and judging whether the first sampling point needs to adjust the first detection point. If yes, go to S307; if not, go to S312.
Specifically, determining whether the first sampling point needs to be adjusted with respect to the first detection point includes:
judging whether the distributed detection number of first detection points to which the first sampling points belong is greater than the maximum detection number of the first detection points;
judging whether a first detection point to which the first sampling point belongs is a detection point closest to the first sampling point;
if the distributed detection number of the first detection points to which the first sampling points belong is larger than the maximum detection number of the first detection points, or the first detection points to which the first sampling points belong are not the detection points closest to the first sampling points, determining that the first sampling points need to adjust the first detection points to which the first sampling points belong;
and if the distributed detection number of the first detection points to which the first sampling points belong is not more than the maximum detection number of the first detection points, and the first detection point to which the first sampling points belong is the detection point closest to the first sampling points, determining that the first sampling points do not need to adjust the first detection points.
S307: and selecting second detection points according to the sequence from small to large of the distance from the first sampling point, and judging whether the second detection points exist. If yes, go to S308; if not, go to S312.
S308: it is determined whether a direct allocation condition is satisfied. If yes, go to S309; if not, go to S310.
The direct allocation condition is that the allocable detection number of the second detection points is greater than or equal to the maximum sampling number of the first sampling points.
S309: and distributing the first sampling point to a second detection point, and recording the number of the first sampling points which are subjected to single traversal accumulation and successful optimization plus one.
S310: and judging whether the exchange distribution condition is met. If yes, go to S311; if not, go to step S307.
The switching distribution condition is that when the distributed detection number of the first detection points is larger than the maximum detection number of the first detection points, the distributable detection number of the second detection points plus the maximum sampling number of the second sampling points is larger than or equal to the maximum sampling number of the first sampling points, and the distributable detection number of the first detection points plus the maximum sampling number of the first sampling points is larger than or equal to the maximum sampling number of the second sampling points, or when the distributed detection number of the first detection points to which the first sampling points belong is smaller than or equal to the maximum detection number of the first detection points, the distance between the first sampling points and the first detection points plus the distance between the second sampling points and the second detection points is larger than the distance between the first sampling points and the second detection points plus the distance between the second sampling points and the first detection points.
S311: and distributing the first sampling point to a second detection point and distributing the second sampling point of the second detection point to the first detection point, and recording the number of the first sampling points which are successfully optimized in a single traversal and accumulation plus one.
Specifically, assigning the first sampling point to the second detection point and assigning the second sampling point of the second detection point to the first detection point includes:
selecting second sampling points in a descending order according to the distance between the second sampling point of the second detection point and the second detection point;
if the switching distribution condition is met, distributing the first sampling point to a second detection point and distributing the second sampling point to the first detection point;
and if the switching distribution condition is not met, selecting a second sampling point and subsequent steps in a descending order according to the distance between the second sampling point of the second detection point and the second detection point until the second sampling point does not exist.
S312: and judging whether the traversal times of the selected first sampling point reaches a threshold value or not, or after the first sampling point is selected in a traversal mode, accumulating the number of successfully optimized first sampling points to be zero. If yes, go to S313; if not, go to step S304.
S313: and outputting the detection points distributed by each sampling point.
Embodiments S301 to S313 of the present application provide a sample detection allocation method, in which each sampling point is allocated to a nearest detection point, and then a detection point to which a first sampling point in the allocation result belongs is readjusted. And repeating for multiple times until the traversing times of selecting the first sampling point reach a threshold value, or accumulating the number of successfully optimized first sampling points to be zero after traversing and selecting the first sampling point. The method ensures that the detection points to which the sampling points are distributed are all enough in detection capability and close to the sampling points. And the whole process can be realized by the terminal equipment, the traditional manual distribution mode is replaced, and the labor cost is saved.
Based on the sample detection and distribution method provided by the method embodiment, the embodiment of the present application further provides a sample detection and distribution device, and the sample detection and distribution device provided by the embodiment of the present application will be described below with reference to the accompanying drawings.
Referring to fig. 4, fig. 4 is a schematic structural diagram of a sample detection and distribution device according to an embodiment of the present disclosure.
As shown in fig. 4, the sample testing dispensing device includes:
an obtaining unit 401, configured to obtain a position of a sampling point, a maximum sampling number of the sampling point, positions of detection points, and a maximum detection number of the detection points, where a sum of the maximum detection numbers of the detection points is greater than a sum of the maximum sampling numbers of the sampling points;
an allocating unit 402, configured to allocate each sampling point to a nearest detection point according to the position of the sampling point and the position of the detection point;
a selecting unit 403, configured to select a first sampling point;
a determining unit 404, configured to determine whether the first sampling point needs to be adjusted;
an adjusting unit 405, configured to allocate the first sampling point to a second detection point when a direct allocation condition is met if the first sampling point needs to be adjusted for the first detection point, and allocate the first sampling point to the second detection point and allocate a second sampling point of the second detection point to the first detection point when an exchange allocation condition is met, so as to complete adjustment of the first sampling point;
and the execution unit 406 is configured to, after the adjustment of the first sampling point is completed, or if the first sampling point does not need to be adjusted with respect to the first detection point, re-execute the selection of the first sampling point and the subsequent steps until a preset stop condition is reached, and output the detection points allocated to the sampling points.
In a possible implementation manner, the selecting unit 403 includes:
the sequencing subunit is used for sequencing the sampling points from large to small according to the maximum sampling number of the sampling points to generate a sampling point sequencing result;
and the first selection subunit is used for selecting the first sampling points one by one according to the sequencing result of the sampling points.
In a possible implementation manner, the determining unit 404 includes:
the first judgment subunit is used for judging whether the distributed detection number of the first detection points to which the first sampling points belong is greater than the maximum detection number of the first detection points;
the second judgment subunit is used for judging whether the first detection point to which the first sampling point belongs is the closest detection point to the first sampling point;
a first determining subunit, configured to determine that the first sampling point needs to adjust the first detection point if the allocated detection number of the first detection points to which the first sampling point belongs is greater than the maximum detection number of the first detection points, or if the first detection point to which the first sampling point belongs is not the detection point closest to the first sampling point;
and the second determining subunit is used for determining that the first sampling point does not need to adjust the first detection point if the distributed detection number of the first detection points to which the first sampling point belongs is not more than the maximum detection number of the first detection points, and the first detection point to which the first sampling point belongs is the detection point closest to the first sampling point.
In a possible implementation manner, the adjusting unit 405 includes:
the second selection subunit is used for selecting second detection points in an order from small to large according to the distance between the second detection points and the first sampling point, and the second detection points do not comprise the first detection points;
a first allocating subunit, configured to allocate the first sampling point to the second detection point when a direct allocation condition is satisfied;
a second sub-distribution subunit, configured to distribute the first sampling point to the second detection point and distribute a second sampling point of the second detection point to the first detection point when a swap distribution condition is satisfied;
and the first execution subunit is used for re-executing the steps of selecting a second detection point and the subsequent steps according to the distance sequence of the first sampling point when the direct distribution condition and the exchange distribution condition are not met until the second detection point does not exist, and finishing the adjustment of the first sampling point.
In one possible implementation, the second sub-allocation subunit includes:
the third selection subunit is used for selecting second sampling points in a descending order according to the distance between the second sampling point of the second detection points and the second detection points;
a third sub-distribution subunit, configured to distribute the first sampling point to the second detection point and distribute the second sampling point to the first detection point if an exchange distribution condition is satisfied;
and the second execution subunit is used for re-executing the steps of selecting a second sampling point and the subsequent steps in a descending order according to the distance between the second sampling point of the second detection point and the second detection point until the second sampling point does not exist.
In a possible implementation manner, the direct allocation condition is that the allocable detection number of the second detection points is greater than or equal to the maximum sampling number of the first sampling points;
the switching allocation condition is that when the allocated detection number of the first detection point is larger than the maximum detection number of the first detection point, the assignable detection number of the second detection points plus the maximum sampling number of the second sampling points is greater than or equal to the maximum sampling number of the first sampling points, and the assignable detection number of the first detection points plus the maximum sampling number of the first sampling points is greater than or equal to the maximum sampling number of the second sampling points, or, when the distributed detection number of the first detection point to which the first sampling point belongs is less than or equal to the maximum detection number of the first detection point, the distance between the first sampling point and the first detection point plus the distance between the second sampling point and the second detection point is greater than the distance between the first sampling point and the second detection point plus the distance between the second sampling point and the first detection point.
In a possible implementation manner, the preset stop condition is that the number of traversals of the selected first sampling point reaches a threshold, or after the first sampling point is selected in a traversable manner, the first detection point to which the first sampling point belongs is not changed.
In addition, this application embodiment also provides a sample detection dispensing device, includes: the sample detection and distribution method comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor, wherein when the processor executes the computer program, the sample detection and distribution method is realized according to any one of the embodiments.
In addition, a computer-readable storage medium is provided, where instructions are stored, and when the instructions are executed on a terminal device, the terminal device is caused to perform the sample detection and distribution method according to any one of the above embodiments.
The embodiment of the application provides a sample detection distribution device and equipment, and the device is used for acquiring the position of a sampling point, the maximum sampling quantity of the sampling point, the position of a detection point and the maximum detection quantity of the detection point. And the sum of the maximum detection number of all the detection points is greater than the sum of the maximum sampling number of all the sampling points so as to determine that the detection points can meet the requirements of the sampling points. First, according to the positions of the sampling points and the positions of the detection points, each sampling point is allocated to the nearest detection point. The allocation is initial allocation, and if there is a possibility that the detection points allocated to the sampling points do not meet the requirement, readjustment needs to be performed based on the result of the initial allocation. Further, a first sample point is selected from all the sample points. And judging whether the first detection point of the first sampling point needs to be adjusted or not. And if necessary, distributing the first sampling point to the second detection point when the direct distribution condition is met. And when the direct distribution condition is not met but the exchange distribution condition is met, distributing the first sampling point to the second detection point and distributing the second sampling point of the second detection point to the first detection point to finish the adjustment of the first sampling point. And after the adjustment of the first sampling point is finished or when the first detection point to which the first sampling point belongs does not need to be adjusted, reselecting the first sampling point and the subsequent steps until a preset stop condition is reached, and outputting the detection points distributed by the sampling points. And readjusting the result of the initial distribution to ensure that the detection points distributed to the sampling points meet the requirements of the sampling points. And the whole process can be realized by the terminal equipment, the traditional manual distribution mode is replaced, and the labor cost is saved.
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. For the system or the device disclosed by the embodiment, the description is simple because the system or the device corresponds to the method disclosed by the embodiment, and the relevant points can be referred to the method part for description.
It should be understood that in the present application, "at least one" means one or more, "a plurality" means two or more. "and/or" for describing an association relationship of associated objects, indicating that there may be three relationships, e.g., "a and/or B" may indicate: only A, only B and both A and B are present, wherein A and B may be singular or plural. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship. "at least one of the following" or similar expressions refer to any combination of these items, including any combination of single item(s) or plural items. For example, at least one (one) of a, b, or c, may represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", wherein a, b, c may be single or plural.
It is further noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A method for sample testing and dispensing, the method comprising:
acquiring the position of a sampling point, the maximum sampling number of the sampling point, the positions of detection points and the maximum detection number of the detection points, wherein the sum of the maximum detection numbers of the detection points is greater than the sum of the maximum sampling numbers of the sampling points;
distributing each sampling point to a nearest detection point according to the positions of the sampling points and the positions of the detection points;
selecting a first sampling point;
judging whether the first sampling point needs to adjust the first detection point or not;
if the first sampling point needs to adjust the first detection point, the first sampling point is allocated to a second detection point when a direct allocation condition is met, and the first sampling point is allocated to the second detection point and a second sampling point of the second detection point is allocated to the first detection point when an exchange allocation condition is met, so that the adjustment of the first sampling point is completed;
and after the adjustment of the first sampling point is finished, or if the first sampling point does not need to be adjusted to the first detection point, re-executing the steps of selecting the first sampling point and the subsequent steps until a preset stop condition is reached, and outputting the detection points distributed by the sampling points.
2. The method of claim 1, wherein the selecting the first sample point comprises:
sequencing the sampling points from large to small according to the maximum sampling number of the sampling points to generate a sequencing result of the sampling points;
and selecting first sampling points one by one according to the sequencing result of the sampling points.
3. The method of claim 1, wherein said determining whether the first sampling point requires adjustment of the first detection point comprises:
judging whether the distributed detection number of first detection points to which the first sampling points belong is greater than the maximum detection number of the first detection points;
judging whether a first detection point to which the first sampling point belongs is a detection point closest to the first sampling point;
if the distributed detection number of the first detection points to which the first sampling points belong is larger than the maximum detection number of the first detection points, or the first detection points to which the first sampling points belong are not the detection points closest to the first sampling points, determining that the first sampling points need to adjust the first detection points to which the first sampling points belong;
and if the distributed detection number of the first detection points to which the first sampling points belong is not more than the maximum detection number of the first detection points, and the first detection points to which the first sampling points belong are the detection points closest to the first sampling points, determining that the first sampling points do not need to adjust the first detection points.
4. The method of claim 1, wherein said assigning the first sampling point to a second detection point when a direct assignment condition is satisfied, assigning the first sampling point to the second detection point and assigning a second sampling point of the second detection point to the first detection point when a swap assignment condition is satisfied, completing the adjustment of the first sampling point comprises:
selecting second detection points in sequence from small to large according to the distance between the second detection points and the first sampling point, wherein the second detection points do not comprise the first detection points;
when a direct distribution condition is met, distributing the first sampling point to the second detection point;
when the switching distribution condition is met, distributing the first sampling point to the second detection point and distributing a second sampling point of the second detection point to the first detection point;
and when the direct distribution condition and the exchange distribution condition are not met, re-executing the steps of selecting a second detection point according to the distance sequence of the first sampling point and the subsequent steps until the second detection point does not exist, and finishing the adjustment of the first sampling point.
5. The method of claim 4, wherein assigning the first sampling point to the second detection point and assigning a second sampling point of the second detection point to the first detection point when a swap assignment condition is satisfied comprises:
selecting second sampling points in a descending order according to the distance between the second sampling point of the second detection point and the second detection point;
if the switching distribution condition is met, distributing the first sampling point to the second detection point and distributing the second sampling point to the first detection point;
and if the switching distribution condition is not met, selecting a second sampling point according to the sequence of the distance between the second sampling point of the second detection point and the second detection point from large to small and the subsequent steps are executed again until the second sampling point does not exist.
6. The method of claim 1, 4 or 5,
the direct distribution condition is that the distributable detection number of the second detection points is greater than or equal to the maximum sampling number of the first sampling points;
the switching allocation condition is that when the allocated detection number of the first detection point is larger than the maximum detection number of the first detection point, the assignable detection number of the second detection points plus the maximum sampling number of the second sampling points is greater than or equal to the maximum sampling number of the first sampling points, and the assignable detection number of the first detection points plus the maximum sampling number of the first sampling points is greater than or equal to the maximum sampling number of the second sampling points, or, when the distributed detection number of the first detection point to which the first sampling point belongs is less than or equal to the maximum detection number of the first detection point, the distance between the first sampling point and the first detection point plus the distance between the second sampling point and the second detection point is greater than the distance between the first sampling point and the second detection point plus the distance between the second sampling point and the first detection point.
7. The method of claim 1, wherein the preset stop condition is that the number of traversals of the first sample reaches a threshold, or after the first sample is selected in a traversal manner, the first detection point to which the first sample belongs is not changed.
8. A sample testing dispensing device, said device comprising:
the device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring the position of a sampling point, the maximum sampling number of the sampling point, the position of a detection point and the maximum detection number of the detection point, and the sum of the maximum detection numbers of the detection points is greater than the sum of the maximum sampling numbers of the sampling points;
the distribution unit is used for distributing each sampling point to the nearest detection point according to the positions of the sampling points and the positions of the detection points;
the selecting unit is used for selecting a first sampling point;
the judging unit is used for judging whether the first sampling point needs to adjust the first detection point or not;
the adjusting unit is used for allocating the first sampling point to a second detection point when a direct allocation condition is met if the first sampling point needs to be adjusted, and allocating the first sampling point to the second detection point and allocating a second sampling point of the second detection point to the first detection point when an exchange allocation condition is met, so that the adjustment of the first sampling point is completed;
and the execution unit is used for re-executing the selection of the first sampling point and the subsequent steps after the adjustment of the first sampling point is finished or if the first sampling point does not need to adjust the first detection point, and outputting the detection points distributed by the sampling points until a preset stop condition is reached.
9. A sample testing dispensing apparatus, comprising: a memory, a processor, and a computer program stored on the memory and executable on the processor, when executing the computer program, implementing the sample detection assignment method of any one of claims 1-7.
10. A computer-readable storage medium having stored therein instructions that, when run on a terminal device, cause the terminal device to perform the sample detection assignment method of any one of claims 1-7.
CN202110955037.XA 2021-08-19 2021-08-19 Sample detection distribution method, device and equipment Pending CN113657772A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110955037.XA CN113657772A (en) 2021-08-19 2021-08-19 Sample detection distribution method, device and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110955037.XA CN113657772A (en) 2021-08-19 2021-08-19 Sample detection distribution method, device and equipment

Publications (1)

Publication Number Publication Date
CN113657772A true CN113657772A (en) 2021-11-16

Family

ID=78492394

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110955037.XA Pending CN113657772A (en) 2021-08-19 2021-08-19 Sample detection distribution method, device and equipment

Country Status (1)

Country Link
CN (1) CN113657772A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110301967A1 (en) * 2010-06-08 2011-12-08 International Business Machines Corporation Probabilistic optimization of resource discovery, reservation and assignment
CN110111050A (en) * 2019-05-05 2019-08-09 武汉科技大学 Order allocation method and its distribution system
CN113241190A (en) * 2021-05-11 2021-08-10 上海市卫生健康委员会 System, method, device, processor and storage medium for realizing rapid allocation processing of nucleic acid detection for adult population

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110301967A1 (en) * 2010-06-08 2011-12-08 International Business Machines Corporation Probabilistic optimization of resource discovery, reservation and assignment
CN110111050A (en) * 2019-05-05 2019-08-09 武汉科技大学 Order allocation method and its distribution system
CN113241190A (en) * 2021-05-11 2021-08-10 上海市卫生健康委员会 System, method, device, processor and storage medium for realizing rapid allocation processing of nucleic acid detection for adult population

Similar Documents

Publication Publication Date Title
CN102480512B (en) For the method and apparatus of expansion servers end disposal ability
CN101287280A (en) Network selecting method and device in heterogeneous wireless network
WO2000043926B1 (en) Methods and apparatus for allocating resources in the presence of uncertainty
CN102883262A (en) Wi-Fi indoor positioning method on basis of fingerprint matching
CN110582064B (en) Short message distribution method, device, equipment and medium
CN110213714A (en) The method and device of terminal positioning
CN108255427B (en) Data storage and dynamic migration method and device
CN109996245B (en) Communication resource delivery evaluation method and device, electronic equipment and storage medium
CN114244848A (en) Candidate streaming media determining and load balancing method, device, server and medium
CN103974286A (en) Cell reselection method and device
CN113657772A (en) Sample detection distribution method, device and equipment
CN107613500B (en) A kind of wireless frequency spectrum sharing method under uncertain environment
CN113498068B (en) Method, device, equipment and medium for determining home cell of high-speed railway
CN102595630B (en) The hybrid access method shared based on part resource and system
CN115842828A (en) Gateway load balancing control method, device, equipment and readable storage medium
CN114310889B (en) Intelligent robot inspection system of transformer substation and access operation method thereof
CN106912075B (en) Channel allocation method and device
CN112612549B (en) Multi-edge service task selection unloading method and device and related equipment
Marianov et al. Allocating servers to facilities, when demand is elastic to travel and waiting times
CN112749343B (en) Resource recommendation method and device and computer storage medium
CN110956802B (en) Road side unit site selection method and system based on road buffer area superposition analysis
JP6690215B2 (en) Positioning program, positioning method, and positioning device
CN113535261A (en) Internet-of-vehicles vehicle cluster task unloading method based on edge calculation
CN112907275A (en) Business district fence configuration method, service information distribution method, equipment and medium
CN113256115A (en) Global order dispatching method and device for increasing transaction amount

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