CN114584550A - Vehicle data uploading and storing method and device, storage medium and vehicle - Google Patents

Vehicle data uploading and storing method and device, storage medium and vehicle Download PDF

Info

Publication number
CN114584550A
CN114584550A CN202110341020.5A CN202110341020A CN114584550A CN 114584550 A CN114584550 A CN 114584550A CN 202110341020 A CN202110341020 A CN 202110341020A CN 114584550 A CN114584550 A CN 114584550A
Authority
CN
China
Prior art keywords
index
storage file
vehicle data
data
server
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110341020.5A
Other languages
Chinese (zh)
Inventor
罗盛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Great Wall Motor Co Ltd
Original Assignee
Great Wall Motor Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Great Wall Motor Co Ltd filed Critical Great Wall Motor Co Ltd
Priority to CN202110341020.5A priority Critical patent/CN114584550A/en
Publication of CN114584550A publication Critical patent/CN114584550A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks

Abstract

The present disclosure relates to a method, an apparatus, a storage medium and a vehicle for uploading and storing vehicle data, comprising: when the power is on and started, the current universal time is obtained; generating a file name according to the current world time; creating a storage file through an interface provided by a FatFs file system according to the file name, wherein the storage medium in which the storage file is located is an EMMC storage medium; writing the vehicle data into a storage file; and uploading the vehicle data to a server. The method has the advantages that the storage files are named according to the current universal time, the storage files can be managed more conveniently according to the time sequence, algorithms such as balanced erasing and writing and bad block management can be completed by adopting an EMMC storage medium and integrating a controller in the EMMC, software development difficulty is reduced, and the data read-write transmission rate of the EMMC is far higher than that of NANDFLASH; and the light FatFs file system is adopted, so that the system can be easily deployed in a low-cost micro control unit.

Description

