Single machine exception processing method and device, electronic equipment and storage medium

By managing individual machine anomalies through a central server and automating the process using preset execution functions, the problem of requiring manual intervention for individual machine anomalies has been solved, thereby improving the automation level and operational continuity of the production line.

CN121658274APending Publication Date: 2026-03-13CHONGQING LANDIAN AUTOMOBILE TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511872219.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-12
Publication Date
2026-03-13

AI Technical Summary

Technical Problem

In the production line, when a single machine malfunctions in the pre-installed environment, it cannot recover automatically and requires manual intervention, which leads to delays in production cycle and affects the continuity of the production line.

Method used

A central server is introduced to manage single-machine anomalies. Through autonomous detection and remote policy acquisition, the anomalies are automatically processed using preset single-machine execution functions, including status matching and execution function invocation.

Benefits of technology

It automates the handling of single-machine anomalies, improves the response efficiency and system reliability of the production line, reduces the delay and cost of manual intervention, and is suitable for environments with limited image size.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121658274A_ABST
    Figure CN121658274A_ABST
Patent Text Reader

Abstract

The invention relates to the field of stand-alone detection, and discloses a stand-alone abnormity processing method and device, electronic equipment and a storage medium, the processing method is applied to each stand-alone in a pre-installation environment, each stand-alone is connected with a total server, and the method comprises the following steps: when the stand-alone is in an abnormal state, sending the abnormal state of the stand-alone to the total server, obtaining an exception handling strategy in the total server; the exception handling strategy comprises a plurality of preset exception states, and each preset exception state corresponds to a respective preset execution function; in response to the exception handling strategy, matching a plurality of preset exception states with an own exception state; if the matching is successful, executing a preset execution function corresponding to the successfully matched preset abnormal state so as to carry out abnormal processing; wherein the preset execution function is the execution function preset in each single machine. The single machine in the pre-installation environment does not need to be manually recovered, the single machine can automatically carry out exception handling, and the automation level and operation continuity of a production line are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of single-machine testing, specifically to a method, apparatus, electronic device, and storage medium for handling single-machine anomalies. Background Technology

[0002] There are multiple stand-alone machines running in the pre-installed environment in the production line. The operating system of each stand-alone machine is an incomplete operating system with limited system resources. The image size is generally limited to around 500M, making it difficult to integrate additional functional modules such as active monitoring and remote management.

[0003] In this environment, when a single machine experiences production interruptions, errors, or process freezes, it cannot automatically recover and requires manual restart or shutdown operations on-site. If multiple machines malfunction simultaneously, the workload for manual intervention is large, the response is delayed, and it severely affects the production cycle and production line continuity, making it difficult to ensure the stable operation of the automated production line. Summary of the Invention

[0004] In view of the above problems, this application provides a method, apparatus, electronic device and storage medium for handling single-machine anomalies, which can solve the problems of relying on manual recovery after a single machine is abnormally interrupted in the pre-installation environment in the production line, resulting in low processing efficiency and difficulty in dealing with multiple machine concurrent anomalies.

[0005] According to one aspect of this application, a method for handling single-machine anomalies is provided, applied to individual machines in a pre-installed environment, each machine being connected to a central server. The method includes: when a single machine experiences an anomaly, sending its own anomaly status to the central server to obtain an anomaly handling strategy from the central server; the anomaly handling strategy includes multiple preset anomaly states, each preset anomaly state corresponding to its own preset execution function; in response to the anomaly handling strategy, matching the multiple preset anomaly states with the single machine's own anomaly state; if a match is successful, executing the preset execution function corresponding to the successfully matched preset anomaly state to perform anomaly handling; wherein, the preset execution function is a pre-configured execution function in each single machine.

[0006] In one optional approach, the processing method further includes: if the exception handling strategy is not obtained within a preset time period, then resend the exception status until the exception handling strategy is obtained or the number of times the exception status is sent reaches a preset number.

[0007] In one optional approach, the preset execution function corresponding to the successfully matched preset abnormal state is executed, including: if the preset execution function corresponding to the successfully matched preset abnormal state is a restart function, then a restart operation is performed; if the preset execution function corresponding to the successfully matched preset abnormal state is a shutdown function, then a shutdown operation is performed.

[0008] In one alternative approach, the exception handling strategy provides a specified interface required for the data transfer function; and executes a preset execution function corresponding to a successfully matched preset exception state, including: if the preset execution function corresponding to the successfully matched preset exception state is a data transfer function, then the local data is sent to a specified storage server through the specified interface.

