A method for switching a breeding sewage nutrient recovery process

By constructing a fingerprint of the recycling process and determining path eligibility, calculating the inheritance disturbance index, and performing buffer transition processing, the problems of water quality fluctuation and path residual disturbance in nutrient recovery from aquaculture wastewater were solved, thus achieving stability and continuity in the nutrient recovery process.

CN121974469BActive Publication Date: 2026-06-23AGRO ENVIRONMENTAL PROTECTION INST OF MIN OF AGRI

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
AGRO ENVIRONMENTAL PROTECTION INST OF MIN OF AGRI
Filing Date
2026-04-09
Publication Date
2026-06-23

AI Technical Summary

Technical Problem

Existing nutrient recovery technologies for aquaculture wastewater lack continuous judgment and seamless control when facing water quality fluctuations and path residual disturbances, resulting in inaccurate timing of process switching and affecting the stability and continuity of the recovery process.

Method used

By collecting multiple parameters of aquaculture wastewater, a recovery condition fingerprint is constructed to determine the entry, maintenance, and prohibition qualifications of phosphorus and nitrogen recovery paths. The inheritance disturbance index is calculated to generate switching candidates and perform buffer transition processing. The stable formation state of the target path is verified, and the target path is locked or a rollback process is performed.

Benefits of technology

It improves the accuracy of process switching judgment, reduces erroneous and unstable switching, ensures the continuity and reliability of the nutrient recovery process, and reduces the risk of operational instability and fluctuations in recovery effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121974469B_ABST
    Figure CN121974469B_ABST
Patent Text Reader

Abstract

The application discloses a breeding sewage nutrient recovery process switching method, and particularly relates to the technical field of breeding sewage resource recovery, and is used for solving the problems of inaccurate switching time and unstable operation after switching in the existing breeding sewage nutrient recovery process due to the fact that water quality fluctuates greatly, residual disturbance before and after the process path is difficult to eliminate in time. A recovery working condition fingerprint is constructed by collecting multiple working condition information of the breeding sewage in a continuous observation window, and the entering qualification, maintaining qualification and forbidden entering qualification of a phosphorus recovery path and a nitrogen recovery path are respectively determined based on the recovery working condition fingerprint. The switching condition is constrained in combination with an inherited disturbance index, a switching candidate is generated and a buffer transition process is performed when the switching premise is met, so that the purpose of improving the accuracy of process switching determination, reducing the interference of mis-switching, lagging switching and improper switching on the nutrient recovery process is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of aquaculture wastewater resource recovery technology, specifically a method for switching the nutrient recovery process of aquaculture wastewater. Background Technology

[0002] Existing nutrient recovery technologies for aquaculture wastewater primarily focus on phosphorus recovery, nitrogen recovery, or a combination of both. A common approach is to perform solid-liquid separation at the front end, and then, based on the nitrogen, phosphorus, and acid / alkalinity levels in the wastewater, employ crystallization recovery, absorption recovery, or corresponding combined processes to achieve resource utilization. While current technologies can achieve nutrient extraction and recovery under certain conditions, most still prioritize single-path recovery efficiency, reagent dosage control, equipment structure optimization, or fixed process flow configurations. Start-up or switching is typically based on several water quality indicators reaching set ranges. For continuously operating production lines, this approach can meet basic operational requirements when influent conditions are relatively stable. However, in actual aquaculture wastewater scenarios, the composition and operating status of wastewater often fluctuate continuously due to variations in the number of aquaculture batches, discharge rhythms, front-end separation status, and recirculation conditions. Furthermore, factors such as liquid retention, reagent residues, particle deposition, and loop disturbances exist between pre- and post-treatment paths. Therefore, relying solely on single indicators or instantaneous conditions for path selection fails to accurately reflect whether the current process is ready for switching.

[0003] Furthermore, existing technologies, in the process path switching stage, typically focus more on "whether to switch," while insufficiently considering "when to switch," "whether residual disturbances in the current path have been released before switching," and "whether the target path can achieve a stable recovery state after switching in." Especially when continuously switching between phosphorus and nitrogen recovery paths, if the switch is based solely on water quality values ​​or equipment status at a particular moment, residual liquid, added chemicals, suspended particles, or short-term fluctuations from the previous path can easily enter the subsequent path, leading to unstable operation, fluctuations in recovery status, abnormal equipment load, and even requiring readjustment or withdrawal immediately after switching in the target path. While existing solutions can describe the operating conditions of various recovery processes themselves, they generally lack a unified, detailed, and applicable judgment mechanism for the continuous connection before and after path switching, disturbance transmission, and post-switching status confirmation.

[0004] Therefore, existing technologies for nutrient recovery from aquaculture wastewater lack a method for continuous judgment and coordinated control throughout the entire process of path switching, especially when dealing with fluctuations in incoming water quality, residual disturbances along the pathways, and changes in equipment status during continuous operation. This makes it difficult to accurately determine the timing of process switching, resulting in insufficient stability of the target path after switching, and consequently affecting the continuity and reliability of the nutrient recovery process. The problem is not that a single recovery path itself cannot operate, but rather that existing technologies do not adequately address the coordination between the prerequisites for path switching, the transition period, and the confirmation of the post-switching status. This constitutes a specific problem that the subsequent invention needs to further address. Summary of the Invention

[0005] To address the shortcomings of existing technologies, this invention provides a method for switching processes for nutrient recovery from aquaculture wastewater, thereby resolving the problems mentioned in the background section.

[0006] To achieve the above objectives, the present invention provides the following technical solution: a method for switching aquaculture wastewater nutrient recovery process, comprising:

[0007] S1. Collect ammonia nitrogen concentration, phosphate concentration, pH, alkalinity, calcium and magnesium concentration, suspended solids concentration, temperature, flow rate and current operating path status of aquaculture wastewater within a continuous observation window to construct a recycling condition fingerprint.

[0008] S2. Based on the recovery condition fingerprint, determine the entry qualification, maintenance qualification, and prohibition qualification of the phosphorus recovery path and the nitrogen recovery path respectively, and obtain the qualification result of the target path;

[0009] S3. Based on the current running path status and the target path qualification results, calculate the inheritance disturbance index when switching from the current running path to the target path;

[0010] S4. When the current running path exit qualification is established, the target path entry qualification is established, and the inherited disturbance index meets the handover constraints, a handover candidate is generated and a buffer transition process is executed.

[0011] S5. After the buffer transition process, switch to the target path, collect the target path recovery status parameters in the verification window, and determine the stable forming state of the target path.

[0012] S6. Lock the target path when the target path is in a stable forming state, and perform rollback processing and rebuild the recovery condition fingerprint when the target path is not in a stable forming state.

[0013] Furthermore, S1 includes:

[0014] The following data were collected in the continuous observation window: ammonia nitrogen concentration, phosphate concentration, pH, alkalinity, calcium and magnesium concentration, suspended solids concentration, temperature, flow rate, and current operating path status. Among them, the calcium and magnesium concentration included the recorded values ​​of calcium ion concentration and magnesium ion concentration.

[0015] Perform time alignment on the original records, fill in missing records in chronological order, and mark unusable records;

[0016] Based on the effective records, the current value, the median value within the window, the fluctuation amplitude within the window, and the duration of continuous out-of-bounds are generated, and a fingerprint record of the recovery condition is generated.

[0017] Furthermore, S2 includes:

[0018] Based on the entry qualification rule group, maintenance qualification rule group, and prohibition qualification rule group corresponding to the phosphorus recovery route and the nitrogen recovery route, the entry qualification, maintenance qualification and prohibition qualification are determined respectively;

[0019] First, determine the entry restrictions for the phosphorus recovery path; then, determine the entry restrictions for the nitrogen recovery path; then, determine the maintenance eligibility for the current operating path; and finally, determine the entry eligibility for both the phosphorus and nitrogen recovery paths.

[0020] Generate the target path eligibility results.

[0021] Furthermore, the eligibility criteria for phosphorus recovery pathways are based on phosphate concentration, pH, recorded calcium ion concentration, recorded magnesium ion concentration, suspended solids concentration, and current operating status. The eligibility criteria for nitrogen recovery pathways are based on ammonia nitrogen concentration, pH, alkalinity, temperature, flow rate, suspended solids concentration, and current operating status.

[0022] Furthermore, S3 includes:

[0023] Based on the current operating path status and target path qualification results, separate records are generated for residual agent deviation, residual liquid level ratio, residual solid load, flow channel obstruction degree, and short-term fluctuation degree before switching.

[0024] Convert each item record into an item level value;

[0025] The inherited disturbance index value is generated by accumulating the sub-item level values ​​according to the preset weights in the rule version, and the inherited disturbance index record is generated based on the inherited disturbance index value.

[0026] Furthermore, S4 includes:

[0027] When the current path exit qualification is established, the target path entry qualification is established, and the inherited disturbance index meets the handover constraints, a handover candidate record is generated;

[0028] Perform buffered transition processing based on the action sequence bound to the path combination in the rule version;

[0029] Generate a record of the buffer transition processing results.

[0030] Furthermore, the action sequence includes unloading, stopping the injection, diverting the flow, purging, stabilizing the liquid, and pre-conduction;

[0031] The next action must not be initiated until the previous action is completed;

[0032] The buffer transition process is complete when all enabled actions in the action sequence are completed, no buffer transition process abort record is generated, and the total execution time does not exceed the allowed execution time limit.

[0033] Furthermore, S5 includes:

[0034] Within the verification window, collect the target path inlet flow rate, target path circulation flow rate, target path liquid level, target path pH, ​​target path temperature, corresponding dosing record value, target path recovered product status quantity, and target path equipment status quantity;

[0035] The boundaries for continuous operation of the equipment, continuous liquid inlet, stable liquid level, stable pH, stable temperature, continuous dosing, and formation of recovered products are determined in a fixed order.

[0036] Based on this, the target path is determined to be in a stable and formed state.

[0037] Furthermore, S6 includes:

[0038] When the target path is in a stable and formed state, lock the target path, write the target path into the current running path status record, and generate a target path lock record;

[0039] If the target path stable forming state is not met, a rollback process is performed, and the recovery condition fingerprint is reconstructed after the rollback process is completed.

[0040] Compared with the prior art, the present invention has the following beneficial effects:

