A knowledge rule-driven method and apparatus for automatic generation of executable instructions

By establishing spatiotemporal mapping rules in the knowledge base and generating executable instructions in real time, combined with iterative correction and local updates, the problem of adapting instruction generation to the actual running state is solved, achieving low-impact continuous availability and accuracy.

CN123114483APending Publication Date: 2026-11-17水利部珠江水利委员会珠江水利综合技术中心
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611610805.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-10-19
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

The existing automatic instruction generation method cannot keep up with the actual running status when the environment changes, resulting in the generated instructions being out of touch with reality. Furthermore, the overall reconstruction of the rule table or retraining of the model will affect the stable and available configuration and bring high downtime costs.

Method used

By acquiring the temporal and locational characteristics of the target environment, spatiotemporal mapping rules are established and configured in the knowledge base. Executable instructions are generated and verified in real time, and the accuracy of the rules is maintained through iterative correction and local updates. Iteration logs are recorded for optimization.

Benefits of technology

It achieves spatiotemporal adaptation of instruction generation and verification, reduces the impact of environmental changes on stable configurations, provides a continuously usable update method, and avoids the high cost and error accumulation of overall reconstruction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123114483A_ABST
    Figure CN123114483A_ABST
Patent Text Reader

Abstract

This invention relates to a knowledge rule-driven method and apparatus for automatically generating executable instructions, belonging to the field of instruction generation technology. The method includes: acquiring the temporal and positional features of a target environment and determining its state semantics; establishing spatiotemporal mapping rules between the temporal features, positional features, and state semantics and configuring them in a knowledge base; generating and verifying executable instructions based on real-time state semantics and the spatiotemporal mapping rules; issuing and executing instructions that pass verification; iteratively correcting the spatiotemporal mapping rules based on the execution results of the executable instructions; identifying semantic differences before and after the update and locally updating the spatiotemporal mapping rules when the state of the target environment changes; recording iterative logs of the iterative correction and local updates, and updating the spatiotemporal mapping rules accordingly. This invention solves the technical problem in the automatic generation of instructions in environments such as production lines, systems, and platforms, where time, position, and frequency are coupled and change with the environment, making it difficult for the generated instructions to adapt to the actual state.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of instruction generation technology, and in particular to a knowledge rule-driven method and apparatus for automatically generating executable instructions. Background Technology

[0002] In production lines, control systems, and business platforms, equipment movements, process flows, and workflow approvals all rely on automatically generated and issued instructions. Whether these instructions can be executed depends not only on the accuracy of their content but also on whether their timing and placement align with the current operational status. The same instruction may require different time and location conditions before and after a change in equipment, shift, or workstation. Since changes in equipment, shifts, and process nodes occur continuously during operation, the required adaptation relationships change slowly. Therefore, the automatic generation of instructions must continuously follow the actual operational status over a relatively long period to ensure they are immediately usable upon issuance.

[0003] Existing automatic instruction generation methods often use time and location as static input features, writing them into rule tables or training samples. These features remain unchanged with the environment, and once a change occurs or a process node is adjusted, the generated instructions become disconnected from the actual situation. To keep up with changes, the rule table must be completely reconstructed or the model retrained globally, which would overturn stable and usable parts, resulting in a large impact and high downtime costs. Furthermore, existing methods often rely on execution logs to inform the generation process. However, these logs are generated by the instructions themselves and lack a source of confirmation independent of the instructions. This leads to amplified errors at each level, and frequently generated instructions are repeatedly generated, further increasing their frequency and causing the generated results to deviate from the actual operating state. Summary of the Invention

[0004] This invention provides a knowledge rule-driven method and apparatus for automatically generating executable instructions. It improves upon existing methods for automatically generating instructions in environments such as production lines, systems, and platforms. These methods treat time and location as static input features and rely on manual modification or global retraining after environmental changes. The former cannot keep up with production line changes and process node adjustments, while the latter can disrupt existing stable configurations, have a wide impact, and incur high downtime costs. This results in instructions becoming disconnected from the actual operating state for a long time after environmental changes.

[0005] The present invention discloses the following technical solution: In a first aspect, the present invention provides a knowledge rule-driven method for automatically generating executable instructions, the method comprising: S1: Obtain the temporal and positional features of the target environment and determine the state semantics. Establish spatiotemporal mapping rules between temporal features, positional features and state semantics, and configure the spatiotemporal mapping rules in the knowledge base. S2: Generate and verify executable instructions based on real-time acquired state semantics and spatiotemporal mapping rules, and issue the verified executable instructions for execution; S3: Iteratively correct the spatiotemporal mapping rules based on the execution results of the executable instructions; S4: When the state of the target environment changes, identify the semantic differences between the state semantics before and after the update, and locally update the spatiotemporal mapping rules based on the semantic differences; S5: Record the iteration log of iterative correction and local update, and update the spatiotemporal mapping rules based on the iteration log.

[0006] Secondly, the present invention provides a knowledge rule-driven automatic executable instruction generation device, the device comprising: The rule building module is used to obtain the temporal and locational features of the target environment and determine the state semantics, establish spatiotemporal mapping rules between temporal features, locational features and state semantics, and configure the spatiotemporal mapping rules in the knowledge base; The instruction generation module is used to generate and verify executable instructions based on real-time acquired state semantics and spatiotemporal mapping rules, and to issue the verified executable instructions for execution. The iterative correction module is used to iteratively correct the spatiotemporal mapping rules based on the execution results of the executable instructions; The local update module is used to identify the semantic differences between the state semantics before and after the update when the state of the target environment changes, and to locally update the spatiotemporal mapping rules based on the semantic differences. The log feedback module is used to record the iteration logs of iterative correction and local updates, and to update the spatiotemporal mapping rules based on the iteration logs.

[0007] One or more technical solutions provided in this invention have at least the following technical effects or advantages: The technical solution of this invention provides a knowledge rule-driven method for automatically generating executable instructions. First, by acquiring the time and location features of the target environment and determining the state semantics, and establishing spatiotemporal mapping rules between the time features, location features, and state semantics and configuring them in a knowledge base, the correspondence between time, location, and running state is solidified into a layer of basis that can be independently addressed and updated. This solves the problem that the conditions on which instruction generation is based are scattered in various places and cannot be traced or adjusted as the environment changes, providing a unified judgment basis for subsequent instruction generation and verification.

[0008] Furthermore, by using real-time acquired state semantics as the generation condition and verifying the generated candidate instructions according to spatiotemporal mapping rules before issuing and executing the approved ones, the instructions are checked against the current running state during the generation stage. This solves the problem of instructions with correct content but inconsistent timing or landing point being issued directly, providing dual checks on content and spatiotemporal aspects for the issuance of instructions.

[0009] Furthermore, by iteratively correcting the spatiotemporal mapping rules based on the execution results of executable instructions, the rules are corrected round by round according to the actual execution situation instead of being remapped all at once. This solves the problem that the execution results do not match the rule expectations for a long time and there is no way to correct it, thus providing a closed-loop correction method for the continuous accuracy of the rules.

[0010] Furthermore, by identifying the semantic differences before and after the update when the state of the target environment changes, and only locally updating the spatiotemporal mapping rules within the influence domain corresponding to the differences, it achieves that only the affected parts are modified while the rest remain unchanged when the environment changes. This solves the problem of overall reconstruction when the environment changes and the existing usable parts are overturned along with it, and provides a small-impact update method for continuous usability under slow environmental changes.

[0011] Finally, by recording iteration logs of iterative corrections and local updates, and updating spatiotemporal mapping rules based on the iteration logs, the system achieves the goal of leaving traces of the triggering, content, and execution results of each update and feeding back into the establishment and updating of rules. This solves the problems of untraceable update processes and lack of feedback sources for update basis, and provides a basis for the rollback and continuous optimization of rules.

[0012] Therefore, the knowledge rule-driven automatic generation method and apparatus for executable instructions provided by this invention first acquires the time and location features of the target environment and determines the state semantics, establishes spatiotemporal mapping rules between the three and configures them in a knowledge base, then generates and verifies executable instructions based on real-time state semantics and spatiotemporal mapping rules, and sends out those that pass the verification for execution. Subsequently, the spatiotemporal mapping rules are iteratively corrected based on the execution results, and local updates are made according to semantic differences when the state of the target environment changes. Finally, the iteration log is recorded and the spatiotemporal mapping rules are updated accordingly, so that the generation of instructions no longer depends on static input features and overall reconstruction, providing an implementation path that takes into account both spatiotemporal adaptation and long-term usability for the automatic generation of instructions in production line and system environments. Attached Figure Description

[0013] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0014] Figure 1 This is a schematic diagram of the overall process of a knowledge rule-driven automatic generation method for executable instructions provided in an embodiment of the present invention.

[0015] Figure 2 This is a schematic diagram of a partial update process for a knowledge rule-driven automatic generation method for executable instructions, provided in an embodiment of the present invention.

[0016] Figure 3 This is a schematic diagram of a knowledge rule-driven executable instruction automatic generation device provided in an embodiment of the present invention.

[0017] The components represented by each number in the attached diagram are explained as follows: rule construction module 11, instruction generation module 12, iterative correction module 13, local update module 14, and log feedback module 15. Detailed Implementation

[0018] This invention provides a knowledge rule-driven method and apparatus for automatically generating executable instructions, which addresses the technical problem that in the automatic generation of instructions in environments such as production lines, systems, and platforms, changes in production line models, shifts, and process nodes cause the instruction requirements at the same location to change continuously. The historical records that can be used to judge changes are all derived from the execution results of the instructions themselves and lack confirmation criteria independent of the instructions, resulting in the automatic generation of instructions failing to maintain accuracy in long-term operation.

[0019] 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. It should be noted that the numerical values ​​in the embodiments are for illustrative purposes only and do not constitute a limitation on the present invention.

