Fault information processing method, material sorting system and electronic equipment

By adopting a publish-subscribe mechanism and multi-level caching in the material sorting system, combined with a fault mapping table, the problems of inaccurate fault information processing and easy loss in the existing technology are solved, realizing fast and accurate fault information processing and fault root cause location, and improving the stability and efficiency of the system.

CN121770971APending Publication Date: 2026-03-31NUCTECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-18
Publication Date
2026-03-31

AI Technical Summary

Technical Problem

Existing material sorting systems struggle to process fault information quickly and accurately during troubleshooting. Parameter servers have insufficient performance, cannot provide frequent status updates, have poor fault tolerance, and are prone to losing fault information and failing to express complex fault details.

Method used

A publish-subscribe mechanism is adopted to obtain fault information. Multi-level caching and fault mapping table are used to obtain fault information by subscribing to the message topics of each functional node. Multi-level caching increases the storage capacity, and fault mapping table is used to obtain rich fault information. The addition, deletion and modification of mapping relationships are supported, which facilitates maintenance.

Benefits of technology

It enables timely acquisition and accurate processing of fault information, avoids information loss, improves the efficiency and reliability of fault handling, and can quickly locate the root cause of the fault and reduce resource waste.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121770971A_ABST
    Figure CN121770971A_ABST
Patent Text Reader

Abstract

The invention provides a fault information processing method and a material sorting system.The fault information processing method comprises the steps that according to multiple message themes subscribed for multiple function nodes in the material sorting system, fault information published by any function node in the multiple function nodes based on the corresponding message theme is obtained, the plurality of function nodes are used for realizing a plurality of functions of the material sorting system; the fault information is stored in multiple levels of caches in sequence, at least the last level of cache in the multiple levels of caches belongs to the diagnosis module, and the other caches are independent of the diagnosis module; obtaining the fault information from the last-stage cache through a diagnosis module, and analyzing the fault information to obtain at least one fault field; and querying, by the diagnosis module, at least one matched fault content from a fault mapping table based on the at least one fault field, the fault mapping table comprising a mapping relationship between the fault fields of the plurality of function nodes and the fault content.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the fields of material sorting, fault handling, or other technical fields, and more specifically to fault information processing methods, material sorting systems, and electronic equipment. Background Technology

[0002] In material sorting scenarios, material images can be acquired through methods such as radiation scanning and optical scanning. The material type can then be determined through image recognition, and different materials can be sprayed into corresponding sorting bins, for example, through nozzles. Material sorting systems, which combine various structures such as radiation sources, detectors, nozzles, conveying mechanisms, and image algorithm recognition modules, are quite complex. In the event of a malfunction, it is difficult to process fault information quickly and accurately. Summary of the Invention

[0003] In view of the above problems, this application provides a fault information processing method, a material sorting system, and electronic equipment.

[0004] According to a first aspect of this application, a fault information processing method is provided, comprising: obtaining fault information published by any one of the multiple functional nodes based on a corresponding message topic, based on multiple message topics subscribed to by multiple functional nodes in a material sorting system, wherein the multiple functional nodes are used to implement multiple functions of the material sorting system; storing the fault information sequentially in a multi-level cache, wherein at least the last-level cache belongs to a diagnostic module, and the remaining caches are independent of the diagnostic module; retrieving the fault information from the last-level cache through the diagnostic module and parsing it to obtain at least one fault field; and querying at least one matching fault content from a fault mapping table based on the at least one fault field through the diagnostic module, wherein the fault mapping table includes the mapping relationship between the fault fields and fault content of the multiple functional nodes.

[0005] According to an embodiment of this application, the multi-level cache includes a first message queue and a second message queue, where the second message queue is the last-level cache. Storing fault information sequentially into the multi-level cache includes: in response to obtaining fault information, storing the fault information into the first message queue; reorganizing the fault information in the first message queue based on a first data structure to obtain reorganized fault information, wherein the reorganization is used to supplement the functional node information missing from the fault information relative to the first data structure; and storing the reorganized fault information into the second message queue.

[0006] According to embodiments of this application, obtaining fault information published by any one of the multiple functional nodes based on a corresponding message topic, based on multiple message topics subscribed to for multiple functional nodes in a material sorting system, includes: subscribing to multiple message topics for at least the X-ray source node, detector node, material blowing node, material conveying node, and material image recognition node of the material sorting system; and in response to a fault occurring in any one of the functional nodes (X-ray source node, detector node, material blowing node, material conveying node, and material image recognition node), obtaining fault information published by any one of the functional nodes based on a corresponding message topic.

[0007] According to an embodiment of this application, the method further includes: obtaining at least two fault messages issued by at least two nodes among the radiation source node, detector node, material blowing node, material conveying node, and material image recognition node from the last-level buffer; in response to the fact that the at least two fault messages contain associated fault content, merging the at least two fault messages to obtain merged fault information, the merged fault information including at least two functional node information that issued the at least two fault messages, associated fault content, and other non-associated fault content; and storing the merged fault information in a database.

[0008] According to an embodiment of this application, the method further includes: in response to receiving a fault display request, obtaining merged fault information from a database through a diagnostic module, parsing to obtain at least one fault field, and querying to obtain at least one fault content; assembling the merged fault information and at least one fault content based on a second data structure to obtain display information, wherein the fault content includes at least one of the following: fault identifier of a functional node, fault name, fault location, fault description, solution, fault time information, and personnel information; and displaying the display information on a front-end interface, wherein the second data structure is adapted to the display components of the front-end interface.

[0009] According to an embodiment of this application, the method further includes: parsing fault information of at least one of the X-ray source node, detector node, material blowing node, material conveying node, and material image recognition node to obtain a fault field associated with fault priority; and determining the time when the fault information is displayed on the front-end interface based on the fault priority.