[0009] In one optional approach, before executing the preset execution function corresponding to the successfully matched preset abnormal state, the processing method further includes: detecting whether the remaining processing resources and remaining storage resources meet the processing resources and storage resources required to execute the target execution function; wherein, the target execution function is the preset execution function corresponding to the successfully matched preset abnormal state; if both are yes, then the preset execution function corresponding to the successfully matched preset abnormal state is executed; if either is no, then the execution of the preset execution function corresponding to the successfully matched preset abnormal state is stopped.

[0010] In one optional approach, executing the preset execution function corresponding to the successfully matched preset exception state includes: if the preset execution function corresponding to the successfully matched preset exception state is a script execution function, then based on the temporary script obtained from the main server, executing the combined preset execution function specified by the temporary script.

[0011] In one optional approach, when the standalone machine's own state is abnormal, it sends its abnormal state to the central server to obtain the abnormal handling strategy in the central server, including: performing abnormal state detection on its own state based on a preset period; when an abnormal state is detected, using its own abnormal state as a request parameter to construct an acquisition request; and sending the acquisition request to the central server to obtain the abnormal handling strategy in the central server.

[0012] According to another aspect of this application, a single-machine exception handling device is provided, applied to various single machines in a pre-installed environment, each single machine being connected to a central server. The handling device includes: an acquisition module, used to send its own exception status to the central server when the single machine's own status is abnormal, in order to acquire an exception handling strategy in the central server; the exception handling strategy includes multiple preset exception states, each preset exception state corresponding to its own preset execution function; a matching module, used to match the multiple preset exception states with its own exception status in response to the exception handling strategy; and an execution module, used to execute the preset execution function corresponding to the matched preset exception state if a match is successful, in order to perform exception handling; wherein, the preset execution function is a pre-configured execution function in each single machine.

[0013] According to one aspect of this application, an electronic device is provided, comprising: a controller; and a memory for storing one or more programs, which, when executed by the controller, perform the processing method described above.

[0014] According to one aspect of this application, a computer-readable storage medium is also provided, on which computer-readable instructions are stored, which, when executed by a computer's processor, cause the computer to perform the above-described processing method.

[0015] According to one aspect of this application, a computer program product or computer program is also provided, comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the aforementioned processing method.

[0016] This application introduces a central server to manage anomalies across multiple individual machines. Upon detecting an anomaly, each machine proactively requests an anomaly handling strategy containing multiple preset anomaly states from the central server. It then matches its local state with each preset anomaly state, precisely invoking existing preset execution functions to automate the process. Because all strategy logic is centralized under the central server, each individual machine only needs to retain simple detection, communication, and preset execution functions, significantly reducing its demand for local storage and computing resources. This makes it suitable for pre-installation environments with limited image size. Furthermore, this application supports concurrent responses from multiple individual machines, significantly improving anomaly handling efficiency and system reliability. It effectively solves the problems of response delays and high labor costs associated with traditional manual intervention, enhancing the automation level and operational continuity of the production line.

[0017] The above description is only an overview of the technical solution of this application. In order to better understand the technical means of this application and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of this application more obvious and understandable, the following are specific embodiments of this application. Attached Figure Description

[0018] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application. It is obvious that the drawings described below are merely some embodiments of this application, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort.

[0019] Figure 1 This is a flowchart illustrating a single-machine exception handling method according to an exemplary embodiment of this application.

[0020] Figure 2 Based on Figure 1 The exemplary embodiment shown illustrates a flowchart of another method for handling single-machine exceptions.

[0021] Figure 3 Based on Figure 1 The exemplary embodiment shown illustrates a flowchart of another method for handling single-machine exceptions.

[0022] Figure 4 This is a schematic diagram illustrating an application scenario for the single-machine exception handling method of this application.

[0023] Figure 5 This is a schematic diagram of the structure of a stand-alone fault handling device illustrated in an exemplary embodiment of this application.

[0024] Figure 6 This is a schematic diagram of the structure of a computer system for an electronic device illustrated in an exemplary embodiment of this application. Detailed Implementation

[0025] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0026] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.

[0027] The flowcharts shown in the accompanying drawings are merely illustrative and do not necessarily include all content and operations / steps, nor do they necessarily have to be performed in the described order. For example, some operations / steps can be broken down, while others can be combined or partially combined; therefore, the actual execution order may change depending on the specific circumstances.

[0028] In this application, "multiple" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. The character " / " generally indicates that the preceding and following related objects have an "or" relationship.

[0029] Individual machines in the pre-installed environment of the production line are limited by their own systems and system resources. Once an anomaly occurs, they cannot recover automatically and must be manually restarted or shut down one by one on-site. If multiple individual machines malfunction simultaneously, the workload of manual intervention is large and the response is delayed, which seriously affects the production cycle and production line continuity, making it difficult to ensure the stable operation of the automated production line.

