Disclosure of Invention
The embodiment of the application provides a data uploading method and device, a vehicle-mounted terminal, an electronic device and a storage medium, and can solve the problems that network transmission cost is high when data are uploaded in real time in the related art, and transmission time is too long due to too large data volume. The technical scheme is as follows:
on one hand, a data uploading method is provided, which is applied to a vehicle-mounted terminal, and the method comprises the following steps:
in the running process of a vehicle, when a data transmission request sent by any sensor deployed on the vehicle is detected, running information carried in the data transmission request is stored in a first local storage medium of the vehicle-mounted terminal;
when it is detected that the stored travel information in the first local storage medium is not less than a first target data amount, packaging the stored travel information into a plurality of data packets, and storing the plurality of data packets in the first local storage medium;
and when the number of the plurality of data packets is not less than a first target number, copying the plurality of data packets from the first local storage medium to an external storage medium of the vehicle-mounted terminal.
In a possible implementation manner, when a data transmission request sent by any sensor deployed on a vehicle is detected, storing driving information carried in the data transmission request in a first local storage medium of the vehicle-mounted terminal includes:
for any sensor deployed on the vehicle, when a data transmission request sent by the sensor is detected, analyzing the data transmission request;
acquiring the driving information carried in the data transmission request;
and storing the running information to the first local storage medium according to the time stamp of the running information.
In another possible implementation manner, when it is detected that the stored travel information in the first local storage medium reaches a target size, the packaging the stored travel information into a plurality of data packets includes:
detecting the data amount of the running information stored in the first local storage medium;
when the data volume of the stored driving information is not less than the first target data volume, acquiring a second target data volume;
segmenting the stored driving information according to the second target data volume to obtain a plurality of data segments;
and packaging each data fragment to obtain a plurality of data packets.
In another possible implementation manner, after packing each data fragment to obtain a plurality of data packets, the method further includes: and deleting the stored running information.
In another possible implementation, the travel information and the plurality of data packets are stored at different locations in the first local storage medium.
In another aspect, a data uploading method is provided, which is applied to an electronic device, and the method includes:
when the access operation of any external storage medium is detected, determining the copying sequence of the external storage medium;
storing a plurality of data packets stored in the external storage medium into a local storage medium of the electronic equipment according to the copying sequence;
and when the number of the stored data packets in the second local storage medium of the electronic equipment is not less than the second target number, uploading the stored data packets to a data center server.
In another possible implementation manner, the determining, when an access operation of any external storage medium is detected, a copy sequence of the external storage medium includes:
acquiring a vehicle identifier of a vehicle corresponding to the external storage medium;
and determining the copying sequence of the external storage medium according to the vehicle identification.
In another possible implementation manner, when the number of stored data packets in the second local storage medium is not less than the second target number, uploading the stored data packets to a data center server includes:
acquiring uploading sequence information corresponding to each data packet in the stored data packets, wherein the uploading sequence information comprises at least one of vehicle identification, storage time and acquisition time period;
and sequentially sending the stored data packets to a data center server according to the uploading sequence information.
In another aspect, a data uploading system is provided, where the data uploading system includes: the system comprises a vehicle-mounted terminal, an external storage medium, electronic equipment and a data center server;
the vehicle-mounted terminal is used for packaging driving information acquired by a sensor deployed on a vehicle into a plurality of data packets and storing the data packets into the external storage medium;
the external storage medium is used for storing the plurality of data packets into a second local storage medium of the electronic equipment when the electronic equipment is accessed;
the electronic device is configured to upload the plurality of data packets stored in the second local storage medium to the data center server.
In another aspect, a data uploading device is provided, and is characterized in that the device is applied to a vehicle-mounted terminal, and the device includes:
the vehicle-mounted terminal comprises a first storage module, a second storage module and a control module, wherein the first storage module is used for storing running information carried in a data transmission request into a first local storage medium of the vehicle-mounted terminal when the data transmission request sent by any sensor deployed on a vehicle is detected in the running process of the vehicle;
the packaging module is used for packaging the stored running information into a plurality of data packets and storing the data packets in the first local storage medium when the fact that the running information stored in the first local storage medium is not smaller than a first target data volume is detected;
and the copying module is used for copying the plurality of data packets from the first local storage medium to an external storage medium of the vehicle-mounted terminal when the number of the plurality of data packets is not less than a first target number.
In a possible implementation manner, the first storage module is further configured to, for any sensor deployed on the vehicle, parse a data transmission request sent by the sensor when the data transmission request is detected; acquiring the driving information carried in the data transmission request; and storing the running information to the first local storage medium according to the time stamp of the running information.
In another possible implementation manner, the packaging module is further configured to detect a data amount of the driving information stored in the first local storage medium; when the data volume of the stored driving information is not less than the first target data volume, acquiring a second target data volume; segmenting the stored driving information according to the second target data volume to obtain a plurality of data segments; and packaging each data fragment to obtain a plurality of data packets.
In another possible implementation manner, the apparatus further includes: and the deleting module is used for deleting the stored running information.
In another possible implementation, the travel information and the plurality of data packets are stored at different locations in the first local storage medium.
In another aspect, a data uploading apparatus is provided, and is applied to an electronic device, where the apparatus includes:
the system comprises a determining module, a copying module and a copying module, wherein the determining module is used for determining the copying sequence of any external storage medium when the access operation of the external storage medium is detected;
the second storage module is used for storing the plurality of data packets stored in the external storage medium into a local storage medium of the electronic equipment according to the copying sequence;
and the uploading module is used for uploading the stored data packets to a data center server when the number of the stored data packets in a second local storage medium of the electronic equipment is not less than a second target number.
In another possible implementation manner, the determining module is further configured to obtain a vehicle identifier of a vehicle corresponding to the external storage medium; and determining the copying sequence of the external storage medium according to the vehicle identification.
In another possible implementation manner, the upload module is further configured to acquire upload sequence information corresponding to each of the stored data packets, where the upload sequence information includes at least one of a vehicle identifier, a storage time, and an acquisition time period; and sequentially sending the stored data packets to a data center server according to the uploading sequence information.
In another aspect, a vehicle-mounted terminal is provided, wherein the vehicle-mounted terminal includes one or more processors and one or more memories, and the one or more memories store at least one instruction, and the instruction is loaded and executed by the one or more processors to implement the operation performed by the data uploading method.
In another aspect, a computer-readable storage medium is provided, which is applied to a vehicle-mounted terminal, and stores at least one instruction, where the instruction is loaded and executed by a processor to implement the operation performed by the data uploading method.
In another aspect, a server is provided, wherein the vehicle-mounted terminal includes one or more processors and one or more memories, and at least one instruction is stored in the one or more memories, and the instruction is loaded and executed by the one or more processors to implement the operation performed by the data uploading method.
In another aspect, a computer-readable storage medium is provided, which is applied to an electronic device, and has at least one instruction stored therein, where the instruction is loaded and executed by a processor to implement the operations performed by the data uploading method.
According to the method provided by the embodiment of the application, the vehicle-mounted terminal packs the driving information collected by the sensor to obtain a plurality of data packets, the data packets are stored in the external storage medium, so that the data do not need to be uploaded in real time, a better wireless transmission environment is not needed, the plurality of data packets are uploaded by the electronic equipment, the transmission cost is lower, the speed is high, the data volume transmitted in unit time is large, and the transmission time can be effectively reduced.
Detailed Description
To make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
Fig. 1 is a schematic system framework diagram of a data upload system provided in an embodiment of the present application, and as shown in fig. 1, the data upload system includes: the system comprises a vehicle-mounted terminal 101, an external storage medium 102, an electronic device 103 and a data center server 104.
The vehicle-mounted terminal 101 is installed on a vehicle supporting automatic driving, and the vehicle-mounted terminal 101 is configured to package driving information collected by a sensor deployed on the vehicle into a plurality of data packets, and store the plurality of data packets in the external storage medium 102. The external storage medium 102 is any removable storage medium, such as a mobile hard disk, which can be connected to the in-vehicle terminal 101, and the external storage medium 102 is configured to store the plurality of data packets into a second local storage medium of the electronic device 103 when the electronic device 103 is accessed. The electronic device 103 may be a terminal or a server, the electronic device 103 may be deployed in a garage of a vehicle, and the electronic device 103 is configured to upload the plurality of data packets stored in the second local storage medium to the data center server 104. The data center server 104 is configured to receive a plurality of data packets uploaded by at least one electronic device 103, and analyze driving information in the plurality of data packets.
Fig. 2 is a flowchart of a data uploading method provided in an embodiment of the present application, and referring to fig. 2, the method is applied to a vehicle-mounted terminal, and includes:
201. when the vehicle-mounted terminal detects a data transmission request sent by any sensor deployed on the vehicle in the driving process of the vehicle, the driving information carried in the data transmission request is stored in a first local storage medium of the vehicle-mounted terminal.
202. When detecting that the driving information stored in the first local storage medium is not less than the first target data volume, the vehicle-mounted terminal packs the stored driving information into a plurality of data packets and stores the plurality of data packets in the first local storage medium.
203. And when the number of the plurality of data packets is not less than the first target number, the vehicle-mounted terminal copies the plurality of data packets from the first local storage medium to an external storage medium of the vehicle-mounted terminal.
According to the method provided by the embodiment of the application, the vehicle-mounted terminal packs the driving information collected by the sensor to obtain the plurality of data packets, and then copies the plurality of data packets to the external storage medium, so that data do not need to be uploaded in real time, a better wireless transmission environment is not needed, and the driving information can be acquired.
In one possible implementation manner, when a data transmission request sent by any sensor deployed on a vehicle is detected, storing driving information carried in the data transmission request in a first local storage medium of a vehicle-mounted terminal, includes:
for any sensor deployed on the vehicle, when a data transmission request sent by the sensor is detected, the data transmission request is analyzed;
acquiring the driving information carried in the data transmission request;
and storing the running information to a first local storage medium according to the time stamp of the running information.
In another possible implementation manner, when it is detected that the stored travel information in the first local storage medium reaches the target size, the packaging the stored travel information into a plurality of data packets includes:
detecting the data volume of the running information stored in the first local storage medium;
when the data volume of the stored driving information is not less than the first target data volume, acquiring a second target data volume;
segmenting the stored driving information according to a second target data volume to obtain a plurality of data segments;
and packaging each data fragment to obtain a plurality of data packets.
In another possible implementation manner, after packing each data fragment to obtain a plurality of data packets, the method further includes: the stored travel information is deleted.
In another possible implementation, the travel information is stored in a different location in the first local storage medium than the plurality of data packets.
Fig. 3 is a flowchart of another data uploading method provided in an embodiment of the present application, and referring to fig. 3, the method is applied to an electronic device, and includes:
301. when the electronic equipment detects the access operation of any external storage medium, the electronic equipment determines the copying sequence of the external storage medium.
302. And the electronic equipment stores the plurality of data packets stored in the external storage medium into a local storage medium of the electronic equipment according to the copying sequence.
303. And when the number of the stored data packets in the second local storage medium of the electronic equipment is not less than the second target number, the electronic equipment uploads the stored data packets to the data center server.
In the embodiment of the application, the plurality of data packets stored in the accessed external storage medium are uploaded to the data center through the electronic equipment, so that the transmission cost is low, the speed is high, the data volume transmitted in unit time is large, and the transmission time can be effectively reduced.
In one possible implementation manner, when an access operation of any external storage medium is detected, determining a copy sequence of the external storage medium includes:
acquiring a vehicle identifier of a vehicle corresponding to an external storage medium;
and determining the copying sequence of the external storage medium according to the vehicle identification.
In another possible implementation manner, when the number of stored data packets in the second local storage medium is not less than the second target number, uploading the stored data packets to the data center server includes:
acquiring uploading sequence information corresponding to each data packet in the stored data packets, wherein the uploading sequence information comprises at least one of vehicle identification, storage time and acquisition time period;
and sequentially sending the stored data packets to the data center server according to the uploading sequence information.
Fig. 4 is a flowchart of a method for implementing data upload by each device in the data upload system provided in the embodiment of the present application, and referring to fig. 4, the method includes:
401. when the vehicle-mounted terminal detects a data transmission request sent by any sensor deployed on the vehicle in the driving process of the vehicle, the driving information carried in the data transmission request is stored in a first local storage medium of the vehicle-mounted terminal.
In the embodiment of the present application, the vehicle may be an autonomous vehicle, and a variety of sensors may be disposed on the autonomous vehicle, such as a camera, a millimeter wave radar, a laser radar, a speed sensor, an acceleration sensor, a temperature sensor, a humidity sensor, and the like. The state information of the surrounding environment and the state information of the vehicle itself, such as temperature, wind speed, vehicle speed, the number of surrounding vehicles, the number of kilometers traveled, the number of remaining fuel, etc., may be collected in real time by the various sensors during the travel of the vehicle. In the embodiment of the present application, the above-mentioned state information is collectively referred to as driving information collected by a sensor.
In one possible implementation, the in-vehicle terminal may store the travel information according to a time stamp of the travel information. Correspondingly, the steps can be as follows: for any sensor deployed on the vehicle, when detecting a data transmission request sent by the sensor, the vehicle-mounted terminal may analyze the data transmission request and obtain the driving information carried in the data transmission request. The in-vehicle terminal may store the travel information to the first local storage medium according to the time stamp of the travel information.
The vehicle-mounted terminal can start a plurality of analysis servers through a plurality of threads, each analysis server analyzes one data transmission request to obtain the running information carried in each data transmission request, and the vehicle-mounted terminal can respectively store the running information obtained in a period of time into a first local storage medium of the vehicle-mounted terminal according to the sequence of the timestamps.
For example, when the temperature sensor acquires the current ambient temperature a, the ambient temperature a and the acquisition time a thereof are sent to the in-vehicle terminal through a data transmission request, and when the speed sensor acquires the current running speed B, the running speed B and the acquisition time B thereof are sent to the in-vehicle terminal through a data transmission request. The vehicle-mounted terminal obtains the ambient temperature A, the acquisition time a, the running speed B and the acquisition time B after analysis, and the vehicle-mounted terminal stores the ambient temperature A and the acquisition time a in a hard disk of the vehicle-mounted terminal and stores the running speed B and the acquisition time B in the hard disk of the vehicle-mounted terminal because the acquisition time B is later than the acquisition time a.
402. When detecting that the driving information stored in the first local storage medium is not less than the first target data volume, the vehicle-mounted terminal packs the stored driving information into a plurality of data packets and stores the plurality of data packets in the first local storage medium.
In the embodiment of the application, the vehicle-mounted terminal can detect the data volume of the stored driving information in the first local storage medium in real time, and when the stored driving information is detected to be not less than the first target data volume, the vehicle-mounted terminal can start the corresponding packaging service. The packaging service can be a service provided in the vehicle-mounted terminal system and can also be a service provided by an application program installed in the vehicle-mounted terminal. Wherein the first target data amount is the lowest data amount that triggers the packaging service.
In one possible implementation manner, the vehicle-mounted terminal may perform real-time detection and data packaging on the data amount of the driving information stored in the first local storage medium by the application program. That is, the vehicle-mounted terminal may have an application program for data packaging installed therein, and the application program may detect the data amount of the stored travel information in real time, and package the stored travel information when a packaging condition is satisfied, that is, the stored travel information is not less than the first target data amount.
In a possible implementation manner, the vehicle-mounted terminal may package the stored driving information into data packets with the same size, and accordingly, this step may be: the in-vehicle terminal detects the data amount of the travel information stored in the first local storage medium. The vehicle-mounted terminal acquires a second target data volume when the data volume of the stored running information is not less than the first target data volume. And the vehicle-mounted terminal divides the stored running information according to a second target data volume to obtain a plurality of data fragments. And the vehicle-mounted terminal packs each data fragment to obtain a plurality of data packets.
It should be noted that the travel information and the plurality of packets obtained by packaging may be stored in different locations in the first local storage medium. To facilitate lookup and unloading.
The in-vehicle terminal may delete the stored travel information after obtaining the plurality of packets. Thus, the storage space of the vehicle-mounted terminal can be saved.
403. And when the number of the plurality of data packets is not less than the first target number, the vehicle-mounted terminal copies the plurality of data packets from the first local storage medium to an external storage medium of the vehicle-mounted terminal.
In the embodiment of the application, the vehicle-mounted terminal may be connected to an external storage medium, where the external storage medium may be a mobile hard disk, a mobile magnetic disk, or another removable storage medium. The external storage medium can be removed from the vehicle-mounted terminal at any time, and data stored in the first local storage medium is not affected. The external storage medium can be connected with the vehicle-mounted terminal through a data transmission cable or an equipment interface configured on the vehicle-mounted terminal.
The vehicle-mounted terminal can detect the number of the data packets stored in the first local storage medium, and when the number of the stored data packets reaches a first target number, the vehicle-mounted terminal can start the copy service and copy all the stored data packets to the external storage medium. The replication server is similar to the packaging service, and may be provided by the vehicle-mounted terminal, or by an application installed on the vehicle-mounted terminal, which is not described herein again. When the number of the stored data packets reaches the first target number, the vehicle-mounted terminal can change the packet to copy when the copying speed is higher than the data packet generating speed, and multiple waiting caused by insufficient number of the data packets which are not copied of the vehicle-mounted terminal is avoided.
In a possible implementation manner, the vehicle-mounted terminal may further mark any data packet after copying the data packet to the external storage medium, so as to avoid repeated copying of the data packet. Correspondingly, the vehicle-mounted terminal can copy the data packet after obtaining any data, namely, the vehicle-mounted terminal does not wait for the number of the data packets to reach the first target number. After any data is obtained, the data packet is copied, so that when the generation speed of the data packet is higher than the copying speed, the vehicle-mounted terminal can be prevented from accumulating excessive uncopied data packets.
It should be noted that the external storage medium may be removed from the in-vehicle terminal by a worker or a transfer device, and then the external device is connected to the electronic device. Wherein, the transfer device can be arranged at the same place with the electronic device, and the electronic device controls the transfer device.
For example, when the vehicle finishes the driving task and returns to the garage, the transfer device may remove the mobile hard disk installed on the vehicle, then transfer the mobile hard disk to the location where the electronic device is located, and access the mobile hard disk to the electronic device, such as a hard disk interface of a plug-in server. Or the above operation is performed by a worker instead of the transferring apparatus.
404. When the electronic equipment detects the access operation of any external storage medium, the electronic equipment determines the copying sequence of the external storage medium.
In this embodiment, the electronic device may be a terminal or a server, and the electronic device may access a plurality of external storage media simultaneously. The server can detect whether the external storage media are accessed in real time, for example, the detection is performed by a device access service, and when an access operation of any external storage media is detected, the electronic device can determine a copying sequence of the external storage media.
In one possible implementation, the electronic device may determine the order of copying based on the vehicle identification. Correspondingly, the steps are as follows: the electronic device may obtain a vehicle identifier of a vehicle corresponding to the external storage medium. The electronic device may determine a replication sequence of the external storage medium based on the vehicle identification.
For example, the electronic device is configured to receive a data packet corresponding to travel information of 10 vehicles, and since the 10 vehicles need to travel in a certain order during the travel process, data collected by each vehicle has a correlation, so as to store the correlated data in a relatively close position. The electronic device can determine the vehicle identifier 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 corresponding to the external storage medium when the external storage medium corresponding to each vehicle accesses. And copying the data in the external storage medium according to the sequence of the vehicle identifications.
In a possible implementation manner, the electronic device may further sequentially obtain at least one data packet included in each external storage medium according to an access sequence of the external storage medium. That is, the vehicle identifier of the vehicle corresponding to the external storage medium is not considered, but is accessed and copied firstly. Therefore, the transmission of the data packet corresponding to the running information of other vehicles is prevented from being influenced when one vehicle fails or returns on time.
In one possible implementation, the electronic device may initiate at least one data replication service based on multi-threading, each data replication service for handling one accessed external storage medium. Due to the adoption of the multithreading technology, the electronic equipment can simultaneously process a plurality of accessed external storage media, so that the time for copying data is saved.
It should be noted that the electronic device may be located in a highly automated garage that is used to manage vehicles within a range of areas. The electronic device can directly send the acquired multiple data packets to a remote data center server. Alternatively, the electronic device may be disposed in a regional data center, the regional data center is connected to a plurality of garages, and the electronic device may monitor the external storage media accessed in each garage, and then execute step 405 and step 406.
405. And the electronic equipment stores the plurality of data packets stored in the external storage medium into a local storage medium of the electronic equipment according to the copying sequence.
In this embodiment of the application, after determining the copy sequence, the electronic device may sequentially copy and store the data packets stored in the accessed external storage medium to a second local storage medium of the electronic device according to the copy sequence.
It should be noted that the electronic device may further process and analyze the plurality of data packets in the second local storage medium. Correspondingly, the steps can be as follows: the electronic equipment unpacks the plurality of data packets to obtain the driving information of at least one vehicle. The electronic device can perform data cleaning or data screening on the driving information. And the electronic equipment analyzes the residual running information after screening.
406. And when the number of the stored data packets in the second local storage medium of the electronic equipment is not less than the second target number, the electronic equipment uploads the stored data packets to the data center server.
In the embodiment of the application, the electronic device may determine the uploading opportunity based on the number of stored data packets. Correspondingly, the steps can be as follows: the electronic equipment acquires uploading sequence information corresponding to each data packet in the stored data packets, wherein the uploading sequence information comprises at least one of vehicle identification, storage time and acquisition time period. The electronic device can sequentially send the stored data packets to the data center server according to the uploading sequence information.
For example, when the upload sequence information is the vehicle identifier, the electronic device may upload a plurality of data packets corresponding to one vehicle and then upload a data packet corresponding to another vehicle according to the sequence of the vehicle identifier. When the uploading sequence information is the storage time, the electronic device may upload the data packets in sequence according to the storage time of the data packets and according to the time sequence. When the uploading sequence is the collection time period, the electronic device may determine the uploading sequence of the corresponding data packets according to the collection time period of the driving information. Of course, the electronic device may also determine the uploading order of each data packet according to a plurality of information.
In one possible implementation manner, the electronic device may send the plurality of data packets stored in the second local storage medium to the data center server every fixed time period. The fixed time period may be daily or weekly, and the embodiment of the present application is not limited.
In one possible implementation, the electronic device may also determine the timing for sending the plurality of data packets according to a network condition. For example, the electronic device may determine a current network transmission speed, and when the network transmission speed is not less than the target transmission speed, the electronic device may send the plurality of data packets stored in the second local storage medium to the data center server; when the network transmission speed is less than the target transmission speed, the electronic device may suspend transmission of the data packet.
In one possible implementation, the electronic device may also determine whether to send the data packet to the data center server according to the number of unsent data packets. For example, the electronic device may determine the number of data packets that are not currently transmitted, and when the number is not less than the target number, the electronic device may transmit a plurality of data packets included in the second local storage medium to the data center server; when the number is smaller than the target number, the electronic device may continue to obtain the data packets from the accessed external storage medium.
It should be noted that the electronic device can support breakpoint transmission, and when the network is suddenly blocked, the electronic device can continue to send the data packet that is not sent completely.
It should be noted that, as shown in fig. 5, the flow chart of the travel information in the above steps 401 to 406 may be shown, in fig. 5, the travel information flows from the plurality of sensors to the vehicle-mounted terminal, flows from the vehicle-mounted terminal to the external storage medium, flows from the external storage medium to the electronic device, that is, flows to the regional data center, and finally flows from the electronic device to the data center server, where the data center server is a general central data center server and is used for receiving the data packets sent by the plurality of regional data centers.
It should be noted that the above steps 401 to 406 are an implementation manner of the data uploading method, and the flow of the data uploading method may also be simplified to the data uploading flow shown in fig. 6. As shown in fig. 6, the sensors collect the driving information, the vehicle-mounted terminals package the driving information to obtain data packets, the electronic device, i.e., the regional data center, sends the data packets to the data center server, and the data center server summarizes the data packets of the plurality of regional data centers.
According to the method provided by the embodiment of the application, in the driving process of the vehicle, the vehicle-mounted terminal receives and stores driving information acquired by a sensor deployed on the vehicle in real time, the stored driving information is packaged to obtain a plurality of data packets, and the plurality of data packets are copied to an external storage medium from a first local storage medium of the vehicle-mounted terminal. The electronic equipment sends a plurality of data packets contained in an external storage medium connected with the electronic equipment to a data center server. Because the vehicle-mounted terminal packs a plurality of data packets that the information of traveling that the sensor gathered obtains, store in external storage medium for do not need real-time upload data, just also do not need better wireless transmission environment, and, upload through being carried out a plurality of data packets by electronic equipment, make the cost of transmission lower, and fast, the data bulk of transmission in the unit interval is big, and can effectually reduce the transmission consuming time.
Fig. 7 is a schematic structural diagram of a data uploading device provided in an embodiment of the present application, and is applied to a vehicle-mounted terminal, and referring to fig. 7, the device includes: a first storage module 701, a packing module 702, and a copying module 703.
The first storage module 701 is used for storing running information carried in a data transmission request into a first local storage medium of a vehicle-mounted terminal when the data transmission request sent by any sensor deployed on a vehicle is detected in the running process of the vehicle;
a packaging module 702, configured to package, when it is detected that the stored travel information in the first local storage medium is not less than the first target data amount, the stored travel information into a plurality of data packets, and store the plurality of data packets in the first local storage medium;
the copying module 703 is configured to copy, when the number of the plurality of data packets is not less than the first target number, the plurality of data packets from the first local storage medium to an external storage medium of the vehicle-mounted terminal.
In a possible implementation manner, the first storage module 701 is further configured to, for any sensor deployed on the vehicle, parse the data transmission request when detecting the data transmission request sent by the sensor; acquiring the driving information carried in the data transmission request; and storing the running information to a first local storage medium according to the time stamp of the running information.
In another possible implementation manner, the packaging module 702 is further configured to detect a data amount of the driving information stored in the first local storage medium; when the data volume of the stored driving information is not less than the first target data volume, acquiring a second target data volume; segmenting the stored driving information according to a second target data volume to obtain a plurality of data segments; and packaging each data fragment to obtain a plurality of data packets.
In another possible implementation manner, the apparatus further includes: and the deleting module is used for deleting the stored running information.
In another possible implementation, the travel information is stored in a different location in the first local storage medium than the plurality of data packets.
By the device provided by the embodiment of the application, in the driving process of the vehicle, the vehicle-mounted terminal receives and stores driving information acquired by the sensors deployed on the vehicle in real time, the stored driving information is packaged to obtain a plurality of data packets, and the plurality of data packets are copied to the external storage medium from the first local storage medium of the vehicle-mounted terminal. The vehicle-mounted terminal packs the driving information acquired by the sensor to obtain a plurality of data packets, and then copies the data packets to the external storage medium, so that data do not need to be uploaded in real time, a better wireless transmission environment is not needed, and the driving information can be acquired.
Fig. 8 is a schematic structural diagram of another data uploading apparatus provided in an embodiment of the present application, and is applied to a server, and referring to fig. 8, the apparatus includes: a determination module 801, a second storage module 802, and an upload module 803.
A determining module 801, configured to determine, when an access operation of any external storage medium is detected, a copy sequence of the external storage medium;
a second storage module 802, configured to store, according to the copy sequence, the multiple data packets stored in the external storage medium into a local storage medium of the electronic device;
an uploading module 803, configured to upload the stored data packets to a data center server when the number of the stored data packets in the second local storage medium of the electronic device is not less than the second target number.
In another possible implementation manner, the determining module 801 is further configured to obtain a vehicle identifier of a vehicle corresponding to the external storage medium; and determining the copying sequence of the external storage medium according to the vehicle identification.
In another possible implementation manner, the uploading module 803 is further configured to obtain uploading sequence information corresponding to each data packet in the stored data packets, where the uploading sequence information includes at least one of a vehicle identifier, a storage time, and an acquisition time period; and sequentially sending the stored data packets to a data center server according to the uploading sequence information.
In the embodiment of the application, the plurality of data packets stored in the accessed external storage medium are uploaded to the data center through the electronic equipment, so that the transmission cost is low, the speed is high, the data volume transmitted in unit time is large, and the transmission time can be effectively reduced.
All the above optional technical solutions may be combined arbitrarily to form optional embodiments of the present application, and are not described herein again.
It should be noted that: in the data uploading device provided in the above embodiment, only the division of the above functional modules is taken as an example for data uploading, and in practical applications, the above function distribution may be completed by different functional modules according to needs, that is, the internal structure of the vehicle-mounted terminal or the server is divided into different functional modules to complete all or part of the above described functions. In addition, the embodiments of the data uploading method provided by the above embodiments belong to the same concept, and specific implementation processes thereof are described in the embodiments of the method for details, which are not described herein again.
Fig. 9 is a schematic structural diagram of an in-vehicle terminal according to an embodiment of the present application. The in-vehicle terminal 900 may be: portable vehicle-mounted terminals, laptop vehicle-mounted terminals, desktop vehicle-mounted terminals, and the like.
In general, the in-vehicle terminal 900 includes: one or more processors 901 and one or more memories 902.
Processor 901 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and so forth. The processor 901 may be implemented in at least one hardware form of a DSP (digital signal processing), an FPGA (field-programmable gate array), and a PLA (programmable logic array). The processor 901 may also include a main processor and a coprocessor, where the main processor is a processor for processing data in an awake state, and is also called a Central Processing Unit (CPU); a coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor 901 may be integrated with a GPU (graphics processing unit) which is responsible for rendering and drawing the content required to be displayed on the display screen. In some embodiments, the processor 901 may further include an AI (artificial intelligence) processor for processing computing operations related to machine learning.
Memory 902 may include one or more computer-readable storage media, which may be non-transitory. The memory 902 may also include high-speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In some embodiments, a non-transitory computer readable storage medium in the memory 902 is used to store at least one instruction for execution by the processor 901 to implement the data uploading method provided by the method embodiments in the present application.
In some embodiments, the vehicle-mounted terminal 900 may further include: a peripheral interface 903 and at least one peripheral. The processor 901, memory 902, and peripheral interface 903 may be connected by buses or signal lines. Various peripheral devices may be connected to the peripheral interface 903 via a bus, signal line, or circuit board. Specifically, the peripheral device includes: at least one of radio frequency circuitry 904, a display screen 905, and a power supply 906.
The peripheral interface 903 may be used to connect at least one peripheral related to I/O (input/output) to the processor 901 and the memory 902. In some embodiments, the processor 901, memory 902, and peripheral interface 903 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 901, the memory 902 and the peripheral interface 903 may be implemented on a separate chip or circuit board, which is not limited in this application.
The radio frequency circuit 904 is used for receiving and transmitting RF (radio frequency) signals, also called electromagnetic signals. The radio frequency circuitry 904 communicates with communication networks and other communication devices via electromagnetic signals. The radio frequency circuit 904 converts an electrical signal into an electromagnetic signal to transmit, or converts a received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 904 comprises: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a subscriber identity module card, and so forth. The radio frequency circuitry 904 may communicate with other vehicle terminals via at least one wireless communication protocol. The wireless communication protocols include, but are not limited to: metropolitan area networks, various generation mobile communication networks (2G, 3G, 4G, and 5G), wireless local area networks, and/or WiFi (wireless fidelity) networks. In some embodiments, the radio frequency circuit 904 may further include NFC (near field communication) related circuits, which are not limited in this application.
The display screen 905 is used to display a UI (user interface). The UI may include graphics, text, icons, video, and any combination thereof. When the display screen 905 is a touch display screen, the display screen 905 also has the ability to capture touch signals on or over the surface of the display screen 905. The touch signal may be input to the processor 901 as a control signal for processing. At this point, the display 905 may also be used to provide virtual buttons and/or a virtual keyboard, also referred to as soft buttons and/or a soft keyboard. In some embodiments, the display screen 905 may be one, and is provided with a front panel of the in-vehicle terminal 900; in other embodiments, the number of the display screens 905 may be at least two, and each of the display screens is disposed on a different surface of the in-vehicle terminal 900 or is in a folding design; in still other embodiments, the display 905 may be a flexible display disposed on a curved surface or a folded surface of the in-vehicle terminal 900. Even more, the display screen 905 may be arranged in a non-rectangular irregular figure, i.e. a shaped screen. The display panel 905 may be made of LCD (liquid crystal display), OLED (organic light-emitting diode), or other materials.
The power supply 906 is used to supply power to various components in the in-vehicle terminal 900. The power source 906 may be alternating current, direct current, disposable batteries, or rechargeable batteries.
Those skilled in the art will appreciate that the configuration shown in fig. 9 does not constitute a limitation of the in-vehicle terminal 900, and may include more or fewer components than those shown, or combine some components, or employ a different arrangement of components.
Fig. 10 is a schematic structural diagram of an electronic device according to an embodiment of the present application, where the electronic device 1000 may generate a relatively large difference due to different configurations or performances, and may include one or more processors (CPUs) 1001 and one or more memories 1002, where the memory 1002 stores at least one instruction, and the at least one instruction is loaded and executed by the processors 1001 to implement the methods provided by the method embodiments. Of course, the server may also have components such as a wired or wireless network interface, a keyboard, and an input/output interface, so as to perform input/output, and the server may also include other components for implementing the functions of the device, which are not described herein again.
In an exemplary embodiment, a computer-readable storage medium applied to a vehicle-mounted terminal is also provided, for example, a memory including instructions executable by a processor to perform the data uploading method in the above embodiments. For example, the computer-readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a Compact Disc Read-Only Memory (CD-ROM), a magnetic tape, a floppy disk, an optical data storage device, and the like.
In an exemplary embodiment, a computer-readable storage medium applied to an electronic device, such as a memory, including instructions executable by a processor to perform the data uploading method in the above embodiments is also provided. For example, the computer-readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a Compact Disc Read-Only Memory (CD-ROM), a magnetic tape, a floppy disk, an optical data storage device, and the like.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is only exemplary of the present application and should not be taken as limiting, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the protection scope of the present application.