Rule-based semantic search controlled device restriction method, apparatus and device

CN122240815BActive Publication Date: 2026-09-25CITIC-PRUDENTIAL LIFE INSURANCE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202610415235.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-03-31
Publication Date
2026-09-25
Estimated Expiration
2046-03-31

AI Technical Summary

Technical Problem

[0003]然而,实践中发现,当采用上述方式对受控装置进行限制时,经常会存在如下技术问题一:基于关键词匹配和静态规则引擎的方法缺乏对规则文件多版本时间有效性的管理能力,导致匹配到已失效或尚未生效的规则版本;同时,仅依赖关键词进行浅层匹配,无法理解事件描述文本与规则文件之间的深层语义信息,使得生成的关联判定结果准确率下降,产生大量错误的装置控制指令,造成受控装置频繁执行无效的状态切换操作(例如,闸机反复闭锁与解锁、终端反复注销与重连),导致受控装置的功耗增加、硬件损耗率上升,受控装置的稳定性降低

Benefits of technology

[0011]本公开的上述各个实施例中具有如下有益效果:本公开的一些实施例的基于规则语义检索的受控装置限制方法可以降低受控装置的功耗和硬件损耗率,提高受控装置的稳定性。具体来说,造成受控装置的功耗增加、硬件损耗率上升,受控装置的稳定性降低的原因在于:基于关键词匹配和静态规则引擎的方法缺乏对规则文件多版本时间有效性的管理能力,导致匹配到已失效或尚未生效的规则版本;同时,仅依赖关键词进行浅层匹配,无法理解事件描述文本与规则文件之间的深层语义信息,使得生成的关联判定结果准确率下降,产生大量错误的装置控制指令,造成受控装置频繁执行无效的状态切换操作,导致受控装置的功耗增加、硬件损耗率上升,受控装置的稳定性降低。基于此,本公开的一些实施例的基于规则语义检索的受控装置限制方法可以首先,响应于接收到事件描述文本,获取带有时间索引的多版本规则知识库和上述事件描述文本对应的目标对象在受控装置集上的权限信息。在这里,获取的带有时间索引的多版本规则知识库,为后续基于事件发生时间筛选有效规则版本提供数据基础,获取的权限信息,为后续生成装置控制指令提供授权校验信息。其次,对上述事件描述文本进行要素抽取处理,得到事件要素信息。在这里,将非结构化的事件描述文本转化为包含目标时间要素信息和实体行为要素信息的结构化信息,为后续时间区间匹配和分层语义召回提供标准化的输入。再次,根据上述事件要素信息包括的目标时间要素信息,对上述多版本规则知识库进行时间区间匹配处理,得到目标规则文本集。在这里,以事件发生时间作为查询键,在多版本规则知识库的时间效力区间索引上进行范围查询匹配,筛选出事件发生时处于有效状态的规则版本,排除已失效或尚未生效的规则版本,提高后续语义匹配的规则版本准确性。接着,根据上述事件要素信息和上述多版本规则知识库,对上述目标规则文本集进行分层语义召回处理,得到候选规则片段信息集。在这里,从目标规则文本集中筛选出与事件要素信息在语义和逻辑上具有关联的规则片段,相比于关键词浅层匹配,能够捕捉事件描述文本与规则文件之间的深层语义关联,提高召回的准确性。随后,根据上述候选规则片段信息集,对上述多版本规则知识库进行规则上下文检索处理,得到关联文本信息集。在这里,通过邻域扩展检索补充候选规则片段的完整语义环境,为后续语义重构处理提供充分的上下文信息。然后,对上述事件要素信息和上述关联文本信息集进行语义重构处理,得到事件规则关联信息。在这里,对事件要素信息与关联文本信息集进行关联判定与推理,生成包含关联判定信息和控制对象信息集的事件规则关联信息,将语义召回结果转化为异常判定结论和具体的控制对象,为后续生成准确的装置控制指令提供判定依据。之后,响应于确定上述事件规则关联信息满足异常触发条件,根据上述权限信息和上述事件规则关联信息,生成目标受控装置标识信息集和装置控制指令集。在这里,通过权限信息与事件规则关联信息的联合校验,生成准确的装置控制指令,减少错误的装置控制指令的产生。最后,根据上述装置控制指令集,对上述目标受控装置标识信息集对应的目标受控装置集进行限制操作。在这里,装置控制指令准确性的提高,使受控装置频繁执行无效状态切换操作的情况减少。由此可得,该基于规则语义检索的受控装置限制方法可以降低受控装置的功耗、降低受控装置的硬件损耗率和提高受控装置的稳定性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122240815B_ABST
    Figure CN122240815B_ABST
Patent Text Reader

Abstract

Embodiments of the present disclosure disclose a controlled device restriction method, device and equipment based on rule semantic retrieval. A specific implementation of the method comprises: performing element extraction processing on event description text to obtain event element information; performing time interval matching processing on a multi-version rule knowledge base to obtain a target rule text set; performing hierarchical semantic recall processing on the target rule text set to obtain a candidate rule segment information set; performing rule context retrieval processing on the multi-version rule knowledge base to obtain an associated text information set; performing semantic reconstruction processing on the event element information and the associated text information set to obtain event rule association information; generating a target controlled device identifier information set and a device control instruction set; and performing restriction operation on a target controlled device set corresponding to the target controlled device identifier information set according to the device control instruction set. The implementation can reduce the power consumption and hardware loss rate of the controlled device and improve the stability of the controlled device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of this disclosure relate to the field of computer technology, and more specifically to a controlled device restriction method, apparatus, and device based on rule-based semantic retrieval. Background Technology

[0002] A rule-based semantic retrieval-based method for restricting controlled devices involves performing semantic retrieval and association analysis between event description text and rule files to generate device control commands, thereby achieving automated control of the controlled device. The typical approach for this method is as follows: First, the event description text is received. Then, keyword matching and a static rule engine are used to match the event description text with the rule file to obtain association determination results. Next, based on the association determination results, device control commands are generated to execute restriction operations on the controlled device.

[0003] However, in practice, it has been found that when the above methods are used to restrict controlled devices, the following technical problems often occur: First, the method based on keyword matching and static rule engine lacks the ability to manage the time validity of multiple versions of rule files, resulting in matching rule versions that have expired or have not yet taken effect. Second, relying solely on keywords for shallow matching fails to understand the deep semantic information between the event description text and the rule file, leading to a decrease in the accuracy of the generated association judgment results, generating a large number of erroneous device control commands, causing the controlled device to frequently execute invalid state switching operations (e.g., repeated locking and unlocking of gates, repeated deregistration and reconnection of terminals), resulting in increased power consumption, increased hardware wear rate, and reduced stability of the controlled device.

[0004] The information disclosed in this background section is only intended to enhance the understanding of the background of the present disclosure concept, and therefore may contain information that does not constitute prior art known to those skilled in the art. Summary of the Invention

[0005] The summary portion of this disclosure is intended to provide a brief overview of the concepts, which will be described in detail in the detailed description portion. This summary portion is not intended to identify key or essential features of the claimed technical solutions, nor is it intended to limit the scope of the claimed technical solutions.

[0006] Some embodiments of this disclosure propose a controlled device restriction method, apparatus, and device based on rule-based semantic retrieval to address one or more of the technical problems mentioned in the background section above.

[0007] In a first aspect, some embodiments of this disclosure provide a controlled device restriction method based on rule semantic retrieval, comprising: in response to receiving event description text, acquiring a multi-version rule knowledge base with time index and permission information of the target object corresponding to the event description text on a controlled device set; performing element extraction processing on the event description text to obtain event element information; performing time interval matching processing on the multi-version rule knowledge base according to the target time element information included in the event element information to obtain a target rule text set; performing hierarchical semantic recall processing on the target rule text set according to the event element information and the multi-version rule knowledge base to obtain a candidate rule fragment information set; performing rule context retrieval processing on the multi-version rule knowledge base according to the candidate rule fragment information set to obtain a related text information set; performing semantic reconstruction processing on the event element information and the related text information set to obtain event rule association information; in response to determining that the event rule association information meets the abnormal triggering conditions, generating a target controlled device identification information set and a device control instruction set according to the permission information and the event rule association information; and performing restriction operations on the target controlled device set corresponding to the target controlled device identification information set according to the device control instruction set.

[0008] Secondly, some embodiments of this disclosure provide a controlled device restriction device based on rule semantic retrieval, comprising: an acquisition unit configured to, in response to receiving event description text, acquire a multi-version rule knowledge base with time index and permission information of the target object corresponding to the event description text on a controlled device set; an extraction unit configured to perform element extraction processing on the event description text to obtain event element information; a matching unit configured to perform time interval matching processing on the multi-version rule knowledge base according to the target time element information included in the event element information to obtain a target rule text set; and a recall unit configured to stratify the target rule text set according to the event element information and the multi-version rule knowledge base. The system includes a semantic recall process to obtain a set of candidate rule fragment information; a retrieval unit configured to perform rule context retrieval processing on the multi-version rule knowledge base based on the candidate rule fragment information set to obtain a set of associated text information; a semantic reconstruction unit configured to perform semantic reconstruction processing on the event element information and the associated text information set to obtain event rule association information; a generation unit configured to generate a set of target controlled device identifier information and a set of device control instructions based on the permission information and the event rule association information in response to determining that the event rule association information meets the abnormal triggering conditions; and an execution unit configured to perform restriction operations on the target controlled device set corresponding to the target controlled device identifier information set based on the device control instructions set.

[0009] Thirdly, some embodiments of this disclosure provide an electronic device, including: one or more processors; and a storage device having one or more programs stored thereon, such that when the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any implementation of the first aspect.

[0010] Fourthly, some embodiments of this disclosure provide a computer-readable medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the method as described in any implementation of the first aspect.