[0030] To address this, one aspect of this application provides a method for handling single-machine anomalies. Without altering the original system structure or increasing storage burden, a lightweight client program enables autonomous detection of anomalies and remote policy acquisition. The pre-defined execution functions already present in the single machine facilitate automated anomaly handling, thereby overcoming the bottleneck of intelligent operation and maintenance in resource-constrained environments. Please refer to the following for details. Figure 1 , Figure 1 This is a flowchart illustrating a single-machine exception handling method according to an exemplary embodiment of this application. The method includes at least steps S110 to S130; wherein the method is applied to each single machine in a pre-installed environment, and each single machine is connected to a central server, as detailed below: S110: In the event of an abnormal state of a single machine, the abnormal state of the machine is sent to the main server to obtain the abnormal handling strategy in the main server; the abnormal handling strategy includes multiple preset abnormal states, and each preset abnormal state has its own preset execution function.

[0031] A pre-installed environment refers to a lightweight operating system environment, such as Windows PE or Linux Live CD, used for system booting, driver loading, and image writing before the official operating system is deployed. Its characteristics include fast boot speed, streamlined functionality, and small storage footprint. Because this environment does not support long-term resident applications or complex service processes, individual machines in a pre-installed environment cannot rely on local daemons for self-healing. In contrast, a single machine is an independent industrial control device in a production line that performs a specific function, such as a programmer, tester, or flashing terminal. Each machine operates independently but collaborates to complete the entire production line's process flow.

[0032] Abnormal states refer to deviations from normal operating modes that occur during standalone machine operation, including but not limited to system crashes, unresponsiveness, and critical process exits. These can be identified through software-level health check mechanisms (such as heartbeat detection, process liveness assessment, and memory usage monitoring) or hardware-level signal feedback (such as GPIO level changes).

[0033] Upon detecting an anomaly, the current anomaly is reported in structured data form (generating a retrieval request), essentially acting as a client to send a retrieval request to the central server. The central server generates a configuration set (i.e., anomaly handling strategy) in response to the anomaly, guiding the actions each machine should take under specific anomaly conditions, i.e., executing corresponding preset functions. The anomaly handling strategy is not fixed locally on each machine but is retrieved from the server on demand, ensuring policy consistency and maintainability. The strategy content includes at least several preset anomaly states, each with its own preset execution function.

[0034] S110 is illustrated as follows: Anomaly detection is performed on the self-state based on a preset period; if an anomaly is detected in the self-state, the abnormal self-state is used as a request parameter to construct an acquisition request; the acquisition request is sent to the main server to obtain the anomaly handling strategy in the main server.

[0035] The preset period can be understood as the interval between anomaly detections, reflecting the frequency of anomaly detection. The preset period can be flexibly configured according to the actual application scenario, for example, it can be set to detect every 1 second, every 5 seconds, or every 10 seconds. The system status monitoring task is repeatedly executed according to this preset period. This periodic polling mechanism ensures continuous monitoring of the single machine's operating status and avoids the escalation of faults due to anomalies not being detected for a long time.

[0036] This example performs a structured transformation of the abnormal state, encoding the abnormal type corresponding to the abnormal state into a structured data field, which is used to describe the current abnormal state to the main server; this structured data field is then encapsulated into a request message in a standard communication protocol format, thereby constructing a retrieval request to obtain the abnormal handling strategy from the main server.

[0037] This example performs periodic checks for abnormal states on individual machines and automatically generates structured requests to establish a communication connection with the central server upon detecting an abnormal state. By employing a timed polling and parameterized request construction mechanism, the fault discovery process, which originally relied on manual inspection, is transformed into an automated and standardized information reporting process.

[0038] S120: In response to the exception handling strategy, match multiple preset exception states with its own exception state.

[0039] Preset exception states can be understood as a set of exception identifiers predefined by the central server. Each identifier represents a type of exception state, such as Error_Interrupted (error interruption) and Network_Loss (signal loss). The matching process uses methods such as string comparison, enumeration value comparison, or hash verification to determine whether the "self-exception state" reported by a single machine matches any of the preset exception states. This matching mechanism supports fuzzy matching and priority ranking. For example, when multiple possible matches exist, the strategy with the highest confidence or highest priority is selected for execution, improving decision robustness.

[0040] S130: If the match is successful, the preset execution function corresponding to the preset abnormal state of the successful match will be executed to handle the exception; where the preset execution function is the execution function preset in each standalone machine.

