Regional inspection method and device, electronic equipment

Through clustering processing and coverage index calculation, the number of clustering centers is automatically adjusted, which solves the problem of limited service scope in the existing technology, and improves the efficiency of regional inspection and the effectiveness detection of recall interfaces.

CN113822098BActive Publication Date: 2025-01-07KOUBEI SHANGHAI INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202010561382.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-06-18
Publication Date
2025-01-07
Estimated Expiration
2040-06-18

AI Technical Summary

Technical Problem

When providing home delivery and in-store services, the service range of merchants and users is limited, resulting in the product or merchant recommendations being limited to specific areas of the user's location, and cannot effectively cover all potential merchants and products, and the recall interface Inefficient inspection.

Method used

By obtaining the location data of the objects to be inspected in the target inspection area, performing clustering processing, determining the clustering center and dividing the inspection sub-regions, calculating coverage indicators, updating the number of clustering centers, and automatically adjusting the number of clustering centers to increase the patrol Check efficiency.

Benefits of technology

It improves the accuracy of the selection of cluster centers, enhances the efficiency of regional inspections, ensures the effectiveness of recall interfaces, and expands service coverage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113822098B_ABST
    Figure CN113822098B_ABST
Patent Text Reader

Abstract

One or more embodiments of the present specification provide a regional inspection method and device, and an electronic device, including: clustering processing based on the location data of objects to be inspected in a target inspection area, and the number of cluster centers corresponding to the target inspection area; determining an inspection sub-area of ​​a preset size corresponding to the cluster center based on the location data of the cluster center obtained by clustering; comparing and analyzing the objects to be inspected in the inspection sub-area with the objects to be inspected in the target inspection area to determine the coverage index corresponding to the number of cluster centers, and calculating the updated number of cluster centers according to the coverage index and the number of cluster centers based on preset update rules; determining whether the updated number of cluster centers hits the historical record; if so, performing validity detection on the objects to be inspected in the inspection sub-area; otherwise, further performing clustering processing based on the location data of the objects to be inspected in the target inspection area, and the updated number of cluster centers.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] One or more embodiments of the present specification relate to the field of computer application technology, and in particular, to a method and device for regional inspection, and electronic equipment. Background Art

[0002] Nowadays, for merchants that provide home delivery services, due to the limitation of delivery capacity, merchants usually only provide home delivery services to users within their delivery range; on the other hand, for users, since the range of their activities is limited, users usually give priority to choosing merchants closer to them for in-store consumption, that is, the radiation range of the in-store service provided by merchants to users is usually limited. Based on this, in the online service of recommending goods or merchants to users, usually only goods or merchants within a certain size area centered on the user's location are searched, and the found goods or merchants are recommended to users.

[0003] In actual applications, the recall of goods or merchants can be carried out by calling the recall interface, that is, obtaining the goods or merchants corresponding to the recall interface. For example, when a user searches for a specific food within 1km nearby through the food search interface, the terminal used by the user can call the recall interface in a circular area with a radius of 1km with the user's location as the center, so that these recall interfaces can return the food that meets the user's needs, and display these foods in the food search interface. Accordingly, in order to ensure that the recall interface functions normally, the recall interface can be inspected regularly to check the validity of the recall interface. Specifically, a call to the recall interface in the inspection area can be initiated at a simulated location in the inspection area, and it can be confirmed whether the return values ​​of these recall interfaces are correct to verify the validity of these recall interfaces. Summary of the invention

[0004] This specification proposes a regional inspection method, the method comprising:

[0005] Acquire position data of objects to be inspected in a target inspection area, and perform clustering processing on the objects to be inspected in the target inspection area based on the position data of the objects to be inspected in the target inspection area and the number of cluster centers corresponding to the target inspection area;

[0006] Determine the location data of the cluster center obtained by clustering, and determine the inspection sub-area of ​​a preset size corresponding to the cluster center based on the location data of the cluster center;

[0007] Comparing and analyzing the objects to be inspected in the inspection sub-area with the objects to be inspected in the target inspection area to determine a coverage index corresponding to the number of cluster centers, and calculating an updated number of cluster centers according to the coverage index and the number of cluster centers based on a preset update rule;

[0008] Determine whether the updated number of cluster centers hits the historical record of the number of cluster centers corresponding to the target inspection area; if so, perform validity check on the objects to be inspected in the inspection sub-area; otherwise, further cluster the objects to be inspected in the target inspection area based on the position data of the objects to be inspected in the target inspection area and the updated number of cluster centers.

[0009] Optionally, clustering the objects to be inspected in the target inspection area includes:

[0010] Based on the k-means clustering algorithm, clustering processing is performed on the objects to be inspected in the target inspection area.

[0011] Optionally, the coverage indicator includes: coverage rate; and / or coverage efficiency.

[0012] Optionally, the comparing and analyzing the objects to be inspected in the inspection sub-area with the objects to be inspected in the target inspection area to determine a coverage index corresponding to the number of cluster centers includes:

[0013] Calculating a first ratio of the non-repetitive number of objects to be inspected in the inspection sub-area to the total number of objects to be inspected in the target inspection area, and determining the first ratio as a coverage rate corresponding to the number of cluster centers;

[0014] And / or, calculating a second ratio of the non-repetitive number of objects to be inspected in the inspection sub-area to the total number of objects to be inspected in the inspection sub-area, and determining the second ratio as the coverage efficiency corresponding to the number of cluster centers.