[0011] The various embodiments of this disclosure have the following beneficial effects: the controlled device restriction method based on rule semantic retrieval in some embodiments of this disclosure can reduce the power consumption and hardware wear rate of the controlled device and improve the stability of the controlled device. Specifically, the reasons for the increased power consumption, increased hardware wear rate, and decreased stability of the controlled device are: the method based on keyword matching and static rule engine lacks the ability to manage the time validity of multiple versions of rule files, resulting in matching expired or ineffective rule versions; at the same time, relying only on keywords for shallow matching cannot understand the deep semantic information between the event description text and the rule file, resulting in a decrease in the accuracy of the generated association judgment results, generating a large number of erroneous device control commands, causing the controlled device to frequently execute invalid state switching operations, leading to increased power consumption, increased hardware wear rate, and decreased stability of the controlled device. Based on this, the controlled device restriction method based on rule semantic retrieval in some embodiments of this disclosure can first, in response to receiving the event description text, obtain a multi-version rule knowledge base with time index and the permission information of the target object corresponding to the event description text on the controlled device set. Here, the acquired multi-version rule knowledge base with time index provides a data foundation for subsequent filtering of valid rule versions based on event occurrence time, and the acquired permission information provides authorization verification information for subsequent generation of device control commands. Next, the event description text is processed to extract event element information. Here, the unstructured event description text is transformed into structured information containing target time element information and entity behavior element information, providing standardized input for subsequent time interval matching and hierarchical semantic recall. Then, based on the target time element information included in the event element information, time interval matching is performed on the multi-version rule knowledge base to obtain a target rule text set. Here, using the event occurrence time as the query key, a range query matching is performed on the time validity interval index of the multi-version rule knowledge base to filter out rule versions that were valid when the event occurred, excluding expired or ineffective rule versions, thus improving the accuracy of rule versions for subsequent semantic matching. Finally, based on the event element information and the multi-version rule knowledge base, hierarchical semantic recall processing is performed on the target rule text set to obtain a candidate rule fragment information set. Here, rule fragments that are semantically and logically related to event element information are selected from the target rule text set. Compared with shallow keyword matching, this can capture the deep semantic relationship between the event description text and the rule file, improving the accuracy of recall. Subsequently, based on the above candidate rule fragment information set, rule context retrieval processing is performed on the above multi-version rule knowledge base to obtain the associated text information set. Here, neighborhood expansion retrieval is used to supplement the complete semantic environment of the candidate rule fragments, providing sufficient contextual information for subsequent semantic reconstruction processing.Then, semantic reconstruction processing is performed on the aforementioned event element information and the aforementioned associated text information set to obtain event rule association information. Here, association judgment and reasoning are performed on the event element information and the associated text information set to generate event rule association information containing association judgment information and control object information set. The semantic recall result is transformed into anomaly judgment conclusion and specific control object, providing a judgment basis for the subsequent generation of accurate device control instructions. Subsequently, in response to determining that the aforementioned event rule association information meets the anomaly triggering conditions, a target controlled device identification information set and a device control instruction set are generated based on the aforementioned permission information and the aforementioned event rule association information. Here, through joint verification of permission information and event rule association information, accurate device control instructions are generated, reducing the generation of erroneous device control instructions. Finally, based on the aforementioned device control instruction set, a restriction operation is performed on the target controlled device set corresponding to the aforementioned target controlled device identification information set. Here, the improved accuracy of device control instructions reduces the occurrence of frequent invalid state switching operations by the controlled device. Therefore, this controlled device restriction method based on rule semantic retrieval can reduce the power consumption of the controlled device, reduce the hardware loss rate of the controlled device, and improve the stability of the controlled device. Attached Figure Description

[0012] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and elements are not necessarily drawn to scale.

[0013] Figure 1 This is a flowchart of some embodiments of the controlled device restriction method based on rule-based semantic retrieval according to the present disclosure; Figure 2 This is a schematic diagram of the structure of some embodiments of the controlled device restriction device based on rule semantic retrieval according to the present disclosure; Figure 3 This is a schematic diagram of the structure of an electronic device suitable for implementing some embodiments of the present disclosure. Detailed Implementation

[0014] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.

[0015] It should also be noted that, for ease of description, only the parts relevant to the invention are shown in the accompanying drawings. Unless otherwise specified, the embodiments and features described in this disclosure can be combined with each other.

[0016] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are used only to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependencies.

[0017] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".

[0018] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.

[0019] This disclosure will now be described in detail with reference to the accompanying drawings and embodiments.

[0020] Figure 1 A flow 100 of some embodiments of the controlled device restriction method based on rule-based semantic retrieval according to this disclosure is shown. The controlled device restriction method based on rule-based semantic retrieval includes the following steps: Step 101: In response to receiving the event description text, obtain the multi-version rule knowledge base with time index and the permission information of the target object corresponding to the event description text on the controlled device set.

[0021] In some embodiments, the executing entity may, in response to receiving event description text, obtain a multi-version rule knowledge base with a time index and the permission information of the target object corresponding to the event description text on the controlled device set. The event description text may be text information or unstructured data describing a behavior that occurred at a specific time. For example, the event description text may be a log file, monitoring record, or characters described in natural language by a user. The target object may be the entity initiating the behavior in the event description text. For example, the target object may include, but is not limited to, at least one of the following: a user holding a digital identity, a terminal device with a unique identifier, or an automatically running script process. The controlled devices in the controlled device set may be devices or system entry points used to allow, deny, or restrict access requests or operations of the target object. For example, smart gates, electronic access control systems, electronic locks for safes, business terminals, office computers, etc. The permission information may be authorization data used to limit the scope of operations that the target object can perform on the controlled devices. The permission information may include: an authorized device identifier set and an authorized device permission item set. The authorized device identifier in the authorized device identifier set may be the identifier of the controlled device to which the target object has operating permissions. The aforementioned authorized device permission set can be a collection of operations (e.g., access permissions, login permissions, read permissions, write permissions, download permissions) authorized to the target object on a controlled device corresponding to an authorized device identifier. The aforementioned multi-version rule knowledge base can be a pre-defined database storing various rule files and their historical versions. For example, the aforementioned rule files can be internal company policies, industry regulations, or operating procedures. The aforementioned time index can represent the effective time range of the aforementioned rule files.

[0022] In some optional implementations of certain embodiments, the aforementioned multi-version rule knowledge base is obtained through the following steps: The first step involves extracting metadata from the acquired target rule source file set to obtain a rule file attribute information set. The target rule source files in this set can be the aforementioned rule files themselves. The rule file attributes in the attribute information set can be metadata reflecting the target rule source files. These attribute information can include, but is not limited to, at least one of the following: rule file name, version identifier, effective date, and applicable scope text. In practice, the executing entity can input the target rule source file set into a trained metadata extraction model to obtain the rule file attribute information set. The metadata extraction model can be a model that extracts information from the input target rule source file set and outputs the rule file attribute information set. This metadata extraction model can be a large language model fine-tuned by instructions. For example, the large language model could be DeepSeek-R1, Qwen, etc.

[0023] The second step involves constructing a version time-series chain on the aforementioned rule file attribute information set to obtain a time validity interval label set. The time validity interval labels in this set can be left-closed, right-open intervals reflecting the start and end times of the rule file's effectiveness. In practice, the executing entity can first identify at least one target rule source file with the same name from the target rule source file set as a group of similar source files, thus obtaining a set of similar source file groups. Then, the similar source file groups are sorted in ascending order according to their effectiveness time to obtain a set of similar source file sequences. Next, for each similar source file sequence in the set of similar source file sequences, the following determination steps are performed: First, the effectiveness time of the next adjacent similar source file in each similar source file sequence is taken as the expiration time. This expiration time can be the time when a rule in the target rule source file expires. Optionally, when there is no adjacent next similar source file, the expiration time corresponding to the similar source file can be a preset expiration time. The preset expiration time can be "9999-12-31". The second step is to determine the effective time and expiration time of each source file in the above sequence of source files as the time validity interval label.

[0024] The third step is to generate an applicable scope feature vector set based on the aforementioned rule file attribute information set. The applicable scope feature vectors in this set can be numerical representations of the applicable scope text. In practice, the executing entity can input the applicable scope text corresponding to each file attribute information in the rule file attribute information set into a text sentence embedding model to obtain the applicable scope feature vector set. The text sentence embedding model can be a model that semantically encodes the input applicable scope text and outputs the applicable scope feature vector set. For example, the text sentence embedding model can include, but is not limited to, at least one of the following: the Qwen3-Embedding model and the Jina Embeddings model.

[0025] The fourth step involves segmenting and vectorizing the aforementioned target rule source file set to obtain a fragment feature vector set. The fragment feature vectors in this set can be numerical representations of the local semantic content of the target rule source files. In practice, the execution entity can first use a recursive character text segmenter to semantically segment each target rule source file in the target rule source file set, obtaining a target text block sequence set. The target text blocks in this target text block sequence set can be semantically coherent text fragments. Then, each target text block in the target text block sequence set is input into the text sentence embedding model to obtain the fragment feature vector set.

[0026] The fifth step involves storing the aforementioned rule file attribute information set and the aforementioned time validity interval label set in a pre-established relational database to obtain the target relational database, and storing the aforementioned applicable scope feature vector set and the aforementioned fragment feature vector set in a pre-established vector database to obtain the target vector database. The target relational database can be a relational database storing the aforementioned rule file attribute information set and the aforementioned time validity interval label set. For example, the relational database can be a PostgreSQL database. The target vector database can be a vector database storing the aforementioned applicable scope feature vector set and the aforementioned fragment feature vector set. For example, the vector database can be a Milvus database. In practice, the executing entity can first store the aforementioned rule file attribute information set and the aforementioned time validity interval label set in the rule version information table of the aforementioned relational database. The rule version information table includes: version identifier, rule file name, effective time, expiration time, and applicable scope text. The version identifier can be the primary key of the rule version information table. The effective time and the expiration time can correspond to the left and right endpoints of the aforementioned time validity interval labels. Then, a range index is created based on the aforementioned effective and expiration times to obtain the target relational database. For example, the range index could be a GiST (Generalized Search Tree) index. Next, each applicable range feature vector in the aforementioned applicable range feature vector set, along with its corresponding version identifier of the target rule source file, is stored in the first vector retrieval table of the aforementioned vector database. The first vector retrieval table could be a data table in the aforementioned vector database used for storing and retrieving applicable range feature vectors. Next, each fragment feature vector in the aforementioned fragment feature vector set, along with its corresponding version identifier of the target rule source file, the position number of the text block corresponding to the fragment feature vector in the text block sequence, and the text content of the text block, is stored in the second vector retrieval table of the aforementioned vector database. The second vector retrieval table could be a data table in the aforementioned vector database used for storing and retrieving fragment feature vectors and their associated data. Finally, approximate nearest neighbor indexes are created on the applicable range feature vectors in the first vector retrieval table and the fragment feature vectors in the second vector retrieval table, respectively, to obtain the target vector database. For example, the aforementioned approximate nearest neighbor index could be an HNSW (Hierarchical Navigable Small World) index.