[0041] If a preset abnormal state that is completely consistent with the abnormal state of the single machine is found in the preset abnormal state set, it indicates that the match is successful.

[0042] Pre-defined execution functions are native operational capabilities that already exist within a single-machine system and can be invoked without the need for additional software installation. These functions include restarting the system, shutting down the system, and transferring data. These execution functions are exposed as built-in interfaces to exception handlers, ensuring normal execution even in resource-constrained environments.

[0043] For example, if the preset execution function corresponding to the successfully matched preset abnormal state is the restart function, then the restart operation is performed; if the preset execution function corresponding to the successfully matched preset abnormal state is the shutdown function, then the shutdown operation is performed.

[0044] The restart function is a built-in operation command used to restart a standalone system. Its implementation methods include, but are not limited to, calling the operating system's underlying API (Application Programming Interface) or sending a restart signal via ACPI (Advanced Configuration and Power Interface). The restart operation is suitable for temporary fault scenarios, such as system freezes or driver loading failures. It enables rapid recovery without downtime or manual intervention, maintaining production line continuity.

[0045] The shutdown function is an operation command used to safely terminate system operation and cut off power supply. It can be implemented by calling the system shutdown API, sending a soft shutdown command to the power management unit, or performing a hard shutdown through a remote management interface. Shutdown operations are suitable for severe error scenarios, such as detecting unrecoverable data corruption or critical hardware failure alarms, aiming to prevent further data writes that could cause contamination or to protect equipment safety.

[0046] In another example, the exception handling strategy provides a specified interface required for the data transfer function. If the preset execution function corresponding to the successfully matched preset exception state is the data transfer function, then the local data is sent to the specified storage server through the specified interface.

[0047] The designated interface is a standardized communication channel pre-established between the standalone machine and the designated storage server to enable fast and reliable data transmission under abnormal conditions. Local data refers to critical information generated during operation but not written to permanent storage media, including but not limited to process parameter snapshots, equipment operation log fragments, current task queue status, incomplete work order data, or cached data blocks in memory. The designated storage server is a remote data node with high availability and redundant backup capabilities, and its physical location can be within the same local area network or a cloud data center. This server is configured with a dedicated service module to receive abnormal data uploads and provides corresponding data access interfaces. In some embodiments, the designated storage server is the master server.

[0048] The above example sets clear action mapping rules (i.e., preset execution functions) for different types of preset execution functions, which solves the problem of having to rely on manual judgment and manual restart or shutdown operations after a single machine fails. This automates and standardizes the exception handling process, improves response efficiency and system reliability, and is especially suitable for complex working conditions where multiple single machines fail concurrently, effectively ensuring the continuous and stable operation of the production line.

[0049] This embodiment introduces a central server to manage anomalies across multiple individual machines. Upon detecting an anomaly, each machine proactively requests an anomaly handling strategy containing multiple preset anomaly states from the central server. It then matches its local state with each preset anomaly state, precisely invoking existing preset execution functions to automate the process. Because all strategy logic is centralized under the central server, each individual machine only needs to retain simple detection, communication, and preset execution functions, significantly reducing its demand for local storage and computing resources. This makes it suitable for pre-installation environments with limited image size. Furthermore, this embodiment supports concurrent responses from multiple individual machines, significantly improving anomaly handling efficiency and system reliability. It effectively solves the problems of response delays and high labor costs associated with traditional manual intervention, enhancing the automation level and operational continuity of the production line.

[0050] In another exemplary embodiment of this application, if a match fails (i.e., the abnormal state itself does not match any of the preset abnormal states), the system records its own abnormal state and maintains a heartbeat, waiting for the next polling. This recording action is not inherent to this situation; any single machine continuously records its own state after power-on to form its own operational log. Recording the abnormal state representation persistently stores relevant information about the current abnormality in local non-volatile storage media for subsequent fault analysis and strategy optimization. The recorded information includes at least the abnormal state identifier, timestamp of occurrence, system operating context (such as CPU utilization, memory usage, and critical process status), network connection status, and server response data from the last successful communication. The recording method can use a structured log format (such as JSON or XML) and write it to a dedicated log file or database table. By fully recording unknown abnormal states, reliable data support is provided for later maintenance personnel to analyze the root causes of unknown abnormal interruption events and improve the abnormal handling strategy in the main server.

[0051] In another exemplary embodiment of this application, if the preset execution function corresponding to the successfully matched preset abnormal state is a script execution function, then the combined preset execution function specified by the temporary script is executed based on the temporary script obtained from the main server.

