Lock waiting blocking chain generation method and device, computer device and storage medium

By generating lock-waiting blocking chains through real-time monitoring and segmented sorting, the problem of insufficient efficiency and accuracy in generating lock-waiting blocking chains in existing technologies is solved, and efficient and accurate lock-waiting blocking chain generation is achieved.

CN123048558APending Publication Date: 2026-11-06JINZHUAN INFORMATION TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611288164.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-24
Publication Date
2026-11-06

AI Technical Summary

Technical Problem

Existing technologies are insufficient in efficiency and accuracy for generating lock wait blocking chains in high-concurrency business access scenarios, making it difficult to meet the needs of database fault diagnosis.

Method used

Real-time monitoring of database lock waiting behavior, identification of blocking events and generation of lock waiting records, acquisition of lock waiting dataset through preset trigger rules, and sorting and generating lock waiting blocking chains using events with zero blocking transactions as segment boundaries.

Benefits of technology

It improves the efficiency and accuracy of generating lock wait blocking chains, reduces the consumption of invalid data operations, and truly reflects the lock blocking propagation relationship between transactions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123048558A_ABST
    Figure CN123048558A_ABST
Patent Text Reader

Abstract

This invention relates to the field of database technology and discloses a method, apparatus, computer device, and storage medium for generating lock-wait blocking chains. The method includes: real-time monitoring of lock-wait behavior of each database lock in a target database; determining a blocking event and generating a lock-wait record when the duration of any lock-wait behavior exceeds a preset lock-wait timeout threshold; acquiring all lock-wait records within a set time interval in the target database according to preset triggering rules to generate a lock-wait dataset to be analyzed; reconstructing the corresponding blocking events from the lock-wait dataset and dividing the dataset into several independent data segments using blocking events with zero blocked transactions as segment boundaries; and sorting all blocking events within each data segment according to the number of blocked transactions to generate lock-wait blocking chains corresponding to each data segment. This invention improves the efficiency and accuracy of lock-wait blocking chain generation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of database technology, and specifically to a method, apparatus, computer device, and computer-readable storage medium for generating lock wait blocking chains. Background Technology

[0002] Currently, in high-concurrency business access scenarios, multiple transactions compete for the same database lock resource. When some transactions hold the lock for an extended period without releasing it, other transactions enter a lock-waiting state. If lock waiting continues, it gradually forms a chain of blocking relationships, also known as a lock-waiting blocking chain. Lock-waiting blocking chains can cause increased transaction execution latency, a backlog of business requests, and in severe cases, can lead to database instance lag and service unavailability. Therefore, timely identification of lock-waiting blocking chains within the target database is a crucial step in locating lock contention faults in database operations and maintenance.

[0003] Currently, most existing lock wait blocking chain generation schemes directly collect the raw lock wait data output by the target database, parse the lock wait events directly based on the raw data, and then perform simple segmentation and sorting according to the number of blocked transactions in each lock wait event to obtain the lock wait blocking chain. However, existing technologies directly collect and parse the raw lock wait behavior without identifying the lock wait behavior itself. The collected lock wait records are a mixture of various types of raw lock wait data. Directly using lock wait records for event reconstruction and segmentation is easily affected by the quality of the raw data, resulting in insufficient efficiency and accuracy of the output, making it difficult to meet the needs of actual database lock fault troubleshooting.

[0004] Therefore, existing technologies still need improvement and development. Summary of the Invention

[0005] In view of the shortcomings of the prior art, the purpose of this invention is to provide a method, apparatus, computer device and computer-readable storage medium for generating lock wait blocking chains, aiming to solve the problem of how to improve the efficiency and accuracy of lock wait blocking chain generation.

[0006] To achieve the above objectives, the present invention adopts the following technical solution: In a first aspect, the present invention provides a method for generating a lock-waiting blocking chain, comprising: Real-time monitoring of lock waiting behavior of each database lock in the target database; when the duration of any lock waiting behavior exceeds a preset lock waiting timeout threshold, a blocking event is determined to occur, and the lock waiting association information corresponding to the blocking event is collected to generate a lock waiting record; According to the preset triggering rules, all lock wait records within a set time interval in the target database are obtained to generate a lock wait dataset to be analyzed; The corresponding blocking event is reconstructed from each of the lock waiting records contained in the lock waiting dataset, and the lock waiting dataset is divided into several independent data segments with the blocking event with zero blocking transactions as the segment boundary; wherein, each data segment starts with the blocking event with zero blocking transactions and ends before the next blocking event with zero blocking transactions. For all the blocking events within each data segment, sort them according to the number of blocking transactions they each block, and generate lock wait blocking chains corresponding to each data segment based on the sorted blocking event sequence.

[0007] Secondly, the present invention provides a lock-waiting blocking chain generation apparatus, comprising: The monitoring module is used to monitor the lock waiting behavior of each database lock in the target database in real time. When the duration of any lock waiting behavior exceeds the preset lock waiting timeout threshold, a blocking event is determined to have occurred, and the lock waiting association information corresponding to the blocking event is collected to generate a lock waiting record. The acquisition module is used to acquire all lock wait records within a set time interval in the target database according to preset triggering rules, and generate a lock wait dataset to be analyzed. The segmentation module is used to reconstruct the corresponding blocking event based on each lock waiting record contained in the lock waiting dataset, and to divide the lock waiting dataset into several independent data segments using the blocking event with zero blocking transactions as the segment boundary; wherein, each data segment starts with the blocking event with zero blocking transactions and ends before the next blocking event with zero blocking transactions. The sorting module is used to sort all the blocking events in each data segment according to their respective number of blocking transactions, and generate lock waiting blocking chains corresponding to each data segment based on the sorted blocking event sequence.