[0027] Step 6: Perform bidirectional mapping and association processing on the target relational database and the target vector database to obtain a multi-version rule knowledge base. In practice, the executing entity can use the version identifier in the rule version information table of the target relational database as the association key to establish a bidirectional query channel between the rule version information table and the first and second vector retrieval tables of the target vector database. The target relational database and the target vector database after establishing the bidirectional query channel are then defined as the multi-version rule knowledge base. The query methods of the bidirectional query channel can include forward query and reverse query. The forward query method can use the version identifier selected from the target relational database as a filter condition to retrieve the corresponding vector record in the first or second vector retrieval table of the target vector database. The reverse query method can use the version identifier of the matched vector record in the target vector database as the query key to query the corresponding rule file attribute information in the rule version information table of the target relational database.

[0028] In addressing the technical problems described above using the aforementioned technical solutions, the following technical problem arises in the application scenario: scenarios where semantic dependencies exist between clauses in the rule source file, leading to invalid state switching operations by the controlled device (e.g., clauses containing explicit references such as "the aforementioned provisions" or "the preceding paragraph," or where the semantic understanding of the clauses depends on contextual information such as the applicable conditions or scope of objects defined earlier). This often leads to the following second technical problem: when the rule source file is processed into block vectors, each text block is independently encoded, resulting in the fragment feature vectors of text blocks containing semantic dependencies lacking semantic information of the dependent content. This incomplete fragment feature vectors reduce the accuracy of subsequent hierarchical semantic recall, consequently decreasing the accuracy of event rule association information, generating erroneous device control commands, causing the controlled device to execute invalid state switching operations, increasing power consumption, raising hardware wear rates, and reducing device stability. Given the following requirements for this application scenario: semantic dependencies cross text block boundaries, semantic topic switching positions are not fixed, and semantic information density within text blocks is uneven, we have decided to adopt the following solution: Optionally, the aforementioned multi-version rule knowledge base is obtained through the following steps: The first step is to generate a time-effectiveness interval label set and an applicable scope feature vector set based on the obtained target rule source file set. The implementation of this step can be found in the optional implementations of steps one through three in some embodiments following step 101, and will not be repeated here.

[0029] The second step is to perform the following aggregation steps for each target rule source file in the above target rule source file set: Sub-step 1 involves segmenting the source file of the target rule into sentences, resulting in a sequence of source file sentences. The sentences in this sequence can be text units within the source file bounded by punctuation marks such as periods and semicolons. In practice, the execution entity can utilize the spaCy library to segment the source file into sentences, obtaining the sequence of source file sentences.

[0030] Sub-step 2 involves performing context encoding on the target rule source file to obtain a sequence of source file word vectors. The word vectors in this sequence can be numerical representations of individual words in the target rule source file after incorporating the full-text context semantics through a self-attention mechanism. In practice, the executing entity can input the complete text of the target rule source file into the trained context encoding model to obtain the sequence of source file word vectors. The context encoding model can be a model that performs semantic encoding on the input complete text and outputs a sequence of vectors corresponding to each word in the complete text. For example, the context encoding model can include, but is not limited to, at least one of the following: the Longformer model and the BigBird model.

[0031] Sub-step 3 involves performing segmented mean aggregation on the source file word vector sequence based on the aforementioned source file sentence sequence to obtain a sentence vector sequence. The sentence vectors in this sequence can be the mean vectors of the source file word vectors within the corresponding range of the source file sentences. In practice, the execution entity can first use the word segmenter corresponding to the aforementioned context encoding model (e.g., the Longformer word segmenter) to determine the start and end indexes of each source file sentence in the source file sentence sequence within the aforementioned source file word vector sequence, obtaining a sentence boundary index pair sequence. Then, for each sentence boundary index pair in the sentence boundary index pair sequence, the arithmetic mean of all source file word vectors located between the start and end indexes in the aforementioned source file word vector sequence is used to determine the sentence vector, thus obtaining the sentence vector sequence.

[0032] Sub-step 4 involves normalizing the above sentence vector sequence to obtain a normalized sentence vector sequence. The normalized sentence vectors in this sequence can be unit vectors obtained by normalizing the sentence vectors using the L2 norm.

[0033] Sub-step 5 involves performing a sliding window semantic comparison on the normalized sentence vector sequence to obtain a semantic change intensity value sequence. The semantic change intensity values ​​in this sequence characterize the degree of semantic difference between consecutive sentence regions preceding and following a sentence in the source file. In practice, the executing entity can perform the following determination steps for each normalized sentence vector in the normalized sentence vector sequence: First, the arithmetic mean of the three normalized sentence vectors preceding and adjacent to the normalized sentence vector in the sequence is determined as the mean vector of the preceding region. Optionally, when the number of normalized sentence vectors preceding the normalized sentence vector is less than the preset window radius, the arithmetic mean of all preceding normalized sentence vectors is determined as the mean vector of the preceding region. Then, the arithmetic mean of the three normalized sentence vectors following and adjacent to the normalized sentence vector in the sequence is determined as the mean vector of the following region. Optionally, when the number of normalized sentence vectors following the aforementioned normalized sentence vector is less than the preset window radius, the arithmetic mean of all subsequent normalized sentence vectors is determined as the mean vector of the rear region. Then, the cosine distance between the mean vector of the preceding region and the mean vector of the rear region is determined as the semantic change intensity value.

[0034] Sub-step 6 involves performing adaptive change point detection processing on the aforementioned semantic change intensity value sequence to obtain a list of segmentation point locations. The segmentation point locations in this list can be the indices of positions where the semantic theme changes within the sentence sequence of the source file. In practice, the executing entity can utilize a Bayesian online change point detection algorithm to perform adaptive change point detection processing on the aforementioned semantic change intensity value sequence to obtain the list of segmentation point locations.

[0035] Sub-step 7: Based on the aforementioned list of segmentation points, the source file sentence sequence is divided and reorganized to obtain a source file text block sequence. The source file text blocks in this sequence can be collections of semantically coherent source file sentences. In practice, the executing entity can first use each segmentation point in the list as a segmentation boundary to divide the source file sentence sequence, obtaining multiple consecutive subsets of source file sentences. Then, the source file sentences in each subset are concatenated in their original order to obtain the source file text block sequence.

[0036] Sub-step 8: Based on the above source file text block sequence, perform attention-weighted aggregation processing on the above source file word vector sequence to obtain a fragment feature vector group. In practice, the above execution entity can perform the following input steps for each source file text block in the above source file text block sequence: First, using the word segmenter corresponding to the above context encoding model, determine the start and end position indices of the above source file text block in the above source file word vector sequence, and determine all source file word vectors located between the above start and end position indices as a subset of text block word vectors. Then, input the above text block word vector subset into the trained attention aggregation model to obtain fragment feature vectors. The above attention aggregation model can be a model that performs relevance scoring and weighted summation processing on the input text block word vector subset and outputs fragment feature vectors. For example, the above attention aggregation model can be the cross-attention layer in the Transformer encoder.

[0037] The third step involves storing the obtained fragment feature vector set, the aforementioned rule file attribute information set, the aforementioned time validity interval label set, and the aforementioned applicable scope feature vector set into a pre-established database set to obtain a multi-version rule knowledge base. The implementation of this step can refer to the implementation methods of steps five and six in some optional implementation methods of certain embodiments following step 101, and will not be repeated here.

[0038] The above-described technical solution and its related content, as an inventive point of this disclosure, solve the second technical problem mentioned in the background art: "Increased power consumption, increased hardware loss rate, and decreased stability of the controlled device." Factors leading to increased power consumption, increased hardware loss rate, and decreased stability of the controlled device are often as follows: When the rule source file is processed by block vectorization, each text block is independently encoded, causing the fragment feature vector of the text block containing semantic dependencies to lack the semantic information of the dependent content, resulting in incomplete fragment feature vectors. This leads to a decrease in the accuracy of the recall results during subsequent hierarchical semantic recall, which in turn decreases the accuracy of the event rule association information, generating erroneous device control commands, causing the controlled device to execute invalid state switching operations, increasing power consumption, increasing hardware loss rate, and decreasing stability of the controlled device. Solving these factors can achieve the effects of reducing the power consumption of the controlled device, reducing the hardware loss rate of the controlled device, and improving the stability of the controlled device. To achieve this effect, this disclosure first generates a time validity interval label set and an applicable scope feature vector set based on the aforementioned target rule source file set. Then, for each target rule source file in the aforementioned target rule source file set, the following aggregation steps are performed: First, sentence segmentation is performed on the target rule source files to obtain a sequence of source file sentences. Second, context encoding is performed on the target rule source files to obtain a sequence of source file word vectors. Here, context encoding is performed on the complete text of the target rule source files, so that the vector representations of each word incorporate the semantic information of the full-text context. Words containing semantic dependencies can obtain the semantic information of the dependent content during the encoding stage. Third, based on the sentence sequence of the source files, segmented mean aggregation is performed on the word vector sequence of the source files to obtain a sentence vector sequence. Here, word-level vectors are aggregated into sentence-level vectors, providing sentence-by-sentence input for subsequent sliding-window semantic comparison. Fourth, the sentence vector sequence is normalized to obtain a normalized sentence vector sequence. Fifth, the normalized sentence vector sequence is subjected to sliding-window semantic comparison to obtain a sequence of semantic change intensity values. Sixth, adaptive change point detection is performed on the semantic change intensity value sequence to obtain a list of segmentation point positions. Here, by using sliding window semantic comparison and adaptive change point detection, the segmentation boundary positions are determined based on the actual changes in semantic content, aligning the segmentation boundaries with the semantic topic switching positions. This reduces the likelihood of semantically coherent content being truncated to different segments or content with different semantic topics being mixed into the same segment. The seventh step involves dividing and reorganizing the source file sentence sequence according to the aforementioned list of segmentation point positions, resulting in a source file text block sequence. The eighth step involves performing attention-weighted aggregation processing on the source file word vector sequence based on the aforementioned source file text block sequence, resulting in fragment feature vector groups.Here, an attention mechanism assigns different weights to each word within a text block, giving greater weight to words with high semantic information density. The resulting fragment feature vectors, compared to mean aggregation, more accurately reflect the core semantic information of the text block. Finally, the obtained fragment feature vector set, the aforementioned rule file attribute information set, the aforementioned time validity interval label set, and the aforementioned applicable scope feature vector set are stored in a pre-established database to obtain a multi-version rule knowledge base. The improved quality of the fragment feature vectors increases the accuracy of subsequent hierarchical semantic recall, thereby improving the accuracy of event rule association information, reducing the generation of erroneous device control commands, and decreasing the frequency of invalid state switching operations by the controlled device. This, in turn, reduces the power consumption, hardware wear rate, and stability of the controlled device.

[0039] Step 102: Extract elements from the event description text to obtain event element information.

[0040] In some embodiments, the executing entity may perform element extraction processing on the event description text to obtain event element information. This event element information may be structured information reflecting the behavior that has occurred by the target object.

[0041] In some optional implementations of certain embodiments, the above-described element extraction process of the event description text to obtain event element information may include the following steps: The first step is to perform text standardization on the aforementioned event description text to obtain standardized event description text. This standardized event description text can be the original event description text after removing meaningless special characters. In practice, the executing entity can use a preset set of regular expressions to perform matching, replacement, and filtering operations on the event description text to obtain standardized event description text. The preset regular expressions in the preset set of regular expressions can be pre-defined rules used to match and process (e.g., filter, replace) fixed pattern characters (e.g., special characters, log header tags) in the aforementioned event description text.

[0042] The second step involves inputting the standardized event description text into the trained event element extraction model to obtain entity behavior element information and initial time element information. The entity behavior element information can be structured information reflecting the core facts of the event in the standardized event description text. These core facts can include: object information, action information, subject information, and environmental information. Object information can be textual information within the standardized event description text describing the identity or attributes of the target object. Action information can be textual information within the standardized event description text describing the actions of the target object. Subject information can be textual information describing the object or resource involved in the target object's actions. For example, subject information could be unpublished confidential drawings. Environmental information can be information reflecting the environment or medium in which the action occurred. For example, environmental information could be a microblog post. The initial time element information can be time-descriptive words extracted from the standardized event description text, retaining their original natural language form. For example, initial time element information could be "the day before yesterday." The event element extraction model can be a model that performs entity recognition and time parsing on the input standardized event description text, outputting entity behavior element information and initial time element information. The event element extraction model described above can be a model composed of a semantic representation model, a feature extraction model, and a decoding inference model concatenated together. For example, the semantic representation model can be a BERT model or a RoFormer model. The feature extraction model can be a BiLSTM model or a Transformer encoder. The decoding inference model can be a CRF model or a GP (Global Pointer) model. Optionally, the event element extraction model described above can also be a large language model (e.g., Deepseek-v3, Qwen3-32B).

[0043] The third step involves performing relative time normalization on the initial time element information based on the obtained base time to obtain the target time element information. The base time can be the time when the event description text was received. The target time element information can be a timestamp with a standard date format. For example, the target time element information could be "2024-06-12". In practice, the executing entity can first use Python's dateparser library to parse the offset between the base time and the initial time element information to obtain the target time element information.

[0044] The fourth step is to determine the above target time element information and the above entity behavior element information as event element information.

[0045] Step 103: Based on the target time element information included in the event element information, perform time interval matching processing on the multi-version rule knowledge base to obtain the target rule text set.

[0046] In some embodiments, the executing entity can perform time interval matching processing on the multi-version rule knowledge base based on the target time element information included in the event element information to obtain a target rule text set. The target rule texts in the target rule text set can be target rule source files that were valid at the time the event description text occurred. In practice, the executing entity can use the target time element information as a query key to perform a range query matching on the time validity interval index of the multi-version rule knowledge base, filtering out all rule versions that were valid at the time the event occurred, thus obtaining the target rule text set.

[0047] Step 104: Based on the event element information and the multi-version rule knowledge base, perform hierarchical semantic recall processing on the target rule text set to obtain a candidate rule fragment information set.

[0048] In some embodiments, the executing entity may perform hierarchical semantic recall processing on the target rule text set based on the event element information and the multi-version rule knowledge base to obtain a candidate rule fragment information set. The candidate rule fragment information in the candidate rule fragment information set may be text information selected from the target rule text set that is semantically and logically related to the event description text.

[0049] In some optional implementations of certain embodiments, the hierarchical semantic recall processing of the target rule text set based on the event element information and the multi-version rule knowledge base to obtain a candidate rule fragment information set may include the following steps: The first step involves performing multi-dimensional semantic encoding on the aforementioned event element information to obtain a multi-way query vector set. The multi-way query vectors in this set can be numerical representations of the core facts of the event corresponding to the aforementioned event element information. This multi-way query vector set can include, but is not limited to, at least one of the following: object query vector, action query vector, object query vector, environment query vector, and combined query vector. The object query vector can be a numerical representation of the object information corresponding to the aforementioned event element information. The action query vector can be a numerical representation of the action information corresponding to the aforementioned event element information. The object query vector can be a numerical representation of the object information corresponding to the aforementioned event element information. The environment query vector can be a numerical representation of the environment information corresponding to the aforementioned event element information. The combined query vector can be a numerical representation of the aforementioned event element information. In practice, the executing entity can utilize the aforementioned text sentence embedding model to encode the aforementioned event element information and its corresponding object information, action information, object information, and environment information separately to obtain the multi-way query vector set.

[0050] The second step involves recalling the applicable scope feature vector set included in the multi-way query vector set based on the target rule text set and the combined query vector set, thereby obtaining a candidate rule text set. The candidate rule texts in this set can be target rule texts from the target rule text set whose applicable scope texts are semantically similar to the event element information. In practice, the executing entity can first determine the version identifier corresponding to the target rule text set as the retrieval filtering condition. Then, using the HNSW indexing algorithm, under the constraints of the retrieval filtering condition, the cosine similarity between the combined query vector and at least one applicable scope feature vector corresponding to the target rule text set is determined, resulting in a text similarity value set. Next, the text similarity value set is sorted in descending order to obtain a text similarity value sequence. Finally, the target rule texts corresponding to the text similarity values ​​in the text similarity value sequence that are within a first preset threshold are determined as the candidate rule text set. For example, the first preset threshold can be 50.

[0051] The third step involves using the aforementioned candidate rule text set as a retrieval scope limiting condition, and employing the aforementioned multi-way query vector set to perform multi-way parallel recall processing on the fragment feature vector set in the aforementioned multi-version rule knowledge base, resulting in an initial candidate rule fragment information set and a recall similarity value set. The initial candidate rule fragment information set includes text sentences from the candidate rule text that are similar to the aforementioned event element information in different semantic dimensions. The recall similarity value set represents the similarity between the multi-way query vector and the fragment feature vector. In practice, the executing entity can first determine the version identifier corresponding to the candidate rule text set as the fragment retrieval filtering condition. Then, for each multi-way query vector in the aforementioned multi-way query vector set, the following determination steps are performed: First, using the HNSW indexing algorithm, under the constraint of the aforementioned fragment retrieval filtering condition, the cosine similarity between the aforementioned multi-way query vector and at least one fragment feature vector corresponding to the aforementioned candidate rule text set is determined, resulting in an initial recall similarity value set. The second step is to sort the initial recall similarity value groups in descending order to obtain an initial recall similarity value sequence. The third step is to determine the initial recall similarity values ​​within the second preset threshold in the initial recall similarity value sequence as recall similarity value groups, and to determine the source file text block corresponding to each recall similarity value in the recall similarity value groups as an initial candidate rule fragment information group. For example, the second preset threshold could be 20.

[0052] The fourth step involves deduplicating and fusing the initial set of candidate rule fragments to obtain a first set of candidate rule fragments. The first candidate rule fragments in this set can reflect the degree of matching between the source file text block and the event description text across multiple semantic dimensions. This first candidate rule fragment information can include: the first candidate rule fragment text and a fragment multidimensional score vector. The first candidate rule fragment text can be the source file text block corresponding to the initial candidate rule fragment information, and the fragment multidimensional score vector can be an ordered set of recall similarity values ​​across different semantic dimensions corresponding to the source file text block. For example, the aforementioned multidimensional score vector for a fragment could be (0.8, 0.7, 0.9, 0.5, 0.6). The value "0.8" represents the similarity between the combined query vector and the fragment feature vector; "0.7" represents the similarity between the object query vector and the fragment feature vector; "0.9" represents the similarity between the action query vector and the fragment feature vector; "0.5" represents the similarity between the object query vector and the fragment feature vector; and "0.6" represents the similarity between the environment query vector and the fragment feature vector. In practice, the executing entity can first determine at least one initial candidate rule fragment information that is identical to the source file text block in the initial candidate rule fragment information set as the first candidate rule fragment text. Then, at least one recall similarity value corresponding to the first candidate rule fragment text is determined as the fragment multidimensional score vector.

[0053] The fifth step involves performing mutual verification constraint filtering on the aforementioned first candidate rule fragment information set to obtain a second candidate rule fragment information set and a mutual verification strength value set. The second candidate rule fragment information in the aforementioned second candidate rule fragment information set can be selected from the first candidate rule fragment information set and strongly correlated with key event information (e.g., object information, action information). In practice, the executing entity can first perform the following generation steps for each fragment multidimensional score vector in the fragment multidimensional score vector set included in the aforementioned first candidate rule fragment information set: Step 1: Determine the recall similarity value corresponding to the object query vector included in the aforementioned fragment multidimensional score vector as the object similarity value, and determine the recall similarity value corresponding to the action query vector included in the aforementioned fragment multidimensional score vector as the action similarity value. Step 2: Using the mutual verification constraint function, generate an initial mutual verification strength value based on the aforementioned object similarity value and the aforementioned action similarity value. The aforementioned mutual verification constraint function can be expressed as: .

[0054] in, This represents the initial mutual verification strength value. This represents the numerical similarity between objects. This represents the numerical value of action similarity.

[0055] Then, at least one initial mutual verification strength value from the obtained initial mutual verification strength value set that is greater than or equal to the mutual verification screening threshold is determined as the mutual verification strength value set. Finally, the first candidate rule fragment information corresponding to each mutual verification strength value in the above mutual verification strength value set is determined as the second candidate rule fragment information set. The above mutual verification screening threshold can be a pre-set critical value for judging whether the above initial mutual verification strength value is a mutual verification strength value. For example, the above mutual verification screening threshold can be 0.4.

[0056] Step 6: Perform multi-path support constraint filtering on the aforementioned second candidate rule fragment information set to obtain a third candidate rule fragment information set and a support strength value set. The third candidate rule fragment information in the aforementioned third candidate rule fragment information set can be selected from the second candidate rule fragment information set and have a semantic matching relationship with auxiliary event information (e.g., environmental information, channel information). In practice, the executing entity can perform the following determination steps for each fragment multidimensional score vector in the fragment multidimensional score vector set included in the aforementioned second candidate rule fragment information set: Step 1: Using a multidimensional support function, generate initial support strength values ​​based on the aforementioned fragment multidimensional score vectors. The aforementioned multidimensional support function can be expressed as: .

[0057] in, This represents the initial support strength value mentioned above. This indicates the number of elements included in the multidimensional score vector of a segment. This represents the position index of an element in the multidimensional score vector of a segment. The first segment in the multidimensional score vector represents the segment's multidimensional score vector. Each element.

[0058] The second step involves determining the initial support strength value as the support strength value if it is greater than or equal to a preset support screening threshold (e.g., 0.8). The third step involves determining the second candidate rule fragment information corresponding to the support strength value as the third candidate rule fragment information.

[0059] Step 7: Based on the aforementioned mutual verification strength value set and the aforementioned support strength value set, the aforementioned third candidate rule fragment information set is sorted and truncated to obtain a candidate rule fragment information set. In practice, the executing entity can first use a linear weighted summation method to perform weighted fusion of the aforementioned mutual verification strength value set and the aforementioned support strength value set to obtain a fused strength value set. Then, based on the numerical values ​​of the aforementioned fused strength value set, the aforementioned third candidate rule fragment information set is sorted in descending order to obtain a third candidate rule fragment information sequence. Finally, at least one third candidate rule fragment information in the third candidate rule fragment information sequence whose sorting position is within a third preset threshold (e.g., Top-5) is determined as the candidate rule fragment information set.

[0060] Step 105: Based on the candidate rule fragment information set, perform rule context retrieval processing on the multi-version rule knowledge base to obtain the associated text information set.

[0061] In some embodiments, the execution entity may perform rule context retrieval processing on the multi-version rule knowledge base based on the candidate rule fragment information set to obtain a set of associated text information. The associated text information in the set may be text information reflecting the complete semantic environment of the candidate rule fragment information and the attributes of the rule file in which it resides.

[0062] In some optional implementations of certain embodiments, the above-mentioned rule context retrieval processing of the multi-version rule knowledge base based on the candidate rule fragment information set to obtain the associated text information set may include the following steps: The first step involves performing a location neighborhood expansion search on the aforementioned multi-version rule knowledge base based on the candidate rule fragment information set, resulting in a neighborhood context text set. The neighborhood context text in this set can be text reflecting the complete semantic environment of the candidate rule fragment information. In practice, the executing entity can perform the following determination steps for each candidate rule fragment in the candidate rule fragment information set: In the sequence of source file text blocks, at least one source file text block physically adjacent to the source file text block corresponding to the candidate rule fragment information (e.g., the adjacent preceding source file text block and the adjacent following source file text block) is determined as the neighborhood context text.

[0063] The second step is to determine the rule file attribute information corresponding to each candidate rule fragment in the aforementioned candidate rule fragment information set as a structured context information set. The structured context information in this set can be text information reflecting the attributes of the rule file containing the candidate rule fragment.

[0064] The third step is to generate a related text information set based on the aforementioned candidate rule fragment information set, the aforementioned neighborhood context text set, and the aforementioned structured context information set. In practice, the executing entity can use the Jackson library to convert the aforementioned candidate rule fragment information set, the aforementioned neighborhood context text set, and the aforementioned structured context information set into a related text information set saved in JSON format.

[0065] Step 106: Perform semantic reconstruction processing on the event element information and the associated text information set to obtain event rule association information.

[0066] In some embodiments, the executing entity may perform semantic reconstruction processing on the event element information and the associated text information set to obtain event rule association information. The event rule association information may reflect the logical association between the event element information and the associated text information set. The event rule association information may include, but is not limited to, at least one of the following: association logic explanation text, association determination information, and a control object information set. The association logic explanation text may be natural language text describing whether the event element information is abnormal and the reason for the abnormality. The association determination information may be tag text reflecting whether the event element information is abnormal and the degree of abnormality. The control object information may include: a target device type identifier and a set of permissions to be restricted. The target device type identifier may be the type information of the controlled device that needs to be restricted. The permissions to be restricted items in the set of permissions to be restricted may be identifier information of the specific operations that need to be restricted on the controlled device.

[0067] In some optional implementations of certain embodiments, the semantic reconstruction processing of the event element information and the associated text information set to obtain event rule association information may include the following steps: The first step is to concatenate each associated text information in the aforementioned associated text information set with the aforementioned event element information to obtain an event rule text pair set. The event rule text pairs in the aforementioned event rule text pair set can be text composed of associated text information and event element information. In practice, the executing entity can concatenate each associated text information in the aforementioned associated text information set with the aforementioned event element information (for example, using the [SEP] delimiter) to obtain the event rule text pair set.

[0068] The second step involves semantically encoding the aforementioned set of event rule text pairs to obtain a set of event rule text pair vectors. The event rule text pair vectors in this set can be numerical representations of the event rule text pairs. In practice, the executing entity can input this set of event rule text pairs into the text sentence embedding model to obtain the event rule text pair vector set.

[0069] The third step involves inputting the aforementioned event rule text pair vector set into the trained association analysis model to obtain text pair analysis information. This text pair analysis information can reflect whether the event element information is abnormal. The text pair analysis information can include, but is not limited to, at least one of the following: a decision label set and a confidence set. The decision labels in the decision label set can be binary labels reflecting whether the event rule text pair vectors are abnormal. For example, a decision label value of 1 indicates that the rule text pair vectors are abnormal. The confidence scores in the confidence set can be probability values ​​representing the credibility of the decision labels. The association analysis model can be a model that performs association feature fusion and classification prediction processing on the input event rule text pair vector set, outputting text pair analysis information. This association analysis model can be a model composed of a feature interaction model, a feature transformation model, and an analysis output model concatenated together. The feature interaction model can perform multi-dimensional self-attention weighted calculations on the input event rule text pair vector set, outputting an interaction feature vector set. For example, the feature interaction model can be a Multi-Head Self-Attention component of the Transformer architecture. The interactive feature vectors in the aforementioned interactive feature vector set can be vectors that integrate the dependencies between different semantic dimensions within the event rule text pairs. The aforementioned feature transformation model can be a model that performs nonlinear feature extraction processing on the input interactive feature vector set and outputs a transformed feature vector set. For example, the aforementioned feature transformation model can be a model composed of at least one cascaded Residual Network Block. The transformed feature vectors in the aforementioned transformed feature vector set can be semantically enhanced vectors obtained by nonlinearly mapping the interactive feature vectors. The aforementioned analysis output model can be a model that performs dimensionality reduction mapping and probabilistic activation processing on the input transformed feature vector set and outputs a decision label set and a confidence set. For example, the aforementioned analysis output model can be an MLP model containing at least one hidden layer.

[0070] The fourth step involves generating event rule association information based on the aforementioned associated text information set, event element information, and text pair analysis information. In practice, the executing entity can first fill the aforementioned associated text information set, event element information, text pair analysis information, and preset device type table into a preset prompt word template to obtain input text information. This input text information can be structured text information composed of the aforementioned associated text information set, event element information, and text pair analysis information. The preset prompt word template can be a pre-defined structured text template used to guide the model in generating event rule association information. The preset device type table can be a pre-defined lookup table storing type identifiers and functional descriptions of various controlled devices. Then, the input text information is input into the trained interpretation and generation model to obtain event rule association information. The interpretation and generation model can be a model that uses CoT (Chain of Thought) technology to perform causal reasoning and text generation processing on the input text information and output event rule association information. For example, the interpretation and generation model can be a large language model such as Deepseek-v3 or Qwen3-32B.

[0071] In addressing the technical problems described above using the aforementioned technical solutions, the following technical problem often arises in the application scenario: situations where event element information and associated text information exhibit semantic similarity but lack causal correlation, leading to invalid state switching operations by the controlled device (e.g., event element information and associated text information share some identical lexical units, resulting in high semantic similarity, but they do not constitute a true causal relationship). This often leads to the following third technical problem: relying solely on semantic similarity to determine the association between event element information and associated text information sets fails to distinguish between semantic relevance and causal correlation. This results in misjudging event element information and associated text information that lack a true causal relationship as related, generating incorrect device control commands, causing the controlled device to execute invalid state switching operations, increasing power consumption, raising hardware wear rates, and reducing device stability. Considering the following requirements for this application scenario: the determination result must be traceable to the specific lexical level, the reliability of the determination result must be measurable, and the determination result must be causally verifiable, we have decided to adopt the following solution: Optionally, the semantic reconstruction processing of the event element information and the associated text information set to obtain event rule association information, and the restriction operation on the target controlled device set based on the event rule association information, may include the following steps: The first step involves generating a set of event rule text pairs, an inference information set, and a word embedding vector set based on the aforementioned event element information and the associated text information set. The inference information set can reflect the semantic relationships between the event rule text pairs. This inference information may include semantic relationship labels and inference probability distribution vectors. The semantic relationship labels can be labels reflecting the logical relationship categories between the event rule text pairs. For example, these labels may include: implication, contradiction, and neutrality. The inference probability distribution vectors can be an ordered set of probability values ​​for each semantic relationship category of the event rule text pairs. The word embedding vectors in the word embedding vector set can be numerical representations of the semantic features of the event rule text pairs. In practice, the executing entity can first concatenate each associated text information in the associated text information set with the event element information to obtain the event rule text pair set. Then, the event rule text pair set is input into the trained language inference model to obtain the inference information set and the word embedding vector set. The aforementioned language inference model can be a model that performs embedding mapping and logical relation classification on the input set of event rule text pairs, and outputs a set of inference information. The aforementioned word embedding vector set can be the embedding layer output vector set obtained when the aforementioned language inference model performs embedding mapping on the aforementioned set of event rule text pairs. For example, the aforementioned language inference model can include, but is not limited to, at least one of the following: DeBERTa-v3-large-mnli model, RoBERTa-large-mnli model.

[0072] The second step involves performing the following generation steps for each piece of reasoning information in the aforementioned reasoning information set: Sub-step 1 involves determining the word embedding vector and event rule text pair corresponding to the above reasoning information as the target word embedding vector and target event rule text pair.

[0073] Sub-step 2 involves performing gradient attribution processing on the aforementioned inference information and the aforementioned target word embedding vector to obtain a feature attribution score sequence. The feature attribution scores in this sequence characterize the influence of each word in the target event rule text pair on the semantic relationship labels included in the inference information. In practice, the executing entity can first use the Integrated Gradients algorithm to perform gradient attribution operations on the probability values ​​corresponding to the semantic relationship labels included in the inference information and the aforementioned target word embedding vector to obtain a word attribution vector sequence. The word attribution vectors in this sequence characterize the distribution of the influence of a single word in the target event rule text pair on the aforementioned semantic relationship labels across each embedding dimension. Then, the L2 norm of each word attribution vector in the sequence is determined as the feature attribution score, resulting in the feature attribution score sequence.

[0074] Sub-step 3 involves determining an abnormal feature word set from the target event rule text pair based on the aforementioned feature attribution score sequence, and identifying the grammatical attribute identifier of each abnormal feature word in the abnormal feature word set, thus obtaining a grammatical attribute identifier set. The abnormal feature words in the abnormal feature word set can be the lexical units in the target event rule text pair whose feature attribution scores rank highly in the aforementioned feature attribution score sequence. The grammatical attribute identifiers in the grammatical attribute identifier set can be labels reflecting the grammatical role of the abnormal feature words in the sentence. For example, the grammatical attribute identifiers can include, but are not limited to, at least one of the following: noun, verb, adjective, adverb. In practice, the executing entity can first sort the aforementioned feature attribution score sequence in descending order to obtain a feature attribution score ranking sequence. Then, the lexical units corresponding to feature attribution scores whose ranking positions are within a preset attribution threshold (e.g., 3) in the aforementioned feature attribution score ranking sequence are determined as the abnormal feature word set. Next, the part-of-speech tagging function of the spaCy library is used to perform part-of-speech tagging processing on the aforementioned target event rule text pair to obtain a part-of-speech tagging sequence. Finally, the part-of-speech tags corresponding to the positions of each abnormal feature word in the above part-of-speech tagging sequence are determined as grammatical attribute identifiers, thus obtaining a grammatical attribute identifier set.

[0075] Sub-step 4 involves orthogonally decoupling the aforementioned abnormal feature word set and the aforementioned grammatical attribute identifier set to obtain intervention event samples. These intervention event samples can be text pairs obtained by replacing each abnormal feature word in the aforementioned target event rule text pair with its corresponding semantically orthogonal word. The semantically orthogonal word can be a lexical unit that has the same grammatical attributes as the aforementioned abnormal feature word but is orthogonal in semantic space. In practice, the executing entity can perform the following replacement steps for each abnormal feature word in the aforementioned abnormal feature word set: First, using the aforementioned text sentence embedding model, encode the aforementioned abnormal feature word to obtain an abnormal feature word vector. Second, select candidate words from a preset vocabulary that have the same grammatical attribute identifier as the aforementioned abnormal feature word to obtain a candidate word set. The preset vocabulary can be a pre-defined vocabulary that stores each lexical unit and its corresponding grammatical attribute identifier and word vector. Third, determine the absolute value of the cosine similarity between the word vector corresponding to each candidate word in the aforementioned candidate word set and the aforementioned abnormal feature word vector as the semantic relevance value to obtain a semantic relevance value set. Fourth, the candidate word corresponding to the smallest semantic relevance value in the above set of semantic relevance values ​​is identified as a semantic orthogonal word. Fifth, the abnormal feature words in the above target event rule text pair are replaced with the above semantic orthogonal words. Finally, the target event rule text pair after all replacements is identified as the intervention event sample.

[0076] Sub-step 5 involves performing semantic reasoning on the aforementioned intervention event samples to obtain intervention inference probability values. These intervention inference probability values ​​can be the probability values ​​output by the language inference model for the intervention event samples in the categories corresponding to the semantic relation labels. In practice, the executing entity can first use a tokenizer (e.g., DebertaV2Tokenizer) corresponding to the language inference model to perform word segmentation and indexing on the intervention event samples, obtaining an intervention semantic index vector. Then, the intervention semantic index vector is input into the language inference model to obtain an intervention inference probability distribution vector. This intervention inference probability distribution vector can be an ordered set of probability values ​​output by the language inference model for the intervention event samples in each semantic relation category. Finally, the probability values ​​in the intervention inference probability distribution vector corresponding to the semantic relation labels are determined as the intervention inference probability values.

[0077] Sub-step 6 involves performing differential analysis on the aforementioned intervention inference probability values ​​and the aforementioned inference information to obtain necessary causal probability values ​​and sufficient causal probability values. The necessary causal probability value characterizes the necessity of the aforementioned abnormal feature word set for the aforementioned semantic relationship label. The sufficient causal probability value characterizes the sufficiency of the aforementioned abnormal feature word set for the aforementioned semantic relationship label. In practice, the executing entity can first determine the probability values ​​corresponding to the aforementioned semantic relationship label in the inference probability distribution vector included in the aforementioned inference information as the original inference probability values. Then, using the probability of necessity function, a differential operation is performed on the original inference probability values ​​and the aforementioned intervention inference probability values ​​to obtain the necessary causal probability value. Finally, using the probability of sufficiency function, a differential operation is performed on the original inference probability values ​​and the aforementioned intervention inference probability values ​​to obtain the sufficient causal probability value.

[0078] Sub-step 7: Based on the aforementioned inference information, perform uncertainty calibration fusion processing on the necessary causal probability value and the sufficient causal probability value to obtain a causal calibration score. The causal calibration score characterizes the credibility of the semantic relationship determination result of the target event rule text pair. In practice, the executing entity can first determine the harmonic mean of the necessary and sufficient causal probability values ​​as the initial causal score. Then, it can determine the information entropy of the inference probability distribution vector included in the inference information as the uncertainty value. Finally, using the calibration fusion function, a causal calibration score is generated based on the initial causal score, the uncertainty value, and the inference information. The calibration fusion function can be: .

[0079] in, This indicates the causal calibration score mentioned above. This represents the initial causal score mentioned above. This represents the aforementioned uncertainty value. This represents the total number of categories of semantic relation tags included in the above reasoning information.

[0080] Sub-step 8: Based on the aforementioned causal calibration score and inference information, generate text pair judgment information. This text pair judgment information can reflect the semantic relationship category between the aforementioned target event rule text pairs and the credibility of their judgment. In practice, the executing entity can first, in response to the aforementioned causal calibration score being greater than or equal to a preset calibration threshold (e.g., 0.5), determine the semantic relationship tags included in the aforementioned inference information as verified semantic relationship tags. Then, in response to the aforementioned causal calibration score being less than the aforementioned preset calibration threshold, determine neutral tags as verified semantic relationship tags. These neutral tags can be tags that characterize the absence of a clear semantic association between the aforementioned target event rule text pairs. Finally, the aforementioned verified semantic relationship tags and the aforementioned causal calibration score are determined as the text pair judgment information.

[0081] The third step involves generating event rule association information based on the obtained text pair judgment information set and the aforementioned associated text information set. In practice, the executing entity can first perform keyword matching between the associated text information corresponding to each text pair judgment information in the aforementioned text pair judgment information set and a preset constraint keyword table to obtain a constraint type tag set. The constraint type tags in the aforementioned constraint type tag set can be tags that reflect the behavioral constraint direction of the rule clauses contained in the aforementioned associated text information. The aforementioned constraint type tags can include: prohibitive constraint tags and obligatory constraint tags. The aforementioned prohibitive constraint tags can be tags that characterize the aforementioned associated text information as clauses restricting the target object from performing specific behaviors. The aforementioned obligatory constraint tags can be tags that reflect the aforementioned associated text information as clauses requiring the target object to perform specific behaviors. The aforementioned preset constraint keyword table can be a pre-set set that stores the mapping relationship between prohibitive keywords (e.g., "must not," "strictly prohibited," "forbidden") and obligatory keywords (e.g., "shall," "must," "need"). Then, the text pair judgment information set is obtained by matching the combination of verified semantic relationship labels and corresponding clause constraint type labels in each text pair judgment information set with a preset abnormal association mapping table to identify abnormal text pair judgment information. The preset abnormal association mapping table can be a pre-defined table storing the mapping relationship between the combination of clause constraint type labels and verified semantic relationship labels and abnormal labels. Specifically, the combination of prohibitive constraint labels and implied labels is mapped to abnormal labels, the combination of obligatory constraint labels and contradictory labels is mapped to abnormal labels, and the remaining combinations are mapped to normal labels. Subsequently, in response to the abnormal text pair judgment information set not being empty, the abnormality degree aggregation value corresponding to the abnormal text pair judgment information set is matched with a preset level division threshold set to obtain an abnormality level label, which serves as the association judgment information. For example, the abnormality level label can include: high abnormality, moderate abnormality, and low abnormality. The abnormality degree aggregation value can be the maximum value among the various causal calibration scores corresponding to the abnormal text pair judgment information set. Next, in response to the abnormal text pair judgment information set being empty, normal labels are identified as the association judgment information. Subsequently, using the aforementioned interpretation generation model, based on the aforementioned text pair judgment information set, the aforementioned clause constraint type label set, the aforementioned associated text information set, the aforementioned event element information, and the preset device type table, associated logic interpretation text and control object information set are generated. The implementation of this step can refer to the implementation of step four in some optional implementations of embodiments following step 106, and will not be repeated here. Finally, the aforementioned associated judgment information, the aforementioned associated logic interpretation text, and the aforementioned control object information set are determined as event rule associated information.

[0082] The fourth step is to apply restrictions to the set of controlled target devices based on the event rule association information described above. The implementation of this step can be found in steps 107-108, and will not be repeated here.

[0083] The above-described technical solution and its related content, as an inventive point of this disclosure, solve the third technical problem mentioned in the background art: "increased power consumption, increased hardware loss rate, and decreased stability of the controlled device." Factors leading to increased power consumption, increased hardware loss rate, and decreased stability of the controlled device are often as follows: Associating event element information and associated text information sets solely based on semantic similarity cannot distinguish between semantic relevance and causal correlation. This leads to misjudging event element information and associated text information that lack genuine causal correlation as related, resulting in the generation of incorrect device control commands. This causes the controlled device to perform invalid state switching operations, increasing power consumption, increasing hardware loss rate, and decreasing stability. Solving these factors can reduce the power consumption, decrease the hardware loss rate, and improve the stability of the controlled device. To achieve this effect, this disclosure first generates an event rule text pair set, an inference information set, and a word embedding vector set based on the aforementioned event element information and the aforementioned associated text information set. Here, event element information and associated text information are concatenated and subjected to natural language inference to obtain an inference information set reflecting semantic relationships. Simultaneously, the word embedding vector set is preserved to provide a differentiable input basis for subsequent gradient attribution processing. Then, for each piece of inference information in the above inference information set, the following generation steps are performed: First, the word embedding vector and event rule text pair corresponding to the above inference information are determined as the target word embedding vector and target event rule text pair. Second, gradient attribution processing is performed on the above inference information and the above target word embedding vector to obtain a feature attribution score sequence. Here, gradient attribution processing locates the key words and their attribution scores that drive the natural language inference results, making the results traceable to the specific word level. Third, based on the above feature attribution score sequence, an abnormal feature word set is determined from the above target event rule text pair, and the grammatical attribute identifier of each abnormal feature word in the above abnormal feature word set is identified to obtain a grammatical attribute identifier set. Fourth, orthogonal semantic decoupling processing is performed on the above abnormal feature word set and the above grammatical attribute identifier set to obtain the intervention event sample. Fifth, semantic reasoning is performed on the above intervention event samples to obtain intervention inference probability values. Sixth, differential analysis is performed on the above intervention inference probability values ​​and the above inference information to obtain necessary causal probability values ​​and sufficient causal probability values. Here, by comparing the original inference results with the inference results of the intervention event samples, the causal relationship strength between keyword elements and judgment results is quantified from the two dimensions of necessity and sufficiency, distinguishing between semantic relevance and causal association. Seventh, based on the above inference information, uncertainty calibration fusion processing is performed on the above necessary causal probability values ​​and the above sufficient causal probability values ​​to obtain causal calibration scores. Here, causal strength and inference uncertainty are fused and calibrated to calibrate and suppress judgment results with insufficient causal reliability, thereby improving the accuracy of the judgment results.Step 8: Based on the aforementioned causal calibration scores and inference information, text pair judgment information is generated. Then, based on the obtained text pair judgment information set and the aforementioned associated text information set, event rule association information is generated. Here, the verified and calibrated text pair judgment information set, compared to judgment results based solely on semantic similarity, reduces the likelihood of misclassifying events without genuine causal relationships as associated with rules, thus improving the accuracy of event rule association information. Finally, based on the aforementioned event rule association information, restrictive operations are applied to the aforementioned set of target controlled devices. Here, the improved accuracy of event rule association information reduces the generation of erroneous device control commands, decreases the frequency of invalid state switching operations by controlled devices, thereby reducing the power consumption of controlled devices, lowering the hardware wear rate of controlled devices, and improving the stability of controlled devices.

[0084] Step 107: In response to the determination that the event rule association information meets the abnormal triggering conditions, generate a target controlled device identification information set and a device control instruction set based on the permission information and the event rule association information.

[0085] In some embodiments, the executing entity may, in response to determining that the event rule association information satisfies the abnormal triggering condition, generate a target controlled device identification information set and a device control instruction set based on the permission information and the event rule association information. The abnormal triggering condition may be a condition where the association judgment information included in the event rule association information is information representing an abnormality. The target controlled device identification information in the target controlled device identification information set may be the identification of a controlled device in the controlled device set that requires restricted operation. The device control instructions in the device control instruction set may be a set of parameters for controlling the controlled device corresponding to the target controlled device identification information to perform restricted operation. In practice, the executing entity may first, for each control object information in the control object information set included in the event rule association information, determine from the authorized device identification set included in the permission information the authorized device identification set that matches the target device type identification corresponding to the control object information, and use this as the target controlled device identification information corresponding to the control object information, thus obtaining the target controlled device identification information set. Then, for each target controlled device identifier in the aforementioned target controlled device identifier information set, the following determination steps are performed: First, the intersection of the set of permissions to be restricted corresponding to the target controlled device identifier information and the corresponding authorized device permission item group is determined as the effective restricted permission item set. Second, each effective restricted permission item in the aforementioned effective restricted permission item set and the aforementioned associated judgment information are used as a joint query key to retrieve the restricted operation parameter set from a preset control parameter table to obtain the restricted operation parameter set. The restricted operation parameters in the aforementioned restricted operation parameter set can be configuration data for controlling the controlled device corresponding to the aforementioned target controlled device identifier information to perform restricted operations on the aforementioned effective restricted permission items in terms of method and timeliness. The aforementioned preset control parameter table can be a pre-set table that stores the mapping relationship between the restricted operation parameters corresponding to different combinations of abnormality levels and different effective restricted permission items. Third, the aforementioned target controlled device identifier information, the aforementioned effective restricted permission item set, and the aforementioned restricted operation parameter set are determined as device control instructions. Optionally, the aforementioned executing entity can also send the associated logic explanation text and associated judgment information included in the aforementioned event rule associated information to a manual review terminal.

[0086] Step 108: According to the device control instruction set, restrict the target controlled device set corresponding to the target controlled device identification information set.

[0087] In some embodiments, the executing entity can perform restriction operations on the target controlled device set corresponding to the target controlled device identification information set according to the device control instruction set. The restriction operations may include, but are not limited to, at least one of the following: controlling the controlled device to enter a locked state, blocking the controlled device's access to a specified resource (e.g., terminating the controlled device's network connection session), switching the state of the controlled device (e.g., forcibly deregistering the target object's login status on the terminal), etc. The target controlled devices in the target controlled device set can be the controlled devices in the set that correspond to the target controlled device identification information. In practice, the executing entity can execute the device control instructions to complete the restriction operations on the target controlled device set.

[0088] The various embodiments of this disclosure have the following beneficial effects: the controlled device restriction method based on rule semantic retrieval in some embodiments of this disclosure can reduce the power consumption and hardware wear rate of the controlled device and improve the stability of the controlled device. Specifically, the reasons for the increased power consumption, increased hardware wear rate, and decreased stability of the controlled device are: the method based on keyword matching and static rule engine lacks the ability to manage the time validity of multiple versions of rule files, resulting in matching expired or ineffective rule versions; at the same time, relying only on keywords for shallow matching cannot understand the deep semantic information between the event description text and the rule file, resulting in a decrease in the accuracy of the generated association judgment results, generating a large number of erroneous device control commands, causing the controlled device to frequently execute invalid state switching operations, leading to increased power consumption, increased hardware wear rate, and decreased stability of the controlled device. Based on this, the controlled device restriction method based on rule semantic retrieval in some embodiments of this disclosure can first, in response to receiving the event description text, obtain a multi-version rule knowledge base with time index and the permission information of the target object corresponding to the event description text on the controlled device set. Here, the acquired multi-version rule knowledge base with time index provides a data foundation for subsequent filtering of valid rule versions based on event occurrence time, and the acquired permission information provides authorization verification information for subsequent generation of device control commands. Next, the event description text is processed to extract event element information. Here, the unstructured event description text is transformed into structured information containing target time element information and entity behavior element information, providing standardized input for subsequent time interval matching and hierarchical semantic recall. Then, based on the target time element information included in the event element information, time interval matching is performed on the multi-version rule knowledge base to obtain a target rule text set. Here, using the event occurrence time as the query key, a range query matching is performed on the time validity interval index of the multi-version rule knowledge base to filter out rule versions that were valid when the event occurred, excluding expired or ineffective rule versions, thus improving the accuracy of rule versions for subsequent semantic matching. Finally, based on the event element information and the multi-version rule knowledge base, hierarchical semantic recall processing is performed on the target rule text set to obtain a candidate rule fragment information set. Here, rule fragments that are semantically and logically related to event element information are selected from the target rule text set. Compared with shallow keyword matching, this can capture the deep semantic relationship between the event description text and the rule file, improving the accuracy of recall. Subsequently, based on the above candidate rule fragment information set, rule context retrieval processing is performed on the above multi-version rule knowledge base to obtain the associated text information set. Here, neighborhood expansion retrieval is used to supplement the complete semantic environment of the candidate rule fragments, providing sufficient contextual information for subsequent semantic reconstruction processing.Then, semantic reconstruction processing is performed on the aforementioned event element information and the aforementioned associated text information set to obtain event rule association information. Here, association judgment and reasoning are performed on the event element information and the associated text information set to generate event rule association information containing association judgment information and control object information set. The semantic recall result is transformed into anomaly judgment conclusion and specific control object, providing a judgment basis for the subsequent generation of accurate device control instructions. Subsequently, in response to determining that the aforementioned event rule association information meets the anomaly triggering conditions, a target controlled device identification information set and a device control instruction set are generated based on the aforementioned permission information and the aforementioned event rule association information. Here, through joint verification of permission information and event rule association information, accurate device control instructions are generated, reducing the generation of erroneous device control instructions. Finally, based on the aforementioned device control instruction set, a restriction operation is performed on the target controlled device set corresponding to the aforementioned target controlled device identification information set. Here, the improved accuracy of device control instructions reduces the occurrence of frequent invalid state switching operations by the controlled device. Therefore, this controlled device restriction method based on rule semantic retrieval can reduce the power consumption of the controlled device, reduce the hardware loss rate of the controlled device, and improve the stability of the controlled device.

[0089] Further reference Figure 2 As an implementation of the methods shown in the above figures, this disclosure provides some embodiments of a controlled device restriction device based on rule semantic retrieval. These device embodiments are similar to... Figure 1 Corresponding to the method embodiments shown, this rule-based semantic retrieval controlled device restriction device can be specifically applied to various electronic devices.

[0090] like Figure 2As shown, a controlled device restriction device 200 based on rule semantic retrieval includes: an acquisition unit 201, an extraction unit 202, a matching unit 203, a recall unit 204, a retrieval unit 205, a semantic reconstruction unit 206, a generation unit 207, and an execution unit 208. The acquisition unit 201 is configured to: in response to receiving event description text, acquire a multi-version rule knowledge base with time indexes and the permission information of the target object corresponding to the event description text on the controlled device set; the extraction unit 202 is configured to: perform element extraction processing on the event description text to obtain event element information; the matching unit 203 is configured to: perform time interval matching processing on the multi-version rule knowledge base according to the target time element information included in the event element information to obtain a target rule text set; the recall unit 204 is configured to: perform hierarchical semantic recall processing on the target rule text set according to the event element information and the multi-version rule knowledge base to obtain a candidate rule fragment information set. The retrieval unit 205 is configured to: perform rule context retrieval processing on the multi-version rule knowledge base according to the candidate rule fragment information set to obtain a set of associated text information; the semantic reconstruction unit 206 is configured to: perform semantic reconstruction processing on the event element information and the associated text information set to obtain event rule association information; the generation unit 207 is configured to: in response to determining that the event rule association information meets the abnormal triggering conditions, generate a set of target controlled device identification information and a set of device control instructions according to the permission information and the event rule association information; the execution unit 208 is configured to: perform restriction operations on the target controlled device set corresponding to the target controlled device identification information set according to the device control instruction set.

[0091] It is understandable that the units described in the rule-based semantic retrieval controlled device restriction device 200 and the reference Figure 1 The steps in the described method correspond to each other. Therefore, the operations, features, and beneficial effects described above for the method also apply to the controlled device restriction device 200 and the units contained therein based on rule-based semantic retrieval, and will not be repeated here.

[0092] The following is for reference. Figure 3 It shows a schematic diagram of the structure of an electronic device (e.g., an electronic device) 300 suitable for implementing some embodiments of the present disclosure. Figure 3 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments of this disclosure.

[0093] like Figure 3As shown, the electronic device 300 may include a processing unit (e.g., a central processing unit, a graphics processing unit, etc.) 301, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 302 or a program loaded from a storage device 308 into a random access memory (RAM) 303. The RAM 303 also stores various programs and data required for the operation of the electronic device 300. The processing unit 301, ROM 302, and RAM 303 are interconnected via a bus 304. An input / output (I / O) interface 305 is also connected to the bus 304.

[0094] Typically, the following devices can be connected to I / O interface 305: input devices 306 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 307 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 308 including, for example, magnetic tapes, hard disks, etc.; and communication devices 309. Communication device 309 allows electronic device 300 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 3 An electronic device 300 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively. Figure 3 Each box shown can represent a device or multiple devices as needed.

[0095] In particular, according to some embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, some embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication device 309, or installed from storage device 308, or installed from ROM 302. When the computer program is executed by processing device 301, it performs the functions defined in the methods of some embodiments of this disclosure.

[0096] It should be noted that, in some embodiments of this disclosure, the computer-readable medium described above may be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium may be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In some embodiments of this disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In some embodiments of this disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.

[0097] In some implementations, clients and servers can communicate using any currently known or future-developed network protocol such as HTTP (Hypertext Transfer Protocol) and can interconnect with digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet of Things), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future-developed networks.