[0052] The combined preset execution function is a set of functions obtained by combining multiple preset execution functions in a certain order on the main server. All preset execution functions in this set are pre-built functions in a single machine. Users combine individual preset execution functions on the main server to generate temporary scripts, which are then downloaded and executed by the single machine. This eliminates the need for the single machine to pre-build various complex execution logics within the limited image space. The single machine only needs to execute the temporary script to complete the complex execution tasks of multiple preset execution functions, and releases resources after execution without needing to save the temporary script. The temporary script is a script edited and generated by the user on the main server to guide the single machine in executing complex combined preset execution functions and / or to modify local data and settings on the single machine.

[0053] In another exemplary embodiment of this application, a mechanism for re-acquiring the exception handling strategy is described in detail. By setting timeout detection and retransmission logic, the reliable acquisition of the exception handling strategy under abnormal conditions is ensured. Please refer to [link to relevant documentation] for details. Figure 2 , Figure 2 Based on Figure 1 The exemplary embodiment shown illustrates a flowchart of another method for handling single-machine exceptions. This method, in the example described... Figure 1 Based on S110 to S130 shown, at least S210 is also included, which is described in detail below: S210: If an exception handling strategy is not obtained within a preset time period, the exception status is resent until an exception handling strategy is obtained or the number of times the exception status is sent reaches a preset number.

[0054] The preset duration is the maximum allowed time for a single machine to wait for a response after sending a request to the main server. It is used to determine whether the current communication has timed out. The preset duration can be configured according to the actual network environment, for example, set to 3 seconds, 5 seconds, or 10 seconds. When a single machine sends a request to obtain information including its own abnormal status, a timer is started. If a complete preset abnormality handling policy data packet is not received within this duration, it is determined that the communication has failed or the response has timed out.

[0055] Resending its own abnormal state means that the single machine will reconstruct and send the same abnormal state to the central server. This can be achieved using a synchronous blocking retransmission or an asynchronous queued retransmission mechanism. For example, in synchronous mode, a fixed time is waited after each transmission, and a retransmission is performed if the timeout occurs. In asynchronous mode, the abnormal state can be added to a retry queue, and a background task will perform the retransmission operation according to the scheduling cycle. During the retransmission, the original request parameters can remain unchanged, and auxiliary information such as retry sequence number and timestamp can be added as needed for the central server to log and track.

[0056] There are two termination conditions for retransmission: first, obtaining the exception handling policy; second, the number of retransmissions by the individual machine in an abnormal state reaches a preset number. For example, if the individual machine successfully receives valid response data (i.e., the exception handling policy) from the central server, and this data conforms to the predetermined data format specifications, contains complete matching rules and execution function definitions, and can be correctly identified by the local parsing module, the retransmission process is immediately terminated once this condition is met. Another example is that if the number of retransmissions reaches 3 (the preset number), the retransmission process is immediately terminated. The preset number is an upper limit set for the retransmission behavior to prevent infinite loops during complete network outages or prolonged server unavailability, thus avoiding resource waste or impacting other functions. The preset number is usually an integer value, such as 3, 5, or 7, and can be statically configured in the individual machine firmware or updated remotely by the central server. If the policy is not successfully obtained after reaching the maximum number of retries, the individual machine can trigger backup processing logic. For example, it can execute default functions (such as direct restart or shutdown) or record the abnormal event in the local log storage area, and upload it to the central server for post-event analysis after the network is restored.

[0057] This embodiment provides a fault tolerance mechanism by continuously attempting to obtain an exception handling strategy, avoiding stopping subsequent exception handling processes after a single failure, thereby improving the overall robustness and automation level of the system.

[0058] In another exemplary embodiment of this application, the preparatory steps for executing the preset execution function corresponding to the preset abnormal state of successful matching are described in detail. Please refer to [link to relevant documentation] for details. Figure 3 , Figure 3 Based on Figure 1 The exemplary embodiment shown illustrates a flowchart of another method for handling single-machine exceptions. This method, in the example described... Figure 1 The S130 shown includes at least S310 to S330, which are described in detail below: S310: Detect whether the remaining processing resources and remaining storage resources meet the processing resources and storage resources required to execute the target execution function; wherein, the target execution function is the preset execution function corresponding to the preset abnormal state that is successfully matched.

[0059] Before a single machine determines that a specific preset function needs to be executed (i.e., the target function), its available computing resources and storage space are evaluated to determine whether it has the basic conditions to execute the function. This detection process serves as a safety check before execution, preventing system crashes or data write failures caused by forcibly starting the operation when resources are insufficient.

[0060] Remaining processing resources include, but are not limited to, currently available CPU utilization, memory usage, and I / O load status. For example, when the target function is data transfer, the system needs to pre-assess whether there is enough free memory to cache the data blocks to be uploaded, while ensuring that the CPU load is not in a continuously high state to avoid affecting the normal execution of network transmission scheduling tasks.