Vehicle data uploading and storing method and device, storage medium and vehicle
Technical Field
The present disclosure relates to the field of vehicle data, and in particular, to a method and an apparatus for uploading and storing vehicle data, a storage medium, and a vehicle.
Background
At present, vehicles are provided with vehicle-mounted terminal controllers, and the vehicle-mounted terminal controllers and the servers need to transmit data in real time. The vehicle-mounted terminal controller uploads data information in the vehicle running process to the server, the server analyzes and evaluates the performance and the state of the vehicle according to the data information, and the vehicle-mounted terminal controller needs to frequently store vehicle data when the vehicle-mounted terminal controller works normally. In the related art, NANDFLASH is generally used as a storage medium when vehicle data storage is implemented, but the storage medium has a high requirement on software processing logic. Moreover, when the vehicle-mounted terminal controller collects data, the stored file is frequently opened and closed, and the operations occupy a large amount of memory and system resources, affect the performance of the product and are not favorable for being deployed in a micro control unit with lower performance.
Disclosure of Invention
In order to solve the problems that vehicle data occupy a large amount of memory and system resources and are difficult to deploy in a micro control unit with low performance in the related art, the disclosure provides a vehicle data uploading and storing method, a vehicle data uploading and storing device, a vehicle data storing medium and a vehicle.
In order to achieve the above object, the present disclosure provides, in a first aspect, a method for uploading and storing vehicle data, the method including:
when the power is on and started, the current universal time is obtained;
generating a file name according to the current world time;
creating a storage file through an interface provided by a FatFs file system according to the file name, wherein the storage medium where the storage file is located is an EMMC storage medium;
writing vehicle data into the storage file; and the number of the first and second electrodes,
and uploading the vehicle data to a server.
Optionally, the storage file includes a first index and a second index, the first index is used for pointing to a location of the latest written data of the storage file, and the second index is used for pointing to a location of the latest uploaded data to the server, the method further includes:
in the case of writing vehicle data into the storage file initially, pointing the first index and the second index to the position of the initially written vehicle data in the storage file, and adjusting the position pointed by the first index with the writing of subsequent vehicle data, so that the first index keeps pointing to the position of the vehicle data written into the storage file most recently in the storage file;
sending a vital signal to a server at a fixed period, and determining whether communication with the server is normal or not according to a response signal sent by the server in response to receiving the vital signal;
determining whether the response signal is not received within a preset number of fixed periods before the response signal is received under the condition that the response signal is received within any one of the fixed periods;
in the case that it is determined that the response signal is not received within a preset number of the fixed periods before the response signal is received, pointing the second index to the position of the data pointed to by the first index;
and in the case that it is determined that the response signal is not received within a preset number of fixed periods before the response signal is received, uploading the data between the second index and the first index to the server, and pointing the second index to the position of the data which is uploaded to the server most recently.
Optionally, the method comprises:
and under the condition that the response signals are not received within a preset number of fixed periods before the response signals are received, if the vehicle is powered off, deleting data before the position pointed by the second index in the storage file, and closing the storage file.
Optionally, the method further comprises:
when the vehicle data is written into the storage file, the length of the vehicle data to be uploaded to the server is inserted into the first two bytes of the vehicle data.
Optionally, before the uploading the vehicle data to a server, the method further comprises:
inquiring whether a history storage file exists in the storage medium;
under the condition that a history storage file exists, sorting according to the file name of the history storage file;
sequentially uploading the vehicle data in the historical storage file to the server according to the sequencing result; and the number of the first and second electrodes,
and deleting the history storage file in the case that the vehicle data uploading server in the history storage file is determined to be completed.
A second aspect of the present disclosure provides a vehicle data uploading and storing device, including:
the acquisition module is used for acquiring the current universal time when the power is on and started;
the generating module is used for generating a file name according to the current world time;
the creating module is used for creating a storage file through an interface provided by a FatFs file system according to the file name, and the storage medium where the storage file is located is an EMMC storage medium;
the writing module is used for writing the vehicle data into the storage file;
and the uploading module is used for uploading the vehicle data to a server.
Optionally, the storage file includes a first index and a second index, the first index is used to point to a location of the latest written data of the storage file, and the second index is used to point to a location of the latest uploaded data to the server, the apparatus further includes:
the adjusting module is used for pointing the first index and the second index to the position of the initially written vehicle data in the storage file under the condition that the vehicle data are initially written into the storage file, and adjusting the position pointed by the first index along with the writing of the subsequent vehicle data, so that the first index keeps pointing to the position of the vehicle data which is newly written into the storage file in the storage file;
the communication confirmation module is used for sending a vital signal to a server at a fixed period and determining whether the communication with the server is normal or not according to a response signal sent by the server in response to the received vital signal;
a first determining module, configured to determine, when the response signal is received in any one of the fixed periods, whether the response signal is not received in a preset number of fixed periods before the response signal is received;
a first pointing module, configured to point the second index to a location of the data pointed to by the first index when it is determined that the response signal is not received within a preset number of the fixed periods before the response signal is received;
and the second directing module is used for uploading the data between the second index and the first index to the server and directing the second index to the position of the latest data uploaded to the server under the condition that the response signal is not received within a preset number of fixed periods before the response signal is received.
A third aspect of the present disclosure provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the method of any one of the first aspects of the present disclosure.
A fourth aspect of the present disclosure provides an electronic device, comprising:
a memory having a computer program stored thereon;
a processor for executing the computer program in the memory to implement the steps of the method of any one of the first aspect of the present disclosure.
A fifth aspect of the present disclosure provides a vehicle comprising the vehicle data uploading and storing device according to the second aspect of the present disclosure.
Through the technical scheme, the storage files are named through the current universal time, the storage files can be managed more conveniently according to the time sequence, furthermore, by adopting an EMMC storage medium, because a controller is integrated in the EMMC, algorithms such as balanced erasing and writing, bad block management and the like can be completed by self, the software development difficulty is reduced, and the data read-write transmission rate of the EMMC is far higher than that of NANDFLASH; and a lightweight FatFs file system is adopted, so that the system can be easily deployed in a low-cost micro control unit.
Additional features and advantages of the disclosure will be set forth in the detailed description which follows.
Drawings
The accompanying drawings, which are included to provide a further understanding of the disclosure and are incorporated in and constitute a part of this specification, illustrate embodiments of the disclosure and together with the description serve to explain the disclosure without limiting the disclosure. In the drawings:
FIG. 1 is a flow chart illustrating a method of uploading and storing vehicle data according to an exemplary embodiment;
FIG. 2 is another flow chart illustrating a method of uploading and storing vehicle data according to an exemplary embodiment;
FIG. 3 is a block diagram illustrating a vehicle data upload and storage device, according to an exemplary embodiment;
FIG. 4 is a block diagram illustrating an electronic device in accordance with an exemplary embodiment;
FIG. 5 is a block diagram of a vehicle shown in accordance with an exemplary embodiment.
Detailed Description
The following detailed description of specific embodiments of the present disclosure is provided in connection with the accompanying drawings. It should be understood that the detailed description and specific examples, while indicating the present disclosure, are given by way of illustration and explanation only, not limitation.
Fig. 1 is a flowchart illustrating a method for uploading and storing vehicle data according to an exemplary embodiment, where an execution subject of the method may be an in-vehicle terminal controller, as shown in fig. 1, and the method includes:
and S101, acquiring the current world time when the power is on and started.
And S102, generating a file name according to the current world time.
S103, creating a storage file through an interface provided by a FatFs file system according to the file name, wherein the storage medium where the storage file is located is an EMMC storage medium.
And S104, writing the vehicle data into the storage file.
And S105, uploading the vehicle data to a server.
Step S104 and step S105 may be performed simultaneously, or step S104 may be performed after step S105 is performed, that is, after it is determined that the vehicle data is uploaded to the server, the vehicle data is written into the storage file, and the execution sequence of step S104 and step S105 is not limited in the present disclosure. The file name of the generated storage file may be DATA _ Year-Month-Day-home-Minute-Second, for example, the file name of the storage file generated 11 minutes and 11 seconds at 11 months and 11 days in 2020 is DATA _2020_11_11_11_11, or the file name may be created according to a Unix timestamp, DATA _1605064271, which is not limited by this disclosure. Alternatively, the file extension of the storage file may be.
In the embodiment of the disclosure, the storage files are named by the current universal time, so that the storage files can be managed more conveniently according to the time sequence, furthermore, by adopting an EMMC storage medium, and because a controller is integrated in the EMMC, algorithms such as balanced erasing and bad block management can be completed by self, the software development difficulty is reduced, and the data read-write transmission rate of the EMMC is far higher than that of NANDFLASH; and a lightweight FatFs file system is adopted, so that the system can be easily deployed in a low-cost micro control unit. Further to uploading the vehicle data to the server, in one embodiment, https protocol may be used to encapsulate the communicated data to ensure the confidentiality and integrity of the communicated data.
Optionally, the storage file includes a first index and a second index, the first index is used for pointing to a location of the latest written data of the storage file, and the second index is used for pointing to a location of the latest uploaded data to the server, the method further includes:
in the case of writing vehicle data into the storage file initially, pointing the first index and the second index to the position of the initially written vehicle data in the storage file, and adjusting the position pointed by the first index with the writing of subsequent vehicle data, so that the first index keeps pointing to the position of the vehicle data written into the storage file most recently in the storage file;
sending a vital signal to a server at a fixed period, and determining whether communication with the server is normal or not according to a response signal sent by the server in response to receiving the vital signal;
determining whether the response signal is not received within a preset number of fixed periods before the response signal is received under the condition that the response signal is received within any one of the fixed periods;
in the case that it is determined that the response signal is not received within a preset number of the fixed periods before the response signal is received, pointing the second index to the position of the data pointed to by the first index;
and in the case that it is determined that the response signal is not received within a preset number of fixed periods before the response signal is received, uploading the data between the second index and the first index to the server, and pointing the second index to the position of the data which is uploaded to the server most recently.
The fixed period may be 10 seconds, and the preset number may be 6, that is, if the response signal is not received within the preset number of fixed periods, it may be understood that the response signal is not received within 60 s.
As will be appreciated by those skilled in the art, in the related art, the function of breakpoint resume of vehicle data is implemented in a complicated and complicated manner, and there are many calculation and verification processes, such as unpacking the data to be transmitted, performing digital signature encryption, generating a CRC check code for each packet of data, and frequently opening and closing the storage file when the vehicle-mounted terminal controller performs data acquisition.
According to the scheme, the positions of the latest generated data and the uploaded data are marked by setting the first index and the second index, the current network connection state is determined by sending a life signal to the server in a fixed period, and as the generation and the uploading of the vehicle data are carried out synchronously, under the condition that the vehicle is not disconnected for a long time before the response signal is received, the data transmission before the current time is determined to be normal, and the second index is directly pointed to the position of the latest generated data; if the vehicle has long-time disconnection before the response signal is received at this time, the uploaded data volume is smaller than the newly generated data volume, and then the data between the second index and the first index is supplemented to the server to realize breakpoint transmission.
Illustratively, when the response signal is received 10 seconds after the vital signal is transmitted for the first time after power-on, the second index is pointed to the position pointed by the first index, namely the latest vehicle data generated at 10 seconds; and when the response signal is received within 70 seconds and the response signal is not received within 10-60 seconds, the data within 10-70 seconds is retransmitted to the server, and the second index points to the position of the data which is uploaded to the server newly.
Further, a long-time disconnection communication flag whose initial state is 0 may be set, the flag is set to 1 when no response signal is received within a preset number of fixed periods, the flag is set to 0 when supplementary transmission is completed, that is, when a position pointed by a second index is the same as a position pointed by a first index, and whether the long-time disconnection communication flag is 0 is determined when the response signal is received within any one of the fixed periods, and if the long-time disconnection communication flag is 0, the second index is pointed to a position of data pointed by the first index; if not, uploading the data between the second index and the first index to the server, and pointing the second index to the position of the data uploaded to the server latest.
In further alternative embodiments, the method comprises:
and under the condition that the response signals are not received within a preset number of fixed periods before the response signals are received, if the vehicle is powered off, deleting data before the position pointed by the second index in the storage file, and closing the storage file.
By adopting the scheme, when the vehicle is powered off, if the response signals are not received within the preset number of fixed periods, namely the vehicle disconnects the communication with the server for a long time, the uploaded data can be deleted to save the storage space of the storage medium, and the storage file is reserved so that the vehicle can be conveniently subjected to supplementary transmission when being powered on again.
In one possible embodiment, the method further comprises:
when the vehicle data is written into the storage file, the length of the vehicle data to be uploaded to the server is inserted into the first two bytes of the vehicle data.
By adopting the scheme, when the vehicle data are written into the storage file, the length of the uploaded vehicle data is inserted into the first two bytes, and the stored vehicle data are convenient to query and extract.
In further optional embodiments, before the uploading the vehicle data to a server, the method further comprises:
inquiring whether a history storage file exists in the storage medium;
under the condition that a history storage file exists, sorting according to the file name of the history storage file;
sequentially uploading the vehicle data in the historical storage file to the server according to the sequencing result; and the number of the first and second antennas is increased,
and deleting the history storage file in the case that the vehicle data uploading server in the history storage file is determined to be completed.
When there are a plurality of history storage files, the history storage files may be deleted uniformly after all the history storage files have been re-transmitted to the server, or the history storage files may be deleted after one history storage file is completely uploaded, which is not limited by the present disclosure. By adopting the scheme, the historical storage files can be sorted according to the file names, the storage files are named according to the current universal time, namely the historical storage files can be subjected to supplementary transmission according to the creation time of the storage files, and the historical storage files are deleted after the supplementary transmission is finished so as to save the storage space.
Fig. 2 is another flowchart illustrating a method for uploading and storing vehicle data according to an exemplary embodiment, where the method includes:
s201, obtaining the current universal time, creating a storage file according to the current universal time, and periodically sending a life signal to a server.
S202, writing the vehicle data into the storage file.
The storage file is created through an interface provided by a FatFs file system, and the storage medium where the storage file is located is an EMMC storage medium.
S203 continues to receive the response signal, and when the response signal is received, step S204 is executed.
And S204, determining whether a history storage file exists.
In the case where there is history storage data, steps S205, S206, S207 are executed; in the case where there is no history storage data, step S207 is directly executed.
And S205, opening the earliest history storage file according to the file name, and uploading the vehicle data in the history storage file to a server.
S206, deleting the history storage file.
S207, vehicle data are uploaded, wherein the first index in the storage file points to the position of the latest generated data.
S208, the response signal is continuously received, and if the response signal is received, step S209 is executed.
S209, it is determined whether or not there is a long-time disconnection communication after step S207.
In the case where there is no long-time disconnection of communication, step S210 is executed; in the case where there is a long-time disconnection of communication, step S211 is executed.
S210, pointing the second index to the position pointed by the first index.
And S211, complementing the data between the second index and the first index.
And S212, judging whether the driver operates the vehicle to power off or not.
In the case where it is determined that the driver operates the vehicle to power off, step S213 is executed.
S213, deleting the data before the second index in the storage file.
In the embodiment of the disclosure, the storage files are named by the current universal time, so that the storage files can be managed more conveniently according to the time sequence, furthermore, by adopting an EMMC storage medium, and because a controller is integrated in the EMMC, algorithms such as balanced erasing and bad block management can be completed by self, the software development difficulty is reduced, and the data read-write transmission rate of the EMMC is far higher than that of NANDFLASH; and a lightweight FatFs file system is adopted, so that the system can be easily deployed in a low-cost micro control unit.
Fig. 3 shows a vehicle data uploading and storing device 30 according to an exemplary embodiment, where the device 30 may be a vehicle-mounted terminal controller, or a part of the vehicle-mounted terminal controller, and as shown in fig. 3, the device 30 includes:
the obtaining module 31 is configured to obtain a current universal time when the power is turned on;
a generating module 32, configured to generate a file name according to the current world time;
a creating module 33, configured to create a storage file according to the file name through an interface provided by a FatFs file system, where a storage medium in which the storage file is located is an EMMC storage medium;
a writing module 34, configured to write vehicle data into the storage file;
and the uploading module 35 is used for uploading the vehicle data to a server.
Optionally, the storage file includes a first index and a second index, the first index is used to point to a location of the latest written data of the storage file, and the second index is used to point to a location of the latest uploaded data to the server, the apparatus further includes:
the adjusting module is used for pointing the first index and the second index to the position of the initially written vehicle data in the storage file under the condition that the vehicle data are initially written into the storage file, and adjusting the position pointed by the first index along with the writing of the subsequent vehicle data, so that the first index keeps pointing to the position of the vehicle data which is newly written into the storage file in the storage file;
the communication confirmation module is used for sending a vital signal to a server at a fixed period and determining whether the communication with the server is normal or not according to a response signal sent by the server in response to the received vital signal;
a first determining module, configured to determine, when the response signal is received in any one of the fixed periods, whether the response signal is not received in a preset number of fixed periods before the response signal is received;
a first pointing module, configured to point the second index to a location of the data pointed to by the first index when it is determined that the response signal is not received within a preset number of the fixed periods before the response signal is received;
and the second directing module is used for uploading the data between the second index and the first index to the server and directing the second index to the position of the latest data uploaded to the server under the condition that the response signal is not received within a preset number of fixed periods before the response signal is received.
Optionally, the device 30 comprises:
and the first deleting module is used for deleting data before the position pointed by the second index in the storage file and closing the storage file if the vehicle is powered off under the condition that the response signal is not received within a preset number of fixed periods before the response signal is received.
Optionally, the apparatus 30 further comprises:
and the inserting module is used for inserting the length of the vehicle data to be uploaded to the server into the first two bytes of the vehicle data when the vehicle data is written into the storage file.
Optionally, the apparatus 30 further comprises:
the query module is used for querying whether the storage medium has a history storage file or not;
the sorting module is used for sorting according to the file names of the historical storage files under the condition that the historical storage files exist;
the uploading sub-module is used for sequentially uploading the vehicle data in the historical storage file to the server according to the sequencing result; and the number of the first and second electrodes,
and the second deleting module is used for deleting the history storage file under the condition that the vehicle data uploading server in the history storage file is determined to be completed.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
Fig. 4 is a block diagram illustrating an electronic device 40 according to an example embodiment. As shown in fig. 4, the electronic device 40 may include: a processor 41 and a memory 42. The electronic device 40 may also include one or more of a multimedia component 43, an input/output (I/O) interface 44, and a communications component 45.
The processor 41 is configured to control the overall operation of the electronic device 40, so as to complete all or part of the steps in the above-mentioned method for uploading and storing vehicle data. The memory 42 is used to store various types of data to support operation at the electronic device 40, such as instructions for any application or method operating on the electronic device 40, and application-related data, such as contact data, transmitted and received messages, pictures, audio, video, and so forth. The Memory 42 may be implemented by any type or combination of volatile and non-volatile Memory devices, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic Memory, flash Memory, magnetic disk, or optical disk. The multimedia components 43 may include a screen and an audio component. Wherein the screen may be, for example, a touch screen and the audio component is used for outputting and/or inputting audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signals may further be stored in the memory 42 or transmitted through the communication component 45. The audio assembly also includes at least one speaker for outputting audio signals. The I/O interface 44 provides an interface between the processor 41 and other interface modules, such as a keyboard, mouse, buttons, etc. These buttons may be virtual buttons or physical buttons. The communication component 45 is used for wired or wireless communication between the electronic device 40 and other devices. Wireless Communication, such as Wi-Fi, bluetooth, Near Field Communication (NFC for short), 2G, 3G, 4G, NB-IOT, eMTC, or other 5G, etc., or a combination of one or more of them, which is not limited herein. The corresponding communication component 45 may thus comprise: Wi-Fi module, Bluetooth module, NFC module, etc.
In an exemplary embodiment, the electronic Device 40 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components for performing the above-mentioned uploading and storing method of vehicle data.
In another exemplary embodiment, a computer readable storage medium including program instructions which, when executed by a processor, implement the steps of the vehicle data uploading and storing method described above is also provided. For example, the computer readable storage medium may be the memory 42 including the program instructions, which are executable by the processor 41 of the electronic device 40 to implement the vehicle data uploading and storing method.
Fig. 5 is a block diagram of a vehicle according to an exemplary embodiment, and as shown in fig. 5, the vehicle includes a vehicle data uploading and storing device 30 shown in fig. 3, and the device 30 is used for executing all or part of the steps of the vehicle data uploading and storing method. Those skilled in the art will appreciate that, in practice, vehicle 50 may include other components, and fig. 5 shows only those portions relevant to the disclosed embodiments, and other necessary vehicle components are not shown.
The preferred embodiments of the present disclosure are described in detail with reference to the accompanying drawings, however, the present disclosure is not limited to the specific details of the above embodiments, and various simple modifications may be made to the technical solution of the present disclosure within the technical idea of the present disclosure, and these simple modifications all belong to the protection scope of the present disclosure.
It should be noted that, in the above embodiments, the various features described in the above embodiments may be combined in any suitable manner, and in order to avoid unnecessary repetition, various possible combinations will not be further described in the present disclosure.
In addition, any combination of various embodiments of the present disclosure may be made, and the same should be considered as the disclosure of the present disclosure, as long as it does not depart from the spirit of the present disclosure.