[0015] Optionally, the calculating the updated number of cluster centers according to the coverage indicator and the number of cluster centers includes:

[0016] According to the coverage indicator and the preset weight of the coverage indicator, and the number of cluster centers, calculating an expected value corresponding to the number of cluster centers;

[0017] The updated number of cluster centers is calculated according to the expected value corresponding to the number of cluster centers, and the preset update step size and update accuracy of the number of cluster centers.

[0018] Optionally, the preset update rule includes:

[0019] E k =(rc×a+ce×b)×k;

[0020] k N =E k +m×(E k -k)+(1-n);

[0021] Among them, E k is the expected value corresponding to the number of cluster centers, rc is the coverage rate, a is the preset weight of the coverage rate, ce is the coverage efficiency, b is the preset weight of the coverage efficiency, k is the number of cluster centers, k N is the updated number of cluster centers, m is the update step size of the preset number of cluster centers, and n is the update accuracy of the preset number of cluster centers.

[0022] Optionally, the location data includes: the longitude and latitude of the location.

[0023] This specification also proposes a regional inspection device, the device comprising:

[0024] A clustering module, used to obtain the position data of the objects to be inspected in the target inspection area, and based on the position data of the objects to be inspected in the target inspection area and the number of cluster centers corresponding to the target inspection area, cluster the objects to be inspected in the target inspection area;

[0025] A determination module, used to determine the location data of the cluster center obtained by clustering, and determine the inspection sub-area of ​​a preset size corresponding to the cluster center based on the location data of the cluster center;

[0026] A calculation module, used for comparing and analyzing the objects to be inspected in the inspection sub-area with the objects to be inspected in the target inspection area to determine a coverage index corresponding to the number of cluster centers, and calculating an updated number of cluster centers according to the coverage index and the number of cluster centers based on a preset update rule;

[0027] A detection module, used to determine whether the updated number of cluster centers hits the historical record of the number of cluster centers corresponding to the target inspection area; if so, perform validity detection on the objects to be inspected in the inspection sub-area;

[0028] The clustering module is also used to cluster the objects to be inspected in the target inspection area based on the position data of the objects to be inspected in the target inspection area and the updated number of clustering centers when the updated number of clustering centers does not hit the historical record.

[0029] Optionally, the clustering module is specifically used for:

[0030] Based on the k-means clustering algorithm, clustering processing is performed on the objects to be inspected in the target inspection area.

[0031] Optionally, the coverage indicator includes: coverage rate; and / or coverage efficiency.

[0032] Optionally, the calculation module is specifically used for:

[0033] Calculating a first ratio of the non-repetitive number of objects to be inspected in the inspection sub-area to the total number of objects to be inspected in the target inspection area, and determining the first ratio as a coverage rate corresponding to the number of cluster centers;

[0034] And / or, calculating a second ratio of the non-repetitive number of objects to be inspected in the inspection sub-area to the total number of objects to be inspected in the inspection sub-area, and determining the second ratio as the coverage efficiency corresponding to the number of cluster centers.

[0035] Optionally, the calculation module is specifically used for:

[0036] According to the coverage indicator and the preset weight of the coverage indicator, and the number of cluster centers, calculating an expected value corresponding to the number of cluster centers;

[0037] The updated number of cluster centers is calculated according to the expected value corresponding to the number of cluster centers, and the preset update step size and update accuracy of the number of cluster centers.

[0038] Optionally, the preset update rule includes:

[0039] E k =(rc×a+ce×b)×k;

[0040] k N =E k +m×(E k -k)+(1-n);

[0041] Among them, E k is the expected value corresponding to the number of cluster centers, rc is the coverage rate, a is the preset weight of the coverage rate, ce is the coverage efficiency, b is the preset weight of the coverage efficiency, k is the number of cluster centers, k N is the updated number of cluster centers, m is the update step size of the preset number of cluster centers, and n is the update accuracy of the preset number of cluster centers.

[0042] Optionally, the location data includes: the longitude and latitude of the location.

[0043] This specification also proposes an electronic device, comprising:

[0044] processor;

[0045] a memory for storing processor-executable instructions;

[0046] The processor implements the steps of the above method by running the executable instructions.

[0047] The present specification also proposes a computer-readable storage medium on which computer instructions are stored. When the instructions are executed by a processor, the steps of the above method are implemented.

[0048] In the above technical scheme, the objects to be inspected in the inspection area can be clustered according to the number of cluster centers corresponding to the inspection area and the position data of the objects to be inspected in the inspection area to obtain a corresponding number of cluster centers, and the inspection sub-areas corresponding to each cluster center can be determined according to the position data of each cluster center; the objects to be inspected in the inspection sub-areas corresponding to each cluster center are then compared and analyzed with the objects to be inspected in the inspection area to determine the coverage index corresponding to the number of cluster centers used for this clustering, and the updated number of cluster centers is calculated according to the coverage index and the number of cluster centers; subsequently, it can be determined whether the clustering processing corresponding to the updated number of cluster centers has been completed. If the updated number of cluster centers hits the historical record of the number of cluster centers corresponding to the inspection area, the validity of the objects to be inspected in the inspection area can be directly checked based on the cluster centers obtained by this clustering. Otherwise, it is necessary to re-cluster the objects to be inspected in the inspection area based on the updated number of cluster centers. In this way, by updating the number of cluster centers corresponding to the inspection area, the appropriate number of cluster centers can be automatically determined for the inspection area, so as to improve the accuracy of selecting the number of cluster centers and thus improve the efficiency of regional inspection. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] Figure 1 is a flow chart of a regional inspection method shown in an exemplary embodiment of this specification;

