Data display method and device, equipment and medium

By loading external device data in the vehicle gallery multiple times and displaying it when the set number is reached, the problem of long data loading time is solved, fast display and paging processing are achieved, and the user experience is improved.

CN118779345APending Publication Date: 2024-10-15CHONGQING SELIS PHOENIX INTELLIGENT INNOVATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410872257.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-01
Publication Date
2024-10-15

AI Technical Summary

Technical Problem

When the in-car gallery handles a large amount of external device data, the loading time is too long, affecting the user experience.

Method used

By loading the data in the database into the cache area multiple times, and loading it into the display area when the set amount is reached, time-sharing loading and display are achieved, paging display is supported, and the data loading method is adjusted to shorten user waiting time.

Benefits of technology

It improves the user experience, shortens the user waiting time, ensures the interface display effect, and reduces the display of empty pages.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118779345A_ABST
    Figure CN118779345A_ABST
Patent Text Reader

Abstract

The invention provides a data display method and device, equipment and a medium, and belongs to the technical field of automobiles, the method comprises the steps that data in a database is loaded to a cache region of a vehicle-mounted image library for multiple times, and the database is pre-loaded with data from external equipment; in the process of loading the data in the database to the cache region for multiple times, in response to the detection that the data in the cache region reaches a first set quantity, loading the data in the cache region to a display region of the vehicle-mounted image library; and displaying the data currently loaded to the display area through a preset interface.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of automobile technology, and in particular to a data display method, device, equipment and medium. Background Art

[0002] The in-vehicle gallery is an application that can record and display data in external devices. For example, after the pictures and videos in the USB flash drive inserted into the in-vehicle controller are loaded, these pictures and videos are displayed on the interface.

[0003] However, as the amount of data in external devices increases, it often takes a long time for the on-board gallery to display the data in the external devices to the user, which greatly affects the user experience. Summary of the invention

[0004] In view of the above problems, embodiments of the present application provide a data display method, apparatus, device and medium to overcome the above problems or at least partially solve the above problems.

[0005] In a first aspect of an embodiment of the present application, a data display method is provided, which is applied to a vehicle-mounted image library, and the method comprises:

[0006] Loading the data in the database into the cache area of ​​the vehicle-mounted image library in multiple times, wherein the database is pre-loaded with data from an external device;

[0007] In the process of loading the data in the database into the cache area in multiple times, in response to detecting that the data in the cache area reaches a first set amount, loading the data in the cache area into the display area of ​​the vehicle-mounted image library;

[0008] The data currently loaded into the display area is displayed through a preset interface.

[0009] Optionally, after displaying the data currently loaded into the display area through a preset interface, the method further includes:

[0010] In the process of loading the remaining data in the buffer area into the display area in multiple times, in response to detecting a paging trigger operation of the user, the data not displayed in the display area is displayed in a paging manner.

[0011] Optionally, the method further comprises:

[0012] After each time a portion of the remaining data in the buffer area is loaded into the display area, the data not displayed in the display area is paged according to a second set number, and the second set number is not higher than the displayable data quantity of the preset interface.

[0013] Optionally, the method further comprises:

[0014] In response to detecting that all the data in the database has been loaded into the cache area, sorting the data in the cache area by time;

[0015] Loading the remaining data in the buffer area to the display area in multiple times according to the order;

[0016] The newly loaded data in the display area is paged according to the order.

[0017] Optionally, the remaining data in the buffer area is loaded into the display area in multiple times according to a third set number;

[0018] The first set quantity and the third set quantity meet at least one of the following conditions:

[0019] The first set number is the number of data that can be displayed on the preset interface;

[0020] The third set quantity is greater than the first set quantity;

[0021] The third set number is an integer multiple of the first set number.

[0022] Optionally, the data in the database is loaded into the cache area of ​​the vehicle-mounted image library in multiple times, including:

[0023] In response to receiving the target message, start to query the data in the database multiple times, and load the data queried each time into the cache area;

[0024] The target message is used to indicate that part of the data in the external device has been loaded into the database, and the amount of the part of the data is not less than the amount of data required to be loaded into the cache area for the first time.

[0025] Optionally, loading the data queried each time into the cache area includes:

[0026] The data queried each time is compared with the data in the cache area, and the data not existing in the cache area is loaded into the cache area.

[0027] According to a second aspect of an embodiment of the present application, a data display device is provided, which is applied to a vehicle-mounted image library, and the device includes:

[0028] A first loading module, used for loading data in a database into a cache area of ​​the vehicle-mounted image library in multiple times, wherein the database is pre-loaded with data from an external device;

[0029] A second loading module is used for, in the process of loading the data in the database into the cache area in multiple times, in response to detecting that the data in the cache area reaches a first set amount, loading the data in the cache area into the display area of ​​the vehicle-mounted image library;

[0030] The data display module is used to display the data currently loaded into the display area through a preset interface.

[0031] According to a third aspect of an embodiment of the present application, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of the data display method according to the first aspect are implemented.

[0032] In a fourth aspect of an embodiment of the present application, a computer-readable storage medium is provided, on which a computer program / instruction is stored. When the computer program / instruction is executed by a processor, the steps of the data display method described in the first aspect are implemented.

[0033] The embodiments of the present application include the following advantages:

[0034] When the on-board image library loads the data in the external device into its own cache area in multiple times, if it is detected that the first set amount of data has been loaded, the data is first loaded from the cache area to its own display area for interface display, thereby adjusting the method of loading all the data in the external device at one time and then displaying the interface to the method of loading and displaying the data in the external device in a time-sharing manner, so that the on-board image library can quickly display part of the data in the external device to the user, thereby shortening the user's waiting time and improving the user experience;

[0035] When the on-board image library loads the data in the database into its own cache area in multiple times, it also loads the data in the cache area into the display area in multiple times, thereby providing data support for the implementation of the paging display function, so that the user can obtain the data newly loaded from the database by the on-board image library through the paging trigger operation, thereby further improving the user experience;

[0036] By setting the first set number as the number of displayable data on the preset interface, when the vehicle-mounted gallery displays data on the preset interface for the first time, the displayed data can fill the display area of ​​the preset interface, thereby ensuring the interface display effect;

[0037] By setting the third set number to be greater than the first set number, and / or by setting the third set number to an integer multiple of the first set number, the amount of data displayed on the initial interface (i.e., the first set number) is used as a benchmark to reasonably determine the amount of data that needs to be loaded into the display area each subsequent time (i.e., the third set number), thereby ensuring that the display area can obtain enough data for paging processing in advance, which is beneficial for coping with users' frequent paging trigger operations and reducing the occurrence of empty pages. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments of the present application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0039] Figure 1 is an implementation flow chart of a data display method in an embodiment of the present application;

[0040] Figure 2 is a schematic diagram of an interface data update in an embodiment of the present application;

[0041] Figure 3 is a schematic diagram of data loading in an embodiment of the present application;

[0042] Figure 4 is a schematic diagram of a data display process in an embodiment of the present application;

[0043] Figure 5 is a structural schematic diagram of a data display device in an embodiment of the present application;

[0044] Figure 6 It is a schematic diagram of an electronic device in an embodiment of the present application. DETAILED DESCRIPTION

[0045] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0046] The in-vehicle gallery is an application that can record and display data in external devices. For example, after the pictures and videos in the USB flash drive inserted into the in-vehicle controller are loaded, these pictures and videos are displayed on the interface.

[0047] However, as the amount of data in external devices increases, it often takes a long time for the on-board gallery to display the data in the external devices to the user, which greatly affects the user experience.

[0048] For example, after the USB flash drive is inserted, there are time-consuming processes such as system scanning and mounting. The more data in the USB flash drive, the longer the system scanning and mounting time will be, and the longer the user will have to wait for the in-vehicle gallery to display data, which seriously affects the user experience.

[0049] In response to the problems existing in the above-mentioned related technologies, the embodiments of the present application propose a data display method, device, equipment and medium, which adjusts the method of loading all data in the external device in one go and then displaying the interface to a method of loading and displaying data in the external device in a time-sharing manner, so that the on-board gallery can quickly display part of the data in the external device to the user, thereby shortening the user's waiting time and improving the user experience.

