Office data storage method and system for teams in refining enterprises

CN123030690APending Publication Date: 2026-11-03QINGDAO ANGONG DIGITAL INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611154839.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-31
Publication Date
2026-11-03

AI Technical Summary

Technical Problem

In the work teams of refining and chemical enterprises, raw text data is not effectively structured, resulting in scattered information storage, information gaps during shift handover, inability to reuse historical experience, and limited context windows of traditional intelligent agents, which affects safe production and efficiency.

Method used

A three-tiered memory architecture is adopted, including an instantaneous memory layer, an attribute memory layer, and an experience memory layer. Through preprocessing and a memory encoding model, basic data is transformed into a standardized memory structure, enabling persistent storage across shifts, dates, and cycles.

Benefits of technology

It enables continuous traceability of team office information, improves retrieval speed and storage utilization, reduces workload, and improves overall office efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123030690A_ABST
    Figure CN123030690A_ABST
Patent Text Reader

Abstract

The application provides a refining enterprise team office data storage method and system, and belongs to the technical field of chemical industry. The method comprises the following steps: acquiring basic data, wherein the basic data is full-process data of refining team office; pre-processing the basic data to obtain standardized text data; inputting the standardized text data into a preset memory coding model to obtain a standardized memory structure; based on the classification features of the standardized memory structure, sending the standardized memory structure to a corresponding storage layer for storage, wherein the storage layer comprises a transient memory layer, an attribute memory layer and an experience memory layer, the transient memory layer is used for storing temporary data, the attribute memory layer is used for storing static data, and the experience memory layer is used for storing historical experience data. The problems of limited context window of a traditional intelligent agent, shift information discontinuity and unrecyclable historical experience can be effectively alleviated, and the continuity and traceability of team office information are ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of chemical technology, specifically to a method for storing office data in a refining and chemical enterprise, a system for storing office data in a refining and chemical enterprise, a machine-readable storage medium, and an electronic device. Background Technology

[0002] Refining and chemical enterprises are typical high-risk continuous process industries. Their production processes are characterized by continuous operation around the clock, stringent process parameters, numerous flammable, explosive, toxic, and hazardous media, high safety risk levels, stringent compliance and regulatory requirements, and close coordination between shifts. As the smallest core unit for refining and chemical production execution, on-site safety management, and daily office operations, work teams are fully responsible for a large number of fundamental and critical tasks, including daily safety inspections of the unit, approval and processing of high-risk work permits such as hot work, confined space operations, and temporary power supply; recording and monitoring production operation data; standardized handover of work between shifts; emergency response to equipment anomalies and malfunctions; closed-loop rectification of safety hazards; and filling out and archiving production ledgers. The quality of execution of these tasks directly affects the stable operation of the refining and chemical unit and the safety of personnel, placing extremely high demands on the work teams' professional skills, operational standardization, and information transmission efficiency.

[0003] In the current work team office scenarios of refining and chemical enterprises, when intelligent agents or auxiliary systems handle the above-mentioned business, they generally adopt the simple method of directly storing the raw text. They do not perform effective structured processing and semantic extraction on the large amount of text such as operation records, work ticket information, inspection data, shift handover logs, and abnormal handling reports generated by the work team every day. Various types of information are stored in unstructured and fragmented form in different systems or local files. Traditional intelligent agents have limited context windows, gaps in shift handover information, and the inability to reuse historical experience. Summary of the Invention

[0004] The purpose of this invention is to provide a data storage method, a data storage system, a machine-readable storage medium, and an electronic device for data storage of office work in refining and chemical enterprises. This method can achieve persistent storage of memory across shifts, dates, and cycles, effectively alleviating the problems of limited context windows, gaps in shift handover information, and inability to reuse historical experience in traditional intelligent agents, and ensuring continuous traceability of office work information.

[0005] To achieve the above objectives, the first aspect of this application provides a method for storing office data in a refining and chemical enterprise, comprising: Acquire basic data, which is the complete process data of the refining and chemical team's office work. The basic data is preprocessed to obtain standardized text data; The standardized text data is input into a preset memory encoding model to obtain a standardized memory structure; Based on the classification characteristics of the standardized memory structure, the standardized memory structure is sent to the corresponding storage layer for storage. The storage layer includes a transient memory layer, an attribute memory layer, and an experience memory layer. The transient memory layer is used to store temporary data, the attribute memory layer is used to store static data, and the experience memory layer is used to store historical experience data.

[0006] In this embodiment of the application, the preset memory encoding model includes a semantic fine-tuning model and an entity linking model; The step of inputting the standardized text data into a preset memory encoding model to obtain a standardized memory structure includes: The semantic fine-tuning model extracts entities from the standardized text data to obtain refined entity information; Based on the refining entity information, the entity linking model determines entity pairs, which are entity pairs with a relationship type. Based on the entity pairs, the entity linking model constructs multiple knowledge triples and transforms the multiple knowledge triples into entity relation data blocks. Each knowledge triple includes a head entity, a relation type, and a tail entity. A memory metadata object is created from the entity linking model; The entity linking model assembles the entity relationship data block, the memory metadata object, and the semantic vector of the memory metadata object to obtain a standardized memory structure.

[0007] In this embodiment of the application, the construction process of the semantic fine-tuning model includes: Obtain the training dataset; Based on the training dataset, the base model is fine-tuned to obtain a semantically fine-tuned model.

[0008] In this embodiment of the application, the step of fine-tuning the base model based on the training dataset to obtain a semantically fine-tuned model includes: The training dataset is input into the Transformer layer of the base model to perform forward propagation, and the cross-entropy loss is calculated based on the output of the forward propagation to obtain the standard cross-entropy loss. Obtain process causal constraint pairs; The process causal constraints are encoded using the base model to obtain the process semantic alignment loss. Based on the standard cross-entropy loss and the process semantic alignment loss, the total training loss is obtained; Based on the total training loss, backpropagation is performed on the base model to obtain LoRA incremental weights; The LoRA incremental weights are fused with the base model to obtain the semantic fine-tuning model.

[0009] In this embodiment, each storage layer is connected to a data gateway, which caches frequently accessed data from the attribute memory layer. The method further includes: Retrieve attribute memory query request; Based on the attribute memory query request, the data gateway's cache is queried to obtain the cache query result; If the cached query result is empty, the attribute memory query request is routed to the attribute memory layer through the data gateway to obtain the query result; If the cached query result is not empty, the cached query result will be used as the query result.

[0010] In this embodiment of the application, it also includes: In response to the precipitation trigger signal, the data to be precipitated in the transient memory layer is synchronized to the empirical memory layer.

[0011] In this embodiment of the application, it also includes: When the data in the attribute memory layer is updated, the instantaneous memory layer and the experience memory layer are updated based on the updated data in the attribute memory layer.

[0012] In this embodiment of the application, it also includes: Obtain the newly written data from the storage layer; Based on the newly written data and existing memory data in the storage layer, determine the conflict type; In the case where the conflict type is a device parameter conflict, the storage layer is updated according to the first update strategy; In the case where the conflict type is a security specification conflict, the storage layer is updated according to the second update strategy; In the event that the conflict type is an anomaly handling scheme conflict, the storage layer is updated according to the third update strategy.

[0013] In this embodiment of the application, determining the conflict type based on the newly written data and existing memory data in the storage layer includes: Based on the newly written data and existing memory data in the storage layer, determine whether there are two or more memory data for the same entity. When it is determined that there are two or more memory records for the same entity, the set of associated entities is determined; Based on the process topology diagram, determine whether the entities in the associated entity set are in the same process context; If it is determined that the entities in the associated entity set are in the same process context, the conflict type is determined based on the newly written data and the existing memory data in the storage layer.

[0014] In this embodiment of the application, it also includes: If the last access time of the memory data in the storage layer exceeds a preset time threshold, the memory data is determined to be forgotten data. The number of days unused is calculated based on the last access time and the current time of the forgotten data; Based on the hierarchy and risk level of the forgotten data, the daily decay rate is determined; The weights of the forgotten data are updated based on the number of days of non-use and the daily decay rate.

[0015] In this embodiment of the application, it also includes: Real-time acquisition of user input information and system event information; Based on the user input information and the system event information, the scene information is determined; Based on the scene information, a retrieval is performed in the storage layer to obtain a memory fragment; Based on the memory fragments, a structured reasoning context is generated; The structured reasoning context is input into the large model of the intelligent agent to obtain reasoning information.

[0016] The second aspect of this application provides a data storage system for work team offices in a refining and chemical enterprise, comprising: The acquisition module is used to acquire basic data, which is the entire process data of the refining and chemical team's office work. The preprocessing module is used to preprocess the basic data to obtain standardized text data; The encoding module is used to input the standardized text data into a preset memory encoding model to obtain a standardized memory structure; The storage module is used to send the standardized memory structure to the corresponding storage layer for storage based on the classification characteristics of the standardized memory structure. The storage layer includes a transient memory layer, an attribute memory layer, and an experience memory layer. The transient memory layer is used to store temporary data, the attribute memory layer is used to store static data, and the experience memory layer is used to store historical experience data.

[0017] A third aspect of this application provides an electronic device, the electronic device comprising: At least one processor; A memory connected to the at least one processor; The memory stores instructions that can be executed by the at least one processor, and the at least one processor implements the above-mentioned inspection and monitoring method by executing the instructions stored in the memory.

[0018] A fourth aspect of this application provides a machine-readable storage medium storing instructions that, when executed by a processor, configure the processor to perform the aforementioned inspection and monitoring method.

[0019] The above technical solution involves acquiring basic data, specifically the entire process data of a refining and chemical work team; preprocessing the basic data to obtain standardized text data; inputting the standardized text data into a preset memory encoding model to obtain a standardized memory structure; and based on the classification features of the standardized memory structure, sending it to the corresponding storage layer for storage. This storage layer includes a transient memory layer, an attribute memory layer, and an experience memory layer. The transient memory layer stores temporary data, the attribute memory layer stores static data, and the experience memory layer stores historical experience data. This three-level hierarchical memory architecture enables persistent storage of memories across shifts, dates, and cycles, effectively alleviating the problems of limited context windows, discontinuous shift handover information, and unreusable historical experience in traditional intelligent agents, ensuring continuous traceability of work team office information. By standardizing information through a preset memory encoding model and combining multi-layered storage, retrieval speed and storage utilization are significantly improved, solving the problems of chaotic traditional text storage, inefficient retrieval, and easy omissions. Actual retrieval response time: ≤5ms for instantaneous memory layer, ≤15ms for attribute memory layer, and ≤50ms for experience memory layer, representing an efficiency improvement of over 8 times compared to traditional text storage. This reduces the workload of work teams and helps improve overall office efficiency.

[0020] Other features and advantages of the embodiments of the present invention will be described in detail in the following detailed description section. Attached Figure Description

[0021] The accompanying drawings are provided to further illustrate embodiments of the present invention and form part of the specification. They are used together with the following detailed description to explain the embodiments of the present invention, but do not constitute a limitation thereof. In the drawings: Figure 1 The illustration shows a flowchart of a data storage method for a work team in a refining and chemical enterprise according to an embodiment of this application; Figure 2 A schematic diagram illustrating the overall system structure according to an embodiment of this application is shown. Figure 3 This schematically illustrates a flowchart illustrating the construction and storage of persistent memory according to an embodiment of this application; Figure 4A schematic diagram illustrating a three-level storage structure according to an embodiment of this application is shown. Figure 5 This illustration schematically shows a memory optimization process according to an embodiment of the present application; Figure 6 This illustration schematically shows a memory dynamic scheduling diagram according to an embodiment of the present application; Figure 7 A schematic diagram illustrating the five-dimensional scoring logic block diagram according to an embodiment of this application is shown. Figure 8 An adaptive scheduling logic flowchart according to an embodiment of this application is illustrated schematically; Figure 9 This illustration schematically depicts weight updates and soft forgetting according to embodiments of this application; Figure 10 This illustration schematically shows the implementation steps and processes according to embodiments of this application. Figure 1 ; Figure 11 This illustration schematically shows the implementation steps and processes according to embodiments of this application. Figure 2 ; Figure 12 This illustration schematically shows the implementation steps and processes according to embodiments of this application. Figure 3 ; Figure 13 The diagram illustrates the structure of a data storage system for a refining and chemical enterprise work team according to an embodiment of this application.

[0022] Explanation of reference numerals in the attached figures 210 - Acquisition module; 220 - Preprocessing module; 230 - Encoding module; 240 - Storage module; 1 - Information perception module; 2 - Memory encoding module; 3 - Multi-layer storage module; 4 - Dynamic scheduling module; 5 - Optimization iteration module. Detailed Implementation

[0023] The specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are for illustration and explanation only and are not intended to limit the scope of the present invention.

[0024] It should be noted that the acquisition, transmission, storage, use, and processing of data in the technical solution of this application all comply with relevant laws and regulations. In the embodiments of this application, certain existing industry solutions such as software, components, and models may be mentioned. These should be considered exemplary, intended only to illustrate the feasibility of implementing the technical solution of this application, and do not imply that the applicant has already used or necessarily used such solutions.

[0025] It should be noted that if the embodiments of this application involve directional indicators (such as up, down, left, right, front, back, etc.), the directional indicators are only used to explain the relative positional relationship and movement of each component in a certain specific posture (as shown in the figure). If the specific posture changes, the directional indicators will also change accordingly.

[0026] Furthermore, if the embodiments of this application involve descriptions such as "first" or "second," these descriptions are for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, features defined with "first" or "second" may explicitly or implicitly include at least one of those features. Additionally, the technical solutions of various embodiments can be combined with each other, but this must be based on the ability of those skilled in the art to implement them. If the combination of technical solutions is contradictory or impossible to implement, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection claimed in this application.

[0027] Please refer to Figure 1 , Figure 1 This illustration schematically depicts a process flow diagram of a data storage method for a refining and chemical enterprise's work team office space according to an embodiment of this application. This embodiment provides a data storage method for a refining and chemical enterprise's work team office space space, comprising the following steps: Step 110: Obtain basic data, which is the entire process data of the refining and chemical team's office work; In this embodiment, data from the entire refining and chemical work team's office process can be collected uniformly. The collected data can be categorized into compliance data, operational data, interactive data, and equipment status data. The basic data includes shift handover text records, voice recordings, complete work order information, equipment numbers and static / dynamic parameters, inspection locations and results, descriptions of abnormal events, tiered handling measures, process indicator thresholds, safety regulations, personnel qualifications and operating permissions, approval process nodes, user operating habits, historical interaction content, and execution feedback results. This basic data can be collected from existing systems such as MES systems, EAM systems, ticketing systems, and inspection systems.

[0028] The aforementioned data collection can be achieved through real-time monitoring or timed retrieval, depending on the specific scenario; this embodiment does not impose any limitations. For example, real-time monitoring can be used for sudden data such as anomaly reports and emergency operations, while timed retrieval can be used for periodic data such as daily inspections and post-shift summaries, thus ensuring information integrity and timeliness accuracy.

[0029] In practical implementation, the aforementioned real-time monitoring can be achieved by subscribing to the real-time message push channels of the MES system, EAM system, ticketing system, and inspection system via WebSocket long connection or HTTP SSE (Server-Sent Events). When events such as abnormal reporting or emergency operations occur, the source system actively pushes messages to the message receiving queue of the information perception module, which then parses them immediately and enters the preprocessing process. The aforementioned timed data retrieval can be configured through the Quartz timed task scheduler to perform timed data retrieval tasks (such as retrieving the daily inspection plan at 6:00 AM before the shift and retrieving the closed-loop data of the daily work tickets at 10:00 PM after the shift). Incremental data can be retrieved from the source system via a RESTful API (using the last update timestamp as a cursor, only retrieving newly added or changed data).

[0030] Step 120: Preprocess the basic data to obtain standardized text data; In this embodiment, the preprocessing includes data cleaning, format standardization, tagging, and time-series alignment. Data cleaning includes removing duplicates, garbled characters, null values, irrelevant advertisements, and interference information. Format standardization includes converting text, tables, inspection images, and speech-to-text content into a preset format, such as UTF-8 text format. Tagging includes basic timestamps, device tags, shift tags, operational risk level tags, and data security level tags, where security levels are categorized into three levels: ordinary, general risk, and major risk. Time-series alignment includes sorting data according to a three-level dimension of "shift-date-operation process" to resolve the issue of inconsistent time-series data across refining shifts.

[0031] In the labeling process mentioned above, for device labels, they can be automatically bound according to the data source interface (e.g., data collected from the atmospheric and vacuum distillation unit interface of the MES system is automatically labeled "atmospheric and vacuum distillation unit"); for work group labels, they can be automatically bound according to the work group information of the currently logged-in user; for work risk level labels, they can be based on keyword matching rules, such as keywords including "hot work" and "confined space" are automatically marked as "major risk", keywords including "temporary power supply" are marked as "general risk", and if none of the above keywords are included, it is "ordinary"; for data security level labels, they can be automatically determined according to the data source type, for example, safety specifications correspond to major risks, equipment parameters correspond to general risks, and daily office work corresponds to ordinary.

[0032] The aforementioned basic data contains multiple data entries. After data cleaning, format standardization, and tagging, each data entry includes three time-series attribute parameters: shift, date, and work process. Time-series alignment can then be performed based on these attribute parameters. For shifts, the data timestamp can be automatically matched to the company's shift schedule (e.g., 08:00-20:00 is the day shift, 20:00-08:00 the next day is the night shift). Dates can be directly extracted from the data timestamp. Work processes can be automatically determined based on the data source and content; for example, data from the work ticket system is labeled as the "Work Ticket Processing" process, and data from the inspection system is labeled as the "Safety Inspection" process.

[0033] Step 130: Input the standardized text data into a preset memory encoding model to obtain a standardized memory structure; In this embodiment, the memory encoding model can be pre-built based on an industry-fine-tuned semantic model and an entity linking model, and consists of four main stages: dataset construction, LoRA lightweight fine-tuning training, iterative optimization of the entity linking model, and dual-model fusion inference.

[0034] In some embodiments, the aforementioned preset memory encoding model includes a semantic fine-tuning model and an entity linking model. The semantic fine-tuning model can be obtained by fine-tuning a large language model. The entity linking model is used to use the semantic fine-tuning model as a feature extractor, and a sequence labeling layer (such as CRF or BiLSTM-CRF) is superimposed on its output representation to complete the boundary identification and type classification of refining entities. Subsequently, the identified entities are accurately matched with a predefined four-level entity library of the refining industry to complete alias normalization and ambiguity resolution. Finally, combined with five major categories of industry-specific relationship rules, relationship matching is completed through a hybrid reasoning mechanism of "rule reasoning + semantic similarity calculation," ultimately outputting standardized "entity-relationship-entity" knowledge triples. This memory encoding model is essentially a hybrid reasoning layer based on the feature representation of the fine-tuned semantic model and integrating rule and statistical methods, fully utilizing the industry semantic encoding capabilities of the fine-tuned semantic model.

[0035] Accordingly, the step of inputting the standardized text data into a preset memory encoding model to obtain a standardized memory structure includes: First, the semantic fine-tuning model extracts entities from the standardized text data to obtain refined entity information. In this embodiment, the semantic fine-tuning model performs sequence labeling on each token of the input standardized text data and outputs the refining entity information contained in the standardized text data, including entity boundary location, entity type (equipment / personnel / operation / specification), and entity attribute value. These entities all originate from a pre-built four-level entity library for the refining industry. This entity library systematically includes six major categories and more than 20,000 entries, namely, unit entities, equipment entities, process parameter entities, safety risk entities, personnel permission entities, and operation type entities, which can cover the industrial entity expression in all business scenarios.

[0036] Then, the entity linking model determines entity pairs based on the refining entity information, and the entity pairs are entity pairs with a relationship type; In this embodiment, the above-mentioned refining entity information can be an entity list. After obtaining the entity list, the model combines all entities in pairs to form candidate entity pairs, and uses a dual-path mechanism of "rule reasoning + semantic similarity calculation" to reason about the industrial association between each pair of entities. Rule-based reasoning involves querying a predefined industrial relationship rule table for each candidate entity pair. This rule table is constructed based on a dedicated relationship dictionary and strictly defines five categories of fixed relationship rules: parameter subordination, equipment operation association, risk control correspondence, permission operation matching, and time-series process association. If the entity type combination in the entity pair matches the matching conditions in the rule table, the corresponding relationship type is directly matched and output. For example, [equipment + operation type] → check if the [equipment-operation association] rule exists; [personnel + operation type] → check the [personnel-permission binding] rule. If an entity pair fails to match the rule table, semantic similarity calculation is performed. Specifically, the two entities and their context text in the original text are encoded into vector representations, and the cosine similarity between the two vectors is calculated. When the cosine similarity reaches or exceeds a threshold, it is determined that there is a meaningful semantic association between the entity pair. Subsequently, the predefined relationship category with the highest similarity is assigned to the entity pair as its relationship type. The threshold can be preset according to actual conditions, for example, 0.8. Through the above dual-path complementary approach, the final output entity pairs all carry relationship types that strictly conform to the five major categories of industrial relationship rules. This allows for the precise identification of entity pairs with clear relationship types from the original refining entity information, laying the foundation for subsequent triple construction and knowledge structuring.

[0037] Then, the entity linking model constructs multiple knowledge triples based on the entity pairs, and transforms the multiple knowledge triples into entity relation data blocks. Each knowledge triple includes a head entity, a relation type, and a tail entity. In this embodiment, a dedicated dictionary can be used to normalize aliases, resolve ambiguities, and complete attributes for entities in entity pairs, thus unifying entity definitions. This dedicated dictionary can be used to create an ambiguity mapping table for refining synonyms and related professional terms (such as equipment with the same name for different devices, or different risk levels for the same type of work), effectively avoiding entity recognition confusion. Then, based on the unified entity pairs, standardized knowledge triples are constructed. Each triple contains a head entity (name + type + attribute), a relation type (one of the five major categories), and a tail entity (name + type + attribute). One input text corresponds to multiple triples, forming a fragment of the industrial knowledge graph. Finally, the list of standardized triples is serialized into a JSON-formatted entity relation data block.

[0038] Among them, the relationship in the knowledge triple is the relationship type between entities, such as: "Crude oil pump - belongs to - atmospheric and vacuum distillation unit" (parameter subordinate relationship), "Hot work - involved equipment - heating furnace" (equipment operation association), "Zhang San - holds authority - hot work permit" (authority operation matching), "Leakage - corresponding prevention and control - emergency pump stop" (risk prevention and control correspondence), "Shift handover - time sequence connection - previous shift" (time sequence process association).

[0039] Then, a memory metadata object is created from the entity linking model; In this embodiment, a memory metadata object is created, which contains attribute fields throughout the entire lifecycle: memory ID (UUID), timestamp, shift tag, device tag, risk level, data security level (linked to risk level), source system, confidence level, etc. A 1024-dimensional semantic vector is generated based on the attribute fields and appended to the memory metadata object as a floating-point array field.

[0040] Finally, the entity linking model assembles the entity relationship data block, the memory metadata object, and the semantic vector of the memory metadata object to obtain a standardized memory structure.

[0041] In this embodiment, entity relationship data blocks, metadata objects, and semantic vectors can be assembled into a standardized memory structure in JSON format, and finally output a memory unit carrying a 1024-dimensional semantic vector and full lifecycle attributes, providing a standardized data foundation for hierarchical storage and retrieval.

[0042] In some embodiments, the process of constructing the semantic fine-tuning model includes: First, obtain the training dataset; In this embodiment, the training dataset can be the original corpus data that has been manually annotated (entity / relationship / scene / risk level four annotation) and cleaned (duplicate, noise reduction, sample balancing) to output 1 million+ standardized training corpus, which is the training dataset.

[0043] The original data in the corpus covers real business data of mainstream refining and chemical units such as atmospheric and vacuum distillation, catalytic cracking, hydrogenation, and reforming. Specifically, it is divided into four categories: 1) Equipment and process: static equipment ledgers, process parameter thresholds, equipment failure history, unit operation logs, and media attribute parameters; 2) Safety and compliance: national chemical safety regulations, enterprise operation management systems, high-risk operation risk control standards, and compliance audit clauses; 3) Team and office: shift handover records, inspection ledgers, various work tickets, approval process records, and work pending logs; 4) Abnormal handling: equipment parameter fluctuations, media leaks, abnormal temperature and pressure, closed-loop rectification of hidden dangers, and emergency response cases.

[0044] The aforementioned manual annotation includes annotations of entities, relationships, scene semantics, and risk levels. Among them, entities include: equipment, personnel, operations, and specifications, and relationships include: predefined operation-equipment association, equipment-process matching, personnel-permission binding, and risk-control.

[0045] The equipment entities include units (atmospheric and vacuum distillation, catalytic cracking, etc.), individual equipment (pumps, heat exchangers, furnaces, etc.), and process parameters (temperature, pressure, flow rate, etc.). Each equipment entity contains attributes such as equipment number, name, type, unit to which it belongs, and design parameters. The personnel entities include operators, supervisors, approvers, etc., and each personnel entity contains attributes such as employee number, name, position, qualification certificate, and operating authority level. The operation entities include operation type (hot work, confined space operations, work at height, etc.), operation status (application in progress, approval in progress, execution in progress, closed loop, etc.), risk identification results, and safety measure list, etc. The regulatory entities include national safety regulations, corporate operation management systems, and process operation procedures, etc., and each regulatory entity contains attributes such as clause number, content summary, applicable scenarios, and effective status, etc.

[0046] The data cleaning process described above includes batch removal of casual conversation, garbled text, null values, duplicate and redundant text, and invalid general text, retaining only valid business semantic data. In cases of scenario imbalance in the original corpus data, a combination of oversampling and undersampling strategies can be used for adjustment. For example, the original corpus data contains approximately 60% routine office-related data, 25% compliance query data, 10% high-risk operation data, and 5% emergency / abnormal data, indicating a significant category imbalance. By employing a combination of oversampling (data augmentation for high-risk operation and emergency / abnormal data: synonym rewriting, context expansion, and scenario variant generation) and undersampling (random sampling for routine office-related data), the sample proportions of the four scenario types are adjusted to approximately 35%:30%:20%:15%, ensuring the model's accuracy in recognizing high-risk and emergency scenarios and avoiding misjudgments of critical safety scenarios due to category imbalance.

[0047] Then, based on the training dataset, the base model is fine-tuned to obtain a semantically fine-tuned model; In this embodiment, the aforementioned base model can be a general open-source base model (such as Qwen-7B or LLaMA-2-7B) as the basic semantic understanding foundation, retaining the original syntax, semantics, and contextual understanding capabilities.

[0048] The aforementioned fine-tuning training can be LoRA fine-tuning training, employing a parameter freezing and low-rank injection strategy. This involves completely freezing the backbone network of the base model, including the K-projection matrix of each attention head in the Transformer layers, as well as the original parameters of all other layers such as the embedding layer, feedforward layer, output layer, and layer normalization. Only the Q-projection matrix and V-projection matrix in the attention layer are opened as injection points for trainable parameters. Specifically, a low-rank decomposition matrix ΔW=BA is injected into the sideways of the weight matrices W_Q and W_V, where B is a d×r dimensional matrix, A is an r×d dimensional matrix, r is the low-rank dimension, and d is the model's hidden dimension. During training, all original parameters of the base model remain frozen, and only the injected A and B matrices are updated. The reason for choosing to fine-tune the Q and V projection matrices while keeping the K projection matrix unchanged is that adjusting Q and V can more accurately guide the model's attention distribution to refining terminology and process logic, while keeping K unchanged preserves the stability of the base model's original key-value matching mechanism, effectively avoiding the computational cost and model crash risk associated with full fine-tuning. With this design, the actual number of trainable parameters is 2 × r × d × layer number, accounting for approximately 1% to 3% of the total model parameters. Lightweight embedding of industry semantic knowledge is achieved through low-rank decomposition.

[0049] Through experimentation, the optimal parameter combination for fine-tuning in the refining vertical domain was found to be: r=16, scaling factor alpha=32, dropout probability=0.1, learning rate=3e-4, and number of iterations=30. Combined with cosine learning rate decay, warm-up strategy, and early stopping to prevent overfitting, the fine-tuning effect and generalization ability can be precisely balanced.

[0050] During training, the labeled refining-specific corpus in the training dataset is first tokenized to generate a semantic vector sequence adapted to the input of the base model. Then, an incremental training phase begins, where only the parameters of the LoRA low-rank matrix are updated, while all original parameters of the base model remain frozen. This phase continuously learns refining terminology, process logic, risk semantics, and operational process features to correct semantic biases of the general model towards industrial vocabulary. The specific training process for the LoRA incremental weights is as follows: The tokenized input sequence is fed into the frozen base model's Transformer layer for forward propagation. The LoRA increment ΔW = BA is calculated in the bypass paths of the Q and V projection matrices of the attention layer and added to the corresponding original weight outputs to obtain the final attention output. Cross-entropy loss is calculated between the model output and the labeled tags. During backpropagation, only the gradients of LoRA matrices A and B are calculated; the frozen base model parameters do not participate in gradient calculation. The AdamW optimizer is used to update the parameters of A and B. After approximately 30 iterations, A and B converge to their optimal values, yielding the required LoRA incremental weights. After training, the LoRA incremental weights are fused with the original large-base model, that is, ΔW=BA is merged back into the original weights to form a fused weight of W_Q'=W_Q+BA, thus obtaining a semantic fine-tuning model specific to refining and chemical industries. This semantic fine-tuning model retains general semantic capabilities while possessing semantic parsing capabilities for the industrial vertical domain. Finally, the performance is validated using real business samples not seen in the refining and chemical industry, ensuring that the semantic fine-tuning model has a significantly improved accuracy in semantic recognition of device names, equipment parameters, high-risk operations, and risky scenarios compared to the general large-base model.

[0051] In some embodiments, the step of fine-tuning the base model based on the training dataset to obtain a semantically fine-tuned model includes: First, the training dataset is input into the Transformer layer of the base model to perform forward propagation, and the cross-entropy loss is calculated based on the output of the forward propagation to obtain the standard cross-entropy loss. In this embodiment, the calculation of cross-entropy loss has been described above and will not be repeated here.

[0052] Second, obtain process causal constraint pairs; the process causal constraint pairs include positive and negative sample pairs, wherein positive sample pairs are entity-relationship pairings that conform to process causality (such as "temperature exceeds threshold → monitoring required"), and negative sample pairs are pairings that violate process logic (such as "temperature exceeds threshold → no action required"), providing a data foundation for incremental training.

[0053] Third, the process causal constraints are encoded using the base model to obtain the process semantic alignment loss; In this embodiment, during the LoRA fine-tuning training phase, in addition to the cross-entropy loss used in LoRA training, a new process semantic alignment loss is added. This process semantic alignment loss is calculated using a contrastive learning framework: positive and negative sample pairs are encoded separately through the fine-tuning model, and the difference between the similarity of positive and negative pairs is calculated, so that the semantic distance of positive pairs approaches the same level and the semantic distance of negative pairs increases. The alignment loss formula is: L_align = -log(exp(sim_pos / τ) / (exp(sim_pos / τ)+exp(sim_neg / τ))), where sim_pos is the semantic similarity of positive sample pairs, sim_neg is the semantic similarity of negative sample pairs, and τ is the temperature coefficient.

[0054] Fourth, based on the standard cross-entropy loss and the process semantic alignment loss, the total training loss is obtained; In this embodiment, the two losses mentioned above can be weighted and summed to obtain the total training loss: L_total = L_CE +λ·L_align, where L_CE is the standard cross-entropy loss and λ is the alignment loss weight coefficient, which is 0.3 by default.

[0055] Fifth, based on the total training loss, backpropagation is performed on the base model to obtain LoRA incremental weights; In this embodiment, the total training loss L_total is backpropagated, and only the gradients of the LoRA matrices A and B are calculated (the frozen base model parameters are not included in the gradient calculation). The AdamW optimizer is used to update the parameters of A and B. After about 30 iterations, A and B converge to their optimal values, which are the required LoRA incremental weights.

[0056] Sixth, after training is completed, the LoRA incremental weights are fused with the base large model to obtain the semantic fine-tuning model.

[0057] In this embodiment, the above-described fusion has been described above and will not be repeated here. The fused model retains general semantic capabilities while possessing both the ability to parse terms in the industrial vertical field and the semantic alignment capability of the causal logic of refining processes, forming a refining-specific semantic fine-tuning model.

[0058] It should be noted that, to ensure the memory encoding model adapts to the dynamic changes in refining and chemical production operations in the long term, it can be continuously evolved from three dimensions: data-driven, quality-driven, and rule-driven. Specifically, this includes the following aspects: 1. During daily operation, the system continuously accumulates manually corrected data, misidentified samples, and data from newly added process operation scenarios. These annotated and corrected corpora are periodically included in the training set. Based on the deployed fine-tuning model, incremental fine-tuning training is performed. This process follows the aforementioned LoRA low-rank adaptation strategy, updating only the low-rank matrix parameters of the injected Q / V projection matrix bypass, while keeping the original parameters of the base model frozen. After training convergence, the updated fine-tuned model weights are output. Without inducing catastrophic forgetting, the model continuously learns newly emerging terms, scenarios, and patterns, gradually improving recognition accuracy and coverage.

[0059] 2. The memory-preserving encoding model evaluates the confidence level of the output during inference. When the confidence level of the parsed result falls below a preset confidence threshold (e.g., 0.6), the sample is automatically pushed to the manual review queue. After manual annotation and correction by business experts, the corrected annotated data is returned to the training dataset, forming a closed-loop feedback loop of "low confidence identification—manual correction—model iteration." Through this mechanism, the model can target its weaknesses for targeted reinforcement, achieving autonomous purification and capability upgrades.

[0060] 3. In response to substantial changes in refining and chemical production operations, such as equipment upgrades, updated operating procedures, and the introduction of new risk scenarios, the system receives new entity and relation rule data as input and updates the entity dictionary and relation rule table. The updated entity dictionary expands with new entries for equipment, facilities, and risks, while the updated relation rules incorporate new process association logic. These updates take effect immediately through dictionary hot-loading and rule configuration synchronization, enabling the model to quickly respond to business changes and ensuring adaptability to emerging scenarios without requiring full retraining.

[0061] Step 140: Based on the classification features of the standardized memory structure, the standardized memory structure is sent to the corresponding storage layer for storage. The storage layer includes a transient memory layer, an attribute memory layer, and an experience memory layer. The transient memory layer is used to store temporary data, the attribute memory layer is used to store static data, and the experience memory layer is used to store historical experience data.

[0062] The instantaneous memory layer stores the following content: current shift context, ongoing work orders, pending tasks, unclosed exceptions, and real-time interactive information. The storage medium can be a high-speed cache (Redis), with an expiration time set to 12-24 hours to ensure millisecond-level response and support real-time interaction and fast querying. Lifecycle rules can be set as follows: default retention time is 12 hours, with automatic incremental summary accumulation across shifts; if inaccessible for more than 24 hours, it is automatically frozen and no longer participates in regular retrieval, only supporting manual traceability queries; a millisecond-level read / write strategy is adopted to limit the total instantaneous memory capacity of a single shift group to avoid cache overflow.

[0063] The attribute memory layer stores the following: fixed information about work teams, personnel qualifications and permissions, fixed equipment ledgers, permanent safety specifications, process thresholds, ticket templates, and fixed approval processes. This data constitutes permanent, static, and compliant data. The storage medium can be a relational database (MySQL / PostgreSQL), with indexes created by unit, work team, and equipment type. It is used for long-term, stable storage of unchanging information, supporting rule verification, compliance judgment, and access control. Lifecycle rules can be set as follows: marked as "permanently valid," disallowing automatic deletion; updates are only supported after manual review, with each update automatically generating a historical version, retaining modification records and operator information to meet refining safety and compliance audit requirements; multi-level indexes are created by unit and work team to ensure high-frequency query efficiency.

[0064] The experience memory layer stores information including: historical work cases, anomaly handling plans, optimized processes, typical problems, frequently asked questions and answers, and key shift handover information. The storage medium can be a hybrid of a vector library (Milvus / FAISS) and a knowledge graph. It is used for permanent storage and automatically participates in retrieval and iteration; the vector index priority is dynamically adjusted according to "usage popularity, time, and confidence level," serving as the core carrier for the agent's continuous learning and lifecycle optimization.

[0065] It should be noted that the three layers can be interconnected through a data synchronization interface. Instantaneous memory can be stored as experience memory. When attribute memory is updated, it is synchronized to instantaneous memory and experience memory in real time to ensure the consistency of data across the entire database.

[0066] After the standardized memory structure is generated, it can be distributed to the corresponding storage level. Specifically, the memory type label can be automatically determined based on the classification characteristics of the standardized memory structure. The specific determination rules are as follows: if the memory content in the standardized memory structure involves temporary data of the current shift, including work tickets being processed, pending tasks, unclosed exceptions, real-time interactive information, etc., then the memory type label is marked as transient type; if the memory content involves permanent static compliant data, including fixed information of the work group, personnel qualifications and permissions, fixed equipment ledgers, safety specifications, process thresholds, ticket templates, fixed approval processes, etc., then the memory type label is marked as attribute type; if the memory content involves historical experience data that can be referenced, including historical work cases, exception handling plans, optimized processes, typical problems, high-frequency Q&As, key information for shift handover, etc., then the memory type label is marked as experience type.

[0067] After determining the type label, the standardized memory structure is serialized from the internal JSON object into a binary format (LZ4 compression) suitable for transmission in the Kafka message queue; the corresponding Kafka Topic is selected according to the memory type label (instant-topic, attribute-topic, experience-topic); finally, the compressed message is sent to the corresponding Kafka Topic and consumed and received by the unified data gateway.

[0068] In the above implementation process, basic data is acquired, which is the entire process data of the refining and chemical team's office work. This basic data is preprocessed to obtain standardized text data. The standardized text data is then input into a preset memory encoding model to obtain a standardized memory structure. Based on the classification features of the standardized memory structure, it is sent to the corresponding storage layer for storage. This storage layer includes a transient memory layer, an attribute memory layer, and an experience memory layer. The transient memory layer stores temporary data, the attribute memory layer stores static data, and the experience memory layer stores historical experience data. This three-level hierarchical memory architecture enables persistent storage of memories across shifts, dates, and cycles, effectively alleviating the problems of limited context windows, discontinuous shift handover information, and unreusable historical experience in traditional intelligent agents, ensuring continuous traceability of team office information. By standardizing information through a preset memory encoding model and combining multi-layered storage, retrieval speed and storage utilization are significantly improved, solving the problems of chaotic traditional text storage, inefficient retrieval, and easy omissions. Actual retrieval response time: instantaneous memory layer ≤5ms, attribute memory layer ≤15ms, experience memory layer ≤50ms, which is more than 8 times more efficient than traditional text storage retrieval. This reduces the workload of work teams and helps improve overall office efficiency. It reduces repetitive data entry, manual queries, and manual verification, enabling automatic reuse of experience, automatic information push, and automatic process assistance, significantly improving the automation and intelligence level of work teams.

[0069] In some embodiments, a data gateway and three types of dedicated synchronization interfaces can be set up, along with three synchronization mechanisms: CDC incremental data capture, scheduled tasks, and real-time subscription, to achieve interconnection and interoperability of the three-tier storage, thereby solving the problems of data fragmentation and high synchronization latency in traditional tiered storage.

[0070] The data gateway provides standardized RESTful / gRPC interfaces to the outside world and routes requests internally to the corresponding storage layer. All read and write requests undergo permission verification, format conversion, and flow control through the gateway to avoid cross-layer access conflicts. The data gateway determines routes based on the memory type tag in the standardized memory structure. After reading the tag, the data gateway routes the complete standardized memory structure to the corresponding storage layer through a preset routing table.

[0071] In some embodiments, each storage layer is connected to a data gateway, the data gateway caching frequently accessed data in the attribute memory layer, and the method further includes: First, obtain the attribute memory query request; Then, based on the attribute memory query request, the data gateway's cache is queried to obtain the cache query result; Then, if the cached query result is empty, the attribute memory query request is routed to the attribute memory layer through the data gateway to obtain the query result; Then, if the cached query result is not empty, the cached query result is used as the query result.

[0072] In this embodiment, attribute memory queries are triggered in three ways: 1. When a user inputs static information such as equipment parameters, safety specifications, and personnel permissions, the scenario parsing module determines it as an "equipment ledger query" or "compliance query" scenario and automatically triggers attribute memory retrieval; 2. When a user processes a work order, compliance verification is performed by retrieving safety specifications and ticket templates from the attribute memory layer; 3. When an equipment alarm event occurs, the design parameters and thresholds of the equipment in the attribute memory layer are retrieved for comparison and analysis. After triggering, an attribute memory query request (carrying retrieval conditions such as equipment number / specification clause number) can be sent to the attribute memory layer through the data gateway. The gateway prioritizes reading the hotspot cache (response ≤10ms), and if the cache is not hit, it routes the query to the attribute memory layer.

[0073] The data gateway can enable a persistent caching strategy for hot data at the attribute layer, preloading frequently accessed data, such as ticket templates and process thresholds, into the Redis hotspot partition. When a query is initiated, the hotspot cache is read first, with a response latency of ≤10ms. If it is cold data (i.e., not found in the cache), the data gateway directly routes the query to the storage medium corresponding to the attribute memory layer (such as a MySQL cluster query), without any intermediate conversion, achieving millisecond-level real-time invocation.

[0074] In some embodiments, it also includes: In response to the precipitation trigger signal, the data to be precipitated in the transient memory layer is synchronized to the empirical memory layer.

[0075] In this embodiment, the aforementioned sedimentation trigger signal can be triggered at a fixed time or at a specific time. For example, a timed synchronization task can be initiated at the daily shift handover node (at a fixed time), i.e., a sedimentation trigger signal is sent. Alternatively, it can be determined that the abnormal event has been handled successfully by real-time monitoring of message pushes from the MES system / inspection system and receiving status change messages such as "abnormal status recovery," "alarm clearance," and "work order closure." Or, it can be determined that the work order has passed final review by real-time monitoring of approval process message pushes from the ticketing system and receiving messages such as "final review passed" and "work order status changed to closed loop." The aforementioned status change events can be sent to the data gateway as sedimentation trigger signals, and the gateway initiates the sedimentation process.

[0076] Upon receiving the sedimentation trigger signal, the data to be sedimented is read from the transient memory layer. It is then filtered at the field level according to a preset whitelist (retaining: entity information, relation triples, handling procedures, risk levels, timestamps, shift tags; removing: temporary dialogue text, casual conversation content, intermediate state operation logs). The filtered data is asynchronously pushed to the experience memory layer for storage via a Kafka message queue. Data packets can be compressed using the LZ4 compression algorithm, transmitted in chunks (512KB per chunk), and resumed from where it left off, ensuring stable transmission across storage layers. The aforementioned data to be sedimented can refer to data describing attributes, such as security specifications, equipment parameters, and personnel permissions.

[0077] In some embodiments, it also includes: When the data in the attribute memory layer is updated, the instantaneous memory layer and the experience memory layer are updated based on the updated data in the attribute memory layer.

[0078] In this embodiment, when attribute data such as safety specifications, equipment parameters, and personnel permissions are manually updated, the changed content (i.e., updated data) can be captured in real time through MySQL Binlog logs (CDC incremental capture) and pushed to the transient memory layer and the experience memory layer. Attribute data changes need to be pushed to both layers simultaneously, but the content pushed differs: the updated attribute values ​​are pushed to the transient layer (used to refresh the cache, because the transient layer caches attribute data copies during runtime, and the cache must be updated synchronously when attributes change; otherwise, the scheduling module reading expired cache may lead to compliance verification errors); the attribute change events are pushed to the experience layer (used to update the attribute fields of the corresponding nodes in the knowledge graph, ensuring consistency between the graph data and the attribute layer), synchronously updating the corresponding related data, ensuring data consistency across the three layers, and effectively avoiding operational risks caused by inconsistent specifications / parameters.

[0079] It should be noted that the three storage layers are physically independent. A failure in one layer will not affect the operation of the other two layers. Synchronization tasks will automatically retry 3 times if they fail. If a retry fails, it will be written to the exception log and an alarm will be pushed to the administrator.

[0080] It should also be noted that each memory structure carries a lifecycle attribute chain, with attribute fields including: {creation_ts (creation timestamp), access_count (number of accesses), last_access_ts (last access time), confidence_score (confidence score), conflict_count (number of conflicts), soft_forget_weight (soft forgetting weight), version_chain_id (version chain ID), audit_trail (audit trail log)}. The lifecycle attributes are automatically updated at each stage: all attributes are initialized during the encoding stage; access_count and last_access_ts are appended during the storage stage; access_count is updated during the retrieval stage; usage scenarios and adoption results are recorded in audit_trail during the scheduling stage; confidence_score and conflict_count are updated during the feedback stage; and soft_forget_weight is updated and version information is appended to version_chain_id during the optimization stage. The `audit_trail` field uses an append-only write mode to record the type, time, operator, and a summary of the changes for each operation, forming an immutable operation log chain. This meets the auditable and traceable compliance requirements of refining and chemical enterprises for memory changes. It ensures that memory governance decisions are based on evidence and meets the rigid requirements of industry compliance audits.

[0081] In refining scenarios, numerous parameter changes, standard updates, and adjustments to disposal procedures lead to memory conflicts. Existing technologies often employ a method of directly overwriting old data with new data, which easily results in the loss of historical experience and failure of compliance traceability. In some embodiments, the method further includes: First, obtain the newly written data from the storage layer; Then, based on the newly written data and the existing memory data in the storage layer, the conflict type is determined; Then, if the conflict type is a device parameter conflict, the storage layer is updated according to the first update strategy; Then, if the conflict type is a security specification conflict, the storage layer is updated according to the second update strategy; Then, in the case where the conflict type is an anomaly handling scheme conflict, the storage layer is updated according to the third update strategy.

[0082] In this embodiment, confidence weights can be predefined, such as: manual on-site data entry Trust = 1.0, business system synchronization Trust = 0.9, agent inference generation Trust = 0.5, and historical inference data Trust = 0.2. During conflict determination, if two or more conflicting memories exist for the same entity (equipment / specification), the conflict resolution process is triggered. Conflict determination occurs in the memory management phase of the optimization iteration module, specifically during memory addition / update. When receiving memory data written back from multi-layer storage, the optimization iteration module performs conflict detection between newly written memories and existing memories in the database.

[0083] The criterion for determining whether there is a conflict in equipment parameters is the entity type field in the newly written data (i.e., the newly written standard memory structure). When a newly written entity type tag of "equipment entity" or "process parameter entity" is detected, and there are two inconsistent values ​​for the same parameter of the same equipment entity, it is determined to be a conflict in equipment parameters. For equipment parameter conflicts (such as changes in temperature or pressure thresholds), the corresponding first update strategy is: prioritize the use of data with high confidence and the latest time, do not delete old data, but include it in the historical version library and mark the change time and operator for process traceability.

[0084] For example, an operator enters "Atmospheric and vacuum distillation unit heater outlet temperature threshold 365℃" on a certain day, while the experience memory layer already contains "Heater outlet temperature threshold 360℃" (entered 3 months ago). When writing a new memory, if two inconsistent values ​​for the same parameter (outlet temperature threshold) of the same equipment entity (heater) are detected, it is determined to be an "equipment parameter conflict". In this case, the data with high confidence (manual on-site entry Trust=1.0) + the latest time (365℃) can be adopted, and the old data (360℃) is not deleted, but is added to the historical version library and marked with the change time and operator.

[0085] The criteria for determining whether a safety regulation conflict exists are the entity type field and the source system field in the newly written data (i.e., the newly written standard memory structure). A safety regulation conflict is determined when the newly written data meets the following conditions: 1. The entity type label is "Standard Entity"; 2. The source system identifier is "Enterprise System Management System" or "National Chemical Safety Standards Library"; 3. The clause number is the same as the existing clause number in the attribute memory layer, but the semantic similarity of the content summary is less than 0.7 (i.e., the content has undergone substantial changes). If all three conditions are met simultaneously, a safety regulation conflict exists. For safety regulation conflicts (new regulations replacing old regulations), the corresponding second update strategy can be: automatically mark the old regulations as "invalid," retain only viewing permissions, and no longer participate in retrieval; the new regulations are pinned to the top and simultaneously pushed to all team terminals for reminders.

[0086] For example: A company updates its hot work safety distance regulations. The new regulation states "Hot work must be at least 30 meters away from flammable materials" (clause number AQ-DH-012), while the old regulation stated "≥20 meters". The system collects the new regulation text from the company's policy system, performs semantic parsing, entity extraction (identifying it as a regulatory entity), generates triples, and encapsulates it into a standardized memory structure. This structured memory is routed through a gateway to the attribute memory layer for writing. Upon detecting the attribute memory layer write event, the new memory's clause number AQ-DH-012 is extracted. Existing memories with the same clause number in the attribute memory layer are queried. The old memory is found to contain "≥20 meters," with a semantic similarity of only 0.55 (below the 0.7 threshold), indicating a safety regulation conflict. The old regulation is then marked as "invalid," retaining only viewing access and no longer participating in regular searches (total score × 0.3 in five-dimensional scoring). The new regulation is pinned to the top and its confidence level is initialized to 1.0 (Trust=1.0). A control command is generated and pushed to the multi-layer storage module to update the memory status label. Simultaneously, a push notification is triggered to all workstation terminals.

[0087] The criteria for determining whether an anomaly handling plan conflict exists are the entity type field, source system field, and memory type label field in the newly written data (i.e., the newly written standard memory structure). An anomaly handling plan conflict is determined when the newly written data meets the following conditions: 1. The entity type label contains entities of the "handling plan" or "emergency measures" type; 2. The memory type label is "experience"; 3. The anomaly type entity in the new memory is the same as that in the existing memory, and the handling measures entity is different, but there are no parameter or specification contradictions. If all three conditions are met simultaneously, it indicates that multiple different handling plans exist for the same anomaly scenario, indicating an anomaly handling plan conflict. For anomaly handling plan conflicts, the corresponding third update strategy could be: do not overwrite, sort by plan execution success rate, retain all plans and label applicable scenarios, and select the best plan for scheduling.

[0088] For example, the experience memory layer contains two solutions for the same anomaly (crude oil pump leakage): Solution A, "Stop the pump and replace the seal" (85% success rate), and Solution B, "Reduced pressure operation + temporary leak sealing" (60% success rate). The two memories have different solutions but apply to the same scenario, thus constituting a "conflicting anomaly handling solution." In this case, the solution is not overwritten; all solutions are retained based on their success rate, with Solution A given priority and marked "High Success Rate First Choice," while Solution B is marked "Alternative Solution," for the intelligent agent to select the best option during scheduling.

[0089] It should be noted that all historical versions resulting from conflicts are archived in a unified manner, and each version is bound to an operation log, supporting backtracking by time, equipment, and work group, which meets the requirements of refining and chemical safety production audit.

[0090] In some embodiments, before performing full conflict detection, it can be determined whether the conflict candidate memory belongs to the same process context, thereby significantly reducing the false alarm rate of conflict detection. Determining the conflict type based on the newly written data and existing memory data in the storage layer includes: First, based on the newly written data and existing memory data in the storage layer, it is determined whether there are two or more memory data for the same entity. Then, when it is determined that there are two or more memory records for the same entity, the set of associated entities is determined; Then, based on the process topology diagram, it is determined whether the entities in the associated entity set are in the same process context; Then, if it is determined that the entities in the associated entity set are in the same process context, the conflict type is determined based on the newly written data and the existing memory data in the storage layer.

[0091] In this embodiment, a process topology graph can be maintained. Graph nodes represent equipment entities, process parameter entities, and operation entities, while graph edges represent predefined process flow relationships. The process topology graph can be used to determine whether any two entities are in the same process flow link. When two or more memories of the same entity are detected, the set of entities associated with the memory is first extracted, and the process topology graph is queried to determine whether the entities are in the same process context (i.e., whether a connected path exists). Only when the entities associated with the memory belong to the same process context is the subsequent conflict resolution algorithm triggered, i.e., it is determined whether there is a conflict between the newly written data in the storage layer and the existing memory data; if they do not belong to the same process context, it is determined to be non-conflicting (normal differences between different process steps), and the conflict resolution process is skipped directly.

[0092] The above mechanism reduces the false alarm rate of conflict detection by more than 60%, avoids misjudging normal parameter differences between different devices and different process links as memory conflicts, and significantly improves the accuracy and efficiency of memory management.

[0093] In some embodiments, the method further includes: First, if the last access time of the memory data in the storage layer exceeds a preset time threshold, the memory data is determined to be forgotten data. Then, based on the last access time and the current time of the forgotten data, the number of days of non-use is calculated; Then, based on the hierarchy and risk level of the forgotten data, the daily decay rate is determined; Finally, the weights of the forgotten data are updated based on the number of unused days and the daily decay rate.

[0094] In this embodiment, a scheduled task can be executed (batch execution at 2:00 AM daily) to periodically scan the experience memory layer and the transient memory layer, checking whether the last access time of each memory data exceeds a time threshold (e.g., the time threshold for transient memory is 15 days, and the time threshold for experience memory is 90 days). If it exceeds the threshold and has not been retrieved, soft forgetting processing is triggered, namely: reading the last access time T_last and the current time T_now of the memory data, calculating the number of unused days ΔT=T_now-T_last; then reading the hierarchical label (transient / experience) and risk level label (normal / moderate / major) of the memory data, selecting the corresponding daily decay rate λ according to the preset decay coefficient table (e.g., λ=0.08 for transient memory normal tasks, λ=0.02 for experience memory normal experience, and λ=0.001 for experience memory major risk emergency); calculating the current weight W_current=W_initial×(1-λ)^ΔT, where W_initial is the initial weight (e.g., it can be 1.0). If W_current drops below the threshold (e.g., 0.2), the memory will be marked as "low weight". During retrieval, it can be used to reduce its scoring weight (total score × 0.3) but the data will be completely preserved. In manual retrieval or emergency scenarios, the weight can be restored to 1.0 with one click.

[0095] It should be noted that each of the above standardized memory structures has a confidence level, which represents the reliability of the memory and is strongly linked to the accuracy of refining operations. This confidence level can be continuously iterated upon, and specifically includes: (1) If the memory is adopted by the team members and executed without error: confidence level +0.1, maximum 1.0; (2) The memory was adopted but the execution was flawed: confidence level -0.2, and marked as "to be optimized"; (3) Memory was actively rejected: confidence level -0.3; (4) When the confidence level of a major risk memory is below 0.4, the system will automatically push it to the administrator for manual review to prevent the spread of erroneous experience.

[0096] In some embodiments, the method further includes: First, acquire user input information and system event information in real time; In this embodiment, user input information includes: text actively entered by the user, speech transcription, form operation and other information, and the above-mentioned system event information includes: system passive events, such as equipment alarms, job initiation, shift switching, approval push and so on.

[0097] Then, based on the user input information and the system event information, the scene information is determined; In this embodiment, user input information and system event information can be uniformly converted into standard text format, invalid symbols and duplicate content can be removed, and basic tags such as the currently logged-in team, device, shift and real-time system load can be automatically bound to form an original parsed message carrying complete context information.

[0098] It can have a built-in rule engine for scenario judgment based on keyword regular expression matching and entity matching rules. Specifically, for six core business scenarios, dedicated judgment rules can be configured: Work ticket processing scenarios require matching "work type entity + equipment entity + risk tag" simultaneously; safety inspection scenarios require matching "inspection route / location + equipment status description"; shift handover scenarios require matching "shift change event + handover-related terms"; equipment ledger query scenarios only involve static parameters and file queries, without operation or handling descriptions; anomaly handling scenarios require matching "abnormal phenomenon + equipment entity + emergency tag"; and process approval scenarios require matching approval-related terms and document ID. The rule engine outputs first-level scenario classification results, enabling rapid differentiation of 95% of common business scenarios.

[0099] For ambiguous sentences and colloquial expressions that the rule engine cannot accurately distinguish, a lightweight BERT classification model fine-tuned from the refined corpus can be used for secondary accurate parsing. This BERT classification model and the LoRA fine-tuned semantic model in the memory encoding module can share the same refined corpus dataset for training, both possessing the ability to understand refined corpus terminology. The BERT classification model has approximately 110M parameters and is used for scene classification. The BERT classification model receives the text filtered by the rule engine and the identified entities, outputs a scene confidence score, and corrects and confirms the initial classification results. Its single inference time is less than 10 milliseconds, meeting the real-time response requirements of industrial scenarios.

[0100] Four refining-specific extended features can also be extracted to refine the scenario: First, the task urgency feature, which is divided into three levels: normal, urgent, and emergency, based on the equipment alarm level and operation type; second, the risk level feature, which links the original risk labels in the memory bank and directly inherits the data security level marked in the coding stage; third, the system load feature, which collects the number of online terminals and the number of concurrent interfaces in real time and marks them as idle, medium, or high load; and fourth, the operating environment feature, which is bound to the current device, team, and shift to distinguish cross-device and cross-shift operations.

[0101] After feature extraction, the system numerically encodes and concatenates six categories of features: primary business type, task urgency, risk level, system load, device, and shift. The structured features, after encoding, occupy 49 dimensions, while the remaining 79 dimensions are semantically filled in. The last hidden state of the user input text, encoded using a LoRA fine-tuning model, is taken, and after mean pooling, the first 79 dimensions of the floating-point vector are used as semantic feature supplementation. After concatenation, L2 normalization is applied to generate a 128-dimensional floating-point scene feature vector, enabling the scene vector to simultaneously carry semantic and structured scene features.

[0102] Ultimately, the system generates a unique, standardized scenario label for the current task, such as "Abnormal Handling - Major Risk - Emergency" or "Work Permit - General Risk - Ordinary". This scenario label, together with the scenario feature vector, constitutes the scenario information.

[0103] Then, based on the scene information, a retrieval is performed in the storage layer to obtain the memory fragment; In this embodiment, parallel retrieval can be initiated simultaneously from the transient memory layer, attribute memory layer, and experience memory layer based on scene information: the transient memory layer, based on Redis cache, retrieves temporary records of similar anomalies for the current shift; the attribute memory layer, based on MySQL relational database, retrieves static information such as design parameters and security thresholds of relevant equipment; the experience memory layer, based on Milvus vector library, uses the 128-dimensional scene feature vector generated during the scene parsing stage as the query vector to perform an approximate nearest neighbor search to retrieve historical similar handling cases. The three-layer retrieval results are merged and deduplicated to form a candidate memory set.

[0104] For each memory in the candidate memory set, a five-dimensional weighted scoring system is used for comprehensive evaluation. The five scoring dimensions are: semantic similarity (calculated by the cosine similarity between the scene vector and the memory vector, weight 30%); time decay coefficient (more recent memories have higher weight, weight 25%); usage frequency (higher historical call frequency has higher weight, weight 20%); task matching degree (consistency with the current task or scene tag, weight 15%); and confidence (memory accuracy and reliability score, including soft forgetting weighting, weight 10%). The total score is calculated as follows: Total Score = Semantic Similarity × 30% + Time Decay Coefficient × 25% + Usage Frequency × 20% + Task Matching Degree × 15% + Confidence × 10%. In addition to the basic score, the system also adds linkage rules: the total score of standardized memories marked as "invalid" is directly multiplied by 0.3; the total score of emergency memories with major risks is multiplied by 1.2 for weighting; the total score of frozen historical versions is multiplied by 0.2, only as a fallback reference. Through the above scoring mechanism, low-weight memories after soft forgetting, conflicting historical versions, and invalid specifications are automatically reduced in weight, while high-confidence and high-risk emergency memories are automatically weighted to ensure that high-value memories are prioritized.

[0105] To further improve retrieval efficiency and accuracy, a real-time memory heatmap can be maintained. This heatmap is a 6×N two-dimensional matrix. Rows correspond to six core business scenarios: work order processing, safety inspection, shift handover, equipment ledger query, anomaly handling, and process approval. Columns correspond to N memory clusters formed by clustering by device and memory type. The matrix elements are the access popularity scores of the corresponding memory clusters in that scenario. When a specific business scenario is detected, the heatmap is queried to obtain the popularity distribution of each memory cluster in that scenario: a deep search is performed on the memory clusters with high popularity, retrieving the top-8 results and recursively expanding related memories; a lightweight search is performed on the memory clusters with low popularity, retrieving only the top-3 results without recursive expansion. After every 100 interactions, the heatmap is updated using an exponential moving average strategy. The update formula is H_new = α·H_recent + (1-α)·H_old, where H_new is the updated heatmap matrix, H_recent is the recent heatmap calculated based on the actual access frequency of each memory cluster for each business scenario within the most recent statistical period (e.g., every 100 interactions), H_old is the old heatmap matrix before the update, and α is the smoothing coefficient, which is set to 0.2 by default, so that the heatmap can reflect recent access trends without drastic changes due to short-term fluctuations.

[0106] Taking the user input "How to handle crude oil pump leakage" as an example, the complete retrieval and scoring process is as follows: The input consists of a 128-dimensional scene feature vector output from the scene analysis stage and the "abnormal handling" scene label; the system searches the transient memory layer for temporary records of similar abnormalities in the current shift, the attribute memory layer for static information such as the crude oil pump's design parameters and safety thresholds, and the experience memory layer for a near nearest neighbor search using the scene vector to retrieve historical cases of similar abnormal handling; after merging and deduplicating the three-layer retrieval results, a five-dimensional score is calculated for each record; the records are sorted from highest to lowest total score, and the Top-5 high-value memory fragments are returned. In the final output ranking list, each memory record includes the memory content, total score, and scores for each dimension.

[0107] Then, a structured reasoning context is generated based on the memory fragments; Finally, the structured reasoning context is input into the large model of the intelligent agent to obtain reasoning information.

[0108] In this embodiment, the number and depth of memory data retrieval can be dynamically adjusted based on task complexity, system load, and interaction stage. Different retrieval strategies can be adopted for different scenario types: for simple queries, such as viewing equipment parameters, only a small number of attribute memories are retrieved, with no more than 3 records retrieved, achieving a lightweight and fast response; for routine work order processing, templates and specifications in attribute memories, as well as historical cases in experience memories, can be retrieved simultaneously, with 3 to 5 records retrieved; for anomaly handling and emergency scenarios, parallel retrieval of all three layers—the instantaneous memory layer, the attribute memory layer, and the experience memory layer—can be initiated, prioritizing high-confidence emergency experiences, increasing the number of records retrieved to 5 to 8, to maximize the reuse of historical handling solutions; when the system is under high load, the number of records retrieved is proactively reduced to ensure overall response speed; in shift handover or debriefing scenarios, the instantaneous memory of the current shift and historical shift handover experiences can be deeply retrieved to generate a complete work summary.

[0109] After determining which memory fragments to invoke, the system does not directly feed them into the large model. Instead, it assembles them using a safety compliance-first injection ranking strategy. For each candidate memory to be injected, the system first calculates its safety compliance priority score: Priority = safety_weight × compliance_level + relevance_weight × relevance_score + freshness_weight × freshness_score, where, Priority: safety compliance priority score. This is the final total score used to determine the order in which memory fragments are injected into the large model's inference context; the higher the score, the earlier it appears. safety_weight: safety compliance weight coefficient, with a default value of 0.4, representing the proportion of the safety compliance level in the total score calculation. When the system detects high-risk operations or abnormal handling scenarios, this coefficient will dynamically increase to 0.5 to further strengthen the priority of safety compliance-related memories. `compliance_level` represents the safety compliance level of the memory, assigned a fixed score based on the memory type, reflecting the degree of relevance between the memory content and safety regulations. The value rules are as follows: Safety regulation-related memories (such as operating procedures and safety regulations) are assigned a value of 1.0; historical case-related memories (such as past handling experience) are assigned a value of 0.6; and temporary information-related memories (such as the current shift's operation records) are assigned a value of 0.3. In high-risk or abnormal scenarios, this value for safety regulation-related memories will be forcibly locked at 1.0. `relevance_weight`: Semantic relevance weight coefficient, default value is 0.3, representing the proportion of the semantic matching degree between the memory content and the current task in the total score. `relevance_score`: Semantic relevance score, indicating the semantic closeness of the current memory fragment with the user input or the current task scenario, usually calculated based on vector similarity. `freshness_weight`: Memory freshness weight coefficient. Default value is 0.3, representing the proportion of the memory's temporal freshness in the total score. `freshness_score`: Memory freshness score, reflecting the timeliness of the memory. Generally, memories that occurred more recently receive a higher freshness score, thus giving more recent similar experiences a higher ranking. Candidate memories are sorted from highest to lowest priority score, ensuring that safety-related memories are always first, followed by historical cases, and then supplementary temporary information. When a high-risk operation (such as hot work, confined space operations, etc.) or an emergency response scenario is detected, the compliance level of safety-related memories is forcibly set to 1.0, and the safety compliance weight is further increased to 0.5 to further strengthen the priority of injecting safety-related memories.

[0110] Taking the user input "How to handle crude oil pump leakage" as an example, after receiving the Top-5 memory fragments, the scheduling module determines the invocation strategy to be a full three-layer parallel invocation based on the scenario tags "abnormal handling - general risk - emergency," with 5 to 8 invocations. Subsequently, the system prioritizes the candidate memories based on safety compliance: safety regulations such as crude oil pump operation safety procedures are ranked first, followed by historical handling cases such as pressure reduction and leak plugging solutions for similar leaks in the past, and temporary information for the current shift, such as the operating parameter curves of the crude oil pump, is added at the end. The sorted memory fragments are assembled into a structured reasoning context, injected into the agent's large model, and the large model, combined with the context, generates the final answer, which is output to the shift terminal. This process ensures that the injected memories comprehensively cover the required information while strictly adhering to the fundamental principle of safety first in the refining industry.

[0111] A soft forgetting mechanism is implemented, which merges duplicate memories, updates conflicting information, and reduces the weight of low-value memories. This avoids memory redundancy, data expiration, and database expansion, ensuring a streamlined, consistent, and reliable memory bank, and enabling the system to operate stably and efficiently over the long term. Compared to fixed-rule scheduling, memory heatmap regulation reduces average retrieval latency by 42%; the soft forgetting mechanism reduces the monthly growth rate of the memory bank from an average of 15% to less than 2%. It features self-optimization throughout the entire memory lifecycle, resulting in a lightweight and long-term stable system.

[0112] By embedding safety regulations, work permit procedures, equipment ledgers, process thresholds, and risk control rules into the memory system, the intelligent agent can automatically call upon compliance evidence, historical cases, and handling experience, reducing human error, improving the safety and standardization of team operations, deeply adapting to high-risk refining scenarios, and significantly enhancing safety and compliance.

[0113] Compared to the standard LoRA fine-tuning, the LoRA dual-path injection improves the accuracy of causal judgment tasks in refining processes by 18.5%; the safety compliance priority injection strategy achieves a 100% safety compliance hit rate in high-risk scenarios.

[0114] The following describes the solution using the office assistant function of a shift in a refining and chemical enterprise's atmospheric and vacuum distillation unit as a typical application example: 1. System Deployment and Hardware Environment: The system adopts a distributed microservice architecture deployed on the enterprise's intranet servers. The hardware configuration is as follows: Application Servers: 2 units, used to run modules such as information perception, dynamic scheduling, and interface services; AI Inference Server: 1 unit, used to run semantic parsing, entity extraction, and vector encoding models; Database Server: 1 unit, configured with Redis caching, MySQL relational database, and Milvus vector library; Storage Server: 1 unit, used for persistent data storage and log storage; Terminal Devices: Team computers, touchscreens, and mobile inspection terminals. The system interfaces with the enterprise's existing MES system, ticket management system, equipment management system, inspection system, and personnel access control system via API interfaces to achieve data interoperability.

[0115] 2. Please refer to Figure 2 , Figure 2 The diagram illustrates the overall system structure according to an embodiment of this application. The information sensing module 1, serving as the system's data entry point, collects real-time data including team interaction text, speech-to-text content, work order information, equipment status, inspection records, shift handover content, anomaly reporting information, and approval process information. After collection, the data is cleaned, deduplicated, and standardized, outputting structured raw data to the memory encoding module 2. The memory encoding module 2 receives the data output from the information sensing module 1 and processes it using an industry-adjusted semantic model: extracting entities such as equipment number, medium, temperature, pressure, risk level, and work type; identifying relationships such as "work—equipment—measures" and "personnel—authority—process"; summarizing them into standard events such as invoicing, inspection, shift handover, anomaly handling, querying, and approval; generating vector features; and outputting standardized memory entries to the multi-layer storage module 3. An embedded intelligent routing and distribution submodule distributes memories to the corresponding levels of the three-layer storage based on memory type tags. The multi-layer storage module 3 contains three levels of storage units: instantaneous memory, attribute memory, and experience memory, receiving and distributing... The system stores memory data from the memory encoding module 2, provides a retrieval interface to the dynamic scheduling module 4, and receives update instructions from the optimization iteration module 5. The dynamic scheduling module 4 receives user queries or business instructions, parses the task scenario and feature vectors, retrieves, scores, and sorts data from the multi-layer storage module 3, performs adaptive scheduling, and injects high-value memories into the agent's inference context. Simultaneously, it sends the scheduling results and feedback data to the optimization iteration module 5. The optimization iteration module 5 performs operations such as memory merging, conflict resolution, confidence updates, weight decay, and soft forgetting on a timed or real-time basis, and writes the optimization results back to the multi-layer storage module 3, achieving self-optimization of the memory bank.

[0116] 3. Please refer to Figure 3 , Figure 3 This schematically illustrates a flowchart of persistent memory construction and storage according to an embodiment of this application; the persistent memory construction process includes: S1 Multi-dimensional Information Acquisition and Preprocessing; Taking the shift handover scenario of a refining and chemical team as an example: the collected content includes the operating parameters of this shift, the status of work order processing, equipment abnormalities, inspection results, outstanding issues, and handover voice messages; irrelevant spoken words, empty values, and garbled characters are removed, and the data is standardized into a text format, with timestamps, team, equipment, and shift tags added; clean, standardized, and coded memory source data is output.

[0117] S2 semantic parsing and standardized coding; The handover process includes: Physical sampling: atmospheric and vacuum distillation unit, heating furnace, crude oil pump, pressure 2.3MPa, temperature 365℃, slight leakage, inspector Zhang San; Relationship identification: Crude oil pump → Belongs to atmospheric and vacuum distillation unit → Minor leakage exists → Needs enhanced monitoring → To be reviewed in the next shift; Event Summary: The event type is "Equipment Anomaly Report," and the intent is "Handover Reminder." Vector encoding: Convert the above information into a 1024-dimensional vector to generate a unique memory ID.

[0118] S3 three-tiered storage; Please refer to Figure 4 , Figure 4 The diagram illustrates a three-level storage structure according to an embodiment of this application. The first level is a Redis layer storing current shift unclosed exceptions, pending tasks, and real-time context, valid for 12 hours and supporting millisecond-level reads. The second level is a MySQL layer storing fixed equipment parameters, security specifications, personnel permissions, process thresholds, and ticket templates, which remain unchanged over time. The third level is a Milvus + knowledge graph layer storing equipment anomaly cases, handling experience, handover points, and historical solutions for similar problems, used for semantic retrieval.

[0119] S4 memory fusion and update optimization.

[0120] Please refer to Figure 5 , Figure 5 The schematic diagram illustrates the memory optimization process according to an embodiment of this application; the memory data to be optimized undergoes repeated memory merging, that is, multiple identical abnormal records are merged into one high-confidence memory; then conflict memory resolution: when the parameters of the same device are inconsistent, the latest confirmed data shall prevail; then expired information marking: invalid processes and old specifications are marked as not participating in high-frequency retrieval; then confidence update: the confidence of adopted and successfully executed memories is increased, and finally the optimized memory bank is output.

[0121] 4. Please refer to Figure 6 , Figure 6 This illustration shows a dynamic memory scheduling diagram according to an embodiment of the present application; the dynamic memory scheduling process includes: S5 Task and Scene Feature Analysis; Taking the following shift's operator query "How to handle crude oil pump leakage" as an example, we will fully describe the six-step implementation process of S5 from input to output.

[0122] The first step is data reception and preprocessing: The dynamic scheduling module receives the user's input text "How to handle crude oil pump leakage" in real time. This input is in plain text format, requiring no speech-to-text transcription or format conversion. Basic cleaning steps check: no invalid symbols, no duplicate content, no garbled characters, and the original text is preserved. Then, the system automatically binds the current session's environment information, reading the currently logged-in shift (e.g., "Atmospheric and vacuum distillation shift 2"), the affiliated unit (atmospheric and vacuum distillation unit), the current shift (day shift, determined based on system time 08:00-20:00), and the current system concurrent load (collecting the number of online terminals and interface concurrency, assuming 3 terminals are online and the load is idle). The original parsed message is constructed by concatenating the following data: {"raw_text":"How to handle crude oil pump leakage","session_info":{"user":"Operator Zhang San","team":"Ambient and vacuum distillation shift 2","device":"Ambient and vacuum distillation unit","shift":"Day shift","system_load":"Idle","timestamp":"2026-07-10T08:15:00"}} The second step is initial classification by the rule engine: The system has a built-in business rule engine specific to the refining team, which achieves rapid initial judgment based on keyword regular expression matching and entity hit combination rules. The rule engine traverses the judgment rules for 6 core business scenarios: no keyword match in work order processing scenario; no keyword match in safety inspection scenario; no keyword match in shift handover scenario; no keyword match in equipment ledger query scenario; and for abnormal handling scenarios, keyword matching: leakage, over-temperature, over-pressure, excessive vibration, alarm, fault, and emergency. The keyword "leakage" is matched (a synonym of "leakage," and the rule engine has a synonym mapping table). Combined rule check: "abnormal phenomenon (leakage) + equipment entity (crude oil pump) + emergency tag (how to handle)" is matched, and it is judged as an abnormal handling scenario. The rule engine outputs the first-level scenario classification result: abnormal handling.

[0123] Step 3: Supplementing Deep Features of the Lightweight Classification Model: While the rule engine provides a clear judgment, the system still calls the lightweight BERT classification model for confidence confirmation. The model is deployed on the AI ​​inference node, with inference time <10ms. Input content: Semantic text "How to handle crude oil pump leakage" filtered by the rule engine + identified entities [crude oil pump, leakage]. Model processing: The BERT classification model performs Token encoding on the input text → Transformer encoding → extracts the hidden state of the [CLS] Token → outputs the softmax probability distribution of 6 business categories through a fully connected layer. Output results (example): Confidence score for the anomaly handling scenario = 0.92, probabilities for the other 5 categories are all <0.05. This confirms the initial classification result of the rule engine is correct and requires no correction.

[0124] Step 4, Multi-dimensional Feature Extraction: In addition to the basic business classification, four refining-specific extended features are extracted: Task Urgency Feature: The current input "leakage" indicates equipment malfunction but lacks major alarm keywords such as "explosion" or "fire," thus classifying it as "urgent" (Level 2, 3-level system). Risk Level Feature: The scheduling module queries the attribute memory layer for the risk label of the "crude oil pump" equipment through the unified data gateway; MySQL returns the equipment's risk level as "general risk" (Level 2, 3-level system). System Load Feature: Real-time collection of the current number of online terminals (3) and interface concurrency (2) classifies it as "idle" (Level 1, 3-level system). Operating Environment Feature: Based on session information binding: Device = Atmospheric and Vacuum Unit, Shift = Atmospheric and Vacuum Unit 2, Shift = Day Shift.

[0125] Step 5: Multi-dimensional feature fusion to generate scene feature vectors: The above 6 types of features are numerically encoded and concatenated: Level 1 business type (abnormal handling = Category 5) → One-Hot encoding → [0,0,0,0,1,0] (6 dimensions); Task urgency (urgent = Level 2) → One-Hot encoding → [0,1,0] (3 dimensions); Risk level (general risk = Level 2) → One-Hot encoding → [0,1,0] (3 dimensions); System load (idle = Level 1) → One-Hot encoding → [1,0,0] (3 dimensions); Device (atmospheric and vacuum distillation = No. 1) → Embedding lookup table → 32-dimensional floating-point vector; Shift (day shift = Category 1) → One-Hot encoding → [1,0] (2 dimensions); The above totals 49 dimensions. The remaining 79 dimensions are semantically completed, and the first 79 dimensions of the floating-point vector are obtained by mean pooling the last hidden state encoded by the LoRA fine-tuning model for "how to handle crude oil pump leakage". The vector is concatenated into a 128-dimensional floating-point vector and then L2 normalized so that all components fall within the range [-1,1]. This vector carries comprehensive information including semantics, context, and state, serving as the basis for subsequent memory retrieval and scoring matching.

[0126] Step 6: Bind scene tags and output parsing results: Generate a unique standardized scene tag for the current task, in the format "Business Type-Risk Level-Urgency": Scene tag: Anomaly Handling-General Risk-Urgent. The parsing results are simultaneously sent in two directions: Downward → to the dynamically scheduled retrieval module (S6), carrying the scene vector (128 dimensions) and scene tags, and initiating the memory retrieval process; Backward → to the optimization iteration module, which sends back the parsing log (input text, classification results, confidence score, and time consumption) for continuous optimization of the subsequent model and rules.

[0127] S6 Multi-dimensional memory retrieval and comprehensive scoring; Please refer to Figure 7 , Figure 7The diagram illustrates a five-dimensional scoring logic block diagram according to an embodiment of this application; taking "how to handle crude oil pump leakage" as an example, the input is a 128-dimensional scene vector (abnormal handling scenario) output by S5 and the scene label "abnormal handling - general risk - emergency". The processing includes: (1) Three-layer parallel retrieval: The dynamic scheduling module initiates a three-layer parallel retrieval request to the unified data gateway. Temporary memory layer (Redis) retrieval: Using "atmospheric and vacuum distillation unit + current shift + abnormality" as the condition, it retrieves whether there are temporary records of similar abnormalities in the current shift (such as the operating parameter curve of the crude oil pump in this shift, the last inspection record), and hits 2 temporary memories. Attribute memory layer (MySQL) retrieval: Using "equipment number = crude oil pump P-101B" as the condition, it retrieves static information such as the design parameters, safety thresholds, and operating procedures of the crude oil pump, and hits 3 attribute memories. Experience memory layer (Milvus) retrieval: Using the 128-dimensional scene vector as the query vector, it performs an approximate nearest neighbor search (Top-10) to retrieve historical cases of handling similar abnormalities, and hits 5 experience memories with similarity ≥ 0.7.

[0128] (2) Merging and deduplication and five-dimensional scoring: After merging and deduplicating the three-layer search results, there are a total of 10 candidate memories. The five-dimensional scores are calculated for each one. Taking one of the experience memories, "Crude oil pump shaft seal leakage treatment plan - pressure reduction operation + temporary leak plugging," as an example: Semantic similarity = 0.89 (cosine similarity between the 128-dimensional scene vector and the 1024-dimensional vector of this memory) × 30% = 0.267; Time decay coefficient = 0.7 (generated 3 months ago, decayed) × 25% = 0.175; Usage popularity = 0.8 (called 6 times in history, high popularity) × 20% = 0.16; Task matching degree = 0.95 (scene tag perfectly matches "abnormal handling") × 15% = 0.1425; Confidence = 0.85 (adopted and successfully executed, high confidence) × 10% = 0.085; Total score = 0.267 + 0.175 + 0.16 + 0.1425 + 0.085 = 0.8295. Additional linkage rule: Total score of emergency memory for major risks × 1.2 (This clause applies to general risks).

[0129] (3) Sorting output: Sort by total score from high to low and return the Top-5 high-value memory fragments. The output is a list of the sorted Top-5 memory fragments, each containing the memory content, total score, and scores for each dimension, and is output to the S7 adaptive scheduling stage.

[0130] S7 Adaptive Scheduling and Inference Injection; Please refer to Figure 8 , Figure 8The diagram illustrates an adaptive scheduling logic flowchart according to an embodiment of this application; the inputs are the Top-5 memory segment list output by S6 and the scene labels "Abnormal Handling - General Risk - Emergency". Processing steps: (1) Call strategy determination: The scheduling module determines the call strategy as "all three layers of parallel calls, 5-8 calls" (abnormal handling scenario) based on the scenario label. The current Top-5 meet the call count requirement.

[0131] (2) Sorting and Injection: Sort the 5 memories according to the refining operation logic, with safety regulations as the priority (such as the crude oil pump operation safety procedure) → historical cases as the second priority (such as the pressure reduction and plugging scheme of the previous similar leakage) → temporary information supplement (such as the crude oil pump operation parameter curve of this shift).

[0132] (3) Reasoning Context Assembly: The sorted memories are assembled into a structured reasoning context, injected into the agent's large model, and answers are generated. Example output answer: "Based on historical experience, the following measures are recommended for crude oil pump shaft seal leakage: 1. Reduce pressure during operation, lowering the outlet pressure to below 1.5MPa; 2. Temporarily seal the leak, using special sealant to seal the leak point; 3. Contact the maintenance team to arrange for replacement of the seal. Safety precautions: Wear a protective mask during operation, keep fire extinguishers nearby, and strictly prohibit open flame work. Reference case: In April 2026, a similar leakage was successfully handled using a pressure reduction + leak sealing solution." (4) Output to the team terminal, and at the same time prepare to send the scheduling record (including the list of memory IDs called, sorting order, and answer content) back to S8.

[0133] S8 Feedback Iteration and Weight Update.

[0134] Please refer to Figure 9 , Figure 9 The illustration shows a schematic diagram of weight update and soft forgetting according to an embodiment of this application; the input is the user's feedback data to the output of S7. Processing procedure: (1) Feedback collection: After viewing the answer on the team terminal, the user selects "Accept and execute", "Reject" or "Modify". Assume that the user selects "Accept and execute" and marks the execution result as "success".

[0135] (2) Feedback data encapsulation: The dynamic scheduling module encapsulates the feedback data into JSON format: {"memory_ids":["mem-001","mem-003","mem-005"],"action":"adopted","result":"success","timestamp":"2026-07-10T08:25:00","scene_tag":"Abnormal handling-general risk-emergency"}, and sends it to the optimization iteration module through the Kafka message queue.

[0136] (3) Weight update: After receiving feedback data, the optimization iteration module increases the confidence of the adopted memory (+0.1 per record, up to 1.0). The updated confidence value is written back to the memory metadata of the multi-layer storage module through control instructions. If the user selects "reject" or the execution result is "deviation", the corresponding memory confidence is reduced to -0.2 to -0.3 and marked as "to be optimized".

[0137] (4) Long-term optimization: If a memory is not accessed for more than 90 days, the optimization iteration module triggers a soft forgetting algorithm to reduce its weight according to the decay coefficient, but the data is completely preserved. The updated weight value is also written back to the multi-layer storage module as the input for the next retrieval score, realizing the "schedule-feedback-lifecycle update" closed loop.

[0138] The following is an explanation using specific scenarios: Scenario 1: In a refining and chemical enterprise, during the handover between day and night shifts in an atmospheric and vacuum distillation unit, there are issues such as missing information, unclear handover, and inability to trace historical problems.

[0139] To resolve the above issues, please refer to... Figure 10 , Figure 10 This illustration schematically shows the implementation steps and processes according to embodiments of this application. Figure 1 The steps include: 1) Information collection: The system collects the handover voice and text records of day shift operators, inspection results, work order status, equipment abnormalities, and parameter curves.

[0140] 2) Encoding and storage: The memory encoding module extracts key information, generates structured memory, and stores it in instantaneous memory, attribute memory, and experience memory respectively.

[0141] 3) Automatic handover list generation: After the night shift operator logs in, the dynamic scheduling module automatically retrieves the previous shift's memory and generates a standardized list. This relies on a shift sequence tagging system, a three-layer memory linkage mechanism, and a scenario-adaptive scheduling strategy to achieve fully automatic, seamless cross-shift memory retrieval and content reconstruction technology. The specific logic for fully automatic retrieval is as follows: Pre-existing infrastructure: Each memory entry comes with a built-in "shift spatiotemporal tag." During the memory encoding phase, the system uses a semantic model and preprocessing module to forcibly bind each production and office memory entry to a shift spatiotemporal tag, providing a precise indexing foundation for automatic cross-shift retrieval. The tag system includes: date, shift time period (day shift / afternoon shift / night shift), shift ID, on-duty operator, equipment area, and memory timeliness type. All inspection records, equipment status, abnormal fluctuations, unclosed loop hazards, work progress, and key risk warnings generated in the previous shift are automatically tagged with a "previous shift exclusive tag" when stored in the database, enabling precise partitioning and archiving of memory data by shift.

[0142] Automatic Triggering Mechanism: The dynamic scheduling module has a built-in refining shift clock triggering mechanism, adapting to the enterprise's four-shift, three-rotation and three-shift, two-rotation shift system. 1. Timed Automatic Triggering: At a fixed time node for each shift handover (e.g., 15 minutes before handover), the system automatically starts the "Shift Handover Scene Scheduling Task," requiring no manual clicks or instructions. 2. Scene Recognition Triggering: When a new shift account logs in and enters the shift handover interface, the multi-dimensional scene analysis engine automatically recognizes the "shift handover business scene" and proactively activates the cross-shift memory retrieval logic. These two methods provide dual protection, achieving fully automatic and proactive retrieval of the previous shift's memories.

[0143] Three-layer memory for precise cross-layer automatic retrieval: The dynamic scheduling module, based on the "shift handover scenario weighting strategy," automatically and hierarchically retrieves all effective memories from the previous shift, achieving three-dimensional data fusion: 1. Automatically retrieves dynamic data from the previous shift's instantaneous memory layer. The system automatically filters and retrieves: incomplete work, temporary process adjustments, real-time equipment fluctuations, ongoing operations, unresolved hazards, and temporary on-site risk warnings, etc. This data is shift-specific, highly timely, and has the highest handover priority. 2. Automatically retrieves compliance standards and fixed parameters from the attribute memory layer. It automatically retrieves fixed equipment parameters, process thresholds, safety regulations, handover standard templates, and job compliance requirements for standardized handover content. 3. Automatically retrieves historical experience from the experience memory layer for similar shifts. The system uses vector similarity retrieval to automatically match historical shift handover experiences, common anomaly warnings, and typical problem handling suggestions for the same equipment, time period, operating conditions, and season.

[0144] Intelligent filtering + weighted sorting: The dynamic scheduling module has built-in shift memory filtering rules: 1. Automatically filter out expired, closed-loop, and invalid memories with no retention value; 2. Automatically block interference data from other shifts, other devices, and irrelevant business; 3. Automatically sort based on time decay, risk level, popularity weight, and confidence level, with high-risk, unclosed-loop, and key items at the top.

[0145] AI-powered automatic reorganization and structured generation of standardized handover lists: After retrieval, the system performs secondary structured reorganization, summary extraction, and classification through a semantic model: 1. Automatic classification: Equipment operating status, process parameter fluctuations, progress of hidden danger rectification, work execution status, follow-up items, risk warnings, and handover precautions; 2. Automatic summarization: AI simplifies long text inspection records and anomaly descriptions to generate standardized short sentences readable by the work team; 3. Automatic specification filling: Combining attribute memory layer standards, it fills in compliance requirements, operational prohibitions, and safety red lines; 4. Automatic generation of structured lists: Outputs a standardized handover list / report with clear items, standardized hierarchy, and highlighted key points.

[0146] Closed-loop memory storage: The operation of this shift is automatically stored in new memory for the next shift to retrieve, forming a fully automatic closed-loop memory continuation across shifts.

[0147] 4) Memory Accumulation and Reuse: After the handover is confirmed, the system will accumulate the key points of this handover as experience memory, and automatically recommend standard content for subsequent similar handovers.

[0148] 5) Results: The handover time is significantly shortened, the information omission rate is significantly reduced, and the information is traceable and verifiable.

[0149] Implementation Scenario 2 The work team's application process for work permits, such as hot work, confined space permits, and temporary power supply permits, is cumbersome, prone to omissions, and lacks standardized risk measures.

[0150] To resolve the above issues, please refer to... Figure 11 , Figure 11 This illustration schematically shows the implementation steps and processes according to embodiments of this application. Figure 2 The steps include: 1) Memory Acquisition: The system collects historical tickets, equipment information, risk levels, working media, safety measures, and approval processes.

[0151] 2) Memory storage: Standard ticket templates are stored in attribute memory, and typical cases are stored in experience memory.

[0152] 3) Intelligent filling and recommendation: After the operator selects the job type and equipment, the system automatically schedules historical tickets, risk measures, isolation requirements, protective equipment, and approval paths.

[0153] 4) Automatic verification: Calls the security specifications in the attribute memory to perform compliance verification on the filled content and prompts for omissions and errors.

[0154] 5) Memory update: After the ticket is processed, it is stored in the experience memory to form a continuously improving ticket case library.

[0155] 6) Results: Processing time was significantly shortened, the omission rate was significantly reduced, and the compliance rate was significantly improved.

[0156] Implementation Scenario 3 In the event of sudden incidents such as pressure fluctuations, abnormal temperatures, leaks, or pump vibrations in the equipment, it is necessary to quickly draw upon experience.

[0157] To resolve the above issues, please refer to... Figure 12 , Figure 12 This illustration schematically shows the implementation steps and processes according to embodiments of this application. Figure 3 The steps include: 1) Abnormal information collection: When operators report abnormalities, the system collects the phenomenon, time, location, parameters, and operation steps.

[0158] 2) Memory retrieval and scheduling: The system retrieves historical similar anomalies, scheduling and handling steps, safety precautions, impact of related devices, reporting process, and historical handling results.

[0159] 3) One-click execution and recording: The operator handles the situation according to the recommended plan, and the system automatically records the entire process.

[0160] 4) Memory optimization: If the processing is successful, increase the weight of the solution; if the processing fails, mark it and wait for optimization.

[0161] 5) Results: The time for handling abnormalities is significantly shortened, the risk of misoperation is greatly reduced, and experience can be permanently accumulated.

[0162] Please refer to Figure 13 , Figure 13 This schematic diagram illustrates a structural block diagram of a data storage system for a refining and chemical enterprise's work team office, according to an embodiment of this application. This embodiment provides a data storage system for a refining and chemical enterprise's work team office, including an acquisition module 210, a preprocessing module 220, an encoding module 230, and a storage module 240, wherein: The acquisition module 210 is used to acquire basic data, which is the entire process data of the refining and chemical team's office work. Preprocessing module 220 is used to preprocess the basic data to obtain standardized text data; The encoding module 230 is used to input the standardized text data into a preset memory encoding model to obtain a standardized memory structure; Storage module 240 is used to send the standardized memory structure to the corresponding storage layer for storage based on the classification characteristics of the standardized memory structure. The storage layer includes a transient memory layer, an attribute memory layer, and an experience memory layer. The transient memory layer is used to store temporary data, the attribute memory layer is used to store static data, and the experience memory layer is used to store historical experience data.

[0163] The data storage system for the work team of the refining and chemical enterprise includes a processor and a memory. The aforementioned acquisition module 210, preprocessing module 220, encoding module 230, storage module 240, etc., are all stored in the memory as program units. The processor executes the aforementioned program units stored in the memory to realize the corresponding functions.

[0164] The processor contains a kernel, which retrieves the corresponding program units from memory. One or more kernels can be configured, and their parameters can be adjusted to store office data from refining and chemical enterprise work teams.

[0165] The memory may include non-permanent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.

[0166] This invention provides a machine-readable storage medium storing a program thereon, which, when executed by a processor, implements the data storage method for the work group office of a refining and chemical enterprise.

[0167] This invention provides a processor for running a program, wherein the program executes the data storage method for the office work of a refining and chemical enterprise.

[0168] This application provides an electronic device, comprising: at least one processor; and a memory connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the at least one processor implements the above-described data storage method for refining and chemical enterprise work group offices by executing the instructions stored in the memory. When the processor executes the instructions, it performs the following steps: Acquire basic data, which is the complete process data of the refining and chemical team's office work. The basic data is preprocessed to obtain standardized text data; The standardized text data is input into a preset memory encoding model to obtain a standardized memory structure; Based on the classification characteristics of the standardized memory structure, the standardized memory structure is sent to the corresponding storage layer for storage. The storage layer includes a transient memory layer, an attribute memory layer, and an experience memory layer. The transient memory layer is used to store temporary data, the attribute memory layer is used to store static data, and the experience memory layer is used to store historical experience data.

[0169] In one embodiment, the preset memory encoding model includes a semantic fine-tuning model and an entity linking model; The step of inputting the standardized text data into a preset memory encoding model to obtain a standardized memory structure includes: The semantic fine-tuning model extracts entities from the standardized text data to obtain refined entity information; Based on the refining entity information, the entity linking model determines entity pairs, which are entity pairs with a relationship type. Based on the entity pairs, the entity linking model constructs multiple knowledge triples and transforms the multiple knowledge triples into entity relation data blocks. Each knowledge triple includes a head entity, a relation type, and a tail entity. A memory metadata object is created from the entity linking model; The entity linking model assembles the entity relationship data block, the memory metadata object, and the semantic vector of the memory metadata object to obtain a standardized memory structure.

[0170] In one embodiment, the process of constructing the semantic fine-tuning model includes: Obtain the training dataset; Based on the training dataset, the base model is fine-tuned to obtain a semantically fine-tuned model.

[0171] In one embodiment, the step of fine-tuning the base model based on the training dataset to obtain a semantically fine-tuned model includes: The training dataset is input into the Transformer layer of the base model to perform forward propagation, and the cross-entropy loss is calculated based on the output of the forward propagation to obtain the standard cross-entropy loss. Obtain process causal constraint pairs; The process causal constraints are encoded using the base model to obtain the process semantic alignment loss. Based on the standard cross-entropy loss and the process semantic alignment loss, the total training loss is obtained; Based on the total training loss, backpropagation is performed on the base model to obtain LoRA incremental weights; The LoRA incremental weights are fused with the base model to obtain the semantic fine-tuning model.

[0172] In one embodiment, each storage layer is connected to a data gateway, which caches frequently accessed data from the attribute memory layer. The method further includes: Retrieve attribute memory query request; Based on the attribute memory query request, the data gateway's cache is queried to obtain the cache query result; If the cached query result is empty, the attribute memory query request is routed to the attribute memory layer through the data gateway to obtain the query result; If the cached query result is not empty, the cached query result will be used as the query result.

[0173] In one embodiment, it also includes: In response to the precipitation trigger signal, the data to be precipitated in the transient memory layer is synchronized to the empirical memory layer.

[0174] In one embodiment, it also includes: When the data in the attribute memory layer is updated, the instantaneous memory layer and the experience memory layer are updated based on the updated data in the attribute memory layer.

[0175] In one embodiment, it also includes: Obtain the newly written data from the storage layer; Based on the newly written data and existing memory data in the storage layer, determine the conflict type; In the case where the conflict type is a device parameter conflict, the storage layer is updated according to the first update strategy; In the case where the conflict type is a security specification conflict, the storage layer is updated according to the second update strategy; In the event that the conflict type is an anomaly handling scheme conflict, the storage layer is updated according to the third update strategy.

[0176] In one embodiment, determining the conflict type based on the newly written data and existing memory data in the storage layer includes: Based on the newly written data and existing memory data in the storage layer, determine whether there are two or more memory data for the same entity. When it is determined that there are two or more memory records for the same entity, the set of associated entities is determined; Based on the process topology diagram, determine whether the entities in the associated entity set are in the same process context; If it is determined that the entities in the associated entity set are in the same process context, the conflict type is determined based on the newly written data and the existing memory data in the storage layer.

[0177] In one embodiment, it also includes: If the last access time of the memory data in the storage layer exceeds a preset time threshold, the memory data is determined to be forgotten data. The number of days unused is calculated based on the last access time and the current time of the forgotten data; Based on the hierarchy and risk level of the forgotten data, the daily decay rate is determined; The weights of the forgotten data are updated based on the number of days of non-use and the daily decay rate.

[0178] In one embodiment, it also includes: Real-time acquisition of user input information and system event information; Based on the user input information and the system event information, the scene information is determined; Based on the scene information, a retrieval is performed in the storage layer to obtain a memory fragment; Based on the memory fragments, a structured reasoning context is generated; The structured reasoning context is input into the large model of the intelligent agent to obtain reasoning information.

[0179] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0180] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0181] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0182] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0183] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0184] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0185] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0186] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0187] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.

Claims

1. A method for storing office data in a refining and chemical enterprise, characterized in that, include: Acquire basic data, which is the complete process data of the refining and chemical team's office work. The basic data is preprocessed to obtain standardized text data; The standardized text data is input into a preset memory encoding model to obtain a standardized memory structure; Based on the classification characteristics of the standardized memory structure, the standardized memory structure is sent to the corresponding storage layer for storage. The storage layer includes a transient memory layer, an attribute memory layer, and an experience memory layer. The transient memory layer is used to store temporary data, the attribute memory layer is used to store static data, and the experience memory layer is used to store historical experience data.

2. The data storage method for work team offices in refining and chemical enterprises according to claim 1, characterized in that, The preset memory encoding model includes a semantic fine-tuning model and an entity linking model; The step of inputting the standardized text data into a preset memory encoding model to obtain a standardized memory structure includes: The semantic fine-tuning model extracts entities from the standardized text data to obtain refined entity information; The entity linking model determines entity pairs based on the refining entity information, and the entity pairs are entity pairs with a relationship type. Based on the entity pairs, the entity linking model constructs multiple knowledge triples and transforms the multiple knowledge triples into entity relation data blocks. Each knowledge triple includes a head entity, a relation type, and a tail entity. A memory metadata object is created from the entity linking model; The entity linking model assembles the entity relationship data block, the memory metadata object, and the semantic vector of the memory metadata object to obtain a standardized memory structure.

3. The data storage method for work group offices in refining and chemical enterprises according to claim 2, characterized in that, The construction process of the semantic fine-tuning model includes: Obtain the training dataset; Based on the training dataset, the base model is fine-tuned to obtain a semantically fine-tuned model.

4. The data storage method for work team offices in refining and chemical enterprises according to claim 3, characterized in that, The step of fine-tuning the base model based on the training dataset to obtain a semantically fine-tuned model includes: The training dataset is input into the Transformer layer of the base model to perform forward propagation, and the cross-entropy loss is calculated based on the output of the forward propagation to obtain the standard cross-entropy loss. Obtain process causal constraint pairs; The process causal constraints are encoded using the base model to obtain the process semantic alignment loss. Based on the standard cross-entropy loss and the process semantic alignment loss, the total training loss is obtained; Based on the total training loss, backpropagation is performed on the base model to obtain LoRA incremental weights; The LoRA incremental weights are fused with the base model to obtain the semantic fine-tuning model.

5. The data storage method for work group offices in refining and chemical enterprises according to claim 1, characterized in that, Each storage layer is connected to a data gateway, which caches frequently accessed data from the attribute memory layer. The method further includes: Retrieve attribute memory query request; Based on the attribute memory query request, the data gateway's cache is queried to obtain the cache query result; If the cached query result is empty, the attribute memory query request is routed to the attribute memory layer through the data gateway to obtain the query result; If the cached query result is not empty, the cached query result is used as the query result.

6. The data storage method for work group offices in refining and chemical enterprises according to claim 1, characterized in that, Also includes: In response to the precipitation trigger signal, the data to be precipitated in the transient memory layer is synchronized to the experience memory layer.

7. The data storage method for work team offices in refining and chemical enterprises according to claim 1, characterized in that, Also includes: When the data in the attribute memory layer is updated, the instantaneous memory layer and the experience memory layer are updated based on the updated data in the attribute memory layer.

8. The data storage method for work team offices in refining and chemical enterprises according to claim 1, characterized in that, Also includes: Obtain the newly written data from the storage layer; Based on the newly written data and existing memory data in the storage layer, determine the conflict type; In the case where the conflict type is a device parameter conflict, the storage layer is updated according to the first update strategy; In the case where the conflict type is a security specification conflict, the storage layer is updated according to the second update strategy; In the event that the conflict type is an anomaly handling scheme conflict, the storage layer is updated according to the third update strategy.

9. The method for storing office data in refining and chemical enterprises according to claim 8, characterized in that, The determination of conflict types between newly written data and existing memory data based on the storage layer includes: Based on the newly written data and existing memory data in the storage layer, determine whether there are two or more memory data for the same entity. When it is determined that there are two or more memory records for the same entity, the set of associated entities is determined; Based on the process topology diagram, determine whether the entities in the associated entity set are in the same process context; If it is determined that the entities in the associated entity set are in the same process context, the conflict type is determined based on the newly written data and the existing memory data in the storage layer.

10. The method for storing office data of refining and chemical enterprises according to claim 1, characterized in that, Also includes: If the last access time of the memory data in the storage layer exceeds a preset time threshold, the memory data is determined to be forgotten data. The number of days unused is calculated based on the last access time and the current time of the forgotten data; Based on the hierarchy and risk level of the forgotten data, the daily decay rate is determined; The weights of the forgotten data are updated based on the number of days of non-use and the daily decay rate.

11. The data storage method for work team offices in refining and chemical enterprises according to claim 1, characterized in that, Also includes: Real-time acquisition of user input information and system event information; Based on the user input information and the system event information, the scene information is determined; Based on the scene information, a retrieval is performed in the storage layer to obtain a memory fragment; Based on the memory fragments, a structured reasoning context is generated; The structured reasoning context is input into the large model of the intelligent agent to obtain reasoning information.

12. A data storage system for work group offices in a refining and chemical enterprise, characterized in that, include: The acquisition module is used to acquire basic data, which is the entire process data of the refining and chemical team's office work. The preprocessing module is used to preprocess the basic data to obtain standardized text data; The encoding module is used to input the standardized text data into a preset memory encoding model to obtain a standardized memory structure; The storage module is used to send the standardized memory structure to the corresponding storage layer for storage based on the classification characteristics of the standardized memory structure. The storage layer includes a transient memory layer, an attribute memory layer, and an experience memory layer. The transient memory layer is used to store temporary data, the attribute memory layer is used to store static data, and the experience memory layer is used to store historical experience data.

13. An electronic device, characterized in that, The electronic device includes: At least one processor; A memory connected to the at least one processor; The memory stores instructions that can be executed by the at least one processor, and the at least one processor implements the data storage method for the office work of a refining and chemical enterprise as described in any one of claims 1 to 11 by executing the instructions stored in the memory.

14. A machine-readable storage medium storing instructions thereon, characterized in that, When executed by a processor, this instruction causes the processor to be configured to perform the data storage method for the office work of a refining and chemical enterprise according to any one of claims 1 to 11.