[0050] Figure 2 is a schematic diagram of an inspection area shown in an exemplary embodiment of this specification;

[0051] Figure 3 It is a hardware structure diagram of an electronic device where a regional inspection device is located, shown in an exemplary embodiment of this specification;

[0052] Figure 4 It is a block diagram of a regional inspection device shown in an exemplary embodiment of this specification. DETAILED DESCRIPTION

[0053] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with one or more embodiments of this specification. Instead, they are merely examples of devices and methods consistent with some aspects of one or more embodiments of this specification as detailed in the appended claims.

[0054] The terms used in this specification are for the purpose of describing specific embodiments only and are not intended to limit this specification. The singular forms "a", "the" and "the" used in this specification and the appended claims are also intended to include plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.

[0055] It should be understood that although the terms first, second, third, etc. may be used in this specification to describe various information, this information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of this specification, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0056] The present specification aims to provide a technical solution for clustering objects to be inspected in an inspection area based on their location data, and inspecting the objects to be inspected in the inspection area according to the clustering results.

[0057] In the specific implementation, the location data of the objects to be inspected (for example, the recall interface) in a certain inspection area (called the target inspection area) can be obtained first, and these objects to be inspected are clustered based on their location data and the number of cluster centers corresponding to the target inspection area.

[0058] After the clustering process is completed, the location data of the cluster centers obtained by clustering can be determined, and the inspection sub-areas corresponding to the cluster centers can be determined based on the location data of the cluster centers and the preset inspection sub-area sizes. The inspection sub-area sizes can be preset by technicians according to actual needs.

[0059] For the inspection sub-areas corresponding to the determined cluster centers, the objects to be inspected in each inspection sub-area can be compared and analyzed with the objects to be inspected in the target inspection area to determine the coverage index corresponding to the above number of cluster centers (i.e., the number of cluster centers used for this clustering). Among them, for a certain cluster center, the objects to be inspected in the inspection sub-area corresponding to the cluster center are the objects to be inspected whose distance from the cluster center is less than or equal to the preset inspection sub-area size.

[0060] When the coverage index corresponding to the above number of cluster centers (i.e., the number of cluster centers used in this clustering) is determined, the updated number of cluster centers can be calculated based on the coverage index and the number of cluster centers according to a preset update rule. The update rule can be preset by a technician according to actual needs.

[0061] When the updated number of cluster centers is calculated, it can be further determined whether the updated number of cluster centers hits the historical record of the number of cluster centers corresponding to the target inspection area.

[0062] If it is determined that the updated number of cluster centers hits the historical record, the validity of the objects to be inspected in the target inspection area can be checked based on the cluster centers obtained this time, that is, at the position of each cluster center obtained this time, the validity of the objects to be inspected in the inspection sub-area corresponding to the cluster center can be checked.

[0063] If the updated number of cluster centers does not hit the historical record, the objects to be inspected in the target inspection area can be further clustered based on the location data of the objects to be inspected in the target inspection area and the updated number of cluster centers. At the same time, the updated number of cluster centers can be recorded in the above historical record. After the clustering process is completed, the above steps of calculating the updated number of cluster centers and determining whether the updated number of cluster centers hits the historical record can be repeated.

[0064] In the above technical scheme, the objects to be inspected in the inspection area can be clustered according to the number of cluster centers corresponding to the inspection area and the position data of the objects to be inspected in the inspection area to obtain a corresponding number of cluster centers, and the inspection sub-areas corresponding to each cluster center can be determined according to the position data of each cluster center; the objects to be inspected in the inspection sub-areas corresponding to each cluster center are then compared and analyzed with the objects to be inspected in the inspection area to determine the coverage index corresponding to the number of cluster centers used for this clustering, and the updated number of cluster centers is calculated according to the coverage index and the number of cluster centers; subsequently, it can be determined whether the clustering processing corresponding to the updated number of cluster centers has been completed. If the updated number of cluster centers hits the historical record of the number of cluster centers corresponding to the inspection area, the validity of the objects to be inspected in the inspection area can be directly checked based on the cluster centers obtained by this clustering. Otherwise, it is necessary to cluster the objects to be inspected in the inspection area again based on the updated number of cluster centers. In this way, by updating the number of cluster centers corresponding to the inspection area, the appropriate number of cluster centers can be automatically determined for the inspection area, so as to improve the accuracy of selecting the number of cluster centers, thereby improving the efficiency of regional inspection.

[0065] Please refer to Figure 1 , Figure 1 This is a flowchart of a regional inspection method shown in an exemplary embodiment of this specification. The regional inspection method can be applied to a server that provides regional inspection services. The server can be deployed on an electronic device. The electronic device can be a server or a computer, etc. This specification does not limit this. The regional inspection method may include the following steps:

[0066] Step 101, obtaining position data of objects to be inspected in a target inspection area, and clustering the objects to be inspected in the target inspection area based on the position data of the objects to be inspected in the target inspection area and the number of cluster centers corresponding to the target inspection area;