[0008] Thirdly, the present invention provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the lock-wait blocking chain generation method as described above.

[0009] Fourthly, the present invention provides a computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the lock-wait blocking chain generation method as described above.

[0010] Compared to existing technologies, this invention provides a method, apparatus, computer device, and computer-readable storage medium for generating lock wait blocking chains. The method includes: real-time monitoring of lock wait behavior of each database lock in a target database; determining a blocking event when the duration of any lock wait behavior exceeds a preset lock wait timeout threshold; collecting lock wait association information corresponding to the blocking event to generate a lock wait record; acquiring all lock wait records within a set time interval in the target database according to a preset triggering rule to generate a lock wait dataset to be analyzed; reconstructing the corresponding blocking events from each lock wait record in the lock wait dataset; and dividing the lock wait dataset into several independent data segments, using the blocking event with zero blocked transactions as the segment boundary; wherein each data segment begins with the blocking event with zero blocked transactions and ends before the next blocking event with zero blocked transactions; sorting all blocking events within each data segment according to their respective number of blocked transactions, and generating lock wait blocking chains corresponding to each data segment based on the sorted blocking event sequence. Therefore, the present invention can improve the efficiency and accuracy of lock waiting blocking chain generation. Attached Figure Description

[0011] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0012] Figure 1 This is a schematic diagram illustrating the application environment of a lock waiting blocking chain generation method provided in an embodiment of the present invention.

[0013] Figure 2 This is a flowchart illustrating a lock waiting blocking chain generation method according to an embodiment of the present invention.

[0014] Figure 3 This is a schematic diagram of a program module for a lock waiting blocking chain generation device according to an embodiment of the present invention.

[0015] Figure 4 This is a schematic diagram of the structure of a computer device provided in an embodiment of the present invention.

[0016] Figure 5 This is another structural schematic diagram of a computer device provided in an embodiment of the present invention. Detailed Implementation

[0017] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0018] It should be understood that, when used in this specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.

[0019] It should also be understood that the term “and / or” as used in this specification and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0020] As used in this specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if [described condition or event] is detected" may be interpreted, depending on the context, as meaning "once determined," "in response to determination," "once [described condition or event] is detected," or "in response to detection of [described condition or event]."

[0021] Furthermore, in the description of this invention and the appended claims, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0022] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of the invention include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.

[0023] It should be understood that the sequence number of each step in the following embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0024] To illustrate the technical solution of the present invention, specific embodiments are described below.

[0025] An embodiment of the present invention provides a method for generating a lock wait blocking chain, which can be applied to applications such as... Figure 1 In the application environment shown, the client and server communicate via a network. The client includes, but is not limited to, handheld computers, desktop computers, laptops, ultra-mobile personal computers (UMPCs), netbooks, cloud computing devices, and personal digital assistants (PDAs). The server can be a standalone server or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms.

[0026] Please see Figure 2 An embodiment of the present invention provides a method for generating a lock wait blocking chain, wherein the method includes the following steps: S100. Monitor the lock waiting behavior of each database lock in the target database in real time. When the duration of any lock waiting behavior exceeds the preset lock waiting timeout threshold, determine that a blocking event has occurred, collect the lock waiting association information corresponding to the blocking event, and generate a lock waiting record. S200. According to the preset triggering rules, obtain all the lock waiting records in the target database within a set time interval, and generate a lock waiting dataset to be analyzed. S300. Based on each lock waiting record contained in the lock waiting dataset, the corresponding blocking event is restored, and the lock waiting dataset is divided into several independent data segments using the blocking event with zero blocking transactions as the segment boundary; wherein, each data segment starts with the blocking event with zero blocking transactions and ends before the next blocking event with zero blocking transactions. S400. For all the blocking events in each data segment, sort them according to the number of blocking transactions of each event, and generate lock waiting blocking chains corresponding to each data segment based on the sorted blocking event sequence.

[0027] In specific implementation, the lock-waiting blocking chain generation method of this embodiment first filters the lock-waiting behaviors obtained from real-time monitoring by using a preset lock-waiting timeout threshold. Lock-waiting records are only generated when the duration of the lock-waiting behavior meets the condition, avoiding the inclusion of short-term invalid lock-waiting behaviors in subsequent processing and reducing the amount of data to be processed. Then, according to preset triggering rules, lock-waiting records within a set time interval are retrieved to obtain a lock-waiting dataset, limiting the range of data to be processed. Next, the blocking events are reconstructed from the lock-waiting records. Blocking events with zero blocking transactions are used as segment boundaries to complete data segmentation, clarifying the start and end range of each data segment, and splitting the complete lock-waiting event set into mutually independent event groups. Finally, within each data segment, blocking events are sorted according to the number of blocking transactions to generate a lock-waiting blocking chain. The chain-like blocking structure is reconstructed based on the blocking hierarchy relationship reflected by the number of blocking transactions, thereby reducing the computational consumption of invalid data. At the same time, the true lock-waiting propagation relationship is reconstructed by relying on clear segment boundaries and sorting logic, thereby improving the efficiency and accuracy of lock-waiting blocking chain generation.

