File browsing methods and devices, electronic devices, storage media

CN115756267BActive Publication Date: 2026-09-01伟光有限公司(CN)
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202211658695.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-22
Publication Date
2026-09-01
Estimated Expiration
2042-12-22

AI Technical Summary

Technical Problem

为了加快研发人员查找分析问题的速度可以使用数据库,但I/O读写也是非常耗时的过程,载入一个2G大文件需要等待3分钟

Benefits of technology

[0009] The file browsing method, apparatus, electronic device, and computer-readable storage medium provided in this application can quickly locate the problematic data when a user browses large data files, speeding up the user's problem analysis and improving the user experience, thereby solving the technical problems mentioned in the background art.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115756267B_ABST
    Figure CN115756267B_ABST
Patent Text Reader

Abstract

This invention discloses a file browsing method, apparatus, electronic device, and storage medium. The method includes: displaying a first interface, the first interface including a first movable control; receiving a first user operation; controlling the first movable control to move according to the first user operation; and displaying data of a data block at the corresponding position of the moved first movable control on the first interface. This method enables users to quickly locate problematic data when browsing large data files, accelerating the user's problem analysis and improving the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of electronic technology, and includes, but is not limited to, a method and apparatus for browsing files, electronic devices, and storage media. Background Technology

[0002] With the development of 5G services, the amount of tracking and debugging information is growing exponentially, such as the variable-length tracking and debugging information packets collected by the Trace Tool. When conducting big data business analysis, developers need to browse specific data within the tracking and debugging information, but the interface's response speed cannot keep up with their browsing speed, resulting in noticeable lag. While databases can be used to speed up problem finding and analysis, I / O read / write operations are very time-consuming; loading a 2GB file takes 3 minutes. Furthermore, during analysis, with approximately 20 million data entries, even with database optimization, interface lag is often noticeable, leading to a poor user experience.

[0003] Therefore, existing methods for browsing debugging information are insufficient to meet the needs of R&D personnel for rapid problem analysis. Summary of the Invention

[0004] In view of this, the file browsing method, apparatus, electronic device, and storage medium provided in this application can quickly locate the problematic data when a user browses large data files, accelerating the user's problem analysis speed and improving the user experience. The file browsing method, apparatus, electronic device, and storage medium provided in this application are implemented as follows:

[0005] In a first aspect, the file browsing method provided in the embodiments of this application includes: displaying a first interface, the first interface including a first movable control, the first interface being used to view data in a target file; receiving a first user operation, and controlling the first movable control to move according to the first user operation; displaying data of a data block at a corresponding position in the first interface according to the position of the moved first movable control, the corresponding data block being one of a plurality of data blocks included in the target file, and the plurality of positions that the first movable control can move to having a corresponding relationship with the storage positions of the plurality of data blocks.

[0006] Secondly, the file browsing device provided in this application includes: an interface display module for displaying a first interface, the first interface including a first movable control, the first interface being used to view data in a target file; a control movement module for receiving a first user operation and controlling the first movable control to move according to the first user operation; and a file display module for displaying data of a data block at a corresponding position in the first interface according to the position of the moved first movable control, the corresponding data block being one of a plurality of data blocks included in the target file, and the plurality of positions that the first movable control can move to having a corresponding relationship with the storage locations of the plurality of data blocks.

[0007] Thirdly, the electronic device provided in the embodiments of this application includes a memory and a processor. The memory stores a computer program that can run on the processor, and the processor executes the program to implement the method provided in the first aspect of the embodiments of this application.

[0008] Fourthly, the computer-readable storage medium provided in the embodiments of this application stores a computer program thereon, which, when executed by a processor, implements the method provided in the first aspect of the embodiments of this application.

[0009] The file browsing method, apparatus, electronic device, and computer-readable storage medium provided in this application can quickly locate the problematic data when a user browses large data files, speeding up the user's problem analysis and improving the user experience, thereby solving the technical problems mentioned in the background art. Attached Figure Description

[0010] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with this application and, together with the specification, serve to explain the technical solutions of this application.

[0011] Figure 1 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application;

[0012] Figure 2 A flowchart illustrating a file browsing method provided in an embodiment of this application;

[0013] Figure 3 A flowchart illustrating a method for displaying data block data provided in an embodiment of this application;