[0041] 1. By collecting ammonia nitrogen concentration, phosphate concentration, pH, alkalinity, calcium and magnesium concentration, suspended solids concentration, temperature, flow rate, and current operating path status of aquaculture wastewater within a continuous observation window, a recovery condition fingerprint is constructed. Based on the recovery condition fingerprint, the entry qualification, maintenance qualification, and prohibition qualification of phosphorus recovery path and nitrogen recovery path are determined respectively. On this basis, combined with the inherited disturbance index when switching from the current operating path to the target path, the switching conditions are subject to hierarchical constraints. When the switching premise is met, switching candidates are generated and buffer transition treatment is performed. This achieves the goal of improving the pertinence and accuracy of process switching judgment and reducing the interference of erroneous, delayed, and improper switching on the nutrient recovery process, which is a problem in actual operation of aquaculture wastewater, such as large water quality fluctuations, difficulty in timely elimination of residual disturbances in the preceding and following paths, and difficulty in accurately judging the switching timing based on a single parameter or instantaneous state.

[0042] 2. By switching to the target path after a buffer transition and continuously collecting the target path's recycling status parameters within the verification window, the stable formation state of the target path is determined. When the target path is in a stable formation state, the target path is locked. When the target path is not in a stable formation state, a rollback process is performed and the recycling condition fingerprint is reconstructed. This achieves the goal of reconfirming whether the target path has truly formed a sustainable recycling state after path switching, promptly preventing the continued spread of unstable switching states, reducing the risk of operational instability after switching, abnormal fluctuations in the recycling process, and unstable recycling effects, and improving the continuous operation reliability and process connection stability of the entire aquaculture wastewater nutrient recovery process. Attached Figure Description

[0043] Figure 1 A block diagram of the overall structure of the nutrient recovery process switching system for aquaculture wastewater;

[0044] Figure 2 A flowchart illustrating the overall process for switching the nutrient recovery technology in aquaculture wastewater;

[0045] Figure 3 Flowchart for constructing fingerprints of recycling conditions;

[0046] Figure 4 Logic diagram for determining eligibility for the target path;

[0047] Figure 5 A sequence diagram of actions for buffered transition processing;

[0048] Figure 6 This is a closed-loop diagram for target path locking and backtracking. Detailed Implementation

[0049] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0050] Example: Combined with Appendix Figure 1-6 This embodiment provides a method for switching aquaculture wastewater nutrient recovery process, including:

[0051] S1. Collect ammonia nitrogen concentration, phosphate concentration, pH, alkalinity, calcium and magnesium concentration, suspended solids concentration, temperature, flow rate, and current operating path status of aquaculture wastewater within a continuous observation window to construct a recycling condition fingerprint. The specific implementation is as follows:

[0052] After effluent from the front-end solid-liquid separation unit, aquaculture wastewater enters the nutrient recovery section. A collection interval is set up between the inlet buffer tank (shared by the phosphorus and nitrogen recovery paths) and the main distribution pipe. The edge controller in the field control cabinet acts as the execution entity, collecting online instrument signals, laboratory supplementary recording signals, and equipment operation signals within this collection interval in a unified time synchronization manner. Unified time synchronization is the process by which the time synchronization module in the field control cabinet publishes a unified time reference to the online instruments, edge controller, automatic titration unit, and host computer. The time synchronization resolution is set to milliseconds, and the time synchronization period can be set to 60 seconds. When the local clock of any device deviates from the unified time reference by more than 200 milliseconds, the sampling record of that device in the current period is marked as a lost-synchronization record and will not participate in the fingerprint construction of the current recovery condition.

[0053] Ammonia nitrogen concentration is the content of ammonia components in a unit volume of aquaculture wastewater, expressed as nitrogen. It is read at each sampling interval from the continuous sampling signal of the online ammonia nitrogen analyzer at the outlet pipe of the inlet buffer tank, with units of milligrams per liter. The range can be set from 0 to 5000, and the measurement tolerance can be set to 5% of the reading plus 1% of the full range. A raw point is generated every 30 seconds. Phosphate concentration is read from the signal of the online phosphate analyzer on the same sampling branch, with units of milligrams per liter. The range can be set from 0 to 1000, and the measurement tolerance can be set to 5% of the reading plus 1% of the full range. pH is measured in the circulating branch of the inlet buffer tank. The pH value is continuously read from the electrode signal of the circuit, with the unit being dimensionless. The range can be set from 2 to 12, and the measurement tolerance can be set to 0.1. When an automatic titration unit is configured, the alkalinity is calculated from the consumption at the titration endpoint. When no automatic titration unit is configured, the alkalinity is measured by the on-duty laboratory technician according to shifts and recorded within 10 minutes after sampling. When both automatic titration records and manually recorded records exist within the same continuous observation window, the automatic titration record prevails, and the manually recorded record is only used as a verification record. Calcium and magnesium concentrations are recorded as parallel items in this embodiment, including the recorded values ​​of calcium ion concentration and magnesium ion concentration. For each subfield, no summation, ratio conversion, or conversion is performed between the two. When an online ion analyzer is set up, the data is read separately and then merged. When no online ion analyzer is set up, the data is supplemented by the rapid detection station or shift laboratory, and the sampling time, sampling point, and sample batch are recorded at the same time each supplementary entry. Under the condition that the correspondence between the turbidity meter signal and the shift filtration weighing result has been established and locked, the suspended solids concentration is read by the edge controller according to the turbidity segment, with the unit being milligrams per liter. This correspondence is established by continuously selecting no less than 30 sets of synchronous samples in the same collection interval. After recording the turbidity value, each group of samples is immediately sampled, filtered, and weighed to obtain the suspended solids concentration. The turbidity range is then divided into several segments with a fixed width, and the median value of the suspended solids concentration in each segment is calculated as the conversion value for that segment. When the deviation between the manual weighing value and the conversion value exceeds 15% for three consecutive shifts, the correspondence is rebuilt and a new rule version is formed. This correspondence is only applicable to the same sampling point, the same front-end solid-liquid separation conditions, and the same wastewater type, and is not shared across stations. The temperature is read from the temperature transmitter in the sampling branch, in degrees Celsius, and the flow rate is read from the electromagnetic flow meter in the inlet main pipe, in cubic meters per hour.

[0054] The current operating path status is determined in priority order: first, the reserved state; then, the phosphorus recovery path status; and finally, the nitrogen recovery path status. When multiple status conditions are met simultaneously, the reserved state takes priority. If any one of the valve position signal, main equipment operation signal, or auxiliary equipment operation signal for a path is missing or conflicting, that path status is invalid. Specifically, the phosphorus recovery path status is determined when the corresponding valve position is open, the phosphorus recovery reactor agitator and circulating pump are both running, and the phosphorus recovery dosing pump is not locked. The nitrogen recovery path status is determined when the nitrogen recovery path... The nitrogen recovery path status is determined when the corresponding valve position is on, the nitrogen recovery tower circulation pump and the blower unit are both running, and the absorbent replenishment unit is not locked. The retention status is determined when neither path meets the above conditions and the aquaculture wastewater enters the retention tank. Within the same sampling cycle, if the path selection valve position signal and the path number corresponding to the main equipment operation signal are inconsistent, the current operating path status of the sampling cycle is marked as a conflict state. When two consecutive sampling cycles are in a conflict state, the current operating path status of this continuous observation window is marked as unconfirmable.

[0055] The continuous observation window is a fixed-length data segment continuously captured forward from the current determination time under unified time synchronization. In the main embodiment, it can be set to 10 minutes, and the sampling beat is preferably 30 seconds. The sampling beat is the data acquisition cycle that the edge controller triggers according to unified time synchronization. When the instrument refresh cycle is greater than the sampling beat, the record of the most recent completed update and whose timestamp is not earlier than the sampling beat before the start of the current sampling beat is taken as the record of this beat. Records outside this time range are recorded as missing.

[0056] To ensure consistency across all measurements, the edge controller first aligns all original records using a unified timestamp. Records missing no more than two sampling cycles are filled in using adjacent valid values ​​in chronological order. Records consecutively missing more than two sampling cycles, those with instrument status codes indicating sampling failure, over-range status, communication failure, values ​​exceeding the range, or jump variables between adjacent points exceeding three times the average jump variable of the most recent five valid points for that measurement are marked as unavailable. Instrument status codes use a unified status table, where normal status is retained, maintenance reminder status is retained after adding a maintenance mark, and records corresponding to sampling failure, over-range, and communication failure statuses are marked as unavailable. If there are fewer than five recent valid points, the jump screening rule is not executed. When the average jump variable of the most recent five valid points is 0, 1% of the full scale of the instrument for that measurement is used as the minimum jump benchmark.

[0057] Alignment uses the unified sampling time to milliseconds as a benchmark to group all measurement points within the same sampling cycle into the same group. Comparison involves checking each quantity in the same group against the previous effective value, the median value in the same window, and the upper and lower limits of the instrument range to determine whether to accept it.

[0058] Within the continuous observation window, the edge controller generates four types of records for each feature: current value, median value within the window, fluctuation amplitude within the window, and duration of continuous out-of-bounds errors. The current value is taken from the last valid point at the end of the observation window; the median value within the window is taken as the median value after all valid points in the window are sorted by numerical value; and the fluctuation amplitude within the window is taken as the difference between the maximum and minimum valid values ​​of the window. When the number of valid points for a certain quantity within the continuous observation window is less than 80% of the theoretical number of points in the window, the fluctuation amplitude of that quantity is not calculated and it is directly marked as unusable. The duration of continuous out-of-bounds errors is based on the upper and lower limits allowed for that quantity in the parameter version, and is continuously accumulated within the current continuous observation window according to the sampling cycle. Unless otherwise explicitly defined, the duration of continuous out-of-bounds errors is defined throughout the text. The current value is taken from the last valid point at the end of the corresponding observation window or verification window. The median value within the window is taken from the median value after all valid points in the window are sorted by numerical value. The fluctuation amplitude within the window is taken from the difference between the maximum and minimum valid values ​​of the window. The duration of continuous out-of-bounds is accumulated continuously within the current time window according to the sampling rhythm, based on the upper and lower limits given by the corresponding rule version. When the same judgment item contains multiple source fields, unless otherwise specified, the field-level judgment results are obtained separately first, and then the final result of the judgment item is formed according to the preset synthesis rule in this step. When the end of the previous continuous observation window is in an out-of-bounds state and the first point of the current continuous observation window is still out of bounds, the duration of continuous out-of-bounds is calculated from the accumulated value of the previous continuous observation window.