[0010] According to an embodiment of this application, the method further includes: accessing an interface of at least one of the following: a radiation source node, a detector node, a material blowing node, a material conveying node, and a material image recognition node, and obtaining the node status returned by the interface.

[0011] According to an embodiment of this application, the method further includes: deleting the fault information in the last-level cache in response to receiving an instruction indicating that the fault information has been processed.

[0012] A second aspect of this application provides a material sorting system, comprising: multiple functional nodes for implementing multiple functions of the material sorting system; and a fault information processing device configured to perform the method described above.

[0013] A third aspect of this application provides an electronic device comprising: one or more processors; and a memory for storing one or more computer programs, wherein the one or more processors execute the one or more computer programs to implement the steps of the method described above.

[0014] The fault information processing method provided in this application can achieve at least the following technical effects: By using a publish-subscribe approach, fault information can be obtained promptly based on the message topics of each subscribed functional node. Furthermore, multi-level caching can be used to increase the storage capacity of fault information, preventing its loss. Additionally, a fault mapping table can be used to obtain richer fault information and facilitates the addition, deletion, and modification of the mapping relationship between fault fields and fault content for various functional nodes when changes occur, simplifying maintenance. Attached Figure Description

[0015] The above-mentioned contents, other objects, features and advantages of this application will become clearer from the following description of embodiments with reference to the accompanying drawings, in which:

[0016] Figure 1 This diagram illustrates the basic architecture of a material sorting system.

[0017] Figure 2 A flowchart illustrating a fault information processing method according to an embodiment of this application is shown schematically.

[0018] Figure 3 The diagram illustrates the architecture of a fault information processing method according to an embodiment of this application.

[0019] Figure 4 A flowchart illustrating the storage and reconstruction of fault information according to an embodiment of this application is shown schematically.

[0020] Figure 5 A flowchart illustrating the merging of fault information according to an embodiment of this application is shown schematically;

[0021] Figure 6 This illustration schematically shows a flowchart of the display information displayed on the front-end interface according to an embodiment of this application;

[0022] Figure 7 This schematic diagram illustrates the structure of a fault information processing apparatus according to an embodiment of the present application;

[0023] Figure 8A block diagram of an electronic device suitable for implementing a fault information processing method according to an embodiment of this application is shown schematically. Detailed Implementation

[0024] The embodiments of this application will now be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of this application. In the following detailed description, numerous specific details are set forth to provide a thorough understanding of the embodiments of this application for ease of explanation. However, it will be apparent that one or more embodiments may be implemented without these specific details. Furthermore, descriptions of well-known structures and technologies are omitted in the following description to avoid unnecessarily obscuring the concepts of this application.

[0025] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the scope of this application. The terms “comprising,” “including,” etc., as used herein indicate the presence of features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.

[0026] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein are to be interpreted in a manner consistent with the context of this specification, and not in an idealized or overly rigid way.

[0027] When using expressions such as "at least one of A, B and C", they should generally be interpreted in accordance with the meaning that is commonly understood by those skilled in the art (e.g., "a system having at least one of A, B and C" should include, but is not limited to, a system having A alone, a system having B alone, a system having C alone, a system having A and B, a system having A and C, a system having B and C, and / or a system having A, B and C, etc.).

[0028] Figure 1 The diagram illustrates the basic architecture of a material sorting system.

[0029] like Figure 1As shown, the material sorting system 10 includes a conveying device 11, a server 12, a blowing device 13, a sorting bin 14, a comprehensive imaging camera 15_1, a X-ray imaging module 15_2, and a feeder 16. The feeder 16 is used to place the material to be sorted onto the conveying device 11, which is used to convey the material to be sorted; the X-ray imaging module 15_2 (including an X-ray source and a detector) is used to capture X-ray images of the material to be sorted; the comprehensive imaging camera 15_1 is used to capture one or more non-X-ray images of the material to be sorted; the server 12 is used to acquire one or more images of the material to be sorted and generate control signals through image recognition; the blowing device 13 is used to blow the material leaving the conveying device 11 into the sorting bin 14 in response to the control signal from the server 12.

[0030] For example, the materials to be sorted may include ores, food, beverages, or other items to be sorted on a production line. By identifying the material information of the materials to be sorted, the materials are divided into multiple types based on the material information, and the different types of materials are sorted.

[0031] The conveying device 11 may include one or a combination of several of the following: a horizontally arranged conveyor belt, an inclined conveyor belt, and an angled inclined slide. Unless otherwise stated, the conveying device 11 includes at least one horizontally arranged conveyor belt. Different types and particle sizes of materials are distributed along the length (i.e., the conveying direction) and width along the conveying device 11. Due to the conveyor belt's operating speed, different materials are scattered on the conveyor belt, and when transported to the end position, the materials are thrown into the air from the conveyor belt and undergo projectile motion.

[0032] The blowing device 13 includes one or more nozzles, such as multiple nozzles arranged in an array, a solenoid valve, and a gas supply device. The gas supply device contains compressed gas to provide a gas source for the nozzles to blow different types of materials. Each nozzle can be connected to a solenoid valve, which is connected to the gas supply device. The opening and closing of the solenoid valve controls the gas blowing from the nozzle.

[0033] During long-term operation, various components or modules of the material sorting system 10 are prone to functional failures. For example, a malfunction in the conveyor 11 will cause the material conveying to stop; a malfunction in the X-ray imaging module 15_2 will result in the inability to acquire X-ray images; and a malfunction in the blowing device 13 will make it difficult to accurately blow the material to its corresponding sorting position. Fault diagnosis of the material sorting system 10 can be handled using a Robot Operating System (ROS). The Robot Operating System (ROS) provides services similar to a computer system, including hardware abstraction description, low-level driver management, execution of common functions, inter-program message passing, and program distribution package management. The functions of the material sorting system 10 can be mapped to functional nodes using ROS. For example, the conveyor 11, server 12, blowing device 13, sorting bin 14, integrated imaging camera 15_1, X-ray imaging module 15_2, and feeder 16 can be mapped to material conveying node, material image recognition node, material blowing node, integrated imaging camera node, X-ray source node, detector node, and feeder node. Nodes communicate with each other by sending information, and can obtain various information about the mapped entity structure. A node can be an executable file used to communicate with other nodes. These nodes can be deployed on the same host or on different hosts.