[0050] In conjunction with the accompanying drawings, a data display method, apparatus, device and medium provided by the embodiments of the present application are described in detail below through some embodiments and their application scenarios.

[0051] First, refer to Figure 1 As shown, it is an implementation flow chart of a data display method provided in an embodiment of the present application. The method is applied to a vehicle-mounted image library and may include the following steps:

[0052] Step S101: Loading data in a database into a cache area of ​​the vehicle-mounted image library in multiple times, wherein the database is pre-loaded with data from an external device.

[0053] The external device may be a device such as a USB flash drive that can import data into the in-vehicle controller.

[0054] In specific implementation, the amount of data required to be loaded each time or the percentage of data required to be loaded each time can be set in advance for the on-board gallery, and the on-board gallery can then load the data in the database multiple times at different times based on the preset data loading amount or the preset data loading percentage.

[0055] For example, the on-board gallery can be set in advance to load 100 data for the first time, and the amount of data to be loaded the next time must be twice the amount of data required to be loaded the previous time. The on-board gallery will subsequently load 100 data in the database into the cache area according to the preset data loading quantity, and then load the remaining 200 data in the database into the cache area, and so on, until the remaining data in the database does not meet the current required data loading quantity, the remaining data in the database will be loaded into the cache area at one time, and the data loading will be terminated.

[0056] Alternatively, the on-board image library can be set in advance to load 10% of the data in the database for the first time, and the percentage of data required to be loaded the next time must be twice the percentage of data required to be loaded the previous time. The on-board image library will subsequently load 10% of the data in the database into the cache area according to the preset data loading percentage, and then load 20% of the remaining data in the database into the cache area, and so on, until the amount of data remaining in the database is lower than the set value, the remaining data in the database will be loaded into the cache area at one time, and the data loading will be terminated.

[0057] Step S102: in the process of loading the data in the database into the cache area multiple times, in response to detecting that the data in the cache area reaches a first set amount, the data in the cache area is loaded into the display area of ​​the vehicle-mounted gallery.

[0058] In a specific implementation, the first set number can be freely set according to actual needs. For example, the first set number can be the number of displayable data in a preset interface or a preset percentage of the number of displayable data, such as 80% of the number of displayable data; or, the number of data required to be loaded from the database to the cache area for the first time can be used as the first set number, or the number of data required to be loaded from the database to the cache area for the first N times can be used as the first set number, where N is an integer greater than 1.

[0059] Step S103: displaying the data currently loaded into the display area through a preset interface.

[0060] Among them, the database, vehicle-mounted gallery and preset interface can be integrated on one device, or deployed on different devices respectively.

[0061] In a specific implementation, after the vehicle-mounted gallery loads the first set amount of data into the display area, the data will be displayed through a preset interface so that the user can see part of the data in the external device in advance, thereby reducing the user-perceived loading time of the vehicle-mounted gallery.

[0062] When the on-board gallery displays part of the data in advance through the preset interface, it will continue to load the remaining data in the database into the cache area. In this process, the on-board gallery can load the remaining data into the cache area once, and then load the data in the cache area into the display area according to certain rules (such as chronological order, etc.); or, the on-board gallery can also continue to load the remaining data into the cache area in multiple times, and in this process, load the newly loaded data in the cache area into the cache area once or multiple times, so that the newly loaded data can continue to be displayed to the user in a time-sharing manner, thereby further improving the user experience.

[0063] It should be noted that the on-board gallery has two data areas: a cache area and a display area; the cache area is the area that interacts directly with the database. The data in the database accessed by the on-board gallery will be stored in this area. The data structure of the cache area can be a list (List); the display area interacts with the preset interface and is the data source for the on-board gallery display data (such as pictures and videos, etc.). The on-board gallery will read data from the cache area according to certain rules to support the interface display. The data structure of the display area can be a List.