[0014] Figure 4 A schematic diagram illustrating the position index information of a scroll bar provided in an embodiment of this application;

[0015] Figure 5 A flowchart illustrating another file browsing method provided in an embodiment of this application;

[0016] Figure 6 This is a schematic diagram of the structure of location index information provided in an embodiment of this application;

[0017] Figure 7 A schematic diagram of the overall flow of a file browsing method provided in an embodiment of this application;

[0018] Figure 8 A schematic diagram of the overall process of another document generation method provided in this application embodiment;

[0019] Figure 9 This is a schematic diagram of the structure of a file browsing device provided in an embodiment of this application. Detailed Implementation

[0020] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the specific technical solutions of this application will be further described in detail below with reference to the accompanying drawings of the embodiments of this application. The following embodiments are used to illustrate this application, but are not intended to limit the scope of this application.

[0021] With the development of 5G services, the amount of tracking and debugging information is growing exponentially, such as the variable-length tracking and debugging information packets collected by the Trace Tool. When conducting big data business analysis, developers need to browse specific data within the tracking and debugging information, but the interface response speed cannot keep up with the browsing speed, resulting in noticeable lag. While databases can be used to speed up problem finding and analysis, I / O read / write operations are very time-consuming; loading a 2GB file takes 3 minutes. Furthermore, during analysis, with approximately 20 million data entries, even with database optimization, interface lag is often noticeable, leading to a poor user experience. Therefore, existing methods for browsing tracking and debugging information are insufficient to meet the needs of developers for rapid problem analysis.

[0022] In view of this, embodiments of this application provide a file browsing method, which can be applied to an electronic device, and the electronic device can be various types of devices with information processing capabilities. For example, the electronic device may include a personal computer, a laptop computer, a handheld computer, or a server, etc.

[0023] Figure 1 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 1The illustrated electronic device 100 mainly includes components such as a processor 110, a memory 120, an input unit 130, and a display unit 140. It is understood that the structure illustrated in the embodiments of this application does not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components can be implemented in hardware, software, or a combination of software and hardware.

[0024] The processor 110 is the control center of the electronic device. It connects various parts of the electronic device via various interfaces and lines. By running or executing software programs and / or modules stored in the memory 120, and by calling data stored in the memory 120, it performs various functions and processes data, thereby providing overall monitoring of the electronic device. Optionally, the processor 110 may include one or more processing units; preferably, the processor 110 may integrate an application processor and a modem processor, wherein the application processor mainly handles operating devices, user interfaces, and application programs, and the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processor 110.

[0025] The memory 120 can be used to store software programs and modules. The processor 110 executes various functional applications and data processing of the electronic device by running the software programs and modules stored in the memory 120. The memory 120 may mainly include a program storage area and a data storage area. The program storage area may store the operating device and application programs required for at least one function (such as sound playback function, image playback function, etc.); the data storage area may store data created according to the use of the electronic device (such as audio data, telephone book, etc.). In addition, the memory 120 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device.

[0026] The input unit 130 can be used to receive input digital or character information, and to generate key signal inputs related to user settings and function control of the electronic device 100. Specifically, the input unit 130 may include a touch panel 131 and other input devices 132. The touch panel 131, also known as a touch screen, can collect touch operations performed by the user on or near it (such as operations performed by the user using a finger, stylus, or any suitable object or accessory on or near the touch panel 131), and drive the corresponding connection devices according to a pre-set program. Optionally, the touch panel 131 may include two parts: a touch detection device and a touch controller. The touch detection device detects the user's touch position and the signal generated by the touch operation, and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device, converts it into touch point coordinates, sends it to the processor 110, and can receive and execute commands sent by the processor 110. In addition, the touch panel 131 can be implemented using various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch panel 131, the input unit 130 may also include other input devices 132. Specifically, other input devices 132 may include, but are not limited to, one or more of the following: function keys (such as volume control buttons, power buttons, etc.), trackballs, joysticks, etc.