[0059] The allowable range, upper limit for fill, jump reception boundary, and path status determination rules are all executed according to the published parameter and rule versions. The parameter version, rule version, execution time, execution device number, operator number, and original record batch number are jointly written into the evidence chain record. Among them, the parameter version is used to limit the measurement point caliber, allowable range, upper limit for fill, and noise reduction boundary; the rule version is used to limit the path qualification determination, inherited disturbance index calculation, buffer transition processing, stable forming state determination, and lock-back rules; the action version is used to limit the action sequence and completion time limit of the buffer transition processing; and the weight version is used to limit the cumulative weight of each sub-item level value of the inherited disturbance index. Parameter versions, rule versions, action versions, and weight versions are all recorded separately with version numbers and are bound to production line numbers, path combinations, activation times, and revision logs. Unmatched versions cannot be cross-called. Evidence chain logs are generated by the edge controller after each recycling condition fingerprint is constructed. They must include at least the original record batch number, a list of valid record numbers, a list of supplementary record numbers, a list of removed record numbers, parameter version number, rule version number, execution device number, execution time, and uploaded results. Generated evidence chain logs cannot be overwritten in situ; only appended revision records are allowed.

[0060] After completing the above processing, the edge controller encapsulates the records corresponding to this continuous observation window into a single recovery condition fingerprint record. The record content includes at least the fingerprint number, start time, end time, current value of each quantity, median value within each quantity window, fluctuation amplitude within each quantity window, duration of continuous out-of-bounds for each quantity, current operating path status, parameter version number, rule version number, and data integrity flag. The data integrity flag is divided into three levels: qualified, downgraded, and unusable. A qualified record is made when ammonia nitrogen concentration, phosphate concentration, pH, temperature, flow rate, and current operating path status are all validly recorded, and the proportion of valid points for all measuring points reaches 90% or more. The aforementioned six items are mandatory measuring points in this embodiment. A downgraded record is made when no more than two measuring points are missing and the proportion of valid points reaches 80% or more. All other cases are marked as unusable.

[0061] The record is written to the field time-series database as a structured message, and a call address is simultaneously published to the path qualification module. The structured message includes at least the fingerprint number, end time, rule version number, data integrity flag, and storage address. Transmission between upstream and downstream is via industrial Ethernet or fieldbus. The message transmission delay can be set to a maximum of 2 seconds. If the initial write fails, it will retry twice within 3 seconds using the original fingerprint number; renumbering is not allowed during the retry period. If duplicate original records are received at the same end time, a deduplication key is constructed using the timestamp, measurement point number, and batch number. Only the earliest record with a normal quality flag is retained, and subsequent records are deduplicated. Duplicate records will only have their source information appended. When online instruments are offline, laboratory data entry times out, network is interrupted, or the database is not writable, one recycling condition fingerprint record that is closest to and earlier than the current end time and whose data integrity is marked as qualified is allowed to be used as a replacement fingerprint record. The same replacement fingerprint record cannot be called more than 3 times consecutively. If it is exceeded, the current running path status will be forcibly reported as a reserved status and marked as a degraded record. The degraded record must at least include the degraded reason code, the list of missing measurement points, the replacement source identifier, the degraded start time, the consecutive degraded window count, and the allowed use deadline.

[0062] During on-site inspection, a sample size of no less than 30 consecutive observation windows shall be used. The completeness rate of the original records shall be no less than 95%, and the usability rate after alignment shall be no less than 90%. Manual retesting shall be completed at the same sampling point within 2 minutes before and after the corresponding system sampling time. The most recent valid system record within this time period shall be compared with the manual retest value. If the deviation does not exceed the instrument tolerance, this step shall be considered to have on-site usability.

[0063] Preferably, on a nutrient recovery line for pig farm wastewater with a daily processing capacity of 120 cubic meters, a continuous observation window is used for 10 minutes, with a sampling cycle of 30 seconds. Within a certain observation window, the ammonia nitrogen concentration increases from 1480 mg / L to 1520 mg / L, the phosphate concentration decreases from 118 mg / L to 112 mg / L, the pH stabilizes at 8.1 to 8.3, the alkalinity is 3620 mg / L, the calcium ion concentration is 168 mg / L, the magnesium ion concentration is 41 mg / L, the suspended solids concentration is 420 to 460 mg / L, the temperature is 31.4 to 31.9 degrees Celsius, the flow rate is 5.2 to 5.5 cubic meters per hour, and the current operating path is the phosphorus recovery path. Based on this, the system generates a fingerprint record and completes the data entry within 1.2 seconds. The next step is based on this fingerprint record. The path eligibility will continue to be determined. Alternatively, in cases where an online calcium and magnesium analyzer is not configured, a shift-based rapid detection station can be set up in the same collection interval. The detection results every 2 hours will be used as the most recent valid records of calcium and magnesium ion concentration records within the continuous observation window to participate in the construction. The detection method, detection time, and manual recorder number should be noted in the fingerprint record. This step is applicable to continuous and quasi-continuous production lines where aquaculture wastewater enters the nutrient recovery section after front-end solid-liquid separation. It is not applicable to situations where there is no unified time synchronization, no basic flow measurement capability, or frequent cross-unit backflow in the collection interval. All collection, storage, recording, and retrieval processes are only for the control of wastewater resource recovery process and must not be used for purposes unrelated to on-site operation.

[0064] S2. Based on the recovery condition fingerprint, determine the entry qualification, maintenance qualification, and prohibition qualification of the phosphorus recovery route and the nitrogen recovery route respectively, and obtain the qualification result of the target route. The specific implementation is as follows:

[0065] After the edge controller completes the fingerprinting of the recovery condition in the previous stage, it reads the latest recovery condition fingerprint record marked as qualified or downgraded from the field time-series database within the same control cycle, and synchronously reads the path qualification judgment rule with the same rule version number as the recovery condition fingerprint record from the rule base. This step is completed in the nutrient recovery section control cabinet. The period of action is the switching judgment stage before the water from the inlet buffer tank enters the phosphorus recovery path or nitrogen recovery path through the distribution main pipe.

[0066] Entry eligibility is determined solely by the recovery condition fingerprint corresponding to the current continuous observation window, and is not accumulated across windows unless the rule group explicitly specifies the number of continuous observation windows for a certain parameter; maintenance eligibility is only applied to the current path recorded in the current running path status corresponding to the end of the recovery condition fingerprint; entry prohibition eligibility is written into the current target path eligibility result as soon as it is established within the current control cycle.

[0067] In the path qualification determination rules, each qualification of each path corresponds to a set of rules. A set of rules consists of multiple parameter rule records. The determination of the set is valid only when all the required parameter rules in the set are satisfied at the same time. The missing tolerance flag is set by a single parameter field and stored with the parameter rule record. The priority is represented by an integer value. The smaller the value, the higher the priority. When the priorities are the same, the path to be retained is always selected.

[0068] Each path in the rule base contains at least three sets of records: entry qualification rule group, maintenance qualification rule group, and prohibition qualification rule group. Among them, the enabled items are fields marked in the rule version as participating in the judgment, calculation, or action execution of this control cycle; the required items are fields in the enabled items that have a veto effect on the conclusion; and the optional items are fields in the enabled items that are only recorded without veto. Fields not marked as enabled by the rule version shall not participate in the establishment determination, level calculation or action completion determination of this control cycle. Each parameter rule record shall at least record the applicable wastewater type, applicable production line number, parameter name, parameter lower limit, parameter upper limit, allowable fluctuation amplitude upper limit, allowable continuous out-of-bounds duration upper limit, missing tolerance flag, value type field, priority, activation time and mandatory flag. The value type field is used to indicate which one or more of the following, such as the current value, the fluctuation amplitude within the window, and the continuous out-of-bounds duration, are used for the determination of the parameter. Records not indicated by the value type field shall not participate in the determination of the parameter. The maintenance interval is given in advance by the rule version. The upper and lower boundaries of the maintenance interval are recorded independently and are not automatically generated by the entry interval in this step.

[0069] Before making a judgment, the edge controller first checks the rule version number, production line number, collection interval number and current running path status. If the rule version number is inconsistent, the production line number is inconsistent, the collection interval number is inconsistent, the rule base connection fails, an empty record is returned, a rule record with any required parameter is missing, the parameter name is empty, the upper and lower limits are empty, the priority is empty or the activation time is empty, an undecidable record is directly generated and written into the evidence chain trace record.

[0070] When the rule versions are consistent, first determine the entry prohibition qualification of the phosphorus recovery path, then determine the entry prohibition qualification of the nitrogen recovery path, then determine the maintenance qualification corresponding to the current operating path, and finally determine the entry qualification of the two paths. Paths with entry prohibition qualification shall not participate in the comparison of the current recommended target path, and even if their entry qualification is established, they shall be regarded as unselectable paths. When the maintenance qualification of the current operating path is established, the current recommended target path shall be fixed as the current operating path, and the entry qualification of the other path shall not be compared.

[0071] The qualification determination for a single parameter field is performed in a fixed order: first, the upper and lower limits of the current value are compared; then, the upper limit of the fluctuation amplitude within the window is compared; and finally, the upper limit of the continuous out-of-bounds duration is compared. If any step is not met, the parameter field is determined to be unqualified and will not be further compared with the field. "All satisfied" in the qualification establishment means that all the mandatory parameter rules in the qualification rule group of the path are satisfied at the same time. Missing non-mandatory parameters are allowed to not participate in the rejection.

[0072] For the phosphorus recovery path, the edge controller determines the phosphate concentration, pH, calcium ion concentration, magnesium ion concentration, suspended solids concentration, and current operating path status item by item to obtain entry qualification, maintenance qualification, and prohibition qualification. Among them, the magnesium ion concentration record value is recorded according to the corresponding parameter rule in the rule group and participates in the determination. When the rule group does not enable this parameter, the magnesium ion concentration record value is only retained with the recovery condition fingerprint and is not used as a rejection condition for this control cycle.

[0073] For the nitrogen recovery path, the edge controller determines the ammonia nitrogen concentration, pH, alkalinity, temperature, flow rate, suspended solids concentration, and current operating path status item by item to obtain entry qualification, maintenance qualification, and prohibition qualification.

[0074] The target path qualification result is a summary record of the qualification judgments formed for the two paths respectively, which includes at least the result number, recovery condition fingerprint number, phosphorus recovery path entry qualification mark, phosphorus recovery path maintenance qualification mark, phosphorus recovery path prohibition qualification mark, nitrogen recovery path entry qualification mark, nitrogen recovery path maintenance qualification mark, nitrogen recovery path prohibition qualification mark, current recommended target path, rule version number, judgment time, execution equipment number, and evidence chain trace number. The current recommended target path is determined according to fixed rules, that is, when both paths are prohibited from entering, it is recorded as a reserved path; when the current operating path is maintained, it is recorded as the current operating path; when the current operating path is not maintained and the other path is entered, it is recorded as the other path; when both paths are entered, the one with higher priority is selected; when neither path is entered, it is recorded as a reserved path.