[0067] Step 102, determining the location data of the cluster center obtained by clustering, and determining the inspection sub-area of ​​a preset size corresponding to the cluster center based on the location data of the cluster center;

[0068] Step 103, comparing and analyzing the objects to be inspected in the inspection sub-area with the objects to be inspected in the target inspection area to determine a coverage index corresponding to the number of cluster centers, and calculating an updated number of cluster centers according to the coverage index and the number of cluster centers based on a preset update rule;

[0069] Step 104, determine whether the updated number of cluster centers hits the historical record of the number of cluster centers corresponding to the target inspection area; if so, perform validity check on the objects to be inspected in the inspection sub-area; otherwise, further cluster the objects to be inspected in the target inspection area based on the position data of the objects to be inspected in the target inspection area and the updated number of cluster centers.

[0070] In this embodiment, the object to be inspected may be a recall interface that needs to be tested for validity, and the inspection area may be a geographical area covering these recall interfaces, that is, the locations of these recall interfaces are located within the inspection area. In practical applications, for a certain recall interface, the location of the recall interface may be the location of the commodity or merchant corresponding to the recall interface.

[0071] Usually, the objects to be inspected can be divided according to the inspection dimension to obtain multiple inspection areas, and the objects to be inspected in each inspection area can be inspected separately. In practical applications, regional inspections can be carried out with cities as the inspection dimension. In this case, the objects to be inspected can be divided according to cities, that is, the geographical area where a city is located is used as an inspection area. It should be noted that the inspection dimension can also be a geographical area such as a province, district, or county, and this manual does not limit this.

[0072] In this embodiment, for a certain inspection area (referred to as a target inspection area), the location data of the objects to be inspected in the target inspection area can be first obtained, and then these objects to be inspected are clustered based on their location data and the number of cluster centers corresponding to the target inspection area.

[0073] It should be noted that the initial value of the number of cluster centers corresponding to the target inspection area may be 1, and the number of cluster centers may be updated later according to the clustering results corresponding to the objects to be inspected in the target inspection area.

[0074] In practical applications, the number of cluster centers corresponding to the target inspection area can be recorded as k.

[0075] In this case, based on a preset clustering algorithm, the objects to be inspected in the target inspection area can be clustered according to their position data, so that the objects to be inspected in the target inspection area can be clustered into k categories. The clustering algorithm can be preset by a technician.

[0076] Specifically, the number of cluster centers k and the termination condition of the clustering algorithm can be input into the clustering algorithm first, and then the clustering algorithm is run to cluster the objects to be inspected in the target inspection area according to their position data, so that the objects to be inspected in the target inspection area can be clustered into k categories. The termination condition of the clustering algorithm can include the maximum number of iterations and the convergence step size.

[0077] It should be noted that each type of objects to be inspected obtained by clustering has a cluster center; and each type of objects to be inspected obtained by clustering includes at least one object to be inspected.

[0078] In one embodiment shown, the above clustering algorithm can specifically be a k-means clustering algorithm. When clustering the objects to be inspected in the target inspection area based on the k-means clustering algorithm, k objects to be inspected can be randomly selected from all the objects to be inspected in the target inspection area as k cluster centers, and then for each remaining object to be inspected, based on the position data of the object to be inspected and the position data of each cluster center, the distance between the object to be inspected and each cluster center is calculated respectively, so as to assign the object to be inspected to the cluster center with the shortest distance to the object to be inspected. Among them, a cluster center and the object to be inspected assigned to the cluster center are a cluster. For each cluster, each time an object to be inspected is assigned, the cluster center of the cluster will be recalculated based on the objects to be inspected in the cluster. Such a clustering process can be repeated until the end condition of the k-means clustering algorithm is met.

[0079] In one embodiment shown, the location data of the above-mentioned object to be inspected may include the longitude and latitude of the location of the object to be inspected determined based on LBS (Location Based Services). Taking the recall interface as an example, for a certain recall interface, the location data of the recall interface may include the longitude and latitude of the location of the commodity or merchant corresponding to the recall interface determined based on LBS. In this case, the longitude and latitude of the object to be inspected can be used as the geographic coordinates of the object to be inspected, so that the distance between each object to be inspected and each clustering center can be calculated respectively according to the geographic coordinates of the object to be inspected in the target inspection area, and finally the geographic coordinates of the clustering center obtained by clustering are determined, that is, the longitude and latitude of the clustering center obtained by clustering are determined.

[0080] In practical applications, since the earth is approximately spherical, in order to be practical, when calculating the distance between an object to be inspected and a cluster center, the spherical distance between the object to be inspected and the cluster center can be calculated based on the geographic coordinates of the object to be inspected and the geographic coordinates of the cluster center.

[0081] That is, when calculating the distance between a certain object to be detected and a certain cluster center, the spherical distance between the object to be detected and the cluster center may be calculated according to the longitude and latitude of the object to be detected and the cluster center.

[0082] In this embodiment, after the clustering process is completed, the location data of the cluster centers obtained by clustering can be determined, and further based on the location data of each cluster center and the preset inspection sub-area size, the inspection sub-area corresponding to each cluster center can be determined respectively. The inspection sub-area size can be preset by the technician according to actual needs.