[0027] Display unit 140 can be used to display information input by the user or information provided to the user, as well as various menus of the electronic device. Display unit 140 may include a display panel 141, optionally configured as a Liquid Crystal Display (LCD), Organic Light-Emitting Diode (OLED), or similar display panel 141. Further, touch panel 131 may cover display panel 141. When touch panel 131 detects a touch operation on or near it, it transmits the information to processor 110 to determine the type of touch event. Subsequently, processor 110 provides corresponding visual output on display panel 141 based on the type of touch event. Although in Figure 1 In this embodiment, the touch panel 131 and the display panel 141 are two separate components to realize the input and output functions of the electronic device. However, in some embodiments, the touch panel 131 and the display panel 141 can be integrated to realize the input and output functions of the electronic device.

[0028] Furthermore, the electronic devices involved in the embodiments of this application may have an operating system installed, on which applications can be installed and run; the embodiments of this application do not limit this.

[0029] The technical solutions in the embodiments of this application will now be described with reference to the accompanying drawings.

[0030] Figure 2 This is a flowchart illustrating a file browsing method provided in an embodiment of this application, which can be applied to... Figure 1 The electronic device shown. For example... Figure 2 As shown, the file browsing method may include the following steps 101 to 103:

[0031] Step 101: Display a first interface, which includes a first movable control and is used to view data in the target file.

[0032] It should be noted that the electronic device displays a first interface so that the user can view the data in the target file on the first interface. There are many ways to display the first interface. For example, it can be displayed after the application App is opened, or it can be displayed when other programs or processes are launched. The embodiments of this application do not limit the method of displaying the first interface.

[0033] The first interface includes a first movable control. The first movable control can be of many types, such as a scroll bar, a slider, or other movable controls. The movement can be horizontal sliding, vertical sliding, irregular sliding, or circular sliding, etc. The embodiments of this application do not limit the form of the first movable control.

[0034] It can be understood that the first movable control is used to select the data to view, and users can manipulate the first movable control to view the data they want.

[0035] Step 102: Receive the first user operation and control the first movable control to move according to the first user operation.

[0036] It should be noted that after the user performs the first user operation, the first movable control is moved according to the first user operation. There are many ways for the user to operate, such as operating the buttons on the electronic device, operating the interface through a mouse, or operating through touch, etc. This application embodiment does not limit the way the first user operates.

[0037] There are many ways to control the movement of the first movable control based on the first user operation. For example, it can be based on the distance, number of times, amplitude, etc. of the first user operation and the preset correspondence between the first user operation and the movement of the first movable control, and control the first movable control to move to a certain position or a certain range. This application embodiment does not limit the way to control the movement of the first movable control based on the first user operation.

[0038] In some embodiments, the first user operation may include a swipe operation, the first movable control may include a scroll bar, and controlling the movement of the first movable control according to the first user operation may include: controlling the scroll block in the scroll bar to move a corresponding distance based on the distance swiped by the swipe operation. Using the above method, a user can control the scroll block in the scroll bar to move a certain distance by swiping a certain distance to view data in a target file.

[0039] Step 103: Display the data of the corresponding data block in the first interface according to the position of the first movable control after it has been moved. The corresponding data block is one of the multiple data blocks included in the target file. The multiple positions that the first movable control can move to correspond to the storage locations of the multiple data blocks.

[0040] It should be noted that the target file includes multiple data blocks. The multiple positions that the first movable control can move correspond to the storage locations of the multiple data blocks. After the first movable control is moved, the data block at the corresponding position is displayed on the first interface according to the position of the first movable control.

[0041] There are many ways to display the data of the corresponding data block on the first interface based on the position of the moved first movable control. For example, it can display part of the data starting from the beginning, part of the data in the middle, or part of the data at the end of the data block. This application embodiment does not limit the way the data of the corresponding data block is displayed on the first interface based on the position of the moved first movable control.

[0042] By determining the displayed data block based on the position of the first movable control, an association mapping between interface operation and browsing large data files is realized, which facilitates the operation of the first user and perfectly transforms the location and search of large data information into the location and search of small data, improving the speed of business analysis and solving the interface lag problem.

[0043] In some embodiments, there are many ways to establish a correspondence between the multiple movable positions of the first movable control and the storage locations of the multiple data blocks. For example, a location mapping table or index information can be established. This application embodiment does not limit the way of establishing a correspondence between the multiple movable positions of the first movable control and the storage locations of the multiple data blocks.

[0044] Figure 3 This application provides a flowchart illustrating a method for displaying data block data, as shown in the embodiments below. Figure 3As shown, displaying the data of the corresponding data block in the first interface based on the position of the moved first movable control can include steps 1031-1033:

[0045] Step 1031: Determine the position of the first movable control after it has been moved.

[0046] It should be noted that there are many ways to determine the position of the first movable control after receiving the first user's operation. For example, it can be determined based on the current position of the first movable control on the interface, or based on the distance moved. This application embodiment does not limit the method of determining the position of the first movable control after movement.

[0047] In some embodiments, determining the position of the first movable control after movement may include: determining the destination position corresponding to the first user operation; determining a target position segment based on the destination position and multiple position segments; determining the target movable position corresponding to the target position segment as the position of the first movable control, wherein the multiple position segments correspond one-to-one with the multiple movable positions.

[0048] It should be noted that the movable position of the first movable control is divided into multiple position segments, with each segment corresponding to a movable position. When the first movable control stops at a certain position, determining the position segment in which that position is located allows us to obtain the movable position corresponding to that segment. This method allows for convenient determination of the position of the first movable control after movement.

[0049] Furthermore, determining the destination location corresponding to the first user operation may include: when the first movable control is in a stationary state, determining the stationary position of the first movable control as the destination location; or, when the first movable control is in a moving state, determining that the time interval between the current time and the last time the destination location was obtained reaches a preset time, and obtaining the position of the first movable control at the current time as the destination location.

[0050] It should be noted that when determining the target location corresponding to the first user operation, it is necessary to determine it based on the movement state of the first movable control. If the first movable control has completed its movement and is in a stationary state, then the stationary position is determined as the target location. If the first movable control is still in a moving state, then the target location is obtained once every certain time interval. That is, when the time interval between the current time and the last time the target location is obtained reaches a preset time, the position of the first movable control at the current time is obtained as the target location.

[0051] Step 1032: Determine the target location index information based on the position of the first movable control and a preset correspondence. The preset correspondence is the correspondence between multiple movable positions of the first movable control and multiple location index information included in the location index file. The multiple location index information is information that records the positions of multiple data blocks in the target file.

[0052] It should be noted that the location index file includes multiple location index information entries, which record the locations of multiple data blocks in the target file. Because a correspondence has been established between multiple movable locations and multiple location index information entries, the corresponding location index information can be determined after the location of the first movable control has been determined.

[0053] Furthermore, the correspondence between multiple movable positions and multiple location index information can be the correspondence between the storage locations of multiple movable positions and multiple location index information. After determining the position of the first movable control, the storage location of the corresponding location index information can be determined, and the target location index information can be obtained by reading the information at that storage location.

[0054] Step 1033: Display the data in the target data block corresponding to the target location index information on the first interface.

[0055] It should be noted that the location index information stores the storage location of the data block. After obtaining the target location index information, the storage location of the target data block can be determined based on the target location index information. The data at that storage location can be read and displayed on the first interface, thus realizing the display of the data in the target data block corresponding to the target location index information on the first interface.

[0056] In some embodiments, displaying the data in the target data block corresponding to the target location index information on the first interface may include: determining the starting position of the target data block storage according to a preset file starting position and the target location index information, wherein the target index information is the offset position of the starting position of the target data block storage relative to the starting position of the target file; and displaying the data in the target data block on the first interface according to the starting position of the target data block storage.

[0057] It should be noted that the electronic device can have a preset starting position for storing the target file. The target position index information stores the position offset of the target data block relative to the starting position of the target file. Based on the starting position of the target file and the position offset, the starting position of the target data block can be determined. The data in the target data block can then be displayed on the first interface based on the starting position of the target data block.

[0058] Furthermore, the first interface may also include a second movable control, and the method may further include: detecting a second user operation on the second movable control; and in response to the second user operation, displaying target data corresponding to the position of the second movable control in the first interface, wherein the target data is data in the target data block.

[0059] It should be noted that while the data in the target data block is displayed on the first interface, a second movable control is also displayed on the first interface. Users can perform user operations on the second movable control to view the data in the target data block.

[0060] For example, the second movement control can be a scroll bar or a slider. After the scroll bar is slid, the data in the target data block also slides accordingly, so that the user can view the data at different positions in the target data block.