[0028] Furthermore, in one embodiment, the lock wait blocking chain generation method, wherein the real-time monitoring of the lock wait behavior of each database lock in the target database, when the duration of any lock wait behavior exceeds a preset lock wait timeout threshold, determines that a blocking event has occurred, and collects the lock wait association information corresponding to the blocking event to generate a lock wait record, specifically includes: The original lock waiting behavior generated by each database lock in the target database is captured in real time, and the captured original lock waiting behavior is filtered and screened to remove the original lock waiting behavior that is completed instantaneously, so as to obtain the corresponding lock waiting behavior. The duration of each lock waiting behavior is compared with a preset lock waiting timeout threshold, and when the duration of any lock waiting behavior exceeds the lock waiting timeout threshold, a blocking event with an event attribute label is generated. Collect the lock information and transaction information corresponding to the blocking event, and perform integrity verification on the lock information and transaction information. If the verification passes, generate a lock wait record.

[0029] Furthermore, the lock wait blocking chain generation method, wherein the step of obtaining all lock wait records within a set time interval in the target database according to a preset triggering rule, and generating a lock wait dataset to be analyzed, specifically includes: A data retrieval task is generated according to a preset time-triggered rule or event-triggered rule, and based on the data retrieval task, the lock wait records stored in each storage shard of the target database are read. The lock wait records obtained are pre-filtered according to the set time interval, and the lock wait records whose timestamps fall outside the set time interval are removed. The lock wait records across storage shards are merged to obtain a candidate lock wait record set. Perform data consistency verification on the candidate lock waiting record set, remove abnormal lock waiting records that fail the verification, and generate a lock waiting dataset to be analyzed based on the candidate lock waiting records that pass the verification.

[0030] In specific implementation, this embodiment first filters and selects the original lock-waiting behaviors during the lock-waiting record generation stage, eliminating lock-waiting behaviors that are completed instantaneously, reducing the amount of data that needs to be processed in subsequent processes. At the same time, event attribute tags are attached to the generated blocking events to facilitate the differentiation of event types. Then, integrity checks are performed on the collected lock information and transaction information to avoid generating lock-waiting records with dirty data containing missing fields. In the lock-waiting record acquisition stage, lock-waiting records are read for each storage shard of the target database. Lock-waiting records that exceed the set time interval are pre-filtered and eliminated. Lock-waiting records across storage shards are merged to solve the problems of time sequence disorder and record missing caused by the dispersion of shard data. Then, data consistency checks are performed on the candidate lock-waiting record set to eliminate abnormal lock-waiting records. This reduces invalid data, dirty data, and data deviation caused by distributed sharding from the data source, reduces the computational pressure of subsequent segmentation and link generation stages, and further improves the processing efficiency of lock-waiting blocking chain generation and the accuracy of output results.

[0031] The specific implementation process of this embodiment is roughly as follows: The first step is to capture the original behavior of the lock in real time and filter the transient behavior.

[0032] During the operation of the target database, the running status of each database lock is continuously monitored, and all original lock waiting behaviors generated on each database lock are captured in real time. The original information collected for each original lock waiting behavior includes at least the lock type (request or block), lock waiting timestamp, thread ID, transaction ID, number of blocked transactions, and duration of behavior. All captured original lock waiting behaviors are traversed, and a filtering operation is performed. Based on a pre-set instantaneous duration threshold, instantaneous lock waiting behaviors are identified. Original lock waiting behaviors with a duration lower than the instantaneous duration threshold are directly removed. These removed original lock waiting behaviors are short-lived lock contention and will not evolve into chain lock blocking, so they do not need to enter the subsequent analysis process. After filtering, a set of lock waiting behaviors that have been initially filtered is output.

[0033] The second step is to compare the lock waiting time and generate a blocking event with an event attribute label.

[0034] For each lock waiting behavior output in the previous step, the duration field of the record inside the lock waiting behavior is extracted, and the duration is compared with the preset lock waiting timeout threshold one by one. When the duration of a lock waiting behavior is greater than the preset lock waiting timeout threshold, it is determined that the current lock waiting has reached the blocking judgment condition, and the blocking event generation logic is triggered. At the same time as generating the blocking event, an event attribute tag is attached to the blocking event. The event attribute tag inherits the lock type and lock waiting timestamp information and is bound to the blocking event object. This is used to quickly distinguish the source category of the blocking event in the subsequent fault analysis stage.

[0035] The third step is to collect lock information and transaction information, perform integrity verification, and generate lock wait records.

[0036] For any generated blocking event, collect the corresponding lock information and transaction information. Lock information includes at least the lock type (request or block) and lock wait timestamp; transaction information includes at least the thread ID, transaction ID, and number of blocked transactions. Perform integrity checks on the collected lock and transaction information. The checks sequentially determine if the lock type and lock wait timestamp fields within the lock information are empty, and simultaneously check if the thread ID, transaction ID, and number of blocked transactions fields in the transaction information are missing. If any key field in the lock or transaction information is missing, discard the current set of collected data and do not generate a lock wait record. If all key fields in the lock and transaction information pass the checks, encapsulate the basic data of the blocking event, lock information, and transaction information to generate a complete lock wait record and temporarily store it.

[0037] The fourth step is to generate a data retrieval task, read lock waiting records across storage shards, and perform time pre-filtering and shard merging.

[0038] The system receives preset time-triggered or event-triggered rules. When the time-triggered or event-triggered conditions are met, a corresponding data retrieval task is generated. The data retrieval task carries the set time interval parameters to be read and sends read instructions to all storage shards of the target database to read the lock wait records that are persistently stored locally in each storage shard. After the read is completed, the lock wait records from all storage shards are aggregated, and a time pre-filtering operation is performed. The lock wait timestamps within each lock wait record are compared, and lock wait records whose lock wait timestamps fall outside the set time interval are removed. For the remaining lock wait records after filtering, cross-shard merging processing is performed, and the lock wait records are globally sorted according to their lock wait timestamps to eliminate the data timing disorder and record dispersion problems caused by distributed storage shards. After merging, a candidate lock wait record set is output.