[0020] Example 1, as Figure 1 As shown, this invention provides a knowledge rule-driven method for automatically generating executable instructions, the method comprising the following steps: S1: Obtain the temporal and locational features of the target environment and determine the state semantics. Establish spatiotemporal mapping rules between temporal features, locational features and state semantics, and configure the spatiotemporal mapping rules in the knowledge base.

[0021] For instructions to be delivered at the correct time and place, the time and location must first be clearly described, and neither of these can be defined by a single number. The main issues are as follows: First, the representation of time and location is inconsistent: time can be absolute moments, as well as stages and periods; location can be a workstation in a real scene or a process node in a virtual scene.

[0022] Secondly, the operating status is not a single physical quantity: the operating conditions at the same location are not the same under different shifts and cycle phases, and the current status cannot be determined by time or location alone.

[0023] Third, rules must be adjustable independently. If they are mixed with the main business rules, changes will affect the whole system. New locations and new time periods do not have a history at the beginning. If rules are created indiscriminately without any thresholds, the rules will expand as the location and time period are multiplied.

[0024] Therefore, this step first represents the location feature as the execution coordinate, takes the time feature as the absolute time, and the three elements of stage phase and periodic phase. Then, it determines the state semantics according to the frequency of historical instructions on the coordinate, and defines the mapping conditions and establishes spatiotemporal mapping rules based on the three elements, which are then configured in the rule sub-layer of the knowledge base that can be updated independently.

[0025] Step S1 in the method provided in this embodiment of the invention includes: Acquire the temporal and positional characteristics of the target environment, where the temporal characteristics include absolute time, phase phase, and periodic phase; The location features are characterized as execution coordinates used to indicate the point where the command lands, where the execution coordinates include the physical location in the real scene and the logical location in the virtual scene; Based on time features, execution coordinates, and frequency information, state semantics are determined. Frequency information is used to characterize the frequency of historical instructions occurring at the execution coordinates, and the frequency information is obtained from the rolling statistics of the iteration log.

[0026] Specifically, the time feature is a set of quantities in the target environment that are related to time and period, including three items: absolute time, stage phase, and periodic phase.

[0027] The absolute time is the calendar time of the target environment. In this example, it is 14:20:00 on March 16, 2026. It is used to determine the validity period of the spatiotemporal mapping rule and the boundary of the statistical window.

[0028] The phase stage is the segmented position of the target environment in the work organization. It is divided by shift. In this example, a day is divided into three phase stages: morning shift, afternoon shift, and night shift, with values ​​ranging from 1 to 3 respectively.

[0029] The cycle phase is the position of the target environment within a repetitive work cycle, divided according to the production rhythm. In this example, each shift is divided into 6 cycle phases, with values ​​ranging from 1 to 6.

[0030] The execution coordinates are the representation of the positional features that can be addressed, i.e. the landing point of the instruction, and their value is a specific physical or logical location.

[0031] Physical location refers to the location in the real scene, including production lines, workstations, and equipment nodes; logical location refers to the location in the virtual scene, including task queue levels, process nodes, and system modules.

[0032] Frequency information is the frequency of historical commands executed on the coordinate, obtained from the rolling statistics of the iteration log; when in a cold start state, i.e. a new position or a new time period, its value is zero. At this time, the spatiotemporal mapping rules on the coordinate have not yet been established, and are handled by the default rules and manual confirmation described below.

[0033] The state semantics is the classification result of the running state of the execution coordinate under the current time characteristics. The value is a continuous quantity from 0 to 1, where [0, 0.30) is normal production, [0.30, 0.70) is catching up with the cycle time, and [0.70, 1.00] is the first piece debugging after the changeover.

[0034] In this step, the time and location characteristics of the target environment are first taken. The time characteristics are taken as three items: absolute time, phase phase and periodic phase.

[0035] Furthermore, the location features are represented as execution coordinates. The physical location is taken from the production line and workstation in the real scene, and the logical location is taken from the process node in the virtual scene, so that the two types of locations can be addressed by the same set of time and space in the following text.

[0036] Finally, the state semantics are determined based on time characteristics, execution coordinates, and frequency information at those coordinates.

[0037] Step S1 in the method provided in this embodiment of the invention further includes: Based on time characteristics, execution coordinates and frequency information, mapping conditions are defined, and spatiotemporal mapping rules between mapping conditions and state semantics are established; Configure a confidence weight, validity period, and version number for each spatiotemporal mapping rule; Configure the spatiotemporal mapping rules as independently updated rule sub-layers in the knowledge base, where the spatiotemporal mapping rules contain correctable rule parameters.

[0038] More specifically, the mapping condition is a judgment formula composed of time features, execution coordinates and frequency information, which is formed by connecting the interval or predicate of the time condition, the interval or predicate of the position condition and the frequency threshold in an AND relationship.

[0039] The confidence weight is a coefficient that characterizes the credibility of the spatiotemporal mapping rule. It takes a value between 0 and 1 and is updated by the historical verification results of the rule. The more times the verification is successful, the higher the value.

[0040] The validity period is the time interval during which the spatiotemporal mapping rule takes effect. Its start and end points are given in absolute time. The rule does not participate in the generation and verification of instructions outside this interval.

[0041] The version number is the version identifier of the spatiotemporal mapping rule. A new version number is assigned each time the rule is updated. The executable instructions issued for execution carry the version number at the time of issuance, which is used for arbitration of instructions in transit.

[0042] The rule sublayer is a set of rules in the knowledge base that is independent of the business rule ontology, can be addressed independently, and can be updated independently. Updating the rule sublayer does not change the business rule ontology.

[0043] The rule parameters are the correctable coefficients in the spatiotemporal mapping rules. In this example, the parameter vector is taken in the form of a continuous estimation of state semantics, and its calculation formula is as follows:

[0044] Here, the state semantics is the estimated value of the operating state of the time space under given time features and frequency information; the parameter vector is the coefficient to be corrected on the time space, which is updated by the iterative correction described below; the basis function vector is the encoding of time features such as shift phase and beat phase, and each component takes the normalized value of the corresponding time feature; the frequency prior bias is a constant term mapped from the weighted frequency. In this example, the weighted frequency is divided by 30 and then multiplied by 0.20. The larger the weighted frequency, the larger the bias.

[0045] In this step, the mapping conditions are first defined based on time characteristics, execution coordinates, and frequency information. The time condition is taken as the interval between the stage phase and the period phase, the position condition is taken as the value of the execution coordinate, and the frequency condition is taken as the frequency being no less than the preset rule-building frequency threshold.

[0046] Furthermore, each spatiotemporal mapping rule is configured with a confidence weight, validity period, and version number, giving the rule credibility, effective time limit, and version identifier.

[0047] Finally, the spatiotemporal mapping rules are configured as independently updated rule sub-layers in the knowledge base, so that the rules can be addressed and corrected individually without altering the business rule body.

[0048] For example, consider assembly line number one in an automotive parts assembly workshop. The actual side of this assembly line has two workstations, A and B, while the virtual side has a process node P3. These three together constitute the execution coordinates of the target environment, totaling three.

[0049] In terms of time characteristics, the absolute time is taken as 14:20:00 on March 16, 2026, the stage phase is taken as the middle shift, i.e. the second stage phase, and the cycle phase is taken as the beat phase 3, i.e. the third cycle phase. Divided into 3 stage phases, 6 cycle phases and 3 execution coordinates, the target environment has a total of 54 time spaces.

[0050] Regarding frequency information, the historical instruction frequency in the time space of workstation A, middle shift, and beat phase 3 was 24.0, according to the rolling statistics of the iteration log. The preset rule establishment frequency threshold was 5.00, and the frequency of 48 out of 54 time spaces reached this threshold, thus establishing the spatiotemporal mapping rule.

[0051] Taking workstation A, middle shift, and beat phase 3 as an example, the mapping conditions are: time condition is middle shift and beat phase 3, position condition is workstation A, and frequency threshold is not less than 5.00. The three are connected by AND. The confidence weight configured for this rule is 0.90, the validity period is from 08:00 on March 16, 2026 to 08:00 on March 17, 2026, and the version number is 3.

[0052] The estimation process for the state semantics of this time space is as follows: the basis function vector is taken as 1, 0.50 and 0.40, the parameter vector is taken as 0.20, 0.60 and 0.30, and the frequency prior bias is 0.20×24.0÷30=0.160. Then the state semantics is 0.20×1+0.60×0.50+0.30×0.40+0.160=0.78, which falls in the range of 0.70 to 1.00, and is determined to be the first piece of debugging after the model change.

[0053] In contrast, the frequency information of the time space of process node P3, night shift, and beat phase 1 is 2.0, which is lower than the rule creation frequency threshold of 5.00. Therefore, no spatiotemporal mapping rule is created for this time space, and it is reverted to the default rule and switched to manual confirmation.

[0054] Therefore, this step first characterizes the positional features as the execution coordinates indicating the point where the instruction lands, takes the time features as the absolute time, and uses the three elements of stage phase and periodic phase, which solves the problem that the representation of time and position is inconsistent and cannot be used as a unified generation condition; then, it introduces the frequency of historical instruction occurrence on the execution coordinates as frequency information, and determines the state semantics according to the time features, execution coordinates and frequency information, which solves the problem that the current running state cannot be determined by time or position alone; Subsequently, the mapping conditions were defined using the three elements, and spatiotemporal mapping rules between the mapping conditions and state semantics were established. Confidence weight, validity period, and version number were configured for each rule, and the rules were configured as independently updatable rule sub-layers in the knowledge base. This solved the problems of rules and business rule ontology being mixed in one place, changes affecting the whole system, and rule expansion caused by creating rules without thresholds. It provides a unified and independently adjustable judgment basis for subsequent instruction generation and verification.

[0055] S2: Generate and verify executable instructions based on real-time acquired state semantics and spatiotemporal mapping rules, and issue the verified executable instructions for execution.