Claims (10)

1. A vehicle data uploading and storing method is characterized by comprising the following steps:
when the power is on and started, the current universal time is obtained;
generating a file name according to the current world time;
creating a storage file through an interface provided by a FatFs file system according to the file name, wherein the storage medium where the storage file is located is an EMMC storage medium;
writing vehicle data into the storage file; and the number of the first and second electrodes,
and uploading the vehicle data to a server.
2. The method of claim 1, wherein the storage file comprises a first index and a second index, the first index for pointing to a location of newly written data of the storage file, the second index for pointing to a location of newly uploaded data to the server, the method further comprising:
in the case of writing vehicle data into the storage file initially, pointing the first index and the second index to the position of the initially written vehicle data in the storage file, and adjusting the position pointed by the first index with the writing of subsequent vehicle data, so that the first index keeps pointing to the position of the vehicle data written into the storage file most recently in the storage file;
sending a vital signal to a server at a fixed period, and determining whether communication with the server is normal or not according to a response signal sent by the server in response to receiving the vital signal;
under the condition that the response signal is received in any fixed period, determining whether the response signal is not received in a preset number of fixed periods before the response signal is received;
in the case that it is determined that the response signal is not received within a preset number of the fixed periods before the response signal is received, pointing the second index to the position of the data pointed to by the first index;
and in the case that it is determined that the response signal is not received within a preset number of fixed periods before the response signal is received, uploading the data between the second index and the first index to the server, and pointing the second index to the position of the data which is uploaded to the server most recently.
3. The method of claim 2, wherein the method comprises:
and under the condition that the response signals are not received within a preset number of fixed periods before the response signals are received, if the vehicle is powered off, deleting data before the position pointed by the second index in the storage file, and closing the storage file.
4. The method according to any one of claims 1-3, further comprising:
when the vehicle data is written into the storage file, the length of the vehicle data to be uploaded to the server is inserted into the first two bytes of the vehicle data.
5. The method of any of claims 1-3, wherein prior to the uploading the vehicle data to a server, the method further comprises:
inquiring whether a history storage file exists in the storage medium;
under the condition that a history storage file exists, sorting according to the file name of the history storage file;
sequentially uploading the vehicle data in the historical storage file to the server according to the sequencing result; and the number of the first and second electrodes,
and deleting the history storage file in the case that the vehicle data uploading server in the history storage file is determined to be completed.
6. An apparatus for uploading and storing vehicle data, the apparatus comprising:
the acquisition module is used for acquiring the current universal time when the power is on and started;
the generating module is used for generating a file name according to the current world time;
the creating module is used for creating a storage file through an interface provided by a FatFs file system according to the file name, and the storage medium where the storage file is located is an EMMC storage medium;
the writing module is used for writing the vehicle data into the storage file;
and the uploading module is used for uploading the vehicle data to a server.
7. The apparatus of claim 6, wherein the storage file comprises a first index and a second index, the first index for pointing to a location of newly written data of the storage file, the second index for pointing to a location of newly uploaded data to the server, the apparatus further comprising:
the adjusting module is used for pointing the first index and the second index to the position of the initially written vehicle data in the storage file under the condition that the vehicle data are initially written into the storage file, and adjusting the position pointed by the first index along with the writing of the subsequent vehicle data, so that the first index keeps pointing to the position of the vehicle data which is newly written into the storage file in the storage file;
the communication confirmation module is used for sending a vital signal to a server at a fixed period and determining whether the communication with the server is normal or not according to a response signal sent by the server in response to the received vital signal;
a first determining module, configured to determine, when the response signal is received in any one of the fixed periods, whether the response signal is not received in a preset number of fixed periods before the response signal is received;
a first pointing module, configured to point the second index to a location of the data pointed to by the first index when it is determined that the response signal is not received within a preset number of the fixed periods before the response signal is received;
and the second directing module is used for uploading the data between the second index and the first index to the server and directing the second index to the position of the latest data uploaded to the server under the condition that the response signal is not received within a preset number of fixed periods before the response signal is received.
8. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 5.
9. An electronic device, comprising:
a memory having a computer program stored thereon;
a processor for executing the computer program in the memory to carry out the steps of the method of any one of claims 1 to 5.
10. A vehicle characterized in that it comprises an uploading and storage device of vehicle data according to claim 6.
CN202110341020.5A 2021-03-30 2021-03-30 Vehicle data uploading and storing method and device, storage medium and vehicle Pending CN114584550A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110341020.5A CN114584550A (en) 2021-03-30 2021-03-30 Vehicle data uploading and storing method and device, storage medium and vehicle

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110341020.5A CN114584550A (en) 2021-03-30 2021-03-30 Vehicle data uploading and storing method and device, storage medium and vehicle