[0034] For example, ROS can provide a parameter schema to enable communication between nodes based on a parameter server. A parameter server is a multivariate, shared dictionary accessible via a network API. A parameter server can be viewed as a node that uses it at runtime to store, retrieve, or modify parameter values. For instance, when a fault occurs, the faulty functional node writes the fault information to the parameter server. The diagnostic module can act as a node, continuously polling the parameter server to obtain changes in fault information. Once fault information is obtained, it pushes the relevant content to the front-end alarm. The diagnostic module is used to parse, diagnose, and display fault information from various nodes.

[0035] Relying on a parameter server to process fault information in the material sorting system 10 has at least the following problems:

[0036] (1) Insufficient performance

[0037] The parameter server has low performance and cannot provide status updates frequently. Frequent polling increases the server's workload, sometimes causing it to miss some fault information. Furthermore, the parameter server's cache is limited; as the number of fault messages increases, it cannot meet storage requirements, leading to information loss.

[0038] (2) Unable to express complex fault information

[0039] The parameter server expresses faults in key-value pairs, which is a rather simplistic approach and fails to adequately represent important information such as fault type and severity. This necessitates the diagnostic module incurring additional overhead to repackage the fault information after it is received, resulting in significant time and effort wasted.

[0040] (3) Poor fault tolerance

[0041] If a fault occurs again before the fault information has been fully processed, the current diagnostic module cannot roll back the fault information to ensure data integrity. Furthermore, when the parameter server fails, it cannot provide feedback on information from each node. Therefore, when some important nodes stop working, the current diagnostic module cannot be aware of this in a timely manner, resulting in missing fault information.

[0042] To address the aforementioned issues, this application provides a fault information processing method that enables the diagnostic module to perform fast and accurate fault information processing even when the parameter server is removed.

[0043] According to the fault information processing method of this application, fault information is obtained in a timely manner based on the message topic of each subscribed functional node through a publish-subscribe approach. Multi-level caching can be used to increase the storage capacity of fault information, preventing its loss. Furthermore, a fault mapping table allows for the acquisition of richer fault information and facilitates the addition, deletion, and modification of the mapping relationship between fault fields and fault content for various functional nodes when changes occur, simplifying maintenance.

[0044] The following will be based on Figure 1 The described scene, through Figures 2-6 The fault information processing method according to the embodiments of this application will be described in detail.

[0045] Figure 2 A flowchart illustrating a fault information processing method according to an embodiment of this application is shown.

[0046] like Figure 2 As shown, the fault information processing method of this embodiment includes operations S210 to S240, and the fault information processing method can be executed based on one or more nodes in ROS.

[0047] In operation S210, based on multiple message topics subscribed to by multiple functional nodes in the material sorting system, fault information published by any one of the multiple functional nodes based on the corresponding message topic is obtained. The multiple functional nodes are used to implement multiple functions of the material sorting system.

[0048] For example, a node can become a publisher by publishing messages on a topic, or it can become a subscriber by subscribing to messages on a topic. Message topics have a topic identifier used in the message publish / subscribe pattern to allow publishers and subscribers to find each other. Based on the topic identifier, the publisher uses the publish interface to publish messages to a specific topic, and the subscriber receives messages by subscribing to that topic using the subscribe interface.

[0049] For example, the conveyor node, server node, jetting node, integrated imaging camera node, X-ray source node, detector node, and feeder node can each act as publishers, while the diagnostic module node can act as subscribers. Fault information can be in JSON format, containing fixed fields such as "fault_code", "timestamp", "node_id", and "severity".

[0050] For example, a subscriber can obtain fault information published by at least one functional node based on a corresponding message topic. If the diagnostic module node acts as a subscriber, it can obtain fault information published by at least one functional node among the following: conveyor node, server node, jetting node, integrated imaging camera node, X-ray source node, detector node, and feeder node. The diagnostic module node can simultaneously obtain fault information published by two or more functional nodes based on their respective message topics; for example, three threads can be set up to separately obtain fault information published by the X-ray source node, detector node, and feeder node (this is just an example).

[0051] In some embodiments, such as for a field stop-blowing fault in a material sorting system, at least two fault messages published by at least two functional nodes based on corresponding message topics can be obtained to comprehensively determine the root cause of the stop-blowing fault and promptly eliminate the fault. For example, in related technologies, diagnostic information for material sorting systems can only determine the abnormality of a single module. However, based on operation S210, the fault information of multiple functional nodes can be used to make a comprehensive judgment and accurately locate the fault content. For instance, for a field stop-blowing fault, previously, multiple possible fault points could only be checked one by one through the stop-blowing alarm. Based on operation S210, at least two fault messages can be obtained. Through multiple fault messages such as abnormal MCB module data packet number and abnormal process control module trigger signal, the root cause can be accurately located as an abnormal termination of MCB module data acquisition, and the hardware can be restarted to restore production.

[0052] When operating S220, fault information is stored sequentially in a multi-level cache. At least the last level cache belongs to the diagnostic module, while the other caches are independent of the diagnostic module.

[0053] For example, fault information is stored sequentially in multi-level caches, such as L1 cache, L2 cache, and L3 cache. The L3 cache can be an internal cache of the diagnostic module, i.e., the last-level cache, which is the last cache where fault information can be stored. The "subordinate" and "independent" relationships can be determined according to management permissions. For example, the L1 and L2 caches are managed by a separate cache manager, while the L3 cache is managed by the diagnostic module itself.

