Method and device for determining salinity concentration, storage medium and processor
By designing a salt concentration detection device including multi-stage switches, AD acquisition modules and multiple signal circuits, the problem of difficulty in accurately detecting high salt concentration soil in the prior art is solved, and higher measurement accuracy and wider detection range are achieved.
Patent Information
- Application Number
- CN202510327578.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-19
- Publication Date
- 2025-06-06
Smart Images

Figure CN120102838A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data measurement, and in particular to a method, device, storage medium and processor for determining salt concentration. Background Art
[0002] During the growth of crops, the soil environment has a great impact on their growth. For example, if the salt content of the soil exceeds the standard, it will be detrimental to the growth of most plants and may even hinder the normal development of crops, resulting in reduced yields and poor quality.
[0003] At present, the soil in many provinces and regions of my country has more or less excessive salt content. In order to ensure the normal growth of crops, it is urgent to detect the salt concentration of the soil where the crops are located. In the existing technology, the conductivity measurement conversion method is often used to detect the soil salt concentration, but the algorithm has a narrow measurable range for salt concentration, making it difficult to detect soils with high salt concentrations such as seawater irrigation soils, and the salt concentration error obtained by the test is large, resulting in high precision loss. Summary of the invention
[0004] The purpose of the embodiments of the present application is to provide a method, device, storage medium and processor for determining salt concentration.
[0005] In order to achieve the above-mentioned object, the first aspect of the present application provides a method for determining salt concentration, which is applied to a salt concentration detection device, wherein the salt concentration detection device includes a multi-stage switch, an AD acquisition module, and a plurality of signal circuits, wherein the multi-stage switch is respectively connected to the AD acquisition module and the plurality of signal circuits, and each signal circuit has a different signal reduction ratio, including: After the soil to be tested is placed in the test area of the salt concentration detection device, the current signal circuit is switched to the initial signal circuit through a multi-stage switch; Acquire a first current code value acquired by the AD acquisition module under the initial signal circuit, and a first code value interval corresponding to the initial signal circuit; Determine a target signal circuit corresponding to the soil to be tested according to the first current code value and the first code value interval; The salt concentration of the soil to be tested is determined according to the target code value collected by the AD acquisition module under the target signal circuit.
[0006] In an embodiment of the present application, determining a target signal circuit corresponding to the soil to be tested according to a first current code value and a first code value interval includes: when the first current code value is not in the first code value interval, determining a circuit switching order according to a signal reduction ratio of each signal circuit except an initial signal circuit; taking the signal circuit ranked first in the circuit switching order as a to-be-selected signal circuit, and switching the current signal circuit to the to-be-selected signal circuit through a multi-stage switch to obtain a second current code value collected by an AD acquisition module under the to-be-selected signal circuit, and a second code value interval corresponding to the to-be-selected signal circuit; when the second current code value is in the second code value interval, determining the to-be-selected signal circuit as the target signal circuit.
[0007] In an embodiment of the present application, the method also includes: when the second current code value is not in the second code value interval, the signal circuit ranked second in the circuit switching order is used as the signal circuit to be selected, and returning to the step of switching the current signal circuit to the signal circuit to be selected through a multi-stage switch until the second current code value is in the second code value interval.
[0008] In the embodiment of the present application, the method further includes: when the first current code value is in the first code value interval, determining the initial signal circuit as the target signal circuit.
[0009] In an embodiment of the present application, determining the salt concentration of the soil to be tested based on the target code value collected by the AD acquisition module under the target signal circuit includes: traversing each preset code value in the preset comparison table corresponding to the target signal circuit to obtain a preset code value matching the target code value; and determining the preset salt concentration corresponding to the preset code value matching the target code value as the salt concentration of the soil to be tested.
[0010] In an embodiment of the present application, the method also includes: when there is no preset code value matching the target code value in the preset comparison table, obtaining a minimum preset code value greater than the target code value and a maximum preset code value less than the target code value; determining the average salt concentration between the preset salt concentration corresponding to the minimum preset code value and the preset salt concentration corresponding to the maximum preset code value; and determining the average salt concentration as the salt concentration of the soil to be tested.
[0011] In an embodiment of the present application, the method also includes: placing soil samples with different preset salt concentrations into a test area of a salt concentration detection device; obtaining a preset code value corresponding to each soil sample with each preset salt concentration collected by an AD acquisition module; and determining a preset comparison table corresponding to each signal circuit according to each preset salt concentration and the preset code value corresponding to each preset salt concentration.
[0012] A second aspect of the present application provides a processor configured to execute the above-mentioned method for determining salt concentration.
[0013] The third aspect of the present application provides a salt concentration detection device, comprising: AD acquisition module; Multiple signal circuits, each with a different signal reduction ratio; A multi-level switch, connected to the AD acquisition module and multiple signal circuits respectively; and The processors described above.
[0014] A fourth aspect of the present application provides a machine-readable storage medium having instructions stored thereon, which, when executed by a processor, configure the processor to execute the above-mentioned method for determining salt concentration.
[0015] Through the above technical solution, multiple signal circuits are set to increase the detectable range of soil salt concentration, and a more suitable signal circuit can be selected when detecting the salt concentration of the soil to be tested according to the code value collected by the AD acquisition module, which greatly reduces the acquisition error of the salt concentration of the soil to be tested caused by the hardware circuit. Moreover, the precision loss when detecting the salt concentration of the soil to be tested can be reduced within a wide range of salt concentrations, thereby improving the accuracy of the salt concentration of the soil to be tested.
[0016] Other features and advantages of the embodiments of the present application will be described in detail in the subsequent specific implementation section. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The accompanying drawings are used to provide a further understanding of the embodiments of the present application and constitute a part of the specification. Together with the following specific implementations, they are used to explain the embodiments of the present application, but do not constitute a limitation on the embodiments of the present application. In the accompanying drawings: Figure 1 A schematic diagram of a process for determining salt concentration according to an embodiment of the present application is shown; Figure 2 A schematic diagram of an application environment of a salt concentration detection device according to an embodiment of the present application is schematically shown; Figure 3 The internal structure of a computer device according to an embodiment of the present application is schematically shown. DETAILED DESCRIPTION
[0018] In order to make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be understood that the specific implementation methods described herein are only used to illustrate and explain the embodiments of the present application, and are not used to limit the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0019] Figure 1 The flowchart of the method for determining the salt concentration according to the embodiment of the present application is schematically shown. Figure 1 As shown, in one embodiment of the present application, a method for determining salt concentration is provided, which is applied to a salt concentration detection device, wherein the salt concentration detection device includes a multi-stage switch, an AD acquisition module, and a plurality of signal circuits, wherein the multi-stage switch is respectively connected to the AD acquisition module and the plurality of signal circuits, and the signal reduction ratio of each signal circuit is different, and the method includes the following steps: Step 101, after placing the soil to be tested into the test area of the salt concentration detection device, the current signal circuit is switched to the initial signal circuit through a multi-stage switch.
[0020] Step 102: Acquire a first current code value acquired by an AD acquisition module under an initial signal circuit, and a first code value interval corresponding to the initial signal circuit.
[0021] Step 103: determine a target signal circuit corresponding to the soil to be tested according to the first current code value and the first code value interval.
[0022] Step 104, determining the salt concentration of the soil to be tested according to the target code value collected by the AD collection module under the target signal circuit.
[0023] The salt concentration detection device includes a multi-stage switch, an AD acquisition module and a plurality of signal circuits. Among them, the AD acquisition module adopts an AD chip, and the AD chip can select different bit widths according to requirements. For example, the AD chip can be 12bit, 16bit and 24bit, etc. The multi-stage switch is connected to the AD acquisition module and the plurality of signal circuits respectively. The signal reduction ratio of each signal circuit is different. For example, the signal reduction ratio of the signal circuit can be 1:1, 2:1 and 20:1, etc. Under the signal circuits with different signal reduction ratios, the corresponding code value intervals are different, and the soil concentration in the detectable concentration range is different. For example, under the signal circuit with a signal reduction ratio of 1:1, soil with a salt concentration of 0~3‰ can be detected.
[0024] After placing the soil to be tested in the test area of the salt concentration detection device, the processor can switch the current signal circuit to the initial signal circuit through a multi-stage switch. The initial signal circuit may refer to the default signal circuit of the salt concentration detection device. The signal reduction ratio of the initial signal circuit may be 1:1. After the signal circuit is the initial signal circuit, the AD acquisition module may acquire the first current code value under the initial signal circuit. The processor may obtain the first current code value and the first code value interval corresponding to the initial signal circuit.
[0025] The processor can determine the target signal circuit corresponding to the soil to be tested based on the first current code value and the first code value interval. Under the target signal circuit, the code value collected by the AD acquisition module is in the corresponding code value interval, that is, it does not exceed the acquisition range of the AD acquisition module. At this time, the soil to be tested can be measured more accurately. The processor can switch the current signal circuit to the target signal circuit through a multi-stage switch, and can collect the target code value under the target signal circuit again through the AD acquisition module. Afterwards, the processor can obtain the target code value and determine the salt concentration of the soil to be tested based on the target code value.
[0026] Through the above technical solution, multiple signal circuits are set to increase the detectable range of soil salt concentration, and a more suitable signal circuit can be selected when detecting the salt concentration of the soil to be tested according to the code value collected by the AD acquisition module, which greatly reduces the acquisition error of the salt concentration of the soil to be tested caused by the hardware circuit. Moreover, the precision loss when detecting the salt concentration of the soil to be tested can be reduced within a wide range of salt concentrations, thereby improving the accuracy of the salt concentration of the soil to be tested.
[0027] In one embodiment, determining a target signal circuit corresponding to the soil to be tested based on a first current code value and a first code value interval includes: when the first current code value is not in the first code value interval, determining a circuit switching order based on a signal reduction ratio of each signal circuit except an initial signal circuit; taking the signal circuit ranked first in the circuit switching order as a to-be-selected signal circuit, and switching the current signal circuit to the to-be-selected signal circuit through a multi-stage switch; obtaining a second current code value collected by an AD acquisition module under the to-be-selected signal circuit, and a second code value interval corresponding to the to-be-selected signal circuit; and determining the to-be-selected signal circuit as a target signal circuit when the second current code value is in the second code value interval.
[0028] In the case of obtaining the first current code value and the first code value interval, the processor can determine whether the first current code value is in the first code value interval. Specifically, it can be determined whether the first current code value exceeds the upper limit value of the first code value interval. If the first current code value is greater than the upper limit value of the first code value interval, it can be determined that the first current code value is not in the first code value interval. In the case where the first current code value is not in the first code value interval, the processor can determine the circuit switching order according to the signal reduction ratio of each signal circuit except the initial signal circuit. Specifically, each signal circuit except the initial signal circuit can be arranged in order from small to large in signal reduction ratio to obtain the current switching order of each signal circuit except the initial signal circuit. For example, if the signal circuits except the initial signal circuit include a signal circuit O with a signal reduction ratio of 2:1, a signal circuit P with a signal reduction ratio of 5:1, and a signal circuit Q with a signal reduction ratio of 20:1, the circuit switching order can be determined as signal circuit O, signal circuit P, and signal circuit Q. That is, according to the actual situation, the initial signal circuit can be switched to signal circuit O first, then switched to signal circuit P, and finally switched to signal circuit Q.
[0029] After determining the circuit switching sequence, the processor can use the signal circuit ranked first in the circuit switching sequence as the signal circuit to be selected, and switch the current signal circuit to the signal circuit to be selected through a multi-stage switch. Afterwards, the second current code value under the signal circuit to be selected can be collected by the AD acquisition module. The processor can obtain the second current code value and the second code value interval corresponding to the signal circuit to be selected. Then, the processor can determine whether the second current code value is in the second code value interval. Specifically, it can be determined whether the second current code value is greater than the upper limit value of the second code value interval. If the second current code value is less than or equal to the upper limit value of the second code value interval, it can be determined that the second current code value is in the second code value interval. In the case where the second current code value is in the second code value interval, the processor can determine the signal circuit to be selected as the target signal circuit. That is, at this time, the salt concentration of the soil to be tested can be determined under the first signal circuit ranked in the circuit switching sequence.
[0030] In one embodiment, the method further includes: when the second current code value is not in the second code value interval, using the signal circuit ranked second in the circuit switching order as the signal circuit to be selected, and returning to the step of switching the current signal circuit to the signal circuit to be selected through a multi-stage switch until the second current code value is in the second code value interval.
[0031] When the processor obtains the second current code value and the second code value interval corresponding to the signal circuit to be selected, it can determine whether the second current code value is in the second code value interval. If the second current code value is greater than the upper limit value of the second code value interval, it can be determined that the second current code value is not in the second code value interval. In the case that the second current code value is not in the second code value interval, the processor can use the signal circuit ranked second in the circuit switching sequence as the signal circuit to be selected, and return to the step of switching the current signal circuit to the signal circuit to be selected through the multi-stage switch until the second current code value is in the second code value interval.
[0032] For example, the circuit switching sequence is signal circuit O, signal circuit P, and signal circuit Q. If the code value under signal circuit O is not in the corresponding code value interval, the signal circuit can be switched to signal circuit P, and it is determined again whether the code value under signal circuit P is in the corresponding code value interval. If the code value under the signal circuit P is in the corresponding code value interval, the signal circuit P can be determined as the target signal circuit. If the code value under the signal circuit P is not in the corresponding code value interval, the signal circuit can be switched to signal circuit Q, and it is determined again whether the code value under signal circuit Q is in the corresponding code value interval until there is a signal circuit with a code value in the corresponding code value interval, and the signal circuit is determined as the target signal circuit.
[0033] In one embodiment, the method further includes: when the first current code value is in the first code value interval, determining the initial signal circuit as the target signal circuit.
[0034] In the case of obtaining the first current code value and the first code value interval, the processor can determine whether the first current code value is in the first code value interval. Specifically, it can be determined whether the first current code value exceeds the upper limit value of the first code value interval. If the first current code value is less than or equal to the upper limit value of the first code value interval, it can be determined that the first current code value is in the first code value interval. In the case where the first current code value is in the first code value interval, the processor can determine the initial signal circuit as the target signal circuit. That is, at this time, the salt concentration of the soil to be tested can be determined under the initial signal circuit.
[0035] In one embodiment, determining the salt concentration of the soil to be tested based on the target code value collected by the AD acquisition module under the target signal circuit includes: traversing each preset code value in the preset comparison table corresponding to the target signal circuit to obtain a preset code value matching the target code value; and determining the preset salt concentration corresponding to the preset code value matching the target code value as the salt concentration of the soil to be tested.
[0036] The processor can traverse each preset code value in the preset comparison table corresponding to the target signal circuit to obtain a preset code value that matches the target code value. Each preset code value in the preset comparison table has a corresponding preset salt concentration. If there is a preset code value that is the same as the target code value in the corresponding preset comparison table, it can be said that there is a preset code value that matches the target code value in the preset comparison table. At this time, the processor can obtain the preset salt concentration corresponding to the preset code value that matches the target code value, and determine the preset salt concentration as the salt concentration of the soil to be tested.
[0037] In one embodiment, the method further includes: when there is no preset code value matching the target code value in the preset comparison table, obtaining a minimum preset code value greater than the target code value and a maximum preset code value less than the target code value; determining an average salt concentration between a preset salt concentration corresponding to the minimum preset code value and a preset salt concentration corresponding to the maximum preset code value; and determining the average salt concentration as the salt concentration of the soil to be tested.
[0038] The processor can traverse each preset code value in the preset comparison table corresponding to the target signal circuit. If there is no preset code value identical to the target code value in the corresponding preset comparison table, it can be said that there is no preset code value matching the target code value in the preset comparison table. In this case, the processor can obtain a minimum preset code value greater than the target code value and a maximum preset code value less than the target code value. The processor can determine the average salt concentration between the preset salt concentration corresponding to the minimum preset code value and the preset salt concentration corresponding to the maximum preset code value. Afterwards, the processor can determine the average salt concentration as the salt concentration of the soil to be tested.
[0039] In one embodiment, the method also includes: placing soil samples with different preset salt concentrations into a test area of a salt concentration detection device; obtaining a preset code value corresponding to each soil sample with each preset salt concentration collected by an AD acquisition module; and determining a preset comparison table corresponding to each signal circuit according to each preset salt concentration and the preset code value corresponding to each preset salt concentration.
[0040] Before using the salt concentration detection device to detect the salt concentration of the soil to be tested, the processor can determine the preset comparison table corresponding to each signal circuit. Specifically, soil samples with different preset salt concentrations can be placed in the test area of the salt concentration detection device. Afterwards, the preset code value corresponding to each soil sample with each preset salt concentration can be collected by the AD acquisition module. The processor can obtain the preset code value corresponding to the soil sample with each preset salt concentration, and can determine the preset comparison table corresponding to each signal circuit according to each preset salt concentration and the preset code value corresponding to each preset salt concentration.
[0041] For example, solution reagents with different salt concentration ratios can be equipped. For example, if the measurable range of salt concentration is 0‰~35‰, 36 standard salt concentration ratio reagents can be configured at every 1‰ salt concentration interval, and then the salt concentration detection device can be placed in these standard reagents. The code value collected by the AD is read through the control unit to establish a data table corresponding to the relationship between the code value and the concentration. For example, under a signal circuit with a signal reduction ratio of 1:1, the corresponding salt concentration range is 0~3‰. Then, the preset code value corresponding to each soil sample with a salt concentration of 0~3‰ can be determined as the preset comparison table corresponding to the signal circuit. In order to improve the measurement accuracy, the reagent combination can also be changed every 0.1‰ or 0.5‰.
[0042] For example, Figure 2 As shown, a schematic diagram of the application environment of a salt concentration detection device is provided. The soil to be tested is placed in the test area of the salt concentration detection device. The salt concentration detection device may include multiple signal processing circuits (1:1 signal processing circuit, 2:1 signal processing circuit, ..., 20:1 signal processing circuit), a multi-stage switch, an AD module and a control unit. The control unit can switch the signal processing circuit through the multi-stage switch. The AD module can collect the code value under the signal processing circuit and send the code value to the control unit, so that the control unit determines the salt concentration of the soil to be tested according to the received code value.
[0043] Through the above technical solution, multiple signal circuits are set to increase the detectable range of soil salt concentration, and a more suitable signal circuit can be selected when detecting the salt concentration of the soil to be tested according to the code value collected by the AD acquisition module, which greatly reduces the acquisition error of the salt concentration of the soil to be tested caused by the hardware circuit. Moreover, the precision loss when detecting the salt concentration of the soil to be tested can be reduced within a wide range of salt concentrations, thereby improving the accuracy of the salt concentration of the soil to be tested.
[0044] Figure 1 FIG. 1 is a flow chart of a method for determining salt concentration in one embodiment. Figure 1 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 1 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.
[0045] In one embodiment, a storage medium is provided, on which a program is stored, and when the program is executed by a processor, the method for determining salt concentration is implemented.
[0046] In one embodiment, a processor is provided, and the processor is used to run a program, wherein the program executes the above method for determining salt concentration when it is run.
[0047] In one embodiment, a salt concentration detection device is provided, comprising: AD acquisition module; Multiple signal circuits, each with a different signal reduction ratio; A multi-level switch, connected to the AD acquisition module and multiple signal circuits respectively; and The processors described above.
[0048] The salt concentration detection device includes a multi-stage switch, an AD acquisition module and a plurality of signal circuits. Among them, the AD acquisition module adopts an AD chip, and the AD chip can select different bit widths according to requirements. For example, the AD chip can be 12bit, 16bit and 24bit, etc. The multi-stage switch is connected to the AD acquisition module and the plurality of signal circuits respectively. The signal reduction ratio of each signal circuit is different. For example, the signal reduction ratio of the signal circuit can be 1:1, 2:1 and 20:1, etc. Under the signal circuits with different signal reduction ratios, the corresponding code value intervals are different, and the soil concentration in the detectable concentration range is different. For example, under the signal circuit with a signal reduction ratio of 1:1, soil with a salt concentration of 0~3‰ can be detected.
[0049] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 3 As shown. The computer device includes a processor A01, a network interface A02, a memory (not shown in the figure) and a database (not shown in the figure) connected through a system bus. Among them, the processor A01 of the computer device is used to provide computing and control capabilities. The memory of the computer device includes an internal memory A03 and a non-volatile storage medium A04. The non-volatile storage medium A04 stores an operating system B01, a computer program B02 and a database (not shown in the figure). The internal memory A03 provides an environment for the operation of the operating system B01 and the computer program B02 in the non-volatile storage medium A04. The database of the computer device is used to store data such as the salt concentration of the soil to be tested. The network interface A02 of the computer device is used to communicate with an external terminal through a network connection. When the computer program B02 is executed by the processor A01, a method for determining salt concentration is implemented.
[0050] Those skilled in the art will understand that Figure 3The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0051] An embodiment of the present application provides a device, which includes a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, the following steps are implemented: after placing the soil to be tested in the test area of the salt concentration detection device, switching the current signal circuit to the initial signal circuit through a multi-stage switch; acquiring a first current code value collected by an AD acquisition module under the initial signal circuit, and a first code value interval corresponding to the initial signal circuit; determining a target signal circuit corresponding to the soil to be tested according to the first current code value and the first code value interval; and determining the salt concentration of the soil to be tested according to the target code value collected by the AD acquisition module under the target signal circuit.
[0052] In one embodiment, determining a target signal circuit corresponding to the soil to be tested based on a first current code value and a first code value interval includes: when the first current code value is not in the first code value interval, determining a circuit switching order based on a signal reduction ratio of each signal circuit except an initial signal circuit; taking the signal circuit ranked first in the circuit switching order as a to-be-selected signal circuit, and switching the current signal circuit to the to-be-selected signal circuit through a multi-stage switch to obtain a second current code value collected by an AD acquisition module under the to-be-selected signal circuit, and a second code value interval corresponding to the to-be-selected signal circuit; when the second current code value is in the second code value interval, determining the to-be-selected signal circuit as the target signal circuit.
[0053] In one embodiment, the method further includes: when the second current code value is not in the second code value interval, using the signal circuit ranked second in the circuit switching order as the signal circuit to be selected, and returning to the step of switching the current signal circuit to the signal circuit to be selected through a multi-stage switch until the second current code value is in the second code value interval.
[0054] In one embodiment, the method further includes: when the first current code value is in the first code value interval, determining the initial signal circuit as the target signal circuit.
[0055] In one embodiment, determining the salt concentration of the soil to be tested based on the target code value collected by the AD acquisition module under the target signal circuit includes: traversing each preset code value in the preset comparison table corresponding to the target signal circuit to obtain a preset code value matching the target code value; and determining the preset salt concentration corresponding to the preset code value matching the target code value as the salt concentration of the soil to be tested.
[0056] In one embodiment, the method further includes: when there is no preset code value matching the target code value in the preset comparison table, obtaining a minimum preset code value greater than the target code value and a maximum preset code value less than the target code value; determining an average salt concentration between a preset salt concentration corresponding to the minimum preset code value and a preset salt concentration corresponding to the maximum preset code value; and determining the average salt concentration as the salt concentration of the soil to be tested.
[0057] In one embodiment, the method also includes: placing soil samples with different preset salt concentrations into a test area of a salt concentration detection device; obtaining a preset code value corresponding to each soil sample with each preset salt concentration collected by an AD acquisition module; and determining a preset comparison table corresponding to each signal circuit according to each preset salt concentration and the preset code value corresponding to each preset salt concentration.
[0058] The present application also provides a computer program product which, when executed on a data processing device, is suitable for executing a program that initiates the method steps for determining a salt concentration.
[0059] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0060] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0061] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1A function specified in one or more boxes.
[0062] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0063] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0064] The memory may include non-permanent memory 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.
[0065] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. 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 disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage 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.
[0066] 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.
[0067] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.
Claims
1. A method for determining salt concentration, characterized in that Applied to a salt concentration detection device, the salt concentration detection device comprises a multi-stage switch, an AD acquisition module and a plurality of signal circuits, wherein the multi-stage switch is respectively connected to the AD acquisition module and the plurality of signal circuits, and the signal reduction ratio of each signal circuit is different, and the method comprises: After placing the soil to be tested into the test area of the salt concentration detection device, switching the current signal circuit to the initial signal circuit through the multi-stage switch; Acquire a first current code value acquired by the AD acquisition module under the initial signal circuit, and a first code value interval corresponding to the initial signal circuit; Determine a target signal circuit corresponding to the soil to be tested according to the first current code value and the first code value interval; The salt concentration of the soil to be tested is determined according to the target code value collected by the AD acquisition module under the target signal circuit.
2. The method for determining salt concentration according to claim 1, characterized in that The circuit for determining the target signal corresponding to the soil to be tested according to the first current code value and the first code value interval includes: When the first current code value is not within the first code value interval, determining a circuit switching order according to a signal reduction ratio of each signal circuit except the initial signal circuit; The signal circuit ranked first in the circuit switching sequence is used as a signal circuit to be selected, and the current signal circuit is switched to the signal circuit to be selected through the multi-stage switch; Acquire a second current code value acquired by the AD acquisition module under the signal circuit to be selected, and a second code value interval corresponding to the signal circuit to be selected; When the second current code value is within the second code value interval, the to-be-selected signal circuit is determined as the target signal circuit.
3. The method for determining salt concentration according to claim 2, characterized in that The method further comprises: When the second current code value is not in the second code value interval, the signal circuit ranked second in the circuit switching order is used as the signal circuit to be selected, and the step of switching the current signal circuit to the signal circuit to be selected through the multi-stage switch is returned until the second current code value is in the second code value interval.
4. The method for determining salt concentration according to claim 1, characterized in that The method further comprises: In a case where the first current code value is within the first code value interval, the initial signal circuit is determined as the target signal circuit.
5. The method for determining salt concentration according to claim 1, characterized in that The step of determining the salt concentration of the soil to be tested according to the target code value collected by the AD collection module under the target signal circuit includes: Traversing each preset code value in a preset comparison table corresponding to the target signal circuit to obtain a preset code value matching the target code value; The preset salt concentration corresponding to the preset code value matching the target code value is determined as the salt concentration of the soil to be tested.
6. The method for determining salt concentration according to claim 5, characterized in that The method further comprises: When there is no preset code value matching the target code value in the preset comparison table, obtaining a minimum preset code value greater than the target code value and a maximum preset code value less than the target code value; Determine an average value of salt concentration between the preset salt concentration corresponding to the minimum preset code value and the preset salt concentration corresponding to the maximum preset code value; The average salt concentration is determined as the salt concentration of the soil to be tested.
7. The method for determining salt concentration according to claim 5, characterized in that The method further comprises: Placing soil samples with different preset salt concentrations into the test area of the salt concentration detection device; Obtaining a preset code value corresponding to each soil sample of preset salt concentration collected by the AD acquisition module; The preset comparison table corresponding to each signal circuit is determined according to each preset salt concentration and the preset code value corresponding to each preset salt concentration.
8. A processor, characterized in that: The device is configured to perform the method for determining salt concentration according to any one of claims 1 to 7.
9. A salt concentration detection device, characterized in that: include: AD acquisition module; Multiple signal circuits, each with a different signal reduction ratio; A multi-stage switch, connected to the AD acquisition module and the plurality of signal circuits respectively; as well as A processor according to claim 8.
10. A machine-readable storage medium having instructions stored thereon, characterized in that: When the instructions are executed by a processor, the processor is configured to perform the method for determining salt concentration according to any one of claims 1 to 7.
Citation Information
Patent Citations
Temperature compensation type high-precision calibration method for soil salinity sensor
CN111272985A
High-precision soil conductivity measuring device and measuring method thereof
CN112649476A
Soil environment simulation method and device for buried pipeline and storage medium
CN118409070A