[0056] Once the state semantics are determined, they must be transformed into executable instructions, but a state cannot directly map to an instruction. The main issues are as follows: First, there is more than one possible instruction under the same state semantics. The generation process only provides a candidate set, from which one usable instruction must be selected.

[0057] Secondly, legal instructions may not be executable: the content of the instruction may be consistent with the business rules, but its time or landing point may not be consistent with the spatiotemporal mapping rules, the preconditions may not have been met, and the action may conflict with the security conditions of the device. These problems are not visible in the generation stage, but are only exposed during execution.

[0058] Third, the verification must be performed in a specific order: the cost and rigor of the three verifications are not the same. If they are performed together without any order, the verification with the higher cost will be used on a large number of candidates that could have been blocked earlier.

[0059] Therefore, this step first acquires the state semantics in real time and uses it as the generation condition to generate candidate instructions based on the knowledge base. Then, it performs three checks in sequence according to the spatiotemporal mapping rules: compliance, preconditions, and security interlocks. If any check fails, the instruction is pruned and transferred to manual confirmation. Only those that pass all checks are determined to be executable instructions and issued for execution.

[0060] Step S2 in the method provided in this embodiment of the invention includes: Real-time acquisition of state semantics, and using state semantics as generation conditions to generate candidate instructions based on the knowledge base; Candidate instructions are verified according to the spatiotemporal mapping rules. The verification includes spatiotemporal mapping rule compliance verification, precondition verification and security interlock verification, which are executed sequentially. Candidate instructions that fail any verification are pruned and transferred to manual confirmation. Candidate instructions that pass the verification are identified as executable instructions, and the executable instructions are then sent for execution.

[0061] Specifically, candidate instructions are those generated by the knowledge base based on state semantics and have not yet been verified. They are not eligible to be issued until they pass the verification.

[0062] The generation conditions are the inputs given when generating candidate instructions, i.e., the state semantics acquired in real time; multiple candidate instructions are generated from the knowledge base under the same state semantics.

[0063] The spatiotemporal mapping rule compliance check is the first check, used to determine whether the time and landing point of the candidate instruction conform to the spatiotemporal mapping rule on that spatiotemporal space.

[0064] Precondition verification is the second verification step, used to determine whether the prerequisites required by the candidate instruction have been met.

[0065] The safety interlock verification is the third verification, used to determine whether the action of the candidate instruction conflicts with the safety conditions of the target environment.

[0066] Pruning involves removing a candidate instruction from the current issuance if any verification fails, preventing it from being included in subsequent verifications and issuances.

[0067] Manual confirmation means that a human will make a judgment on whether to accept or discard the candidate instruction. In this example, all candidate instructions for pruning will be transferred to manual confirmation instead of being silently discarded.

[0068] Executable instructions are those that have passed all checks and are allowed to be executed. In this section, they are determined by the candidate instructions that have passed the checks.

[0069] In this step, the state semantics are first acquired in real time, and the state semantics are used as the generation condition to generate candidate instructions based on the knowledge base.

[0070] Furthermore, in accordance with the spatiotemporal mapping rules, candidate instructions are sequentially checked for compliance with the spatiotemporal mapping rules, verification of preconditions, and verification of security interlocks. If any verification fails, the instruction is pruned and transferred to manual confirmation.

[0071] Finally, the candidate instructions that pass the verification are determined to be executable instructions and are then sent for execution.

[0072] For example, taking workstation A, the middle shift, and cycle phase 3 of this assembly line as an example, the real-time status semantics obtained on this time space is 0.78, indicating that it is in the first piece debugging stage after the changeover.

[0073] Based on the semantics of this state, three candidate instructions are generated from the knowledge base: candidate instruction C-1 is the release instruction, candidate instruction C-2 is the first item confirmation instruction, and candidate instruction C-3 is the pace-catching-up acceleration instruction.

[0074] Candidate instruction C-1 failed the compliance check of the spatiotemporal mapping rules: the semantic state of this spatiotemporal space is 0.78, which is in the first-piece debugging after the changeover. The spatiotemporal mapping rules in this state do not allow the release of such instructions. Therefore, candidate instruction C-1 was pruned and switched to manual confirmation.

[0075] Candidate instruction C-3 passed the spatiotemporal mapping rule compliance check, but failed the precondition check: the first confirmation completion flag required by the instruction has not yet been set, so candidate instruction C-3 was pruned and switched to manual confirmation.

[0076] Candidate instruction C-2 passed the spatiotemporal mapping rule compliance check, precondition check, and security interlock check in sequence, and was determined to be an executable instruction and issued for execution.

[0077] Therefore, this step first acquires state semantics in real time and uses it as a generation condition to generate candidate instructions based on the knowledge base, solving the problem that state semantics cannot directly map to a unique usable instruction and that a candidate set must be given first; then, according to the spatiotemporal mapping rules, the candidate instructions are sequentially checked for compliance with spatiotemporal mapping rules, preconditions, and security interlocks. If any check fails, the instruction is pruned and transferred to manual confirmation, solving the problem that instructions with legal content but inconsistent spatiotemporal, unmet preconditions, or conflicts with security conditions are directly issued; finally, the candidate instructions that pass all checks are determined as executable instructions and issued for execution, providing triple checks on content, spatiotemporal, and security for the issuance of instructions.

[0078] S3: Iteratively correct the spatiotemporal mapping rules based on the execution results of the executable instructions.

[0079] Once rules are established, they are fixed, but the actual situation is constantly changing. There will inevitably be discrepancies between the rules' predictions and actual measurements; the magnitude and direction of these discrepancies can only be deduced from the execution results. The main problems are as follows: First, the execution result cannot be directly taken as the truth value: if the system's judgment on its own output is taken as the truth value, the rules and judgments are from the same source, and the deviation will be repeatedly confirmed and solidified. It is necessary to use a criterion that is not affected by the system's self-evaluation.

[0080] Secondly, the correction cannot be completed in one go: major changes to the parameters will cause the rules to jump in adjacent time and space, resulting in inconsistencies in the previous and subsequent interpretations. It is necessary to approximate the results step by step in rounds.

[0081] Third, correction must have a stopping condition: simply changing without stopping will cause the parameters to drift for a long time, and using the decrease of semantic difference as the stopping criterion will be misjudged by occasional small differences.

[0082] Therefore, this step first determines the semantics of the measured state based on the execution result and the measured state within the preset time window, and marks those that have not been verified as pending and do not participate in the correction; then, the update amount is determined by the difference between the measured and the prior according to the update step size, and the rule parameters are updated after the amplitude is limited; finally, the steady state is determined when the difference and the parameter change amount are each below the threshold for several consecutive rounds.

[0083] Step S3 in the method provided in this embodiment of the invention includes: Based on the execution result of the executable instruction, the semantics of the measured state are determined. The semantics of the measured state are determined by the execution result and the measured state within a preset time window. Unverified samples are marked as pending states and do not participate in iterative correction. Obtain the semantic difference between the measured state semantics and the prior state semantics corresponding to the spatiotemporal mapping rule; The update amount is determined based on the semantic difference and the preset update step size, and the rule parameters of the spatiotemporal mapping rule are updated after the update amount is limited. Specifically, when the semantic difference is lower than the preset difference threshold for multiple consecutive rounds, and the change in the rule parameters is lower than the preset parameter threshold for multiple consecutive rounds, it is determined that the iterative correction has entered a steady state.

[0084] Specifically, the measured state semantics refers to the actual operating state of the target environment as determined by the execution result of the executable instruction. The criterion is whether the measured operating conditions and system events within the preset time window after the instruction is executed have entered the state predicted by the instruction, and it is not given by the system's own output judgment.

[0085] The preset time window is a fixed duration starting from the time the command is issued. In this example, it is set to 10 minutes, which is used to capture the actual working conditions and system events required to determine the semantics of the actual test status.

[0086] The pending state is the label for a sample that has not been validated after execution. Samples marked as pending state do not participate in iterative correction.

[0087] The prior state semantics is the state semantics predicted by the spatiotemporal mapping rule according to the time and location features corresponding to the execution coordinates, that is, the predicted value given by the previous rule is corrected.

[0088] The semantic difference is the difference between the measured state semantics and the prior state semantics, and its value is the measured state semantics minus the prior state semantics.

[0089] The update step size is a preset coefficient that converts semantic differences into rule parameter corrections, with a value between 0 and 1. In this example, it is 0.50.

[0090] Amplitude limiting restricts the operation of each component of the update quantity to the allowed set. Components exceeding the upper limit of the allowed set are taken according to the upper limit value, thus constraining the magnitude of the change in rule parameters by a single correction.

[0091] The steady state is the termination state of the iterative correction. The criterion is that the semantic difference is lower than the preset difference threshold for multiple consecutive rounds and the change in the rule parameter is lower than the preset parameter threshold for multiple consecutive rounds. In this example, the difference threshold is 0.05, the parameter threshold is 0.02, and the number of consecutive rounds is 3.

[0092] In this step, the semantics of the measured state are first determined according to the execution result of the executable instruction. This is given by whether the measured working conditions and system events within the preset time window after the instruction is executed enter the state predicted by the instruction. Unverified samples are marked as pending states and do not participate in iterative correction.

[0093] Furthermore, the semantic difference between the measured state semantics and the prior state semantics corresponding to the spatiotemporal mapping rule is taken.

[0094] Furthermore, the update amount is determined based on the semantic difference and a preset update step size. This update amount is the product of the update step size, the semantic difference, and the basis function vector, and its calculation formula is as follows:

[0095] Among them, the update amount is the amount of correction to the rule parameters in this calibration; the update step size is the preset conversion coefficient; the semantic difference is the difference between the measured state semantics and the prior state semantics; and the basis function vector is the encoding of time features such as shift phase and beat phase.

[0096] Furthermore, the update quantity is limited by the upper limit of the update magnitude of the rule parameters, and then superimposed onto the rule parameters to complete one iteration of correction. The formula for calculating the upper limit is:

[0097] The update magnitude limit is the upper bound of the change to each component of the rule parameter in a single correction; the magnitude coefficient is a preset constant, which is 0.05 in this example; the rule parameter is the parameter vector after the last correction, and the larger its norm, the larger the allowable magnitude of a single change.

[0098] Finally, when the semantic difference is below the difference threshold for multiple consecutive rounds and the change in the rule parameters is below the parameter threshold for multiple consecutive rounds, it is determined that the iterative correction has entered a steady state. The criterion is calculated as follows:

[0099] Among them, the change in the rule parameter is the norm of the difference between the parameter vector of the current correction and the previous correction; the difference threshold is the preset upper bound of the semantic difference, which is 0.05 in this example; the parameter threshold is the preset upper bound of the change in the rule parameter, which is 0.02 in this example; when both conditions are met and maintained for multiple consecutive rounds, it is determined that the system has entered a steady state.

[0100] For example, the execution result of executable instruction C-2 is that the first piece of workstation A is confirmed to be successful. Within a 10-minute time window after its execution, the actual measured cycle time of workstation A is 28 pieces per hour, which is lower than the baseline of 30 pieces per hour. The actual working condition has not entered the state predicted by the instruction. Based on this, the semantic value of the actual state is determined to be 0.62. In the same period, there is another sample that has not been verified and is marked as pending. It will not participate in this iteration correction.

[0101] The prior state semantics of this timespace is 0.78, so the semantic difference is 0.62−0.78=−0.1600.

[0102] The update amount is determined according to the preset update step size of 0.50: the update step size of 0.50 is multiplied by the semantic difference of -0.1600, and then multiplied by the three components of the basis function vector of 1, 0.50 and 0.40 respectively, to obtain the update amounts of -0.080, -0.040 and -0.032; the rule parameters of this space are 0.20, 0.60 and 0.30, and its norm is 0.70. According to the upper limit of the update amplitude of 0.05×(1+0.70)=0.085, none of the three components exceed the limit, so they are directly superimposed, and the updated rule parameters are 0.120, 0.560 and 0.268.

[0103] The above process is then repeated round by round, with the semantic difference shrinking by 0.295 each round: in round 1, the semantic difference is -0.1600 and the change in rule parameters is 0.0950; in round 2, the semantic difference is -0.0472 and the change in rule parameters is 0.0280; in round 3, the semantic difference is -0.0139 and the change in rule parameters is 0.0083; in round 4, the semantic difference is -0.0041 and the change in rule parameters is 0.0024; and in round 5, the semantic difference is -0.0012 and the change in rule parameters is 0.0007.

[0104] Based on the difference threshold of 0.05 and the parameter threshold of 0.02: In the first round, neither of the two items is lower than the threshold; in the second round, the semantic difference is lower than the difference threshold, but the change in the rule parameter is still higher than the parameter threshold, so it is not included; in the third to fifth rounds, both items are lower than their respective thresholds for three consecutive rounds, and the iterative correction is determined to have entered a steady state.

[0105] Therefore, this step first determines the semantics of the measured state based on the execution result of the executable instruction and the measured state within the preset time window, and marks unverified samples as pending states and excludes them from iterative correction, thus solving the problem of self-verification loops caused by using the system's self-evaluation results as truth values; then, it takes the semantic difference between the measured state semantics and the prior state semantics, determines the update amount according to the update step size, and updates the rule parameters after limiting the amplitude, thus solving the problem that the rule jumps in adjacent time and space when the correction is made to the correct position all at once; finally, it uses the fact that the semantic difference is lower than the difference threshold for multiple consecutive rounds and the change in the rule parameters is lower than the parameter threshold for multiple consecutive rounds as the criterion, thus solving the problem of long-term parameter drift caused by continuous modification and the problem of declaring convergence simply because the semantic difference occasionally decreases, so that the time-space mapping rule can approximate the actual running state round by round based on the execution results.

[0106] S4: When the state of the target environment changes, identify the semantic differences between the state semantics before and after the update, and locally update the spatiotemporal mapping rules based on the semantic differences.

[0107] Environmental changes occur slowly, and are not apparent from a single execution result. Changes are only identified by comparing the distribution of state semantics within a statistical window. The main problems are as follows: First, the changes are gradual, and the semantic differences fluctuate around the threshold. Indiscriminate triggering and deactivation will cause the rules to be updated repeatedly.

[0108] Secondly, changes often only occur locally, while rules are configured at the whole layer. Once a change is detected, the entire layer is updated, which will also change the rules that have not yet caused problems.

[0109] Third, local updates leave a gap at the boundary of the affected domain, with two adjacent time spaces being one new and one old, resulting in two different interpretations of the instructions at the same time.

[0110] To this end, this step first compares the distribution of state semantics within adjacent statistical windows to obtain semantic differences, triggering with a first threshold and deactivating with a second threshold; then, it determines the influence domain formed by the difference center grid and its spatiotemporal neighborhood; subsequently, within the influence domain, it extrapolates the update amount by spatiotemporal distance decay, limits the update magnitude and structural change ratio, and resolves rule conflicts by sorting and resolving them according to version newness, weighted frequency, and confidence weight; finally, it assigns a version number for immediate effect, and arbitrates in-transit instructions according to the version number.

[0111] Step S4 in the method provided in this embodiment of the invention includes: Within adjacent statistical windows, the distribution of statistical state semantics is determined by a preset difference metric to identify the difference in distribution between adjacent statistical windows, which is then defined as the semantic difference between the state semantics before and after the update. When the semantic difference meets the preset triggering condition, it is determined that the state of the target environment has changed and a local update is triggered. The preset triggering condition is that the semantic difference exceeds the first threshold, and the local update is canceled when the semantic difference is lower than the second threshold. The first threshold is greater than the second threshold. Determine the influence domain corresponding to the semantic difference, wherein the influence domain includes the difference center grid and the corresponding spatiotemporal neighborhood, the difference center grid is the spatiotemporal space corresponding to the semantic difference, and the spatiotemporal neighborhood is composed of the spatiotemporal spaces adjacent to the difference center grid; The spatiotemporal mapping rules within the influence domain are locally updated.

[0112] Specifically, the statistical window is the time interval for statistically analyzing the distribution of state semantics. In this example, we take 8 hours for one shift and compare two adjacent statistical windows before and after.

[0113] The distribution of state semantics is the proportion of time space falling into each state semantic interval within the statistical window. In this example, the proportion is calculated separately for three intervals: normal production, catching up with the pace, and first piece debugging after model change.

[0114] The difference measure is a preset operation for measuring the difference between two distributions. In this example, it takes the average of the relative entropy of each distribution relative to its mean distribution.

[0115] Semantic difference is a quantity that represents the overall change in state semantics before and after the update, obtained by weighting the individual differences of each time space with individual cell weights. The larger the value, the more obvious the state change. Individual cell difference is the difference between the state semantic distributions within two adjacent statistical windows on a single time space.

[0116] The preset triggering conditions are the conditions that need to be met to determine if the state has changed. That is, when the semantic difference exceeds the first threshold, the local update is triggered, and when it is lower than the second threshold, the local update is canceled. In this example, the first threshold is 0.15 and the second threshold is 0.08. The first threshold is greater than the second threshold, and the interval between the two is the hysteresis interval.

[0117] The affected domain is a set of spatiotemporal spaces affected by this semantic difference, including the difference center grid and its corresponding spatiotemporal neighborhood.

[0118] The difference center grid is the spacetime corresponding to the semantic difference, and the spacetime neighborhood is the set of spacetimes adjacent to the difference center grid.

[0119] In this example, the adjacency of time and space is measured according to the differences in location properties, the neighborhood between physical locations is determined by physical topological distance, and the neighborhood between logical locations is determined by process topological path.

[0120] In this step, the distribution of state semantics on each timespace is first counted in two adjacent statistical windows. The difference in the distribution of the same timespace between the two windows is determined according to a preset difference metric, and the single-cell difference is obtained. The calculation formula is as follows:

[0121] Among them, the single-cell difference is the difference between the state semantic distributions of two adjacent statistical windows in a single time space; the front window distribution and the current window distribution are the state semantic distributions of the time space in the two statistical windows, respectively; the mean distribution is the distribution obtained by averaging the front window distribution and the current window distribution in each interval; and the relative entropy is a non-negative quantity that measures the difference between one distribution and another.

[0122] Then, the individual cell weights are obtained by normalizing the success frequency of verification for each time space, and the semantic differences are obtained by weighted summation of the individual cell differences using the individual cell weights. The calculation formula is as follows:

[0123] Among them, semantic difference is the measure of the overall change in semantics of the state before and after the update; single cell weight is the ratio of the successful verification frequency of that time cell to the sum of the successful verification frequencies of all time cells.

[0124] Furthermore, when the semantic difference exceeds the first threshold, the state of the target environment is determined to have changed, triggering a local update; when the semantic difference is below the second threshold, the local update is canceled. The calculation formula for the triggering condition is as follows:

[0125] The triggering condition is the condition that must be met to determine that the state of the target environment has changed; the first threshold is a preset upper bound of semantic difference, which is 0.15 in this example; the release condition is that the semantic difference is less than the second threshold, which is 0.08 in this example, and the first threshold is greater than the second threshold.

[0126] Furthermore, the influence domain corresponding to the semantic difference is determined, which consists of the difference center grid and the spatiotemporal neighborhood formed by the space-time spaces adjacent to the difference center grid.

[0127] Finally, the spatiotemporal mapping rules within the influence domain are locally updated.