[0054] For example, sequential storage refers to the process of gradually migrating the same fault information from the L1 cache to the L2 cache, and then from the L2 cache to the L3 cache. For instance, after one or more fault messages from at least one functional node among the conveyor node, server node, jetting node, integrated imaging camera node, X-ray source node, detector node, and feeder node are written to the L1 cache, the L2 cache can proactively request to retrieve them from the L1 cache and store them there. Simultaneously, this information is either immediately deleted from the L1 cache or deleted after a certain period. The L3 cache can proactively request to retrieve these messages from the L1 cache and store them there. Simultaneously, this information is either immediately deleted from the L1 cache or deleted after a certain period. Information in the L3 cache can only be deleted after the corresponding fault has been resolved, thus preventing the loss of fault information.

[0055] It should be noted that the "multi-level cache" proposed in Operation S220 refers to a cache of two levels or more, and is not limited to L1 cache, L2 cache, or L3 cache. This application does not limit the specific number of caches.

[0056] During operation S230, the diagnostic module retrieves fault information from the last-level cache and parses it to obtain at least one fault field.

[0057] Fault fields refer to specific data items in fault information that describe fault characteristics, such as fault code, fault timestamp, fault location, and fault severity level.

[0058] In operation S240, the diagnostic module queries the fault mapping table for at least one matching fault content based on at least one fault field. The fault mapping table includes the mapping relationship between fault fields and fault content of multiple functional nodes. The fault mapping table is used to store the correspondence between fault fields and corresponding specific fault content descriptions.

[0059] Taking ore as an example, in the material sorting system, the diagnostic module pre-subscribes to fault information topics for each functional node. First, in operation S210, when signal strength decreases due to detector aging, the detector node generates fault information, including fault code "001," occurrence time, node ID, etc., and publishes it to the corresponding fault information topic. Then, in operation S220, this fault information is first stored in the L1 cache (e.g., the local cache of the material sorting system). Subsequently, the fault information is transferred to the ROS L2 cache, and then migrated to the diagnostic module's L3 cache (e.g., the local cache of the diagnostic module, or the cloud cache assigned to the diagnostic module). Then, in operation S230, key fault fields are extracted from the fault information in the L3 cache as query conditions. In operation S240, matching fault content is searched in a pre-established fault mapping table. The mapping table stores detailed information: the fault description corresponding to "001" is "abnormal X-ray detector signal strength," with possible causes including "detector aging" and "unstable high-voltage power supply," and suggested solutions such as "check and replace the aging detector" and "calibrate the high-voltage power supply." The subsequent diagnostic module can integrate the query results with the original fault fields and display them to maintenance personnel through the front-end interface.

[0060] According to embodiments of this application, fault information is obtained promptly based on the message topics of each subscribed functional node through a publish-subscribe mechanism. Multi-level caching can alleviate storage pressure, increase the amount of stored fault information, and prevent information loss. Furthermore, a fault mapping table allows for the acquisition of richer fault information and facilitates the addition, deletion, and modification of the mapping relationships between fault fields and fault content for various functional nodes when changes occur, simplifying maintenance.

[0061] Figure 3 The diagram illustrates the architecture of a fault information processing method according to an embodiment of this application.

[0062] In some embodiments, in operation S210, obtaining fault information published by any one of the multiple functional nodes based on a corresponding message topic according to multiple message topics subscribed to by multiple functional nodes in the material sorting system includes:

[0063] Subscribe to at least multiple message topics for the X-ray source node, detector node, material blowing node, material conveying node, and material image recognition node of the material sorting system;

[0064] In response to a failure of any of the functional nodes, including the X-ray source node, detector node, material blowing node, material conveying node, and material image recognition node, obtain the failure information published by any functional node based on the corresponding message topic.

[0065] For example, refer to Figure 3 The multi-level cache includes a first message queue 320 and a second message queue 331. Based on the pre-subscribed message topics of the X-ray source node, detector node, material injection node, material conveying node, and material image recognition node, the diagnostic module obtains fault information published by the X-ray source node 311 in response to a fault to message topic_1, the detector node 312 in response to a fault to message topic_2, the material injection node 31 in response to a fault to message topic_3, the material conveying node 314 in response to a fault to message topic_4, and the material image recognition node 315 in response to a fault to message topic_5.

[0066] Next, in one embodiment of operation S220, messages from message topics_1,_2,_3,_4, and_5 are all stored in the first message queue 320, and then the first message queue 320 transmits the data to the second message queue 331 (belonging to the diagnostic module 330). In some embodiments, the data in the second message queue 331 can be stored in the database 332 for persistence. The diagnostic module 330 can load a pre-established fault mapping table for querying, and finally present the results on the front-end interface 340.

[0067] For example, for message topic_1, message topic_2, message topic_3, message topic_4, and message topic_5, five threads can be set up to retrieve the published messages respectively.

[0068] According to embodiments of this application, a point-to-point subscription and publish messaging mechanism enables each functional node to quickly report fault information.

[0069] Figure 4 A flowchart illustrating the storage and reconstruction of fault information according to an embodiment of this application is shown.

[0070] In some embodiments, the multi-level cache includes a first message queue and a second message queue, wherein the second message queue is the last-level cache, and storing fault information sequentially into the multi-level cache includes:

[0071] Upon receiving fault information, the fault information is stored in the first message queue;

[0072] Based on the first data structure, the fault information in the first message queue is reassembled to obtain the reassembled fault information. The reassembly is used to supplement the functional node information that is missing from the fault information relative to the first data structure.

[0073] The reconstructed fault information is stored in the second message queue.