[0061] For example, in the Trace Tool interface, the location of a data block in the target file can be quickly found based on the scroll bar position. The maximum value corresponding to the scroll bar is the maximum size *i* of the location index file, and each movable position of the scroll bar corresponds to a location index in the location index file. Based on the location index information corresponding to the scroll bar's position, the corresponding target data block is determined, and the data within that target data block is displayed.

[0062] Figure 4 This is a schematic diagram illustrating scroll bar position index information provided in an embodiment of this application. For example... Figure 4 As shown, the scroll bar has i+1 movable positions, each corresponding to the storage location of i+1 data blocks, i.e., i+1 position index information. As the scroll bar slides, it locates the position index information in the position index file, and the value of this position index information records the data block position offset. Based on the preset starting position of the target file and the position offset of the data block corresponding to the scroll bar position, the target data block can be determined, and the data in the target data block is displayed on the first interface. While displaying the data in the target data block on the first interface, users can also move the scroll bar horizontally and vertically to view information about different data within the target data block.

[0063] Using this method, the Trace Tool can quickly locate the start position of the target data block in a binary file. The location of the target data block in the target file does not depend on the data position within the file; instead, it is located based on the data block position. This means that locating any data block is equally fast, transforming the process of locating large amounts of information into locating small amounts of data, thus improving business analysis speed and resolving interface lag issues.

[0064] In some embodiments, when storing large data files, they can be stored in the form of data blocks, that is, the location index information corresponding to each data block can be stored to facilitate data browsing by users.

[0065] Figure 5 This is a flowchart illustrating another file browsing method provided in an embodiment of this application. Figure 2 Based on the illustrated embodiment, before displaying the first interface as described in step 101, the method may further include:

[0066] Step 201: Store the collected data into multiple data blocks.

[0067] Step 202: Generate corresponding location index information according to the size of each data block, and the multiple location index information constitute a location index file.

[0068] It should be noted that the collected data is stored in multiple data blocks, which together form a target file. The starting position of the target file is recorded, and corresponding position index information is generated based on the size of each data block. The position index information is the position offset of the data block relative to the starting position of the target file. Multiple positions index information forms a position index file.

[0069] For example, the system software trace Sys_T packet format saved in the Trace Tool file mainly consists of a protocol header and data. According to the protocol header instructions, the data includes optional data and fixed-length data; therefore, the length of each packet is variable. When writing trace debugging information, the offset position of that information in the target file can be recorded every 200,000 records, thus recording the binary file and its position index information.

[0070] Figure 6 This is a schematic diagram illustrating the structure of location index information provided in an embodiment of this application. For example... Figure 6 As shown, the target file includes i+2 location index entries. The 0th location index entry corresponds to the 0th data block in the target file, and the ith location index entry corresponds to the ith data block. Each data block includes a preset number of data entries. If the last data block does not contain the preset number of data entries, the corresponding (i+1)th file index entry can store the actual number of data entries. Each data entry includes two fields: a protocol header and the data itself.

[0071] In some embodiments, the step 201 of storing the collected data into multiple data blocks may include: recording the number of data entries collected; when the number of data entries collected meets a preset number requirement, the collected data is determined as a data block; and all collected data is determined as multiple data blocks in this manner.

[0072] It should be noted that the preset conditions can be set according to user needs. After all the collected data is divided into multiple data blocks, the data can be located in units of data blocks when viewing the data, which speeds up the viewing process.

[0073] In some embodiments, generating corresponding location index information based on the size of each data block may include: determining the location offset of the data block in the target file based on the size of the data block, wherein the location offset is used to indicate the location offset of the starting position of the data block storage relative to the starting position of the file storage; and generating location index information of the data block based on the location offset.

[0074] It should be noted that the size of each data block is obtained, the position offset is determined based on the size of each data block, and the position index information of the data block is generated based on the position offset. That is, each position index information stores the position offset of the corresponding data block. Based on the starting position and position offset of the target file, the starting position of each data block can be determined. The data can be displayed in the first interface according to the starting position of each data block.

[0075] In some embodiments, the total number of data entries collected can be quickly determined based on location index information. In this embodiment, each data block includes a preset number of data entries, each location index information occupies a preset space size, and the method may further include: obtaining the total number of data entries in the target file based on the size of the location index file, the preset space size occupied by each location index information, the preset number of data entries, and the number of data entries included in the last data block.