[0083] As Figure 2 Taking the inspection area shown as an example, a point in the inspection area represents an object to be inspected. At this time, the number of cluster centers corresponding to the inspection area is 4, that is, when clustering the objects to be inspected in the inspection area, the number of cluster centers used is 4. In this case, there are 4 cluster centers obtained by clustering, namely: cluster center 1, cluster center 2, cluster center 3 and cluster center 4. Assuming that the preset inspection sub-area size is 3km, the inspection sub-area 1 corresponding to cluster center 1 can be a circular area with a radius of 3km with cluster center 1 as the center, the inspection sub-area 2 corresponding to cluster center 2 can be a circular area with a radius of 3km with cluster center 2 as the center, the inspection sub-area 3 corresponding to cluster center 3 can be a circular area with a radius of 3km with cluster center 3 as the center, and the inspection sub-area 4 corresponding to cluster center 4 can be a circular area with a radius of 3km with cluster center 4 as the center.

[0084] like Figure 2 As shown, there may be overlapping parts between the inspection sub-areas corresponding to each cluster center (for example, there is overlapping part between inspection sub-area 1 and inspection sub-area 2), or there may be no overlapping parts (for example, there is no overlapping part between inspection sub-area 3 and inspection sub-area 4); and the sum of the coverage areas of all inspection sub-areas may also be smaller than the coverage area of ​​the inspection area.

[0085] In this embodiment, for the inspection sub-areas corresponding to the determined cluster centers, the objects to be inspected in each inspection sub-area can be compared and analyzed with the objects to be inspected in the target inspection area to determine the coverage index corresponding to the number of cluster centers (i.e., the number of cluster centers used for this clustering). For a certain cluster center, the objects to be inspected in the inspection sub-area corresponding to the cluster center are the objects to be inspected whose distance from the cluster center is less than or equal to the preset inspection sub-area size.

[0086] In one embodiment shown, the above-mentioned coverage index may include: coverage rate; and / or coverage efficiency. In practical applications, the coverage index can reflect the rationality of the number of cluster centers to a certain extent. If there are too few cluster centers, it is impossible to cover enough objects to be inspected and meet the needs of comprehensive inspection; if there are too many cluster centers, there will be a large number of repeated objects to be inspected in adjacent inspection sub-areas, which will increase the number of repeated inspections and have a negative impact on inspection efficiency.

[0087] Specifically, the number of objects to be inspected in each inspection sub-area can be counted respectively, so as to obtain the total number of objects to be inspected in each inspection sub-area and the non-repetitive number of objects to be inspected in each inspection sub-area. The total number of objects to be inspected in each inspection sub-area is the number obtained by adding the number of objects to be inspected in each inspection sub-area; the non-repetitive number of objects to be inspected in each inspection sub-area is the number obtained by counting the objects to be inspected in each inspection sub-area once. In addition, the total number of objects to be inspected in the target inspection area can also be counted.

[0088] Subsequently, on the one hand, the ratio of the non-repetitive number of objects to be inspected in each inspection sub-area to the total number of objects to be inspected in the target inspection area (called the first ratio) can be calculated, and the first ratio is determined as the coverage rate corresponding to the number of cluster centers used in this clustering, as shown in the following formula:

[0089]

[0090] Among them, rc is the above coverage, N k is the non-repetitive number of objects to be inspected in each of the above inspection sub-areas, and N is the total number of objects to be inspected in the above target inspection area.

[0091] On the other hand, the ratio of the non-repetitive number of objects to be inspected in each inspection sub-area to the total number of objects to be inspected in each inspection sub-area (called the second ratio) can be calculated, and the second ratio is determined as the coverage efficiency corresponding to the number of cluster centers used in this clustering, as shown in the following formula:

[0092]

[0093] Where ce is the above coverage efficiency, N k is the number of non-repetitive objects to be inspected in each inspection sub-area, A k is the number of objects to be inspected in the inspection sub-area corresponding to the kth cluster center, that is, A1+A2+…+A k It is the sum of the number of objects to be inspected in each of the above inspection sub-areas.

[0094] by Figure 2 Take the inspection area shown as an example, a point in the inspection area represents an object to be inspected, that is, there are 30 objects to be inspected in the inspection area. At this time, the number of cluster centers corresponding to the inspection area is 4, that is, when clustering the objects to be inspected in the inspection area, the number of cluster centers used is 4. In this case, there are 4 cluster centers obtained by clustering, namely: cluster center 1, cluster center 2, cluster center 3 and cluster center 4. Among them, there are 8 objects to be inspected in the inspection sub-area 1 corresponding to cluster center 1, 8 objects to be inspected in the inspection sub-area 2 corresponding to cluster center 2, 10 objects to be inspected in the inspection sub-area 3 corresponding to cluster center 3, and 7 objects to be inspected in the inspection sub-area 4 corresponding to cluster center 4; the non-repetitive number of objects to be inspected in the four inspection sub-areas of inspection sub-area 1, inspection sub-area 2, inspection sub-area 3 and inspection sub-area 4 is 27.

[0095] In this case, for this inspection area, the coverage corresponding to the number of cluster centers 4 is Coverage efficiency corresponding to the number of cluster centers 3

[0096] In this embodiment, when the coverage index corresponding to the above number of cluster centers (i.e., the number of cluster centers used in this clustering) is determined, the updated number of cluster centers can be calculated based on the coverage index and the number of cluster centers according to a preset update rule. The update rule can be preset by a technician according to actual needs.