[0074] For example, the first data structure can be a predefined data format template used to verify and supplement fault information. Reorganization is the process of normalizing the original fault information according to the first data structure and supplementing missing information. Figure 4 For the original fault message containing only the fault code, topic code, and fault type, missing fields such as node information and personnel information are supplemented from the functional nodes to obtain struct AlarmData (reconstructed fault information). The first message queue 410 can perform initial reception and buffering of fault information, avoiding message loss due to network jitter and enabling timely response to high-concurrency fault events. Based on the performance of the diagnostic module itself and the first message queue 410, messages can be consumed from the first message queue 410 and the reconstructed fault information stored in the second message queue 420.

[0075] For example, if a detector loses connection due to poor contact, the detector node immediately generates fault information, including fault code "003" and the occurrence time. This information is then serialized into JSON format and added to the first message queue. The fault information is then retrieved from the first message queue 410, revealing that it only contains a basic fault code and timestamp, lacking detailed node information. Based on a preset first data structure, the node type "X-ray detector," node ID "DET-101," node name "X-ray detector A," location "sorting line 1," and responsible person "Engineer A" are automatically retrieved. This information is merged with the original fault information to generate reconstructed fault information, which is then stored in the second message queue 420.

[0076] In related technologies, parameter servers have low performance and cannot provide status updates frequently. Frequent polling increases the load on the parameter server, sometimes causing some fault information to be missed.

[0077] According to embodiments of this application, a message reassembly mechanism based on a first data structure automatically supplements missing information in the fault information, enriching the content of the fault information and avoiding diagnostic errors caused by incomplete information. Furthermore, the two-level message queue design enables asynchronous processing of fault information, preventing omissions and decoupling fault information reception, processing, and diagnostic analysis. This allows each stage to be independently expanded and optimized, improving overall processing efficiency and throughput.

[0078] Figure 5 A flowchart illustrating the merging of fault information according to an embodiment of this application is shown schematically.

[0079] In some embodiments, the fault information processing method further includes:

[0080] Obtain at least two fault messages from at least two of the following nodes: the X-ray source node, the detector node, the material blowing node, the material conveying node, and the material image recognition node, from the last-level buffer;

[0081] In response to at least two fault messages containing associated fault content, the at least two fault messages are merged to obtain merged fault information. The merged fault information includes information about at least two functional nodes that issued at least two fault messages, associated fault content, and other non-associated fault content.

[0082] The merged fault information is stored in the database.

[0083] For example, the associated fault content includes the same or related fault content in the fault information published by different functional nodes, which may be caused by the same reason or affect each other. For example, the existence of a correlation can be identified based on preset association rules such as fault code similarity, occurrence time difference, and logical dependencies between nodes.

[0084] For example, refer to Figure 5 During the sorting process, if the high-voltage power supply of the X-ray source becomes unstable, the X-ray source node will issue a "high-voltage power supply abnormality" fault message, the detector node will issue a "signal strength unstable" fault message, and the material image recognition node will issue a "image quality degraded" fault message. The timestamps of these fault messages are relatively close. Pre-defined association rules can include "X-ray source abnormalities may cause detector signal problems, thereby affecting image recognition quality." If these fault messages are determined to be correlated, they will be merged.

[0085] It is understandable that the merging process can be performed on multiple fault messages in the second message queue and then stored in the database, or it can be performed asynchronously on multiple fault messages in the first message queue, then the merged fault messages can be reassembled and stored in the second message queue, and then asynchronously persisted from the second message queue to the database.

[0086] According to embodiments of this application, the merged fault information provides more comprehensive fault context information. By identifying and merging related fault information, the root cause of the fault can be determined more accurately, significantly shortening the fault handling time. Furthermore, merging multiple essentially related fault information entries into one eliminates redundant information and reduces database storage pressure.

[0087] Figure 6 The flowchart illustrating the display information displayed on the front-end interface according to an embodiment of this application is shown in the schematic diagram.

[0088] In some embodiments, the fault information processing method further includes:

[0089] In response to receiving a fault display request, the diagnostic module retrieves the merged fault information from the database, parses it to obtain at least one fault field, and queries to obtain at least one fault content.

[0090] Based on the second data structure, the merged fault information and at least one fault content are assembled to obtain display information. The fault content includes at least one of the following: fault identifier of functional node, fault name, fault location, fault description, solution, fault time information, and personnel information.

[0091] The information will be displayed on the front-end interface, and the second data structure will be adapted to the display components of the front-end interface.

[0092] For example, a fault display request can be a query request issued by relevant personnel through a terminal device, or it can be automatically generated by the backend system in response to a fault. The second data structure includes templates for adapting to the display requirements of the front-end interface. These templates can be determined according to the requirements of the display components. For example, based on a predefined second data structure, information such as fault ID, name, and location are mapped to corresponding data fields, and corresponding display style attributes are added according to the fault type (e.g., a red warning style is used for severe faults). Simultaneously, solutions, personnel information, and other content are organized into a format suitable for display in the details panel. The display components include visual elements in the front-end interface used to display fault information. The fault identifier indicates the type of fault, the fault location indicates the specific location where the fault occurred, such as a detector or a specific pixel unit within a detector, the fault description includes the specific fault content, and the solution includes measures to address the fault.

[0093] According to the embodiments of this application, based on the merged fault information, the fault information of multiple functional nodes can be displayed in association, avoiding repeated querying and processing of the original data, and helping to efficiently identify the root cause of the fault.