[0075] The edge controller uses the recycling condition fingerprint number plus the path qualification determination rule version number to form an idempotent key. Only one target path qualification result record is allowed to be generated for the same idempotent key. When triggered repeatedly, the storage address of the original result record is directly called.

[0076] The target path qualification results are written to the field time-series database in a structured message and simultaneously sent to the inherited disturbance index calculation stage. The message includes at least the result number, recovery condition fingerprint number, phosphorus recovery path entry qualification flag, phosphorus recovery path maintenance qualification flag, phosphorus recovery path prohibition qualification flag, nitrogen recovery path entry qualification flag, nitrogen recovery path maintenance qualification flag, nitrogen recovery path prohibition qualification flag, the currently recommended target path, the rule version number, and the storage address. Industrial Ethernet is used for transmission, and the maximum delay for a single transmission can be set to 2 seconds. If the first write fails, it will be retried twice according to the original result number. If it still fails, it will be written to the local cache queue and retransmitted in the order of generation after the network is restored. Before retransmission, the remote database is searched according to the result number. If a record with the same number already exists, only the retransmission source flag is appended, and it is not written repeatedly.

[0077] An undeterminable record must include at least the result number, recovery condition fingerprint number, undeterminable reason code, list of missing fields, rule version number, determination time, number of consecutive undeterminable times, and the current recommended target path. The number of consecutive undeterminable times is accumulated separately for production line number, collection interval number, and rule version number. It is immediately reset to zero after one determineable result occurs. The count restarts when the rule version number changes. It is not accumulated across production lines and collection intervals. When the number of consecutive undeterminable times reaches 3, only result records with the current recommended target path as the retained path are allowed to be issued to the next stage. Result records for phosphorus recovery paths or nitrogen recovery paths must not be issued.

[0078] The evidence chain record must include at least the rule reading result, a list of field numbers involved in the judgment, a list of field numbers not involved in the judgment, the result number, the execution device number, and the execution time. The generated record must not be overwritten in place; only the appended revision record is allowed.

[0079] During on-site inspection, a sample size of no less than 30 consecutive observation windows shall be used. The consistency rate between the target path qualification results and the results of manual review according to the same version of rules shall not be less than 95%. Among them, the manual review shall be carried out after the corresponding record is generated, and each item shall be reviewed according to the same version of rules, the same sampling point, and the same time window. The original signal and trace record corresponding to the record shall be used as the basis for review. Other records shall not be used to replace the records across windows, versions, or production lines. When the fingerprint of the same recovery condition is repeatedly judged, the consistency rate of the results shall be 100%. The total time from the completion of the judgment to the entry of the result into the database shall not exceed 3 seconds for this step to be considered as having on-site usability.

[0080] Preferably, on a nutrient recovery line for pig farm wastewater with a daily processing capacity of 120 cubic meters, the fingerprint display of the recovery operating conditions corresponding to a certain continuous observation window shows that the current ammonia nitrogen concentration is 1520 mg / L, the current phosphate concentration is 112 mg / L, the current pH is 8.2, the current alkalinity is 3620 mg / L, the recorded calcium ion concentration is 168 mg / L, the recorded magnesium ion concentration is 41 mg / L, the current suspended solids concentration is 438 mg / L, the current temperature is 31.7 degrees Celsius, the current flow rate is 5.4 cubic meters per hour, and the current operating path status is the phosphorus recovery path status. After the same version of the rules is judged, it is found that the phosphorus recovery path is qualified to maintain its status and is not qualified to enter the path, and the nitrogen recovery path is qualified to enter its path and is not qualified to enter the path. The current recommended target path is determined. The phosphorus recovery path is defined, and the results are entered into the database and uploaded within 1.4 seconds. Alternatively, in the absence of an independent rule base server, the path qualification determination rules can be fixed locally on the edge controller in the form of a read-only configuration file. As long as the rule version number, field name, priority, activation time, and revision record remain consistent, the path qualification determination can still be achieved in a manner equivalent to the aforementioned implementation method. This step is applicable to continuous and quasi-continuous production lines where aquaculture wastewater enters the nutrient recovery section after front-end solid-liquid separation. It is not applicable to situations where a stable correspondence has not been established between the front-end collection interval and the back-end path unit, the rule version is not locked, or key fields are missing for a long time. The entire determination, recording, recording, and uploading process only serves the switching of wastewater resource recovery process and the path qualification results must not be changed independently outside the on-site operation boundary.

[0081] S3. Based on the current operating path status and the target path eligibility results, calculate the inherited disturbance index when switching from the current operating path to the target path. The specific implementation is as follows:

[0082] After the edge controller generates the target path qualification result in the previous stage, it synchronously reads the corresponding recovery condition fingerprint record, target path qualification result record, current running path status record, and the latest running record of the equipment associated with the current running path from the field time sequence database within the same control cycle. This step is completed in the nutrient recovery section control cabinet. The latest running record is the latest set of valid running records that is earlier than the start time of the current control cycle and the time interval does not exceed one continuous observation window. The effective period is before the generation of switching candidates. The switching judgment interval between the phosphorus recovery reactor circulation loop, phosphorus recovery dosing unit, nitrogen recovery tower circulation loop, blower unit, absorbent circulation unit and their common distribution manifold is corresponding to the field location. The purpose is to determine whether the unreleased reagent residue, liquid residue, solid residue, flow channel obstruction and short-term fluctuations in the current running path will continue to be transmitted and amplified after switching to the target path. The current operating path status follows the path status record locked in the previous stage, and the target path qualification result follows the result record formed in the previous stage. The inherited disturbance index is a single-value record that represents the risk of residual disturbance in the current operating path being transmitted to the target path. It is calculated by the edge controller in the same control cycle based on five categories of sub-item records: residual agent deviation, residual liquid level ratio, residual solid load, flow channel obstruction degree, and short-term fluctuation degree before switching. It is then determined as switchable, limited switchable, or prohibited switchable according to the hierarchical boundary locked by the rule version. Limited switchable means that it is allowed to enter the buffer transition process, but it is not allowed to directly form a switch execution command. Prohibited switchable means that a switch candidate cannot be generated.

[0083] The residual agent deviation is obtained by summarizing the pulse count signal of the dosing pump, the frequency conversion set signal, or the liquid level change signal of the metering tank according to the unified time synchronization. It is formed by dividing the absolute value of the difference between the cumulative dosing record in the most recent continuous observation window and the steady-state dosing benchmark by the steady-state dosing benchmark. The steady-state dosing benchmark is the median value of the current operating path that has been maintained for three consecutive continuous observation windows under the same production line, the same path, and the same rule version, and whose switching level is not higher than the median value of the cumulative dosing in the switchable period. Before the median value is formed, the preset benchmark value of the rule version is called. When the steady-state dosing benchmark is 0, it is directly recorded as a severe disturbance.

[0084] The percentage of residual liquid level is obtained by comparing the liquid level gauges of the phosphorus recovery reactor, the circulating tank of the nitrogen recovery tower, the liquid level switch of the common distribution main pipe, and the opening and closing records of the vent valve within the most recent continuous observation window before the switching determination time. It is formed by dividing the undrained working liquid by the switchable volume. The undrained working liquid is obtained by subtracting the confirmed vented volume from the current liquid volume converted from the liquid level record at the switching determination time. The confirmed vented volume is based on the flow integral record corresponding to the vent valve opening period. The switchable volume is the upper limit of the remaining liquid volume that may still enter the target path after the current operating path has been executed in the order of action specified by the vent valve, sludge valve, and return valve according to the rule version since the switching determination time. This value is pre-recorded in the rule base and bound to the path combination.

[0085] The residual solids load is obtained by aggregating the circulating liquid turbidity signal, suspended solids concentration record, sludge discharge valve action record, and filter unit differential pressure signal into the same continuous observation window. The steady-state cleanliness benchmark is the set of median recorded values ​​of suspended solids concentration, filtration differential pressure, and circulating flow rate in two consecutive observation windows after sludge discharge, emptying, and rinsing are completed, under the same production line, the same path, and the same rule version.

[0086] The degree of flow obstruction is obtained by comparing the circulating pump outlet pressure, loop pressure difference, flow rate drop amplitude, and valve position action completion time signals within the most recent continuous observation window.

[0087] The short-term fluctuation level before switching is calculated based on the three most recent sampling cycles before the switching determination time. The pH, flow rate and temperature are respectively taken as the difference between the maximum and minimum values ​​in the three sampling cycles. The start and stop status of the key execution unit is taken as the number of state changes within the three sampling cycles. If the number of state changes reaches 1, it is recorded as the existence of start and stop disturbance.

[0088] The edge controller first verifies the fingerprint number of the recovery condition, the qualification result number of the target path, the status number of the current running path, and the rule version number. If the number association is inconsistent, the rule version is inconsistent, the current running path status is a reserved status, the qualification result of the target path is a reserved path, or the current running path is the same as the target path, the inheritance disturbance index is not calculated, an incalculable record is directly generated and written into the evidence chain record. When the current running path is the same as the target path, the switching level is fixed as "retainable" and no inheritance disturbance index value is generated.

[0089] For rules with the same version and different current running path from the target path, the edge controller reads the sub-item records one by one by field name. For online records missing no more than 2 sampling cycles, adjacent valid values ​​are used to fill in the missing records in chronological order. Records that are missing more than 2 consecutive sampling cycles, have a status code of sampling failure, over-range status, or communication loss status are marked as unavailable. Each sub-item must contain at least one mandatory source field. If the mandatory source field is missing, the sub-item cannot be calculated. If any mandatory sub-item record is unavailable, the inherited disturbance index is marked as no-switching.

[0090] The calculation order for each sub-item is fixed as follows: first calculate the residual liquid level percentage, then the residual reagent deviation, then the residual solid load, then the flow channel obstruction degree, and finally the short-term fluctuation degree before switching. Each sub-item is converted into a sub-item level value according to the classification boundary in the rule version. The sub-item level value is recorded as an integer from 0 to 3, where 0 indicates no obvious disturbance, 1 indicates slight disturbance, 2 indicates moderate disturbance, and 3 indicates severe disturbance. When the same sub-item contains multiple source fields, each source field is first converted into a field level value according to the classification boundary, and then the highest level value is taken as the sub-item level value.

[0091] The inherited disturbance index is obtained by accumulating the five sub-item level values ​​according to the preset weights of the rule version. The weights are recorded as decimals between 0 and 1. Under the same path combination, the sum of the weights of the five sub-items is fixed at 1. The accumulated result is rounded to two decimal places and then compared with the level boundary. Boundary changes are only allowed to be implemented through the new rule version. Records generated by the original rule version cannot be retroactively rewritten.