[0039] The fifth step is to verify the data consistency of the candidate lock wait record set and construct the lock wait dataset to be analyzed.

[0040] Iterate through each lock waiting record in the candidate lock waiting record set and perform data consistency checks. The checks include verifying that the key fields of the lock waiting record are not empty, verifying the reasonableness of the lock waiting timestamp, and verifying the validity of the values ​​of the number of blocked transactions. The number of blocked transactions cannot be negative. Records with invalid fields, disordered lock waiting timestamps, or missing key fields (any one of the lock type, lock waiting timestamp, thread ID, transaction ID, or number of blocked transactions is empty) are judged as abnormal lock waiting records that fail the check and are removed. All candidate lock waiting records that pass the check are selected and retained. These valid records are uniformly encapsulated to generate a lock waiting dataset to be analyzed, providing reliable data input for subsequent blocking event reconstruction, data segmentation, and lock waiting blocking chain generation.

[0041] Further, in one embodiment, the lock-waiting blocking chain generation method, wherein the step of reconstructing the corresponding blocking event based on each lock-waiting record contained in the lock-waiting dataset, and dividing the lock-waiting dataset into several independent data segments using the blocking event with zero blocked transactions as the segment boundary, specifically includes: Traverse each lock wait record in the lock wait dataset, parse and generate the corresponding blocking event, and filter out valid boundary blocking events from all the blocking events; wherein, the blocking events with zero blocking transactions and passing the validity check are marked as valid boundary blocking events; Using each of the aforementioned valid boundary blocking events as the starting point for segmentation, all the aforementioned blocking events are segmented, and the empty data segments obtained after segmentation are removed to obtain several independent data segments.

[0042] Further, the lock-waiting blocking chain generation method, wherein sorting all the blocking events within each data segment according to their respective number of blocking transactions, and generating a lock-waiting blocking chain corresponding to each data segment based on the sorted blocking event sequence, specifically includes: For all the blocking events within each data segment, sort them according to the number of blocked transactions to obtain the corresponding blocking event sequence, and perform sorting compliance verification on each blocking event sequence; For the sequence of blocking events that have passed the verification, establish node associations between adjacent blocking events, generate a set of structured link nodes, and construct a lock-waiting blocking chain for the corresponding data segment based on the set of structured link nodes.

[0043] In specific implementation, after parsing and restoring the blocking events from the lock wait records within the lock wait dataset, this embodiment does not directly use blocking events with zero blocking transactions as segment boundaries. Instead, it first performs validity checks to filter out valid boundary blocking events, which can filter out pseudo segment boundaries generated by dirty data. Then, it uses valid boundary blocking events as the starting point for segmentation, completes the segmentation, and removes empty data segments to prevent invalid segments from flowing into the subsequent link generation process. Afterward, it sorts the blocking events within each data segment according to the number of blocking transactions to obtain a blocking event sequence, and performs sorting compliance checks to identify abnormal situations such as sequence value jumps and disordered order. Only for the blocking event sequences that pass the checks, it establishes node associations and bindings between adjacent blocking events to obtain a structured link node set, and then uses this to construct a lock wait blocking chain. This reduces the interference of dirty data and abnormal fields on the segmentation and link restoration process, improves the accuracy of data segmentation, ensures that the lock wait blocking chain can truly reflect the lock blocking transmission relationship between transactions, and further improves the reliability of the lock wait blocking chain output results.

[0044] The specific implementation process of this embodiment is roughly as follows: The first step is to parse and reconstruct the blocking events from the lock wait record and filter out the valid boundary blocking events.

[0045] Iterate through each lock wait record in the lock wait dataset, read the lock type, lock wait timestamp, thread ID, transaction ID, and number of blocked transactions carried in the lock wait record, and parse to generate the corresponding blocked event object; iterate through all generated blocked events and perform validity checks, which mainly check that the number of blocked transactions is valid, the lock wait timestamp is valid, and the thread ID and transaction ID are not empty; filter out the blocked events that simultaneously meet the condition of zero blocked transactions and pass the validity check, mark these blocked events as valid boundary blocked events, and filter out false boundary events generated by dirty data.

[0046] The second step is to determine the segmentation interval based on the effective boundary blocking events, complete the event attribution segmentation, and remove empty data segments.

[0047] First, all valid boundary blocking events are sorted in ascending order according to their respective lock wait timestamps to obtain an ordered boundary queue. Then, two adjacent valid boundary blocking events in the queue are taken sequentially to define a segmented time interval. The segment starts with the lock wait timestamp of the previous valid boundary blocking event and ends with the lock wait timestamp of the next valid boundary blocking event. All blocking events are assigned to the corresponding segmented time intervals according to their lock wait timestamps to obtain preliminary segmentation results. All preliminary segmentation results are traversed. If a segment contains only valid boundary blocking events and no other blocking events, it is determined to be an empty data segment and is removed. After processing, several independent data segments are obtained.

[0048] The third step is to sort the blocking events within each segment and perform a sorting compliance check.

[0049] For each independent data segment, read the number of blocked transactions field of all blocked events within the segment, sort them according to the number of blocked transactions, and obtain the corresponding blocking event sequence of the data segment; perform sorting compliance verification on each group of blocking event sequences, verify whether the overall trend of the number of blocked transactions is continuous, identify abnormal blocking event sequences with numerical jumps or disordered order, and distinguish between normal sequences that pass the verification and abnormal sequences that fail the verification.

[0050] The fourth step is to complete the node association and binding, and build a lock waiting blocking chain.

[0051] For a sequence of blocking events that passes verification, the blocking propagation relationship between adjacent blocking events is identified based on the thread ID and transaction ID within the blocking event. Node associations and bindings are established between adjacent blocking events to form a set of structured link nodes with upstream and downstream relationships. The link structure is assembled based on the set of structured link nodes to generate the lock-waiting blocking chain corresponding to the data segment. For a sequence of blocking events that fails verification, an anomaly is marked, and the event does not participate in the construction of the normal lock-waiting blocking chain to avoid erroneous link output.

[0052] Further, in one embodiment, the lock-wait blocking chain generation method, wherein after sorting all the blocking events within each data segment according to their respective number of blocking transactions, and generating lock-wait blocking chains corresponding to each data segment based on the sorted blocking event sequence, further includes: Extract the link feature information of each lock-waiting blocking chain, and based on the link feature information, evaluate the blocking risk level of each lock-waiting blocking chain according to the preset risk judgment rules, and generate the risk level evaluation result of each lock-waiting blocking chain.

[0053] Furthermore, the lock-waiting blocking chain generation method, wherein after extracting the link feature information of each lock-waiting blocking chain, and based on the link feature information, assessing the blocking risk level of each lock-waiting blocking chain according to a preset risk judgment rule, and generating the risk level assessment result of each lock-waiting blocking chain, further includes: Based on the risk level assessment results, a corresponding risk level label is assigned to each of the lock waiting blocking chains. Information is aggregated and archived for all the lock waiting blocking chains, and an association index is constructed between each of the lock waiting blocking chains to generate a lock waiting blocking chain result carrying the risk level label and the association index.

[0054] In specific implementation, after generating the lock waiting blocking chain, this embodiment extracts the link feature information corresponding to each lock waiting blocking chain, combines it with preset risk judgment rules to complete the blocking risk level assessment and obtain the risk level assessment result, which can quantitatively identify the degree of harm of different lock waiting blocking chains; then, based on the risk level assessment result, the lock waiting blocking chain is labeled with a risk level tag, and the execution information of all lock waiting blocking chains is aggregated and archived to achieve unified retention of link data. At the same time, an association index between each lock waiting blocking chain is constructed to generate lock waiting blocking chain results carrying risk level tags and association indexes, which makes it easy for operation and maintenance personnel to intuitively distinguish high-risk blocking links, and can quickly retrieve multiple lock waiting blocking chains that are associated with transactions or lock resources based on the association index, reducing the difficulty of troubleshooting chain lock blocking faults and improving the processing efficiency of database lock fault location.

[0055] The specific implementation process of this embodiment is roughly as follows: The first step is to extract the link characteristic information of the lock waiting blocking chain.

[0056] Traverse each completed lock-waiting blocking chain, parse the lock-waiting timestamp, number of blocked transactions, thread ID, transaction ID, and other fields corresponding to all blocking events within the lock-waiting blocking chain, and extract the chain feature information. The chain feature information includes at least the chain length of the lock-waiting blocking chain, the maximum blocking duration of the chain, the total number of transactions involved in the chain, and the number of lock resources involved in the chain. The chain length is the total number of blocking event nodes contained in the lock-waiting blocking chain, and the maximum blocking duration of the chain is calculated from the lock-waiting timestamps of the blocking events within the chain.

[0057] The second step is to perform a blocking risk level assessment of the lock-waiting blocking chain.

[0058] The system reads the preset risk assessment rules, which are configured with multi-level risk thresholds for link length, maximum blocking duration, and number of transactions involved. It compares the link feature information corresponding to each lock waiting blocking chain with the thresholds at each level in the preset risk assessment rules, completes the blocking risk level assessment based on the matched threshold level, and outputs the risk level assessment result corresponding to each lock waiting blocking chain.

[0059] The third step is to label the lock waiting block chain with risk level tags and complete the information aggregation and archiving.

[0060] Read the risk level assessment results of each lock-waiting blocking chain, and bind a risk level label to the corresponding lock-waiting blocking chain according to the assessment results. The risk level label is used to characterize the blocking severity of the current lock-waiting blocking chain. All lock-waiting blocking chains with risk level labels are aggregated, and information aggregation and archiving processing is performed to complete the unified storage of all lock-waiting blocking chain data, saving the blocking event node, link characteristic information and risk level label of each lock-waiting blocking chain.

[0061] The fourth step is to construct the association index between the lock wait blocking chains and output the final lock wait blocking chain result.

[0062] Traverse all lock-waiting blocking chains after aggregation and archiving, establish association mapping relationships between different lock-waiting blocking chains based on the transaction ID and lock resource identifier contained in the blocking events, and generate an association index; this association index records the transaction ID or lock resource identifier shared between different lock-waiting blocking chains, and is used to retrieve multiple lock-waiting blocking chains with association relationships; integrate the risk level label, association index and original lock-waiting blocking chain link data to generate a lock-waiting blocking chain result carrying risk level label and association index, for database operation and maintenance to read and use.