[0094] Reference Figure 6 After the software (such as the application performing diagnostic operations in the diagnostic module) initializes, it executes the "open mapping table file" operation to load the mapping table using a third data structure. When a fault occurs, the fault information published by the functional node is stored in a U8 queue (i.e., the first message queue), and then a message is asynchronously sent to the diagnostic module based on the U8 queue. For example, the diagnostic module asynchronously consumes the fault information from this U8 queue. The diagnostic module retrieves the fault information from the U8 queue, reassembles it according to the first data structure, stores it in a second message queue (e.g., another U8 queue), and then asynchronously persists it to the database. Then, in response to the "fault display request," it assembles the display data and feeds it back to the front-end interface. The U8 queue includes queues that use unsigned 8-bit integers (Uint8) as the data type for storage.

[0095] In related technologies, parameter servers express faults in the form of key-value pairs. This method is relatively simple and cannot effectively reflect important information such as fault type and level. This requires the diagnostic module to incur additional overhead to repackage the fault information after it is received, which is time-consuming and labor-intensive.

[0096] The third data structure is a structured data format used for the contents of the mapping table. For example, it can store the mapping relationship between functional node fault information and display and processing rules, including mapping rules for key information such as fault identifier, name, location, priority, and processing flow. Unlike the single key-value pair format of the parameter server, this data structure can express fault information in multiple dimensions. The diagnostic module asynchronously consumes fault information from the U8 queue and assembles display data using the mapping table, avoiding additional information packaging overhead.

[0097] Understandably, separate data structures were designed for functional nodes, the front end, and the diagnostic module to improve the timeliness and convenience of diagnostic information transmission.

[0098] In some embodiments, the fault information processing method further includes: parsing fault information from at least one of the X-ray source node, detector node, material blowing node, material conveying node, and material image recognition node to obtain a fault field associated with the fault priority; and determining the time for the fault information to be displayed on the front-end interface based on the fault priority.

[0099] For example, fault priority indicates the urgency and importance of a fault, used to determine the priority of fault handling and resource allocation. For instance, a radiation source fault might be classified as the highest priority, while an abnormal clarity in a material image might be classified as a lower priority. The front-end interface display time refers to the moment when fault information begins to appear on the user interface and is available for operator viewing. This moment is adjusted according to fault priority. For example, a highest-priority urgent fault might be displayed immediately on the front-end interface; while a low-priority fault might be displayed with a 5-minute delay, or only upon receiving a fault display request.

[0100] For example, fault fields associated with fault priority can include fault type fields or separately set priority fields. Fault type fields can include types such as warning, error, and fault, corresponding to low priority, medium priority, and high priority, respectively. Alternatively, for radiation source nodes, fault priority can be determined by fields such as the degree of temperature anomaly, radiation dose fluctuation, and high-pressure system status. For detector nodes, priority can be determined by fields such as signal attenuation amplitude, noise level, and response time. For material injection nodes, priority can be determined by fields such as solenoid valve actuation frequency, air pressure stability, and response time. For material conveying nodes, priority can be determined by fields such as conveying speed fluctuation and material distribution uniformity. For material image recognition nodes, priority can be determined by fields such as image clarity, the rate of decrease in recognition accuracy, and processing delay.

[0101] According to the embodiments of this application, by enriching the content of fault information, the priority of fault information can be efficiently distinguished. By identifying the fault priority and controlling the display time based on the priority, high-priority information can be selectively fed back to the front end immediately, ensuring that high-priority faults can be detected and processed in a timely manner, and avoiding the waste of resources caused by focusing on processing every piece of information.

[0102] In some embodiments, the fault information processing method further includes: accessing an interface of at least one of the X-ray source node, detector node, material blowing node, material conveying node, and material image recognition node, and obtaining the node status returned by the interface.

[0103] For example, the interface could be a publishing interface where each node acts as a publisher to publish messages based on a message topic, or it could be any other interface used to provide feedback on node status. Node status indicates the current operational status of each functional node.

[0104] In related technologies, when the parameter server fails, it cannot provide feedback on information from each node. Therefore, when some important nodes stop working, the current diagnostic module cannot know in time, resulting in a lack of fault information.

[0105] According to the embodiments of this application, real-time status data can be obtained by actively accessing the interfaces of each functional node, abnormal situations can be detected and handled in a timely manner, the reliability and stability of fault information processing can be improved, and possible losses can be avoided or reduced.

[0106] In some embodiments, the fault information processing method further includes: deleting the fault information from the last-level cache in response to receiving a fault information indication that the fault has been processed. For example, the fault processing instruction may be sent automatically by relevant personnel or the background system to confirm that a fault has been processed or resolved.

[0107] In related technologies, if a fault occurs again before the fault information has been fully processed, the information in the parameter server will be overwritten, and the current diagnostic module cannot roll back the fault information to ensure data integrity.

[0108] According to embodiments of this application, the fault information processing involves two separate processes: receiving and processing. Fault information is only removed after final processing is complete, ensuring the integrity of the fault information. By controlling the timing of fault information deletion, it is ensured that each fault can be tracked to its final processing status, preventing fault information from being overwritten and lost.

[0109] In some embodiments, this application also provides a material sorting system, including:

[0110] Multiple functional nodes are used to implement multiple functions of the material sorting system;

[0111] The fault information processing apparatus is configured to execute the fault information processing method as described in any of the above embodiments.

[0112] Based on the above fault information processing methods, the following will combine Figure 7 The fault information processing device in the material sorting system is described in detail.

[0113] Figure 7 A schematic block diagram of a fault information processing apparatus according to an embodiment of this application is shown.

[0114] like Figure 7 As shown, the fault information processing device 700 of this embodiment includes an acquisition module 710, a caching module 720, a parsing module 730, and a query module 740.

[0115] The acquisition module 710 can perform operation S210, which is used to acquire fault information published by any one of the multiple functional nodes based on the corresponding message topic according to multiple message topics subscribed to for multiple functional nodes in the material sorting system. The multiple functional nodes are used to implement multiple functions of the material sorting system.