[0064] Considering that in order to ensure the normal operation of the vehicle-mounted image library, during the data loading process, it is necessary to ensure that the amount of data in the cache area must be greater than or equal to the amount of data in the display area, that is, the order of the data link must comply with: the data first goes from the database to the cache area, then from the cache area to the display area, and finally to the interface display. Based on this, the embodiment of the present application adjusts the execution logic of the vehicle-mounted image library to load the data in the database into the cache area in multiple times, and uses whether the data in the cache area reaches the first set amount as the timing for loading data into the display area, thereby making the adjusted vehicle-mounted image library execution logic still comply with the above-mentioned data link order, thereby realizing the time-sharing loading and display of data in external devices while ensuring the normal operation of the vehicle-mounted image library.

[0065] By adopting the technical solution of the embodiment of the present application, when the on-board picture library loads the data in the external device into its own cache area in multiple times, if it is detected that the loading of the first set amount of data has been completed, the data will be first loaded from the cache area to its own display area for interface display. In this way, the method of loading all the data in the external device at one time and then displaying the interface is adjusted to a method of loading and displaying the data in the external device in a time-sharing manner, so that the on-board picture library can quickly display part of the data in the external device to the user, thereby shortening the user's waiting time and improving the user experience.

[0066] Optionally, in one embodiment, after displaying the data currently loaded into the display area through a preset interface, the method further includes:

[0067] In the process of loading the remaining data in the buffer area into the display area in multiple times, in response to detecting a paging trigger operation of the user, the data not displayed in the display area is displayed in a paging manner.

[0068] In specific implementation, the onboard image library will load the data in the database into its own cache area multiple times, and will load the data in its own cache area into the display area multiple times. In this process, the onboard image library will display the first set amount of data initially loaded into the display area through a preset interface, and for the data subsequently loaded into the display area, the onboard image library will not actively display it on the interface, but will page these undisplayed data to obtain each page of data.

[0069] The car gallery will then continue to detect the user's paging trigger operation, such as whether the user has swiped up or dragged the interface in the preset interface. Each time the user's paging trigger operation is detected, the car gallery will update the preset interface with a page of data that has not been displayed to display the page of data. For example, refer to Figure 2 The schematic diagram of interface data update shown in the figure shows that when a paging trigger operation by the user is detected, the in-vehicle gallery uses a page of data B to update the preset interface that is currently displaying data A.

[0070] In this embodiment, while the on-board picture library is loading the data in the database into its own cache area multiple times, it will also load the data in the cache area into the display area multiple times, thereby providing data support for the implementation of the paging display function, so that the user can obtain the newly loaded data from the database of the on-board picture library through the paging trigger operation, thereby further improving the user experience.

[0071] Optionally, the method further comprises:

[0072] After each time a portion of the remaining data in the buffer area is loaded into the display area, the data not displayed in the display area is paged according to a second set number, and the second set number is not higher than the displayable data quantity of the preset interface.

[0073] The amount of displayable data of the preset interface can be determined according to the screen size and resolution.

[0074] In a specific implementation, the data newly loaded into the display area may be directly paged according to the second set number. For example, when the second set number is 25, every 25 pieces of data are divided into one page.

[0075] Alternatively, the newly loaded data and the data previously loaded into the display area and not displayed can be sorted by time according to the timestamps corresponding to the data, and then the sorted undisplayed data can be paged according to a second set number. Subsequently, when the user's paging trigger operation is detected, the page of data to be displayed can be selected in chronological order, and the data on that page can be displayed by time, thereby facilitating the user to quickly find the data they need in the preset interface by time.

[0076] It is understandable that, when the second set number is lower than the number of displayable data of the preset interface, when the vehicle-mounted image library uses a certain page of data to update the preset interface, the currently displayed data of the preset interface can be moved upward from the bottom area of ​​the interface as a whole (the data originally at the top of the interface will exceed the display range of the preset interface and will not be visible), and the page of data can be used to fill the bottom area of ​​the interface. When the second set number is equal to the number of displayable data of the preset interface, when the vehicle-mounted image library uses a certain page of data to update the preset interface, the page of data can be used to directly overwrite the currently displayed data of the preset interface.

[0077] For example, refer to Figure 3 As shown in the data loading diagram, the vehicle library can pre-load 100 data from the database into the cache area, and the 100 data can be loaded quickly. Then, proceed in two steps:

[0078] The first step is to load these 100 pieces of data into the display area. When there is new data in the display area, the interface will be updated, that is, the interface will display the first 100 pieces of data. At this time, the on-board gallery will quickly display the picture and video data.