[0097] In one embodiment shown, the expected value corresponding to the number of cluster centers adopted in this clustering can be calculated according to the above-mentioned coverage index and the preset weight of the coverage index, as well as the number of cluster centers adopted in this clustering, and then the updated number of cluster centers can be calculated according to the expected value, as well as the preset update step size and update accuracy of the number of cluster centers.

[0098] It should be noted that the above-mentioned weights, update step size and update accuracy of the above-mentioned cluster centers can be pre-set by technical personnel according to actual needs; when the above-mentioned coverage indicators are coverage rate and coverage efficiency, the sum of the weight of the coverage rate and the weight of the coverage efficiency is equal to 1.

[0099] Specifically, the preset update rule may include the following formula:

[0100] E k =(rc×a+ce×b)×k

[0101] k N =E k +m×(E k-k)+(1-n)

[0102] Among them, E k is the expected value corresponding to the number of cluster centers used in this clustering, rc is the coverage rate, a is the preset weight of the coverage rate, ce is the coverage efficiency, b is the preset weight of the coverage efficiency, k is the number of cluster centers used in this clustering, k N is the updated number of cluster centers, m is the update step of the preset number of cluster centers, and n is the update accuracy of the preset number of cluster centers.

[0103] Continue with Figure 2 Take the inspection area shown in the figure as an example, assuming that the preset coverage weight is The preset weight of coverage efficiency is The preset update step size of the number of cluster centers is 0.2, and the preset update accuracy of the number of cluster centers is 0.05. Then, the expected value corresponding to the number of cluster centers used in this clustering can be calculated first: Then calculate the updated number of cluster centers: k N =3.4909+0.2×(3.4909-4)+(1-0.05)≈4.3391. Since the calculated updated number of cluster centers is not an integer, the updated number of cluster centers can be rounded up, that is, the updated number of cluster centers can be determined to be 5.

[0104] In this embodiment, when the updated number of cluster centers is calculated, it can be further determined whether the updated number of cluster centers hits the historical record of the number of cluster centers corresponding to the target inspection area.

[0105] That is, for the target inspection area, the number of cluster centers used in each clustering can be recorded in sequence starting from the first clustering (the number of cluster centers used in the first clustering is the initial value of the number of cluster centers) as the historical record of the number of cluster centers corresponding to the target inspection area. In this case, it can be determined whether the updated number of cluster centers has been recorded in the historical record, that is, whether the updated number of cluster centers hits the historical record.

[0106] If it is determined that the updated number of cluster centers hits the historical record, it means that the clustering process using the updated number of cluster centers has been completed, so there is no need to use the updated number of cluster centers for clustering. In this case, the validity of the objects to be inspected in the target inspection area can be checked based on the cluster centers obtained by this clustering, that is, at the positions of each cluster center obtained by this clustering, the validity of the objects to be inspected in the inspection sub-area corresponding to the cluster center can be checked.

[0107] If the updated number of cluster centers does not hit the historical record, it means that the updated number of cluster centers has not been used for clustering processing. In this case, the objects to be inspected in the target inspection area can be further clustered based on the position data of the objects to be inspected in the target inspection area and the updated number of cluster centers. At the same time, the updated number of cluster centers can be recorded in the above historical record. After the clustering process is completed, the above steps of calculating the updated number of cluster centers and determining whether the updated number of cluster centers hits the historical record can be repeated, that is, repeating the above steps 102 to 104.

[0108] In the above technical scheme, the objects to be inspected in the inspection area can be clustered according to the number of cluster centers corresponding to the inspection area and the position data of the objects to be inspected in the inspection area to obtain a corresponding number of cluster centers, and the inspection sub-areas corresponding to each cluster center can be determined according to the position data of each cluster center; the objects to be inspected in the inspection sub-areas corresponding to each cluster center are then compared and analyzed with the objects to be inspected in the inspection area to determine the coverage index corresponding to the number of cluster centers used for this clustering, and the updated number of cluster centers is calculated according to the coverage index and the number of cluster centers; subsequently, it can be determined whether the clustering processing corresponding to the updated number of cluster centers has been completed. If the updated number of cluster centers hits the historical record of the number of cluster centers corresponding to the inspection area, the validity of the objects to be inspected in the inspection area can be directly checked based on the cluster centers obtained by this clustering. Otherwise, it is necessary to cluster the objects to be inspected in the inspection area again based on the updated number of cluster centers. In this way, by updating the number of cluster centers corresponding to the inspection area, the appropriate number of cluster centers can be automatically determined for the inspection area, so as to improve the accuracy of selecting the number of cluster centers, thereby improving the efficiency of regional inspection.

[0109] Corresponding to the aforementioned embodiments of the regional inspection method, this specification also provides embodiments of the regional inspection device.

[0110] The embodiments of the area inspection device of this specification can be applied to electronic devices. The device embodiments can be implemented by software, hardware, or a combination of software and hardware. Taking software implementation as an example, as a device in a logical sense, it is formed by the processor of the electronic device in which it is located reading the corresponding computer program instructions in the non-volatile memory into the memory and running them. From the hardware level, if Figure 3 The figure is a hardware structure diagram of the electronic equipment where the regional inspection device of this manual is located. Figure 3In addition to the processor, memory, network interface, and non-volatile memory shown, the electronic device in which the device is located in the embodiment may also include other hardware according to the actual function of the area inspection, which will not be described in detail.