[0128] Step S4 in the method provided in this embodiment of the invention further includes: The update amount of the spatiotemporal mapping rule within the spatiotemporal neighborhood is extrapolated at a decay rate based on the spatiotemporal distance, where the spatiotemporal distance includes the temporal distance obtained by time features and the positional distance obtained by position features. The update magnitude of the rule parameters of the spatiotemporal mapping rule and the proportion of changes in the rule structure are subject to amplitude constraints. When conflicts exist between spatiotemporal mapping rules, they are sorted and resolved according to version newness, weighted frequency and confidence weight. When the priorities are the same, the conservative instruction is taken. Assign a version number to the updated spacetime mapping rules and make them effective immediately; Among them, the executable instructions issued for execution carry the version number at the time of issuance, and the instructions in transit are arbitrated according to the version number.

[0129] The partial update process in this step is as follows: Figure 2 As shown.

[0130] More specifically, spatiotemporal distance is a measure of how close two spatiotemporal spaces are in time and space. It is the sum of the temporal distance obtained by time characteristics and the positional distance obtained by positional characteristics.

[0131] Decay extrapolation is an operation that applies the update amount of the difference center grid to the neighboring grid after continuously decaying it according to the spatiotemporal distance of the neighboring grids. The greater the distance, the smaller the update amount applied.

[0132] The amplitude constraint is two restrictions on the update range: one is the restriction on the update range of rule parameters, and the other is the restriction on the change ratio of rule structure. The rule structure is the combination of mapping conditions and state semantics in the spatiotemporal mapping rule, and its changes include the addition, deletion and modification of rules.

[0133] The sorting resolution process involves selecting the effective rule based on the resolution priority when there are conflicts between spatiotemporal mapping rules, with the rule with the highest priority taking effect.

[0134] Version newness refers to the newness of the rule version, with newer versions taking priority; weighted frequency is the frequency obtained by weighting the frequency information according to the execution results; confidence weight is the confidence level coefficient that comes with the spatiotemporal mapping rule.

[0135] Conservative instructions are those with lower execution risk. When two rules have the same resolution priority, the one with the corresponding conservative instruction is selected as the effective rule.

[0136] An in-transit instruction is an executable instruction that has been issued but not yet completed. It carries the version number at the time of issuance and is used to determine which part of the instruction will continue to be executed according to the original version and which part needs to be re-verified after the rule takes effect immediately.

[0137] Furthermore, the update amount of the spatiotemporal mapping rules within the spatiotemporal neighborhood is extrapolated using spatiotemporal distance decay. This involves first calculating the spatiotemporal distance between the difference center grid and neighboring grids, then calculating the decay coefficient based on the spatiotemporal distance, and finally multiplying the update amount of the difference center grid by the decay coefficient to obtain the update amount of the neighboring grids. Here, the spatiotemporal distance is the sum of the temporal distance and the positional distance. The temporal distance is determined by the interval between the stage phase and the periodic phase, the positional distance is determined by the topological distance between execution coordinates, the distance between physical locations is measured by physical topological distance, and the distance between logical locations is measured by the process topological path. The formula for calculating the decay coefficient is:

[0138] Among them, the decay coefficient is a coefficient that continuously decays the update amount according to the distance, and the value is between 0 and 1, and the value is smaller as the distance is greater; the spatiotemporal distance is the measure of the proximity of the difference center grid and the neighboring grid in time and location; the decay scale is a preset constant, which is 2 in this example; the natural constant is a constant with a value of approximately 2.71828.

[0139] The update amount of the neighboring grid is the product of the decay coefficient and the update amount of the difference center grid, and its calculation formula is:

[0140] Among them, the update amount of the neighborhood grid is the correction amount of the rule parameters applied to the spatiotemporal mapping rule of the neighborhood grid; the update amount of the difference center grid is the update amount applied to the difference center grid according to the semantic difference, and each component is first limited according to the upper limit of the update amplitude.

[0141] Furthermore, the update range of rule parameters is constrained by the aforementioned upper limit of update range, and the change ratio of rule structure is constrained by the ratio of the number of rules updated this time to the total number of rules in the rule sub-layer; neither of these may exceed their respective preset upper limits. The formula for calculating the change ratio of rule structure is:

[0142] The rule structure change ratio is the proportion of the number of rules modified in this update to the total number of rules in the rule sub-layer; the upper limit of the ratio is a preset upper limit of the change ratio, which is 0.20 in this example.

[0143] Furthermore, when conflicts exist between time-space mapping rules, the resolution priority is determined by the weighted sum of version newness, weighted frequency, and confidence weight. The rule with the highest priority takes effect; if priorities are the same, the conservative instruction is used. The formula for calculating the resolution priority is:

[0144] Among them, resolution priority is the sorting criterion for determining which rule takes effect when there is a rule conflict; weighted frequency is the value of the weighted frequency of the space where the rule is located after normalization according to the reference frequency, which is a preset constant, and is 10 in this example; version newness coefficient, weighted frequency coefficient and confidence weight coefficient are the weight coefficients of the three respectively, and are 0.40, 0.35 and 0.25 respectively in this example.

[0145] Finally, the updated spatiotemporal mapping rules are assigned a new version number and take effect immediately; the executable instructions issued for execution carry the version number at the time of issuance, and the processing method for the executed and unexecuted parts of the instructions in transit is determined according to the version number.

[0146] Step S4 in the method provided in this embodiment of the invention further includes: In weighted statistics, the frequency of successfully validated samples is increased positively, the frequency of unvalidated samples is decreased by double, and samples that are not validated are not included in the weighted statistics. When the frequency is lower than the preset frequency threshold, it will revert to the default rule and require manual confirmation. If at least one of the following conditions exists: iterative correction fails to converge or semantic difference is abnormal, freeze the local update and iterative correction, and roll back to the previous version of the spatiotemporal mapping rule.

[0147] More specifically, weighted statistics are statistics that weight frequency information according to the verification status of the execution results. Samples that are successfully verified will increase the frequency positively, samples that fail to be verified will decrease the frequency by a factor of two, and samples that are not verified will not be included.

[0148] The frequency threshold is the lower limit of the frequency information; in this example, it is set to 2.00. When the frequency is lower than this threshold, the spatiotemporal mapping rule for that time space will no longer be effective, and it will revert to the default rule and be converted to manual confirmation.

[0149] The default rule is a general rule that is used when the spatiotemporal mapping rule is missing or invalid. It does not distinguish between specific spatiotemporal spaces and only gives conservative instructions.

[0150] Freeze is to pause the local update and iterative correction process, and rollback is to restore the spatiotemporal mapping rules to the previous version. Both are enabled when the iterative correction fails to converge or the semantic difference is abnormal. The iterative correction fails to converge because the iterative correction has not entered the aforementioned steady state, and the semantic difference is abnormal because the semantic difference exceeds the preset abnormal threshold. In this example, the abnormal threshold is three times the first threshold, i.e., 0.15 × 3 = 0.45.

[0151] Furthermore, in the weighted statistics, the frequency of successfully validated samples is increased positively, the frequency of unvalidated samples is decreased by double, and unvalidated samples are not included.

[0152] Furthermore, when the frequency is lower than the preset frequency threshold, it reverts to the default rule and requires manual confirmation.

[0153] Finally, if at least one of the following situations occurs: iterative correction fails to converge or semantic difference is abnormal, the local update and iterative correction are frozen, and the previous version of the spatiotemporal mapping rule is rolled back.

[0154] For example, taking workstation A, middle shift, and cycle phase 3 of the assembly line as an example, we denote it as the difference center cell. The distribution of state semantics in the previous statistical window is normal production 0.60, cycle time catch-up 0.30, and first piece debugging after changeover 0.10. The distribution in this statistical window is normal production 0.10, cycle time catch-up 0.25, and first piece debugging after changeover 0.65.

[0155] Based on the difference metric, the mean distributions of the two distributions are 0.35 for normal production, 0.275 for catching up with the cycle time, and 0.375 for the first piece test after model change. The relative entropy of the front window distribution relative to the mean distribution is 0.21733, and the relative entropy of the local window distribution relative to the mean distribution is 0.20843. Therefore, the difference per cell is the average of the two, which is 0.213.

[0156] The cell weights were obtained by normalizing the verification success frequency of each time zone: the verification success frequency of the difference center cell was 24.0 and the cell weight was 0.60; the verification success frequency of workstation A, middle shift, and beat phase 4 was 10.0 and the cell weight was 0.25; and the verification success frequency of workstation B, middle shift, and beat phase 3 was 6.0 and the cell weight was 0.15.

[0157] The sum of the successful verification frequencies of the three is 40.0, and the sum of the individual cell weights is 1.00. The semantic difference is calculated by summing the products of the individual cell weights and the individual cell differences: 0.60×0.213+0.25×0.086+0.15×0.040=0.1278+0.0215+0.0060=0.1553.

[0158] Based on the first threshold of 0.15, the semantic difference of 0.1553 is greater than the first threshold, indicating that the state of the target environment has changed and triggering a local update. The influence domain of this time space is the difference center grid and its spatiotemporal neighborhood. The spatiotemporal neighborhood includes three adjacent time spaces: workstation A, middle shift, and beat phase 2; workstation A, middle shift, and beat phase 4; and workstation B, middle shift, and beat phase 3.

[0159] The update values ​​for the difference center grid are 0.0960, 0.0480, and 0.0384; the norm of its rule parameter is 0.6323. Based on the upper limit of the update amplitude of 0.05×(1+0.6323)=0.0816, the first component 0.0960 exceeds the upper limit, so the value of 0.0816 is taken as the upper limit. The other two components do not exceed the limit, so the update values ​​after amplitude limiting are 0.0816, 0.0480, and 0.0384.

[0160] The update amount within the spatiotemporal neighborhood is extrapolated by attenuation based on spatiotemporal distance. Taking workstation A, the middle shift, and the beat phase 4 as an example, its time distance from the difference center grid is 1, its position distance is 0, its spatiotemporal distance is 1, and its attenuation coefficient is 0.607. Therefore, its update amount is the product of 0.607 and the update amount after limiting, which is 0.0495, 0.0291, and 0.0233.

