Automatic numbering method, device and system for drip irrigation electric valves and storage medium
By integrating a GNSS positioning module and LoRa communication onto the electric valve, and combining intelligent algorithms to automatically obtain the relative coordinates of the electric valve and assign a unique number, the problems of low efficiency and poor accuracy of manual numbering are solved, enabling fast and accurate numbering of electric valves and flexible management of the system.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-31
- Publication Date
- 2026-04-10
AI Technical Summary
In existing technologies, the numbering of electric drip irrigation valves relies on manual methods, which is inefficient, inaccurate, unresponsive, and costly to maintain, failing to meet the needs of rapid deployment and efficient management in modern agriculture.
By integrating a GNSS positioning module onto the electric valve, the location information is uploaded to the cloud using LoRa wireless communication. Combined with a proximity matching strategy and an adaptive linear subspace clustering algorithm based on direction constraints, the relative coordinates of the electric valve are automatically obtained and a unique number is assigned.
It enables rapid and accurate numbering of electric valves, reduces human error, supports automatic deployment and maintenance in scenarios without drawings, improves system flexibility and data consistency, and reduces maintenance costs.
Smart Images

Figure CN121836327A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of drip irrigation electric valves, and particularly relates to a drip irrigation electric valve automatic numbering method, device and system and a storage medium. BACKGROUND
[0002] In large-scale drip irrigation engineering, drip irrigation electric valves are key executive components for realizing zoning water control and precise irrigation scheduling. Each electric valve usually controls several adjacent branch pipes, and its number is used as a unique logical identifier of the valve in the system, which is directly related to the accurate issuance of remote control instructions, the rapid positioning of fault units, and the efficient management of rotation irrigation groups. At present, in the deployment and maintenance of large-scale drip irrigation engineering, the numbering of electric valves still highly depends on traditional manual methods. Construction personnel must carry paper or electronic design drawings to the field, determine the installation position of each electric valve on site according to the drawings, and manually mark and record. This mode exposes significant limitations in large projects with hundreds or even thousands of electric valves.
[0003] Firstly, the efficiency of manual numbering is extremely low. Since it is necessary to repeatedly check the drawings, locate on site, and manually record, it takes an average of 5 to 8 minutes to complete the numbering of a single electric valve and its corresponding branch pipe. For a large project with thousands of valves, the entire numbering process often takes several weeks, which seriously delays the overall construction progress of the project and cannot meet the urgent needs of modern agriculture for rapid deployment and efficient production. Secondly, the accuracy of this method cannot be guaranteed. The complex and variable field environment, drawing wear and tear, construction layout deviation, and adverse weather interference can easily lead to numbering mismatch, repetition or omission. Once the numbering error occurs, it will directly cause the misoperation of the remote control system, such as incorrectly closing or opening non-target branch pipes, thereby causing local irrigation deficiency or waterlogging disaster in farmland, which will directly cause losses to agricultural production. After the error occurs, a large amount of manpower is often needed for secondary verification and correction, further increasing the cost. Thirdly, the traditional method lacks flexibility and automation capability and cannot adapt to the later adjustment or dynamic optimization of field layout. When the system needs to be expanded, repaired or modified, the newly added or replaced valves also need to go through the cumbersome manual numbering process, and in old projects without original drawings, even a comprehensive re-mapping and numbering may be needed, which is costly to maintain. Finally, the information marked manually exists in paper records or discrete electronic spreadsheets, and there is a "data fault" between the information and the modern intelligent irrigation management platform. Additional manual input is usually needed to realize system integration, which is not only inefficient but also introduces new data error risks.
[0004] Up to now, in the field of drip irrigation automation and intelligence, there is no mature and systematic automatic numbering solution for electric valves. Related research and technical practice are mostly concentrated in irrigation control strategies or pipe network hydraulic calculation, and the automatic, accurate and efficient mapping and association between physical equipment (electric valve) and logical identification (number) are still blank. SUMMARY
[0005] To solve the problems existing in the prior art, the present application provides a drip irrigation electric valve automatic numbering method and device, system and storage medium, which overcomes the defects of low efficiency, poor accuracy, weak adaptability and high maintenance cost of the existing drip irrigation electric valve numbering method which completely relies on manual operation.
[0006] To achieve the above-mentioned purpose, the present application provides the following solutions: A drip irrigation electric valve automatic numbering method, comprising: Step S1, obtaining the geographic coordinates of the electric valve; Step S2, converting the geographic coordinates of the electric valve into plane coordinates of the actual relative position relationship of the electric valve in the field; Step S3, assigning a unique number to the electric valve according to the relative coordinates and spatial position relationship of the electric valve, which conforms to the topological logic of the irrigation system.
[0007] As a preferred, in step S1, a GNSS positioning module is integrated on each electric valve, and the position information is periodically uploaded to the gateway through LoRa wireless communication, and then transmitted to the control center through the MQTT protocol, to realize automatic collection of the position information of the electric valve.
[0008] As a preferred, in step S3, a dual-mode numbering algorithm based on proximity matching strategy and adaptive linear subspace clustering strategy based on direction constraint is used to assign a unique number to the electric valve, which conforms to the topological logic of the irrigation system; wherein when the electric valve coordinates are complete, the valve is spatially associated with the preset or inferred branch pipe center point by proximity matching; when the complete coordinates are lacking or in the signal shielding area, adaptive linear subspace clustering based on direction constraint is performed based on the characteristics of the direction and distance of the main pipe, to automatically identify the branch pipe grouping and generate the number.
[0009] The present application also provides a drip irrigation electric valve automatic numbering device, comprising: A first processing module for obtaining the geographic coordinates of the electric valve; A second processing module for converting the geographic coordinates of the electric valve into plane coordinates of the actual relative position relationship of the electric valve in the field; A third processing module for assigning a unique number to the electric valve according to the relative coordinates and spatial position relationship of the electric valve, which conforms to the topological logic of the irrigation system.
[0010] As preferred, a GNSS positioning module is integrated on each electric valve, and the position information is periodically uploaded to the gateway through LoRa wireless communication, and then transmitted to the control center through the MQTT protocol, realizing automatic collection of the electric valve position information.
[0011] As preferred, the third processing module adopts a dual-mode numbering algorithm based on a proximity matching strategy and an adaptive linear subspace clustering strategy based on direction constraints to assign a unique number to the electric valve that conforms to the irrigation system topology logic;When the electric valve coordinates are complete, the valve is spatially associated with the preset or inferred branch center point using proximity matching;When there is a lack of complete coordinates or in a signal shielding area, adaptive linear subspace clustering based on direction constraints is performed based on the characteristics of the main pipe direction, direction and distance, automatically identifying branch grouping and generating a number.
[0012] The application also provides a drip irrigation electric valve automatic numbering system, comprising a memory and a processor, wherein the memory stores a computer program executable by the processor, and the computer program executes the drip irrigation electric valve automatic numbering method when executed by the processor.
[0013] The application also provides a storage medium, wherein the storage medium stores a computer program, and the computer program executes the drip irrigation electric valve automatic numbering method when executed.
[0014] Compared with the prior art, the application has the following beneficial effects: The application integrates a satellite positioning module on the electric valve, obtains its high-precision geographic coordinates in real time, and uses low-power wireless communication technology to aggregate the coordinate data to the cloud, and finally uses an intelligent spatial analysis algorithm to automatically complete the matching of the valve position and the preset branch topology structure, or to infer the numbering rule without relying on prior drawings, thereby generating a globally unique and logically correct electric valve number. The application aims to change the traditional manual numbering mode and provide core technical support for the rapid and accurate deployment and intelligent management of the whole life cycle of large-scale drip irrigation projects. BRIEF DESCRIPTION OF DRAWINGS
[0015] In order to more clearly illustrate the technical solutions of the present application, the following briefly introduces the drawings needed in the embodiments. Obviously, the drawings in the following description only constitute some embodiments of the present application, and for those skilled in the art, other drawings can also be obtained without creative labor.
[0016] Figure 1 The drip irrigation electric valve automatic numbering method flowchart of the embodiment of the present application is shown in the figure. Figure 2 The drip irrigation collection area schematic diagram is shown in the figure. Figure 3 The relative coordinates of each electric valve are shown in the figure. Figure 4 Flow chart of the adaptive linear subspace clustering algorithm based on direction constraint. DETAILED DESCRIPTION
[0017] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative work fall within the protection scope of the present application.
[0018] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and easy to understand, the present application will be further described in detail below with reference to the drawings and specific embodiments.
[0019] Embodiment 1 As shown in the figure, the present application provides a drip irrigation electric valve automatic numbering method, comprising: Figure 1 Step S1, positioning data acquisition In order to realize automatic sensing of the position of the electric valve, the present application is equipped with an integrated Beidou / GPS dual-mode satellite positioning module (GNSS) for each electric valve. After the electric valve is installed in place, the module can automatically and continuously collect the geographic coordinates (longitude and latitude information) of the position where the electric valve is located. These coordinate data constitute the original input for subsequent automatic numbering processing. In order to realize reliable collection of distributed device data in a large area of farmland, the present application adopts a wireless communication architecture of "LoRa wide area Internet of Things + 4G backhaul". Specifically, each electric valve is built-in with a low-power LoRa wireless communication module, which is used to send its positioning information to the centralized gateway device deployed in the field area. The LoRa technology has the characteristics of long transmission distance and low power consumption, and is very suitable for irrigation scenarios with a large number of electric valves and a wide distribution range. The regional gateway is responsible for receiving the data reported by all electric valves within the coverage range, and through the 4G mobile network, using the lightweight MQTT protocol suitable for the Internet of Things, the collected positioning information is stably transmitted to the remote cloud server or central control center, thereby completing the full-link, automatic data acquisition and transmission from the field device to the data center.
[0020] The device deployment and data flow of the present application can refer to
[0021] Figure 2 The following diagram illustrates the drip irrigation project. In the diagram, A represents the water source, AB represents the main pipeline position, (I) and (II) are the serial numbers of the two branch main pipelines, and (1) to (6) are the serial numbers of the branch pipelines. The branch pipeline numbers (such as 1-1 to 2-12) indicate each irrigation unit. An electric valve with an integrated GNSS module is installed at the connection between each branch pipeline and the main pipeline (marked with a red (black) hexagon in the diagram). The coordinate data collected by these valves is uploaded to the gateway through the LoRa network, and then sent to the control center through the 4G network, providing a data foundation for the centralized management, intelligent numbering, and precise control of the valves.
[0022] Step S2: Coordinate Processing and Transformation In the coordinate processing and transformation stage, the system systematically processes the collected raw geographic coordinates (latitude and longitude) to convert spherical coordinates into planar coordinates that accurately reflect the actual relative positions of valves in the field, laying the spatial analysis foundation for subsequent intelligent numbering. This processing follows three core steps to ensure the practicality and accuracy of the coordinate data: The specific steps include: Step 21: Establish coordinate calculation benchmark First, the system needs to establish a stable relative coordinate system origin. To this end, within the target irrigation area, a well-defined and reliable electric valve is selected as the global reference valve. Typically, a valve located at the beginning of a branch pipe (close to the water source) is preferred, and its satellite positioning latitude and longitude data are recorded. B 0, L 0). The relative coordinates of the reference valve in subsequent calculations are set to (0,0), serving as the reference origin for calculations at all locations throughout the entire area. The selection of the reference valve must meet conditions such as "stable positioning signal, located at the pipeline end, and without significant obstruction" to ensure the accuracy and reliability of the reference.
[0023] Step 22: Projection transformation from spherical coordinates to planar coordinates Because the original latitude and longitude coordinates belong to a spherical geographic coordinate system, directly calculating the difference cannot accurately represent the actual planar distance between valves (due to the curvature of the Earth). Therefore, it is necessary to convert the latitude and longitude of all valves ( B i , L i Projecting onto a two-dimensional Cartesian coordinate system. This method supports multiple projection transformations to adapt to different engineering needs: (1) Standard projection method: Mature map projection algorithms such as Universal Transverse Mercator (UTM) or Gauss-Kruger projection can be used to convert the latitude and longitude of the reference valve and each valve into Cartesian coordinates. X i , Yi )and( X 0, Y 0).
[0024] The UTM projection is a transverse conformal cylindrical projection. Its core principle is to divide the Earth's ellipsoid into two contour circles (around 84°N and 80°S), using the ellipsoid's transverse axis as the projection axis. The cylindrical surface is made tangent to the ellipsoid at a central meridian. Through conformal projection transformation, the geographical coordinates within a certain longitude range on both sides of the central meridian are converted into Cartesian coordinates. Specific technical parameters are set as follows: Zone division, with each 6° of longitude forming a projection zone, resulting in 60 projection zones globally. These zones are numbered 1-60 sequentially eastward from the Prime Meridian (0° longitude). The central meridian of each zone has a longitude of 6° × 100°. N -3° N (For zone number). The origin of the coordinate system is the intersection of the central meridian of that zone and the equator. The east coordinate (…). The coordinates are calculated from 500,000 meters above the central meridian (i.e., above 500,000 meters east of the central meridian and below 500,000 meters west of the central meridian) to avoid negative coordinates; the northern coordinates of the Northern Hemisphere ( Starting from the equator (0), the parameters increase northwards. The ellipsoidal parameters are based on the WGS-84 ellipsoidal datum (semi-major axis). a =6378137m, flattening f =1 / 298.257223563), this benchmark is an internationally recognized geographic coordinate benchmark, which can be directly matched with latitude and longitude data collected by positioning devices such as the Global Positioning System (GPS). The scaling factor is 0.9996 on the central meridian. This scaling factor is used to offset the length distortion caused by the cylindrical projection, ensuring that the length distortion within the projection zone is controlled within ±0.04%.
[0025] The Gauss-Kruger projection is a transverse conformal cylindrical projection, similar in principle to the UTM projection. The core difference lies in the way the cylindrical surface contacts the Earth's ellipsoid (cutting the cylinder rather than cleaving it). It is suitable for small-scale, high-precision coordinate transformation scenarios. Technical parameters are set as follows: Zone division: Two modes are available: 6° zone and 3° zone. The 6° zone is consistent with the UTM projection. The 3° zone uses the central and boundary meridians of the 6° zone as its central meridian, with each 3° zone constituting one zone, totaling 120 zones globally. This is suitable for scenarios with higher precision requirements (such as when valve installation positioning errors need to be controlled within 0.5 meters). Coordinate origin: The coordinate origin for both the 6° and 3° zones is the intersection of the central meridian of each zone and the equator. East coordinates (… Starting from the central meridian at 500,000 meters, the zone number must be appended before the eastern coordinate to distinguish different projection zones; the northern coordinate ( ) In the northern hemisphere, the equator is 0, and in the southern hemisphere, the equator is 9000000 meters. The ellipsoid parameters can be flexibly selected according to the application scenario. If it is domestic engineering application, the ellipsoid of the 2000 national geodetic coordinate system (long semi-axis a =6378137m, flattening f =1 / 298.257222101) is preferred, and if it is international application, the WGS-84 ellipsoid is consistent with the UTM projection. Deformation control: no length deformation on the central meridian, the farther away from the central meridian, the greater the deformation, the maximum length deformation in the 6° sub-zone is not more than ±0.14%, and the maximum length deformation in the 3° sub-zone is not more than ±0.03%, which can meet the coordinate requirements of precision engineering.
[0026] The projection calculation core formula is as follows: N is the curvature radius of the prime vertical X is the meridian arc length UTM projection (scale factor k0=0.9996) Gauss-Kruger projection (scale factor k0=1) In the formula, a represents the ellipsoid long semi-axis (m); b represents the ellipsoid short semi-axis (m); e represents the first eccentricity, ; e' represents the second eccentricity, ; B: geodetic latitude (radian); L represents the geodetic longitude (radian); L0 represents the central meridian longitude (radian); ΔL: meridian difference (radian), ΔL=L-L0; N represents the curvature radius of the prime vertical (m); t represents an auxiliary parameter, t=tanB; η represents an auxiliary parameter, η 2 =e' 2 cos 2 B; X is the meridian arc length from the equator to the latitude B (m); W represents the zone number; X UTM represents the UTM projection horizontal coordinate (m); Y UTM represents the UTM projection vertical coordinate (m); X GK represents the Gauss-Kruger projection horizontal coordinate (m); Y GK represents the Gauss-Kruger projection vertical coordinate (m).
[0027] (2) Simplified approximation method: For farmland areas with a small scale (e.g., the range of a single projection is less than 5 kilometers), in order to reduce the computational complexity, the latitude and longitude difference can be directly used and multiplied by the average arc length per degree at that latitude (about 111 kilometers) for linear approximation, so as to obtain the plane offset.
[0028] This simplified approximation method is applicable to small-scale farmland areas, specifically defined as farmland scenarios where the diagonal length of the circumscribed rectangle of a single projection range is less than 5 kilometers. At this scale, the influence of the Earth's curvature on the calculation of planar distances is within the engineering allowable threshold (error ≤ 0.5%), meeting the application prerequisites of linear approximation. The computational complexity of coordinate transformation can be reduced by simplifying the model, while ensuring that the data accuracy meets the application requirements of farmland irrigation systems.
[0029] The core calculation logic of this method is as follows: First, obtain the original latitude and longitude coordinates of each valve node within the target farmland area ( B i , L i ),in B This is the latitude value. Next, a latitude correction factor is introduced, using the average arc length per degree at that latitude (approximately 111 km / degree) as the baseline value. The latitude direction is directly expressed as... B i Multiply by 111 km / degree to obtain the latitudinal plane offset, the formula is as follows: The longitude direction needs to be corrected by combining the cosine value of the latitude, and the formula is: Finally, we obtain the planar coordinates ( X i , Y i This enables the conversion from latitude and longitude coordinates to plane coordinates.
[0030] This step is implemented using mature GIS algorithms, with the core objective of ensuring that the converted planar coordinates accurately reflect the actual distance relationships between valves.
[0031] Step 23: Coordinate system rotation and alignment and relative coordinate generation The Cartesian coordinates obtained through projection may have an angle between their coordinate system axes (usually the X-axis pointing east and the Y-axis pointing north) and the actual extension direction of the field branch pipes. To more intuitively show the longitudinal arrangement order of valves along the branch pipes and their lateral affiliation (which branch pipe they belong to), coordinate system rotation correction is required.
[0032] The specific process is as follows: Calculate the original offset: For the first... For each valve, calculate its original offset component relative to the reference valve on the projection plane: The formula is 、 , where is the eastward offset component, is the northward offset component, used to represent the original position difference between two points.
[0033] Secondly, two-dimensional rotation correction is performed: according to the horizontal direction of the main pipe in the drip irrigation engineering design drawing, or by analyzing the main direction of the valve point set distribution, a rotation angle , i.e. the angle between the direction of the main pipe and the projected east direction, is determined. Through the following rotation transformation formula, the original offset is mapped to the local relative coordinate system aligned with the direction of the main pipe, and the relative coordinates of each valve are finally obtained : At this point, the positions of all electric valves are converted into a set of relative coordinates with the reference valve as the origin and the X-axis direction consistent with the extension direction of the main pipe . This coordinate system effectively eliminates the interference of absolute geographical position, clearly reveals the front-back order and horizontal grouping relationship of the valves in the irrigation network topology (as shown in the schematic), and is the direct basis for subsequent automatic numbering analysis. Figure 3
[0034] The output example of the processing process is shown, Figure 3 and the relative coordinate values of each electric valve calculated are marked. It should be noted that the irrigation areas of each branch pipe in the actual farmland may be irregular, with uneven areas, and the branch pipe arrangement logic is similar Figure 3 , Figure 3 a simplified layout of 12 electric valves (controlling 24 branch pipes) is used to illustrate the core principle. Figure 3
[0035] Step S3, calculating the electric valve number After completing the relative coordinate calculation of the electric valve, the system enters the intelligent numbering generation stage. The core task of this stage is to automatically and accurately assign a unique number to the valve according to its spatial position relationship, which conforms to the topology logic of the irrigation system. The system adaptively selects and executes one of the following two core numbering strategies based on the engineering site conditions and data completeness, to ensure the effectiveness and robustness of the method in different scenarios.
[0036] (1) Automatic numbering method based on proximity matching strategy This strategy is suitable for scenarios with high-precision drip irrigation engineering design drawings and complete and small-error electric valve coordinate collection. Its core idea is to match the actual installation position of each electric valve with the preset theoretical position of the branch pipe in the design drawing. The specific implementation steps are as follows: First, construct a reference set of theoretical positions. The system automatically extracts or calculates the plane coordinates of the connection points between each branch pipe and the main pipe (i.e., the theoretical installation center point of the electric valve) based on the electronic design drawing (such as CAD drawing), forming a set of theoretical coordinates , where M is the total number of electric valves; Second, perform spatial distance calculation and optimal matching. For each electric valve, the actual relative coordinates obtained through the previous steps are The algorithm calculates the Euclidean distance between each point in the theoretical reference set and the electric valve . By traversing and comparing, the system assigns the electric valve to the nearest theoretical branch pipe point, i.e., determines the affiliation relationship: affiliation , where .
[0037] Finally, perform number mapping and verification. The system automatically assigns the matched theoretical branch pipe number to the electric valve based on the established numbering rules in the design drawing (e.g., "main pipe serial number-branch pipe serial number"). After completion, the system verifies the uniqueness and continuity of all numbers to prevent conflicts or omissions. This strategy can achieve nearly 100% accuracy when the drawing and the field are highly consistent.
[0038] (2) Automatic numbering method based on adaptive linear subspace clustering strategy with direction constraints This strategy is designed for scenarios that lack design drawings or have missing or large-error positioning data (e.g., due to obstructions). It does not require any prior branch pipe information and only relies on the spatial distribution rules of the electric valve group itself for topological reasoning and numbering. For pipe network scenarios where the main pipe is straight and needs to satisfy direction constraints, the numbering of electric valves is achieved through "straight line initialization with angle constraints-iterative clustering correction-projection numbering". The adaptive linear subspace clustering algorithm flowchart based on direction constraints is shown in Figure 4 , and the specific implementation steps are as follows: 1) Reference main pipe direction and constraint parameter definition Reference main pipe direction: Obtain the reference main pipe direction through field observation of the main pipe's macro extension trend or principal component analysis (PCA), with a direction angle of θ base .
[0039] Angle constraint threshold: Set the allowed direction deviation Δ of the main pipe straight line θ(Adjustable according to the installation precision and macro trend of the branch pipe), that is, the direction angle of the branch pipe straight line needs to meet θ ∈[ θ base -Δ θ , θ base +Δ θ ]。
[0040] 2) K straight line initialization with angle constraint (K=branch pipe number) Seed point selection: randomly select K points from the electric valve point set ( S 1 , S 2 ,..., S K ) as the seed point set S j .
[0041] Straight line fitting and angle verification: straight line fitting and angle verification are performed on each seed point S j , and a point not belonging to P S is randomly selected from Q S j to fit the initial straight line L j 0 , whose direction vector is U j 0 =( x Qj - x Sj , y Qj - y Sj ),the direction is θ j 0 =arctan( U j 0 y / U j 0 x ). If θ j 0 ∈[ θ base -Δ θ , θ base +Δ θ ], keepL j 0 If the constraint is exceeded, replace the point in P and re-fit until the angle requirement is met. The final set of initial trunk straight lines that meet the angle constraint is obtained L 0 { L 1 0 , L 2 0 ,..., L k 0}.
[0042] 3) Straight line clustering iteration with angle correction Cluster assignment (first t round, initial t =0): Calculate the perpendicular distance from each electric valve P i to the first j straight line L j t : , L j t The general formula is , P i assign P j t to the cluster corresponding to the straight line with the smallest distance.
[0043] Straight line update and angle correction: for cluster P j t , first fit a temporary straight line L j t+1,temp using unconstrained least squares, and calculate its direction angle θ j t+1,temp . If θ j t+1,temp ∈[ θ base -Δ θ , θ base +Δ θ ], directly take L j t+1,temp as the updated straight line L j t+1 . If the constraint is exceeded, fix the straight line direction as θj ’ =clamp( θ j t+1,temp , θ base -Δ θ , θ base +Δ θ (i.e., restricted within the constraint range); under this fixed direction, re-align... P j t The straight line is fitted using the least squares method (optimizing only the line position) to obtain the corrected straight line. L j t+1 .
[0044] Convergence determination: Repeat "cluster allocation - line update - angle correction" until either condition is met: the position parameters of all lines in adjacent rounds no longer change; or the preset maximum number of iterations threshold is reached (e.g., T=20).
[0045] 4) Branch pipe assignment and electric valve number Branch pipe assignment: After convergence, the straight line corresponding to the cluster to which each electric valve belongs is its assigned branch pipe.
[0046] Projection sorting number: For electric valves under the same branch pipe, calculate their projected coordinates on the straight line of the branch pipe (with one end of the branch pipe as the origin), arrange them in ascending order of projected coordinates, and assign a composite number of "branch pipe number - sequence number" (such as "1-3" representing the 3rd electric valve of branch pipe 1).
[0047] In summary, the two strategies constitute a complementary numbering solution system. The strategy can be automatically switched based on data conditions, thereby greatly expanding the applicability of this method while ensuring numbering accuracy, achieving full-scenario coverage from "having a map to rely on" to "self-induction without a map".
[0048] This invention provides an automatic numbering method for drip irrigation electric valves, enabling precise association between electric valves and their corresponding branch pipes without relying on CAD drawings or manual marking. This method significantly improves numbering efficiency and accuracy, avoiding errors, omissions, and duplicate numbers caused by manual operation, and greatly shortens the construction cycle. Simultaneously, it supports automatic deployment and subsequent maintenance in scenarios without drawings, effectively bridging the data gap between on-site physical equipment and the digital management system, providing reliable technical support for the rapid deployment, precise control, and full lifecycle management of large-scale drip irrigation projects.
[0049] The automatic numbering method of the electric valve provided by the application is characterized in that the valve space position information is acquired, and an intelligent algorithm is combined to realize automatic association with the branch structure, so that accurate and efficient numbering is completed. Without departing from the technical idea, there are various alternative or alternative implementation manners: for example, the positioning module is not limited to the Beidou / GPS dual-mode satellite positioning, and technologies such as RTK-GNSS, UWB ultra-wideband, Bluetooth AoA, Wi-Fi RTT or visual / inertial fusion positioning can also be used; in addition to LoRa, NB-IoT, Zigbee, 4G / 5G or wired transmission can also be used to realize data backhaul; in the coordinate processing link, UTM projection can also be used, or Gauss-Kruger projection (especially suitable for countries using the projection system such as China), or when the engineering scale is small (such as a single field less than 5km), the influence of the earth curvature is directly ignored, and the plane relative coordinates (Δ x ,Δ y ) are approximately calculated by multiplying the difference between the longitude and the latitude by the arc length coefficient (such as 111km / degree) at the average latitude, the simplified method sacrifices a small amount of accuracy, but significantly reduces the calculation complexity, and can still effectively support subsequent clustering and numbering; in the numbering matching strategy, different distance metrics can be used for adjacent matching, linear subspace clustering can be replaced by Hough transform, PCA main direction fitting or DBSCAN density clustering algorithm; the numbering logic can also be flexibly adjusted to support various encoding rules and verification mechanisms. Any implementation form based on the technical path of "position sensing-topology construction-automatic numbering" for solving the problems of low efficiency, easy error and difficult maintenance of manual numbering should be regarded as an equivalent replacement of the application and included in the patent protection range.
[0050] Embodiment 2 The application also provides a drip irrigation electric valve automatic numbering device, comprising: a first processing module for acquiring geographic coordinates of the electric valve; a second processing module for converting the geographic coordinates of the electric valve into plane coordinates of the actual relative position relationship of the electric valve in the field; a third processing module for assigning a unique number to the electric valve according to the relative coordinates and the spatial position relationship of the electric valve, which conforms to the topology logic of the irrigation system.
[0051] As an embodiment of the application, a GNSS positioning module is integrated on each electric valve, and the position information is periodically uploaded to the gateway through LoRa wireless communication, and then transmitted to the control center through the MQTT protocol, so as to realize automatic collection of the position information of the electric valve.
[0052] As an embodiment of the present application, the third processing module adopts a dual-mode numbering algorithm based on a proximity matching strategy and a direction-constrained adaptive linear subspace clustering strategy to assign a unique number to the electric valve in accordance with the irrigation system topology logic; wherein when the electric valve coordinates are complete, the valve is spatially associated with the preset or inferred branch pipe center point using proximity matching; when the complete coordinates are lacking or in a signal blocking area, direction-constrained adaptive linear subspace clustering is performed based on the characteristics of the trunk pipe direction, direction and distance, and the branch pipe grouping is automatically identified and the number is generated.
[0053] Embodiment 3 The present application also provides a drip irrigation electric valve automatic numbering system, comprising: a memory and a processor, the memory has a computer program run by the processor, the computer program executes the drip irrigation electric valve automatic numbering method when the processor is running.
[0054] Embodiment 4 The present application also provides a storage medium, the storage medium has a computer program, the computer program executes the drip irrigation electric valve automatic numbering method when running.
[0055] The above-described embodiments are only descriptions of the preferred modes of the present application, and do not limit the scope of the present application. Without departing from the design spirit of the present application, various modifications and improvements to the technical solutions of the present application made by those skilled in the art shall fall within the protection scope determined by the claims of the present application.
Claims
1. A method for automatically numbering drip irrigation electric valves, characterized in that, include: Step S1: Obtain the geographic coordinates of the electric valve; Step S2: Convert the geographic coordinates of the electric valve into planar coordinates representing the actual relative position of the electric valve in the field; Step S3: Assign a unique number to the electric valve that conforms to the topological logic of the irrigation system, based on the relative coordinates and spatial position of the electric valve.
2. The automatic numbering method for drip irrigation electric valves as described in claim 1, characterized in that, In step S1, each electric valve integrates a GNSS positioning module and periodically uploads its location information to the gateway via LoRa wireless communication, and then transmits it to the control center via the MQTT protocol to realize the automatic collection of electric valve location information.
3. The automatic numbering method for drip irrigation electric valves as described in claim 2, characterized in that, In step S3, a dual-mode numbering algorithm based on a proximity matching strategy and an adaptive linear subspace clustering strategy based on directional constraints is used to assign a unique number to the electric valve that conforms to the topological logic of the irrigation system. Specifically, when the coordinates of the electric valve are complete, proximity matching is used to spatially associate the valve with the preset or inferred center point of the branch pipe. When the coordinates are incomplete or the valve is in a signal-obstructed area, adaptive linear subspace clustering based on directional constraints is performed based on the main pipe's direction, orientation, and distance characteristics to automatically identify the branch pipe groups and generate numbers.
4. An automatic numbering device for drip irrigation electric valves, characterized in that, include: The first processing module is used to obtain the geographical coordinates of the electric valve; The second processing module is used to convert the geographic coordinates of the electric valve into planar coordinates of the electric valve's actual relative position in the field. The third processing module is used to assign a unique number to the electric valve that conforms to the topological logic of the irrigation system, based on the relative coordinates and spatial position of the electric valve.
5. The automatic numbering device for drip irrigation electric valves as described in claim 4, characterized in that, Each electric valve integrates a GNSS positioning module and periodically uploads its location information to the gateway via LoRa wireless communication. The information is then transmitted to the control center via the MQTT protocol, enabling automatic acquisition of the electric valve's location information.
6. The automatic numbering device for drip irrigation electric valves as described in claim 5, characterized in that, The third processing module employs a dual-mode numbering algorithm based on a proximity matching strategy and an adaptive linear subspace clustering strategy based on directional constraints to assign unique numbers to electric valves that conform to the topological logic of the irrigation system. Specifically, when the coordinates of the electric valve are complete, proximity matching is used to spatially associate the valve with a preset or inferred branch pipe center point. When complete coordinates are lacking or the valve is in a signal-obstructed area, adaptive linear subspace clustering based on directional constraints is performed based on the main pipe's direction, distance, and other characteristics to automatically identify branch pipe groups and generate numbers.
7. An automatic numbering system for drip irrigation electric valves, characterized in that, include: A memory and a processor, wherein the memory stores a computer program executed by the processor, the computer program, when executed by the processor, performs the automatic numbering method for drip irrigation electric valves as described in any one of claims 1-3.
8. A storage medium, characterized in that, The storage medium stores a computer program that, when running, executes the automatic numbering method for drip irrigation electric valves as described in any one of claims 1-3.