[0076] For example, if each location index information occupies 4 bytes of space, the formula for calculating the number of data entries contained in the target file can be: N (total number of data entries) = (L (location index file size) / 4 (each location index information occupies 4 bytes)) * m (number of data entries in each data block) + n0 (number of data entries in the last data block).

[0077] It is understood that the embodiments of this application can implement a method for quickly browsing and locating large and long messages through the Qt development platform, but are not limited to implementing the method in this language. Location index information files can also be generated through QFile, but are not limited to this implementation method.

[0078] The file browsing method proposed in this application divides a large data file of tracking and debugging information into blocks according to the number of records, and saves the position index information of each block. Through this index information, users can quickly browse the data of the data blocks in the file.

[0079] The following describes an exemplary application of the embodiments of this application in a real-world application scenario.

[0080] Figure 7 This is a schematic diagram illustrating the overall flow of a file browsing method provided in an embodiment of this application. For example... Figure 7 As shown, the method includes the following steps 301 to 309:

[0081] Step 301, Load the data file mapping;

[0082] Step 302: Read the location index file;

[0083] Step 303: Map the scrollbar to the position index file;

[0084] Step 304: Determine if the scroll bar has finished scrolling?

[0085] Step 305: If not, determine whether a timed display is required. If yes, proceed to step 306; otherwise, proceed to step 304.

[0086] Step 306: If yes, obtain the position index information of the scroll bar mapping;

[0087] Step 307: Obtain the start position of the data file;

[0088] Step 308: Perform protocol parsing of data blocks based on the start position and position index information of the data file;

[0089] Step 309: Presentation of the data block interface.

[0090] Figure 8 A schematic diagram of the overall process of another file generation method provided in this application embodiment is shown below. Figure 8 As shown, the method includes steps 401-407:

[0091] Step 401: Collect data;

[0092] Step 402: Protocol parsing data;

[0093] Step 403: Determine if the cumulative number of data entries is greater than 200,000. If not, proceed to step 807.

[0094] Step 404: If yes, then read the data file size;

[0095] Step 405: Determine if the data file has been completely written;

[0096] Step 406: If yes, write the location index file;

[0097] Step 407: If not, write the data file.

[0098] The technical solution provided in this application has the following beneficial effects: 1) During business analysis, the data information and file size that developers are interested in are unrelated, successfully breaking down big data business analysis into small data blocks for business analysis, accelerating problem analysis and location, and improving business analysis efficiency. 2) It solves the problem of interface lag during business analysis, reducing the time required for developers to open all big data files from several minutes to seconds. 3) It provides a method for quickly swiping to a location in a big data file. 4) It can quickly calculate the total number of data entries in a file.

[0099] It should be understood that, although Figure 1 , Figure 2 , Figure 5 , Figure 7 and Figure 8 The steps in the flowchart are shown sequentially as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order in which these steps are executed, and they can be performed in other orders. Furthermore, the flowchart... Figure 1 , Figure 2 , Figure 5 , Figure 7 and Figure 8 At least some of the steps in the process may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed 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 some of the sub-steps or stages of other steps.

[0100] Based on the foregoing embodiments, this application provides a file browsing device. The modules and units included in the device can be implemented by a processor; of course, they can also be implemented by specific logic circuits. In the implementation process, the processor can be a central processing unit (CPU), a microprocessor (MPU), a digital signal processor (DSP), or a field-programmable gate array (FPGA), etc.

[0101] Figure 9 This is a schematic diagram of the structure of a file browsing device provided in an embodiment of this application, as shown below. Figure 9 As shown, the device 500 includes an interface display module 501, a control movement module 502, and a file display module 503, wherein:

[0102] The interface display module 501 is used to display a first interface, the first interface including a first movable control, and the first interface is used to view data in the target file;

[0103] The control movement module 502 is used to receive a first user operation and control the movement of the first movable control according to the first user operation.

[0104] The file display module 503 is used to display data of a data block at a corresponding position in the first interface according to the position of the first movable control after it has been moved. The data block at the corresponding position is one of a plurality of data blocks included in the target file, and the plurality of positions that the first movable control can move correspond to the storage positions of the plurality of data blocks.