[0079] In the second step, the onboard gallery will continue to load the data from the database, and the amount of data loaded can be twice as much as 100 (i.e. 200). After the cache area has newly loaded 200 data, it will be loaded into the display area. At this time, the display area has new data, and paging will be performed and wait for the user to manually drag the screen to trigger the paging display.

[0080] Optionally, the method further comprises:

[0081] In response to detecting that all the data in the database has been loaded into the cache area, sorting the data in the cache area by time;

[0082] Loading the remaining data in the buffer area to the display area in multiple times according to the order;

[0083] The newly loaded data in the display area is paged according to the order.

[0084] In a specific implementation, when the on-board image library loads all the data in the database into the cache area, that is, when all the data in the external device is loaded into its own cache area, the data in the cache area can be sorted by time according to the timestamp corresponding to the data, and the data that has not been loaded into the display area can be continuously loaded into the cache area in multiple times according to the sorting, thereby making it possible for each page of data subsequently obtained by paging processing in the display area to be sorted by time. Therefore, on the basis of realizing paging display of each data by time, it is possible to avoid the operation of multiple time sorting of the data newly loaded into the cache area, thereby improving processing efficiency.

[0085] For example, after obtaining the data from the database, the vehicle-mounted image library sorts the data in the cache area according to the time sorting method. The pseudo code for implementing the sorting operation is as follows:

[0086]

[0087]

[0088] Among them, getDateInMs represents the timestamp of the image, and tmp represents the data content sorted by time.

[0089] Optionally, the remaining data in the buffer area is loaded into the display area in multiple times according to a third set number;

[0090] The first set quantity and the third set quantity meet at least one of the following conditions:

[0091] The first set number is the number of data that can be displayed on the preset interface;

[0092] The third set quantity is greater than the first set quantity;

[0093] The third set number is an integer multiple of the first set number.

[0094] In specific implementation, by setting the first set number as the number of data that can be displayed on the preset interface, when the vehicle-mounted gallery displays data on the preset interface for the first time, the displayed data can fill the display area of ​​the preset interface, thereby ensuring the interface display effect. By setting the third set number to be greater than the first set number, and / or, by setting the third set number to an integer multiple (such as twice) of the first set number, the number of data displayed on the initial interface (i.e., the first set number) is used as a reference to reasonably determine the number of data that needs to be loaded into the display area each time (i.e., the third set number), ensuring that the display area can get enough data for paging processing in advance, which is conducive to coping with users' frequent paging trigger operations and reducing the occurrence of blank page displays.

[0095] Optionally, in one embodiment, the data in the database is loaded into the cache area of ​​the vehicle-mounted image library in multiple times, including:

[0096] In response to receiving the target message, start to query the data in the database multiple times, and load the data queried each time into the cache area;

[0097] The target message is used to indicate that part of the data in the external device has been loaded into the database, and the amount of the part of the data is not less than the amount of data required to be loaded into the cache area for the first time.

[0098] In specific implementation, the database can be set to collect data from external devices in multiple times. When the database completes a data collection or the data collected from the external device reaches a set amount, it can send a target message to the on-board gallery to trigger the on-board gallery to start loading data from the database.

[0099] Therefore, the on-board image library can start loading the data in the database into its own cache area while the external device is loading data into the database. There is no need to wait for the external device to load all the data into the database before loading the data from the database into the cache area, which can further improve the efficiency of the on-board image library in displaying data.

[0100] Optionally, loading the data queried each time into the cache area includes:

[0101] The data queried each time is compared with the data in the cache area, and the data not existing in the cache area is loaded into the cache area, thereby avoiding the situation where data is repeatedly loaded into the cache area.

[0102] Taking the external device as a USB flash drive and the message carrier of the target message as a specific broadcast (such as amount broadcast) as an example, the above data display process is illustrated.

[0103] Reference Figure 4 The schematic diagram of the data display process shown in FIG. 1 shows that after the USB flash drive is inserted into the in-vehicle controller, the in-vehicle controller will load the data in the USB flash drive into the database and broadcast the target message carried by the amount to inform the in-vehicle image library that part of the data loading has been completed. Subsequently, the in-vehicle image library starts to query the amount for data multiple times to load the data multiple times.

