Method and system for sampling and converting vehicular network data
10949443 ยท 2021-03-16
Assignee
Inventors
Cpc classification
H03M7/30
ELECTRICITY
G06F16/215
PHYSICS
H04L67/565
ELECTRICITY
H04L67/10
ELECTRICITY
H04L67/12
ELECTRICITY
International classification
G06F7/00
PHYSICS
H03M7/30
ELECTRICITY
G06F16/215
PHYSICS
Abstract
A method for sampling and converting vehicular network data is executed by a vehicle host. The vehicle host selects one of multiple data signals from an original signal, and establishes a data table. The vehicle host further determines whether the original signal includes any data signal remaining unselected. When the original signal does not include any data signal remaining unselected, the vehicle host differentially samples data in the data table corresponding to other time sequences by using the data in the data table corresponding to a first time sequence as a reference to generate a differential data table, and compresses the differential data table. The method can reduce the amount of data by performing differential sampling, so that the compression ratio of the data can be effectively improved, and the delay of data transmission can be avoided.
Claims
1. A method for sampling and converting vehicular network data, comprising steps of: receiving an original signal; wherein the original signal includes a plurality of data signals; selecting one of the data signals from the original signal; establishing a data table according to the selected one of the data signals; determining whether the original signal includes any data signal remaining unselected; when the original signal includes any data signal remaining unselected, selecting another one of the data signals from the data signals of the original signal remaining unselected; when all of the data signals included in the original signal are selected, differentially sampling data in the data table corresponding to other time sequences by using the data in the data table corresponding to a first time sequence as a reference to generate a differential data table, compressing the differential data table, and uploading the compressed differential data table.
2. The method for sampling and converting the vehicular network data as claimed in claim 1, wherein the original signal is a Controller Area Network (CAN) signal.
3. The method for sampling and converting the vehicular network data as claimed in claim 2, wherein the step of establishing a data table according to the selected one of the data signals further comprises sub-steps of: decoding an identification data of the selected one of the data signals; determining whether the decoded identification data of the selected one of the data signals is stored in an identification data table; when the decoded identification data of the selected one of the data signals is stored in the identification data table, selecting a content data table corresponding to the decoded identification data, and storing time data and content data of the selected one of the data signals into the selected content data table.
4. The method for sampling and converting the vehicular network data as claimed in claim 3, wherein the step of establishing a data table according to the selected one of the data signals further comprises sub-steps of: when the decoded identification data of the selected one of the data signals is unsaved in the identification data table, storing the decoded identification data into the identification data table, establishing a new content data table corresponding to the decoded identification data, selecting the new content data table, and storing time data and content data of the selected one of the data signals into the selected content data table.
5. The method for sampling and converting the vehicular network data as claimed in claim 1, wherein the original signal is a Light Detection and Ranging (Lidar) signal.
6. The method for sampling and converting the vehicular network data as claimed in claim 5, wherein the step of establishing a data table according to the selected one of the data signals further comprises sub-steps of: establishing a distance data table and a reflectance data table corresponding to time data of the selected one of the data signals according to the selected one of the data signals.
7. The method for sampling and converting the vehicular network data as claimed in claim 6, wherein when all of the data signals included in the original signal are selected, the method further includes firstly transforming the distance data table and the reflectance data table according to Discrete Cosine Transform (DCT), secondly differentially sampling the distance data table and the reflectance data table corresponding to other time sequences by using the distance data table and the reflectance data table corresponding to a first time sequence as a reference to generate a differential distance data table and a differential reflectance data table, thirdly compressing the differential distance data table and the differential reflectance data table, and fourthly uploading the compressed differential distance data table and the compressed differential reflectance data table.
8. A system for sampling and converting vehicular network data, comprising: a vehicle bus, receiving an original signal; wherein the original signal includes a plurality of data signals; a vehicle host, electrically connected to the vehicle bus to receive the original signal, and selecting one of the data signals from the original signal; wherein the vehicle host further establishes a data table according to the selected one of the data signals, and determines whether the original signal includes any data signal remaining unselected; wherein when the original signal includes any data signal remaining unselected, the vehicle host selects another one of the data signals from the data signals of the original signal remaining unselected; wherein when all of the data signals included in the original signal are selected, the vehicle host differential samples data in the data table corresponding to other time sequences by using the data in the data table corresponding to a first time sequence as a reference to generate a differential data table, and compresses the differential data table; a network module, electrically connected to the vehicle host; wherein when the vehicle host compresses the differential data table, the vehicle host further uploads the compressed differential data table to a cloud server.
9. The system for sampling and converting the vehicular network data as claimed in claim 8, wherein the original signal is a Controller Area Network (CAN) signal.
10. The system for sampling and converting the vehicular network data as claimed in claim 9, wherein when the vehicle host establishes the data table according to the selected one of the data signals, the vehicle host further decodes an identification data of the selected one of the data signals, and determines whether the decoded identification data of the selected one of the data signals is stored in an identification data table; wherein when the decoded identification data of the selected one of the data signals is stored in the identification data table, the vehicle host selects a content data table corresponding to the decoded identification data, and stores time data and content data of the selected one of the data signals into the selected content data table.
11. The system for sampling and converting the vehicular network data as claimed in claim 10, wherein when the decoded identification data of the selected one of the data signals is unsaved in the identification data table, the vehicle host further stores the decoded identification data into the identification data table, establishes a new content data table corresponding to the decoded identification data, selects the new content data table, and stores time data and content data of the selected one of the data signals into the selected content data table.
12. The system for sampling and converting the vehicular network data as claimed in claim 8, further comprising: a Light Detection and Ranging (Lidar), electrically connected to the vehicle host; wherein the original signal is a Lidar signal generated by the Lidar.
13. The system for sampling and converting the vehicular network data as claimed in claim 12, wherein when the vehicle host establishes the data table according to the selected one of the data signals, the vehicle host further establishes a distance data table and a reflectance data table corresponding to time data of the selected one of the data signals according to the selected one of the data signals.
14. The system for sampling and converting the vehicular network data as claimed in claim 13, wherein when all of the data signals included in the original signal are selected, the vehicle host firstly transforms the distance data table and the reflectance data table according to Discrete Cosine Transform (DCT), secondly differentially samples the distance data table and the reflectance data table corresponding to other time sequences by using the distance data table and the reflectance data table corresponding to a first time sequence as a reference to generate a differential distance data table and a differential reflectance data table, thirdly compresses the differential distance data table and the differential reflectance data table, and fourthly uploads the compressed differential distance data table and the compressed differential reflectance data table to the cloud server.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
(1)
(2)
(3)
(4)
(5)
(6)
(7)
(8)
(9)
(10)
(11)
(12)
(13)
DETAILED DESCRIPTION OF THE INVENTION
(14) With reference to
(15) receiving an original signal (S101); wherein the original signal includes a plurality of data signals;
(16) selecting one of the data signals from the original signal (S102);
(17) establishing a data table according to the selected one of the data signals (S103);
(18) determining whether the original signal includes any data signal remaining unselected (S104);
(19) when the original signal includes any data signal remaining unselected, selecting another one of the data signals from the data signals of the original signal remaining unselected (S105);
(20) when the original signal does not include any data signal remaining unselected, differentially sampling data in the data table corresponding to other time sequences by using the data in the data table corresponding to a first time sequence as a reference to generate a differential, data table (S106), compressing the differential data table (S107), and uploading the compressed differential data table (S108).
(21) The method for sampling and converting the vehicular network data of the present invention firstly differential samples data in the data table corresponding to other time sequences by using the data in the data table corresponding to the first time sequence as the reference to generate the differential data table, and secondly compresses and uploads the differential data table. Therefore, an amount of data of the differential data table is less than the amount of data of the data table or the amount of data of the original signal. Further, a compression ratio of the original signal is increased, the complexity of the pre-operation is reduced, and the delay of information transmission can also be avoided. Moreover, the present invention can also be applied to Light Detection and Ranging (Lidar) data.
(22) In the embodiment, the method for sampling and converting the vehicular network data is executed by a vehicle host to compress the original signal of a vehicle, and to increase the compression ratio of the original signal. Therefore, a speed rate for uploading the original signal to a cloud server can be increased. Further, in the step S107, the differential data table is compressed by the Huffman coding, the Arithmetic coding, the Symbol coding, or the Codebook coding, to encode binary data of the differential data table.
(23) For example, the data table is [y.sub.1 y.sub.2 y.sub.3 . . . y.sub.n].sup.T, [y.sub.1].sup.T is the data in the data table corresponding to the first time sequence, and the differential data table is [y.sub.1 y.sub.2y.sub.1 y.sub.3y.sub.2 . . . y.sub.ny.sub.n-1].sup.T. Further, since the amount of differential data is less than the amount of original data, such as y.sub.ty.sub.t-1<<t.sub.t, the amount of data of the differential data table is less than the amount of data of the data table or the amount of data of the original signal. Moreover, the compression ratio of the original signal is increased, the complexity of the pre-operation is reduced, and the delay of data transmission can also be avoided. For further example, the data table is [10000 10005 10006 10010 10012].sup.T, and the differential data table is [10000 5 1 4 2].sup.T.
(24) With reference to
(25) decoding an identification data of the selected one of the data signals (S2031);
(26) determining whether the decoded identification data of the selected one of the data signals is stored in an identification data table (S2032);
(27) when the decoded identification data of the selected one of the data signals is stored in the identification data table, selecting a content data table corresponding to the decoded identification data (S2033), and storing time data and content data of the selected one of the data signals into the selected content data table (S2034);
(28) when the decoded identification data of the selected one of the data signals is not stored in the identification data table, storing the decoded identification data into the identification data table, establishing a new content data table corresponding to the decoded identification data, selecting the new content data table (S2035), and storing time data and content data of the selected one of the data signals into the selected content data table (S2034).
(29) In addition, in the second embodiment, when the original signal does not include any data signal remaining unselected, the method further includes steps of:
(30) differentially sampling data in the data table corresponding to other time sequences by using the data in the data table corresponding to the first time sequence as a reference to generate the differential data table (S206), compressing the differential data table (S207), and uploading the identification data table and the compressed differential data table (S208).
(31) With reference to
(32) For example, with reference to
(33) When the vehicle host 11 receives the CAN signal and selects one of the data signals 401 from the CAN signal, the vehicle host 11 decodes the identification data of the selected one of the data signals 401. The vehicle host 11 further determines whether the decoded identification data of the selected one of the data signals is stored in the identification data table. Further with reference to
(34) For example, the vehicle host 11 determines that the identification data is CID.sub.0. Since CID.sub.0 has been stored in the identification data table 500, the vehicle host 11 selects the content data table corresponding to CID.sub.0. With reference to
(35) However, when the vehicle host 11 determines that the identification data has not been stored in the identification data table, the identification data is generated by an undetermined controller. Namely, the data signal corresponding to the undetermined controller has not been stored. Therefore, the vehicle host 11 stores the identification data, such as CID.sub.n, DLC.sub.n, into the identification data table, establishes a new content data table 60 corresponding to the identification data, and stores time data, such as Timestamp.sub.0, and content data, such as Data.sub.00 to Data.sub.07, of the selected one of the data signals into the new content data table 600 corresponding to CID.sub.n.
(36) Through the above-mentioned method for establishing the content data table 600, the original data can be converted into a data space based on time, space and data code, thereby effectively reducing data disorder.
(37) In addition, the data in the content data table 600 are arranged in the order of the time data. The data signal generated by the controller of the CAN 14 is time-varying, such as the speed of the vehicle, and the data stored in the content data table 600 corresponds to the same controller. Therefore, the data signals generated by the same controller are arranged in time series according to the time data, and the data of each controller can be clearly recorded.
(38) Moreover, when the vehicle host 11 differentially samples data in the data table, the vehicle host 11 uses the data in the data table corresponding to the first time sequence as the reference, and the vehicle host 11 differentially samples the data in the data table corresponding to other time sequences except for the first time sequence. For example, when the vehicle host 11 differentially samples the content data table 600 shown in
(39) For example, the differential time data in the differential data table 600a are t.sub.1=Timestamp.sub.1Timestamp.sub.0, t.sub.2=Timestamp.sub.2Timestamp.sub.1, . . . , etc, and differential content data in the differential data table 600a are D.sub.10=Data.sub.10Data.sub.00, and D.sub.20=Data.sub.20Data.sub.10, . . . , etc.
(40) With reference to
(41) establishing a distance data table and a reflectance data table corresponding to time data of the selected one of the data signals according to the selected one of the data signals (S8031).
(42) Further, when the original signal does not include the data signal remaining unselected, the method further includes firstly transforming the distance data table and the reflectance data table according to Discrete Cosine Transform (DCT) (S806), secondly differentially sampling the distance data table and the reflectance data table corresponding to other time sequences by using the distance data table and the reflectance data table corresponding to a first time sequence as a reference to generate a differential distance data table and a differential reflectance data table (S807), thirdly compressing the differential distance data table and the differential reflectance data table (S808), and fourthly uploading the compressed differential distance data table and the compressed differential reflectance data table (S809).
(43) With reference to
(44) For example, with reference to
(45) When the vehicle host 11 receives the Lidar signal 900 and selects one of the content signals 901, the vehicle host 11 firstly processes, the 0.sup.th direction angle content data to generate the distance data table 1000 as shown in
(46) The distance data table 1000 is taken as an example. The content data 9011 includes 0.sup.th direction angle content data, 1.sup.st direction angle content data, 2.sup.nd direction angle content data, . . . , n.sup.th direction angle content data, for representing data corresponding to different direction angles. The 0.sup.th direction angle content data, 1.sup.st direction angle content data, 2.sup.nd direction angle content data, . . . , n.sup.th direction angle content data, each include 0.sup.th layer distance data, 0.sup.th layer reflectance data, 1.sup.st layer distance data, 1.sup.st layer reflectance data, . . . , m.sup.th layer distance data, and m.sup.th layer reflectance data. Therefore, the 0.sup.th direction angle content data, 1.sup.st direction angle content data, 2.sup.nd direction angle content data, . . . , and n.sup.th direction angle content data each can establish one completed distance data table 1000 and one completed reflectance data table.
(47) When the distance data table is established, the number of the layer of the distance data is taken as the vertical axis of the distance data table, and the direction angle data corresponding to the distance data is taken as the horizontal axis of the distance data table. For example, the 0.sup.th layer distance data of the 0.sup.th direction angle content data is stored as D.sub.0,0 in the distance data table 1000, and the 15.sup.th layer distance data of the 0.sup.th direction angle content data is stored as D.sub.15,0 in the distance data table 1000. Further, the 15.sup.th layer distance data of the 364.sup.th direction angle content data is stored as D.sub.15,364 in the distance data table 1000. Since the content data 9011 is each respectively corresponding to the time data, the distance data tables 1000 are also each respectively corresponding to the time data t.sub.0 to t.sub.2.
(48) The manner in which the reflection data table 1100 is established is the same as the manner in which the distance data table 1000 is established, and details are not described herein again.
(49) When all the data signals have been selected, and the corresponding distance data tables 1000 and the corresponding reflection data tables 1100 are established, the vehicle host 11 further respectively performs the DCT to the distance data tables 1000 and the reflection data tables 1100. Therefore, the distance data tables 1000 and the reflection data tables 1100 are converted from the time domain into the frequency domain.
(50) In the embodiment, the DCT is performed by the following formula:
(51)
(52) f(i,j) represents the data in the distance data tables 1000 and the reflection data tables 1100.
(53) For example, with reference to
(54)
(55) Therefore, the data F.sub.0,0 to F.sub.15,364 of the distance data table 1100a in the frequency domain each can be calculated.
(56) The content data 9011 is each respectively corresponding to the time data. Further, the distance data tables 1000 can be each respectively established according to the content data 9011, and the reflection data tables 1100 can be each respectively established according to the content data 9011. Therefore, with reference to
(57) Moreover, the distance data tables 1000a, 1000b, 1000c in the frequency domain can also each respectively correspond to the time data t.sub.0 to t.sub.2. With reference to
(58) For example, the data Fa.sub.0,0 to Fa.sub.N-1,M-1 in the distance data table 1000c corresponding to the time sequence t.sub.1 can be shown as: Fa.sub.0,0=Fb.sub.0,0F.sub.0,0, Fa.sub.0,1=Fb.sub.0,1F.sub.0,1, . . , etc.
(59) Fb.sub.i,j represents the original data in the distance data table 1000b in the frequency domain.
(60) In addition, the vehicle host 11 can further determine whether the data in the differential distance data table 1000a and the differential reflectance data table are greater than a threshold value. The vehicle host 11 replaces the data which are less than the threshold value in the differential distance data table 1000a and the differential reflectance data table for 0. Therefore, the amount of the data in the differential distance data tables 1000b, 1000c can be further reduced.
(61) Since the content data 9011 of the Lidar signal 900 each represents a plane scanned by the Lidar 15, the content data 9011 can allow a certain degree of distortion without affecting subsequent use. Namely, when the vehicle host 11 replaces the data which are less than the threshold value for 0, the data which are less than the threshold value are deleted, and a small portion of the plane scanned by the Lidar 15 will disappear. The data which are less than the threshold value may be noise or some tiny objects. Therefore, when the vehicle host 11 replaces the data which are less than the threshold value for 0, the amount of data can be further reduced without affecting the subsequent use of the data.
(62) In summary, the present invention mainly uses differential sampling, or represents data by a frequency domain base. The important data can be retained in data whose amount is reduced. Therefore, the original data may not be necessary to be recorded or be compressed, and the amount of the data can be reduced to improve sampling rate of the vehicular network data.
(63) Even though numerous characteristics and advantages of the present invention have been set forth in the foregoing description, together with details of the structure and function of the invention, the disclosure is illustrative only. Changes may be made in detail, especially in matters of shape, size, and arrangement of parts within the principles of the invention to the full extent indicated by the broad general meaning of the terms in which the appended claims are expressed.