Publications (1)

Publication Number Publication Date
CN114584550A true CN114584550A (en) 2022-06-03

Family

ID=81769606

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110341020.5A Pending CN114584550A (en) 2021-03-30 2021-03-30 Vehicle data uploading and storing method and device, storage medium and vehicle

Country Status (1)

Country Link
CN (1) CN114584550A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105141868A (en) * 2015-07-28 2015-12-09 北京奇虎科技有限公司 Video data protection system and security protection and transmission methods for each concerned end
CN107562841A (en) * 2017-08-25 2018-01-09 北京智行鸿远汽车有限公司 A kind of Fatfs systems based on MPC5748 chip EMMC cards
CN107786383A (en) * 2016-08-30 2018-03-09 北京国双科技有限公司 The sending method and device of heartbeat data packets
CN110262836A (en) * 2019-04-29 2019-09-20 华为技术有限公司 Built-in multimedia device and communication equipment for Vehicle telematics processor
CN110956716A (en) * 2018-09-27 2020-04-03 上海博泰悦臻网络技术服务有限公司 Vehicle-based image acquisition method, transmission method, device, vehicle, system and medium
CN111145389A (en) * 2019-12-31 2020-05-12 中国第一汽车股份有限公司 Vehicle data management method and system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105141868A (en) * 2015-07-28 2015-12-09 北京奇虎科技有限公司 Video data protection system and security protection and transmission methods for each concerned end
CN107786383A (en) * 2016-08-30 2018-03-09 北京国双科技有限公司 The sending method and device of heartbeat data packets
CN107562841A (en) * 2017-08-25 2018-01-09 北京智行鸿远汽车有限公司 A kind of Fatfs systems based on MPC5748 chip EMMC cards
CN110956716A (en) * 2018-09-27 2020-04-03 上海博泰悦臻网络技术服务有限公司 Vehicle-based image acquisition method, transmission method, device, vehicle, system and medium
CN110262836A (en) * 2019-04-29 2019-09-20 华为技术有限公司 Built-in multimedia device and communication equipment for Vehicle telematics processor
CN111145389A (en) * 2019-12-31 2020-05-12 中国第一汽车股份有限公司 Vehicle data management method and system