[0111] Please refer to Figure 4 , Figure 4 is a block diagram of a regional inspection device shown in an exemplary embodiment of this specification. The regional inspection device 40 can be applied to Figure 3 The electronic device shown includes:

[0112] The clustering module 401 is used to obtain the position data of the objects to be inspected in the target inspection area, and cluster the objects to be inspected in the target inspection area based on the position data of the objects to be inspected in the target inspection area and the number of cluster centers corresponding to the target inspection area;

[0113] A determination module 402, configured to determine location data of a cluster center obtained by clustering, and determine an inspection sub-area of ​​a preset size corresponding to the cluster center based on the location data of the cluster center;

[0114] A calculation module 403 is used to compare and analyze the objects to be inspected in the inspection sub-area with the objects to be inspected in the target inspection area to determine a coverage index corresponding to the number of cluster centers, and calculate the updated number of cluster centers according to the coverage index and the number of cluster centers based on a preset update rule;

[0115] A detection module 404 is used to determine whether the updated number of cluster centers hits the historical record of the number of cluster centers corresponding to the target inspection area; if so, perform validity detection on the objects to be inspected in the inspection sub-area;

[0116] The clustering module 401 is also used to cluster the objects to be inspected in the target inspection area based on the position data of the objects to be inspected in the target inspection area and the updated number of clustering centers when the updated number of clustering centers does not hit the historical record.

[0117] In this embodiment, the clustering module is specifically used for:

[0118] Based on the k-means clustering algorithm, clustering processing is performed on the objects to be inspected in the target inspection area.

[0119] In this embodiment, the coverage index includes: coverage rate; and / or coverage efficiency.

[0120] In this embodiment, the calculation module 403 is specifically used for:

[0121] Calculating a first ratio of the non-repetitive number of objects to be inspected in the inspection sub-area to the total number of objects to be inspected in the target inspection area, and determining the first ratio as a coverage rate corresponding to the number of cluster centers;

[0122] And / or, calculating a second ratio of the non-repetitive number of objects to be inspected in the inspection sub-area to the total number of objects to be inspected in the inspection sub-area, and determining the second ratio as the coverage efficiency corresponding to the number of cluster centers.

[0123] In this embodiment, the calculation module 403 is specifically used for:

[0124] According to the coverage indicator and the preset weight of the coverage indicator, and the number of cluster centers, calculating an expected value corresponding to the number of cluster centers;

[0125] The updated number of cluster centers is calculated according to the expected value corresponding to the number of cluster centers, and the preset update step size and update accuracy of the number of cluster centers.

[0126] In this embodiment, the preset update rules include:

[0127] E k =(rc×a+ce×b)×k;

[0128] k N =E k +m×(E k -k)+(1-n);

[0129] Among them, E k is the expected value corresponding to the number of cluster centers, rc is the coverage rate, a is the preset weight of the coverage rate, ce is the coverage efficiency, b is the preset weight of the coverage efficiency, k is the number of cluster centers, k N is the updated number of cluster centers, m is the update step size of the preset number of cluster centers, and n is the update accuracy of the preset number of cluster centers.

[0130] In this embodiment, the location data includes: the longitude and latitude of the location.

[0131] The implementation process of the functions and effects of each module in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, which will not be repeated here.

[0132] For the device embodiment, since it basically corresponds to the method embodiment, the relevant parts can refer to the partial description of the method embodiment. The device embodiment described above is only schematic, wherein the modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this specification. A person of ordinary skill in the art can understand and implement it without paying creative labor.

[0133] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer, which may be in the form of a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email transceiver, a game console, a tablet computer, a wearable device or a combination of any of these devices.

[0134] In a typical configuration, a computer includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0135] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0136] Computer-readable media include permanent and non-permanent, removable and non-removable media that can be used to store information by any method or technology. Information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, disk storage, quantum memory, graphene-based storage media or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include temporary computer-readable media (transitory media), such as modulated data signals and carrier waves.

[0137] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0138] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0139] The terms used in one or more embodiments of this specification are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of this specification. The singular forms of "a", "said" and "the" used in one or more embodiments of this specification and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.

[0140] It should be understood that although the terms first, second, third, etc. may be used to describe various information in one or more embodiments of this specification, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of this specification, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0141] The above description is merely a preferred embodiment of one or more embodiments of the present specification and is not intended to limit one or more embodiments of the present specification. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of one or more embodiments of the present specification shall be included in the scope of protection of one or more embodiments of the present specification.

Claims

1. A regional inspection method, the method comprising: Acquire position data of objects to be inspected in a target inspection area, and perform clustering processing on the objects to be inspected in the target inspection area based on the position data of the objects to be inspected in the target inspection area and the number of cluster centers corresponding to the target inspection area; Determine the location data of the cluster center obtained by clustering, and determine the inspection sub-area of ​​a preset size corresponding to the cluster center based on the location data of the cluster center; Comparing and analyzing the objects to be inspected in the inspection sub-area with the objects to be inspected in the target inspection area to determine a coverage index corresponding to the number of cluster centers, and calculating an updated number of cluster centers according to the coverage index and the number of cluster centers based on a preset update rule; Determine whether the updated number of cluster centers hits the historical record of the number of cluster centers corresponding to the target inspection area; if so, perform validity detection on the objects to be inspected in the inspection sub-area; otherwise, further perform clustering processing on the objects to be inspected in the target inspection area based on the position data of the objects to be inspected in the target inspection area and the updated number of cluster centers; The step of calculating the updated number of cluster centers according to the coverage index and the number of cluster centers includes: According to the coverage indicator and the preset weight of the coverage indicator, and the number of cluster centers, calculating an expected value corresponding to the number of cluster centers; The updated number of cluster centers is calculated according to the expected value corresponding to the number of cluster centers, and the preset update step size and update accuracy of the number of cluster centers.