[0063] As can be seen from the above method embodiments, the lock waiting blocking chain generation method provided by the present invention includes: real-time monitoring of the lock waiting behavior of each database lock in the target database; when the duration of any lock waiting behavior exceeds a preset lock waiting timeout threshold, determining that a blocking event has occurred, and collecting the lock waiting association information corresponding to the blocking event to generate a lock waiting record; according to a preset triggering rule, obtaining all the lock waiting records within a set time interval in the target database to generate a lock waiting dataset to be analyzed; reconstructing the corresponding blocking event based on each lock waiting record contained in the lock waiting dataset, and dividing the lock waiting dataset into several independent data segments using the blocking event with zero blocking transactions as the segment boundary; wherein each data segment starts with the blocking event with zero blocking transactions and ends before the next blocking event with zero blocking transactions; sorting all the blocking events in each data segment according to their respective blocking transaction counts, and generating lock waiting blocking chains corresponding to each data segment based on the sorted blocking event sequence. Therefore, the method of the present invention can improve the efficiency and accuracy of lock waiting blocking chain generation.

[0064] It should be understood that although this application provides the method operation steps as described in the embodiments or flowcharts, conventional or non-inventive labor may include more or fewer operation steps, and these operation steps are not necessarily executed sequentially according to the order of the embodiments or flowcharts. The order of steps listed in the embodiments or flowcharts is merely one way of executing many steps and does not represent the only execution order. It should be noted that there is no necessary sequential order between the above steps. Those skilled in the art can understand from the description of the embodiments of the present invention that the above steps may have different execution orders in different embodiments, that is, they may be executed in parallel or in exchange, etc. Moreover, at least some steps in the embodiments or flowcharts may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but may be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but may be executed in turn, alternately, or synchronously with other steps or at least a part of the sub-steps or stages of other steps.

[0065] Based on the above method embodiments, please refer to Figure 3 Another embodiment of the present invention also provides a lock wait blocking chain generation device, wherein the device includes: The monitoring module 11 is used to monitor the lock waiting behavior of each database lock in the target database in real time. When the duration of any lock waiting behavior exceeds the preset lock waiting timeout threshold, a blocking event is determined to occur, and the lock waiting association information corresponding to the blocking event is collected to generate a lock waiting record. The acquisition module 12 is used to acquire all the lock waiting records within a set time interval in the target database according to the preset triggering rules, and generate a lock waiting dataset to be analyzed. The segmentation module 13 is used to reconstruct the corresponding blocking event based on each of the lock waiting records contained in the lock waiting dataset, and to divide the lock waiting dataset into several independent data segments using the blocking event with zero blocking transactions as the segment boundary; wherein, each data segment starts with the blocking event with zero blocking transactions and ends before the next blocking event with zero blocking transactions. The sorting module 14 is used to sort all the blocking events in each data segment according to their respective number of blocking transactions, and generate lock waiting blocking chains corresponding to each data segment based on the sorted blocking event sequence.

[0066] Furthermore, in one embodiment, the lock wait blocking chain generation device, wherein the real-time monitoring of the lock wait behavior of each database lock in the target database, when the duration of any lock wait behavior exceeds a preset lock wait timeout threshold, determines that a blocking event has occurred, and collects the lock wait association information corresponding to the blocking event to generate a lock wait record, specifically includes: The original lock waiting behavior generated by each database lock in the target database is captured in real time, and the captured original lock waiting behavior is filtered and screened to remove the original lock waiting behavior that is completed instantaneously, so as to obtain the corresponding lock waiting behavior. The duration of each lock waiting behavior is compared with a preset lock waiting timeout threshold, and when the duration of any lock waiting behavior exceeds the lock waiting timeout threshold, a blocking event with an event attribute label is generated. Collect the lock information and transaction information corresponding to the blocking event, and perform integrity verification on the lock information and transaction information. If the verification passes, generate a lock wait record.

[0067] Furthermore, the lock wait blocking chain generation device, wherein the step of obtaining all lock wait records within a set time interval in the target database according to a preset triggering rule, and generating a lock wait dataset to be analyzed, specifically includes: A data retrieval task is generated according to a preset time-triggered rule or event-triggered rule, and based on the data retrieval task, the lock wait records stored in each storage shard of the target database are read. The lock wait records obtained are pre-filtered according to the set time interval, and the lock wait records whose timestamps fall outside the set time interval are removed. The lock wait records across storage shards are merged to obtain a candidate lock wait record set. Perform data consistency verification on the candidate lock waiting record set, remove abnormal lock waiting records that fail the verification, and generate a lock waiting dataset to be analyzed based on the candidate lock waiting records that pass the verification.

[0068] Further, in one embodiment, the lock wait blocking chain generation device, wherein the step of reconstructing the corresponding blocking event based on each lock wait record contained in the lock wait dataset, and dividing the lock wait dataset into several independent data segments using the blocking event with zero blocked transactions as the segment boundary, specifically includes: Traverse each lock wait record in the lock wait dataset, parse and generate the corresponding blocking event, and filter out valid boundary blocking events from all the blocking events; wherein, the blocking events with zero blocking transactions and passing the validity check are marked as valid boundary blocking events; Using each of the aforementioned valid boundary blocking events as the starting point for segmentation, all the aforementioned blocking events are segmented, and the empty data segments obtained after segmentation are removed to obtain several independent data segments.

[0069] Further, the lock-wait blocking chain generation device, wherein sorting all the blocking events within each data segment according to their respective number of blocking transactions, and generating a lock-wait blocking chain corresponding to each data segment based on the sorted blocking event sequence, specifically includes: For all the blocking events within each data segment, sort them according to the number of blocked transactions to obtain the corresponding blocking event sequence, and perform sorting compliance verification on each blocking event sequence; For the sequence of blocking events that have passed the verification, establish node associations between adjacent blocking events, generate a set of structured link nodes, and construct a lock-waiting blocking chain for the corresponding data segment based on the set of structured link nodes.