Similar Documents

Publication Publication Date Title
US7873956B2 (en) Communication terminal and communication network for partially updating software, software update method, and software creation device and method therefor
CN110888662A (en) Vehicle remote silent upgrading method and device, vehicle and storage medium
CN109783123A (en) Vehicle-mounted T-BOX terminal and firmware upgrade method
CN108650287B (en) Upgrading method and device for terminal device in Internet of things and computer readable medium
CN110908682B (en) Firmware upgrading method and system for vehicle controller, vehicle and storage medium
CN110825411B (en) Upgrading method and device for TWS (two way satellite System) earphone system and computer-readable storage medium
CN109391673A (en) A kind of method, system and the terminal device of management update file
CN111787098B (en) Earphone upgrading method and device, earphone and storage medium
CN112714158A (en) Transaction processing method, relay network, cross-link gateway, system, medium, and device
CN108121560A (en) Difference bag upgrade method, device, terminal and computer readable storage medium
CN109165194B (en) Data unloading method and device, electronic equipment and storage medium
CN106453571A (en) Data migration method and terminal
CN113672254A (en) Vehicle OTA (over the air) upgrading method and device, storage medium and unmanned equipment
CN111142885B (en) eSIM equipment management method, device, equipment and storage medium
CN113132906B (en) Virtual positioning identification method and device, storage medium and electronic equipment
CN115129574A (en) Code testing method and device
CN112463067A (en) Data protection method and equipment in NVMe-oF scene
CN113037850A (en) Application program upgrading method and device, electronic equipment and storage medium
CN114584550A (en) Vehicle data uploading and storing method and device, storage medium and vehicle
WO2023116104A1 (en) Configuration parameter updating method and apparatus, and related device
CN114385215B (en) Software upgrading method and system
CN111404897A (en) Message distribution method and device, storage medium and electronic equipment
CN111131358A (en) Information acquisition method, device and system, readable storage medium and electronic equipment
CN115328520A (en) Remote upgrading method and device, electronic equipment and storage medium
CN113986315A (en) Software upgrading method and device, electronic equipment and computer readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination