Abnormal request determination method
By allocating an entry for each request on the bus node and generating an entry identifier chain, combined with timer polling detection, the problem of the contradiction between resource consumption and accuracy in bus anomaly detection is solved, and efficient anomaly request location is achieved.
Patent Information
- Application Number
- CN202610032420.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-12
- Publication Date
- 2026-02-27
- Estimated Expiration
- 2046-01-12
AI Technical Summary
Existing technologies cannot accurately detect and locate abnormal requests with low resource consumption in bus anomaly detection.
By deploying a tracker on each node to assign an entry to each request and generate an entry identifier, an entry identifier chain is generated. Timers are used for polling to detect timeout requests, and abnormal requests are located by the entry identifier at the head of the chain.
While reducing resource consumption, it improves the detection accuracy and location accuracy of abnormal requests, reduces the number of timers, and ensures the preservation of request time sequence information.
Smart Images

Figure CN121579263A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communications, and more specifically, to a method for determining abnormal requests. Background Technology
[0002] In a bus architecture, when the bus fails to return data from a slave device for more than a preset time due to physical damage, software failure, or design flaws, the timeout detection mechanism can promptly identify the anomaly and trigger an interrupt handling process. The core significance of monitoring bus timeouts lies in timely detection and response to system anomalies when the bus hangs or other modules and storage systems experience fatal problems. This prevents data transmission interruptions caused by hardware failures, software errors, or communication delays, thereby ensuring system reliability, availability, and serviceability.
[0003] In bus anomaly request detection in related technologies, a common approach is to detect all requests at each node of the bus, with each request having its own timer. When the lifecycle of a request exceeds a detection threshold, it is considered a timeout request and an anomaly is reported. This approach can accurately detect anomalies in each request. However, the resource consumption of this scheme is directly proportional to the outstanding capability of each node on the bus and the timeout detection threshold. Another approach is to share a single timer for all requests, tracking one request at a time. After the currently tracked request ends, the timer is reset to track the next request. This approach has the lowest resource consumption but a larger error rate and cannot accurately pinpoint which request caused the problem.
[0004] Therefore, the relevant technologies cannot solve the contradiction between resource consumption and detection accuracy in bus anomaly detection. Summary of the Invention
[0005] This application provides a method for determining abnormal requests, in order to solve the technical problem in related technologies that it is impossible to accurately detect and locate abnormal requests under low resource consumption conditions.
[0006] According to one embodiment of this application, a method for determining abnormal requests is provided, comprising: assigning a corresponding entry to each request for a node and generating an entry identifier for the entry through a tracker deployed on a node; generating an entry identifier chain according to the generation order of the entry identifiers, wherein the entry identifier chain includes entry identifiers and the validity status of the entry identifiers; polling the requests in the tracker using a timer to detect timeout requests, and determining the requests corresponding to the detected timeout requests and the entry identifiers at the head of the chain as abnormal requests; wherein the entry identifier at the head of the chain is the earliest generated entry identifier in the entry identifier chain and whose validity status is valid.
[0007] According to another embodiment of this application, a network device is also provided, the network device including a receiver, a transmitter and a processor, the network device being configured to perform the steps in the above method embodiments through at least one of the receiver, the transmitter and the processor.
[0008] According to yet another embodiment of this application, a computer-readable storage medium is also provided, wherein a computer program is stored in the computer program, and the computer program is configured to perform the steps in the above method embodiments when it is run.
[0009] According to yet another embodiment of this application, an electronic device is also provided, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in the above method embodiments.
[0010] According to yet another embodiment of this application, a computer program product is also provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.
[0011] This embodiment deploys a tracker on each node, assigns an entry to each request, and generates a corresponding entry identifier. This ensures that each request has a unique identifier, facilitating subsequent tracking and detection. Compared to using a separate timer for each request, this method is more efficient in resource management because it eliminates the need to allocate complex timers or timestamp logic for each request. An entry identifier chain is generated based on the generation order of the entry identifiers. This chain not only contains the entry identifiers but also their validity status. This chain structure effectively manages the storage of entry information under limited resources, ensuring low resource consumption while preserving the temporal order of requests, thereby improving the accuracy of timeout detection. A general-purpose timer is used to poll the requests in the tracker. When a timeout request is detected, the entry identifier of the timeout request and the identifier of the first entry in the chain are returned. The first entry identifier is the earliest generated entry identifier in the entry identifier chain that is still valid. This embodiment significantly reduces the number of timers and resource consumption. Furthermore, because the entry identifier chain preserves the temporal order of requests, when a timeout occurs, the timeout request can be quickly located using the first entry identifier and the timeout entry identifier, improving detection accuracy. Therefore, this solves the technical problem in related technologies that cannot accurately detect and locate abnormal requests under low resource consumption conditions. Attached Figure Description
[0012] Figure 1 This is a hardware structure block diagram of a mobile terminal for a method of determining abnormal requests according to an embodiment of this application.
[0013] Figure 2This is a flowchart of a method for determining abnormal requests according to an embodiment of this application;
[0014] Figure 3 This is a schematic diagram of a tracker component according to an embodiment of this application;
[0015] Figure 4 This is a schematic diagram of the entry identifier chain component according to an embodiment of this application;
[0016] Figure 5 This is a schematic diagram of the search component according to an embodiment of this application;
[0017] Figure 6 This is a schematic diagram of a timer component according to an embodiment of this application;
[0018] Figure 7 It is an apparatus for determining abnormal requests according to embodiments of this application;
[0019] Figure 8 This is a structural block diagram of a network device according to an embodiment of this application;
[0020] Figure 9 This is a schematic diagram of an apparatus for processing abnormal requests according to an embodiment of this application;
[0021] Figure 10 This is a schematic diagram of an information capture component according to an embodiment of this application;
[0022] Figure 11 This is a flowchart of a method for handling abnormal requests according to an embodiment of this application;
[0023] Figure 12 This is a displacement illustration according to an embodiment of this application. Figure 1 ;
[0024] Figure 13 This is a displacement illustration according to an embodiment of this application. Figure 2 ;
[0025] Figure 14 This is a displacement illustration according to an embodiment of this application. Figure 3 . Detailed Implementation
[0026] The embodiments of this application will be described in detail below with reference to the accompanying drawings and examples.
[0027] It should be noted that the terms "first," "second," etc., in the specification, claims, and drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.
[0028] The methods and embodiments provided in this application can be executed on a mobile terminal, computer terminal, or similar computing device. Taking running on a mobile terminal as an example, Figure 1 This is a hardware structure block diagram of a mobile terminal according to an embodiment of the present application's method for determining abnormal requests. Figure 1 As shown, a mobile terminal may include one or more ( Figure 1 Only one is shown in the diagram. A processor 102 (which may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.) and a memory 104 for storing data are also shown. The mobile terminal may further include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the mobile terminal described above. For example, the mobile terminal may also include components that are more... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.
[0029] The memory 104 can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to the abnormal request determination method in this embodiment. The processor 102 executes various functional applications and data processing by running the computer programs stored in the memory 104, thus implementing the above-described method. The memory 104 may include high-speed random access memory and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the mobile terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0030] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the mobile terminal's communication provider. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module, used for wireless communication with the Internet.
[0031] This embodiment provides a method for determining abnormal requests. Figure 2 This is a flowchart of a method for determining abnormal requests according to an embodiment of this application, such as... Figure 2As shown, the process includes the following steps:
[0032] Step S202: Assign a corresponding entry to each request for the node and generate an entry identifier for the entry by using the tracker deployed on the node.
[0033] In one embodiment, a schematic diagram of the tracker component is shown below. Figure 3 As shown, each time the tracker receives a request, it assigns a specified entry and generates an entry identifier (Entry ID). The tracker includes entry information (Entry Info) and the corresponding entry validity (Entry Valid). This application embodiment does not limit the specific structure of the tracker, and the internal structure of the tracker can be designed according to different needs.
[0034] In related technologies, timeout detection methods may allocate a separate timer for each request, which consumes a significant amount of chip resources. However, the embodiments of this application significantly reduce the required hardware resources, particularly the number of timers, by allocating an entry for each request instead of a timer, thereby reducing the design complexity and manufacturing cost of the chip.
[0035] Step S204: Generate an entry identifier chain according to the generation order of the entry identifiers, wherein the entry identifier chain includes entry identifiers and the validity status of the entry identifiers.
[0036] In one embodiment, a schematic diagram of the entry identifier chain component is shown below. Figure 4 As shown, the entry identifier chain includes entry identifiers and corresponding entry validity. Multiple entry identifiers are written into the entry identifier chain using a partial serial shift writing method.
[0037] The entry identifier chain stores entry identifiers arranged in the order of their generation, thus enabling accurate tracking of the time sequence and status of each request. In anomaly detection, by checking the validity status of the entry identifiers, it is possible to determine which specific request timed out, thereby achieving precise request tracing and anomaly localization.
[0038] In an exemplary embodiment of this application, generating an entry identifier chain according to the generation order of entry identifiers includes: obtaining the latest generated entry identifier, and writing the entry identifier and its validity status into the entry identifier chain according to the filling status of the entry identifier chain.
[0039] In an exemplary embodiment of this application, writing an entry identifier and its validity status into the entry identifier chain according to the filling status of the entry identifier chain includes: writing the entry identifier and its validity status into the tail of the chain when the tail of the entry identifier chain is not occupied; and searching from the tail of the chain towards the head of the chain for a position where the validity status is invalid.
[0040] In an exemplary embodiment of this application, after searching for a valid position with an invalid state from the tail of the chain to the head of the chain, the method further includes: if the search result is yes, updating the tail of the chain to an unoccupied state through a partial serial shift operation and writing the entry identifier to the tail of the chain; if the search result is no, determining that the entry identifier chain is in a full state.
[0041] By maintaining the validity status of each entry in the entry identifier chain, it is possible to accurately track and detect whether each request in the entry identifier chain has timed out. When a new request joins, if the entry identifier chain is not full, the entry identifier and validity status can be directly written to the tail of the chain; if the entry identifier chain is full, it waits for release. This ensures the continuity and integrity of the entry identifier chain, thereby improving the accuracy of timeout event detection. Updating the entry identifier chain using a partially serial shift method avoids performing a full chain shift when the tail of the chain is occupied, reducing unnecessary hardware resource consumption.
[0042] In an exemplary embodiment of this application, the depth of the tracker is equal to the length of the entry identifier chain.
[0043] Because the tracker depth and the entry identifier chain length are equal, this means that each tracker entry can be found in the entry identifier chain. Thus, when a request is assigned to an entry in the tracker, its entry identifier is accurately recorded in the entry identifier chain, ensuring a one-to-one correspondence between requests and tracking information.
[0044] Step S206: Poll the requests in the tracker using a timer to detect timeout requests, and identify the timeout requests and the requests corresponding to the first entry identifier as abnormal requests; wherein, the first entry identifier is the earliest generated entry identifier in the entry identifier chain and whose validity status is valid.
[0045] In an exemplary embodiment of this application, polling requests in the tracker using a timer to determine timeout requests includes: initializing the timer and setting a timing threshold for the timer, wherein the timing threshold is used to indicate a preset completion time for the request; starting the timer and simultaneously monitoring the selected request to be detected within the timing threshold to determine whether the request to be detected has been completed or released; if the request to be detected has been completed or released, stopping and resetting the timer, selecting the next request to be detected for monitoring within the timing threshold; and if the request to be detected has not been completed and has not been released, determining that the request to be detected is a timeout request.
[0046] In one embodiment, a schematic diagram of the lookup component used for polling detection is shown below. Figure 5 As shown, the lookup component receives multiple entry identifiers from the tracker, which represent request entries that are currently being processed or awaiting processing. An entry release signal is input to the lookup component to indicate which entries have been released and no longer need to be monitored and tracked.
[0047] In one embodiment, a schematic diagram of the timer component is shown below. Figure 6 As shown, `count++` indicates that in the context of a timer, when a new entry is enabled, the `count++` operation is performed every time the timer detects that one clock cycle has elapsed, increasing the counter value by 1. When the timer's `count` value exceeds the software-specified threshold, it indicates that the predetermined time has been exceeded, i.e., a timeout interrupt has occurred.
[0048] In an exemplary embodiment of this application, if the request corresponding to an entry identifier in the entry identifier chain is released, the validity status of the entry identifier is updated to invalid, and the entry identifier is deleted from the entry identifier chain.
[0049] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0050] This embodiment also provides an apparatus for determining abnormal requests, which is used to implement the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0051] Figure 7 This is an abnormal request determination device according to an embodiment of the present application. The device includes an allocation module 10, a generation module 20, and a determination module 30.
[0052] The allocation module 10 is used to allocate a corresponding entry for each request to the node and generate an entry identifier for the entry through the tracker deployed on the node;
[0053] The generation module 20 is used to generate an entry identifier chain according to the generation order of the entry identifiers, wherein the entry identifier chain includes entry identifiers and the validity status of the entry identifiers;
[0054] The determination module 30 is used to poll the requests in the tracker through a timer to detect timeout requests, and to determine the requests corresponding to the detected timeout requests and the chain head entry identifiers as abnormal requests; wherein, the chain head entry identifier is the earliest generated entry identifier in the entry identifier chain and whose validity status is valid.
[0055] In the embodiments of this application, the above-mentioned abnormal request determination device may also include different modules, and the naming and functional division of the modules may be selected in different ways according to the actual situation, without specific restrictions here.
[0056] It should be noted that the above modules can be implemented by software or hardware. For the latter, they can be implemented in the following ways, but are not limited to: all the above modules are located in the same processor; or, the above modules are located in different processors in any combination.
[0057] This application also provides a network device. Figure 8 This is a structural block diagram of a network device according to an embodiment of this application, such as... Figure 8 As shown, the network device 400 includes a receiver 401, a transmitter 402, and a processor 403. The network device 400 is used to perform the steps of the above-described method embodiment for determining abnormal requests through at least one of the receiver 401, transmitter 402, and processor 403.
[0058] Embodiments of this application also provide a computer-readable storage medium storing a computer program, wherein the computer program is configured to execute the steps in any of the above method embodiments when run.
[0059] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0060] Embodiments of this application also provide an electronic device including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.
[0061] In one exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor and the input / output device is connected to the processor.
[0062] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps in any of the above method embodiments.
[0063] In one exemplary embodiment, the computer program product described above includes a non-volatile computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the methods described in various embodiments of this application.
[0064] Specific examples in this embodiment can be found in the examples described in the above embodiments and exemplary implementations, and will not be repeated here.
[0065] Obviously, those skilled in the art should understand that the modules or steps of this application described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. They can be implemented using computer-executable program code, and thus can be stored in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those presented here, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, this application is not limited to any particular combination of hardware and software.
[0066] To enable those skilled in the art to better understand the technical solutions of this application, the following description is provided in conjunction with different embodiments.
[0067] In large server chips, the bus interconnect is extremely large, with hundreds or even thousands of nodes connected. Each node, depending on its design, function, and resources, can simultaneously track dozens or hundreds of requests, forming an exceptionally large and complex data flow. If a request times out and hangs, it is necessary to quickly locate which node in the bus and which request has hanged, and to obtain detailed information about that request to assist chip testers in troubleshooting.
[0068] This application embodiment addresses the problems of high resource consumption or insufficient detection accuracy of some existing timeout detection mechanisms, and achieves accurate timeout detection and reporting of requests with less resource usage.
[0069] Figure 9 This is a schematic diagram of an exception request processing apparatus according to an embodiment of this application, such as... Figure 9 As shown, the device includes a tracker, a search component, a timer, an information capture component, and an item identifier chain component. The tracker generates item identifiers based on requests and generates an item identifier chain according to the generation order of the item identifiers. The timer and the search component poll the requests in the tracker to determine timeout interruption requests. The information capture component obtains the head item identifier from the item identifier chain component, obtains item information from the tracker, and sends the head item identifier to the tracker.
[0070] Figure 10 This is a schematic diagram of an information capture component according to an embodiment of this application, such as... Figure 10 As shown, the information capture component can accept software configuration to read detailed information of specified entries, such as entry, entry identifier, chain head entry identifier and timeout entry identifier, and then report this information after dividing it into 32-bit or 64-bit entry information (entry information 0 or 1).
[0071] Figure 11 This is a flowchart of an abnormal request handling method according to an embodiment of this application, such as... Figure 11 As shown, the process of handling abnormal requests can be divided into two parallel processes: chain processing and timeout detection. The chain processing is mainly completed by the entry identifier chain component, while the timeout detection is mainly completed by three components: the search component, the timer, and the information capture component.
[0072] The chain processing flow is as follows:
[0073] Assuming the tracker depth is n, the length of the entry identifier chain component is equal to the tracker depth. When the entry identifier chain component receives a notification that the tracker has a new request, it writes the received entry identifier to the end of the entry identifier chain, i.e., at index = n-1.
[0074] In the item identifier chain component, the first empty position index=i is found from index=n-1 towards index=0. The empty position refers to the position where the item validity (Entry Valid) = 0 in the schematic diagram of the item identifier chain component.
[0075] If an empty space is found, the index bits from n-1 to i+1 are shifted downwards to n-2 to i to obtain a new entry identifier chain. Therefore, if there is an empty space, after the shift is completed, the n-1 position is always empty, preparing for the next write.
[0076] In some embodiments of this application, taking a depth of 8 as an example, the entry identifier chain is written as follows when it is empty: Figure 12 As shown: The first write operation involves the highest bit at index=n-1, followed by a shift to index=n-2. To simplify this, the bit is directly written to position index=n-2=6. Subsequent operations follow a similar pattern: the new entry identifier is written to position index=n-2, and the original entry identifier at index=i is shifted down to index=i-1. A diagram illustrating the shift and write operation after a release is shown below. Figure 13 As shown: When position i in the entry identifier chain is released (dealloc), the validity of the corresponding entry is pulled low. At this time, no shifting is required. When a new entry identifier is written, the entry identifiers at positions n-2 to i+1 are moved to positions n-3 to i, and the new entry identifier is written at position n-2. Figure 14 This is used to explain when a target indicator chain is full and how it is released after it is full. Figure 14 The diagram, from left to right, includes images 1, 2, 3, and 4. Specifically, image 1 indicates that, except for the entry with the highest index=7 which has a validity of 0, the validity of all other entries should be 1. Image 2 indicates that after the last write, the validity of all entries is 1. Image 3 indicates that, except for entry with the identifier 4 which has a validity of 0, the other entries are 1, indicating that entry with the identifier 4 has been deallocated, but the other entries remain unchanged. Image 3 indicates that the entry at index=4 has been deallocated, and the validity of the corresponding entry should be set to 0. Image 4 indicates that the entry with the identifier 7 at index=7 has a validity of 0, while the others are 1. Image 4 indicates that a shift has been performed, with entries from index=7 to 5 in image 3 moved to index=6 to 4.
[0077] If no empty slot is found, it means that both the tracker and the entry identifier chain component are full, and you need to wait for the request to be completed to release the tracker's specified entry.
[0078] When the tracker component releases an entry, it sends the corresponding entry identifier to the entry identifier chain component. If the tracker component supports releasing multiple entries at the same time, it sends multiple entry identifiers to the entry identifier chain component simultaneously.
[0079] After the entry identifier chain component queries the position j in the entry identifier chain according to the received entry identifier, it sets the condition validity to 0 (sets the condition validity to invalid), releases this position, and then jumps to the step of querying for an empty position. It shifts the index bits from n - 1 to i + 1 downward as a whole to n - 2 to i to obtain a new entry identifier chain. If the tracker component supports releasing multiple entries simultaneously, the entry identifier chain component needs to support simultaneous searching and releasing of multiple entry identifiers;
[0080] Search from the 0th bit to the (n - 1)th bit of the entry identifier chain. The entry identifier with the first entry validity = 1 is the head entry identifier of the chain, and the head entry identifier of the chain is sent to the information scraping component.
[0081] The timeout detection process is as follows:
[0082] The tracker component sends k (k < n) valid entry identifiers to the search component. The search component selects an entry identifier from the k valid entry identifiers in the order of polling from low to high. When a new entry identifier is selected, the timer component is initialized and starts timing. When the time (Time) > threshold, the bus generates a timeout (Timeout) interrupt, notifying the software that there is a request timeout on the bus. The software processes the timeout interrupt. The tester grabs the entry identifier of the timeout request and the head entry identifier of the chain through the information scraping component as needed, and determines the request corresponding to the entry identifier as an abnormal request for debugging.
[0083] The embodiment of this application can be integrated into any node of the bus, and the requests of this node are processed by shifting and stringing according to the allocation order of the entries in the tracker. Whenever new entry identifier information is recorded in the entry identifier chain, a part of the entry identifier chain is shifted by judging the empty positions in the entry identifier chain to ensure that a new entry identifier can be written at the end of the chain. When a request is released, the corresponding entry identifier is removed from the entry identifier chain. This entry identifier chain ensures that the valid bit at the head of the chain is the oldest entry identifier, and the valid bit at the tail of the chain is the latest entry identifier. Then, by setting a timer, the transactions in the tracker are polled and detected. When the request does not timeout and is completed, the counter is reset, and the tracking of the next request is started; when the request times out, a timeout interrupt is reported, and at the same time, the head entry identifier of the entry identifier chain and the entry identifier of the current timeout request are fed back. Finally, the software controls to grab the entry information corresponding to the head entry identifier or the entry identifier of the timeout request to assist the tester in debugging.
[0084] This application employs a partial shift chaining + timer polling detection scheme to record and track requests. Compared to schemes using numerous timers or timestamps, this partial shift chaining + timer polling detection effectively reduces chip resource consumption and dynamic power consumption. Simultaneously, the entry identifier chain provides feedback on the temporal order of requests, enabling precise request tracking and significantly improving detection accuracy. This application can be applied to hardware architecture and system reliability technologies, enabling timely anomaly identification and triggering interrupt handling processes to ensure system reliability, availability, and serviceability. Specifically, it can be applied to chips such as CPUs and DPUs that require timeout monitoring mechanisms, allowing for rapid and accurate location of the hangup node and detailed internal information when a system hang occurs.
[0085] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the principles of this application should be included within the protection scope of this application.
Claims
1. A method for determining abnormal requests, characterized in that, include: The tracker deployed on the node assigns a corresponding entry to each request for the node and generates an entry identifier for the entry; An entry identifier chain is generated according to the generation order of the entry identifiers, wherein the entry identifier chain includes the entry identifiers and the validity status of the entry identifiers; The tracker polls the requests in the tracker using a timer to detect timeout requests, and identifies the timeout requests and the requests corresponding to the first entry identifier as abnormal requests. The first entry identifier is the earliest generated entry identifier in the entry identifier chain that is valid.
2. The method according to claim 1, characterized in that, The step of generating an entry identifier chain according to the generation order of the entry identifiers includes: Obtain the newly generated entry identifier, and write the entry identifier and its validity status into the entry identifier chain according to the filling status of the entry identifier chain.
3. The method according to claim 2, characterized in that, The step of writing the entry identifier and its validity status into the entry identifier chain according to the filling status of the entry identifier chain includes: If the tail of the entry identifier chain is not occupied, the entry identifier and its validity status are written to the tail of the chain; If the tail of the chain is occupied, search from the tail of the chain toward the head of the chain for a position where the validity status is invalid.
4. The method according to claim 3, characterized in that, After searching from the tail of the chain towards the head of the chain for a position where the validity status is invalid, the process further includes: If the search result is yes, the tail of the chain is updated to an unoccupied state through a partial serial shift operation, and the entry identifier is written to the tail of the chain. If the search result is negative, the entry identifier chain is determined to be in a full state.
5. The method according to claim 1, characterized in that, The step of polling requests in the tracker using a timer to determine timeout requests includes: The timer is initialized and a timing threshold is set for the timer, wherein the timing threshold is used to indicate the preset completion time of the request; Start the timer and monitor the selected request to be detected within the timer threshold to determine whether the request to be detected has been completed or released. If the request to be detected has been completed or released, stop and reset the timer, and select the next request to be detected to monitor within the timer threshold. If the request to be detected is not completed and is not released, the request to be detected is determined to be a timeout request.
6. The method according to claim 2, characterized in that, in, The depth of the tracker is equal to the length of the entry identifier chain.
7. The method according to claim 1, characterized in that, If the request corresponding to the entry identifier in the entry identifier chain is released, the method further includes: Update the validity status of the entry identifier to invalid, and remove the entry identifier from the entry identifier chain.
8. A network device, characterized in that, The network device includes a receiver, a transmitter, and a processor, and the network device is configured to perform the steps of the method according to any one of claims 1 to 7 via at least one of the receiver, the transmitter, and the processor.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the steps of the method described in any one of claims 1 to 7.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method described in any one of claims 1 to 7.
11. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method described in any one of claims 1 to 7.
Citation Information
Patent Citations
Data monitoring method and data monitoring device
CN103905267A
Request processing method, device and electronic equipment
CN104837063A
Method and device for predicting hard disk fault
CN108073486A
Link tracking method and device, electronic equipment and medium
CN112491617A
Fault prediction method and device for storage device
CN114282342A