[0105] In some embodiments, the file display module 503 includes a position determination unit, an information acquisition unit, and a data display unit, wherein: the position determination unit is used to determine the position of the first movable control after movement; the information acquisition unit is used to determine target position index information based on the position of the first movable control and a preset correspondence, wherein the preset correspondence is a correspondence between multiple movable positions of the first movable control and multiple position index information included in a position index file, wherein the multiple position index information is information recording the positions of multiple data blocks in the target file; and the data display unit is used to display data in the target data block corresponding to the target position index information on the first interface.

[0106] In this embodiment, the problematic data location can be quickly located when a user browses a large data file, which speeds up the user's problem analysis and improves the user experience.

[0107] The descriptions of the above device embodiments are similar to those of the above method embodiments, and have similar beneficial effects. For technical details not disclosed in the device embodiments of this application, please refer to the descriptions of the method embodiments of this application for understanding.

[0108] It should be noted that, in the embodiments of this application... Figure 9 The module division of the file browsing device shown is illustrative and represents only one logical functional division; in actual implementation, other division methods may be used. Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, exist as separate physical units, or be integrated into one unit by two or more units. The integrated units described above can be implemented in hardware, as software functional units, or in a combination of software and hardware.

[0109] It should be noted that, in the embodiments of this application, if the above-described methods are implemented as software functional modules and sold or used as independent products, they can also be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, or the parts that contribute to related technologies, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause an electronic device to execute all or part of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), magnetic disks, or optical disks. Thus, the embodiments of this application are not limited to any specific hardware and software combination.

[0110] This application provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the file browsing method provided in the above embodiments.

[0111] The aforementioned computer-readable storage medium may be any combination of one or more computer-readable media. A computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium may be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM) or flash memory, optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this document, a computer-readable storage medium may be any tangible medium that contains or stores a program that may be used by or in connection with an instruction execution system, apparatus, or device.

[0112] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including—but not limited to—electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, capable of transmitting, propagating, or transmitting programs for use by or in connection with an instruction execution system, apparatus, or device.

[0113] Program code contained on a computer-readable medium may be transmitted using any suitable medium, including—but not limited to—wireless, wire, optical fiber, radio frequency (RF), etc., or any suitable combination thereof.

[0114] Computer program code for performing the operations described herein can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as C or similar languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0115] This application provides a computer program product containing instructions that, when run on a computer, causes the computer to execute the steps in the file browsing method provided in the above-described method embodiments.

[0116] Those skilled in the art will understand that Figure 9 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0117] It should be noted that the descriptions of the above storage medium and program product embodiments are similar to the descriptions of the above method embodiments, and have similar beneficial effects. For technical details not disclosed in the storage medium and program product embodiments of this application, please refer to the descriptions of the method embodiments of this application for understanding.

[0118] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. The embodiments described above are merely illustrative. For example, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods, such as: multiple modules or components can be combined, or integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the various components shown or discussed can be through some interfaces, and the indirect coupling or communication connection between devices or modules can be electrical, mechanical, or other forms.

[0119] The modules described above as separate components may or may not be physically separate. The components shown as modules may or may not be physical modules. They may be located in one place or distributed across multiple network units. Some or all of the modules may be selected to achieve the purpose of this embodiment according to actual needs.

[0120] In addition, each functional module in the various embodiments of this application can be integrated into one processing unit, or each module can be a separate unit, or two or more modules can be integrated into one unit; the integrated modules can be implemented in hardware or in the form of hardware plus software functional units.

[0121] If the integrated unit is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, or the parts that contribute to related technologies, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause an electronic device to execute all or part of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, ROMs, magnetic disks, or optical disks.

[0122] The methods disclosed in the several method embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments.

[0123] The features disclosed in the several product embodiments provided in this application can be arbitrarily combined without conflict to obtain new product embodiments.

[0124] The features disclosed in the several method or device embodiments provided in this application can be arbitrarily combined without conflict to obtain new method or device embodiments.

[0125] The above description is merely an embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method for browsing files, characterized in that, Applied to electronic devices, the method includes: The collected data is stored in multiple data blocks; Based on the size of each data block, corresponding location index information is generated, and multiple location index information constitutes a location index file; Display a first interface, the first interface including a first movable control, the first interface being used to view data in the target file; Receive a first user operation, and control the first movable control to move according to the first user operation; Based on the position of the first movable control after movement and multiple position index information, the data in the target data block corresponding to the target position index information is displayed in the first interface. The target data block is one of multiple data blocks included in the target file. The multiple positions that the first movable control can move correspond to the storage positions of the multiple data blocks. The multiple position index information is information that records the positions of multiple data blocks in the target file. The target position index information is the offset of the starting position of the target data block relative to the starting position of the target file.