[0161] The spatiotemporal distance between workstation A, mid-shift, and beat phase 2 and workstation B, mid-shift, and beat phase 3 is 1, and the update amount is the same as the former; the norms of the rule parameters of the three neighboring grids are 0.6832, 0.6678, and 0.6086, respectively, and the corresponding upper limits of the update amplitude are 0.0842, 0.0834, and 0.0804, respectively. None of the three update amounts exceed the limits.

[0162] The change ratio of the rule structure is calculated as the ratio of the number of rules updated in this update to the total number of rules in the rule sub-layer. This update includes 4 rules and 48 rules in the rule sub-layer, so the change ratio is 4 ÷ 48 = 0.0833, which does not exceed the preset ratio limit of 0.20.

[0163] The resolution of conflicts between rules is illustrated by two rules. The updated difference center grid rule has a version newness of 1.00, a weighted frequency of 8.38, which becomes 0.84 after normalization to the reference frequency of 10, and a confidence weight of 0.90. The resolution priority is calculated by weighting the version newness coefficient (0.40), the weighted frequency coefficient (0.35), and the confidence weight coefficient (0.25), resulting in a resolution priority of 0.40 × 1.00 + 0.35 × 0.84 + 0.25 × 0.90 = 0.919.

[0164] Another conflicting rule covers beat phases 2 to 4, with a version newness of 0.30, a weighted frequency of 0.40, a confidence weight of 0.80, and a resolution priority of 0.40×0.30+0.35×0.40+0.25×0.80=0.460; the former has a higher priority, so the updated difference center grid rule takes effect.

[0165] In another set of conflicts, the resolution priority of the two rules is exactly the same at 0.610. In this case, the rule corresponding to the conservative instruction is selected as the effective rule.

[0166] The version number and in-transit instructions are handled as follows: the updated spacetime mapping rules are assigned version number 4 and take effect immediately at 14:35:00.

[0167] The executable instruction C-2 was issued at 14:20:00 with version number 3. Its execution period is from 14:20:00 to 14:30:00, which is earlier than the update time. Therefore, it was executed according to version number 3.

[0168] Executable instruction C-4 was issued at 14:28:00 with version number 3. Its execution interval is from 14:28:00 to 14:48:00, which spans the update time. Therefore, the part from 14:28:00 to 14:35:00 is executed according to version number 3, while the part from 14:35:00 to 14:48:00 is intercepted and re-verified by the rules of version number 4.

[0169] In the weighted frequency statistics, the previous round weighted frequency of the first piece confirmation instruction at workstation A, the middle shift, and the beat phase 3 was 8.20. This round of verification was successful. Based on the forgetting factor of 0.90 and the success increment of 1, the weighted frequency of this round is 0.90 × 8.20 + 1 = 8.38.

[0170] The weighted frequency of the release instruction in the previous round for workstation B, middle shift, and beat phase 3 was 6.40. The verification failed in this round. Calculated according to the failure penalty multiplier of 2, the weighted frequency of this round is 0.90×6.40−2=3.76, which is still higher than the frequency threshold of 2.00. Therefore, the rule continues to be effective.

[0171] In addition, the weighted frequency of the first piece confirmation instruction in the previous round for workstation B, middle shift, and beat phase 4 was 4.50. Since it was not verified in this round, it is neither weighted nor deweighted. The weighted frequency in this round is 0.90 × 4.50 = 4.05.

[0172] In contrast, the weighted frequency of the other space is 1.60, which is lower than the frequency threshold of 2.00. Therefore, its spacetime mapping rule is no longer effective, and it reverts to the default rule and is subject to manual confirmation.

[0173] Another set of data has a semantic difference of 0.680, which exceeds the first threshold of 0.45 used for anomaly detection. Therefore, the local update and iterative correction are frozen, and the system is rolled back to the previous version 3 of the spatiotemporal mapping rule.

[0174] Therefore, this step first statistically analyzes the distribution of semantic states within adjacent statistical windows and uses the difference measure to obtain semantic differences. It then triggers with a first threshold and deactivates with a second threshold, solving the problem of repeated rule updates and rollbacks caused by jitter near the threshold when changes are gradual. Next, it determines the influence domain composed of the difference center grid and its spatiotemporal neighborhood, solving the problem of updating the entire layer and modifying rules that have not yet caused problems when changes are detected. Subsequently, it extrapolates the changes within the influence domain by spatiotemporal distance decay and limits both the update amplitude and the proportion of rule structure changes. It also resolves rule conflicts by sorting and resolving them according to version newness, weighted frequency, and confidence weight, solving the problem of inconsistent definitions between old and new rules at the boundary of the influence domain and uncertain distribution results. Finally, it assigns a new version number and makes it effective immediately, arbitrates in-transit instructions by version number, rolls back the default rules for those with a frequency below the threshold, and freezes and rolls back those that do not converge or have abnormal semantic differences. This ensures that local updates can keep up with the slow changes in the environment without destroying the already stable and usable parts.

[0175] S5: Record the iteration log of iterative correction and local update, and update the spatiotemporal mapping rules based on the iteration log.

[0176] Iterative corrections and local updates modify the spatiotemporal mapping rules with each iteration. Since these modifications leave no trace, they are impossible to track, and errors cannot be reverted to previous versions. The main problems are as follows: First, logs cannot be used merely as archives: they are the only source of frequency information, and rolling statistics can only be provided by logs. If the logs are incomplete, the frequency will be distorted.

[0177] Secondly, the frequency is directly accumulated based on the number of times the instruction occurs. The more verified instructions are generated, the higher the frequency will be, and the easier it is to generate the higher the frequency, forming a positive feedback loop that causes the frequency to deviate from the actual effectiveness of the instruction.

[0178] Third, frequency information is used in multiple places. It is used as a threshold for rule building, as the weight of individual cells during local updates, and as the sorting basis for resolving rule conflicts. If the feedback path is not unique, the frequency obtained in different places will be inconsistent.

[0179] Therefore, this step first records the iteration log of iterative correction and local update, including trigger information, update content and execution results; then, based on the log, the frequency information is weighted and statistically analyzed according to the execution results, so that the frequency increases or decreases according to the correctness of the verification rather than accumulating according to the number of occurrences; finally, the frequency information is fed back to the establishment of spatiotemporal mapping rules and local updates.

[0180] Step S5 in the method provided in this embodiment of the invention includes: Record the iteration log for iterative correction and local updates. The iteration log includes trigger information, update content and execution results. Based on the iteration log, the frequency information is weighted and statistically analyzed according to the execution results. The frequency information is used to represent the frequency of historical instructions occurring at the corresponding position of the position feature. Frequency information is fed back to the establishment and local updates of spatiotemporal mapping rules.

[0181] Specifically, the iteration log records each iteration correction and each local update in chronological order. Each record includes three items: trigger information, update content, and execution result.

[0182] The trigger information is the cause of this update. In this example, it is divided into two categories: one triggered by semantic differences from iterative correction and the other triggered by semantic differences from local updates.

[0183] The update details the changes made in this update, including the altered spatiotemporal mapping rules, the amount of change in rule parameters, and the changes in rule structure.

[0184] The execution result is the execution and verification status of the instructions issued after this update. This example is divided into three categories: successful verification, failed verification, and no verification.

[0185] Weighted statistics are statistics that weight frequency information according to the execution results. They are from the same source as the weighted frequency mentioned above and are carried out in a rolling manner.

[0186] The forgetting factor is a coefficient that causes previous statistics to decay naturally with each round. It takes a value between 0 and 1, and in this example, it is 0.90.

[0187] The execution result weight is an increment determined by the verification status of the execution result. In this example, 1 is used for successful verification, the negative value of the failure penalty multiplier is used for failed verification, 0 is used for no verification, and the failure penalty multiplier is 2.

[0188] The feedback involves sending the frequency information obtained from the weighted statistics back to the processing of both the establishment of the spatiotemporal mapping rules and the local update, so that the establishment of the rules has a frequency threshold to follow and the local update has a single cell weight available.

[0189] In this step, the iteration logs for iterative correction and local updates are first recorded in chronological order. Each record contains trigger information, update content, and execution result.

[0190] Furthermore, based on the iteration logs and the frequency information is weighted and statistically analyzed according to the execution results, the weighted frequency for each round is obtained, and its calculation formula is as follows:

[0191] Among them, the weighted frequency of this round and the weighted frequency of the previous round are the weighted frequencies obtained from the current and previous statistics, respectively; the forgetting factor is a preset coefficient to allow the previous statistics to decay naturally; and the execution result weight is the increment determined by the verification status of the execution result of this round.

[0192] Finally, the frequency information is fed back to the establishment and local update of the spatiotemporal mapping rules, so that the rule establishment can determine whether the rule establishment frequency threshold has been reached, and the local update can determine the cell weight of each spatiotemporal space based on it.

[0193] For example, consider an iterative log record generated after this local update for workstation A, shift 3, and beat phase 3 at the difference center grid. Its trigger information is that the semantic difference of 0.1553 exceeds the first threshold of 0.15.

[0194] The update content includes the rule parameters of four spatiotemporal mapping rules, including the difference center grid and three spatiotemporal neighbor grids. The update amounts of the center grid after amplitude limiting are 0.0816, 0.0480, and 0.0384, and the update amounts of the neighbor grids are 0.0495, 0.0291, and 0.0233. The change ratio of the rule structure is 0.0833. The execution result is that all executable instructions issued after the update have been executed successfully.

[0195] The weighted frequency of the first confirmation instruction in this time space in the previous round was 8.20. Calculated with a forgetting factor of 0.90 and an execution result weight of 1, the weighted frequency in this round is 0.90 × 8.20 + 1 = 8.38.