[0092] After calculation, one inherited disturbance index record is generated, which includes at least the record number, recovery condition fingerprint number, target path qualification result number, current operating path status, target path, residual agent deviation record, residual liquid level percentage record, residual solid load record, flow channel obstruction degree record, short-term fluctuation degree record before switching, inherited disturbance index value, switching level, rule version number, judgment time, execution equipment number, and evidence chain trace number. This record is written to the field time-series database as a structured message and simultaneously sent to the switching candidate generation stage. The message includes at least the record number, target path, inherited disturbance index value, and switching level. Change the level, rule version number, and storage address; use industrial Ethernet for transmission, the maximum delay for a single transmission can be set to 2 seconds; if the first write fails, retry twice according to the original record number; if it still fails, write to the local cache queue and retransmit in the order of generation after the network recovers; if the previous record has not been confirmed for retransmission, the subsequent record must not be retransmitted out of order; before retransmission, search the remote database by record number; if a record with the same number already exists, only append the source mark for retransmission, and do not write it repeatedly; when the downstream link receives the same record number, only receive the first qualified record that arrives; subsequent records with the same number only append the source mark, and do not trigger the switching candidate generation repeatedly.

[0093] The edge controller uses the recycling condition fingerprint number, the target path qualification result number, and the rule version number to form an idempotent key. Only one inherited disturbance index record is allowed to be generated for the same idempotent key. If the record is triggered repeatedly, the original record address will be returned directly. The uncalculable record must include at least the record number, recycling condition fingerprint number, target path qualification result number, uncalculable reason code, missing field list, rule version number, decision time, current running path status, target path, and switching level.

[0094] The evidence chain record must include at least a list of field numbers involved in the calculation, sub-item level values, weight version numbers, cumulative results, switching levels, execution device numbers, and execution times. Existing records must not be overwritten in situ; only appended revision records are allowed.

[0095] During on-site inspection, a sample size of no less than 30 consecutive observation windows shall be used. The consistency rate between the inherited disturbance index record and the result of manual review according to the same rules shall not be less than 95%. When the same set of recovery condition fingerprints and target path qualification results are repeatedly calculated, the consistency rate shall be 100%. The total time from calculation to record entry shall not exceed 3 seconds. Only then shall this step be considered to be on-site usable.

[0096] Preferably, on a nutrient recovery line for pig farm wastewater with a daily treatment capacity of 120 cubic meters, the current operating path is a phosphorus recovery path, and the currently recommended target path in the target path qualification results is a nitrogen recovery path. In the most recent continuous observation window before the switchover decision, the cumulative dosage of the phosphorus recovery dosing unit deviated from the steady-state baseline by 12%, the percentage of unemptied liquid levels in the phosphorus recovery reactor and shared main pipe was 18%, the suspended solids concentration in the circulating liquid increased by 96 mg / L compared to the steady-state clean baseline, and the filtration pressure differential increased by 9000 Pa. The circulating loop flow rate decreased by 11%. In the most recent three sampling cycles before the switchover, the pH fluctuation was 0.3 and the flow rate fluctuation was 0.4 cubic meters per hour. After conversion according to the same version of the rules, the five sub-item level values ​​were 1, 1, 2, 2, and 1 respectively, resulting in a cumulative inherited disturbance index value of 1.80. The switchover level was recorded as limited switchover, and... Record entry and upload are completed within 1.6 seconds. Alternatively, in cases where independent filter differential pressure measurement points are not configured, the degree of flow channel obstruction can be determined by the change in circulating pump outlet pressure, valve position action completion time, and flow rate drop. As long as the field name, grading boundary, weight version, and logging rules remain consistent, the inherited disturbance index calculation can still be achieved in a manner equivalent to the aforementioned implementation method. This step is applicable to continuous and quasi-continuous production lines where aquaculture wastewater enters the nutrient recovery section after front-end solid-liquid separation. It is not applicable to cases where the current operating path status is not locked, the target path qualification result has not been generated, key residual records are missing for a long time, or the path combination is not configured with a rule version. All calculation, recording, logging, and upload processes only serve the wastewater resource recovery process switching and the inherited disturbance index result must not be modified separately from the on-site operating boundary.

[0097] S4. When the current path exit qualification is established, the target path entry qualification is established, and the inherited disturbance index meets the handover constraints, a handover candidate is generated and a buffer transition process is executed. The specific implementation is as follows:

[0098] After the edge controller completes the target path qualification results and inherited disturbance index records in the previous stage, it reads the current operating path exit qualification record, target path entry qualification record, inherited disturbance index record, current operating path status record, and the latest operating records of the current operating path associated equipment from the field time-series database within the same control cycle. This step is completed within the nutrient recovery section control cabinet. The effective period is before formally entering the target path. The field location corresponds to the shared distribution main pipe, phosphorus recovery reactor circulation loop, phosphorus recovery dosing unit, nitrogen recovery tower circulation loop, blower unit, absorbent circulation unit, and venting. The transition zone between the branch road, the sludge discharge branch road, and the retention trough return branch road; where, the current operating path exit qualification is established means that the current operating path maintenance qualification mark is not established and the current operating path entry prohibition qualification mark is not established; the target path entry qualification is established means that the target path entry qualification mark is established and the target path entry prohibition qualification mark is not established; the inherited disturbance index meets the switching constraints means that the switching level in the inherited disturbance index record is switchable or limited switching. Limited switching only allows the execution of buffer transition processing and must not issue the target path inlet valve opening command in this step. Unrestricted switching must not generate switching candidates.

[0099] Before generating a switching candidate, the edge controller first checks the recovery condition fingerprint number, the target path qualification result number, the inherited disturbance index record number, and the current running path status number. If the number association is inconsistent, the rule version number is inconsistent, the current running path status is a reserved status, the target path is a reserved path, the current running path is the same as the target path, the current running path exit qualification is invalid, the target path entry qualification is invalid, or the inherited disturbance index switching level is prohibited from switching, a switching candidate shall not be generated, and an unswitched record shall be directly generated and written into the evidence chain record.

[0100] When the rule versions are consistent and all switching conditions are met, the edge controller constructs an idempotent key using the recovery condition fingerprint number, the target path qualification result number, the inherited disturbance index record number, and the rule version number. Only one switching candidate record is allowed to be generated for the same idempotent key. If the switch is triggered repeatedly, the original record address will be returned directly.

[0101] A switch candidate is an intermediate record that indicates the current running path can enter the buffer transition process. When generated, it contains the switch start time, current running path, target path, switch level, buffer transition process sequence number, allowed execution time limit, and lock status. The buffer transition process sequence number is an action sequence identifier predefined in the rule version for the current path combination, consisting of the path combination code, rule version number, and action version number. The allowed execution time limit is the upper limit of the total duration of all enabled actions in the buffer transition process from the switch start time to the final completion. The upper limit of the duration of a single action is limited by the action completion time limit field in the action sequence. The lock status includes at least three values: locked, unlocked, and invalidated. When a switch candidate is generated, it is always recorded as locked.

[0102] The buffer transition process is executed according to the action sequence bound to the path combination in the rule version. The action activation flag can only be in two states: enabled or disabled. All or enabled items in the six action categories—load reduction, stop injection, diversion, evacuation, liquid stabilization, and pre-conduction—are fixed and cannot be changed within the current control cycle. Load reduction is performed on the frequency converter input signal of the relevant circulating pump, blower unit, or agitator unit in the current operating path, reducing the frequency input to the transition value preset in the rule version. The allowable error band is the upper and lower deviation range of the target frequency preset in the rule version. The actual feedback frequency is connected to... The process is considered complete when two consecutive sampling cycles fall within this range; stopping the injection is executed based on the start / stop signal and pulse count signal of the dosing pump or absorbent replenishment unit in the current operating path, and is considered complete when no new injection pulse is detected for two consecutive sampling cycles after the stop injection command is issued; diversion is executed based on the valve position feedback signals of the common distribution main switching valve, the retention tank return valve, and the target path inlet valve. First, the target path inlet valve is closed, then the retention tank return valve is opened. The valve position feedback is in place within the action completion time limit, and the target path inlet flow rate is lower than the preset error injection limit in the rule version. The process is considered complete when the limit is reached and two sampling cycles are completed. Drainage is performed on the signals from the drain valve, sludge valve, drain flow meter, and corresponding level gauge. The lower limit of the drain volume is preset by the rule version based on path combinations, effective equipment volume, and the allowable inlet disturbance boundary of the target path. The drain volume is obtained by recording the flow integral from the moment the drain valve is fully open to the moment it is fully closed. The process is considered complete when the lower limit of the drain volume is reached. Liquid stabilization is performed on the reactor level, circulation tank level, or common main pipe level records. The buffer zone is preset by the rule version based on path combinations and equipment volume. The upper and lower limits of the liquid level are expressed as a percentage of the liquid level or a volume value. The liquid level is considered complete when it falls back to the buffer zone and is maintained for two consecutive sampling cycles. The pre-conduction is performed on the target path inlet valve, the target path circulation pump standby signal, the target path agitator standby signal, or the blower unit standby signal. The target path is in a liquid-accessible standby state when the target path inlet valve is kept closed, the target path circulation pump or blower unit is in a startable standby state, the target path critical protection interlock is not activated, and the target path inlet flow record is lower than the upper limit of accidental liquid entry.

[0103] The edge controller collects valve position signals, pump start / stop signals, frequency converter feedback signals, flow meter signals, level gauge signals, pressure signals, and dosing / metering signals in the same period according to unified timing. Records missing no more than two sampling cycles are filled with adjacent valid values. Records that are missing more than two consecutive sampling cycles, have a sampling failure status code, are over-range, or have lost communication status are marked as unavailable. If any mandatory action feedback field is unavailable, subsequent actions cannot be started. The edge controller immediately stops the current buffer transition processing sequence and generates a buffer transition abort record, fixing the current recommended path as a reserved path.

[0104] Inconsistent action feedback with instructions refers to the execution unit's feedback state failing to meet the target state required by the instruction within the corresponding action completion time limit, or the feedback state showing a state opposite to the target state for more than two consecutive sampling cycles; continued detection of new additions after stopping addition refers to the dosing pump pulse count signal continuing to increase or the metering tank level continuing to change in the addition direction for two consecutive sampling cycles after the stop addition instruction is issued; mis-opening of the target path inlet valve refers to the target path inlet valve feedback opening exceeding the preset closing threshold of the rule version for more than one sampling cycle during the diversion action or pre-conduction action phase.