[0104] Among them, after the data is queried for the first time, the on-board image library stores the queried data in a set in the cache area, and updates the preset interface by loading the data into the display area; after the data is queried for the second time and each subsequent time, the on-board image library will first perform differential processing on the queried data, that is, compare the queried data with the data in the cache area, so as to write the data not existing in the cache area into the set in the cache area (that is, update the set), and continue to load data into the display area, and when the user's paging trigger operation is detected, the preset interface is updated to display the paging data.

[0105] Specifically, after the car gallery is opened, a resource access link (also called a Uniform Resource Identifier, URI) is set, and the database can know which data needs to be accessed from the external device through the URI. The code example for setting the URI is as follows:

[0106] Uri mBaseUri = null;

[0107] if(isImage){mBaseUri=

[0108] MediaStore.Images.Media.EXTERNAL_CONTENT_URI;} / / This setting indicates that you want to access the image.

[0109] else{mBaseUri=

[0110] MediaStore.Video.Media.EXTERNAL_CONTENT_URI;} / / This setting indicates that you want to access the video.

[0111] Then, the car gallery registers to listen to ContentProvider data, which includes pictures and videos. The code example is as follows:

[0112] mApplication.getContentResolver().registerContentObserver(uri,broker);

[0113] Among them, the broker belongs to the application side, and the broker will also change accordingly according to the changes of ContentProvider. In this way, the car gallery application will know that the data in the database has been updated. ContentProvider is a component provided by the system side to the gallery application for data request. Through ContentProvider, the gallery application can get the corresponding data information, that is, ContentProvider belongs to the system side and is used to interact with the database. When the data in the database changes, ContentProvider will also receive the corresponding data change information. For example, when the number of pictures increases, the information that the length of the data corresponding to the picture in the database has increased accordingly can be received.

[0114] Subsequently, ContentProvider calls back the data. That is, after ContentProvider has data, it will use the onChange interface to return the data. The code example is as follows:

[0115] private static class NotifyBroker extends ContentObserver{

[0116] private final WeakHashMap<ChangeNotifier,Object> mNotifiers=

[0117] new WeakHashMap<>();

[0118] public NotifyBroker(Handler handler){

[0119] super(handler);

[0120] }

[0121] public synchronized void registerNotifier(ChangeNotifier notifier){

[0122] mNotifiers.put(notifier,null);

[0123] }

[0124] @Override

[0125] public synchronized void onChange(boolean selfChange){ / / Use the Boolean value in onchange to determine whether the data has changed.

[0126] for(ChangeNotifier notifier:mNotifiers.keySet()){

[0127] notifier.onChange(selfChange);

[0128] }

[0129] }

[0130] }

[0131] Subsequently, the vehicle-mounted image library reads data through the Cursor object corresponding to the ContentProvider and stores the data in the cache area (catchList). The code example is as follows:

[0132] Cursor cursor = null;

[0133] ArrayList <mediaitem>catchList=new ArrayList<>();

[0134] cursor=mResolver.query(uri,mProjection,selection,

[0135] selectionArgs,mOrderClause);

[0136] while(cursor.moveToNext()){ / / Set the index according to the requirements. For example, if 100 data items are read each time, the control index reads the corresponding 100 data items (a total of 200 data items).

[0137] int id=cursor.getInt(0); / / _id must be in the first column

[0138] Path childPath=mItemPath.getChild(id);

[0139] MediaItem item=loadOrUpdateItem(childPath,cursor,

[0140] dataManager,mApplication,mIsImage);

[0141] catchList.add(item);

[0142] }

[0143] Then, the car gallery loads the first 100 data. After there are 100 data in the catchList, it is notified to the display area through the specified interface. The specified interface is:

[0144] / / When used, the mediaItemCount parameter is passed in as 100, indicating that 100 pieces of data are loaded.