[0061] Remaining storage resources refer to the available disk space on a single machine's local storage medium that can be used for temporary data storage or log recording. For example, before performing a data transfer function, the system needs to confirm that the remaining capacity of the local disk is sufficient to accommodate intermediate copies or transfer buffers of the data to be processed.

[0062] The target execution function is the preset execution function corresponding to the preset exception state that successfully matches its own exception state in the preset exception handling strategy.

[0063] S320: If all are yes, then execute the preset execution function corresponding to the preset exception state that was successfully matched.

[0064] If all are true, it indicates that the standalone operating environment can guarantee the smooth execution of the preset execution function, that is, the preset execution function corresponding to the successfully matched preset abnormal state can be executed.

[0065] S330: If any of them are not true, then stop executing the preset execution function corresponding to the preset exception state that was successfully matched.

[0066] If there are insufficient remaining processing resources and / or insufficient remaining storage resources, it indicates that the standalone operating environment cannot successfully execute the preset execution functions.

[0067] This embodiment introduces a resource feasibility assessment mechanism before execution, solving the technical problem that forcibly executing high-load functions when the system is already under resource pressure may lead to secondary failures. This achieves the technical effect of improving the success rate of anomaly handling and preventing system cascading crashes. This solution is particularly suitable for stand-alone production line environments with limited image size and where complex monitoring modules cannot be deployed, enabling intelligent self-protection without increasing the system burden.

[0068] In another exemplary embodiment of this application, the application scenarios of the above-mentioned processing methods are illustrated by way of example. Please refer to the following for details. Figure 4 , Figure 4 This is a schematic diagram illustrating an application scenario for the single-machine exception handling method of this application. It includes a single-machine group 100 and a main server 200, which can be connected via wired or wireless communication; this application does not limit the connection method. The single-machine group 100 includes multiple single machines 101, each of which is a pre-installed system environment, and each single machine 101 is connected to the main server 200.

[0069] The standalone machine 101 can serve as the execution entity to perform the processing method shown in any of the exemplary embodiments described above, as illustrated below: When a standalone machine 101 experiences an abnormal state, it sends its abnormal state to the main server 200 to obtain the abnormal handling strategy from the main server 200. The abnormal handling strategy includes multiple preset abnormal states, each with its own preset execution function. In response to the abnormal handling strategy, standalone machine 101 matches the multiple preset abnormal states with its own abnormal state. If a match is successful, standalone machine 101 executes the preset execution function corresponding to the successfully matched preset abnormal state to perform abnormal handling. The preset execution function is a pre-defined execution function in each standalone machine.

[0070] The total server 200 can be a standalone physical server, or a server cluster or distributed system consisting of multiple physical servers. Multiple servers can form a blockchain, and the server is a node on the blockchain. The total server 200 can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. This document does not impose any restrictions on this.

[0071] Another aspect of this application provides a stand-alone exception handling device, such as... Figure 5 As shown, Figure 5 This is a schematic diagram illustrating the structure of a stand-alone fault handling device according to an exemplary embodiment of this application. The handling device 500 is applied to each stand-alone machine in a pre-installed environment, and each stand-alone machine is connected to a central server. The handling device 500 includes: The acquisition module 510 is used to send its own abnormal status to the main server when the single machine's own status is abnormal, so as to obtain the abnormal handling strategy in the main server; the abnormal handling strategy includes multiple preset abnormal states, and each preset abnormal state has its own preset execution function.

[0072] The matching module 530 is used to match multiple preset exception states with its own exception state in response to the exception handling strategy.

[0073] The execution module 550 is used to execute the preset execution function corresponding to the preset abnormal state of the successful match if the match is successful, so as to perform the exception handling; wherein, the preset execution function is the execution function preset in each stand-alone machine.

[0074] In another exemplary embodiment, the processing apparatus 500 further includes: The re-acquisition module is used to resend its own abnormal status if it fails to acquire the abnormal handling strategy within a preset time period, until the abnormal handling strategy is acquired or the number of times its own abnormal status has been sent reaches a preset number.

[0075] In another exemplary embodiment, the execution module 550 includes: The restart unit is used to perform a restart operation if the preset execution function corresponding to the successfully matched preset abnormal state is the restart function.

[0076] The shutdown unit is used to perform a shutdown operation if the preset execution function corresponding to the successfully matched preset abnormal state is the shutdown function.

[0077] In another exemplary embodiment, the exception handling strategy provides a specified interface required for the data transfer function; the execution module 550 includes: The data transfer unit is used to send local data to the specified storage server through the specified interface if the preset execution function corresponding to the successfully matched preset abnormal state is the data transfer function.