[0105] The edge controller checks whether each action is completed in a fixed sequence. The next action cannot be started if the previous action is not completed. If any action fails, the subsequent action cannot be started. The buffer transition is considered complete when all enabled actions are completed, no buffer transition abort record is generated, and the total time from the time of candidate switching to the time of completion of the last enabled action does not exceed the allowed execution time limit. The buffer transition is considered to have failed if any action times out, action feedback is inconsistent with the command, the evacuation volume does not reach the lower limit, new addition is detected after stopping addition, the target path inlet valve is mistakenly opened, or the liquid level does not fall back to the buffer zone.

[0106] After completing this step, one switch candidate record and one buffer transition processing result record are generated. Each switch candidate record corresponds to only one buffer transition processing result record and is written into the field timing database in a structured message. At the same time, it is sent to the target path entry and subsequent status confirmation stages. Industrial Ethernet transmission is used, and the upper limit of the single transmission delay can be set to 2 seconds. If the first write fails, it will retry twice with the original number. If it still fails, it will be written into the local buffer queue and retransmitted in the order of generation. If the previous record has not been confirmed, the previous record cannot be retransmitted out of order. When the downstream receives the same result number, only the first qualified record that arrives will be received, and the formal switch will not be triggered repeatedly. The locked state does not block the field emergency stop command and safety interlock action. When the emergency stop command or safety interlock action is triggered, the edge controller immediately stops the buffer transition processing and generates an abort record.

[0107] Preferably, on a nutrient recovery line for pig farm wastewater with a daily processing capacity of 120 cubic meters, the current operating path is the phosphorus recovery path, and the target path is the nitrogen recovery path. The current operating path is qualified to exit, and the target path is qualified to enter. The inherited disturbance index value is 1.80 and the switching level is limited switching. After the edge controller generates a switching candidate, the frequency of the phosphorus recovery circulating pump is first reduced from 35 Hz to 22 Hz, then the phosphorus recovery dosing pump is stopped. Subsequently, the inlet valve of the nitrogen recovery path is closed and the return valve of the retention tank is opened to drain 42 liters of circulating liquid. After the liquid level of the phosphorus recovery reactor drops from 68% to 51% and remains there for 60 seconds, the nitrogen recovery circulating pump is put into standby mode and the inlet valve remains closed. All actions are completed within 74 seconds, and the buffer transition treatment result is recorded as completed. Alternatively, in the case where there is no return branch for the retention tank, the diversion action can be changed to closing the common distribution main. The inlet valve maintains a low-speed bypass circulation of the front-end booster pump. Low-speed bypass circulation means that the frequency of the front-end booster pump drops to the preset bypass frequency of the rule version and the bypass loop flow reaches the lower limit of the bypass flow. As long as the action sequence, completion criteria, logging rules, and safety boundaries remain consistent, the equivalent switching candidate generation and buffer transition processing as described above can still be achieved. This step is applicable to continuous and quasi-continuous production lines where aquaculture wastewater enters the nutrient recovery section after front-end solid-liquid separation. It is not applicable to situations where the current operating path exit qualification is not established, the target path entry qualification is not established, the inherited disturbance index switching level is prohibited from switching, the key valve position feedback is missing for a long time, or the path combination is not configured with a buffer transition processing sequence. All judgment, action, recording, logging, and uploading processes only serve the wastewater resource recovery process switching and must not deviate from the on-site operating boundaries to change the switching candidate and buffer transition processing results.

[0108] S5. After the buffer transition process, switch to the target path, collect the target path recovery status parameters within the verification window, and determine the stable formation state of the target path. The specific implementation is as follows:

[0109] After the edge controller records the buffer transition processing result in the previous stage and the processing result is complete, it reads the switching candidate record, buffer transition processing result record, current running path status record, and standby record of the target path associated equipment from the field time sequence database within the same control cycle. It then issues a target path entry command in the nutrient recovery section control cabinet and completes this step in the corresponding field sections of the target path inlet valve, target path circulation pump, target path agitator or blower unit, target path dosing unit, and target path recovered product collection branch. Specifically, entering the target path means that, under the conditions that the target path inlet valve feedback is in the closed state, the target path critical protection interlock is not activated, and the buffer transition processing result is complete, the edge controller, according to the preset sequence of the rule version, first releases the locked control and then opens the target path inlet valve. Subsequently, the equipment marked as mandatory in the rule version of the target path circulation pump, agitator, or blower unit is switched from standby to running state. When the target path involves adding chemicals or replenishing absorbent, the corresponding unit enters the controlled dosing state according to the verification window initial quota. The controlled dosing state means that the corresponding dosing unit only executes according to the verification window initial quota preset in the rule version and does not accept manual interface modification. The verification window initial quota is preset by the rule version according to the path combination and equipment capacity. When the target path inlet valve is fully opened, the target path inlet flow record is higher than the minimum liquid inlet threshold preset in the rule version for two consecutive sampling cycles, and the mandatory equipment operation feedback is effective, it is recorded as the target path cut-in is completed. If the third sampling cycle falls below the threshold after two consecutive sampling cycles meet the standard, the cut-in is still established, but the drop record participates in the subsequent continuous liquid inlet boundary determination.

[0110] The verification window is a fixed-duration data segment continuously extracted from the moment the target path is entered. It is preset by the rule version according to the path combination and normally lasts until the end of the verification window. It is terminated early only when the abort record is generated. It will not end early due to the failure of a single boundary and is only used for the judgment of this step. It does not call the records before the start of the buffer transition process to fill this window.

[0111] The edge controller collects the target path recovery status parameters in the same period within the verification window according to a unified time synchronization. The target path recovery status parameters include at least the target path inlet flow rate, target path circulation flow rate, target path liquid level, target path pH, ​​target path temperature, target path dosage or absorbent replenishment amount, target path recovered product status quantity, and target path equipment status quantity. The target path recovered product status quantity is a set of exclusive record items corresponding to the target path. For the phosphorus recovery path, only the regular version enabled items are allowed from crystal product flow rate, crystallization zone turbidity, discharge cycle, and filtration pressure difference. For the nitrogen recovery path, only the regular version enabled items are allowed from absorbent increment, tower top tail gas ammonia concentration, absorbent conductivity, and circulation pressure difference. They must not be mixed across paths.

[0112] To ensure consistent data collection, the edge controller first verifies the switching candidate record number, buffer transition processing result record number, target path number, and rule version number. If the number association is inconsistent, the rule version number is inconsistent, the buffer transition processing result is not complete, the target path inlet valve is not closed properly, or the critical protection interlock has been activated, the target path entry is not executed, and a non-entry record is directly generated and written into the evidence chain trace record. The non-entry record must at least include the record number, switching candidate record number, target path number, non-entry reason code, rule version number, generation time, execution device number, and evidence chain trace number. When the rule version is consistent and the entry premise is met, the target path recovery status parameters are read item by item according to the field name. For online records missing no more than 2 sampling cycles, adjacent valid values ​​are used to fill in the gaps in chronological order. Records that are continuously missing more than 2 sampling cycles, have a status code of sampling failure, over-range status, or communication loss status are marked as unavailable. If any required parameter field is unavailable, the stable forming status is directly recorded as invalid.

[0113] In this embodiment, the stable forming state only indicates that the target path has formed a state that can be maintained within the current verification window. It does not indicate that the production line has entered the final steady state, does not replace the subsequent locking or rollback judgment, and is based solely on the boundary comparison results of the stable forming judgment rule without any manual experience correction.

[0114] The stable formation determination rules include at least the equipment continuous operation boundary, the inlet continuous liquid inlet boundary, the liquid level stability boundary, the pH stability boundary, the temperature stability boundary, the dosing continuity boundary, and the recovered product formation boundary. Among these, the equipment continuous operation boundary, the inlet continuous liquid inlet boundary, and the liquid level stability boundary are mandatory boundaries for all paths. The pH stability boundary, the temperature stability boundary, the dosing continuity boundary, and the recovered product formation boundary are executed according to the mandatory markers of the path combination. The comparison items corresponding to each boundary are predefined by the boundary field configuration table in the rule version. Comparison items that are not configured cannot participate in the determination of that boundary.

[0115] The continuous operation boundary of the equipment is determined by comparing whether the inlet valve, circulating pump, agitator, or blower unit is continuously in the required operating state within the verification window and whether the critical protection interlocks are not activated. The required operating state means that the corresponding equipment operation feedback is continuously effective and the cumulative duration of shutdown feedback does not exceed the upper limit preset in the rule version. The mandatory equipment for the phosphorus recovery path is the inlet valve, circulating pump, and agitator. The mandatory equipment for the nitrogen recovery path is the enabled item among the inlet valve, circulating pump, or blower unit. The critical protection interlocks are the set of interlock signals marked as mandatory in the rule version, including the enabled items among the overpressure interlock, idling interlock, overload interlock, and liquid level over-limit interlock. The list of enabled critical protection interlocks is written into the rule version according to the equipment number and path combination. Interlock signals that are not enabled shall not participate in the determination of this control cycle.

[0116] The continuous inlet flow boundary is obtained by comparing the current value of the inlet flow rate of the target path with the lowest value within the verification window to see if they are both higher than the minimum inlet flow threshold. Each minimum threshold is pre-written into the rule base by the rule version according to the path combination, equipment capacity and production line number.

[0117] The liquid level stability boundary is obtained by comparing the current liquid level value and the fluctuation amplitude within the verification window to see if they fall within the buffered steady-state range; the acidity and alkalinity stability boundaries and the temperature stability boundaries are obtained by comparing the current value, the fluctuation amplitude within the window, and the duration of continuous boundary crossings to see if they simultaneously satisfy the corresponding boundaries.

[0118] The continuity boundary of dosing is determined by comparing whether there is a dosing amount or absorbent replenishment amount record that matches the target path in each sampling cycle within the verification window, and whether the cumulative deviation does not exceed the allowable value. The cumulative deviation is calculated as the absolute value of the difference between the actual cumulative dosing amount in the verification window and the cumulative dosing benchmark preset in the rule version. The continuous existence in the dosing continuity boundary means that there is a valid dosing record in each sampling cycle within the verification window. The dosing record is allowed to be zero but must not be missing, and there must be no missing measurement for two consecutive sampling cycles between adjacent sampling cycles.