[0145] private void loadDataAndPost(long version,int mediaItemCount){

[0146] ... / / Code omitted

[0147] / / The data is sorted by time again, tmp represents the data content after sorting by time.

[0148]

[0149] Then, the car gallery performs paging processing, and the default paging is 25 items per page, that is, after sliding up, the preset interface updates 25 data items. The implementation of paging processing requires the integration of open source libraries. For example, the car gallery needs to integrate the SmartRefreshLayout library first. Specifically:

[0150] (1) Add the following dependencies to the build.gradle configuration file:

[0151] implementation'com.scwang.smartrefresh:SmartRefreshLayout:1.1.3'

[0152] (2) SmartRefreshLayout control is introduced into the UI. The pseudo code is as follows:

[0153] <com.scwang.smartrefresh.layout.SmartRefreshLayout android:id="@+id / all_pic_refresh"

[0154] / / ...code omitted

[0155] app:layout_constraintTop_toTopOf="parent"> <androidx.recyclerview.widge t.RecyclerView

[0156] android:id="@+id / rv_content_pictures"

[0157] style="@style / fast_scrollbar_style"

[0158] / / …code omitted

[0159] app:layout_constraintTop_toTopOf="parent"

[0160] / >< / com.scwang.smartrefresh.layout.SmartRefreshLayout>

[0161] (3) Implement paging display in the interface. The code example is as follows:

[0162]

[0163]

[0164]

[0165] For the method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present application are not limited by the order of the actions described, because according to the embodiments of the present application, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present application.

[0166] Second, Figure 5 This is a structural schematic diagram of a data display device according to an embodiment of the present application, which is applied to a vehicle-mounted image library, and the device includes:

[0167] A first loading module, used for loading data in a database into a cache area of ​​the vehicle-mounted image library in multiple times, wherein the database is pre-loaded with data from an external device;

[0168] A second loading module is used for, in the process of loading the data in the database into the cache area in multiple times, in response to detecting that the data in the cache area reaches a first set amount, loading the data in the cache area into the display area of ​​the vehicle-mounted image library;

[0169] The data display module is used to display the data currently loaded into the display area through a preset interface.

[0170] By adopting the technical solution of the embodiment of the present application, when the on-board picture library loads the data in the external device into its own cache area in multiple times, if it is detected that the loading of the first set amount of data has been completed, the data will be first loaded from the cache area to its own display area for interface display. In this way, the method of loading all the data in the external device at one time and then displaying the interface is adjusted to a method of loading and displaying the data in the external device in a time-sharing manner, so that the on-board picture library can quickly display part of the data in the external device to the user, thereby shortening the user's waiting time and improving the user experience.

[0171] Optionally, the device further comprises:

[0172] The paging display module is used to display the data not displayed in the display area in a paging manner in response to detecting a paging trigger operation of the user during the process of loading the remaining data in the cache area into the display area in multiple times.

[0173] Optionally, the device further comprises:

[0174] The paging processing module is used to page the data not displayed in the display area according to a second set number after loading part of the remaining data in the cache area into the display area each time, and the second set number is not higher than the displayable data quantity of the preset interface.

[0175] Optionally, the device further comprises:

[0176] A first processing module, configured to sort the data in the cache area by time in response to detecting that all the data in the database have been loaded into the cache area;

[0177] A second processing module, configured to load the remaining data in the buffer area into the display area in multiple times according to the order;

[0178] The third processing module is used to page the newly loaded data in the display area according to the sorting.

[0179] Optionally, the remaining data in the buffer area is loaded into the display area in multiple times according to a third set number;

[0180] The first set quantity and the third set quantity meet at least one of the following conditions:

[0181] The first set number is the number of data that can be displayed on the preset interface;

[0182] The third set quantity is greater than the first set quantity;

[0183] The third set number is an integer multiple of the first set number.

[0184] Optionally, the first loading module includes:

[0185] A third loading module is used for starting to query the data in the database multiple times in response to receiving the target message, and loading the data queried each time into the cache area;

[0186] The target message is used to indicate that part of the data in the external device has been loaded into the database, and the amount of the part of the data is not less than the amount of data required to be loaded into the cache area for the first time.

[0187] Optionally, the third loading module includes:

[0188] The fourth loading module is used to compare the data queried each time with the data in the cache area, and load the data not existing in the cache area into the cache area.

[0189] It should be noted that the device embodiment is similar to the method embodiment, so the description is relatively simple, and the relevant parts can be referred to the method embodiment.

[0190] The present application also provides an electronic device, referring to Figure 6 , Figure 6 Schematic diagram of an electronic device proposed in an embodiment of the present application. Figure 6 As shown, the electronic device 100 includes: a memory 110 and a processor 120. The memory 110 and the processor 120 are connected via a bus communication. A computer program is stored in the memory 110. The computer program can be run on the processor 120 to implement the steps in the data display method disclosed in the embodiment of the present application.

[0191] The embodiment of the present application also provides a computer-readable storage medium on which a computer program / instruction is stored. When the computer program / instruction is executed by a processor, the data display method disclosed in the embodiment of the present application is implemented.

[0192] The embodiment of the present application also provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the data display method disclosed in the embodiment of the present application.

[0193] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0194] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, devices or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0195] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, systems, devices, storage media, and program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0196] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0197] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable terminal device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0198] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present application.