2. The method according to claim 1, characterized in that, The step of displaying the data block at the corresponding position in the first interface based on the position of the moved first movable control includes: Determine the position of the first movable control after it has been moved; The target location index information is determined based on the location of the first movable control and a preset correspondence. The preset correspondence is the correspondence between multiple movable locations of the first movable control and the multiple location index information included in the location index file. The first interface displays the data in the target data block corresponding to the target location index information.

3. The method according to claim 2, characterized in that, Determining the position of the first movable control after movement includes: Determine the destination location corresponding to the first user operation; Based on the target location and multiple location segments, determine the target location segments; The target movable position corresponding to the target position segment is determined as the position of the first movable control, and the multiple position segments correspond one-to-one with the multiple movable positions.

4. The method according to claim 3, characterized in that, Determining the destination location corresponding to the first user operation includes: When the first movable control is in a stationary state, the stationary position of the first movable control is determined as the target position; or, When the first movable control is in a moving state, if the time interval between the current time and the last time the target location was obtained reaches a preset time, the position of the first movable control at the current time is obtained as the target location.

5. The method according to claim 2, characterized in that, The step of displaying the data in the target data block corresponding to the target location index information on the first interface includes: The starting position of the target data block is determined based on the preset starting position of the target file and the target position index information; The data in the target data block is displayed on the first interface according to the starting position of the target data block storage.

6. The method according to claim 1, characterized in that, The first user operation includes a swipe operation, the first movable control includes a scroll bar, and the step of controlling the movement of the first movable control according to the first user operation includes: The distance slid by the sliding operation controls the movement of the scroll block in the scroll bar by a corresponding distance.

7. The method according to claim 1, characterized in that, The first interface further includes a second movable control, and the method further includes: Detect a second user interaction with the second movable control; In response to the second user operation, target data corresponding to the position of the second movable control is displayed on the first interface, wherein the target data is the data in the target data block.

8. The method according to claim 1, characterized in that, The process of storing the collected data into multiple data blocks includes: Record the number of data entries collected. When the number of data entries collected meets the preset requirement, the collected data is defined as a data block. In this way, all the collected data is defined as multiple data blocks.

9. The method according to claim 1, characterized in that, The step of generating corresponding location index information based on the size of each data block includes: The position offset of the data block in the target file is determined based on the size of the data block. The position offset is used to indicate the position offset of the starting position of the data block relative to the starting position of the target file. The location index information of the data block is generated based on the location offset.

10. The method according to claim 1, characterized in that, Each data block includes a preset number of data entries, and each location index occupies a preset space size. The method further includes: The total number of data entries in the target file is obtained based on the size of the location index file, the preset space size occupied by each location index information, the preset number of entries, and the number of data entries included in the last data block.

11. A file browsing device, characterized in that, include: The file display module is used to store the collected data into multiple data blocks; Additionally, corresponding location index information is generated based on the size of each data block, and multiple locations index information constitute a location index file; An interface display module is used to display a first interface, the first interface including a first movable control, the first interface being used to view data in a target file; The control movement module is used to receive a first user operation and control the movement of the first movable control according to the first user operation. The file display module is further configured to display data in a target data block corresponding to the target location index information in the first interface based on the position of the first movable control after it has been moved and multiple location index information. The target data block is one of multiple data blocks included in the target file. The multiple positions that the first movable control can move correspond to the storage positions of the multiple data blocks. The multiple location index information is information that records the positions of multiple data blocks in the target file. The target location index information is the offset of the starting position of the target data block relative to the starting position of the target file.

12. An electronic device comprising a memory and a processor, the memory storing a computer program executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the file browsing method according to any one of claims 1 to 10.

13. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program implements the steps of the file browsing method as described in any one of claims 1 to 10.

Citation Information

Patent Citations

  • Large data volume information storage and access method

    CN102841860A

  • Information browsing method and system

    CN104063120A

  • Application of paging to a dataset, graphical display window and graphical scrollbar grip

    US20060107230A1