[0196] In contrast, another instruction in the same cell failed verification in this round, and its execution result weight is the negative of the failure penalty multiplier 2, i.e., -2. Therefore, the weighted frequency in this round is calculated as 0.90 multiplied by the weighted frequency of the previous round minus 2. The first confirmation instruction in another cell was not verified in this round, and its execution result weight is 0. Therefore, the weighted frequency in this round is only the product of the weighted frequency of the previous round and the forgetting factor.

[0197] The feedback is in two parts. First, the weighted frequency of this timespace (8.38) is not lower than the rule creation frequency threshold of 5.00, so its spatiotemporal mapping rule continues to be established and takes effect. Second, the weighted frequency of this timespace, after being normalized to the reference frequency of 10, is 0.84, which is used as the value of the weighted frequency item in the resolution priority and participates in the sorting and resolution when rule conflicts occur.

[0198] In contrast, the weighted frequency of the other space was 1.60, which is lower than the frequency threshold of 2.00. Therefore, its spacetime mapping rule no longer applies, and it reverts to the default rule and requires manual confirmation.

[0199] Therefore, this step first records the iteration logs of iterative correction and local updates in chronological order. Each record contains trigger information, update content, and execution result, which solves the problems of rule changes leaving no trace, being untraceable, and being unable to roll back. Then, based on the logs, the frequency information is weighted and statistically analyzed according to the execution result, so that the frequency increases or decreases according to the correctness of the verification, the failure of verification is doubled, and those that are not verified are not included. This solves the positive feedback problem that accumulating the number of occurrences will cause the verification-passed instructions to be generated more and more frequently.

[0200] Finally, the frequency information is fed back to the establishment and local update of the spatiotemporal mapping rules, so that the threshold determination of rule establishment, the single cell weight of local update and the sorting of rule conflict resolution take the same frequency, which solves the problem that the feedback path is not unique and the frequency taken in each place is different when used in multiple places.

[0201] Through the specific implementation methods described above, the embodiments of the present invention achieve the following technical effects: In summary, this embodiment first obtains the time and location features of the target environment and determines the state semantics. The location features are represented by execution coordinates, and the time features are represented by absolute time, stage phase, and periodic phase. Frequency information is determined according to the frequency of historical instructions occurring on the coordinates. Then, the mapping conditions are defined using the three, and spatiotemporal mapping rules between them and the state semantics are established. Confidence weight, validity period, and version number are configured for each rule, and it is configured as an independently updatable rule sub-layer in the knowledge base. Subsequently, candidate instructions are generated using real-time state semantics, and compliance, preconditions, and security interlocks are checked sequentially according to the spatiotemporal mapping rules. If any one fails, the instruction is pruned and manually confirmed. Those that pass are determined as executable instructions and issued.

[0202] Furthermore, in this embodiment, the spatiotemporal mapping rules are iteratively corrected based on the execution results: the semantics of the measured state are determined according to the execution results and the measured state within the preset time window, and those not verified are marked as pending and do not participate; the semantic difference between the measured and prior is taken, the update amount is determined according to the update step size, and the rule parameters are updated after being limited by the upper limit of the update amplitude. When the semantic difference and the change in the rule parameters are lower than their respective thresholds for several consecutive rounds, the system enters a steady state, and the subsequent correction frequency of this spatiotemporal space decreases accordingly.

[0203] Furthermore, this embodiment compares the distribution of state semantics within adjacent statistical windows, determines semantic differences using difference measurement, triggers local updates when the difference exceeds a first threshold, and cancels updates when the difference falls below a second threshold; extrapolates the changes in influence domain formed by the difference center grid and its spatiotemporal neighborhood according to spatiotemporal distance decay, and limits the changes in update magnitude and rule structure ratio. When rules conflict, they are resolved by sorting and resolving based on version newness, weighted frequency, and confidence weight. When priorities are the same, conservative instructions are selected. Finally, a new version number is assigned and takes effect immediately. In-transit instructions are arbitrated according to the version number.

[0204] Furthermore, this embodiment records the iteration logs of iterative correction and local updates in chronological order. Each record contains trigger information, update content, and execution result. Based on the logs, the frequency information is weighted and statistically analyzed according to the execution result. Successful verifications are positively increased, unverified verifications are doubled and decreased, and those not verified are not included. This frequency information is simultaneously fed back to the rule establishment, the single cell weight during local updates, and the sorting of rule conflicts, so that the same frequency is obtained from all three places.

[0205] In this embodiment, frequency information serves as the frequency threshold for rule building, the frequency prior bias for state semantic estimation, the single-cell weight when summarizing semantic differences, and the sorting basis for rule conflict resolution. It is the suture point of the closed loop of this solution. The rule sub-layer and the business rule body are independent of each other, so that local updates do not affect the business rule body. The dual limit of update magnitude and rule structure change ratio, as well as the freeze and rollback when iterative correction does not converge or semantic differences are abnormal, ensure that the rules are neither out of control nor stagnant in long-term operation.

[0206] Example 2, as Figure 3 As shown, based on the inventive concept of a knowledge rule-driven automatic executable instruction generation method provided in Embodiment 1, the present invention also provides a knowledge rule-driven automatic executable instruction generation device, specifically including: Rule building module 11 is used to obtain the time and location features of the target environment and determine the state semantics, establish spatiotemporal mapping rules between time features, location features and state semantics, and configure the spatiotemporal mapping rules in the knowledge base; Instruction generation module 12 is used to generate and verify executable instructions based on real-time acquired state semantics and spatiotemporal mapping rules, and to issue the verified executable instructions for execution. The iterative correction module 13 is used to iteratively correct the spatiotemporal mapping rules based on the execution results of the executable instructions; The local update module 14 is used to identify the semantic differences between the state semantics before and after the update when the state of the target environment changes, and to locally update the spatiotemporal mapping rules based on the semantic differences. The log feedback module 15 is used to record the iteration logs of iterative correction and local updates, and to update the spatiotemporal mapping rules based on the iteration logs.

[0207] In one embodiment, the rule building module 11 is further configured to: Acquire the temporal and positional characteristics of the target environment, where the temporal characteristics include absolute time, phase phase, and periodic phase; The location features are characterized as execution coordinates used to indicate the point where the command lands, where the execution coordinates include the physical location in the real scene and the logical location in the virtual scene; Based on time features, execution coordinates, and frequency information, state semantics are determined. Frequency information is used to characterize the frequency of historical instructions occurring at the execution coordinates, and the frequency information is obtained from the rolling statistics of the iteration log.

[0208] Furthermore, the rule building module 11 is also used for: Based on time characteristics, execution coordinates and frequency information, mapping conditions are defined, and spatiotemporal mapping rules between mapping conditions and state semantics are established; Configure a confidence weight, validity period, and version number for each spatiotemporal mapping rule; Configure the spatiotemporal mapping rules as independently updated rule sub-layers in the knowledge base, where the spatiotemporal mapping rules contain correctable rule parameters.

[0209] In one embodiment, the instruction generation module 12 is further configured to: Real-time acquisition of state semantics, and using state semantics as generation conditions to generate candidate instructions based on the knowledge base; Candidate instructions are verified according to the spatiotemporal mapping rules. The verification includes spatiotemporal mapping rule compliance verification, precondition verification and security interlock verification, which are executed sequentially. Candidate instructions that fail any verification are pruned and transferred to manual confirmation. Candidate instructions that pass the verification are identified as executable instructions, and the executable instructions are then sent for execution.

[0210] In one embodiment, the iterative correction module 13 is further configured to: Based on the execution result of the executable instruction, the semantics of the measured state are determined. The semantics of the measured state are determined by the execution result and the measured state within a preset time window. Unverified samples are marked as pending states and do not participate in iterative correction. Obtain the semantic difference between the measured state semantics and the prior state semantics corresponding to the spatiotemporal mapping rule; The update amount is determined based on the semantic difference and the preset update step size, and the rule parameters of the spatiotemporal mapping rule are updated after the update amount is limited. Specifically, when the semantic difference is lower than the preset difference threshold for multiple consecutive rounds, and the change in the rule parameters is lower than the preset parameter threshold for multiple consecutive rounds, it is determined that the iterative correction has entered a steady state.

[0211] In one embodiment, the local update module 14 is further configured to: Within adjacent statistical windows, the distribution of statistical state semantics is determined by a preset difference metric to identify the difference in distribution between adjacent statistical windows, which is then defined as the semantic difference between the state semantics before and after the update. When the semantic difference meets the preset triggering condition, it is determined that the state of the target environment has changed and a local update is triggered. The preset triggering condition is that the semantic difference exceeds the first threshold, and the local update is canceled when the semantic difference is lower than the second threshold. The first threshold is greater than the second threshold. Determine the influence domain corresponding to the semantic difference, wherein the influence domain includes the difference center grid and the corresponding spatiotemporal neighborhood, the difference center grid is the spatiotemporal space corresponding to the semantic difference, and the spatiotemporal neighborhood is composed of the spatiotemporal spaces adjacent to the difference center grid; The spatiotemporal mapping rules within the influence domain are locally updated.

[0212] Furthermore, the partial update module 14 is also used for: The update amount of the spatiotemporal mapping rule within the spatiotemporal neighborhood is extrapolated at a decay rate based on the spatiotemporal distance, where the spatiotemporal distance includes the temporal distance obtained by time features and the positional distance obtained by position features. The update magnitude of the rule parameters of the spatiotemporal mapping rule and the proportion of changes in the rule structure are subject to amplitude constraints. When conflicts exist between spatiotemporal mapping rules, they are sorted and resolved according to version newness, weighted frequency and confidence weight. When the priorities are the same, the conservative instruction is taken. Assign a version number to the updated spacetime mapping rules and make them effective immediately; Among them, the executable instructions issued for execution carry the version number at the time of issuance, and the instructions in transit are arbitrated according to the version number.