[0119] In this embodiment, the boundary for the formation of recovered products is determined by simultaneously satisfying all mandatory conditions in the corresponding path rule group. Non-mandatory conditions are only recorded and not rejected. When the target path is a phosphorus recovery path, the conditions for establishment are that the crystal product flow rate reaches the minimum output threshold, the turbidity in the crystallization zone does not exceed the upper limit, the discharge cycle does not lose synchronization, and the filtration pressure difference does not continuously increase. The discharge cycle not losing synchronization means that the deviation between the actual discharge trigger time and the preset discharge cycle time in the rule version within the verification window does not exceed the upper limit of the allowable deviation and the number of discharges is not less than the minimum number required by the rule version. The filtration pressure difference does not continuously increase. This means that the final value of the filtration differential pressure within the verification window is not higher than the preset upper limit of the rule version, and the number of consecutive increases in differential pressure in adjacent sampling cycles does not exceed the preset upper limit of the rule version. When the target path is a nitrogen recovery path, the conditions for its validity are that the increase in absorbent liquid reaches the minimum increase threshold, the ammonia concentration in the tail gas at the top of the tower is lower than the upper limit, the direction of change of absorbent liquid conductivity is consistent with the absorption process, and the circulating differential pressure does not exceed the upper limit. The direction of change of absorbent liquid conductivity is consistent with the absorption process, which means that the final value of absorbent liquid conductivity within the verification window is not lower than the initial value and the number of decreases in conductivity in adjacent sampling cycles does not exceed the preset upper limit of the rule version.

[0120] The edge controller determines the continuous operation boundary of the equipment in a fixed sequence, followed by the continuous liquid inlet boundary, then the stable liquid level boundary, stable pH boundary, stable temperature boundary, continuous dosing boundary, and finally the recovery product formation boundary. If any preceding boundary is not met, the subsequent boundary continues to be recorded, but the stable forming state must not be recorded as met. The continued recording of the subsequent boundary is only used to form a complete determination log and must not change the already formed invalid conclusion. When all mandatory boundaries are met and no termination record is generated, the stable forming state is recorded as met; otherwise, it is recorded as invalid.

[0121] A termination record must include at least the record number, the candidate record number for switching, the trigger reason code, the trigger field number, the trigger time, the target path number, and the current equipment status. It is generated when the following events occur within the verification window: the target path inlet valve is mistakenly closed, the circulating pump stops, the blower unit stops, a critical protection interlock is activated, or the liquid level exceeds the safety threshold for more than two sampling cycles. A mistakenly closed target path inlet valve refers to the target path inlet valve feedback opening being lower than the minimum opening threshold preset in the rule version for more than one sampling cycle within the verification window. The liquid level safety threshold is preset by the rule version according to the equipment number. Once generated, the current verification window acquisition is immediately terminated, and subsequent sampling records cannot participate in the current stable forming state determination.

[0122] After completing this step, a stable formation status record of the target path is generated. The stable formation status record of the target path includes at least the record number, the switching candidate record number, the buffer transition processing result record number, the target path number, the verification window start time, the verification window end time, the judgment results of each boundary, the stable formation status, the rule version number, the judgment time, the execution device number, and the evidence chain trace number. It is written to the field time series database in a structured message and simultaneously sent to the target path locking or rollback stage. The structured message includes at least the record number, the target path number, the stable formation status, the rule version number, and the storage address. Industrial Ethernet is used for transmission, and the maximum delay for a single transmission can be set to 2 seconds. If the first write fails, it will be retried twice with the original record number. If it still fails, it will be written to the local cache queue and retransmitted in the order of generation. If the previous record has not been confirmed, the previous record cannot be retransmitted out of order. The edge controller uses the switching candidate record number, the buffer transition processing result record number, and the rule version number to form an idempotent key. Only one stable formation status record of the target path is allowed to be generated with the same idempotent key.

[0123] Preferably, on a nutrient recovery line for pig farm wastewater with a daily processing capacity of 120 cubic meters, after the buffer transition treatment, the nitrogen recovery path is initiated. The verification window is set at 180 seconds. The target path inlet flow rate is stabilized at 5.1 to 5.3 cubic meters per hour, the circulation flow rate is 18.4 to 18.9 cubic meters per hour, the liquid level is maintained at 49% to 53%, the pH is maintained at 8.6 to 8.8, the temperature is maintained at 31.2 to 31.6 degrees Celsius, the absorbent replenishment is continuously maintained according to the set parameters, the absorbent increment reaches 12 liters, the ammonia concentration in the top tail gas drops below the upper limit of the rule and the circulation pressure difference does not exceed the limit, and the inlet valve, circulation pump and blower unit continue to operate throughout the verification window. Based on this, the edge controller determines that the stable formation state is established. Alternatively, without setting the top tail gas ammonia concentration... In cases where the measurement point is high, the boundary of the recovered product formation in the nitrogen recovery path can be determined by the increase in absorbent volume, the change in absorbent conductivity, and the circulating pressure difference. As long as the field name, boundary rules, traceability rules, and safety boundary remain consistent, the target path stable formation state determination can still be achieved in a manner equivalent to the aforementioned implementation method. This step is applicable to continuous and quasi-continuous production lines where aquaculture wastewater enters the nutrient recovery section after front-end solid-liquid separation. It is not applicable to situations where buffer transition treatment is incomplete, target path entry is incomplete, key state parameters are missing for a long time, or the target path is not configured with stable formation determination rules. All entry, collection, determination, recording, traceability, and uploading processes only serve the switching of wastewater resource recovery processes and must not deviate from the on-site operation boundary to independently change the target path stable formation state result.

[0124] S6. When the target path is in a stable forming state, lock the target path; when the target path is not in a stable forming state, perform a rollback and rebuild the recovery condition fingerprint. The specific implementation is as follows:

[0125] After the edge controller forms a stable forming state record of the target path in the previous stage, it reads the stable forming state record of the target path, the switching candidate record, the buffer transition processing result record, the current running path status record, and the latest running record of the target path associated equipment from the field time sequence database within the same control cycle. This step is completed within the nutrient recovery section control cabinet. The latest running record is the latest set of valid running records that is earlier than the start time of the current control cycle and whose time interval does not exceed one continuous observation window. Locking the target path means that, under the conditions that the stable forming state in the target path stable forming state record is established, the critical protection interlock is not activated, the running feedback of the target path associated equipment is continuously valid, and the stable forming state record is not overwritten by a new invalid record within the current control cycle, the edge controller writes the target path into the current running path status record, rewrites the locked state in the switching candidate record from locked to unlocked, and sets the corresponding inlet valve, circulation pump, and agitator... The agitator or blower unit, dosing unit or absorbent replenishment unit switches to the continuous operating parameter range preset in the rule version. The continuous operating parameter range consists of the enabled parameter items preset in the rule version according to path combination, equipment number and production line number. The parameter items that are not enabled shall not participate in the determination of the establishment of the target path lock. When the target path is a phosphorus recovery path, the enabled parameter items include the enabled items of circulation flow rate, agitator frequency, dosing amount and liquid level. When the target path is a nitrogen recovery path, the enabled parameter items include the enabled items of inlet flow rate, circulation flow rate, blower volume, absorbent replenishment amount and liquid level. The edge controller compares the valve position feedback, flow meter signal, frequency converter feedback signal, liquid level gauge signal and dosing metering signal to determine the satisfaction of the range. When all the mandatory continuous operating parameters are within the corresponding range in the most recent 2 sampling cycles, the target path lock is established. If any mandatory continuous operating parameter exceeds the limit once in the most recent 2 sampling cycles, the parameter is considered not to be within the corresponding range.

[0126] The rollback process refers to the process where, if the stable forming state in the target path's stable forming state record is not established, or if, although the stable forming state was originally recorded as established, any critical protection interlock action, abort record, or target path equipment shutdown record occurs within the same control cycle before locking, the edge controller stops the target path from continuing to enter according to the preset sequence of the rule version, releases the target path from the liquid contact state, guides the fluid back to the retention tank or the original path buffer, and returns the production line to a redeterminable transition state. A redeterminable transition state means that the target path inlet valve is closed, the target path chemical addition or replenishment has stopped, the retention tank or the original path buffer has established liquid contact, and the new continuous observation window has started timing.

[0127] The rollback process is executed in a fixed sequence: first, the target path inlet valve is closed; then, the target path dosing unit or absorbent replenishment unit is stopped; next, the target path circulation pump, agitator, or blower unit is reduced to the rollback transition value or stopped; then, the retention tank return valve or the original path buffer return valve is opened to prevent the incoming liquid from continuing to enter the target path, and the draining, liquid stabilization, and standby recovery actions are activated according to the rule version. The rollback transition value is a single value or interval value preset in the rule version according to the equipment number and path combination. In the rollback process, it is used for short-term transition control of the corresponding equipment from the running state to the standby state. When the equipment feedback enters the value or interval and maintains it continuously for 2 sampling cycles, it is recorded as in place.

[0128] The rollback process is considered complete only if all mandatory completion conditions are met simultaneously. Non-mandatory completion conditions are only recorded and not rejected. The completion conditions are: the target path inlet valve is closed, the target path inlet flow rate is lower than the rollback flow rate limit for two consecutive sampling cycles, the target path dosing amount or absorbent replenishment amount is zero for two consecutive sampling cycles, the target path liquid level drops back to the rollback stabilization zone, and the retention tank or original path buffer zone is established for liquid reception. The establishment of the retention tank or original path buffer zone for liquid reception means that the corresponding receiving branch valve is in place, the receiving flow rate record is higher than the minimum receiving threshold preset in the rule version, and the liquid level in the receiving area shows a change record in the same direction as the inlet direction. The rollback stabilization zone is preset by the rule version according to the equipment number and path combination, and is expressed as a percentage liquid level or volume value.

[0129] To prevent repeated erroneous switching, the edge controller generates a rollback lock period record after the rollback process is completed. The rollback lock period is a continuous time interval from the time the rollback is completed, during which re-entry into the failed target path is prohibited. It only applies to the failed target path and does not restrict the determination of other paths. The lock period is recalculated when the rule version changes and does not continue across rule versions. The handover candidate generation stage can only be entered again when the new target path qualification result formed based on the reconstruction and recovery condition fingerprint, the new inherited disturbance index record, and the new handover constraint determination result are all satisfied, and the rollback lock period has ended.

[0130] Reconstructing the recovery condition fingerprint refers to, after the rollback process is completed, using the rollback completion time as the new starting boundary, re-collecting ammonia nitrogen concentration, phosphate concentration, pH, alkalinity, calcium and magnesium concentration, suspended solids concentration, temperature, flow rate, and current operating path status within a new continuous observation window, forming a new recovery condition fingerprint record according to the aforementioned recovery condition fingerprint construction criteria. This record is constructed only from the new records collected after the rollback completion time, without recalling historical records before the rollback completion time to supplement the new continuous observation window. The new continuous observation window timing is triggered immediately after the reconstruction recovery condition fingerprint task record is generated, and manual delay of the start time is not allowed.