[0078] In another exemplary embodiment, the processing apparatus 500 further includes: The resource detection module is used to detect whether the remaining processing resources and remaining storage resources meet the processing resources and storage resources required to execute the target execution function; wherein, the target execution function is the preset execution function corresponding to the successfully matched preset abnormal state.

[0079] The normal execution module is used to execute the preset execution function corresponding to the preset abnormal state if all conditions are met.

[0080] The stop execution module is used to stop the execution of the preset execution function corresponding to the preset exception state that was successfully matched if any one of them is not true.

[0081] In another exemplary embodiment, the execution module 550 includes: The script execution unit is used to execute the combination of preset execution functions specified by the temporary script based on the temporary script obtained from the main server if the preset execution function corresponding to the successfully matched preset exception state is a script execution function.

[0082] In another exemplary embodiment, the acquisition module 510 includes: The periodic detection unit is used to detect abnormalities in the status of the unit itself based on a preset period.

[0083] The request building unit is used to construct a retrieval request by using its own abnormal state as a request parameter when it detects an abnormal state.

[0084] The retrieval unit is used to send retrieval requests to the main server in order to obtain the exception handling strategy in the main server.

[0085] This application's processing device manages multiple individual machines through a central server. Upon detecting an anomaly, each machine proactively requests an anomaly handling strategy containing multiple preset anomaly states from the central server. It then matches its local state with each preset anomaly state, precisely invoking existing preset execution functions to complete automated processing. Because all strategy logic is centralized under the central server, each individual machine only needs to retain simple detection, communication, and preset execution functions, significantly reducing its demand for local storage and computing resources. This makes it suitable for pre-installation environments with limited image size. Furthermore, this processing device supports concurrent responses from multiple individual machines, significantly improving anomaly handling efficiency and system reliability. It effectively solves the problems of response delays and high labor costs associated with traditional manual intervention, enhancing the automation level and operational continuity of the production line.

[0086] It should be noted that the processing apparatus provided in the above embodiments and the processing method provided in the foregoing embodiments belong to the same concept. The specific ways in which each module and unit performs operations have been described in detail in the method embodiments, and will not be repeated here.

[0087] Another aspect of this application provides an electronic device, including: a controller; and a memory for storing one or more programs, which, when executed by the controller, perform the processing method described above.

[0088] Please see Figure 6 , Figure 6 This is a schematic diagram of the structure of a computer system for an electronic device according to an exemplary embodiment of this application, illustrating a schematic diagram of the structure of a computer system suitable for implementing the embodiments of this application.

[0089] It should be noted that, Figure 6 The computer system 600 of the electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.

[0090] like Figure 6 As shown, the computer system 600 includes a Central Processing Unit (CPU) 601, which can perform various appropriate actions and processes, such as executing the methods described in the above embodiments, based on programs stored in Read-Only Memory (ROM) 602 or programs loaded from storage portion 608 into Random Access Memory (RAM) 603. The RAM 603 also stores various programs and data required for system operation. The CPU 601, ROM 602, and RAM 603 are interconnected via a bus 604. An Input / Output (I / O) interface 605 is also connected to the bus 604.

[0091] The following components are connected to I / O interface 605: an input section 606 including a keyboard, mouse, etc.; an output section 607 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 608 including a hard disk, etc.; and a communication section 609 including a network interface card such as a LAN (Local Area Network) card, modem, etc. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to I / O interface 605 as needed. A removable medium 611, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on drive 610 as needed so that computer programs read from it can be installed into storage section 608 as needed.

[0092] Specifically, according to embodiments of this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program including a computer program for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 609, and / or installed from removable medium 611. When the computer program is executed by central processing unit (CPU) 601, it performs various functions defined in the system of this application.

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

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

[0095] The units described in the embodiments of this application can be implemented in software or hardware, and the described units can also be located in a processor. The names of these units do not necessarily limit the specific unit itself.

[0096] Another aspect of this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the aforementioned processing method. This computer-readable storage medium may be included in the electronic device described in the above embodiments, or it may exist independently and not assembled into the electronic device.

[0097] Another aspect of this application provides a computer program product or computer program including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the processing methods provided in the various embodiments described above.

[0098] According to one aspect of the embodiments of this application, a computer system is also provided, including a Central Processing Unit (CPU), which can perform various appropriate actions and processes based on a program stored in read-only memory (ROM) or a program loaded from storage into random access memory (RAM), such as performing the methods described above. Various programs and data required for system operation are also stored in the RAM. The CPU, ROM, and RAM are interconnected via a bus. Input / output (I / O) interfaces are also connected to the bus.

