Data processing methods, electronic devices, vehicles and media
By updating the storage progress in real time during data synchronization and optimizing the progress display using an event listener interface, the problem of user interface lag was solved, improving the smoothness of data synchronization and user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GREAT WALL MOTOR CO LTD
- Filing Date
- 2026-01-07
- Publication Date
- 2026-06-02
AI Technical Summary
Existing data processing methods often result in a "lag" phenomenon during data synchronization, where the user interface displays the synchronization progress but then becomes unresponsive, leading to a poor user experience.
During data synchronization, the storage progress is updated and displayed in real time. After the target data is stored in the vehicle's data buffer module, it is updated to the completed state. The data in the data buffer module is then stored in the persistent storage module. The progress display is optimized through event listening interfaces and callback mechanisms.
The smoothness of the synchronization progress display on the user interface during data synchronization has been improved, ensuring the immediacy and continuity of user operations and enhancing the user experience.
Smart Images

Figure CN122135453A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of automotive control technology, specifically to a data processing method, electronic device, vehicle, and medium. Background Technology
[0002] With the widespread application of data synchronization between vehicles and external devices, this function has become a key feature for enhancing vehicle intelligence and connectivity. However, existing data processing methods often experience "lag" issues when displaying the synchronization progress, such as the user interface freezing or becoming unresponsive, resulting in a poor user experience. Summary of the Invention
[0003] In view of this, embodiments of this application provide a data processing method, electronic device, vehicle, and medium that can solve the problem that existing data processing methods often experience "lag" when displaying synchronization progress on the user interface, resulting in a poor user experience due to the "stuttering" phenomenon of progress display freezing and interface unresponsiveness. This improves the smoothness of synchronization progress display on the user interface during data synchronization and enhances the user experience.
[0004] In a first aspect, embodiments of this application provide a data processing method, including: acquiring target data from an external device; storing the target data in a vehicle's data buffer module, updating and displaying the storage progress during the storage process, and updating the storage progress to a completion status after all the target data has been stored in the data buffer module; and storing the target data from the data buffer module to the vehicle's persistent storage module.
[0005] This application provides a data processing method that, during the process of storing target data acquired from an external device into a vehicle's data buffer module, updates and displays the storage progress in real time. Once all target data is stored in the data buffer module, the storage progress is updated to a completed state. Furthermore, the target data can be stored from the data buffer module to the vehicle's persistent storage module. Thus, updating the storage process to a completed state immediately after storing the target data in the data buffer module avoids the problem of prolonged unresponsiveness of the storage progress due to long storage times during the storage of target data into the persistent storage module. This improves the smoothness of the synchronization progress display on the user interface during data synchronization, enhancing the user experience.
[0006] In one embodiment, if it is determined that the specified data stored on the external device contains historical data and target data, the step of obtaining the target data from the external device is performed, wherein the historical data has been stored in a persistent storage module and the target data is incremental data. The method further includes: if it is determined that the specified data stored on the external device contains historical data and target data, displaying the historical data.
[0007] This application provides a data processing method that, when it is determined that the specified data stored on an external device contains historical data and target data, displays the historical data on the user interface. In this way, while data synchronization is performed in the background, the immediacy and continuity of user operations are ensured, the user's need to view historical data is met in a timely manner, and the user experience is improved.
[0008] In one embodiment, after all the target data is stored in the data buffer module, the method further includes: displaying the target data.
[0009] This application provides a data processing method that displays the target data on the user interface after all target data is stored in a data buffer module. When it is determined that the specified data stored on the external device contains only the target data, the data is completely stored in the data buffer module before unified display. This ensures that the user is presented with a complete and accurate data set from the first time, avoiding frequent interface refreshes or incomplete information that may occur during the storage process due to data arriving in batches, thus improving the user experience. When it is determined that the specified data stored on the external device contains both historical data and target data, the system can, after the data is completely stored in the data buffer module, display the updated complete specified data based on the historical data and the target data, or display only the target data, further consolidating the accuracy of the data display and improving the user experience.
[0010] In one embodiment, before acquiring target data from an external device, the method further includes: registering an event listening interface, wherein updating and displaying the storage progress includes: updating and displaying the storage progress in response to a first callback of the event listening interface, the first callback being triggered by an event that stores a preset amount of target data into a data buffer module; storing the target data from the data buffer module into the vehicle's persistent storage module includes: starting to store the target data from the data buffer module into the vehicle's persistent storage module in response to a second callback of the event listening interface, the second callback being triggered by an event that all the target data has been stored into the data buffer module.
[0011] This application provides a data processing method that registers an event listening interface. When an event occurs in which a target data volume of preset data is stored in a data buffer module, the method responds to the first callback of the event listening interface and executes an operation to update and display the storage progress. Relying on the event-driven mechanism of callbacks, the method can update and display progress information in real time and accurately each time a target data volume of preset data is stored in the data buffer module, improving the smoothness of the synchronization progress display on the user interface during data synchronization and enhancing the user experience. When an event occurs in which all target data is stored in the data buffer module, the method responds to the second callback of the event listening interface and executes an operation to store the target data from the data buffer module to the vehicle's persistent storage module. Thus, through the notification of the "all target data stored in the data buffer module" event via the second callback, the system can promptly trigger subsequent persistent storage tasks immediately after all target data is stored in the data buffer module, effectively improving storage speed and thus enhancing the user experience.
[0012] In one embodiment, before acquiring target data from an external device, the method further includes: initializing a data synchronization client, wherein after registering an event listener interface, the method further includes: in response to a third callback of the event listener interface, starting to store the target data in the vehicle's data buffer module, wherein the third callback is triggered by an event that enables data synchronization by the data synchronization client.
[0013] This application provides a data processing method that initializes a data synchronization client. When the event "data synchronization client enables data synchronization" occurs, in response to the third callback of the event listening interface, the method executes the operation of starting to store the target data in the vehicle's data buffer module. In this way, by notifying the system of the event "data synchronization client enables data synchronization" through the third callback, the system can promptly trigger subsequent cache storage tasks after the data synchronization client enables data synchronization, effectively improving storage speed and thus enhancing the user experience.
[0014] In one embodiment, the external device includes a mobile phone, and the target data includes phonebook data. The method further includes establishing a Bluetooth connection between the external device and the vehicle before acquiring the target data from the external device.
[0015] In one embodiment, before acquiring target data from an external device, the method further includes: determining whether the vehicle and the external device are connecting for the first time; if the vehicle and the external device are not connecting for the first time, determining that the specified data stored by the external device contains historical data and target data.
[0016] This application provides a data processing method that establishes a Bluetooth connection between an external device and a vehicle, providing the necessary communication foundation for subsequent data synchronization via the Bluetooth transmission protocol. This ensures the reliability and standardization of the data transmission channel, enabling the vehicle to access and obtain target data from the external device based on the Bluetooth connection, and guaranteeing the smooth operation of subsequent data storage, progress display, and other operations.
[0017] Secondly, embodiments of this application provide a data processing apparatus, comprising: an acquisition module for acquiring target data from an external device; a first storage module for storing the target data into a vehicle's data buffer module, updating and displaying the storage progress during the storage process, and updating the storage progress to a completion status after all the target data has been stored into the data buffer module; and a second storage module for storing the target data from the data buffer module into the vehicle's persistent storage module.
[0018] Thirdly, embodiments of this application provide an electronic device, including: a processor; and a memory for storing processor-executable instructions, wherein the processor is used to execute the data processing method described in the first aspect.
[0019] Fourthly, embodiments of this application provide a vehicle that includes the electronic equipment described in the third aspect.
[0020] Fifthly, embodiments of this application provide a computer-readable storage medium storing a computer program for performing the data processing method described in the first aspect.
[0021] Sixthly, embodiments of this application provide a computer program product, which includes a computer program that, when executed by a processor of a computer device, enables the computer device to perform the data processing method described in the first aspect.
[0022] In a seventh aspect, embodiments of this application provide a chip, including: a processor; and a memory for storing processor-executable instructions, wherein the processor is used to execute the data processing method described in the first aspect.
[0023] This application provides a data processing method, electronic device, vehicle, and medium. During the process of storing target data acquired from an external device into the vehicle's data buffer module, the storage progress is updated and displayed in real time. After all target data is stored in the data buffer module, the storage progress is updated to a completed state. Furthermore, the target data can be stored from the data buffer module to the vehicle's persistent storage module. Thus, updating the storage process to a completed state immediately after storing the target data in the data buffer module avoids the problem of prolonged unresponsiveness of the storage progress due to long storage times during the storage of target data into the persistent storage module. This improves the smoothness of the synchronization progress display on the user interface during data synchronization, enhancing the user experience. Attached Figure Description
[0024] Figure 1 The diagram shown is a schematic representation of the system architecture of a data processing system provided in an exemplary embodiment of this application.
[0025] Figure 2 The diagram shown is a flowchart illustrating a data processing method provided in an exemplary embodiment of this application.
[0026] Figure 3 The diagram shown is a flowchart illustrating a data processing method provided in another exemplary embodiment of this application.
[0027] Figure 4 The diagram shown is a flowchart illustrating a data processing method provided in another exemplary embodiment of this application.
[0028] Figure 5 The diagram shown is a schematic representation of the structure of a data processing apparatus provided in an exemplary embodiment of this application.
[0029] Figure 6 The diagram shown is a block diagram of an electronic device for performing a data processing method according to an exemplary embodiment of this application. Detailed Implementation
[0030] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0031] Exemplary System Figure 1 The diagram shown is a schematic representation of the system architecture of a data processing system provided in an exemplary embodiment of this application. Figure 1As shown, the data processing system 100 may include a processor 110, volatile memory 120, and non-volatile memory 130. For example, the volatile memory 120 may include dynamic random access memory, static random access memory, or synchronous dynamic random access memory, etc., and the non-volatile memory 130 may include flash memory, solid-state drive, embedded multimedia card, etc. In one example, the data processing system 100 may be an in-vehicle infotainment system.
[0032] Furthermore, the data processing system 100 can be configured with a Bluetooth Phone Book Access Protocol (PBAP) client, a connection type determination module, a data processing module, a control module, and a user interface (UI) display module. The processor 110 can be used to execute the functions of the aforementioned client and modules. Further, the PBAP client can be used to establish a data connection with an external device based on the Bluetooth Phone Book Access Profile (PBAP) protocol to register an event listening interface, initiate data synchronization, invoke callbacks, and obtain target data. The connection type determination module can be used to determine whether the connection between the external device and the vehicle is the first. The data processing module can be used to store the target data in the vehicle's volatile memory 120, and the control module can be used to store the target data from the volatile memory 120 (such as a data buffer module) to the vehicle's non-volatile memory 130 (such as a persistent storage module). The UI display module can be used to update and display the storage progress, as well as display historical data and target data.
[0033] In one example, the Bluetooth Phonebook Access Protocol client can establish a Bluetooth connection between an external device and a vehicle, and query specified data in the non-volatile memory 130. If the specified data does not contain historical data, it is determined that the external device and the vehicle are connecting for the first time. If the specified data contains historical data, it is determined that the external device and the vehicle are not connecting for the first time.
[0034] In one example, if this is the first time the external device is connected to the vehicle, the following steps can be performed: Step 1: The Bluetooth phonebook access protocol client can register an event listener interface (which can contain multiple callback functions, such as the first callback, the second callback, and the third callback) and start data synchronization.
[0035] Step 2: When data synchronization is started, the Bluetooth phonebook access protocol client can call the third callback based on the event listening interface. The data processing module can respond to the third callback and execute the operation of starting to store the target data in the external device into the vehicle's volatile memory 120.
[0036] Step 3: When storing the target data volume of the preset amount into the data buffer module, the Bluetooth phonebook access protocol client can call the first callback based on the event listener interface. The UI display module can respond to the first callback, perform the update and display of the storage progress.
[0037] Step 4: When all target data is stored in volatile memory 120, the Bluetooth phonebook access protocol client can call the second callback based on the event listening interface. The control module can respond to the second callback and perform the operation of storing the target data from volatile memory 120 to the vehicle's non-volatile memory 130.
[0038] Step 5: After all the target data is stored in the non-volatile memory 130, in one example, the UI display module can display the target data.
[0039] In one example, if the external device is not connecting to the vehicle for the first time, the following steps can be performed: Step 1: The UI display module can show historical data, and the Bluetooth phonebook access protocol client can register an event listener interface (which can contain multiple callback functions, such as the first callback, the second callback, and the third callback) and start data synchronization.
[0040] Step 2: When data synchronization is started, the Bluetooth phonebook access protocol client can call the third callback based on the event listening interface. The data processing module can respond to the third callback and execute the operation of starting to store the target data in the external device into the vehicle's volatile memory 120.
[0041] Step 3: When storing the target data volume of the preset amount into the data buffer module, the Bluetooth phonebook access protocol client can call the first callback based on the event listener interface. The UI display module can respond to the first callback, perform the update and display of the storage progress.
[0042] Step 4: When all target data is stored in volatile memory 120, the Bluetooth phonebook access protocol client can call the second callback based on the event listening interface. The control module can respond to the second callback and perform the operation of storing the target data from volatile memory 120 to the vehicle's non-volatile memory 130.
[0043] Step 5: After all the target data is stored in the non-volatile memory 130, the UI display module can display the target data and historical data.
[0044] It should be understood that the above application scenario examples are only shown to facilitate understanding of the spirit and principles of this application, and the embodiments of this application are not limited thereto. Rather, the embodiments of this application can be applied to any applicable scenario.
[0045] Exemplary methods Figure 2 The diagram shown is a schematic flowchart of a data processing method provided in an exemplary embodiment of this application. Exemplarily, Figure 2 The method can be executed by the aforementioned data processing system 100, specifically by the aforementioned processor 110. For example... Figure 2 As shown, the data processing method may include the following:
[0046] 210: Acquire target data from external devices.
[0047] In one embodiment, the external device may include a mobile electronic device that establishes a data connection with the vehicle and stores the target data. For example, the external device may include a mobile phone, computer, tablet, smart wearable device, etc.
[0048] In one embodiment, the target data may include a set of data to be stored in the vehicle, acquired from an external device via a preset communication method. For example, the target data may include at least one of the following: phonebook contact data, call log data, media library data, navigation data, etc.
[0049] In one embodiment, acquiring target data from an external device may include receiving the target data to be stored in the vehicle from the external device via communication. For example, when the external device is a computer and the target data is media library data, the media library data sent by the computer can be received via a wired connection, such as a Universal Serial Bus (USB). As another example, when the external device is a tablet computer and the target data is navigation data, the navigation data returned by the computer in response to a vehicle request can be received via a wireless local area network, such as Wireless Fidelity (Wi-Fi).
[0050] 220: Store the target data in the vehicle's data buffer module, update and display the storage progress during the storage process, and update the storage progress to the completion status after all the target data has been stored in the data buffer module.
[0051] In one embodiment, the vehicle's data buffer module may include a high-speed storage area inside the vehicle for temporary data storage, with read and write speeds significantly higher than the vehicle's persistent storage module. For example, the vehicle's data buffer module may include random access memory (RAM), a cache area of high-speed flash memory, or a cache partition in a solid-state drive.
[0052] In one embodiment, target data can be stored in the vehicle's data buffer module by organizing target data acquired from an external device into a series of data units, and for each batch of arriving data units, writing the data unit into the physical or logical storage space of the data buffer module. Furthermore, the data reception status between the vehicle and the external device can be periodically checked; if target data is received from the external device, the data units of the target data are transferred to the physical storage space of the data buffer module. For example, when the target data is phonebook contact data, the data unit may include contact entries from the address book. As another example, when the target data is media library data, the data unit may include media files.
[0053] In one embodiment, the storage process may include a process from initially storing the target data into the vehicle's data buffer module to storing all the target data into the data buffer module.
[0054] In one embodiment, storage progress can include the degree of completion of storing target data from an external device to the vehicle's data buffer module. Further, storage progress can be characterized by a numerical value representing the degree of storage completion. For example, storage progress can be characterized by the ratio between the amount of target data already stored in the data buffer module and the total amount of target data. Further, storage progress can be characterized by a ratio, percentage, or other reasonable numerical value. As another example, storage progress can be characterized by the amount of target data already stored in the data buffer module. Further, storage progress can be characterized by the number of stored target data entries, the number of stored target data packets, or other reasonable numerical values.
[0055] In one embodiment, updating the storage progress may include recalculating or real-time calculating the numerical value representing the degree of storage completion. Further, the storage progress may be updated by monitoring the storage process of target data from an external device to the vehicle's data buffer module, obtaining the latest measurement of the amount of target data already stored, and determining the degree of storage completion based on this latest measurement. For example, when the storage progress is characterized by the ratio between the amount of target data already stored in the data buffer module and the total amount of target data, the latest measurement of the amount of target data already stored can be obtained, and the ratio between the latest measurement of the amount of target data already stored and the total amount of target data can be calculated, using this ratio to represent the storage progress. The amount of data can represent the size, length, or other parameters of the data. As another example, when the storage progress is characterized by the number of entries of target data already stored, the latest measurement of the number of entries of target data already stored can be obtained, and the storage progress can be represented by this latest measurement of the number of entries of target data already stored. Optionally, the storage progress can be represented by the ratio between the latest measurement of the number of entries of target data already stored and the total number of entries of target data.
[0056] In one embodiment, displaying storage progress may include presenting dynamic information representing the degree of storage completion in a user-perceptible manner. For example, the dynamic information may be presented as visual elements on the vehicle's user interface, which may include at least one of a progress bar, a percentage number, a completion status icon, etc.
[0057] In one embodiment, it can be determined that all target data has been stored in the data buffer module based on the following methods: receiving a preset storage completion identifier (such as a specific identifier), the amount of target data (or the number of entries) received reaches the total amount of target data (or the total number of entries), determining that no new data has been received within a preset time threshold, or other reasonable methods.
[0058] In one embodiment, the storage progress can be updated to a completion status based on the following method: when it is determined that all target data has been stored in the vehicle's data buffer module, the value representing the storage progress is set to a target value indicating the completion of the storage task. Further, this target value may include 100%, 100 / 100, or other reasonable values. For example, the storage process can be monitored, and when the latest measured value of the amount of target data stored reaches the total amount of target data, it is determined that all target data has been stored in the data buffer module, and the operation of updating the progress value to the target value is performed. As another example, upon receiving a preset storage completion flag, it can be determined that all target data has been stored in the data buffer module, and the operation of updating the progress value to the target value is performed.
[0059] In one embodiment, while displaying the storage progress, the data stored in the data buffer module can be displayed in real time.
[0060] 230: Store the target data from the data buffer module to the vehicle's persistent storage module.
[0061] In one embodiment, the persistent storage module may include a hardware storage medium in the vehicle for long-term, non-volatile storage of target data, or a software storage component configured within the hardware storage medium. The storage speed of the persistent storage module is typically lower than that of the data buffer module, but it ensures that data is not lost after the vehicle system restarts or loses power. For example, the persistent storage module may include the native contact database of the Android system, Universal Flash Storage (UFS) integrated into the vehicle infotainment system, or other suitable modules.
[0062] In one embodiment, the operations of storing target data in the data buffer module and storing target data from the data buffer module to the persistent storage module can be performed asynchronously. For example, the target data can be stored from the data buffer module to the persistent storage module only after all the target data has been stored in the data buffer module. This avoids the impact of erroneous operations or rollbacks during the storage process in the data buffer module on the subsequent process of storing data in the persistent storage module, reducing the resource consumption of the persistent storage module due to erroneous operations or rollbacks. Alternatively, the target data already stored in the data buffer module can be stored in the persistent storage module as soon as the target data begins to be stored in the data buffer module. This speeds up the process of storing data in the persistent storage module and improves storage efficiency.
[0063] This application provides a data processing method that, during the process of storing target data acquired from an external device into a vehicle's data buffer module, updates and displays the storage progress in real time. Once all target data is stored in the data buffer module, the storage progress is updated to a completed state. Furthermore, the target data can be stored from the data buffer module to the vehicle's persistent storage module. Thus, updating the storage process to a completed state immediately after storing the target data in the data buffer module avoids the problem of prolonged unresponsiveness of the storage progress due to long storage times during the storage of target data into the persistent storage module. This improves the smoothness of the synchronization progress display on the user interface during data synchronization, enhancing the user experience.
[0064] According to one embodiment of this application, when it is determined that the specified data stored on the external device contains historical data and target data, the step of obtaining the target data from the external device is performed, wherein the historical data has been stored in a persistent storage module and the target data is incremental data. The method further includes: when it is determined that the specified data stored on the external device contains historical data and target data, displaying the historical data.
[0065] In one embodiment, the specified data may include a set of data stored on an external device that needs to be synchronized to the persistent storage module. Further, this set may be data stored at a specified location on the external device, which can be determined based on actual needs. For example, the specified storage location may include a specific folder, a specific contact database, or other reasonable storage location.
[0066] In one embodiment, historical data may include data already stored in the persistent storage module before acquiring target data from the external device. This historical data may be data stored in the persistent storage module by the external device during previous data synchronization processes. Therefore, both the external device and the persistent storage module may store this historical data. For example, when the target data is phonebook contact data, the historical data may include contact entries already saved in the persistent storage module and associated with the phonebook of the external device. In this case, the external device may store not only these contact entries but also newly added contact entries. When the target data is media library data, the historical data may include media files already saved in the persistent storage module that originate from the external device. In this case, the external device may store not only these media files but also newly added media files.
[0067] In one embodiment, the inclusion of historical data and target data in the specified data stored by the external device can be determined based on the following method: obtain the identifier corresponding to each data entry in the specified data from the external device, that is, a unique identifier, such as a contact identifier (ID), a media file hash value, or other reasonable identifier, and query the data in the persistent storage module. If there are data entries in the persistent storage module that have the same identifier as some data entries in the specified data, then these data entries are determined to be historical data, and the data entries in the specified data other than historical data are determined to be target data (incremental data).
[0068] In one embodiment, before acquiring target data from an external device, incremental data may be data contained in the specified data of the external device but not stored in the persistent storage module. For example, when the specified data is phonebook contact data, historical data may include contact data from the external device that has been stored in the persistent storage module during previous data synchronization processes, and incremental data may include contact data added by the external device after the previous data synchronization processes that has not been stored in the persistent storage module. When the target data is media library data, historical data may include media files from the external device that have been stored in the persistent storage module during previous data synchronization processes, and incremental data may include media files added by the external device after the previous data synchronization processes that have not been stored in the persistent storage module.
[0069] In one embodiment, displaying historical data may include presenting the historical data in a user-perceptible format. For example, the historical data may be presented on the vehicle's user interface in a list view, a detail view, or other reasonable format.
[0070] In this embodiment, if it is determined that the specified data stored on the external device contains historical data and target data, the historical data is displayed on the user interface. In this way, while data synchronization is performed in the background, the immediacy and continuity of user operations are ensured, the user's need to view historical data is met in a timely manner, and the user experience is improved.
[0071] According to one embodiment of this application, after all the target data is stored in the data buffer module, the method further includes: displaying the target data.
[0072] In one embodiment, displaying target data may include presenting the target data in a user-perceptible format. For example, the target data may be presented on the vehicle's user interface in a list view, a detail view, or other reasonable format.
[0073] In this embodiment, the target data is displayed on the user interface after all the target data is stored in the data buffer module. If it is determined that the specified data stored on the external device contains only the target data, the data is completely stored in the data buffer module before unified display. This ensures that the user is presented with a complete and accurate data set from the outset, avoiding frequent interface refreshes or incomplete information issues that may occur during the storage process due to data arriving in batches, thus improving the user experience. If it is determined that the specified data stored on the external device contains both historical data and target data, the system can, after the data is completely stored in the data buffer module, display the updated complete specified data based on the historical data and the target data, or display only the target data. This further consolidates the accuracy of the data display and improves the user experience.
[0074] According to one embodiment of this application, before acquiring target data from an external device, the method further includes: registering an event listening interface, wherein updating and displaying the storage progress includes: updating and displaying the storage progress in response to a first callback of the event listening interface, the first callback being triggered by an event that stores a preset amount of target data into a data buffer module; storing the target data from the data buffer module into the vehicle's persistent storage module includes: starting to store the target data from the data buffer module into the vehicle's persistent storage module in response to a second callback of the event listening interface, the second callback being triggered by an event that all the target data is stored into the data buffer module.
[0075] In one embodiment, an event may include state changes, operation execution points, or the achievement of specific conditions that occur during the process of storing target data from an external device to the vehicle's data buffer module, and can be monitored and notified to the event listening interface.
[0076] In one embodiment, a callback may include a function or method defined by an event source and automatically invoked by the event source when the event occurs, for notifying listeners of the occurrence of the event.
[0077] In one embodiment, the event source may include a specific software component, module, or system service capable of generating events during the data synchronization process. For example, when the event is "store the target data of a preset amount to the data buffer module," the event source may include a component that stores the target data. As another example, when the event is "the data synchronization client enables data synchronization," the event source may include the data synchronization client.
[0078] In one embodiment, a listener may contain a concrete implementation of a callback function or method defined by the event source and invoked when the event occurs. When the event source detects an event, it automatically invokes the corresponding callback method in the listener, thereby notifying the listener to execute a predefined operation. For example, when the event is "store the target data of a preset amount to the data buffer module," the corresponding listener may include a software module configured to perform the "update and display storage progress" operation. Further, the listener may include a UI display module configured in the data processing system 100. As another example, when the event is "store all target data to the data buffer module," the corresponding listener may include a software module configured to perform the "store the target data from the data buffer module to the vehicle's persistent storage module" operation. Further, the listener may include a control module configured in the data processing system 100.
[0079] In one embodiment, an event listener interface can include a convention specification from a software design pattern. The event listener interface defines a set of callback methods, such as callback functions, allowing a listener to receive notifications and respond when another object (such as an event) occurs. For example, in an Android-based in-vehicle infotainment system, the event listener interface could include a BluetoothPbapClient.EventListener interface for listening to the Bluetooth phonebook synchronization process. As another example, in a QNX-based in-vehicle infotainment system, the event listener interface could include a UsbMassStorageCopyListener interface for listening to the batch file copying process on a USB mass storage device. Furthermore, registering an event listener interface can include associating the event listener interface with an event source capable of generating a specific event. This operation enables the corresponding callback, i.e., invoking the corresponding callback function, to be triggered through the registered event listener interface when the event source experiences an event related to the data storage process.
[0080] In one embodiment, the preset data volume can be determined based on actual needs. For example, the preset data volume may include a preset percentage of data volume; further, the preset percentage may include 1%, 2%, 5%, etc. When 1% of the target data is stored in the data buffer module, the storage progress can be displayed as 1%; when 2% of the target data is stored in the data buffer module, the storage progress can be updated and displayed as 2%. As another example, the preset data volume may include a preset size of data volume; further, the preset size may include 1KB, 1MB, 100MB, etc. During the process of storing the target data in the data buffer module, if 1KB has been stored, the storage progress can be displayed as 1KB; if 1MB has been stored, the storage progress can be updated and displayed as 1MB.
[0081] In one embodiment, the first callback may include a function or method that is automatically called by the first event source when the first event occurs, triggered by the event source (first event source) of the event (first event) of "storing the target data of a preset amount of data to the data buffer module", such as calling the first callback.
[0082] In one embodiment, the second callback may include a function or method that is automatically called by the second event source when the second event occurs, triggered by the event source (second event source) of the event "all target data is stored in the data buffer module" (second event), such as calling the second callback.
[0083] In this embodiment, an event listener interface is registered. When the event occurs that a preset amount of target data is stored in the data buffer module, the system responds to the first callback of the event listener interface to update and display the storage progress. Relying on the event-driven mechanism of callbacks, the progress information can be updated and displayed in real time and accurately each time a preset amount of target data is stored in the data buffer module. This improves the smoothness of the synchronization progress display on the user interface during data synchronization, enhancing the user experience. When the event occurs that all target data is stored in the data buffer module, the system responds to the second callback of the event listener interface to store the target data from the data buffer module to the vehicle's persistent storage module. Thus, through the notification of the "all target data stored in the data buffer module" event via the second callback, the system can promptly trigger subsequent persistent storage tasks immediately after all target data is stored in the data buffer module, effectively improving storage speed and thus enhancing the user experience.
[0084] According to one embodiment of this application, before acquiring target data from an external device, the method further includes: initializing a data synchronization client, wherein, after registering an event listening interface, the method further includes: in response to a third callback of the event listening interface, starting to store the target data in the vehicle's data buffer module, wherein the third callback is triggered by an event that enables data synchronization by the data synchronization client.
[0085] In one embodiment, the data synchronization client may include a software component in the vehicle responsible for establishing data connections with external devices and providing an event listening interface. For example, when the target data is phonebook contact data, the data synchronization client may include the BluetoothPbapClient system component. As another example, when the target data is media library data, the data synchronization client may include the MediaTransferProtocol management service.
[0086] In one embodiment, initializing a data synchronization client may include: obtaining or creating an instance of the data synchronization client, configuring the data synchronization client to associate with an external device, and setting corresponding parameters for subsequent data storage operations.
[0087] In one embodiment, the third callback may include a function or method that is triggered by the event source (third event source) of the event "data synchronization client enables data synchronization" (third event) and is automatically invoked by the third event source when the third event occurs, such as invoking the third callback.
[0088] In one embodiment, enabling data synchronization on the data synchronization client may include: the data synchronization client initiating or responding to a command to initiate the transfer process of the target data. For example, when the vehicle and the external device are connected via Bluetooth, initiating data synchronization may include issuing a data synchronization request command to the external device to initiate a PBAP-based target data acquisition session. As another example, when the vehicle and the external device are connected via USB, initiating data synchronization may include automatically or in response to user operation performing a scan and indexing operation on a specified directory on the external device where the target data is stored to initiate the transfer process of the target data.
[0089] In one embodiment, a listener for storing target data into a vehicle's data buffer module may include a software module configured to perform that operation. For example, the listener for storing target data into a vehicle's data buffer module may include a data processing module configured in data processing system 100.
[0090] In this embodiment, the data synchronization client is initialized. When the event "data synchronization client enables data synchronization" occurs, the system responds to the third callback of the event listening interface and executes the operation of starting to store the target data in the vehicle's data buffer module. In this way, by notifying the system of the event "data synchronization client enables data synchronization" through the third callback, the system can promptly trigger the subsequent cache storage task after the data synchronization client enables data synchronization, effectively improving the storage speed and thus improving the user experience.
[0091] According to one embodiment of this application, the external device includes a mobile phone, and the target data includes phonebook data. The method further includes establishing a Bluetooth connection between the external device and the vehicle before acquiring the target data from the external device.
[0092] In one embodiment, a Bluetooth connection between an external device and a vehicle can be established by the vehicle initiating or responding to a request from the external device, performing Bluetooth device discovery, pairing, and protocol connection establishment. For example, when the external device (the mobile phone that needs to connect to the vehicle) has not successfully paired with the vehicle before, the vehicle's Bluetooth communication module can enable the Bluetooth discovery function, scan for available Bluetooth devices in the vicinity, display a list of discovered devices on the user interface, and respond to user actions by selecting the external device (the mobile phone that needs to connect to the vehicle) from the list. As another example, if the external device (the mobile phone that needs to connect to the vehicle) has successfully paired with the vehicle before, the vehicle can directly initiate a protocol connection to the external device without repeating the complete discovery and pairing process.
[0093] In this embodiment, by establishing a Bluetooth connection between the external device and the vehicle, the necessary communication foundation is provided for subsequent data synchronization via the Bluetooth transmission protocol. This ensures the reliability and standardization of the data transmission channel, enabling the vehicle to access and obtain target data from the external device based on the Bluetooth connection, and ensuring the smooth operation of subsequent data storage, progress display, and other operations.
[0094] According to one embodiment of this application, before obtaining target data from an external device, the method further includes: determining whether the vehicle and the external device are connected for the first time; if the vehicle and the external device are not connected for the first time, determining that the specified data stored by the external device contains historical data and target data.
[0095] In one embodiment, it can be determined whether the vehicle and the external device are connecting for the first time by querying the Bluetooth device Media Access Control Address (MAC address) association field in the database and determining whether the current connection is the first connection based on the Bluetooth device MAC address association field. Further, if the Bluetooth device MAC address association field in the database does not contain a record of the external device's MAC address, it is confirmed that the vehicle and the external device are connecting for the first time; if the Bluetooth device MAC address association field in the database contains a record of the external device's MAC address, it is confirmed that the vehicle and the external device are not connecting for the first time. In another embodiment, it can be determined whether the vehicle and the external device are connecting for the first time by asking the user through the vehicle's UI display module whether the external device is connecting for the first time.
[0096] In this embodiment, before acquiring target data from an external device, it is determined whether the vehicle and the external device are connected for the first time. If the vehicle and the external device are not connected for the first time, it is determined that the specified data stored by the external device contains historical data and target data. In this way, by determining whether the connection is the first time before acquiring target data from the external device, the system can distinguish different data synchronization scenarios, providing key decision-making basis for subsequent data acquisition and processing logic, thereby improving the intelligence level of the data synchronization process.
[0097] Figure 3 The diagram shown is a flowchart illustrating a data processing method provided in another exemplary embodiment of this application. Figure 3 The example is Figure 2 Examples of the embodiments are provided below; to avoid repetition, the similarities can be referred to the descriptions in the above embodiments, and will not be repeated here. For example... Figure 3 As shown, the data processing method may include the following:
[0098] 310: Bluetooth Phonebook Access Protocol (BIP) - Clients establish Bluetooth connections between external devices and vehicles.
[0099] Specifically, the Bluetooth phonebook access protocol client in the vehicle's data processing system 100 can establish a Bluetooth connection between an external device and the vehicle. Further, the Bluetooth phonebook access protocol client may include BluetoothPbapClient.
[0100] 320: Confirm that the external device and the vehicle are connecting for the first time.
[0101] 330: Register the event listener interface.
[0102] Specifically, the operation of registering an event listener interface can be performed by the relevant listener.
[0103] Specifically, the event listener interface may include BluetoothPbapClient.EventListener.
[0104] In one example, the registered event listener interface can contain multiple callback functions, such as a first callback, a second callback, and a third callback. For instance, the first callback can be registered through the listener UI display module, the second callback through the listener control module, and the third callback through the listener data processing module.
[0105] 340: Start data synchronization and call the third callback of the event listener interface. The data processing module responds to the third callback and executes the operation of starting to store the target data in the vehicle's random access memory.
[0106] Specifically, the operation of invoking the third callback can be performed by the Bluetooth Phonebook Access Protocol client.
[0107] 350: When storing the target data of the preset data volume into the random access memory, the first callback is invoked. The UI display module responds to the first callback, performs the operation of updating and displaying the storage progress.
[0108] Specifically, the operation of invoking the first callback can be performed by the Bluetooth Phonebook Access Protocol client.
[0109] In one example, the number of synchronized entries and the total number of entries are obtained through the onSyncProgressUpdated callback of BluetoothPbapClient.EventListener, the storage progress is calculated and displayed in real time.
[0110] 360: After all the target data is stored in the random access memory, the target data is displayed using the UI display module. The second callback is called, and the control module responds to the second callback to perform the operation of storing the target data from the random access memory to the vehicle's database.
[0111] Specifically, the database can include com.android.providers.contacts, and data reading and writing can be implemented through ContactsContract related application programming interfaces (APIs), such as the ContentProvider interface.
[0112] In one example, during data synchronization, data can be retrieved via callbacks such as onContactListReceived and onCallLogListReceived of BluetoothPbapClient.EventListener, stored in random access memory in real time, and directly displayed through the UI module. After synchronization is complete, asynchronous threads, such as coroutines or thread pools, combined with the ContactsContract API, can be used to write the data to the native database (the database mentioned above).
[0113] Figure 4 The diagram shown is a flowchart illustrating a data processing method provided in another exemplary embodiment of this application. Figure 4 The example is Figure 2 Examples of the embodiments are provided below; to avoid repetition, the similarities can be referred to the descriptions in the above embodiments, and will not be repeated here. For example... Figure 4 As shown, the data processing method may include the following:
[0114] 410: Bluetooth Phonebook Access Protocol (BIP) - Clients establish Bluetooth connections between external devices and vehicles.
[0115] Specifically, the operation of establishing a Bluetooth connection between an external device and the vehicle can be performed by a Bluetooth Phonebook Access Protocol (BIP) client. Further, the BIP client may include BluetoothPbapClient.
[0116] 420: Determine that the external device and the vehicle are not connected for the first time.
[0117] 430: Register the event listener interface.
[0118] Specifically, the operation of registering an event listener interface can be performed by the relevant listener.
[0119] Specifically, the event listener interface may include BluetoothPbapClient.EventListener.
[0120] In one example, the registered event listener interface can contain multiple callback functions, such as a first callback, a second callback, and a third callback.
[0121] 440: Start data synchronization. The UI display module shows historical data and calls the third callback. The data processing module responds to the third callback and executes the operation of starting to store the target data in the vehicle's random access memory.
[0122] Specifically, the operation of invoking the third callback can be performed by the Bluetooth Phonebook Access Protocol client.
[0123] 450: When storing the target data of the preset data volume into the random access memory, the first callback is invoked. The UI display module responds to the first callback, performs the operation of updating and displaying the storage progress.
[0124] Specifically, the operation of invoking the first callback can be performed by the Bluetooth Phonebook Access Protocol client.
[0125] 460: After all the target data is stored in the random access memory, the second callback is called. The control module responds to the second callback and performs the operation of storing the target data from the random access memory to the vehicle's database.
[0126] Specifically, the database can include com.android.providers.contacts, and data reading and writing can be implemented through ContactsContract related APIs (such as the ContentProvider interface).
[0127] 470: After all target data is stored in the database, the UI display module shows the target data and historical data.
[0128] In this embodiment, historical data can be read from the native database (the aforementioned database) and displayed quickly. Simultaneously, background synchronization is initiated. Incremental data can be updated via EventListener callback, first updating the random access memory and temporarily refreshing the storage progress displayed in the UI module. After the database write is complete, the latest complete data can be read and displayed.
[0129] Exemplary device Figure 5 The diagram shown is a schematic representation of a data processing apparatus provided in an exemplary embodiment of this application. This data processing apparatus can be applied to electronic devices or vehicles. Figure 5 As shown, the data processing device 500 includes: an acquisition module 510, a first storage module 520, and a second storage module 530.
[0130] The acquisition module 510 is used to acquire target data from an external device. The first storage module 520 is used to store the target data in the vehicle's data buffer module, update and display the storage progress during the storage process, and update the storage progress to a completed state after all the target data has been stored in the data buffer module. The second storage module 530 is used to store the target data from the data buffer module to the vehicle's persistent storage module.
[0131] This application provides a data processing apparatus that, during the process of acquiring target data from an external device and storing it in a vehicle's data buffer module, updates and displays the storage progress in real time. Once all the target data is stored in the data buffer module, the storage progress is updated to a completed state. Furthermore, the target data can be stored from the data buffer module to the vehicle's persistent storage module. Thus, updating the storage process to a completed state immediately after storing the target data in the data buffer module avoids the problem of prolonged unresponsiveness of the storage progress due to long storage times during the storage of the target data in the persistent storage module. This improves the smoothness of the synchronization progress display on the user interface during data synchronization, enhancing the user experience.
[0132] According to one embodiment of this application, the acquisition module 510 is configured to perform the step of acquiring target data from the external device when it is determined that the specified data stored on the external device contains historical data and target data, wherein the historical data has been stored in a persistent storage module, and the target data is incremental data. The first storage module 520 is further configured to display the historical data when it is determined that the specified data stored on the external device contains historical data and target data.
[0133] According to one embodiment of this application, after all the target data is stored in the data buffer module, the second storage module 530 is also used to display the target data.
[0134] According to one embodiment of this application, before acquiring target data from an external device, the acquisition module 510 is further configured to register an event listening interface. The first storage module 520 is configured to update and display the storage progress in response to a first callback from the event listening interface, the first callback being triggered by an event that stores a preset amount of target data into the data buffer module. The second storage module 530 is configured to begin storing the target data from the data buffer module into the vehicle's persistent storage module in response to a second callback from the event listening interface, the second callback being triggered by an event that all target data has been stored into the data buffer module.
[0135] According to one embodiment of this application, before acquiring target data from an external device, the acquisition module 510 is further configured to initialize the data synchronization client. After registering the event listening interface, the first storage module 520 is further configured to, in response to a third callback of the event listening interface, begin storing the target data in the vehicle's data buffer module, wherein the third callback is triggered by an event that enables data synchronization by the data synchronization client.
[0136] According to one embodiment of this application, the external device includes a mobile phone, and the target data includes phonebook data. Before acquiring the target data from the external device, the acquisition module 510 is also used to establish a Bluetooth connection between the external device and the vehicle.
[0137] Figure 6 The diagram shown is a block diagram of an electronic device 600 for performing a data processing method according to an exemplary embodiment of this application. Specifically, the electronic device 600 may be a server, a mobile device, a control device for a mobile device, a server interacting with a mobile device, a controller, or other devices.
[0138] Reference Figure 6 The electronic device 600 includes a processing component 610, which further includes one or more processors, and memory resources represented by memory 620 for storing instructions executable by the processing component 610, such as application programs. The application programs stored in memory 620 may include one or more modules, each corresponding to a set of instructions. Furthermore, the processing component 610 is configured to execute instructions to perform the aforementioned data processing methods.
[0139] Electronic device 600 may also include a power supply component configured to perform power management of electronic device 600, a wired or wireless network interface configured to connect electronic device 600 to a network, and an input / output (I / O) interface. Electronic device 600 can be operated based on an operating system stored in memory 620, such as Windows Server. TM Mac OSX TM Unix TM Linux TM FreeBSD TM Or similar.
[0140] This application also provides a vehicle, including an electronic device, wherein the electronic device is used to execute the data processing method provided in any of the above embodiments. It should be understood that the electronic device and its operation and functions can be referred to the above description. Figure 2 , Figure 3 or Figure 4 The description of the data processing method provided in the embodiments will not be repeated here to avoid repetition. For example, the electronic device may be as described above. Figure 6 Electronic devices 600.
[0141] A non-transitory computer-readable storage medium, wherein when instructions in the storage medium are executed by the processor of the electronic device 600, the electronic device 600 is enabled to perform a data processing method.
[0142] A computer program product includes a computer program that, when executed by a processor of a computer device, enables the computer device to perform the data processing method provided in any of the above embodiments.
[0143] All of the above-mentioned optional technical solutions can be combined in any way to form optional embodiments of this application, and will not be described in detail here.
[0144] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0145] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0146] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0147] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0148] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0149] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program verification codes, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0150] It should be noted that in the description of this application, the terms "first," "second," "third," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance. Furthermore, in the description of this application, unless otherwise stated, "a plurality of" means two or more.
[0151] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation entry points are provided for users to choose to authorize or refuse.
[0152] The above are merely preferred embodiments of this application and are not intended to limit this application. Any modifications or equivalent substitutions made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A data processing method, characterized in that, The method includes: Acquire target data from external devices; The target data is stored in the vehicle's data buffer module, and the storage progress is updated and displayed during the storage process. After all the target data is stored in the data buffer module, the storage progress is updated to a completed state. The target data is stored from the data buffer module to the vehicle's persistent storage module.
2. The method according to claim 1, characterized in that, If it is determined that the specified data stored on the external device contains both historical data and the target data, the step of obtaining the target data from the external device is performed, wherein the historical data has been stored in the persistent storage module, and the target data is incremental data. The method further includes: If it is determined that the specified data stored by the external device includes both the historical data and the target data, the historical data is displayed.
3. The method according to claim 1, characterized in that, After all the target data is stored in the data buffer module, the method further includes: Display the target data.
4. The method according to claim 1, characterized in that, Prior to acquiring the target data from the external device, the method further includes: Register an event listener interface. The updating and displaying of storage progress includes: In response to the first callback of the event listening interface, the storage progress is updated and displayed. The first callback is triggered by an event that stores the target data of a preset amount of data into the data buffer module. The step of storing the target data from the data buffer module to the vehicle's persistent storage module includes: In response to the second callback of the event listening interface, the target data is started to be stored from the data buffer module to the persistent storage module of the vehicle. The second callback is triggered by the event that all the target data is stored in the data buffer module.
5. The method according to claim 4, characterized in that, Prior to acquiring the target data from the external device, the method further includes: Initialize the data synchronization client. The method further includes, after registering the event listener interface, the following: In response to the third callback of the event listening interface, the target data is stored in the data buffer module of the vehicle, wherein the third callback is triggered by the data synchronization client enabling data synchronization event.
6. The method according to any one of claims 1 to 5, characterized in that, The external device includes a mobile phone, and the target data includes phonebook data. Prior to acquiring the target data from the external device, the method further includes: Establish a Bluetooth connection between the external device and the vehicle.
7. The method according to claim 2, characterized in that, Before acquiring the target data from the external device, the method further includes: Determine whether the vehicle and the external device are connecting for the first time; If the vehicle and the external device are not connecting for the first time, it is determined that the specified data stored in the external device includes the historical data and the target data.
8. An electronic device, characterized in that, include: processor; Memory used to store the processor's executable instructions. The processor is used to execute the data processing method according to any one of claims 1 to 7.
9. A vehicle, characterized in that, Includes the electronic device described in claim 7 above.
10. A computer-readable storage medium, characterized in that, The storage medium stores a computer program for executing the data processing method according to any one of claims 1 to 7.