[0070] Further, in one embodiment, the lock-wait blocking chain generation device, after sorting all the blocking events within each data segment according to their respective number of blocking transactions, and generating lock-wait blocking chains corresponding to each data segment based on the sorted blocking event sequence, further includes: Extract the link feature information of each lock-waiting blocking chain, and based on the link feature information, evaluate the blocking risk level of each lock-waiting blocking chain according to the preset risk judgment rules, and generate the risk level evaluation result of each lock-waiting blocking chain.

[0071] Furthermore, the lock-waiting blocking chain generation device, after extracting the link feature information of each lock-waiting blocking chain, and based on the link feature information, assessing the blocking risk level of each lock-waiting blocking chain according to a preset risk judgment rule, and generating the risk level assessment result of each lock-waiting blocking chain, further includes: Based on the risk level assessment results, a corresponding risk level label is assigned to each of the lock waiting blocking chains. Information is aggregated and archived for all the lock waiting blocking chains, and an association index is constructed between each of the lock waiting blocking chains to generate a lock waiting blocking chain result carrying the risk level label and the association index.

[0072] It should be noted that, in the device embodiments of the present invention, the information interaction and execution process between the above modules are based on the same concept as in the method embodiments of the present invention. For details on their specific functions and the resulting technical effects, please refer to the aforementioned method embodiments section, which will not be repeated here.

[0073] Based on the above method embodiments, another embodiment of the present invention also provides a computer device, which can be a server, and its internal structure diagram can be as follows. Figure 4 As shown. The computer device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The network interface is used to communicate with external terminals via a network connection. When the computer program is executed by the processor, it implements the functions or steps of the lock wait blocking chain generation method on the server side as described in any of the above method embodiments.

[0074] Based on the above method embodiments, another embodiment of the present invention also provides a computer device, which can be a client, and its internal structure diagram can be as follows. Figure 5 As shown, the computer device includes a processor, memory, network interface, display screen, and input device connected via a system bus. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The network interface is used to communicate with external terminals via a network connection. When executed by the processor, the computer program implements the client-side functions or steps of the lock wait blocking chain generation method as described in any of the above method embodiments.

[0075] Those skilled in the art will understand that Figure 4 and Figure 5 The structural schematic diagram shown is only a schematic diagram of a part of the structure related to the present invention and does not constitute a limitation on the computer device on which the present invention is applied. The specific computer device may include more components than shown in the figure, or combine certain components, or have different component arrangements.

[0076] The processor referred to here can be a CPU, but it can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor.

[0077] The memory includes readable storage media, internal memory, etc., where internal memory can be the RAM of a computer device. Internal memory provides an environment for the operation of the operating system and computer-readable instructions stored in the readable storage media. The readable storage media can be the hard drive of the computer device, or in other embodiments, it can be an external storage device of the computer device, such as a plug-in hard drive, Smart Media Card (SMC), Secure Digital (SD) card, or Flash Card. Furthermore, the memory can include both internal storage units and external storage devices of the computer device. The memory is used to store the operating system, applications, boot loader, data, and other programs, such as program code for computer programs. The memory can also be used to temporarily store data that has been output or will be output.

[0078] Based on the above method embodiments, another embodiment of the present invention provides a computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the lock-waiting blocking chain generation method as described in any of the above method embodiments. The computer-readable storage medium may be non-volatile or volatile.

[0079] It should be noted that the functions or steps that can be achieved by the computer-readable storage medium or computer device, and the technical effects brought about by the functions / steps, can be referred to the relevant descriptions in the foregoing method embodiments. To avoid repetition, they will not be described one by one here.

[0080] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc. The disclosed memory components or memories of the operating environment described herein are intended to include one or more of these and / or any other suitable types of memory.

[0081] Those skilled in the art will understand that, for the sake of convenience and brevity, the embodiments of the device of the present invention are only illustrated by the division of the above-mentioned functional units and modules. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of the present invention. The specific working process of the units and modules in the above device can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here. If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium.

[0082] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.

[0083] In the embodiments provided by this invention, it should be understood that the disclosed apparatus / computer devices and methods can be implemented in other ways. For example, the apparatus / computer device embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0084] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0085] It should be noted that any AI models, software tools, or components not belonging to this company appearing in the embodiments of this application are merely illustrative examples and do not represent actual use. All user personal information involved in the embodiments of this application has been authorized (with the knowledge and consent) by the relevant parties or has been fully authorized by all parties, and the executing entity may obtain it through various legal and compliant means. The collection, storage, use, processing, transmission, provision, and disclosure of the information, data, and signals involved all comply with relevant laws and regulations and do not violate public order and good morals.

[0086] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.

Claims

1. A method for generating a lock-waiting blocking chain, characterized in that, include: Real-time monitoring of lock waiting behavior of each database lock in the target database; when the duration of any lock waiting behavior exceeds a preset lock waiting timeout threshold, a blocking event is determined to occur, and the lock waiting association information corresponding to the blocking event is collected to generate a lock waiting record; According to the preset triggering rules, all lock wait records within a set time interval in the target database are obtained to generate a lock wait dataset to be analyzed; The corresponding blocking event is reconstructed from each of the lock waiting records contained in the lock waiting dataset, and the lock waiting dataset is divided into several independent data segments with the blocking event with zero blocking transactions as the segment boundary; wherein, each data segment starts with the blocking event with zero blocking transactions and ends before the next blocking event with zero blocking transactions. For all the blocking events within each data segment, sort them according to the number of blocking transactions they each block, and generate lock wait blocking chains corresponding to each data segment based on the sorted blocking event sequence.

