A situation playback method and device based on jump list index file
By using a table-hop index file method in the situation playback system, the existing situation playback system has solved the problem of low efficiency and high latency when processing large-scale data, and efficient situation data playback and simplified deployment process are achieved.
Patent Information
- Application Number
- CN202411765074.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-04
- Publication Date
- 2025-02-11
- Estimated Expiration
- 2044-12-04
AI Technical Summary
The existing situation playback software methods and devices are inefficient and have high latency when processing large-scale situation data, and the server-side deployment is complex, which limits the deployment and use of clients.
The situation playback method based on the table jump index file is adopted. By obtaining the original situation data, a linked list node is constructed and a table jump index file is generated. The index file is used to quickly find and load the required situation data.
Reduces frequent network requests, significantly reduces latency, improves situational playback efficiency in large-scale data playback scenarios, and simplifies device deployment.
Smart Images

Figure CN119226576B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a situation playback method and device based on a jump list index file. Background Art
[0002] With the informatization of confrontation training activities, confrontation training exercises use a large number of informatization confrontation equipment and systems, which can realize the data collection of the whole process and all elements of the exercise situation. On the other hand, with the scientific and systematic evaluation of confrontation training, the review, study and review after the exercise have further spawned and promoted the demand and progress of storage and playback technology for exercise situation.
[0003] Current situation playback software methods and devices mostly adopt the client / server model, and the server needs to deploy a database to support the storage, retrieval, and reading of the original situation data. During the situation playback process, the client software needs to frequently contact the server to request the required situation data and obtain the situation data for playback through the network. The above process usually has a high delay and low efficiency, and cannot cope with the large-scale situation data playback needs well. In addition, the deployment steps of the server are usually complicated, requiring the installation and configuration of large-scale services such as databases and network middleware, and requiring skilled administrators to operate, which further limits the deployment and use of the client. Summary of the invention
[0004] Based on this, it is necessary to provide a situation playback method and device based on a jump table index file to address the above technical problems.
[0005] A situation playback method based on a skip list index file, the method comprising:
[0006] Acquire original situation data; the original situation data includes time information and event information;
[0007] Traverse the original situation data, use the time information of the current original situation data as the jump table key, point to the original situation data file address as the value, build the corresponding linked list node, connect the linked list nodes in time order, and get the corresponding basic linked list;
[0008] If the event information corresponding to the linked list node is in the preset key event list, the current linked list node is added to the primary index and the secondary index respectively, and the next frame of original situation data is traversed. Otherwise, it is queried whether the time information corresponding to the linked list node meets the preset situation basic interval. If it meets the preset situation basic interval, the current linked list node is added to the primary index, and the next frame of original situation data is traversed. After the traversal is completed, the current basic linked list, the primary index and the secondary index are written into the file to obtain the skip list index file;
[0009] The skip list index file is used to search for the corresponding situation data file and play it back according to the user's request.
[0010] In one of the embodiments, it also includes: when the user request is a situation playback key node, using the secondary index of the skip list index file, traversing from the skip list header node to find the linked list node matching the situation playback key node, and reading the corresponding situation data file for playback.
[0011] In one of the embodiments, it also includes: when the user request is for the situation playback time, using the secondary index of the jump list index file to find the secondary index node whose last timestamp is equal to the situation playback time, using the primary index, starting from the secondary index node, to find the first-level index node whose last timestamp is equal to the situation playback time, using the basic linked list, starting from the first-level index node, to find the linked list node whose last timestamp is equal to the situation playback time; reading the situation data file of the linked list node for playback.
[0012] In one of the embodiments, it also includes: when the user request is a situation playback time interval, using the secondary index of the jump list index file to find the first secondary index node whose last timestamp is not greater than the lower bound of the situation playback time interval, using the primary index, starting from the first secondary index node, to find the first first index node whose last timestamp is not greater than the lower bound, using the basic linked list, starting from the first first index node, to find the last linked list node b whose timestamp is not greater than the lower bound; using the secondary index, from the first secondary index node to find the second secondary index node whose first timestamp is not less than the upper bound of the situation playback time interval, using the primary index, starting from the second secondary index node, to find the second first index node whose first timestamp is not less than the upper bound, using the basic linked list, starting from the second first index node, to find the linked list node e whose first timestamp is not less than the upper bound; reading the situation data files of each linked list node between the linked list node b and the linked list node e for playback.
[0013] In one of the embodiments, it also includes: starting from the last node of the current basic linked list, searching in reverse order for the last linked list node m whose timestamp is greater than or equal to the timestamp corresponding to the current linked list node, and inserting the current linked list node before the linked list node m.
[0014] In one of the embodiments, the method further includes: storing the original situation data in chronological order, extracting the timestamp of the original situation data and generating a description file.
[0015] In one of the embodiments, the original situation data also includes location information and unit information.
[0016] A situation playback device based on a skip list index file, the device comprising:
[0017] A data acquisition module, used to acquire original situation data; the original situation data includes time information and event information;
[0018] A linked list construction module is used to traverse the original situation data, use the time information of the current original situation data as the jump table key, point to the original situation data file address as the value, construct the corresponding linked list node, and connect the linked list nodes in time order to obtain the corresponding basic linked list;
[0019] A skip list construction module is used to add the current linked list node to the primary index and the secondary index respectively if the event information corresponding to the linked list node is in the preset key event list, and traverse the next frame of original situation data; otherwise, query whether the time information corresponding to the linked list node meets the preset situation basic interval; if so, add the current linked list node to the primary index, traverse the next frame of original situation data, and after the traversal is completed, write the current basic linked list, the primary index and the secondary index into a file to obtain a skip list index file;
[0020] The situation playback module is used to use the jump list index file to search for the corresponding situation data file according to the user's request and play it back.
[0021] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0022] Acquire original situation data; the original situation data includes time information and event information;
[0023] Traverse the original situation data, use the time information of the current original situation data as the jump table key, point to the original situation data file address as the value, build the corresponding linked list node, connect the linked list nodes in time order, and get the corresponding basic linked list;
[0024] If the event information corresponding to the linked list node is in the preset key event list, the current linked list node is added to the primary index and the secondary index respectively, and the next frame of original situation data is traversed. Otherwise, it is queried whether the time information corresponding to the linked list node meets the preset situation basic interval. If it meets the preset situation basic interval, the current linked list node is added to the primary index, and the next frame of original situation data is traversed. After the traversal is completed, the current basic linked list, the primary index and the secondary index are written into the file to obtain the skip list index file;
[0025] The skip list index file is used to search for the corresponding situation data file and play it back according to the user's request.
[0026] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the following steps:
[0027] Acquire original situation data; the original situation data includes time information and event information;
[0028] Traverse the original situation data, use the time information of the current original situation data as the jump table key, point to the original situation data file address as the value, build the corresponding linked list node, connect the linked list nodes in time order, and get the corresponding basic linked list;
[0029] If the event information corresponding to the linked list node is in the preset key event list, the current linked list node is added to the primary index and the secondary index respectively, and the next frame of original situation data is traversed. Otherwise, it is queried whether the time information corresponding to the linked list node meets the preset situation basic interval. If it meets the preset situation basic interval, the current linked list node is added to the primary index, and the next frame of original situation data is traversed. After the traversal is completed, the current basic linked list, the primary index and the secondary index are written into the file to obtain the skip list index file;
[0030] The skip list index file is used to search for the corresponding situation data file and play it back according to the user's request.
[0031] The above-mentioned situation playback method and device based on skip list index file, by traversing the original situation data obtained, using the time information of the current original situation data as the skip list key, pointing to the original situation data file address as the value, constructing the corresponding chain list node, connecting the chain list nodes in chronological order, obtaining the corresponding basic chain list, if the event information corresponding to the chain list node is in the preset key event list, then adding the current chain list node to the primary index and the secondary index respectively, traversing the next frame of original situation data, otherwise, querying whether the time information corresponding to the chain list node meets the preset situation basic interval, if it meets, then adding the current chain list node to the primary index, traversing the next frame of original situation data, after the traversal is completed, writing the current basic chain list, the primary index and the secondary index into a file, obtaining the skip list index file, using the skip list index file, searching the corresponding situation data file according to the user request and replaying. Using the skip list index file that records the key nodes or time intervals in the original situation data, the client can quickly find and load the required situation data based on the skip list index file. The embodiments of the present invention can reduce frequent network requests, significantly reduce delays in large-scale data playback scenarios, and improve situation playback efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 It is a flowchart of a situation playback method based on a skip list index file in one embodiment;
[0033] Figure 2 A schematic diagram of a process for constructing a skip list index file in one embodiment;
[0034] Figure 3 A schematic diagram of a process of situation playback in one embodiment;
[0035] Figure 4 A schematic diagram of a flow chart of a situation playback method based on a skip list index file in a specific embodiment;
[0036] Figure 5 It is a structural block diagram of a situation playback device based on a skip list index file in one embodiment;
[0037] Figure 6 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0038] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0039] It should be noted that in this application, the descriptions of "first", "second", etc. are only for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" or "second" may explicitly or implicitly include at least one of the features.
[0040] In one embodiment, Figure 1 As shown, a situation playback method based on a jump table index file is provided, comprising the following steps:
[0041] Step 102, obtaining original situation data.
[0042] The original situation data includes time information (timestamp), location information, event information and unit information.
[0043] Step 104, traverse the original situation data, use the time information of the current original situation data as the jump table key, point to the original situation data file address as the value, build the corresponding linked list node, connect the linked list nodes in time order, and obtain the corresponding basic linked list.
[0044] Step 106, if the event information corresponding to the linked list node is in the preset key event list, the current linked list node is added to the primary index and the secondary index respectively, and the next frame of original situation data is traversed. Otherwise, it is queried whether the time information corresponding to the linked list node meets the preset situation basic interval. If it meets the preset situation basic interval, the current linked list node is added to the primary index, and the next frame of original situation data is traversed. After the traversal is completed, the current basic linked list, the primary index and the secondary index are written into the file to obtain the jump list index file.
[0045] like Figure 2 The schematic diagram of the process of constructing a skip list index file is shown in FIG. Specifically, the process steps of constructing a skip list index file are as follows:
[0046] Step (1), create the head node of the linked list, that is, an empty skip list;
[0047] Step (2), traverse the original situation data to obtain i frames;
[0048] Step (3), extract the i-frame information and obtain the timestamp ti;
[0049] Step (4), starting from the last node in the linked list, search in reverse order for the node whose last timestamp is greater than or equal to ti (that is, in chronological order, the first node whose timestamp is not less than ti) n;
[0050] Step (5), create a new linked list empty node m, insert it before node n, use the timestamp as the node key, and use the address pointing to the i-th frame file of the original situation data as the value;
[0051] Step (6), extract i-frame information and obtain situation events;
[0052] Step (7), query the preset key event list. If the event of the i-th frame situation is included in the list, add the node m to the primary and secondary indexes of the skip list and execute step (9). Otherwise, execute step (8).
[0053] Step (8), query the preset situation basic interval, if the timestamp ti meets the requirement of the situation basic interval, then add the node m to the primary index of the skip list;
[0054] Step (9), if the traversal is completed, continue to step (10), otherwise, jump to step (2) and traverse the next frame of data;
[0055] Step (10), ending the traversal, writing the skip list formed through the above steps into a file, and completing the goal of creating a skip list index file.
[0056] Step 108, using the jump list index file, searching for the corresponding situation data file according to the user request and playing it back.
[0057] Situation playback refers to the dynamic replay of situation history information in a computer program in chronological order based on the original situation data file, which can be displayed in text, visual and other forms.
[0058] In the above-mentioned situation playback method based on skip list index file, the original situation data obtained by traversing is used as the skip list key, and the address of the original situation data file is pointed to as the value, and the corresponding chain list node is constructed, and the chain list nodes are connected in chronological order to obtain the corresponding basic chain list. If the event information corresponding to the chain list node is in the pre-set key event list, the current chain list node is added to the primary index and the secondary index respectively, and the next frame of original situation data is traversed. Otherwise, whether the time information corresponding to the query chain list node meets the pre-set situation basic interval, if it meets, the current chain list node is added to the primary index, and the next frame of original situation data is traversed. After the traversal is completed, the current basic chain list, the primary index and the secondary index are written into the file to obtain the skip list index file, and the skip list index file is used to find the corresponding situation data file according to the user request and replay it. The skip list index file that records the key nodes or time intervals in the original situation data is used to enable the client to quickly find and load the required situation data based on the skip list index file. The embodiments of the present invention can reduce frequent network requests, significantly reduce delays in large-scale data playback scenarios, and improve situation playback efficiency.
[0059] In one embodiment, the original situation data also includes location information and unit information.
[0060] In one embodiment, a skip list index file is used to search for a corresponding situation data file and perform playback according to a user request, including: when a user request is a situation playback key node, a secondary index of the skip list index file is used to traverse from the skip list header node to search for a linked list node that matches the situation playback key node, and read the corresponding situation data file for playback.
[0061] In one embodiment, using a skip list index file to search for a corresponding situation data file according to a user request and perform playback also includes: when the user request is for situation playback time, using the secondary index of the skip list index file to search for the secondary index node whose last timestamp is equal to the situation playback time, using the primary index, starting from the secondary index node, to search for the first-level index node whose last timestamp is equal to the situation playback time, using the basic linked list, starting from the first-level index node, to search for the linked list node whose last timestamp is equal to the situation playback time; reading the situation data file of the linked list node for playback.
[0062] In one embodiment, using a skip list index file to search for a corresponding situation data file according to a user request and playing it back also includes: when the user request is a situation playback time interval, using the secondary index of the skip list index file to search for the first and second level index nodes whose last timestamp is not greater than the lower bound of the situation playback time interval, using the primary index, starting from the first and second level index nodes, searching for the first and first level index nodes whose last timestamp is not greater than the lower bound, using the basic linked list, starting from the first and first level index nodes, searching for the last timestamp of the linked list node b whose last timestamp is not greater than the lower bound; using the secondary index, searching from the first and second level index nodes for the second and second level index nodes whose first timestamp is not less than the upper bound of the situation playback time interval, using the primary index, starting from the second and second level index nodes, searching for the second and first level index nodes whose first timestamp is not less than the upper bound, using the basic linked list, starting from the second and first level index nodes, searching for the first timestamp of the linked list node e whose first timestamp is not less than the upper bound; reading the situation data files of each linked list node between the linked list node b and the linked list node e for playback.
[0063] like Figure 3 The flow diagram of the situation playback shown in the figure, specifically, the steps of the situation playback process based on the jump table index file are as follows:
[0064] Step (1), loading the skip list index file into the memory space;
[0065] Step (2), according to the user request, is divided into
[0066] (a) The user requests the key node key_e, starts from the skip list header node h, uses the skip list secondary index to traverse and find the node matching the key_e event, and reads the corresponding situation data file through the node value (pointing to the address of the original situation data file) and plays it back;
[0067] (b) The situation replay time ta requested by the user starts from the jump list header node h. First, the secondary index is used to find the secondary index node a2 with the last timestamp = ta. Then, starting from the a2 node, the primary index is used to find the first-level index node a1 with the last timestamp = ta. Finally, starting from the a1 node, based on the basic linked list, the linked list node a with the last timestamp = ta is found to complete the positioning of the situation replay time ta and replay the situation data in the linked list node a.
[0068] (c) The user requested a situation playback time interval [tb, te], starting from the jump table header node h, first, use the secondary index to find the last timestamp Then, starting from node b2, use the primary index to find the last timestamp. First-level index node b1, finally, starting from node b1, based on the basic linked list, find the last timestamp Similarly, starting from node b2, use the secondary index to find the first timestamp Then, starting from node e2, use the primary index to find the first timestamp. First-level index node e1, finally, starting from node e1, based on the basic linked list, find the first timestamp The linked list node e of the playback interval [tb, te] is located, and the situation data in the playback interval is played back in the linked list order;
[0069] Step (3) reading the original situation data address from the determined node, and reading the original situation data according to the address;
[0070] Step (4): Based on the situation data, use visualization technology to replay the historical process of the situation.
[0071] In one embodiment, connecting linked list nodes in chronological order includes: starting from the last node of the current basic linked list, searching in reverse order for the last linked list node m whose timestamp is greater than or equal to the timestamp corresponding to the current linked list node, and inserting the current linked list node before the linked list node m.
[0072] In one embodiment, obtaining the original situation data includes: storing the original situation data in chronological order, extracting the timestamp of the original situation data and generating a description file. In this embodiment, when storing the original situation data, it can be stored in blocks or segments based on a preset file size limit.
[0073] In a specific embodiment, Figure 4 The flow chart of the situation playback method based on the skip list index file shown in the figure, the situation playback method generates a skip list index file based on the preset situation interval and key event list by traversing the original situation data, and the skip list index file records the key nodes or time intervals in the situation data, providing an efficient query basis for subsequent playback. Specifically, the situation playback software based on the skip list index file is developed and deployed and formed using the C++ language and Qt framework. The user chooses to load the corresponding skip list index file based on the dialog box. Further, the user can adjust the time interval and select the corresponding paragraph for playback, or search and playback the relevant situation important events by querying the key nodes. For the situation data of a certain exercise at a certain base (including about 2000 units and more than 13 hours of situation records), the playback device can locate the node counted in minutes within 1 second and perform playback.
[0074] Compared with the situation playback method of the traditional client / server architecture, the present invention generates a skip list index file based on the original situation data, does not affect other functional components, and during the playback process, the situation playback data is stored locally, does not require database support, and improves the flexibility of device deployment. In addition, the playback method based on the skip list index file has high query efficiency and is easy to search for intervals, which greatly improves the situation playback efficiency. Finally, based on the skip list index file, the playback device does not need to read all the situation playback data at one time, thereby, it is possible to achieve playback of large-scale data under the condition of hardware limitation.
[0075] It should be understood that although Figure 1 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 1 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.
[0076] In one embodiment, Figure 5 As shown, a situation playback device based on a jump table index file is provided, comprising:
[0077] The data acquisition module 502 is used to acquire original situation data; the original situation data includes time information and event information;
[0078] The linked list construction module 504 is used to traverse the original situation data, use the time information of the current original situation data as the jump table key, point to the original situation data file address as the value, construct the corresponding linked list node, and connect the linked list nodes in time order to obtain the corresponding basic linked list;
[0079] The skip list construction module 506 is used to add the current linked list node to the primary index and the secondary index respectively if the event information corresponding to the linked list node is in the preset key event list, and traverse the next frame of original situation data; otherwise, query whether the time information corresponding to the linked list node meets the preset situation basic interval; if so, add the current linked list node to the primary index, traverse the next frame of original situation data, and after the traversal is completed, write the current basic linked list, the primary index and the secondary index into a file to obtain a skip list index file;
[0080] The situation playback module 508 is used to use the skip list index file to search for the corresponding situation data file according to the user request and play it back.
[0081] In one of the embodiments, when a user requests a situation playback key node, the secondary index of the skip list index file is used to traverse from the skip list header node to find a linked list node that matches the situation playback key node, and read the corresponding situation data file for playback.
[0082] In one of the embodiments, when the user requests a situation playback time, the secondary index of the jump list index file is used to find the secondary index node whose last timestamp is equal to the situation playback time, the primary index is used to start from the secondary index node to find the first index node whose last timestamp is equal to the situation playback time, and the basic linked list is used to start from the first index node to find the linked list node whose last timestamp is equal to the situation playback time; the situation data file of the linked list node is read for playback.
[0083] In one of the embodiments, when a user requests a situation playback time interval, the secondary index of the skip list index file is used to find the first secondary index node whose last timestamp is not greater than the lower bound of the situation playback time interval; the first level index is used to start from the first secondary index node to find the first level index node whose last timestamp is not greater than the lower bound; the basic linked list is used to start from the first level index node to find the linked list node b whose last timestamp is not greater than the lower bound; the secondary index is used to start from the first level index node to find the second level index node whose first timestamp is not less than the upper bound of the situation playback time interval; the first level index is used to start from the second level index node to find the second level index node whose first timestamp is not less than the upper bound; the basic linked list is used to start from the second level index node to find the linked list node e whose first timestamp is not less than the upper bound; the situation data files of each linked list node between the linked list node b and the linked list node e are read for playback.
[0084] In one of the embodiments, it is also used to start from the last node of the current basic linked list, reversely search for the last linked list node m whose timestamp is greater than or equal to the timestamp corresponding to the current linked list node, and insert the current linked list node before the linked list node m.
[0085] In one of the embodiments, it is also used to store the original situation data in chronological order, extract the timestamp of the original situation data and generate a description file.
[0086] In one embodiment, the original situation data also includes location information and unit information.
[0087] About the specific limitation of the situation playback device based on the skip list index file, can refer to the limitation of the situation playback method based on the skip list index file in the above text, and will not be repeated here. Each module in the above-mentioned situation playback device based on the skip list index file can be realized in whole or in part by software, hardware and combination thereof. Each module can be embedded in or independent of the processor in the computer device in hardware form, or can be stored in the memory in the computer device in software form, so that the processor calls the operation corresponding to each module above.
[0088] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 6 As shown. The computer device includes a processor, a memory, a network interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a situation playback method based on a jump table index file is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covered on the display screen, or a button, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.
[0089] Those skilled in the art will understand that Figure 6 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0090] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method in the above embodiment when executing the computer program.
[0091] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method in the above embodiment are implemented.
[0092] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0093] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0094] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A situation playback method based on a skip list index file, characterized in that: The method comprises: Acquire original situation data; the original situation data includes time information and event information; Traverse the original situation data, use the time information of the current original situation data as the jump table key, point to the original situation data file address as the value, build the corresponding linked list node, connect the linked list nodes in time order, and get the corresponding basic linked list; If the event information corresponding to the linked list node is in the preset key event list, the current linked list node is added to the primary index and the secondary index respectively, and the next frame of original situation data is traversed. Otherwise, it is queried whether the time information corresponding to the linked list node meets the preset situation basic interval. If it meets the preset situation basic interval, the current linked list node is added to the primary index, and the next frame of original situation data is traversed. After the traversal is completed, the current basic linked list, the primary index and the secondary index are written into the file to obtain the skip list index file; The skip list index file is used to search for the corresponding situation data file and play it back according to the user's request.
2. The method according to claim 1, characterized in that The method of using the skip list index file to search for the corresponding situation data file and playback it according to the user request includes: When the user request is a situation playback key node, the secondary index of the skip list index file is used to traverse from the skip list header node to find the linked list node matching the situation playback key node, and read the corresponding situation data file for playback.
3. The method according to claim 1, characterized in that The method of using the skip list index file to search for the corresponding situation data file and playback it according to the user request also includes: When the user request is for the situation playback time, the secondary index of the skip list index file is used to find the last secondary index node whose timestamp is equal to the situation playback time, the primary index is used to find the last primary index node whose timestamp is equal to the situation playback time starting from the secondary index node, and the basic linked list is used to find the last linked list node whose timestamp is equal to the situation playback time starting from the primary index node; Read the situation data file of the linked list node for playback.
4. The method according to claim 1, characterized in that: The method of using the skip list index file to search for the corresponding situation data file and playback it according to the user request also includes: When the user request is a situation playback time interval, the second-level index of the skip list index file is used to find the first second-level index node whose last timestamp is not greater than the lower bound of the situation playback time interval, the first-level index is used to start from the first second-level index node, and the first-level index node whose last timestamp is not greater than the lower bound is found, and the basic linked list is used to start from the first first-level index node and find the linked list node b whose last timestamp is not greater than the lower bound; Using the secondary index, searching from the first secondary index node for a second secondary index node whose first timestamp is not less than the upper limit of the situation playback time interval, using the primary index, starting from the second secondary index node, searching for a second primary index node whose first timestamp is not less than the upper limit, using the basic linked list, starting from the second primary index node, searching for a linked list node e whose first timestamp is not less than the upper limit; The situation data files of each linked list node between the linked list node b and the linked list node e are read for playback.
5. The method according to claim 1, characterized in that The connecting the linked list nodes in chronological order comprises: Starting from the last node of the current base linked list, search in reverse order for the last linked list node m whose timestamp is greater than or equal to the timestamp corresponding to the current linked list node, and insert the current linked list node before the linked list node m.
6. The method according to claim 1, characterized in that Obtaining raw situation data includes: The original situation data is stored in chronological order, and the timestamp of the original situation data is extracted and a description file is generated.
7. The method according to claim 1, characterized in that The original situation data also includes location information and unit information.
8. A situation playback device based on a skip list index file, characterized in that: The device comprises: A data acquisition module, used to acquire original situation data; the original situation data includes time information and event information; A linked list construction module is used to traverse the original situation data, use the time information of the current original situation data as the jump table key, point to the original situation data file address as the value, construct the corresponding linked list node, and connect the linked list nodes in time order to obtain the corresponding basic linked list; A skip list construction module is used to add the current linked list node to the primary index and the secondary index respectively if the event information corresponding to the linked list node is in the preset key event list, and traverse the next frame of original situation data; otherwise, query whether the time information corresponding to the linked list node meets the preset situation basic interval; if so, add the current linked list node to the primary index, traverse the next frame of original situation data, and after the traversal is completed, write the current basic linked list, the primary index and the secondary index into a file to obtain a skip list index file; The situation playback module is used to use the jump list index file to search for the corresponding situation data file according to the user's request and play it back.
Citation Information
Patent Citations
Key value storage method based on hash table and LSM tree
CN113821171A
Distributed node intrusion situation awareness method based on block chain
CN116405187A