2. According to the method of claim 1, the clustering of the objects to be inspected in the target inspection area comprises: Based on the k-means clustering algorithm, clustering processing is performed on the objects to be inspected in the target inspection area.

3. The method according to claim 1, wherein the coverage indicator comprises: Coverage ratio; and / or, coverage efficiency.

4. The method according to claim 3, wherein the comparing and analyzing the objects to be inspected in the inspection sub-area with the objects to be inspected in the target inspection area to determine the coverage index corresponding to the number of cluster centers comprises: Calculating a first ratio of the non-repetitive number of objects to be inspected in the inspection sub-area to the total number of objects to be inspected in the target inspection area, and determining the first ratio as a coverage rate corresponding to the number of cluster centers; And / or, calculating a second ratio of the non-repetitive number of objects to be inspected in the inspection sub-area to the total number of objects to be inspected in the inspection sub-area, and determining the second ratio as the coverage efficiency corresponding to the number of cluster centers.

5. According to the method of claim 3, the preset update rule comprises: AND k =(rc×a+ce×b)×k; k N =E k +m×(E k -k)+(1-n)? Among them, E k is the expected value corresponding to the number of cluster centers, rc is the coverage rate, a is the preset weight of the coverage rate, ce is the coverage efficiency, b is the preset weight of the coverage efficiency, k is the number of cluster centers, k N is the updated number of cluster centers, m is the update step size of the preset number of cluster centers, and n is the update accuracy of the preset number of cluster centers.

6. The method according to claim 1, wherein the location data comprises: The longitude and latitude of your location.

7. A regional inspection device, comprising: A clustering module, used to obtain the position data of the objects to be inspected in the target inspection area, and based on the position data of the objects to be inspected in the target inspection area and the number of cluster centers corresponding to the target inspection area, cluster the objects to be inspected in the target inspection area; A determination module, used to determine the location data of the cluster center obtained by clustering, and determine the inspection sub-area of ​​a preset size corresponding to the cluster center based on the location data of the cluster center; A calculation module, used for comparing and analyzing the objects to be inspected in the inspection sub-area with the objects to be inspected in the target inspection area to determine a coverage index corresponding to the number of cluster centers, and calculating an updated number of cluster centers according to the coverage index and the number of cluster centers based on a preset update rule; A detection module, used to determine whether the updated number of cluster centers hits the historical record of the number of cluster centers corresponding to the target inspection area; if so, perform validity detection on the objects to be inspected in the inspection sub-area; The clustering module is also used to cluster the objects to be inspected in the target inspection area based on the position data of the objects to be inspected in the target inspection area and the updated number of clustering centers when the updated number of clustering centers does not hit the historical record; The calculation module is specifically used to calculate the expected value corresponding to the number of cluster centers according to the coverage index and the preset weight of the coverage index, and the number of cluster centers; and to calculate the updated number of cluster centers according to the expected value corresponding to the number of cluster centers, and the preset update step size and update accuracy of the number of cluster centers.

8. The device according to claim 7, wherein the clustering module is specifically used for: Based on the k-means clustering algorithm, clustering processing is performed on the objects to be inspected in the target inspection area.

9. The apparatus according to claim 7, wherein the coverage indicator comprises: Coverage ratio; and / or, coverage efficiency.

10. The device according to claim 9, wherein the calculation module is specifically used for: Calculating a first ratio of the non-repetitive number of objects to be inspected in the inspection sub-area to the total number of objects to be inspected in the target inspection area, and determining the first ratio as a coverage rate corresponding to the number of cluster centers; And / or, calculating a second ratio of the non-repetitive number of objects to be inspected in the inspection sub-area to the total number of objects to be inspected in the inspection sub-area, and determining the second ratio as the coverage efficiency corresponding to the number of cluster centers.

11. The device according to claim 9, wherein the preset update rule comprises: AND k =(rc×a+ce×b)×k; k N =E k +m×(E k -k)+(1-n)? Among them, E k is the expected value corresponding to the number of cluster centers, rc is the coverage rate, a is the preset weight of the coverage rate, ce is the coverage efficiency, b is the preset weight of the coverage efficiency, k is the number of cluster centers, k N is the updated number of cluster centers, m is the update step size of the preset number of cluster centers, and n is the update accuracy of the preset number of cluster centers.

12. The device according to claim 7, wherein the location data comprises: The longitude and latitude of your location.

13. An electronic device, comprising: processor; a memory for storing processor-executable instructions; The processor implements the method according to any one of claims 1 to 6 by running the executable instructions.

14. A computer-readable storage medium having computer instructions stored thereon, which, when executed by a processor, implement the steps of the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Urban shared bicycle key scheduling point number and position determination method

    CN107730876A

  • Sampling processing method and device for recall areas

    CN111008675A