2. The lock waiting blocking chain generation method according to claim 1, characterized in that, The system monitors the lock waiting behavior of each database lock in the target database in real time. When the duration of any lock waiting behavior exceeds a preset lock waiting timeout threshold, a blocking event is determined to have occurred. The system then collects the lock waiting association information corresponding to the blocking event and generates a lock waiting record, including: The original lock waiting behavior generated by each database lock in the target database is captured in real time, and the captured original lock waiting behavior is filtered and screened to remove the original lock waiting behavior that is completed instantaneously, so as to obtain the corresponding lock waiting behavior. The duration of each lock waiting behavior is compared with a preset lock waiting timeout threshold, and when the duration of any lock waiting behavior exceeds the lock waiting timeout threshold, it is marked as a blocking event with an event attribute label. Collect the lock information and transaction information corresponding to the blocking event, and perform integrity verification on the lock information and transaction information. If the verification passes, generate a lock wait record.

3. The lock waiting blocking chain generation method according to claim 1, characterized in that, The step involves obtaining all lock wait records within a set time interval in the target database according to a preset triggering rule, and generating a lock wait dataset to be analyzed, including: A data retrieval task is generated according to a preset time-triggered rule or event-triggered rule, and based on the data retrieval task, the lock wait records stored in each storage shard of the target database are read. The read lock wait records are pre-filtered according to a set time interval, and lock wait records whose timestamps fall outside the set time interval are removed. Lock wait records that cross storage shards are merged to obtain a candidate lock wait record set. Perform data consistency verification on the candidate lock waiting record set, remove abnormal lock waiting records that fail the verification, and generate a lock waiting dataset to be analyzed based on the candidate lock waiting records that pass the verification.

4. The lock waiting blocking chain generation method according to claim 1, characterized in that, The process involves reconstructing the corresponding blocking events based on each lock-waiting record in the lock-waiting dataset, and using the blocking events with zero blocked transactions as segment boundaries to divide the lock-waiting dataset into several independent data segments, including: Traverse each lock wait record in the lock wait dataset, parse and generate the corresponding blocking event, and filter out valid boundary blocking events from all the blocking events; wherein, the blocking events with zero blocking transactions and passing the validity check are marked as valid boundary blocking events; Using each of the aforementioned valid boundary blocking events as the starting point for segmentation, all the aforementioned blocking events are segmented, and the empty data segments obtained after segmentation are removed to obtain several independent data segments.

5. The lock waiting blocking chain generation method according to claim 1, characterized in that, The step of sorting all the blocking events within each data segment according to their respective number of blocking transactions, and generating lock-waiting blocking chains corresponding to each data segment based on the sorted blocking event sequence, includes: For all the blocking events within each data segment, sort them according to the number of blocked transactions to obtain the corresponding blocking event sequence, and perform sorting compliance verification on each blocking event sequence; For the sequence of blocking events that have passed the verification, establish node associations and bindings between adjacent blocking events, generate a set of structured link nodes, and construct a lock-waiting blocking chain for the corresponding data segment based on the set of structured link nodes.

6. The lock wait blocking chain generation method according to any one of claims 1-5, characterized in that, After sorting all the blocking events within each data segment according to their respective number of blocking transactions, and generating lock-wait blocking chains corresponding to each data segment based on the sorted blocking event sequence, the process further includes: Extract the link feature information of each lock-waiting blocking chain, and based on the link feature information, evaluate the blocking risk level of each lock-waiting blocking chain according to the preset risk judgment rules, and generate the risk level evaluation result of each lock-waiting blocking chain.

7. The lock wait blocking chain generation method according to claim 6, characterized in that, After extracting the link feature information of each lock-waiting blocking chain, and based on the link feature information, assessing the blocking risk level of each lock-waiting blocking chain according to a preset risk judgment rule, and generating the risk level assessment result of each lock-waiting blocking chain, the method further includes: Based on the risk level assessment results, a corresponding risk level label is assigned to each of the lock waiting blocking chains. Information is aggregated and archived for all the lock waiting blocking chains, and an association index is constructed between each of the lock waiting blocking chains to generate a lock waiting blocking chain result carrying the risk level label and the association index.

8. A lock-waiting blocking chain generation device, characterized in that, include: The monitoring module is used to monitor the lock waiting behavior of each database lock in the target database in real time. When the duration of any lock waiting behavior exceeds the preset lock waiting timeout threshold, a blocking event is determined to have occurred, and the lock waiting association information corresponding to the blocking event is collected to generate a lock waiting record. The acquisition module is used to acquire all lock wait records within a set time interval in the target database according to preset triggering rules, and generate a lock wait dataset to be analyzed. The segmentation module is used to reconstruct the corresponding blocking event based on each lock waiting record contained in the lock waiting dataset, and to divide the lock waiting dataset into several independent data segments using the blocking event with zero blocking transactions as the segment boundary; wherein, each data segment starts with the blocking event with zero blocking transactions and ends before the next blocking event with zero blocking transactions. The sorting module is used to sort all the blocking events in each data segment according to their respective number of blocking transactions, and generate lock waiting blocking chains corresponding to each data segment based on the sorted blocking event sequence.

9. A computer 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 lock wait blocking chain generation method as described in any one of claims 1-7.

10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the lock wait blocking chain generation method as described in any one of claims 1-7.