[0213] Furthermore, the partial update module 14 is also used for: In weighted statistics, the frequency of successfully validated samples is increased positively, the frequency of unvalidated samples is decreased by double, and samples that are not validated are not included in the weighted statistics. When the frequency is lower than the preset frequency threshold, it will revert to the default rule and require manual confirmation. If at least one of the following conditions exists: iterative correction fails to converge or semantic difference is abnormal, freeze the local update and iterative correction, and roll back to the previous version of the spatiotemporal mapping rule.

[0214] In one embodiment, the log feedback module 15 is further configured to: Record the iteration log for iterative correction and local updates. The iteration log includes trigger information, update content and execution results. Based on the iteration log, the frequency information is weighted and statistically analyzed according to the execution results. The frequency information is used to represent the frequency of historical instructions occurring at the corresponding position of the position feature. Frequency information is fed back to the establishment and local updates of spatiotemporal mapping rules.

[0215] This invention provides a knowledge rule-driven automatic executable instruction generation device that can be applied to the automatic generation and issuance of instructions in environments such as production lines, control systems, and business platforms. It can be integrated into manufacturing execution systems or process management platforms. Before issuing instructions, it collects time and location features and determines state semantics, maintains spatiotemporal mapping rules in the knowledge base, generates and verifies executable instructions, and iteratively corrects and locally updates the spatiotemporal mapping rules according to the execution results after the instructions are executed.

[0216] This invention provides a knowledge-rule-driven automatic executable instruction generation device. It uses execution coordinates to represent positional features, absolute time, stage phase, and periodic phase to represent temporal features and determine state semantics accordingly. It establishes an independently updatable spatiotemporal mapping rule sub-layer, employs triple verification to ensure spatiotemporal compliance and security of instructions, and uses iterative correction based on execution results, local updates within the influence domain based on semantic differences, and closed-loop feedback of rules using frequency information weighted by iterative logs. This ensures that instructions continuously adapt to the actual operating state during long-term operation, reducing the workload of manual rule modification and preventing instructions from becoming disconnected from the field after environmental changes. For specific implementation details of this invention, please refer to Embodiment 1.

[0217] It should be noted that the order of the embodiments in this invention is merely for descriptive purposes and does not represent the superiority or inferiority of the embodiments. Specific embodiments of the present invention have been described above. Furthermore, the processes depicted in the accompanying drawings do not necessarily require a specific or sequential order to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.

Claims

1. A knowledge rule-driven method for automatically generating executable instructions, characterized in that, include: S1: Obtain the time and location features of the target environment and determine the state semantics, establish the spatiotemporal mapping rules between the time features, the location features and the state semantics, and configure the spatiotemporal mapping rules in the knowledge base; S2: Generate and verify executable instructions based on the real-time acquired state semantics and the spatiotemporal mapping rules, and send the verified executable instructions for execution; S3: Iteratively correct the spatiotemporal mapping rule based on the execution result of the executable instruction; S4: When the state of the target environment changes, identify the semantic differences between the state semantics before and after the update, and locally update the spatiotemporal mapping rules based on the semantic differences; S5: Record the iteration log of the iterative correction and the local update, and update the spatiotemporal mapping rule based on the iteration log.

2. The knowledge rule-driven automatic executable instruction generation method as described in claim 1, characterized in that, Obtain the temporal and locational features of the target environment and determine its state semantics, including: Acquire the temporal and positional characteristics of the target environment, wherein the temporal characteristics include absolute time, phase phase, and periodic phase; The location feature is characterized as execution coordinates for indicating the point where the instruction lands, wherein the execution coordinates include the physical location in the real scene and the logical location in the virtual scene; Based on the time characteristics, the execution coordinates, and the frequency information, the state semantics are determined, wherein the frequency information is used to characterize the frequency of historical instructions occurring at the execution coordinates, and the frequency information is obtained by the rolling statistics of the iteration log.

3. The knowledge rule-driven automatic generation method for executable instructions as described in claim 2, characterized in that, Establishing spatiotemporal mapping rules between the time features, the location features, and the state semantics, and configuring the spatiotemporal mapping rules in the knowledge base, including: Based on the time characteristics, the execution coordinates, and the frequency information, mapping conditions are defined, and spatiotemporal mapping rules between the mapping conditions and the state semantics are established. Configure a confidence weight, validity period, and version number for each spatiotemporal mapping rule; The spatiotemporal mapping rule is configured as an independently updated rule sub-layer in the knowledge base, wherein the spatiotemporal mapping rule contains correctable rule parameters.

4. The knowledge rule-driven automatic generation method for executable instructions as described in claim 1, characterized in that, Based on the real-time acquired state semantics and the spatiotemporal mapping rules, executable instructions are generated and verified, and those that pass verification are sent out for execution, including: The state semantics are acquired in real time, and candidate instructions are generated based on the knowledge base using the state semantics as generation conditions. The candidate instructions are verified according to the spatiotemporal mapping rules. The verification includes spatiotemporal mapping rule compliance verification, precondition verification and security interlock verification executed sequentially. Any candidate instruction that fails any verification is pruned and transferred to manual confirmation. The candidate instruction that passes the verification is determined as the executable instruction, and the executable instruction is sent for execution.

5. The knowledge rule-driven automatic generation method for executable instructions as described in claim 1, characterized in that, The spatiotemporal mapping rule is iteratively corrected based on the execution result of the executable instruction, including: Based on the execution result of the executable instruction, the semantics of the measured state are determined, wherein the semantics of the measured state are determined by the execution result and the measured state within a preset time window, and unverified samples are marked as pending states and do not participate in the iterative correction; Obtain the semantic difference between the measured state semantics and the prior state semantics corresponding to the spatiotemporal mapping rule; The update amount is determined based on the semantic difference and the preset update step size, and the rule parameters of the spatiotemporal mapping rule are updated after the update amount is limited. Specifically, when the semantic difference is lower than a preset difference threshold for multiple consecutive rounds, and the change in the rule parameter is lower than a preset parameter threshold for multiple consecutive rounds, the iterative correction is determined to have entered a steady state.

6. The knowledge rule-driven automatic executable instruction generation method as described in claim 1, characterized in that, When the state of the target environment changes, the semantic differences between the state semantics before and after the update are identified, and the spatiotemporal mapping rules are locally updated based on the semantic differences, including: Within adjacent statistical windows, the distribution of the state semantics is statistically analyzed, and the difference between the distributions between adjacent statistical windows is determined according to a preset difference metric, which is then identified as the semantic difference between the state semantics before and after the update. When the semantic difference meets a preset triggering condition, it is determined that the state of the target environment has changed and the local update is triggered. The preset triggering condition is that the semantic difference exceeds a first threshold, and the local update is canceled when the semantic difference is lower than a second threshold, wherein the first threshold is greater than the second threshold. Determine the influence domain corresponding to the semantic difference, wherein the influence domain includes a difference center grid and a corresponding spatiotemporal neighborhood, the difference center grid is a spatiotemporal space corresponding to the semantic difference, and the spatiotemporal neighborhood is composed of spatiotemporal spaces adjacent to the difference center grid; The spatiotemporal mapping rules within the influence domain are locally updated.

7. The knowledge rule-driven automatic generation method for executable instructions as described in claim 1, characterized in that, Recording the iteration log of the iterative correction and the local update, and updating the spatiotemporal mapping rule based on the iteration log, including: Record the iteration log of the iterative correction and the local update, wherein the iteration log includes trigger information, update content and execution result; Based on the iteration log, the frequency information is weighted and statistically analyzed according to the execution results, wherein the frequency information is used to characterize the frequency of historical instructions occurring at the position corresponding to the position feature; The frequency information is fed back to the establishment of the spatiotemporal mapping rules and the local update.

8. The knowledge rule-driven automatic generation method for executable instructions as described in claim 6, characterized in that, Local updates to the spatiotemporal mapping rules within the influence domain also include: The update amount of the spatiotemporal mapping rule within the spatiotemporal neighborhood is extrapolated attenuated according to the spatiotemporal distance, wherein the spatiotemporal distance includes the time distance obtained according to the time feature and the positional distance obtained according to the position feature; The update magnitude of the rule parameters of the spatiotemporal mapping rule and the change ratio of the rule structure are subject to amplitude limiting constraints. When conflicts exist among the spatiotemporal mapping rules, they are sorted and resolved according to version newness, weighted frequency and confidence weight. If the priorities are the same, the conservative instruction is taken. Assign a version number to the updated spatiotemporal mapping rules and make them effective immediately; The executable instructions issued for execution carry a version number at the time of issuance, and instructions in transit are arbitrated according to the version number.

9. The knowledge rule-driven automatic generation method for executable instructions as described in claim 8, characterized in that, Also includes: In weighted statistics, the frequency of successfully validated samples is increased positively, the frequency of unvalidated samples is decreased by double, and samples that are not validated are not included in the weighted statistics. When the frequency is lower than the preset frequency threshold, it will revert to the default rule and require manual confirmation. If at least one of the following situations exists: the iterative correction fails to converge or the semantic difference is abnormal, the local update and iterative correction are frozen, and the process is rolled back to the previous version of the spatiotemporal mapping rule.

10. A knowledge rule-driven executable instruction automatic generation device, characterized in that, The apparatus is used to execute the knowledge rule-driven automatic generation method for executable instructions according to any one of claims 1 to 9, the apparatus comprising: The rule building module is used to acquire the time and location features of the target environment and determine the state semantics, establish spatiotemporal mapping rules between the time features, the location features and the state semantics, and configure the spatiotemporal mapping rules in the knowledge base; The instruction generation module is used to generate and verify executable instructions based on the real-time acquired state semantics and the spatiotemporal mapping rules, and to issue the verified executable instructions for execution. An iterative correction module is used to iteratively correct the spatiotemporal mapping rules based on the execution result of the executable instructions; The local update module is used to identify the semantic differences between the state semantics before and after the update when the state of the target environment changes, and to locally update the spatiotemporal mapping rules based on the semantic differences. The log feedback module is used to record the iteration log of the iterative correction and the local update, and to update the spatiotemporal mapping rule based on the iteration log.