[0116] The cache module 720 can perform operation S220 to store fault information sequentially into a multi-level cache. At least the last level cache belongs to the diagnostic module, while the other caches are independent of the diagnostic module.

[0117] The parsing module 730 can perform operation S230, which is used to parse fault information obtained from the last-level cache by the diagnostic module to obtain at least one fault field; and,

[0118] The query module 740 can perform operation S240, which is used by the diagnostic module to query at least one matching fault content from the fault mapping table based on at least one fault field. The fault mapping table includes the mapping relationship between fault fields and fault content of multiple functional nodes.

[0119] In some embodiments, the multi-level cache includes a first message queue and a second message queue, the second message queue being the last-level cache. The cache module 720 is further configured to: in response to obtaining fault information, store the fault information in the first message queue; reassemble the fault information in the first message queue based on a first data structure to obtain reassembled fault information, the reassembly being used to supplement the functional node information missing from the fault information relative to the first data structure; and store the reassembled fault information in the second message queue.

[0120] In some embodiments, the acquisition module 710 is further configured to: subscribe to multiple message topics for at least the X-ray source node, detector node, material blowing node, material conveying node, and material image recognition node of the material sorting system; and in response to a failure of any functional node among the X-ray source node, detector node, material blowing node, material conveying node, and material image recognition node, acquire the fault information published by any functional node based on the corresponding message topic.

[0121] In some embodiments, the fault information processing apparatus 700 may further include a merging module and a persistence module. The acquisition module 710 is further configured to acquire at least two fault information messages issued by at least two nodes among the radiation source node, detector node, material blowing node, material conveying node, and material image recognition node from the final-level cache; the merging module is configured to merge the at least two fault information messages in response to the fact that the at least two fault information messages contain associated fault content, to obtain merged fault information, the merged fault information including at least two functional node information messages that issued the at least two fault information messages, associated fault content, and other non-associated fault content; the persistence module is configured to store the merged fault information to a database.

[0122] In some embodiments, the fault information processing device 700 may further include a parsing module, an assembly module, and a display module. In response to receiving a fault display request, the acquisition module 710 is further configured to acquire merged fault information from a database via a diagnostic module; the parsing module is configured to parse and obtain at least one fault field; and the query module 740 is configured to query and obtain at least one fault content. The assembly module is configured to assemble the merged fault information and at least one fault content based on a second data structure to obtain display information. The fault content includes at least one of the following: fault identifier of a functional node, fault name, fault location, fault description, solution, fault time information, and personnel information. The display module is configured to display the display information on a front-end interface, and the second data structure is adapted to the display components of the front-end interface.

[0123] In some embodiments, the parsing module is further configured to parse fault information of at least one of the X-ray source node, detector node, material blowing node, material conveying node, and material image recognition node to obtain a fault field associated with the fault priority; the display module is further configured to determine the time when the fault information is displayed on the front-end interface according to the fault priority.

[0124] In some embodiments, the fault information processing device 700 may further include a status module for accessing an interface of at least one of the X-ray source node, detector node, material blowing node, material conveying node, and material image recognition node, and obtaining the node status returned by the interface.

[0125] In some embodiments, the fault information processing apparatus 700 may further include a deletion module for deleting fault information from the final-level cache in response to a fault information instruction indicating that the fault has been processed.

[0126] According to embodiments of this application, any multiple modules among the acquisition module 710, cache module 720, parsing module 730, and query module 740 can be merged into one module, or any one of these modules can be split into multiple modules. Alternatively, at least part of the functionality of one or more of these modules can be combined with at least part of the functionality of other modules and implemented in one module. According to embodiments of this application, at least one of the acquisition module 710, cache module 720, parsing module 730, and query module 740 can be at least partially implemented as hardware circuitry, such as a field-programmable gate array (FPGA), programmable logic array (PLA), system-on-a-chip, system-on-a-substrate, system-on-package, application-specific integrated circuit (ASIC), or implemented by any other reasonable means of integrating or packaging circuitry, or implemented in software, hardware, or firmware, or by any suitable combination of any of these three implementation methods. Alternatively, at least one of the acquisition module 710, cache module 720, parsing module 730, and query module 740 can be at least partially implemented as a computer program module, which can perform corresponding functions when the computer program module is run.

[0127] Figure 8 A block diagram of an electronic device suitable for implementing a fault information processing method according to an embodiment of this application is shown schematically.

[0128] like Figure 8As shown, an electronic device 800 according to an embodiment of this application includes a processor 801, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 802 or a program loaded from a storage portion 808 into a random access memory (RAM) 803. The processor 801 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or an associated chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 801 may also include onboard memory for caching purposes. The processor 801 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of this application.

[0129] RAM 803 stores various programs and data required for the operation of electronic device 800. Processor 801, ROM 802, and RAM 803 are interconnected via bus 804. Processor 801 executes various operations of the method flow according to embodiments of this application by executing programs in ROM 802 and / or RAM 803. It should be noted that programs may also be stored in one or more memories other than ROM 802 and RAM 803. Processor 801 may also execute various operations of the method flow according to embodiments of this application by executing programs stored in one or more memories.

[0130] According to embodiments of this application, the electronic device 800 may further include an input / output (I / O) interface 805, which is also connected to a bus 804. The electronic device 800 may also include one or more of the following components connected to the input / output (I / O) interface 805: an input section 806 including a keyboard, mouse, etc.; an output section 807 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 808 including a hard disk, etc.; and a communication section 809 including a network interface card such as a LAN card, modem, etc. The communication section 809 performs communication processing via a network such as the Internet. A drive 810 is also connected to the input / output (I / O) interface 805 as needed. A removable medium 811, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 810 as needed so that computer programs read from it can be installed into the storage section 808 as needed.

[0131] This application also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or it may exist independently and not assembled into the device / apparatus / system. The computer-readable storage medium carries one or more programs, which, when executed, implement the method according to the embodiments of this application.