[0099] The following components are connected to the I / O interface: input components including keyboards, mice, etc.; output components including cathode ray tubes (CRTs), liquid crystal displays (LCDs), and speakers; storage components including hard drives; and communication components including network interface cards such as LAN (Local Area Network) cards and modems. The communication components perform communication processing via networks such as the Internet. Drives are also connected to the I / O interface as needed. Removable media, such as disks, optical discs, magneto-optical discs, semiconductor memories, etc., are installed on the drive as needed so that computer programs read from them can be installed into the storage components as required.

[0100] The above description is merely a preferred exemplary embodiment of this application and is not intended to limit the implementation of this application. Those skilled in the art can easily make corresponding modifications or alterations based on the main concept and spirit of this application. Therefore, the scope of protection of this application should be determined by the scope of protection claimed in the claims.

Claims

1. A method for handling single-machine anomalies, characterized in that, The processing method, applied to individual machines in a pre-installed environment, each connected to a central server, includes: In the event of an abnormal state of the single machine, the abnormal state is sent to the main server to obtain the abnormal handling strategy in the main server; the abnormal handling strategy includes multiple preset abnormal states, and each preset abnormal state corresponds to its own preset execution function. In response to the exception handling strategy, the plurality of preset exception states are matched with the exception state itself; If a match is successful, the preset execution function corresponding to the preset abnormal state of the successful match is executed to handle the exception; wherein, the preset execution function is the execution function pre-set in each standalone machine.

2. The processing method according to claim 1, characterized in that, The processing method further includes: If the exception handling strategy is not obtained within the preset time period, the exception status is resent until the exception handling strategy is obtained or the number of times the exception status is sent reaches the preset number.

3. The processing method according to claim 1, characterized in that, Execute the preset execution functions corresponding to the preset exception states that are successfully matched, including: If the preset execution function corresponding to the successfully matched preset abnormal state is the restart function, then the restart operation will be performed; If the preset execution function corresponding to the successfully matched preset abnormal state is the shutdown function, then the shutdown operation will be performed.

4. The processing method according to claim 1, characterized in that, The exception handling strategy provides the specified interface required for the data transfer function; it executes the preset execution function corresponding to the successfully matched preset exception state, including: If the preset execution function corresponding to the successfully matched preset abnormal state is the data transfer function, then the local data will be sent to the specified storage server through the specified interface.

5. The processing method according to claim 1, characterized in that, Before executing the preset execution function corresponding to the successfully matched preset exception state, the processing method further includes: The remaining processing and storage resources are checked to see if they meet the processing and storage requirements for executing the target function; wherein, the target function is a preset function corresponding to a successfully matched preset abnormal state. If all are true, then execute the preset execution function corresponding to the preset exception state that was successfully matched; If any of them are not true, then the preset execution function corresponding to the preset exception state that was successfully matched will be stopped.

6. The processing method according to any one of claims 1 to 5, characterized in that, Execute the preset execution functions corresponding to the preset exception states that are successfully matched, including: If the preset execution function corresponding to the successfully matched preset abnormal state is a script execution function, then the combination of preset execution functions specified by the temporary script is executed based on the temporary script obtained from the main server.

7. The processing method according to any one of claims 1 to 5, characterized in that, In the event of an abnormal state of the individual machine, it sends its abnormal state to the central server to obtain the abnormal handling strategy from the central server, including: Anomaly detection is performed on the stand-alone machine's own state based on a preset period; If an abnormal state is detected, the abnormal state is used as a request parameter to construct a retrieval request; The request is sent to the main server to obtain the exception handling strategy in the main server.

8. A single-machine anomaly handling device, characterized in that, Each individual machine is used in a pre-installed environment, and each individual machine is connected to the main server. The processing device includes: The acquisition module is used to send its own abnormal state to the main server when the single machine's own state is abnormal, so as to obtain the abnormal handling strategy in the main server; the abnormal handling strategy includes multiple preset abnormal states, and each preset abnormal state corresponds to its own preset execution function. A matching module is used to match the plurality of preset abnormal states with its own abnormal state in response to the exception handling strategy. An execution module is used to execute a preset execution function corresponding to a preset abnormal state if a match is successful, in order to handle the exception; wherein, the preset execution function is a pre-set execution function in each standalone machine.

9. An electronic device, characterized in that, include: Controller; A memory for storing one or more programs, which, when executed by a controller, cause the controller to implement the processing method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, It stores computer-readable instructions that, when executed by the computer's processor, cause the computer to perform the processing method described in any one of claims 1 to 7.