[0131] In both the locking and rollback branches, the edge controller collects valve position signals, flow meter signals, level meter signals, frequency converter feedback signals, equipment operation feedback signals, dosing and metering signals, and interlocking signals in the same period according to a unified time synchronization. For records missing no more than two sampling cycles, adjacent valid values ​​are used to fill in the missing records in chronological order. Records that are missing more than two consecutive sampling cycles, have a status code of sampling failure, over-range status, or communication failure status are marked as unavailable. If any mandatory action feedback field is unavailable, the locking branch cannot be established, and the rollback branch continues to execute until the liquid is received in the retention tank or the original path buffer, and a rollback degradation record is generated.

[0132] After completing this step, a target path locking record or rollback processing result record is generated, and a reconstruction and recovery condition fingerprint task record is generated simultaneously upon completion of the rollback processing. The target path locking record includes at least the record number, the target path stable forming state record number, the target path number, the locking establishment marker, the current running path state rewriting result, the continuous running parameter range satisfaction result, the rule version number, the judgment time, the execution device number, and the evidence chain trace number. The current running path state rewriting result is based on the record written to the field time-series database by the edge controller and successfully read back for confirmation. The rollback processing result record includes at least the record number, the target path stable forming state record number, the rollback reason code, the completion markers for each rollback action, the rollback completion time, the start time of the rollback locking period, the end time of the rollback locking period, the liquid reception result of the retention tank or original path buffer zone, the rule version number, the execution device number, and the evidence chain trace number. The reconstruction and recovery condition fingerprint task record includes at least the task number, the start time, the continuous observation window length, the sampling cycle time, the target production line number, the rule version number, and the associated rollback processing result record number.

[0133] The above records are written to the field time-series database in structured messages and simultaneously sent to the path qualification re-determination stage or the continuous operation monitoring stage. The structured message includes at least the record number, target path number, lock establishment flag or rollback completion flag, rule version number, and storage address. Industrial Ethernet is used for transmission, and the maximum delay for a single transmission can be set to 2 seconds. If the first write fails, it will retry twice with the original record number. If it still fails, it will be written to the local cache queue and retransmitted in the order of generation. If the preceding record has not been confirmed, the preceding and following records cannot be retransmitted out of order. When the downstream stage receives the same record number, it will only receive the first qualified record that arrives and will not trigger the path qualification re-determination or continuous operation monitoring again. The edge controller uses the target path stable formation state record number plus the rule version number to form an idempotent key. Only one target path lock record or one rollback processing result record is allowed to be generated with the same idempotent key.

[0134] The evidence chain record must include at least a list of field numbers involved in the judgment, a locked branch or rollback branch marker, an action execution log, parameter range comparison results, rollback locking period records, execution device number, and execution time. Existing records must not be overwritten in situ; only appended revisions are permitted. Locking and rollback processes do not mask on-site emergency stop commands and safety interlock actions. Emergency stop commands and safety interlock actions have higher priority than all automatic control commands. When triggered, the edge controller immediately suspends the currently incomplete action, maintains the target path inlet valve closed, and generates a safety abort record. Releasing locked controls only releases the automatic switching lock applied during the switching candidate phase; it does not release safety interlocks or emergency stop protection.

[0135] Preferably, on a nutrient recovery line for pig farm wastewater with a daily processing capacity of 120 cubic meters, the target path is a nitrogen recovery path. The stable formation state in the target path's stable formation state record is established. Within the last two sampling cycles, the edge controller confirms that the inlet flow rate is 5.2 to 5.3 cubic meters per hour, the circulation flow rate is 18.6 to 18.8 cubic meters per hour, the blower unit frequency is 31 to 32 Hz, and the absorbent replenishment amount falls within the continuous operating parameter range. Then, it rewrites the current operating path state as a nitrogen recovery path and generates a target path lock record. In another preferred operating condition, if the target path's stable formation state is not established and the circulation pump stops at the end of the verification window, the edge controller sequentially closes the target path inlet valve, stops absorbent replenishment, reduces the blower unit to the retreat transition value, and opens the retention tank return valve. The retreat process is completed within 68 seconds. Subsequently, the recovery condition fingerprint is reconstructed using the retreat completion time as the starting boundary, and the recovery lock is established upon... Re-entry into the nitrogen recovery path within the segment is prohibited. Alternatively, in cases where a retention tank return branch is not provided, the backtracking process can be changed to closing the target path inlet valve and maintaining the bypass circulation of the front-end booster pump. Subsequently, liquid stabilization and re-collection are completed in the original path buffer zone. As long as the action sequence, completion criteria, backtracking lock time period rules, and reconstruction recovery condition fingerprint caliber remain consistent, the target path locking or backtracking process can still be achieved in a manner equivalent to the aforementioned implementation method. This step is applicable to continuous and quasi-continuous production lines where aquaculture wastewater enters the nutrient recovery section after front-end solid-liquid separation. It is not applicable to situations where the target path stable formation state record is missing, key action feedback is missing for a long time, the path combination is not configured with a continuous operating parameter range, or the backtracking lock time period is not configured. All locking, backtracking, recording, traceability, and reconstruction of the recovery condition fingerprint process only serve the switching of wastewater resource recovery process and must not be separated from the on-site operation boundary to independently rewrite the target path locking result or backtracking process result.

[0136] All calculations involved in the embodiments are dimensionless numerical calculations, and the preset parameters and thresholds in the calculations are set by those skilled in the art according to the actual situation.

[0137] It should be noted that this invention can be deployed on the device itself to realize embedded applications, or it can run on a PC or other terminal with a user interface, thereby meeting various hardware environments and usage requirements.

[0138] The above embodiments can be implemented, in whole or in part, by software, hardware, firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wireless or wired transmission; wired transmission methods include optical fiber, twisted pair, coaxial cable, etc.; wireless transmission includes infrared, microwave, etc. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center containing one or more sets of available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium. A semiconductor medium can be a solid-state drive.

[0139] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and modules described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0140] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or modules may be electrical, mechanical, or other forms.

[0141] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical modules; they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0142] In addition, the functional modules in the various embodiments of this application can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module.

[0143] If the aforementioned functions are implemented as software functional modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0144] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

[0145] In conclusion, the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for switching aquaculture wastewater nutrient recovery process, characterized in that, include: S1. Collect ammonia nitrogen concentration, phosphate concentration, pH, alkalinity, calcium and magnesium concentration, suspended solids concentration, temperature, flow rate and current operating path status of aquaculture wastewater within a continuous observation window to construct a recycling condition fingerprint. S2. Based on the recovery condition fingerprint, determine the entry qualification, maintenance qualification, and prohibition qualification of the phosphorus recovery path and the nitrogen recovery path respectively, and obtain the qualification result of the target path; S3. Based on the current running path status and the target path qualification results, calculate the inheritance disturbance index when switching from the current running path to the target path; S4. When the current running path exit qualification is established, the target path entry qualification is established, and the inherited disturbance index meets the handover constraints, a handover candidate is generated and a buffer transition process is executed. S5. After the buffer transition process, switch to the target path, collect the target path recovery status parameters in the verification window, and determine the stable forming state of the target path. S6. Lock the target path when the target path is in a stable forming state, and perform rollback and rebuild the recovery condition fingerprint when the target path is not in a stable forming state. S2 includes: determining entry eligibility, maintenance eligibility and prohibition eligibility respectively based on the entry eligibility rule group, maintenance eligibility rule group and prohibition eligibility rule group corresponding to the phosphorus recovery path and the nitrogen recovery path; First, determine the entry restrictions for the phosphorus recovery path, then determine the entry restrictions for the nitrogen recovery path, then determine the maintenance eligibility for the current operating path, and finally determine the entry eligibility for both the phosphorus and nitrogen recovery paths; generate the target path eligibility results. The eligibility criteria for phosphorus recovery paths are based on phosphate concentration, pH, recorded calcium ion concentration, recorded magnesium ion concentration, suspended solids concentration, and current operating status. The eligibility criteria for nitrogen recovery paths are based on ammonia nitrogen concentration, pH, alkalinity, temperature, flow rate, suspended solids concentration, and current operating status. The S3 includes: based on the current operating path status and the target path qualification results, forming sub-records of residual agent deviation, residual liquid level ratio, residual solid load, flow channel obstruction degree and short-term fluctuation degree before switching; Convert each item record into an item level value; The inherited disturbance index value is generated by accumulating the sub-item level values ​​according to the preset weights in the rule version, and the inherited disturbance index record is generated based on the inherited disturbance index value.

2. The method for switching the nutrient recovery process in aquaculture wastewater according to claim 1, characterized in that, S1 includes: The following data were collected in the continuous observation window: ammonia nitrogen concentration, phosphate concentration, pH, alkalinity, calcium and magnesium concentration, suspended solids concentration, temperature, flow rate, and current operating path status. Among them, the calcium and magnesium concentration included the recorded values ​​of calcium ion concentration and magnesium ion concentration. Perform time alignment on the original records, fill in missing records in chronological order, and mark unusable records; Based on the effective records, the current value, the median value within the window, the fluctuation amplitude within the window, and the duration of continuous out-of-bounds are generated, and a fingerprint record of the recovery condition is generated.

3. The method for switching the nutrient recovery process in aquaculture wastewater according to claim 1, characterized in that, S4 includes: When the current path exit qualification is established, the target path entry qualification is established, and the inherited disturbance index meets the handover constraints, a handover candidate record is generated; Perform buffered transition processing based on the action sequence bound to the path combination in the rule version; Generate a record of the buffer transition processing results.

4. The method for switching the nutrient recovery process in aquaculture wastewater according to claim 3, characterized in that: The action sequence includes unloading, stopping the injection, diverting the flow, purging, stabilizing the liquid, and pre-conduction; The next action must not be initiated until the previous action is completed; The buffer transition process is complete when all enabled actions in the action sequence are completed, no buffer transition process abort record is generated, and the total execution time does not exceed the allowed execution time limit.

5. The method for switching the nutrient recovery process of aquaculture wastewater according to claim 1, characterized in that, S5 include: Within the verification window, collect the target path inlet flow rate, target path circulation flow rate, target path liquid level, target path pH, ​​target path temperature, corresponding dosing record value, target path recovered product status quantity, and target path equipment status quantity; The boundaries for continuous operation of the equipment, continuous liquid inlet, stable liquid level, stable pH, stable temperature, continuous dosing, and formation of recovered products are determined in a fixed order. Based on this, the target path is determined to be in a stable and formed state.

6. The method for switching the nutrient recovery process of aquaculture wastewater according to claim 1, characterized in that, S6 include: When the target path is in a stable and formed state, lock the target path, write the target path into the current running path status record, and generate a target path lock record; If the target path stable forming state is not met, a rollback process is performed, and the recovery condition fingerprint is reconstructed after the rollback process is completed.