[0098] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device. The aforementioned computer-readable medium carries one or more programs, which, when executed by the electronic device, cause the electronic device to: in response to receiving event description text, acquire a multi-version rule knowledge base with a time index and the permission information of the target object corresponding to the event description text on the controlled device set; perform element extraction processing on the event description text to obtain event element information; perform time interval matching processing on the multi-version rule knowledge base according to the target time element information included in the event element information to obtain a target rule text set; and perform time interval matching processing on the target rule text according to the event element information and the multi-version rule knowledge base. This episode performs hierarchical semantic recall processing to obtain a candidate rule fragment information set; based on the candidate rule fragment information set, it performs rule context retrieval processing on the multi-version rule knowledge base to obtain a related text information set; it performs semantic reconstruction processing on the event element information and the related text information set to obtain event rule association information; in response to determining that the event rule association information meets the abnormal triggering conditions, it generates a target controlled device identification information set and a device control instruction set based on the permission information and the event rule association information; and it performs restriction operations on the target controlled device set corresponding to the target controlled device identification information set based on the device control instruction set.

[0099] Computer program code for performing operations of some embodiments of this disclosure can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0100] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0101] The units described in some embodiments of this disclosure can be implemented in software or hardware. The described units can also be housed in a processor; for example, a processor may be described as including an acquisition unit 201, an extraction unit 202, a matching unit 203, a recall unit 204, a retrieval unit 205, a semantic reconstruction unit 206, a generation unit 207, and an execution unit 208. The names of these units do not necessarily limit the unit itself; for example, the acquisition unit may also be described as "a unit that, in response to receiving event description text, acquires a multi-version rule knowledge base with a time index and the permission information of the target object corresponding to the event description text on a controlled device set."

[0102] The functions described above in this document can be performed at least in part by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), system-on-a-chip (SoCs), complex programmable logic devices (CPLDs), and so on.

[0103] The above description is merely a selection of preferred embodiments of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of the invention involved in the embodiments of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described inventive concept. For example, technical solutions formed by substituting the above-described features with (but not limited to) technical features with similar functions disclosed in the embodiments of this disclosure.

Claims

1. A controlled device constraint method based on rule-based semantic retrieval, comprising: In response to receiving an event description text, obtain a multi-version rule knowledge base with a time index and the permission information of the target object corresponding to the event description text on the controlled device set; The event description text is processed by element extraction to obtain event element information; Based on the target time element information included in the event element information, the multi-version rule knowledge base is subjected to time interval matching processing to obtain the target rule text set. Based on the event element information and the multi-version rule knowledge base, a hierarchical semantic recall process is performed on the target rule text set to obtain a candidate rule fragment information set. This process includes: The event element information is subjected to multidimensional semantic encoding to obtain a multi-way query vector set; Based on the target rule text set and the combined query vectors included in the multi-way query vector set, a recall process is performed on the applicable scope feature vector set included in the multi-version rule knowledge base to obtain a candidate rule text set; Using the candidate rule text set as a retrieval range limitation condition, the multi-way query vector set is used to perform multi-way parallel recall processing on the fragment feature vector set in the multi-version rule knowledge base to obtain the initial candidate rule fragment information set and the recall similarity value set. The initial candidate rule fragment information set is subjected to deduplication and fusion processing to obtain the first candidate rule fragment information set; The first candidate rule fragment information set is subjected to mutual verification constraint filtering to obtain the second candidate rule fragment information set and the mutual verification strength value set. The second candidate rule fragment information set is subjected to multi-path support constraint filtering to obtain the third candidate rule fragment information set and the support strength value set. Based on the mutual verification strength value set and the support strength value set, the third candidate rule fragment information set is sorted and truncated to obtain the candidate rule fragment information set; Based on the candidate rule fragment information set, the multi-version rule knowledge base is subjected to rule context retrieval processing to obtain the associated text information set; Semantic reconstruction processing is performed on the event element information and the associated text information set to obtain event rule association information; In response to determining that the event rule association information meets the abnormal triggering conditions, a target controlled device identification information set and a device control instruction set are generated based on the permission information and the event rule association information; According to the device control instruction set, restrictive operations are performed on the target controlled device set corresponding to the target controlled device identification information set.

2. The method according to claim 1, wherein, The multi-version rule knowledge base was obtained through the following steps: Metadata extraction processing is performed on the acquired target rule source file set to obtain the rule file attribute information set; The rule file attribute information set is processed by version time-series chain construction to obtain a time validity interval tag set; Based on the set of attribute information in the rule file, generate a set of feature vectors for the applicable scope; The target rule source file set is divided into blocks and vectorized to obtain a set of fragment feature vectors; The rule file attribute information set and the time validity interval label set are stored in a pre-established relational database to obtain a target relational database, and the applicable scope feature vector set and the fragment feature vector set are stored in a pre-established vector database to obtain a target vector database. A bidirectional mapping and association process is performed on the target relational database and the target vector database to obtain a multi-version rule knowledge base.

3. The method according to claim 1, wherein, The step of extracting elements from the event description text to obtain event element information includes: The event description text is subjected to text standardization processing to obtain standardized event description text; The standardized event description text is input into the trained event element extraction model to obtain entity behavior element information and initial time element information; Based on the obtained reference time, the initial time element information is normalized by relative time to obtain the target time element information; The target time element information and the entity behavior element information are determined as event element information.

4. The method according to claim 1, wherein, The step of performing rule context retrieval processing on the multi-version rule knowledge base based on the candidate rule fragment information set to obtain the associated text information set includes: Based on the candidate rule fragment information set, a location neighborhood expansion retrieval is performed on the multi-version rule knowledge base to obtain a neighborhood context text set. The rule file attribute information corresponding to each candidate rule fragment in the candidate rule fragment information set is determined as a structured context information set; A set of associated text information is generated based on the candidate rule fragment information set, the neighborhood context text set, and the structured context information set.

5. The method according to claim 1, wherein, The semantic reconstruction processing of the event element information and the associated text information set to obtain event rule association information includes: Each associated text information in the associated text information set is concatenated with the event element information to obtain an event rule text pair set; Semantic encoding is performed on the event rule text pair set to obtain the event rule text pair vector set; The event rule text pair vector set is input into the trained association analysis model to obtain text pair analysis information; Based on the associated text information set, the event element information, and the text pair analysis information, event rule association information is generated.

6. A controlled device restriction device based on rule-based semantic retrieval, comprising: The acquisition unit is configured to, in response to receiving an event description text, acquire a multi-version rule knowledge base with a time index and the permission information of the target object corresponding to the event description text on the controlled device set. The extraction unit is configured to perform element extraction processing on the event description text to obtain event element information; The matching unit is configured to perform time interval matching processing on the multi-version rule knowledge base based on the target time element information included in the event element information to obtain a target rule text set. The recall unit is configured to perform hierarchical semantic recall processing on the target rule text set based on the event element information and the multi-version rule knowledge base to obtain a candidate rule fragment information set. The hierarchical semantic recall processing on the target rule text set based on the event element information and the multi-version rule knowledge base to obtain the candidate rule fragment information set includes: performing multi-dimensional semantic encoding processing on the event element information to obtain a multi-way query vector set; performing recall processing on the applicable scope feature vector set included in the multi-version rule knowledge base based on the combined query vectors included in the target rule text set and the multi-way query vector set to obtain a candidate rule text set; and using the candidate rule text set as a retrieval scope limiting condition, utilizing... The multi-way query vector set performs multi-way parallel recall processing on the fragment feature vector set in the multi-version rule knowledge base to obtain an initial candidate rule fragment information set and a recall similarity value set; the initial candidate rule fragment information set is subjected to deduplication and fusion processing to obtain a first candidate rule fragment information set; the first candidate rule fragment information set is subjected to mutual verification constraint filtering processing to obtain a second candidate rule fragment information set and a mutual verification strength value set; the second candidate rule fragment information set is subjected to multi-way support constraint filtering processing to obtain a third candidate rule fragment information set and a support strength value set; based on the mutual verification strength value set and the support strength value set, the third candidate rule fragment information set is sorted and truncated to obtain a candidate rule fragment information set. The retrieval unit is configured to perform rule context retrieval processing on the multi-version rule knowledge base based on the candidate rule fragment information set to obtain the associated text information set; The semantic reconstruction unit is configured to perform semantic reconstruction processing on the event element information and the associated text information set to obtain event rule association information; The generation unit is configured to generate a set of target controlled device identification information and a set of device control instructions based on the permission information and the event rule association information in response to determining that the event rule association information meets the abnormal triggering conditions. The execution unit is configured to perform restriction operations on the target controlled device set corresponding to the target controlled device identification information set according to the device control instruction set.

7. An electronic device, comprising: One or more processors; Storage device, on which one or more programs are stored, When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1-5.

8. A computer-readable medium having a computer program stored thereon, wherein, When the computer program is executed by a processor, it implements the method as described in any one of claims 1-5.

Citation Information

Patent Citations

  • Enterprise knowledge base content retrieval method and device based on event graph, equipment and storage medium

    CN121071101A

  • Intelligent auditing method based on knowledge graph constraint

    CN121437188A