[0132] According to embodiments of this application, the computer-readable storage medium can be a non-volatile computer-readable storage medium, such as including but not limited to: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this application, the 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. For example, according to embodiments of this application, the computer-readable storage medium may include ROM 802 and / or RAM 803 and / or one or more memories other than ROM 802 and RAM 803 described above.

[0133] Embodiments of this application also include a computer program product comprising a computer program containing program code for performing the methods shown in the flowchart. When the computer program product is run on a computer system, the program code is used to enable the computer system to implement the fault information processing method provided in the embodiments of this application.

[0134] When the computer program is executed by the processor 801, it performs the functions defined in the system / apparatus of this application embodiment. According to the embodiments of this application, the systems, apparatuses, modules, units, etc., described above can be implemented by computer program modules.

[0135] In one embodiment, the computer program may rely on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may also be transmitted and distributed in the form of signals over a network medium, and may be downloaded and installed via the communication section 809, and / or installed from a removable medium 811. The program code contained in the computer program can be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination thereof.

[0136] In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 809, and / or installed from the removable medium 811. When the computer program is executed by the processor 801, it performs the functions defined in the system of this application embodiment. According to the embodiments of this application, the systems, devices, apparatuses, modules, units, etc., described above can be implemented by computer program modules.

[0137] According to embodiments of this application, program code for executing the computer programs provided in the embodiments of this application can be written in any combination of one or more programming languages. Specifically, these computational programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages ​​include, but are not limited to, languages ​​such as Java, C++, Python, "C", or similar programming languages. The program code can be executed entirely on the user's computing device, partially on the user's device, partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).

[0138] 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. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in 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.

[0139] Those skilled in the art will understand that the features described in the various embodiments of this application can be combined and / or combined in various ways, even if such combinations or combinations are not explicitly described in this application. In particular, the features described in the various embodiments of this application can be combined and / or combined in various ways without departing from the spirit and teachings of this application. All such combinations and / or combinations fall within the scope of this application.

Claims

1. A fault information processing method, comprising: obtaining, according to a plurality of message topics subscribed by a plurality of functional nodes in a material sorting system, fault information published by any one of the plurality of functional nodes based on a corresponding message topic, the plurality of functional nodes being used to implement a plurality of functions of the material sorting system; storing the fault information to a plurality of levels of cache in sequence, at least a last level of cache in the plurality of levels of cache being affiliated to a diagnosis module, and the rest of the cache being independent of the diagnosis module; obtaining, by the diagnosis module, the fault information from the last level of cache for analysis to obtain at least one fault field; and querying, by the diagnosis module, at least one matching fault content from a fault mapping table based on the at least one fault field, the fault mapping table comprising a mapping relationship between fault fields and fault contents of the plurality of functional nodes.

2. The method of claim 1, wherein, The plurality of levels of cache comprises a first message queue and a second message queue, the second message queue being the last level of cache, and the storing of the fault information to the plurality of levels of cache in sequence comprises: storing the fault information to the first message queue in response to obtaining the fault information; reorganizing, based on a first data structure, the fault information in the first message queue to obtain reorganized fault information, the reorganization being used to supplement functional node information missing in the fault information relative to the first data structure; storing the reorganized fault information to the second message queue.

3. The method according to claim 1 or 2, characterized in that, The obtaining, according to a plurality of message topics subscribed by a plurality of functional nodes in a material sorting system, fault information published by any one of the plurality of functional nodes based on a corresponding message topic comprises: subscribing to the plurality of message topics at least for a ray source node, a detector node, a material blowing node, a material conveying node, and a material image recognition node of the material sorting system; in response to any one of the ray source node, the detector node, the material blowing node, the material conveying node, and the material image recognition node failing, obtaining the fault information published by the any one of the functional nodes based on a corresponding message topic.

4. The method of claim 3, wherein, The method further comprises: obtaining, from the last level of cache, at least two pieces of fault information published by at least two of the ray source node, the detector node, the material blowing node, the material conveying node, and the material image recognition node; in response to the at least two pieces of fault information containing associated fault content, merging the at least two pieces of fault information to obtain merged fault information, the merged fault information comprising at least two functional node information of the at least two pieces of fault information, the associated fault content, and the rest of the non-associated fault content; storing the merged fault information to a database.

5. The method of claim 4, wherein, The method further comprises: in response to receiving a fault display request, obtaining, by the diagnosis module, the merged fault information from the database, analyzing to obtain the at least one fault field, and querying to obtain the at least one fault content; Assembling the merged fault information and the at least one fault content based on the second data structure to obtain display information, the fault content including at least one of fault identification, fault name, fault location, fault description, solution, fault time information, and personnel information of the functional node; Displaying the display information on a front-end interface, the second data structure being adapted to a display component of the front-end interface.

6. The method of claim 3, wherein, The method further includes: Analyzing fault information of at least one of the ray source node, the detector node, the material spraying node, the material conveying node, and the material image recognition node to obtain a fault field associated with a fault priority; Determining a time for displaying the fault information on the front-end interface according to the fault priority.

7. The method of claim 3, wherein, The method further includes: Accessing an interface of at least one of the ray source node, the detector node, the material spraying node, the material conveying node, and the material image recognition node to obtain a node state returned by the interface.

8. The method of claim 1, wherein, The method further includes: In response to receiving an instruction indicating that the fault indicated by the fault information is processed, deleting the fault information in the final cache.

9. A material sorting system, comprising: a plurality of functional nodes configured to implement a plurality of functions of the material sorting system; a fault information processing device configured to perform the method of any one of claims 1-8.

10. An electronic device, comprising: one or more processors; a memory for storing one or more computer programs, characterized in that the one or more processors execute the one or more computer programs to implement the steps of the method according to any one of claims 1-8.