Data loading method and device, equipment, storage medium and program product
By using idle containers to load and adjust layer positions in electronic devices, the problem of memory overflow is solved and the stability and user experience of the system during multi-layer operations are improved.
Patent Information
- Application Number
- CN202410725370.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-05
- Publication Date
- 2024-08-23
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The memory of electronic devices is limited. When users frequently open content involving multiple levels, it is easy to cause memory overflow and then cause a system crash.
By responding to user operations, use the lowest container in the idle state among at least two containers to load object data, adjust its hierarchical position to the uppermost layer, and then delete the object data in the lowest container to ensure that the container is idle and avoid memory overflow. .
It effectively avoids memory overflow, improves data loading speed and user experience, and ensures the stability of the system during multi-level operations.
Smart Images

Figure CN118535342A
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, specifically to the field of data processing technology, and in particular to a data loading method, device, electronic device, computer-readable storage medium, and computer program product. Background Art
[0002] The memory of electronic devices is limited. If the content that the user wants to view involves many levels, the user needs to perform more opening operations, and the opened content will occupy more memory, which can easily lead to memory overflow. Summary of the invention
[0003] The embodiments of the present disclosure provide a data loading method, device, electronic device, computer-readable storage medium, and computer program product, which can avoid memory overflow.
[0004] In a first aspect, an embodiment of the present disclosure proposes a data loading method, including: in response to obtaining a first open operation, using a bottom-level container in an idle state among at least two containers to load object data corresponding to the first open operation, and adjusting the hierarchical position of the bottom-level container to the top-level, deleting the object data in the bottom-level container of the at least two containers after the adjustment, and using the top-level container of the at least two containers before the adjustment to load the object data corresponding to the preceding open operation of the first open operation.
[0005] In a second aspect, an embodiment of the present disclosure proposes a data loading device, including: a first processing module, configured to, in response to obtaining a first opening operation, use the bottommost container in an idle state among at least two containers to load object data corresponding to the first opening operation, and adjust the hierarchical position of the bottommost container to the topmost. A second processing module, configured to delete the object data in the bottommost container among the at least two containers after adjustment. The topmost container among the at least two containers before adjustment is used to load the object data corresponding to the preceding opening operation of the first opening operation;
[0006] In a third aspect, an embodiment of the present disclosure provides an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that when the at least one processor executes, it can implement the data loading method described in any implementation method in the first aspect.
[0007] In a fourth aspect, an embodiment of the present disclosure provides a non-transitory computer-readable storage medium storing computer instructions, which are used to enable a computer to implement the data loading method described in any implementation method of the first aspect when executed.
[0008] In a fifth aspect, an embodiment of the present disclosure provides a computer program product comprising a computer program, which, when executed by a processor, can implement the data loading method described in any implementation manner in the first aspect.
[0009] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] Other features, objects and advantages of the present disclosure will become more apparent from the detailed description of non-limiting embodiments made with reference to the following drawings:
[0011] Figure 1 is an exemplary system architecture in which the present disclosure may be applied;
[0012] Figure 2a A flowchart of a data loading method provided in an embodiment of the present disclosure;
[0013] Figure 2b A schematic diagram of at least two containers provided for embodiments of the present disclosure;
[0014] Figure 2c A schematic diagram of another data loading method provided by an embodiment of the present disclosure;
[0015] Figure 3 A flowchart of another data loading method provided in an embodiment of the present disclosure;
[0016] Figure 4 A schematic diagram of an application scenario provided by an embodiment of the present disclosure;
[0017] Figure 5 A structural block diagram of a data loading device provided in an embodiment of the present disclosure;
[0018] Figure 6 A schematic diagram of the structure of an electronic device suitable for executing a data loading method provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0019] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description. It should be noted that the embodiments in the present disclosure and the features in the embodiments may be combined with each other without conflict.
[0020] In the technical solution of the present disclosure, the collection, storage, use, processing, transmission, provision and disclosure of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0021] Figure 1 An exemplary system architecture 100 is shown to which embodiments of the data loading method, apparatus electronic device, computer-readable storage medium, and computer program product of the present disclosure can be applied.
[0022] like Figure 1 As shown, the system architecture 100 may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0023] Users can use terminal devices 101, 102, 103 to interact with server 105 through network 104 to receive or send messages, etc. Terminal devices 101, 102, 103 and server 105 can be installed with various applications for realizing information communication between the two, such as data loading applications, instant messaging applications, etc.
[0024] Terminal devices 101, 102, 103 and server 105 can be hardware or software. When terminal devices 101, 102, 103 are hardware, they can be various electronic devices with display screens, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, etc.; when terminal devices 101, 102, 103 are software, they can be installed in the electronic devices listed above, which can be implemented as multiple software or software modules, or as a single software or software module, and no specific limitation is made here. When server 105 is hardware, it can be implemented as a distributed server cluster composed of multiple servers, or as a single server; when the server is software, it can be implemented as multiple software or software modules, or as a single software or software module, and no specific limitation is made here.
[0025] Terminal devices 101, 102, and 103 can provide various services through various built-in applications. Taking a data loading application that can provide data loading services as an example, terminal devices 101, 102, and 103 can achieve the following effects when running the data loading application: in response to a first opening operation, the bottommost container in at least two containers that is in an idle state is used to load the object data corresponding to the first opening operation, and the hierarchical position of the bottommost container is adjusted to the topmost layer, and the object data in the bottommost container of the at least two containers after the adjustment is deleted, and the topmost container of the at least two containers before the adjustment includes the object data corresponding to the previous opening operation of the first opening operation.
[0026] It should be noted that, in addition to being obtained from the server 105 through the network 104, object data (such as data in a file directory, etc.) can also be pre-stored in the terminal devices 101, 102, and 103 in various ways. Therefore, when the terminal devices 101, 102, and 103 detect that such data have been stored locally (for example, starting to process previously stored data), they can choose to directly obtain such data locally. In this case, the exemplary system architecture 100 may also not include the server 105 and the network 104.
[0027] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0028] Optionally, the method provided by the embodiment of the present disclosure may be applicable to, but not limited to, a scenario of a file list frame with left and right entry and exit animations.
[0029] Please refer to Figure 2a , Figure 2a A flow chart of a data loading method provided in an embodiment of the present disclosure, wherein process 200a includes the following steps:
[0030] Step 201a: In response to obtaining the first open operation, use the bottommost container in the at least two containers that is in an idle state to load the object data corresponding to the first open operation, and adjust the hierarchical position of the bottommost container to the topmost layer.
[0031] In this embodiment, the execution subject may, in response to the first opening operation, use the bottommost container in the at least two containers that is in an idle state to load the object data corresponding to the first opening operation, and adjust the hierarchical position of the bottommost container to the topmost.
[0032] Exemplarily, the topmost container of the at least two containers before adjustment can be used to load object data corresponding to a preceding opening operation of the first opening operation. Optionally, the preceding opening operation may include one or more preceding opening operations, or a previous opening operation.
[0033] For example, the uppermost container of the at least two containers before the adjustment may include object data corresponding to an opening operation that was a previous opening operation of the first opening operation.
[0034] Optionally, the container may be an area or storage area pre-set in the memory for loading object data. The container at the top level may refer to the container corresponding to the page displayed by the execution subject, and the page corresponding to the container at the bottom level may be hidden under or after the page corresponding to the container at the top level, and may be displayed or not.
[0035] Exemplarily, before obtaining the first open operation, the at least two containers may include a first container and a second container. The first container has loaded object data corresponding to the preceding open operation of the first open operation, the second container is in an idle state, the hierarchical position of the first container is the top layer, and the hierarchical position of the second container is the bottom layer.
[0036] Combination Figure 2b Before executing the above step 201a (before adjustment), the hierarchical position of the first container is the top layer, the hierarchical position of the second container is the bottom layer, the first container has loaded the object data corresponding to the previous opening operation of the first opening operation, and the second container is in an idle state. After executing the above step 201a (after adjustment), the object data corresponding to the first opening operation is loaded using the second container, and the second container is adjusted to the top layer.
[0037] Alternatively, being in an idle state may mean that no data is loaded.
[0038] Optionally, the opening operation may be an opening operation performed on a certain object. For example, the opening operation may be an opening operation performed by a user on a certain object on the interface of the execution subject.
[0039] Optionally, the object may include, but is not limited to, one or more of the following: a folder (also referred to as a file directory or a folder directory), a picture, and a video. The operation object of the open operation may include, but is not limited to, a folder, a picture, and a video. The data loading method provided in the embodiment of the present disclosure is applicable to data loading in various scenarios, and can reduce the memory used for data loading in various scenarios.
[0040] In a possible embodiment, the first opening operation may be used to open a first folder, and a preceding opening operation of the first opening operation is used to open a parent folder of the first folder.
[0041] For example, the first open operation may be an open operation on a first folder (or a first file directory), and the preceding open operation of the first open operation may be an open operation on a parent folder of the first folder. The preceding open operation of the first open operation may include at least the previous open operation of the first open operation, so that memory overflow can be avoided when the number of levels of opened objects increases.
[0042] Optionally, the previous opening operation of the first opening operation may be an opening operation on a certain object, and the first opening operation may be an opening operation on a sub-object of the object.
[0043] In a possible embodiment, the data loading method provided by the embodiment of the present disclosure may further include: displaying a page corresponding to the topmost container of the at least two containers.
[0044] In this embodiment, the execution entity may display a page corresponding to the topmost container of the at least two containers.
[0045] Combination Figure 2b Before executing the above step 201a (before adjustment), the execution subject displays the page corresponding to the first container, and the page corresponding to the first container includes the object corresponding to the previous opening operation of the first opening operation. After executing the above step 201a (after adjustment), the execution subject displays the page corresponding to the second container, and the page corresponding to the second container includes the object corresponding to the first opening operation. The page can be opened.
[0046] Optionally, the embodiment of the present disclosure does not limit the execution subject to use the bottommost container in the at least two containers that is in an idle state to load the object data corresponding to the first open operation and the execution subject to adjust the hierarchical position of the bottommost container to the order of the topmost container.
[0047] Step 202a: Delete the object data in the lowermost container of the at least two containers after adjustment.
[0048] In this embodiment, the execution subject may delete the object data in the lowermost container of the at least two containers after adjustment.
[0049] For example, after adjusting the hierarchical position of the bottommost container to the topmost layer, at least two adjusted containers are obtained, and the execution subject may set the bottommost container of the at least two adjusted containers to an idle state.
[0050] Combination Figure 2b The lowermost container among the at least two containers after adjustment may be the first container or other containers.
[0051] For example, when the at least two containers include only the first container and the second container, the bottommost container is the first container. Assuming that the previous open operation of the first open operation is to open file directory 1, and the first container has loaded the data of file directory 1, the above execution subject can delete the data of file directory 1 in the first container and set the first container to be empty.
[0052] In a possible embodiment, the at least two containers further include an intermediate container, and the hierarchical position of the intermediate container is located at a level below the uppermost container of the at least two containers. Optionally, the intermediate container can be used to load object data corresponding to the second open operation, and the second open operation can be a preceding open operation corresponding to the open operation of the uppermost container.
[0053] For example, combined with Figure 2b Before executing the above step 201a (before adjustment), the intermediate container is at the next level of the first container. Assuming that the first container has loaded the object data corresponding to the previous opening operation of the first opening operation, the intermediate container can load the object data corresponding to the second opening operation before the first opening operation. In this way, when you want to return to the previous page from the page corresponding to the first container, you can directly display the page corresponding to the intermediate container, making the return smoother.
[0054] In a possible embodiment, after the hierarchical position of the lowermost container is adjusted to the uppermost layer, the lowermost container of the at least two containers is the middle container.
[0055] For example, combined with Figure 2b After executing step 201a (after adjustment), the bottommost container is the intermediate container. The intermediate container may have loaded the object data corresponding to the second operation before the first opening operation. The execution subject may delete the object data in the intermediate container and set the intermediate container to empty.
[0056] By deleting the object data in the bottom container of the at least two adjusted containers, it is ensured that the bottom container is idle. In this way, when there is a new open operation (an open operation after the first open operation), the idle bottom container is used to load the data corresponding to the new open operation, which can improve the loading speed, so that the page display is smoother and the user experience is higher.
[0057] Optionally, the number of the intermediate containers included in the at least two containers may be one or more. For example, the intermediate container 1 is located in a layer below the uppermost container in the at least two containers, and the intermediate container 2 is located in a layer below the uppermost container in the at least two containers.
[0058] For example, in the file list scenario, in response to the user opening a new folder (also known as a folder directory), the electronic device adds a new fragment, which is used to load the data of the new folder. As the user opens more folders, the memory occupied by the opened folders will increase, which may cause the application to crash due to insufficient memory (OOM), resulting in a system crash.
[0059] The data loading method provided by the embodiment of the present disclosure uses the idle container at the bottom layer to load the object data corresponding to the new open operation after obtaining a new open operation, and moves the container at the bottom layer to the top layer, and deletes the object data in the newly obtained container at the bottom layer, so that the memory occupied by the opened objects can be prevented from increasing, and memory overflow can be avoided. In addition, using the idle container to load the object data corresponding to the new open operation can also load new data more quickly, thereby displaying new pages more quickly, which can improve user experience.
[0060] Please refer to Figure 2c , Figure 2c This is a flowchart of another data loading method provided by an embodiment of the present disclosure, wherein process 200c includes the following steps 201c to 204c.
[0061] Step 201c: Create at least two containers.
[0062] In this embodiment, the execution entity may create at least two containers.
[0063] Optionally, at least two containers may be pre-set in the memory. The creation of at least two containers may be performed before the execution subject obtains the open operation, or the first open operation triggers the creation of at least two containers. The present disclosure does not limit the specific execution time of creating at least two containers, as long as data loading can be achieved.
[0064] Optionally, the at least two containers may include a container at the top layer and a container at the bottom layer, and may also include one or more intermediate layer containers, such as an intermediate container, which is located at a layer below the top layer container.
[0065] In this way, by performing operations such as opening based on at least two created containers, even if objects of more levels need to be opened, there is no need to add new containers. This makes it possible to control memory without limiting the level of objects opened, thereby avoiding memory overflow.
[0066] Step 202c: in response to obtaining the first open operation, use the bottommost container in the at least two containers that is in an idle state to load the object data corresponding to the first open operation, and adjust the hierarchical position of the bottommost container to the topmost layer.
[0067] The above step 202c is similar to the Figure 2a The same as step 201a shown, please refer to the corresponding part above for the same content, which will not be repeated here.
[0068] Exemplarily, if the open operation is the initial (or first) open operation for an object (the object is not a child of any other object), in response to obtaining the initial open operation, the bottommost container in the at least two containers that is in an idle state can be used to load the object data corresponding to the initial open operation, and the hierarchical position of the bottommost container can be adjusted to the topmost layer; or, in response to obtaining the initial open operation, the topmost container in the at least two containers that is in an idle state can be used to load the object data corresponding to the initial open operation.
[0069] Step 203c: Delete the object data in the lowermost container of the at least two containers after adjustment.
[0070] The above step 203c is similar to Figure 2a The same as step 202a shown, please refer to the corresponding part above for the same content, and will not be repeated here.
[0071] Step 204c: In response to obtaining the open operation, the object identifier corresponding to the open operation and the open order corresponding to the open operation are saved in the first information.
[0072] In this embodiment, the execution subject may save the object identifier corresponding to the opening operation and the opening order corresponding to the opening operation into the first information in response to obtaining the opening operation.
[0073] Optionally, the first information may be used to indicate the identifiers of opened objects and the order in which the opened objects are opened (ie, the order in which the opening operations correspond to the opening operations).
[0074] The disclosed embodiment does not limit the steps of saving the object identifier corresponding to the open operation and the open order corresponding to the open operation to the first information, using the bottommost container in an idle state among at least two containers to load the object data corresponding to the open operation, and adjusting the hierarchical position of the bottommost container to the execution order between the topmost containers.
[0075] Optionally, the opening operation may be any opening operation, such as the first opening operation, a preceding opening operation of the first opening operation, a subsequent opening operation of the first opening operation, etc.
[0076] Exemplarily, in response to open operation 0, the object identifier corresponding to open operation 0 and the opening sequence corresponding to open operation 0 are saved in the first information. In response to open operation 1, the object identifier corresponding to open operation 1 and the opening sequence corresponding to open operation 1 are saved in the first information. After receiving these two open operations, the first information includes the object identifier corresponding to open operation 0, the opening sequence corresponding to open operation 0, the object identifier corresponding to open operation 1, and the opening sequence corresponding to open operation 1.
[0077] Optionally, the first information may be recorded in the form of a list. Exemplarily, the first information includes object identifiers arranged in the order of opening. For example, the first information includes the object identifier corresponding to the opening operation 0 and the object identifier corresponding to the opening operation 1, which may indicate that the opening order corresponding to the opening operation 0 is before the object corresponding to the opening operation 1. The above-mentioned execution subject may save the object identifiers corresponding to the opening operations into the first information in the order of opening.
[0078] In this way, by using the first information to record the opened objects and the opening order, even if the object data in the adjusted bottom-level container is deleted, it is still possible to obtain which objects were previously opened and the opening order.
[0079] In a possible embodiment, the method provided by the embodiment of the present disclosure may further include: in response to obtaining a page switching operation, displaying a page corresponding to the topmost container and / or a page corresponding to the bottommost container.
[0080] In this embodiment, the execution subject may display a page corresponding to the topmost container and / or a page corresponding to the bottommost container in response to obtaining a page switching operation.
[0081] Exemplarily, the page switching operation may refer to switching between open pages.
[0082] Optionally, the page corresponding to the bottom-level container is empty. During the page switching process (for example, during the process of selecting the page you want to switch to), the page corresponding to the top-level container and the bottom-level empty page can be displayed at the same time. If the page switching operation indicates switching to the bottom-level page, the page corresponding to the bottom-level container is displayed. If the page switching operation indicates switching to the top-level page, the page corresponding to the top-level container is displayed. The content displayed on the page may include the object corresponding to the corresponding open operation.
[0083] Optionally, if the at least two containers include an intermediate container, in response to obtaining a page switching operation, a page corresponding to the intermediate container may also be displayed.
[0084] In this way, the bottom container is empty, the page corresponding to the bottom container is empty, and the bottom container is reserved to load the object data corresponding to the next open operation, so that data can be loaded quickly while controlling the memory.
[0085] Optionally, the method provided by the embodiment of the present disclosure may further include: the execution subject displays the page corresponding to the intermediate container in response to obtaining an operation of switching from the page corresponding to the topmost container to the page corresponding to the intermediate container. In this way, the target page to be switched can be displayed.
[0086] Please refer to Figure 3 , Figure 3 This is a flowchart of another data loading method provided by an embodiment of the present disclosure, wherein process 300 includes the following steps 301 to 303.
[0087] Step 301: In response to obtaining a return operation for a currently opened object, use the current bottom-level container to load data of a first object.
[0088] In this embodiment, the execution subject may load the data of the first object using the current bottom-level container in response to a return operation on the currently opened object.
[0089] Optionally, the first object may be obtained from the first information based on the object identifier of the object data in the current top container and the hierarchical order of the current bottom container, and the first information may be used to indicate the object identifier of the opened object and the opening order of the opened object.
[0090] Exemplarily, the first object may be obtained from the first information based on the object identifier of the object data in any container and the hierarchical order of the container into which the first object data needs to be loaded, and it is sufficient to obtain the first object.
[0091] Optionally, the data of the first object may be obtained locally by the execution entity based on the identifier of the first object, or may be obtained from other devices, such as a server.
[0092] Step 302: Delete the object data in the current top-level container, and adjust the hierarchical position of the current top-level container to the bottom level.
[0093] In this embodiment, the execution subject may delete the object data in the current top-level container and adjust the hierarchical position of the current top-level container to the bottom-level.
[0094] Optionally, the embodiment of the present disclosure does not limit the execution order of using the current bottom-level container to load the data of the first object, deleting the object data in the current top-level container, and adjusting the hierarchical position of the current top-level container to the bottom-level.
[0095] For example, take the case where the execution subject receives a return operation after receiving the open operation 0 and the open operation 1, and at least two containers include two containers (for example, container 1 is at the top layer and container 2 is at the bottom layer). The first information includes the object identifier corresponding to the open operation 0, the open order corresponding to the open operation 0 is the first, and the object identifier corresponding to the open operation 1 and the open order corresponding to the open operation 1 are the second. The object identifier corresponding to the data in the current top container (container 1) is the object identifier corresponding to the open operation 1, and the hierarchical position of the current bottom container (container 2) is the second. Then, the identifier of the first object is the previous object identifier of the object identifier corresponding to the open operation 1 in the first information, that is, the object identifier corresponding to the open operation 0. Afterwards, container 2 is used to load the object data corresponding to the open operation 0, the data in container 1 is deleted, and the hierarchical position of container 1 is adjusted to the bottom layer. In this way, the execution subject returns from the page displaying the object corresponding to the open operation 1 to the page displaying the object corresponding to the open operation 0, thereby realizing the page return.
[0096] In some embodiments, at least two containers include an intermediate container. In response to the opening operation, after the hierarchical position of the current topmost container is adjusted to the bottommost layer, the intermediate container becomes the new topmost container, and the object corresponding to the data loaded in the intermediate container is directly displayed, which can prevent the occurrence of a jamming phenomenon. Optionally, after the hierarchical position of the current topmost container is adjusted to the bottommost layer, the current bottommost container after the data of the first object is loaded in step 301 becomes the new middle-layer container, in preparation for the subsequent display return, which can prevent the occurrence of a jamming phenomenon.
[0097] In this way, in response to the return operation for the currently opened object, the data of the first object is loaded using the current bottom-level container, the object data in the current top-level container is deleted, and the hierarchical position of the current top-level container is adjusted to the bottom level, thereby realizing page return.
[0098] In a possible embodiment, the method provided by the embodiment of the present disclosure may further include: deleting the object identifier corresponding to the return operation on the currently opened object in the first information.
[0099] In this embodiment, the execution subject may delete the object identifier corresponding to the return operation on the currently opened object in the first information.
[0100] For example, assuming that the first information uses a list to indicate the opened object identifiers and the opening order of the opened objects, and the first information includes the object identifiers arranged in the opening order, the corresponding opening order can be deleted while deleting the object identifier corresponding to the return operation for the currently opened object in the first information.
[0101] For another example, continuing with the example below step 302 above, the object identifier corresponding to the open operation 1 and the open order corresponding to the open operation 1, which is 2nd, in the first information are deleted, and the first information obtained after the deletion includes the object identifier corresponding to the open operation 0 and the open order corresponding to the open operation 0, which is 1st.
[0102] In this way, deleting the identifier and opening order of the object returned in the first information can achieve rapid and accurate retrieval of the first object loaded into the bottom-level container from the first information when a new return operation is subsequently received, thereby increasing the data loading rate and improving the user experience.
[0103] Optionally, the embodiment of the present disclosure does not limit the execution timing of deleting the object identifier corresponding to the return operation on the currently opened object in the first information, and the deletion can be performed in response to the return operation.
[0104] In a possible embodiment, the method provided by the embodiment of the present disclosure may further include: displaying a page corresponding to the topmost container of the at least two containers.
[0105] In this embodiment, the execution entity may display a page corresponding to the topmost container of the at least two containers.
[0106] Optionally, the new topmost container may be obtained based on adjusting the hierarchical position of the current topmost container to the bottommost container in step 302 .
[0107] Exemplarily, in step 302, the execution subject adjusts the hierarchical position of the current top-level container to the bottom level, obtains a new top-level container, displays the object corresponding to the loaded data of the new top-level container, or displays the page corresponding to the new top-level container, and realizes page return.
[0108] Figure 3 The steps involved in the method shown can be the same as those described above. Figure 2a , Figure 2c The steps provided in any of the above possible embodiments are used in combination, and the execution order is not limited, as long as data loading can be achieved. For example, Figure 3 The steps shown are the same as above Figure 2a When the steps shown are used in combination, they may be performed before step 201a or after step 202a.
[0109] To facilitate understanding, an application scenario in which the data loading method of the embodiment of the present disclosure can be implemented is provided below.
[0110] Take creating three containers as an example. Figure 4In (a), it is assumed that four folders d1, d2, d3 and d4 are currently opened in sequence. The first information includes the identifiers of the four folders and the order in which they are opened. The top container (container a) loads the data corresponding to folder d4, the container under the top container (container b) loads the data corresponding to folder d3, and the bottom container (container c) is empty, and the page corresponding to container a is displayed.
[0111] In response to the operation of opening the folder d5, Figure 4 From (a) to (b), the identifier and opening order of the folder d5 are added to the first information, the data of the folder d5 is loaded using the container c, and the container c is moved to the top layer, the data of the folder d3 loaded in the new bottom layer container b is deleted, and the page corresponding to the top layer container c is displayed, that is, the folder d5 is displayed.
[0112] In response to the operation of closing the folder d5 (or the return operation performed in the folder d5), the Figure 4 From (b) to (c) in the first information, the identifier and opening order of the folder d5 added in the first information are deleted, container c is moved to the bottom layer and the data in container c is deleted, container a automatically becomes the top layer, and the folder d4 loaded in container a is directly displayed, which can prevent the occurrence of stuck phenomenon. Based on the hierarchical sorting of the folder d4 loaded in container a and container b, the first object identifier d3 is obtained, and the data of the folder d3 is loaded into container b.
[0113] Further references Figure 5 As an implementation of the methods shown in the above figures, the present disclosure provides an embodiment of a data loading device. The device embodiment corresponds to the above method embodiment, and the device can be specifically applied to various electronic devices.
[0114] like Figure 5 As shown, the data loading device 500 of this embodiment may include: a first processing module 501 and a second processing module 502. The first processing module 501 is configured to, in response to obtaining a first open operation, use the bottommost container in an idle state among at least two containers to load object data corresponding to the first open operation, and adjust the hierarchical position of the bottommost container to the topmost. The topmost container among the at least two containers before the adjustment is used to load object data corresponding to the preceding open operation of the first open operation. The second processing module 502 is configured to delete the object data in the bottommost container among the at least two containers after the adjustment.
[0115] In this embodiment, in the data loading device 500, the specific processing of the first processing module 501 and the second processing module 502 and the technical effects thereof can be referred to in Figure 2aThe relevant descriptions of steps 201a-202a in the corresponding embodiment are not repeated here.
[0116] In some optional implementations of this embodiment, at least two containers further include an intermediate container, the hierarchical position of the intermediate container is located at a layer below the topmost container of the at least two containers, the intermediate container is used to load object data corresponding to the second open operation, and the second open operation is a preceding open operation of the open operation corresponding to the topmost container.
[0117] In some optional implementations of this embodiment, the third processing module is configured to, in response to obtaining a return operation for the currently opened object, use the current bottom-level container to load the data of the first object. The first object is obtained from the first information based on the object identifier of the object data in the current top-level container and the hierarchical order of the current bottom-level container, and the first information is used to indicate the object identifier of the opened object and the opening order of the opened object. The fourth processing module is configured to delete the object data in the current top-level container and adjust the hierarchical position of the current top-level container to the bottom level.
[0118] In some optional implementations of this embodiment, the deletion module is configured to delete the object identifier corresponding to the return operation on the currently opened object in the first information.
[0119] In some optional implementations of this embodiment, the first display module is configured to display a page corresponding to the topmost container of the at least two containers.
[0120] In some optional implementations of this embodiment, the second display module is configured to display the page corresponding to the topmost container and / or the page corresponding to the bottommost container in response to obtaining a page switching operation, and the page corresponding to the bottommost container is empty.
[0121] In some optional implementations of this embodiment, the creation module is configured to create at least two containers, where the at least two containers include a container at the top layer and a container at the bottom layer.
[0122] In some optional implementations of this embodiment, the saving module is configured to save the object identifier corresponding to the opening operation and the opening order corresponding to the opening operation to the first information in response to obtaining the opening operation.
[0123] In some optional implementations of this embodiment, the operation object of the open operation includes a folder.
[0124] In some optional implementations of this embodiment, the first opening operation is used to open a first folder, and a preceding opening operation of the first opening operation is used to open a parent folder of the first folder.
[0125] This embodiment exists as a device embodiment corresponding to the above-mentioned method embodiment. The technical effects brought about by the embodiments involving the data loading device provided by this embodiment can be referred to the corresponding relevant instructions in the above-mentioned method embodiment respectively, and will not be repeated here.
[0126] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the data loading method described in any of the above embodiments can be implemented when the at least one processor executes.
[0127] According to an embodiment of the present disclosure, the present disclosure further provides a readable storage medium, which stores computer instructions, and the computer instructions are used to enable a computer to implement the data loading method described in any of the above embodiments when executed.
[0128] According to an embodiment of the present disclosure, the present disclosure further provides a computer program product, which, when executed by a processor, can implement the data loading method described in any of the above embodiments.
[0129] Figure 6 A schematic block diagram of an example electronic device 600 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.
[0130] like Figure 6 As shown, the device 600 includes a computing unit 601, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 602 or a computer program loaded from a storage unit 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the device 600 can also be stored. The computing unit 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0131] A number of components in the device 600 are connected to the I / O interface 605, including: an input unit 606, such as a keyboard, a mouse, etc.; an output unit 607, such as various types of displays, speakers, etc.; a storage unit 608, such as a disk, an optical disk, etc.; and a communication unit 609, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 609 allows the device 600 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0132] The computing unit 601 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 601 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 601 performs the various methods and processes described above, such as a data loading method. For example, in some embodiments, the data loading method may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 608. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 600 via ROM 602 and / or communication unit 609. When the computer program is loaded into RAM 603 and executed by the computing unit 601, one or more steps of the data loading method described above may be performed. Alternatively, in other embodiments, the computing unit 601 may be configured to perform the data loading method in any other appropriate manner (e.g., by means of firmware).
[0133] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0134] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0135] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0136] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0137] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.
[0138] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship between the client and the server is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and virtual private servers (VPS) services.
[0139] According to the technical solution of the embodiment of the present disclosure, after obtaining a new open operation, the object data corresponding to the new open operation is loaded using the idle container at the bottom layer, and the container at the bottom layer is moved to the top layer, and the object data in the newly obtained container at the bottom layer is deleted. In this way, the memory occupied by the opened objects can be prevented from increasing, and memory overflow can be avoided.
[0140] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.
[0141] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.
Claims
1. A data loading method, include: In response to obtaining a first open operation, using a bottommost container in an idle state among at least two containers to load object data corresponding to the first open operation, and adjusting the hierarchical position of the bottommost container to the topmost layer; the topmost container among the at least two containers before the adjustment is used to load object data corresponding to a preceding open operation of the first open operation; The object data in the lowermost container of the at least two containers after adjustment is deleted.
2. The method according to claim 1, in, The at least two containers further include an intermediate container, the hierarchical position of the intermediate container is located at a layer below the uppermost container of the at least two containers, and the intermediate container is used to load object data corresponding to a second open operation, and the second open operation is a preceding open operation of the open operation corresponding to the uppermost container.
3. The method according to claim 1 or 2, further comprising: include: In response to obtaining a return operation for the currently opened object, using the current bottom-level container to load data of the first object; The first object is obtained from the first information based on the object identifier of the object data in the current uppermost container and the hierarchical order of the current lowermost container, and the first information is used to indicate the object identifier of the opened object and the opening order of the opened object; The object data in the current topmost container is deleted, and the hierarchical position of the current topmost container is adjusted to the bottommost layer.
4. The method according to claim 3, further comprising: include: The object identifier corresponding to the return operation on the currently opened object in the first information is deleted.
5. The method according to any one of claims 1 to 4, further comprising: include: A page corresponding to the uppermost container of the at least two containers is displayed.
6. The method according to any one of claims 1 to 5, further comprising: include: In response to acquiring the page switching operation, a page corresponding to the uppermost container and / or a page corresponding to the lowermost container is displayed, and the page corresponding to the lowermost container is empty.
7. The method according to any one of claims 1 to 6, further comprising: include: At least two containers are created, wherein the at least two containers include a container at an uppermost layer and a container at a lowermost layer.
8. The method according to any one of claims 1 to 7, further comprising: include: In response to acquiring the opening operation, the object identifier corresponding to the opening operation and the opening order corresponding to the opening operation are saved in the first information.
9. The method according to any one of claims 1 to 8, in, The operation object of the open operation includes a folder.
10. The method according to claim 9, in, The first opening operation is used to open a first folder, and a preceding opening operation of the first opening operation is used to open a parent folder of the first folder.
11. A data loading device, include: A first processing module is configured to, in response to obtaining a first open operation, use a bottommost container in an idle state among at least two containers to load object data corresponding to the first open operation, and adjust the hierarchical position of the bottommost container to the topmost container; the topmost container among the at least two containers before the adjustment is used to load object data corresponding to a preceding open operation of the first open operation; The second processing module is configured to delete the object data in the lowermost container of the at least two containers after adjustment.
12. The device according to claim 11, in, The at least two containers further include an intermediate container, the hierarchical position of the intermediate container is located at a layer below the uppermost container of the at least two containers, the intermediate container is used to load object data corresponding to a second open operation, and the second open operation is a preceding open operation corresponding to the open operation of the uppermost container.
13. The device according to claim 11 or 12, further comprising: include: A third processing module is configured to, in response to obtaining a return operation for a currently opened object, use a current bottom-level container to load data of the first object; The first object is obtained from the first information based on the object identifier of the object data in the current uppermost container and the hierarchical order of the current lowermost container, and the first information is used to indicate the object identifier of the opened object and the opening order of the opened object; The fourth processing module is configured to delete the object data in the current top-level container and adjust the hierarchical position of the current top-level container to the bottom-level.
14. The device according to claim 13, further comprising: include: The deleting module is configured to delete the object identifier corresponding to the return operation on the currently opened object in the first information.
15. The device according to any one of claims 11 to 14, further comprising: include: The first display module is configured to display a page corresponding to the uppermost container of the at least two containers.
16. The device according to any one of claims 11 to 15, further comprising: include: The second display module is configured to display a page corresponding to the uppermost container and a page corresponding to the lowermost container in response to obtaining a page switching operation, wherein the page corresponding to the lowermost container is empty.
17. The device according to any one of claims 11 to 16, further comprising: include: The creation module is configured to create at least two containers, wherein the at least two containers include a container at the uppermost layer and a container at the lowermost layer.
18. The device according to any one of claims 11 to 17, further comprising: include: The saving module is configured to save the object identifier corresponding to the opening operation and the opening order corresponding to the opening operation to the first information in response to obtaining the opening operation.
19. The device according to any one of claims 11 to 18, in, The operation object of the open operation includes a folder.
20. The device according to claim 19, in, The first opening operation is used to open a first folder, and a preceding opening operation of the first opening operation is used to open a parent folder of the first folder.
21. An electronic device, include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the data loading method according to any one of claims 1 to 10.
22. A non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause the computer to execute the data loading method according to any one of claims 1 to 10.
23. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the steps of the data loading method according to any one of claims 1 to 10 are implemented.
Citation Information
Patent Citations
Memory recovery method and device, terminal device and computer readable storage medium
CN108228339A