[0199] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "including a..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.

[0200] The above is a detailed introduction to a data display method, device, equipment and medium provided by the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for general technical personnel in this field, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.< / mediaitem>

Claims

1. A data display method, characterized in that: Applied to the vehicle-mounted image library, the method comprises: Loading the data in the database into the cache area of ​​the vehicle-mounted image library in multiple times, wherein the database is pre-loaded with data from an external device; In the process of loading the data in the database into the cache area in multiple times, in response to detecting that the data in the cache area reaches a first set amount, loading the data in the cache area into the display area of ​​the vehicle-mounted image library; The data currently loaded into the display area is displayed through a preset interface.

2. The method according to claim 1, characterized in that After the data currently loaded into the display area is displayed through a preset interface, the method further includes: In the process of loading the remaining data in the buffer area into the display area in multiple times, in response to detecting a paging trigger operation of the user, the data not displayed in the display area is displayed in a paging manner.

3. The method according to claim 2, characterized in that The method further comprises: After each time a portion of the remaining data in the buffer area is loaded into the display area, the data not displayed in the display area is paged according to a second set number, and the second set number is not higher than the displayable data quantity of the preset interface.

4. The method according to claim 2, characterized in that: The method further comprises: In response to detecting that all the data in the database has been loaded into the cache area, sorting the data in the cache area by time; Loading the remaining data in the buffer area to the display area in multiple times according to the order; The newly loaded data in the display area is paged according to the order.

5. The method according to claim 2, characterized in that: The remaining data in the buffer area is loaded into the display area in multiple times according to a third set number; The first set quantity and the third set quantity meet at least one of the following conditions: The first set number is the number of data that can be displayed on the preset interface; The third set quantity is greater than the first set quantity; The third set number is an integer multiple of the first set number.

6. The method according to any one of claims 1 to 5, characterized in that: Loading the data in the database into the cache area of ​​the vehicle-mounted image library in multiple times includes: In response to receiving the target message, start to query the data in the database multiple times, and load the data queried each time into the cache area; The target message is used to indicate that part of the data in the external device has been loaded into the database, and the amount of the part of the data is not less than the amount of data required to be loaded into the cache area for the first time.

7. The method according to claim 6, characterized in that Loading the data queried each time into the cache area includes: The data queried each time is compared with the data in the cache area, and the data not existing in the cache area is loaded into the cache area.

8. A data display device, characterized in that: Applied to a vehicle-mounted image library, the device comprises: A first loading module, used for loading data in a database into a cache area of ​​the vehicle-mounted image library in multiple times, wherein the database is pre-loaded with data from an external device; A second loading module is used for, in the process of loading the data in the database into the cache area in multiple times, in response to detecting that the data in the cache area reaches a first set amount, loading the data in the cache area into the display area of ​​the vehicle-mounted image library; The data display module is used to display the data currently loaded into the display area through a preset interface.

9. An electronic device comprising a memory, a processor and a computer program stored in the memory, characterized in that: The processor executes the computer program to implement the data display method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program / instruction stored thereon, characterized in that: When the computer program / instructions are executed by a processor, the data display method according to any one of claims 1 to 7 is implemented.