Character protocol playback method and system based on operation and maintenance auditing system, and medium
By identifying and parsing the character protocol for target operations in the playback module of the operation and maintenance audit system, and sending the data to the terminal simulator for rendering, the problems of low playback efficiency and front-end browser crash in the existing technology are solved, and more efficient and stable operation and maintenance audit playback is achieved.
Patent Information
- Application Number
- CN202510345256.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-24
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2045-03-24
AI Technical Summary
When replaying long-term sessions, the existing operation and maintenance audit system occupies a large amount of storage space and resources, has low retrieval efficiency, and is prone to crash when the front-end browser parses larger character protocol files, affecting audit efficiency.
After the security verification is successful, the character protocol that represents the target operation is identified from the index file and data file of the operation and maintenance audit system according to the target protocol format, and the up and down line data is sent to the terminal simulator for rendering to complete the playback.
By analyzing data on the playback module, the crash situation when the video file is large is avoided, the stability and efficiency of playback are improved, and the irrelevant idle time periods can be skipped, key operations can be positioned, and retrieval efficiency can be improved.
Smart Images

Figure CN119892492A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of operation and maintenance auditing, and in particular to a method, system and medium for character protocol playback based on an operation and maintenance auditing system. Background Art
[0002] When using the bastion host system for operation and maintenance audit, auditors need to replay the user's video to further confirm whether the user has performed risky operations. In the prior art, the screen recording software usually generates a character protocol video file and a related index file when recording the screen, and then when playback is required, the index file is retrieved to obtain the specified character protocol video file, and finally, the character protocol video file is parsed and rendered in the front-end browser to complete the video playback.
[0003] However, when using the above technology, when replaying some sessions with long operation time, most of which are unmanned, it will take up a lot of storage space and resources, and the retrieval efficiency is also low. In addition, since the character protocol file is parsed in the front-end browser, the front-end browser will crash when playing back large character protocol files. Since the operation and maintenance audit system needs to record all operations of the operation and maintenance personnel, the character protocol video files are generally large. The character protocol video files corresponding to sessions with long operation time are even larger, and the probability of the front-end browser crashing is relatively high, affecting the audit efficiency.
[0004] Therefore, the current character protocol playback method of the operation and maintenance audit system has technical problems such as low retrieval efficiency and easy crash when parsing data in the front-end browser when playing back large character protocol video files. Summary of the invention
[0005] The purpose of the present invention is to provide a method, system and medium for character protocol playback based on an operation and maintenance audit system. The method is as follows: after the security verification is successful, the playback module identifies the character protocol representing the target operation from the index file and data file from the operation and maintenance audit system according to the target protocol format, and sends the uplink and downlink data of the corresponding character protocol to the terminal simulator. The terminal simulator renders the received uplink and downlink data of the corresponding character protocol to complete the playback, thereby realizing data parsing on the playback module, which is a playback server. At the same time, by identifying the target operation and obtaining the corresponding data, it is possible to locate the key operation during playback and skip the insignificant idle time period, thereby solving the technical problems of low retrieval efficiency and easy crash when parsing data in the front-end browser when playing back large character protocol video files.
[0006] The present invention is achieved through the following technical solutions: In the first aspect, the present application discloses a method for character protocol playback based on an operation and maintenance audit system. After the security verification is successful, the playback module identifies the character protocol representing the target operation from the index file and data file from the operation and maintenance audit system according to the target protocol format and sends the uplink and downlink data of the corresponding character protocol to the terminal emulator. The terminal emulator renders the received uplink and downlink data of the corresponding character protocol to complete the playback.
[0007] In order to better implement the present invention, further, the target protocol format is configured to characterize the starting offset and the fragment length of the target operation.
[0008] In order to better implement the present invention, further, the playback module reads the index file line by line and parses the current line. If it is determined that the parsed result of the current line is a character protocol, the upstream and downstream data of the corresponding character protocol are read from the data file according to the starting offset, fragment length and data file path from the operation and maintenance audit system stored in the current line. Otherwise, the next line of the index file is read line by line.
[0009] In order to better implement the present invention, further, if the uplink and downlink data of the corresponding character protocol are read successfully, the uplink and downlink data of the corresponding character protocol are sent to the terminal emulator for rendering and after the rendering is completed, the next line of the index file is read line by line; if the uplink and downlink data of the corresponding character protocol are read unsuccessfully, the next line of the index file is read line by line.
[0010] In order to better implement the present invention, further, the terminal emulator is an Xterm terminal emulator, a MobaXterm terminal emulator, a SecureCRT terminal emulator, a WindTerm terminal emulator or a ModengTerm terminal emulator.
[0011] In order to better realize the present invention, further: The terminal emulator and the playback module use the websocket protocol for communication.
[0012] In order to better implement the present invention, further, the method of security verification includes: The terminal emulator receives the verification token of the corresponding session playback from the operation and maintenance audit system. When the terminal emulator establishes a connection with the playback module, the playback module sends the verification token to the operation and maintenance audit system to verify the legitimacy of the verification token. If the legitimacy of the verification token is verified, the security verification is successful. The playback module receives the index file and data file path from the operation and maintenance audit system, otherwise the operation and maintenance audit system will disconnect the connection with the playback module.
[0013] In order to better implement the present invention, further, the playback module sends the verification token to the operation and maintenance audit system through the internal interface to request the operation and maintenance audit system to verify the legitimacy of the verification token.
[0014] In a second aspect, the present application discloses a system for character protocol playback based on an operation and maintenance audit system, comprising: A playback module, which is used to identify the character protocol representing the target operation from the index file and the data file from the operation and maintenance audit system according to the target protocol format after the security verification is successful, and send the uplink and downlink data of the corresponding character protocol to the terminal simulator; The terminal simulator is used to render the received uplink and downlink data of the corresponding character protocol to complete the playback.
[0015] In a third aspect, the present application discloses a computer-readable storage medium having a computer program stored thereon, characterized in that when the program is executed by a processor, the method for character protocol playback based on an operation and maintenance audit system as described in any one of the first aspects is implemented.
[0016] Compared with the prior art, the present invention has the following advantages and beneficial effects: By using the playback module as a playback server to process playback files for data analysis, crashes when video files are large are avoided, playback stability is improved, and applicability is stronger; By identifying the specific protocol format in the playback file and obtaining the uplink and downlink data of the specified operation, it is possible to skip the insignificant idle time period in the playback session or identify the specific operation in the playback session, thereby improving the retrieval efficiency; Through security verification, the security of data transmission is guaranteed, which is suitable for the playback of operation and maintenance audit system. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The present invention is further described in conjunction with the following drawings and embodiments, and all the concepts and innovations of the present invention should be regarded as the disclosed contents and the protection scope of the present invention.
[0018] Figure 1 This is a flow chart of playback and data transmission performed by the playback module in Embodiment 2 of the method for character protocol playback based on the operation and maintenance audit system in the present application.
[0019] Figure 2 A flowchart of method embodiment 3 of character protocol playback based on an operation and maintenance audit system in the present application. DETAILED DESCRIPTION
[0020] Example 1 A method for character protocol playback based on an operation and maintenance audit system. After security verification is successful, a playback module identifies the character protocol representing a target operation from an index file and a data file from the operation and maintenance audit system according to the target protocol format, and sends the uplink and downlink data of the corresponding character protocol to a terminal simulator. The terminal simulator renders the received uplink and downlink data of the corresponding character protocol to complete the playback.
[0021] Specifically, in this embodiment, since the operation on the operation and maintenance audit system is replayed, when replaying, it is necessary to first verify the security of the replay environment, and replay can only be performed when the security meets the requirements; In this embodiment, the target operation may be all operations generated by the operation and maintenance personnel in the playback session, and the uplink and downlink data corresponding to the character protocol are playback data of the operation and maintenance personnel during the operation period. In contrast, the operation and maintenance personnel are idle, and the playback data of the idle period needs to be skipped. When generating the playback data file, the operation generated by the operation and maintenance personnel is marked in a specific format so that the playback module can identify it; of course, the target data may also be the specified operation generated by the operation and maintenance personnel, such as accessing a certain database, downloading a certain type of data, etc. When generating the playback data file, these operations can be marked in a specified format respectively for distinguishing and identifying; In this embodiment, the target protocol format may include a storage format of an index file and a format of protocol data. The index file is identified in the file through the storage format of the index file, and the character protocol representing the target operation is identified in the path of the data file through the format of the protocol data, and the uplink and downlink data are further obtained in the data file through the path. In this embodiment, the terminal emulator only needs to render the character data returned by the playback module. By separating parsing and rendering, rather than performing both in the browser / client, crashes during playback can be effectively prevented.
[0022] Example 2 This embodiment is further optimized on the basis of the above-mentioned embodiment 1. In this embodiment, the target protocol format is configured to characterize the starting offset and the fragment length of the target operation; Furthermore, the playback module reads the index file line by line and parses the current line. If the parsed result of the current line is determined to be a character protocol, the upstream and downstream data of the corresponding character protocol are read from the data file according to the starting offset, segment length and data file path from the operation and maintenance audit system stored in the current line. Otherwise, the next line of the index file is read line by line. Furthermore, if the reading of the uplink and downlink data of the corresponding character protocol is successful, the uplink and downlink data of the corresponding character protocol are sent to the terminal emulator for rendering and after the rendering is completed, the next line of the index file is read line by line; if the reading of the uplink and downlink data of the corresponding character protocol fails, the next line of the index file is read line by line; By adopting this implementation, it is possible to optimize the playback of large sessions, skip insignificant idle time periods, and make the playback faster. Especially in long-term operations, it is possible to directly locate key operations and improve efficiency. It helps auditors to review and analyze operation records more efficiently and improve overall work efficiency. Of course, if only a certain type of key operation is located, it can also be identified in the above manner, and all operations except this type of key operation are regarded as idle time periods. If it is necessary to locate certain specified types of operations, the type of target protocol format and the operation weight can be configured accordingly.
[0023] Optionally, the terminal emulator and the playback module communicate with each other using a websocket protocol; By adopting this implementation, the real-time and security of data transmission can be guaranteed with low delay and low consumption.
[0024] Optionally, the terminal emulator is one of Xterm terminal emulator, MobaXterm terminal emulator, SecureCRT terminal emulator, WindTerm terminal emulator or ModengTerm terminal emulator; By adopting this implementation mode, different terminal simulators can be selected according to different playback scenarios to obtain better playback rendering effects; The playback mode of Xterm terminal emulator does not require the installation of additional terminal software, can be directly run in the target environment, and has strong stability and low resource usage; MobaXterm terminal emulator, WindTerm terminal emulator and ModengTerm terminal emulator can realize batch playback operation; MobaXterm terminal emulator and SecureCRT terminal emulator can realize recording and playback at the same time.
[0025] See also Figure 1 In an optional implementation, the storage format of the index file may be "type-[data]", the format of the protocol data may be "C-[offset]-[length]", wherein offset represents the starting offset, length represents the length of the segment, the terminal emulator is an Xterm terminal emulator, and the terminal emulator and the playback module are connected to each other using the websocket protocol; The method in which the playback module identifies the character protocol representing the target operation from the index file and the data file from the operation and maintenance audit system according to the target protocol format and sends the uplink and downlink data of the corresponding character protocol to the terminal simulator comprises the following steps: Step S101, reading the playback index file line by line; Step S102, determine whether all playback index files have been read, if so, execute step S108, otherwise execute step S103; Step S103, parsing the current line; Step S104, determine whether it is a character protocol data record, if so, execute step S105, otherwise return to execute step S101; Step S105, reading the protocol data in the data file according to the offset and length stored in the current row; Step S106, determine whether the reading is successful, if so, execute step S107, otherwise return to execute step S101; Step S107, sending the protocol data to the Xterm terminal emulator for rendering and returning to execute step S101; Step S108: End of playback.
[0026] By adopting this implementation, the index file is retrieved and parsed line by line to avoid playback errors and omissions; the operation of the operation and maintenance personnel can be accurately located through the starting offset and segment length in the data format, and the idle period can be skipped during the playback of long character protocol sessions, thereby improving the efficiency of playback.
[0027] Embodiment 3: This embodiment is further optimized on the basis of the above-mentioned embodiment 2. In this embodiment, the method of security verification includes: The terminal simulator receives the verification token of the corresponding session playback from the operation and maintenance audit system. When the terminal simulator establishes a connection with the playback module, the playback module sends the verification token to the operation and maintenance audit system to verify the legitimacy of the verification token. If the legitimacy of the verification token is verified, the security verification is successful. The playback module receives the index file and data file path from the operation and maintenance audit system, otherwise the operation and maintenance audit system will disconnect the connection with the playback module. Furthermore, the playback module sends the verification token to the operation and maintenance audit system through an internal interface to request the operation and maintenance audit system to verify the legitimacy of the verification token.
[0028] In an optional implementation, the method for character protocol playback based on the operation and maintenance audit system includes the following steps: Step S201, the Xterm terminal simulator receives a token corresponding to the session playback from the operation and maintenance audit system; Step S202, the Xterm terminal emulator establishes a websocket connection with the playback module and sends a token to the playback module; Step S203: The playback module sends the token to the operation and maintenance audit system through the internal interface; Step S204: When the token verification is successful, the playback module receives the index file and data file path from the operation and maintenance audit system; Step S205: The playback module executes steps S101 to S108 to complete the playback.
[0029] By adopting this implementation, safe transmission of playback data can be achieved.
[0030] Example 4 A character protocol playback system based on an operation and maintenance audit system, comprising: A playback module, which is used to identify the character protocol representing the target operation from the index file and the data file from the operation and maintenance audit system according to the target protocol format after the security verification is successful, and send the uplink and downlink data of the corresponding character protocol to the terminal simulator; The terminal simulator is used to render the received uplink and downlink data of the corresponding character protocol to complete the playback.
[0031] Example 5 A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the method for character protocol playback based on an operation and maintenance audit system as described in any one of Embodiments 1 to 3.
[0032] The above description is only a preferred embodiment of the present invention and does not limit the present invention in any form. Any simple modification or equivalent change made to the above embodiment based on the technical essence of the present invention shall fall within the protection scope of the present invention.
Claims
1. A method for character protocol playback based on an operation and maintenance audit system, characterized in that: After the security verification is successful, the playback module identifies the character protocol representing the target operation from the index file and data file from the operation and maintenance audit system according to the target protocol format, and sends the uplink and downlink data of the corresponding character protocol to the terminal emulator. The terminal emulator renders the received uplink and downlink data of the corresponding character protocol to complete the playback.
2. According to claim 1, the method for character protocol playback based on the operation and maintenance audit system is characterized in that: The target protocol format is configured to characterize the starting offset and segment length of the target operation.
3. According to claim 2, the method for character protocol playback based on the operation and maintenance audit system is characterized in that: The playback module reads the index file line by line and parses the current line. If the parsed result of the current line is determined to be a character protocol, the upstream and downstream data of the corresponding character protocol are read from the data file based on the starting offset, fragment length and data file path from the operation and maintenance audit system stored in the current line. Otherwise, the next line of the index file is read line by line.
4. According to claim 3, the method for character protocol playback based on the operation and maintenance audit system is characterized in that: If reading the uplink and downlink data of the corresponding character protocol is successful, the uplink and downlink data of the corresponding character protocol are sent to the terminal emulator for rendering and after the rendering is completed, the next line of the index file is read line by line; if reading the uplink and downlink data of the corresponding character protocol fails, the next line of the index file is read line by line.
5. According to claim 1, the method for character protocol playback based on the operation and maintenance audit system is characterized in that: The terminal emulator is an Xterm terminal emulator, a MobaXterm terminal emulator, a SecureCRT terminal emulator, a WindTerm terminal emulator or a ModengTerm terminal emulator.
6. According to claim 1, the method for character protocol playback based on the operation and maintenance audit system is characterized in that: The terminal emulator and the playback module use the websocket protocol for communication.
7. The method for character protocol playback based on the operation and maintenance audit system according to claim 1 is characterized in that: Security verification methods include: The terminal emulator receives the verification token of the corresponding session playback from the operation and maintenance audit system. When the terminal emulator establishes a connection with the playback module, the playback module sends the verification token to the operation and maintenance audit system to verify the legitimacy of the verification token. If the legitimacy of the verification token is verified, the security verification is successful. The playback module receives the index file and data file path from the operation and maintenance audit system, otherwise the operation and maintenance audit system will disconnect the connection with the playback module.
8. The method for character protocol playback based on the operation and maintenance audit system according to claim 7 is characterized in that: The playback module sends the verification token to the operation and maintenance audit system through the internal interface to request the operation and maintenance audit system to verify the legitimacy of the verification token.
9. A character protocol playback system based on an operation and maintenance audit system, characterized in that: include: A playback module, which is used to identify the character protocol representing the target operation from the index file and the data file from the operation and maintenance audit system according to the target protocol format after the security verification is successful, and send the uplink and downlink data of the corresponding character protocol to the terminal simulator; The terminal simulator is used to render the received uplink and downlink data of the corresponding character protocol to complete the playback.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method for character protocol playback based on an operation and maintenance audit system described in any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Protocol-level screen-recording playback method
CN107948572A
Remote desktop operation auditing method, device and equipment
CN113992878A
Dynamic split-screen synchronous input method based on operation and maintenance auditing system
CN115793906A
Multi-type data file playback method and device, equipment and medium
CN115905124A
Data auditing method and system
CN118055149A
Cited By
Cross-platform operation and maintenance playback scene intelligent identification method and cross-platform operation and maintenance playback method
CN120744317A
Non-operation frame skipping method, system and device for operation and maintenance audit video and medium
CN121125430A