WO2019184000A1 - Data transmission method, apparatus, and vehicle-mounted device - Google Patents

Data transmission method, apparatus, and vehicle-mounted device Download PDF

Info

Publication number
WO2019184000A1
WO2019184000A1 PCT/CN2018/082025 CN2018082025W WO2019184000A1 WO 2019184000 A1 WO2019184000 A1 WO 2019184000A1 CN 2018082025 W CN2018082025 W CN 2018082025W WO 2019184000 A1 WO2019184000 A1 WO 2019184000A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
parameter
code
data transmission
protocol
Prior art date
Application number
PCT/CN2018/082025
Other languages
French (fr)
Chinese (zh)
Inventor
郑乐银
王辉耀
方杰
Original Assignee
深圳市沃特沃德股份有限公司
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 深圳市沃特沃德股份有限公司 filed Critical 深圳市沃特沃德股份有限公司
Publication of WO2019184000A1 publication Critical patent/WO2019184000A1/en

Links

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/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07CTIME OR ATTENDANCE REGISTERS; REGISTERING OR INDICATING THE WORKING OF MACHINES; GENERATING RANDOM NUMBERS; VOTING OR LOTTERY APPARATUS; ARRANGEMENTS, SYSTEMS OR APPARATUS FOR CHECKING NOT PROVIDED FOR ELSEWHERE
    • G07C5/00Registering or indicating the working of vehicles
    • G07C5/008Registering or indicating the working of vehicles communicating information to a remotely located station
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/06Notations for structuring of protocol data, e.g. abstract syntax notation one [ASN.1]

Definitions

  • the present invention relates to the field of in-vehicle technology, and in particular, to a data transmission method, apparatus, and in-vehicle device.
  • the in-vehicle device can upload the vehicle alarm data and the real-time data of the vehicle to the server.
  • the data can be acquired in real time.
  • the in-vehicle device uploads data to the server in a fixed protocol format, and the type of parameters and the order of parameters of each upload are fixed.
  • the protocol stipulates that each of the four parameters of longitude, latitude, speed, and mileage is uploaded, and the four parameters must be sorted in order, otherwise the server cannot resolve.
  • the main object of the present invention is to provide a data transmission method, device and in-vehicle device, which aims to improve the flexibility of data transmission, save data traffic and bandwidth resources, and reduce the burden on the server.
  • an embodiment of the present invention provides a data transmission method, where the method includes the following steps:
  • the protocol data is transmitted out.
  • the step of synthesizing the parameter, the code, and the general data into protocol data according to a preset protocol format includes:
  • the content data and the universal data are combined into the protocol data.
  • the step of combining the code and the parameter into content data comprises:
  • the step of combining the content data and the universal data into the protocol data comprises: inserting the content data into a location between two general data, combined into the protocol data.
  • the two general data are a device number and a verification value, respectively.
  • the parameter has at least one parameter, and each parameter corresponds to a code.
  • the step of acquiring the code corresponding to the parameter to be transmitted further includes:
  • the target parameter detection function is added
  • a corresponding code is assigned to the target parameter.
  • the step of acquiring the code corresponding to the parameter to be transmitted further includes:
  • the parameters are obtained when the conditions of the transmission parameters are met.
  • the step of detecting whether the condition of the transmission parameter is met includes:
  • the step of detecting whether the condition of the transmission parameter is met includes:
  • the embodiment of the invention simultaneously provides a data transmission device, the device comprising:
  • a code acquisition module configured to obtain a code corresponding to the parameter to be transmitted
  • a data synthesizing module configured to synthesize the parameter, the code, and general data into protocol data according to a preset protocol format
  • a data transmission module configured to transmit the protocol data outward.
  • the data synthesizing module includes:
  • a first combination unit configured to combine the code and the parameter into content data
  • a second combining unit is arranged to combine the content data and the universal data into the protocol data.
  • the first combining unit is configured to: before the parameter is placed in the parameter, form a character string.
  • the second combining unit is configured to insert the content data into a position between two common data, and combine the data into the protocol data.
  • the device further includes a function opening module, where the function opening module includes:
  • An allocation unit configured to assign a corresponding code to the target parameter.
  • the device further includes a parameter obtaining module, where the parameter obtaining module includes:
  • a detecting unit configured to detect whether a condition of the transmission parameter is satisfied
  • the acquisition unit is set to acquire the parameters when the conditions of the transmission parameters are met.
  • the detecting unit includes:
  • the first determining unit is configured to determine, according to the preset time rule, whether the current transmission parameter is reached;
  • the first determining unit is configured to determine a condition that the transmission parameter is satisfied if the time at which the transmission parameter is currently reached.
  • the detecting unit includes:
  • the second determining unit is configured to determine whether the parameter reaches the warning value according to the preset warning rule
  • the second determining unit is configured to determine a condition that the transmission parameter is satisfied if the parameter reaches the warning value.
  • Embodiments of the present invention also provide an in-vehicle device including a memory, a processor, and at least one application stored in the memory and configured to be executed by the processor, the application being configured to be used for The aforementioned data transmission method is performed.
  • a data transmission method provided by an embodiment of the present invention, by assigning a corresponding code to a parameter, and using the code to parse the type of the identification parameter, so that the in-vehicle device does not need to transmit a fixed type of parameter every time, but needs to transmit according to actual conditions.
  • the parameters thus increasing the flexibility of data transmission, saving data traffic and bandwidth resources, reducing the burden on the server.
  • the user can also add a new parameter detection function as needed, and the in-vehicle device only needs to assign a code to the newly added parameters, thereby greatly improving the scalability of the function.
  • FIG. 1 is a flow chart of a first embodiment of a data transmission method of the present invention
  • Figure 3 is a flow chart showing a second embodiment of the data transmission method of the present invention.
  • FIG. 4 is a block diagram showing a first embodiment of a data transmission device of the present invention.
  • FIG. 5 is a block diagram of the data synthesizing module of Figure 4.
  • FIG. 6 is a block diagram of a parameter acquisition module of FIG. 4;
  • Figure 7 is a block diagram of the detecting unit of Figure 6;
  • Figure 8 is a block diagram of the detecting unit of Figure 6;
  • Figure 9 is a block diagram showing a second embodiment of the data transmission device of the present invention.
  • Figure 10 is a block diagram of the function opening module in Figure 9.
  • terminal and terminal device used herein include both a wireless signal receiver device, a device having only a wireless signal receiver without a transmitting capability, and a receiving and transmitting hardware.
  • Such devices may include cellular or other communication devices having a single line display or a multi-line display or a cellular or other communication device without a multi-line display; PCS (Personal Communications) Service, personal communication system), which can combine voice, data processing, fax and/or data communication capabilities; PDA (Personal Digital Assistant), which can include radio frequency receiver, pager, Internet/Intranet access, network Browser, notepad, calendar and/or GPS (Global Positioning System) receiver; conventional laptop and/or palmtop computer or other device with and/or conventional lap including radio frequency receiver Type and / or palmtop or other device.
  • PCS Personal Communications
  • PDA Personal Digital Assistant
  • terminal may be portable, transportable, installed in a vehicle (aviation, sea and/or land), or adapted and/or configured to operate locally, and/or Run in any other location on the Earth and/or space in a distributed form.
  • the "terminal” and “terminal device” used herein may also be a communication terminal, an internet terminal, a music/video playing terminal, and may be, for example, a PDA, a MID (Mobile Internet Device), and/or have a music/video playback.
  • Functional mobile phones can also be smart TVs, set-top boxes and other devices.
  • the server used herein includes, but is not limited to, a computer, a network host, a single network server, a plurality of network server sets, or a cloud composed of a plurality of servers.
  • the cloud is composed of a large number of computers or network servers based on Cloud Computing, which is a kind of distributed computing, a super virtual computer composed of a group of loosely coupled computers.
  • communication can be implemented by any communication means between the server, the terminal device and the WNS server, including but not limited to, mobile communication based on 3GPP, LTE, WIMAX, and computer network communication based on TCP/IP and UDP protocols. And short-range wireless transmission based on Bluetooth and infrared transmission standards.
  • the data transmission method of the embodiment of the present invention is mainly applied to an in-vehicle device, and may be applied to other electronic devices, such as a smart home device, a mobile terminal, a personal computer, etc., which is not limited by the present invention.
  • a smart home device such as a smart home device, a mobile terminal, a personal computer, etc.
  • a personal computer such as a personal computer, etc.
  • the following is a detailed description of the application to the in-vehicle device.
  • the method includes the following steps:
  • the in-vehicle device assigns a corresponding code to each parameter.
  • the in-vehicle device acquires a code corresponding to the parameter to be transmitted.
  • the parameters for each transmission may be one type, or two or more types. When at least two types of parameters are used, the codes of each type of parameters are respectively obtained.
  • the parameters are such as speed, mileage, longitude, dimension, tire pressure, ignition/extinguish status, and the like.
  • the code may be numbers, letters, symbols, etc., such as 01, 02, 03, AA, BB, and the like.
  • the parameters include speed, ignition/extinguishing state, tire pressure, longitude, latitude, etc., and their corresponding codes are 01, 02, 03, 04, 05, and so on.
  • the in-vehicle device further acquires parameters that need to be transmitted. Specifically, the in-vehicle device detects whether the condition of the transmission parameter is met, and when the condition of the transmission parameter is met, the parameter is acquired.
  • the in-vehicle device transmits only once when the user is successfully registered (or when the in-vehicle device and the external device are successfully connected for the first time), that is, when the user registration is successfully detected.
  • the in-vehicle device determines the condition that the parameter of the transmission hardware data is satisfied.
  • the in-vehicle device When the parameter is the car software version (such as the car phone Bluetooth version, the car system version), the in-vehicle device is transmitted once when the user is successfully registered (or when the in-vehicle device and the external device are successfully connected for the first time), whenever the software version is updated. Then, transfer it again. That is, when it is detected that the user registration is successful (or the in-vehicle device is successfully connected to the external device for the first time) or the software version is updated, the in-vehicle device determines the condition that the parameter of the transmission car software version is satisfied.
  • the in-vehicle device determines the condition that the parameter of the transmission car software version is satisfied.
  • the system sets the warning value according to the actual situation, the user can also set the warning value according to the actual needs, and according to the warning value production alert rule, the vehicle device determines the vehicle alarm data according to the preset warning rule. Whether the parameter reaches the warning value, when the warning value is reached, the condition that the parameter of the transmission vehicle alarm data is satisfied is determined.
  • the condition that the transmission speed data is satisfied is determined to perform the overspeed alarm; when the acceleration exceeds the warning value, the condition that the transmission acceleration is satisfied is determined to perform the sudden acceleration and deceleration alarm; when the position data ( If the latitude and longitude exceeds the warning value, the condition that the transmission position data is satisfied is determined to perform an electronic fence alarm.
  • the in-vehicle device can upload the trip data according to the user's ignition/extinguish as a trip. That is, when it is detected that the vehicle is switched from the ignition state to the flameout state, the condition that the parameter of the transmission stroke data is satisfied is determined.
  • the in-vehicle device determines whether the current time of transmitting the real-time data of the vehicle is reached according to a preset time rule, and if so, the determination is satisfied.
  • the time rules are, for example, periodic transmissions or scheduled transmissions, such as transmissions every 30 seconds, transmissions once or some times a day, and the like.
  • the embodiment of the invention presets a protocol format, including a composition format of the content data and a composition format of the final protocol data.
  • the in-vehicle device first combines the code and parameters into content data, such as placing the code before the parameter to form a string, or of course placing the code after the parameter.
  • the in-vehicle device then combines the content data and the general data into protocol data, such as inserting the content data into a location between the two general data, combined into protocol data.
  • the format of the protocol data is as follows:
  • the protocol data includes general data and content data, and the general data includes a start character, a protocol number, a device number, a verification value, a time, and a terminator, and the content data is inserted between the device number and the verification value. It can also be inserted into other locations as needed, which is not limited by the present invention.
  • the length range is 00-FF; for the ignition/extinguish state, it needs to be converted to binary, 0 and 1, respectively, such as 0 for flameout, 1 for ignition; for tire pressure, need to be converted to Octal, length range is 0000-FFFF; for longitude, keep decimal, the length is fixed to ten, the first three digits are the number before the decimal point, the last digit 1 represents the east longitude, 0 represents the west longitude, and vice versa, such as 1139207991 represents the east longitude 113.920799.
  • the in-vehicle device uploads protocol data to the server, and the server parses the protocol data into user data according to a preset protocol format, and stores the data, and then sends the user to the terminal device actively or according to the request of the user terminal device. data.
  • the terminal device receives the user data and outputs it, as shown on the display.
  • the server parses the protocol data into: start character 28, protocol number 01, device number 656565, content data 030050, verification value 68, time 180203 142723, and terminator 29.
  • the content data 030050 03 represents the tire pressure
  • 0050 is the octal data
  • 80 is converted to decimal, indicating that the tire pressure is 80 kPa
  • time 180203 142723 represents 14:27:23 on February 3, 2018.
  • the content data in the foregoing protocol data only includes one parameter of the tire pressure.
  • the content data may also include two or more parameters, because each parameter has a corresponding code, so the server can parse different parameters according to the code. .
  • the user can install a specific application (APP) on the terminal device, log in to the server through the application, register the account, and bind the corresponding vehicle and the in-vehicle device, and the in-vehicle device, the server, and the terminal device sequentially establish a communication connection, and To transmit data, of course, the in-vehicle device can also establish a communication connection with the terminal device.
  • APP specific application
  • the in-vehicle device can also directly send the protocol data to the terminal device of the user.
  • the terminal device After receiving the protocol data, the terminal device parses the protocol data according to the preset protocol format, obtains the user data, and outputs the data, such as in the display. Displayed on the screen.
  • the in-vehicle device is more flexible in transmitting data, and only needs necessary data to be transmitted according to actual needs at a time, thereby reducing the amount of data transmission, saving data traffic and bandwidth resources, and reducing the pressure on the server.
  • step S11 the following steps are further included:
  • the user can customize the detection function of adding some parameters.
  • the in-vehicle device receives the request for the detection function of the new target parameter, the target parameter detection function is added, and the corresponding code is assigned to the target parameter.
  • the user installs a tire pressure peripheral for the vehicle, and the tire pressure peripheral data is communicated with the vehicle device through a USB interface or a serial port.
  • the terminal device receives the user's instruction to turn on the tire pressure detection function through the application, and displays to the user all the peripheral devices that the current software version can adapt, and the user selects the corresponding peripheral device.
  • the terminal device sends a request to the server to turn on the tire pressure detecting function, and the server forwards the request to the in-vehicle device.
  • the on-board device analyzes whether the basic function of the vehicle includes the tire pressure detection function.
  • the tire pressure detection function is added in the basic function of the vehicle, and the corresponding code is assigned to the tire pressure, and the basic function is also The tire pressure detection function is associated with the tire pressure activation code in the real-time data module. Subsequent real-time data modules will increase the detection of tire pressure, and the vehicle-mounted equipment will add the tire pressure data to the real-time data of the vehicle and upload it to the server.
  • the user enters the vehicle machine page through the terminal device or refreshes the page, and the terminal device sends a request to the server to acquire the real-time data of the vehicle, and displays it to the user, and the user can view the real-time data of the vehicle including the tire pressure. If the vehicle does not actually install a peripheral or cancel a peripheral, the corresponding data will not be displayed.
  • the user can add peripherals to the vehicle according to actual needs, thereby increasing the corresponding parameter detection function and improving the scalability of the function.
  • the code is used to analyze the type of the identification parameter, so that the in-vehicle device does not need to transmit a fixed type of parameter every time, but transmits the required parameter according to the actual situation, so Increased data transmission flexibility, saving data traffic and bandwidth resources, reducing the burden on the server.
  • the user can also add a new parameter detection function as needed, and the in-vehicle device only needs to assign a code to the newly added parameters, thereby greatly improving the scalability of the function.
  • the transmission data can be adapted to the actual peripherals or adjusted according to the actual requirements of the user, more user-friendly transmission of data, strong applicability, unlimited data peripherals.
  • the apparatus includes a code acquisition module 10, a data synthesis module 20, and a data transmission module 30.
  • the code acquisition module 10 is configured to acquire a parameter to be transmitted.
  • the data synthesizing module 20 is configured to synthesize parameters, codes, and general data into protocol data according to a preset protocol format; and the data transmission module 30 is configured to transmit protocol data to the outside.
  • a corresponding code is assigned to each parameter.
  • the code acquisition module 10 acquires a code corresponding to the parameter to be transmitted.
  • the parameters of each transmission may be one type or two or more types. When at least two parameters are used, the code acquisition module 10 acquires codes of each type of parameters respectively.
  • the parameters are such as speed, mileage, longitude, dimension, tire pressure, ignition/extinguish status, and the like.
  • the code may be numbers, letters, symbols, etc., such as 01, 02, 03, AA, BB, and the like.
  • the parameters include speed, ignition/extinguishing state, tire pressure, longitude, latitude, etc., and their corresponding codes are 01, 02, 03, 04, 05, and so on.
  • the embodiment of the invention presets a protocol format, including a composition format of the content data and a composition format of the final protocol data.
  • the data synthesizing module 20 includes a first combining unit 21 and a second combining unit 22, wherein: the first combining unit 21 is arranged to combine code and parameters into content data, such as placing a code before the parameter, Forming a string, of course, the code can be placed after the parameter; the second combining unit 22 is configured to combine the content data and the general data into protocol data, such as inserting the content data into a position between two common data, combining For protocol data.
  • the format of the protocol data is as follows:
  • the protocol data includes general data including a start character, a protocol number, a device number, a verification value, a time, and a terminator, and the second combining unit 22 can insert the content data into two common data of the device number and the verification value.
  • the position between the two can be inserted into other positions as needed, which is not limited by the present invention.
  • the first combining unit 21 Since the original data of the acquired parameters is a decimal or state value, before combining the code and the parameters into the content data, the first combining unit 21 also needs to perform some conversion on the parameters according to the actual situation. For example: for speed, it needs to be converted to octal, the length range is 00-FF; for the ignition/extinguish state, it needs to be converted to binary, 0 and 1, respectively, such as 0 for flameout, 1 for ignition; for tire pressure, need to be converted to Octal, length range is 0000-FFFF; for longitude, keep decimal, the length is fixed to ten, the first three digits are the number before the decimal point, the last digit 1 represents the east longitude, 0 represents the west longitude, and vice versa, such as 1139207991 represents the east longitude 113.920799.
  • the data transmission module 30 uploads protocol data to the server, and the server parses the protocol data into user data according to a preset protocol format, and stores the data, and then actively or according to the request of the user terminal device, to the terminal device. Send user data.
  • the terminal device receives the user data and outputs it, as shown on the display.
  • the server parses the protocol data into: start character 28, protocol number 01, device number 656565, content data 030050, verification value 68, time 180203 142723, and terminator 29.
  • the content data 030050 03 represents the tire pressure
  • 0050 is the octal data
  • 80 is converted to decimal, indicating that the tire pressure is 80 kPa
  • time 180203 142723 represents 14:27:23 on February 3, 2018.
  • the content data in the foregoing protocol data only includes one parameter of the tire pressure.
  • the content data may also include two or more parameters, because each parameter has a corresponding code, so the server can parse different parameters according to the code. .
  • the data transmission module 30 can also directly send the protocol data to the terminal device of the user. After receiving the protocol data, the terminal device parses the protocol data according to the preset protocol format, acquires the user data, and outputs the data, such as Displayed on the display.
  • the apparatus further includes a parameter acquisition module 40 configured to acquire parameters that need to be transmitted.
  • the parameter obtaining module 40 includes a detecting unit 41 and an obtaining unit 42 as shown in FIG. 6, wherein: the detecting unit 41 is configured to detect whether the condition of the transmission parameter is met; and the obtaining unit 42 is configured to satisfy the condition of the transmission parameter. When, get the parameters.
  • the in-vehicle device transmits only once when the user is successfully registered (or when the in-vehicle device and the external device are successfully connected for the first time), that is, the detecting unit 41 detects the user.
  • the registration is successful (or when the in-vehicle device and the external device are successfully connected for the first time)
  • the condition for satisfying the parameter of transmitting the hardware data of the vehicle is determined.
  • the in-vehicle device When the parameter is the car software version (such as the car phone Bluetooth version, the car system version), the in-vehicle device is transmitted once when the user is successfully registered (or when the in-vehicle device and the external device are successfully connected for the first time), whenever the software version is updated. Then, transfer it again. That is, when the detecting unit 41 detects that the user registration is successful (or the first connection between the in-vehicle device and the external device is successful) or the software version is updated, the in-vehicle device determines the condition that the parameter of the transmission car software version is satisfied.
  • the detecting unit 41 detects that the user registration is successful (or the first connection between the in-vehicle device and the external device is successful) or the software version is updated.
  • the in-vehicle device can upload the trip data according to the user's ignition/extinguish as a trip. That is, when the detecting unit 41 detects that the vehicle is switched from the ignition state to the flameout state, it determines the condition that the parameter of the transmission stroke data is satisfied.
  • the detecting unit 41 includes a first determining unit 411 and a first determining unit 412, as shown in FIG. 7, wherein: the first determining unit 411, configured to determine, according to a preset time rule, whether the current time of transmitting the real-time data of the vehicle is reached.
  • the first determining unit 412 is configured to determine that the transmission is satisfied if the time of transmitting the real-time data of the vehicle is reached.
  • the real-time data of the vehicle is the condition of this parameter.
  • the time rules are, for example, periodic transmissions or scheduled transmissions, such as transmissions every 30 seconds, transmissions once or some times a day, and the like.
  • the system sets the warning value according to the actual situation.
  • the user can also set the warning value according to the actual needs and produce the warning rule according to the warning value.
  • the detecting unit 41 includes a second determining unit 413 and a second determining unit 414, wherein: the second determining unit 413 is configured to determine whether the parameter reaches the warning value according to the preset warning rule; The determining unit 414 is configured to determine that the condition of the transmission parameter is satisfied if the parameter reaches the warning value.
  • the second determining unit 414 determines that the condition of the transmission speed data is satisfied to perform the overspeed alarm; when the acceleration exceeds the warning value, the second determining unit 414 determines that the condition of the transmission acceleration is satisfied.
  • the position data such as latitude and longitude
  • the second determining unit 414 determines that the condition of the transmission position data is satisfied to perform the electronic fence alarm.
  • the in-vehicle device is more flexible in transmitting data, and only needs necessary data to be transmitted according to actual needs at a time, thereby reducing the amount of data transmission, saving data traffic and bandwidth resources, and reducing the pressure on the server.
  • the device further includes a function opening module 50.
  • the function opening module 50 includes an adding unit 51 and an allocating unit 52. , wherein: the adding unit 51 is configured to increase the target parameter detecting function when receiving the request for the detecting function of the newly added target parameter; the assigning unit 52 is configured to allocate the corresponding code for the target parameter.
  • the user can add peripherals to the vehicle according to actual needs, thereby increasing the corresponding parameter detection function and improving the scalability of the function.
  • the data transmission device of the embodiment of the present invention by assigning a corresponding code to a parameter, and using the code to analyze the type of the identification parameter, so that the in-vehicle device does not need to transmit a fixed type of parameter every time, but needs to transmit according to actual conditions.
  • the parameters thus increasing the flexibility of data transmission, saving data traffic and bandwidth resources, reducing the burden on the server.
  • the user can also add a new parameter detection function as needed, and the in-vehicle device only needs to assign a code to the newly added parameters, thereby greatly improving the scalability of the function.
  • the invention also proposes an in-vehicle device comprising a memory, a processor and at least one application stored in the memory and configured to be executed by the processor, the application being configured to execute a data transmission method.
  • the data transmission method includes the following steps: acquiring a code corresponding to a parameter to be transmitted; synthesizing the parameter, the code, and the general data into protocol data according to a preset protocol format; and transmitting the protocol data to the outside.
  • the data transmission method described in this embodiment is the data transmission method in the foregoing embodiment of the present invention, and details are not described herein again.
  • the present invention includes apparatus that is directed to performing one or more of the operations described herein. These devices may be specially designed and manufactured for the required purposes, or may also include known devices in a general purpose computer. These devices have computer programs stored therein that are selectively activated or reconfigured.
  • Such computer programs may be stored in a device (eg, computer) readable medium or in any type of medium suitable for storing electronic instructions and coupled to a bus, respectively, including but not limited to any Types of disks (including floppy disks, hard disks, optical disks, CD-ROMs, and magneto-optical disks), ROM (Read-Only Memory), RAM (Random Access Memory), EPROM (Erasable Programmable Read-Only) Memory, rewritable programmable read only memory), EEPROM (Electrically Erasable Programmable Read-Only Memory, flash memory, magnetic card or light card.
  • a readable medium includes any medium that is stored or transmitted by a device (eg, a computer) in a readable form.
  • each block of the block diagrams and/or block diagrams and/or flow diagrams and combinations of blocks in the block diagrams and/or block diagrams and/or flow diagrams can be implemented by computer program instructions. .
  • these computer program instructions can be implemented by a general purpose computer, a professional computer, or a processor of other programmable data processing methods, such that the processor is executed by a computer or other programmable data processing method.
  • steps, measures, and solutions in the various operations, methods, and processes that have been discussed in the present invention may be alternated, changed, combined, or deleted. Further, other steps, measures, and schemes of the various operations, methods, and processes that have been discussed in the present invention may be alternated, modified, rearranged, decomposed, combined, or deleted. Further, the steps, measures, and solutions in the various operations, methods, and processes disclosed in the present invention may also be alternated, modified, rearranged, decomposed, combined, or deleted.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

Disclosed are a data transmission method, apparatus, and vehicle-mounted device, said method comprising the following steps: obtaining a code corresponding to a parameter to be transmitted; synthesizing a parameter, code, and general data into protocol data according to a preset protocol format; transmitting the protocol data outward. In the data transmission method provided by the embodiments of the present invention, a code is assigned to a corresponding parameter; the code is used to analyze the type of recognition parameter, such that it is unnecessary for vehicle-mounted device to transmit a fixed type of parameter each time; instead, the required parameters are transmitted according to actual conditions; thus data transmission flexibility is improved and data traffic and bandwidth resources are conserved, reducing the burden on the server. On that basis, a user can also add new parameter detection functions as needed, and a vehicle-mounted device needs only to assign a code to a newly added parameter, thus greatly improving the scalability of functions.

Description

数据传输方法、装置和车载设备Data transmission method, device and vehicle device 技术领域Technical field
本发明涉及车载技术领域,特别是涉及到一种数据传输方法、装置和车载设备。The present invention relates to the field of in-vehicle technology, and in particular, to a data transmission method, apparatus, and in-vehicle device.
背景技术Background technique
随着物联网技术的迅速发展,车载设备的功能越来越丰富。车载设备可以向服务器上传车机报警数据、车机实时数据等,用户通过终端设备登录服务器,则可以实时获取这些数据。With the rapid development of the Internet of Things technology, the functions of in-vehicle devices are becoming more and more abundant. The in-vehicle device can upload the vehicle alarm data and the real-time data of the vehicle to the server. When the user logs in to the server through the terminal device, the data can be acquired in real time.
目前,车载设备以固定的协议格式向服务器上传数据,其每次上传的参数的种类、以及参数的排列顺序都是固定不变的。例如,协议规定每次均上传经度、纬度、速度、里程四种参数,且四种参数必须依次排序,否则服务器无法解析。At present, the in-vehicle device uploads data to the server in a fixed protocol format, and the type of parameters and the order of parameters of each upload are fixed. For example, the protocol stipulates that each of the four parameters of longitude, latitude, speed, and mileage is uploaded, and the four parameters must be sorted in order, otherwise the server cannot resolve.
上述数据传输方式有以下弊端:The above data transmission methods have the following drawbacks:
一、由于每次都要传输固定种类的数据,而无法根据实际情况上传需要的数据,导致了数据流量和带宽资源的浪费,并增加了服务器的负担。First, each time a fixed type of data is transmitted, and the required data cannot be uploaded according to the actual situation, resulting in waste of data traffic and bandwidth resources, and increasing the burden on the server.
二、在现有的协议格式基础上无法增加新的参数检测功能,必须重新定义协议格式,而一旦重新定义协议格式,之前的协议格式也要兼容,因为硬件一旦给用户使用后不方便升级,而且升级的时候会出现和硬件其他模块不兼容的情况,导致功能扩展性差。Second, based on the existing protocol format, it is impossible to add a new parameter detection function, and the protocol format must be redefined. Once the protocol format is redefined, the previous protocol format is also compatible, because the hardware is inconvenient to upgrade once it is used by the user. Moreover, when upgrading, there will be cases where it is incompatible with other modules of the hardware, resulting in poor scalability.
因此,如何提高数据传输的灵活性,节省数据流量和带宽资源,降低服务器的负担,是当前亟需解决的技术问题。Therefore, how to improve the flexibility of data transmission, save data traffic and bandwidth resources, and reduce the burden on the server is a technical problem that needs to be solved.
技术问题technical problem
本发明的主要目的为提供一种数据传输方法、装置和车载设备,旨在提高数据传输的灵活性,节省数据流量和带宽资源,降低服务器的负担。The main object of the present invention is to provide a data transmission method, device and in-vehicle device, which aims to improve the flexibility of data transmission, save data traffic and bandwidth resources, and reduce the burden on the server.
技术解决方案Technical solution
为达以上目的,本发明实施例提出一种数据传输方法,所述方法包括以下步骤:To achieve the above objective, an embodiment of the present invention provides a data transmission method, where the method includes the following steps:
获取待传输的参数对应的代码;Obtain a code corresponding to the parameter to be transmitted;
根据预设的协议格式将所述参数、所述代码和通用数据合成为协议数据;Synthesizing the parameter, the code, and the general data into protocol data according to a preset protocol format;
向外传输所述协议数据。The protocol data is transmitted out.
可选地,所述根据预设的协议格式将所述参数、所述代码和通用数据合成为协议数据的步骤包括:Optionally, the step of synthesizing the parameter, the code, and the general data into protocol data according to a preset protocol format includes:
将所述代码和所述参数组合为内容数据;Combining the code and the parameters into content data;
将所述内容数据和所述通用数据组合为所述协议数据。The content data and the universal data are combined into the protocol data.
可选地,所述将所述代码和所述参数组合为内容数据的步骤包括:Optionally, the step of combining the code and the parameter into content data comprises:
将所述代码置于所述参数之前,组成一个字符串。Put the code before the argument to form a string.
可选地,所述将所述内容数据和所述通用数据组合为所述协议数据的步骤包括:将所述内容数据插入到两个通用数据之间的位置,组合为所述协议数据。Optionally, the step of combining the content data and the universal data into the protocol data comprises: inserting the content data into a location between two general data, combined into the protocol data.
可选地,所述两个通用数据分别为设备号和验证值。Optionally, the two general data are a device number and a verification value, respectively.
可选地,所述参数至少有一个,每一个参数对应一个代码。Optionally, the parameter has at least one parameter, and each parameter corresponds to a code.
可选地,所述获取待传输的参数对应的代码的步骤之前还包括:Optionally, the step of acquiring the code corresponding to the parameter to be transmitted further includes:
当接收到新增目标参数的检测功能的请求时,增加目标参数检测功能;When the request for the detection function of the new target parameter is received, the target parameter detection function is added;
为所述目标参数分配对应的代码。A corresponding code is assigned to the target parameter.
可选地,所述获取待传输的参数对应的代码的步骤之前还包括:Optionally, the step of acquiring the code corresponding to the parameter to be transmitted further includes:
检测是否满足传输参数的条件;Detect whether the conditions of the transmission parameters are met;
当满足传输参数的条件时,获取参数。The parameters are obtained when the conditions of the transmission parameters are met.
可选地,所述检测是否满足传输参数的条件的步骤包括:Optionally, the step of detecting whether the condition of the transmission parameter is met includes:
根据预设的时间规则判断当前是否到达传输参数的时间;Determining whether the current transmission parameter is reached according to a preset time rule;
若是,判定满足传输参数的条件。If so, the condition that the transmission parameter is satisfied is determined.
可选地,所述检测是否满足传输参数的条件的步骤包括:Optionally, the step of detecting whether the condition of the transmission parameter is met includes:
根据预设的警戒规则判断参数是否达到警戒值;Determine whether the parameter reaches the warning value according to the preset warning rule;
若是,判定满足传输参数的条件。If so, the condition that the transmission parameter is satisfied is determined.
本发明实施例同时提出一种数据传输装置,所述装置包括:The embodiment of the invention simultaneously provides a data transmission device, the device comprising:
代码获取模块,设置为获取待传输的参数对应的代码;a code acquisition module, configured to obtain a code corresponding to the parameter to be transmitted;
数据合成模块,设置为根据预设的协议格式将所述参数、所述代码和通用数据合成为协议数据;a data synthesizing module configured to synthesize the parameter, the code, and general data into protocol data according to a preset protocol format;
数据传输模块,设置为向外传输所述协议数据。A data transmission module configured to transmit the protocol data outward.
可选地,所述数据合成模块包括:Optionally, the data synthesizing module includes:
第一组合单元,设置为将所述代码和所述参数组合为内容数据;a first combination unit configured to combine the code and the parameter into content data;
第二组合单元,设置为将所述内容数据和所述通用数据组合为所述协议数据。A second combining unit is arranged to combine the content data and the universal data into the protocol data.
可选地,所述第一组合单元设置为:将所述代码置于所述参数之前,组成一个字符串。Optionally, the first combining unit is configured to: before the parameter is placed in the parameter, form a character string.
可选地,所述第二组合单元设置为:将所述内容数据插入到两个通用数据之间的位置,组合为所述协议数据。Optionally, the second combining unit is configured to insert the content data into a position between two common data, and combine the data into the protocol data.
可选地,所述装置还包括功能开启模块,所述功能开启模块包括:Optionally, the device further includes a function opening module, where the function opening module includes:
增加单元,设置为当接收到新增目标参数的检测功能的请求时,增加目标参数检测功能;Adding a unit, being set to increase a target parameter detection function when receiving a request for a detection function of a new target parameter;
分配单元,设置为为所述目标参数分配对应的代码。An allocation unit configured to assign a corresponding code to the target parameter.
可选地,所述装置还包括参数获取模块,所述参数获取模块包括:Optionally, the device further includes a parameter obtaining module, where the parameter obtaining module includes:
检测单元,设置为检测是否满足传输参数的条件;a detecting unit configured to detect whether a condition of the transmission parameter is satisfied;
获取单元,设置为当满足传输参数的条件时,获取参数。The acquisition unit is set to acquire the parameters when the conditions of the transmission parameters are met.
可选地,所述检测单元包括:Optionally, the detecting unit includes:
第一判断单元,设置为根据预设的时间规则判断当前是否到达传输参数的时间;The first determining unit is configured to determine, according to the preset time rule, whether the current transmission parameter is reached;
第一判定单元,设置为若当前到达传输参数的时间,则判定满足传输参数的条件。The first determining unit is configured to determine a condition that the transmission parameter is satisfied if the time at which the transmission parameter is currently reached.
可选地,所述检测单元包括:Optionally, the detecting unit includes:
第二判断单元,设置为根据预设的警戒规则判断参数是否达到警戒值;The second determining unit is configured to determine whether the parameter reaches the warning value according to the preset warning rule;
第二判定单元,设置为若参数达到警戒值,则判定满足传输参数的条件。The second determining unit is configured to determine a condition that the transmission parameter is satisfied if the parameter reaches the warning value.
本发明实施例还提出一种车载设备,其包括存储器、处理器和至少一个被存储在所述存储器中并被配置为由所述处理器执行的应用程序,所述应用程序被配置为用于执行前述数据传输方法。Embodiments of the present invention also provide an in-vehicle device including a memory, a processor, and at least one application stored in the memory and configured to be executed by the processor, the application being configured to be used for The aforementioned data transmission method is performed.
有益效果Beneficial effect
本发明实施例所提供的一种数据传输方法,通过为参数分配对应的代码,利用代码来解析识别参数的种类,使得车载设备无需每次都传输固定种类的参数,而是根据实际情况传输需要的参数,因此提高了数据传输的灵活性,节省了数据流量和带宽资源,降低了服务器的负担。在此基础上,用户还可以根据需要增加新的参数检测功能,车载设备只需为新增的参数分配一个代码即可,从而大大提高了功能的扩展性。A data transmission method provided by an embodiment of the present invention, by assigning a corresponding code to a parameter, and using the code to parse the type of the identification parameter, so that the in-vehicle device does not need to transmit a fixed type of parameter every time, but needs to transmit according to actual conditions. The parameters, thus increasing the flexibility of data transmission, saving data traffic and bandwidth resources, reducing the burden on the server. On this basis, the user can also add a new parameter detection function as needed, and the in-vehicle device only needs to assign a code to the newly added parameters, thereby greatly improving the scalability of the function.
附图说明DRAWINGS
图1是本发明的数据传输方法第一实施例的流程图;1 is a flow chart of a first embodiment of a data transmission method of the present invention;
图2是本发明实施例中代码与参数的对应关系表;2 is a correspondence table of codes and parameters in an embodiment of the present invention;
图3是本发明的数据传输方法第二实施例的流程图;Figure 3 is a flow chart showing a second embodiment of the data transmission method of the present invention;
图4是本发明的数据传输装置第一实施例的模块示意图;4 is a block diagram showing a first embodiment of a data transmission device of the present invention;
图5是图4中的数据合成模块的模块示意图;Figure 5 is a block diagram of the data synthesizing module of Figure 4;
图6是图4中的参数获取模块的模块示意图;6 is a block diagram of a parameter acquisition module of FIG. 4;
图7是图6中的检测单元的模块示意图;Figure 7 is a block diagram of the detecting unit of Figure 6;
图8是图6中的检测单元的模块示意图;Figure 8 is a block diagram of the detecting unit of Figure 6;
图9是本发明的数据传输装置第二实施例的模块示意图;Figure 9 is a block diagram showing a second embodiment of the data transmission device of the present invention;
图10图9中的功能开启模块的模块示意图。Figure 10 is a block diagram of the function opening module in Figure 9.
本发明目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The implementation, functional features, and advantages of the present invention will be further described in conjunction with the embodiments.
本发明的最佳实施方式BEST MODE FOR CARRYING OUT THE INVENTION
应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。It is understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
下面详细描述本发明的实施例,所述实施例的示例在附图中示出,其中自始至终相同或类似的标号表示相同或类似的元件或具有相同或类似功能的元件。下面通过参考附图描述的实施例是示例性的,仅用于解释本发明,而不能解释为对本发明的限制。The embodiments of the present invention are described in detail below, and the examples of the embodiments are illustrated in the drawings, wherein the same or similar reference numerals are used to refer to the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the drawings are intended to be illustrative of the invention and are not to be construed as limiting.
本技术领域技术人员可以理解,除非特意声明,这里使用的单数形式“一”、“一个”、“所述”和“该”也可包括复数形式。应该进一步理解的是,本发明的说明书中使用的措辞“包括”是指存在所述特征、整数、步骤、操作、元件和/或组件,但是并不排除存在或添加一个或多个其他特征、整数、步骤、操作、元件、组件和/或它们的组。应该理解,当我们称元件被“连接”或“耦接”到另一元件时,它可以直接连接或耦接到其他元件,或者也可以存在中间元件。此外,这里使用的“连接”或“耦接”可以包括无线连接或无线耦接。这里使用的措辞“和/或”包括一个或更多个相关联的列出项的全部或任一单元和全部组合。The singular forms "a", "an", "the" It is to be understood that the phrase "comprise" or "an" Integers, steps, operations, components, components, and/or groups thereof. It will be understood that when an element is referred to as being "connected" or "coupled" to another element, it can be directly connected or coupled to the other element. Further, "connected" or "coupled" as used herein may include either a wireless connection or a wireless coupling. The phrase "and/or" used herein includes all or any one and all combinations of one or more of the associated listed.
本技术领域技术人员可以理解,除非另外定义,这里使用的所有术语(包括技术术语和科学术语),具有与本发明所属领域中的普通技术人员的一般理解相同的意义。还应该理解的是,诸如通用字典中定义的那些术语,应该被理解为具有与现有技术的上下文中的意义一致的意义,并且除非像这里一样被特定定义,否则不会用理想化或过于正式的含义来解释。Those skilled in the art will appreciate that all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which the invention belongs, unless otherwise defined. It should also be understood that terms such as those defined in a general dictionary should be understood to have meaning consistent with the meaning in the context of the prior art, and will not be idealized or excessive unless specifically defined as here. The formal meaning is explained.
本技术领域技术人员可以理解,这里所使用的“终端”、“终端设备”既包括无线信号接收器的设备,其仅具备无发射能力的无线信号接收器的设备,又包括接收和发射硬件的设备,其具有能够在双向通信链路上,执行双向通信的接收和发射硬件的设备。这种设备可以包括:蜂窝或其他通信设备,其具有单线路显示器或多线路显示器或没有多线路显示器的蜂窝或其他通信设备;PCS(Personal Communications Service,个人通信系统),其可以组合语音、数据处理、传真和/或数据通信能力;PDA(Personal Digital Assistant,个人数字助理),其可以包括射频接收器、寻呼机、互联网/内联网访问、网络浏览器、记事本、日历和/或GPS(Global Positioning System,全球定位系统)接收器;常规膝上型和/或掌上型计算机或其他设备,其具有和/或包括射频接收器的常规膝上型和/或掌上型计算机或其他设备。这里所使用的“终端”、“终端设备”可以是便携式、可运输、安装在交通工具(航空、海运和/或陆地)中的,或者适合于和/或配置为在本地运行,和/或以分布形式,运行在地球和/或空间的任何其他位置运行。这里所使用的“终端”、“终端设备”还可以是通信终端、上网终端、音乐/视频播放终端,例如可以是PDA、MID(Mobile Internet Device,移动互联网设备)和/或具有音乐/视频播放功能的移动电话,也可以是智能电视、机顶盒等设备。Those skilled in the art can understand that the "terminal" and "terminal device" used herein include both a wireless signal receiver device, a device having only a wireless signal receiver without a transmitting capability, and a receiving and transmitting hardware. A device having a device capable of performing two-way communication receiving and transmitting hardware on a two-way communication link. Such devices may include cellular or other communication devices having a single line display or a multi-line display or a cellular or other communication device without a multi-line display; PCS (Personal Communications) Service, personal communication system), which can combine voice, data processing, fax and/or data communication capabilities; PDA (Personal Digital Assistant), which can include radio frequency receiver, pager, Internet/Intranet access, network Browser, notepad, calendar and/or GPS (Global Positioning System) receiver; conventional laptop and/or palmtop computer or other device with and/or conventional lap including radio frequency receiver Type and / or palmtop or other device. As used herein, "terminal", "terminal device" may be portable, transportable, installed in a vehicle (aviation, sea and/or land), or adapted and/or configured to operate locally, and/or Run in any other location on the Earth and/or space in a distributed form. The "terminal" and "terminal device" used herein may also be a communication terminal, an internet terminal, a music/video playing terminal, and may be, for example, a PDA, a MID (Mobile Internet Device), and/or have a music/video playback. Functional mobile phones can also be smart TVs, set-top boxes and other devices.
本技术领域技术人员可以理解,这里所使用的服务器,其包括但不限于计算机、网络主机、单个网络服务器、多个网络服务器集或多个服务器构成的云。在此,云由基于云计算(Cloud Computing)的大量计算机或网络服务器构成,其中,云计算是分布式计算的一种,由一群松散耦合的计算机集组成的一个超级虚拟计算机。本发明的实施例中,服务器、终端设备与WNS服务器之间可通过任何通信方式实现通信,包括但不限于,基于3GPP、LTE、WIMAX的移动通信、基于TCP/IP、UDP协议的计算机网络通信以及基于蓝牙、红外传输标准的近距无线传输方式。Those skilled in the art can understand that the server used herein includes, but is not limited to, a computer, a network host, a single network server, a plurality of network server sets, or a cloud composed of a plurality of servers. Here, the cloud is composed of a large number of computers or network servers based on Cloud Computing, which is a kind of distributed computing, a super virtual computer composed of a group of loosely coupled computers. In the embodiment of the present invention, communication can be implemented by any communication means between the server, the terminal device and the WNS server, including but not limited to, mobile communication based on 3GPP, LTE, WIMAX, and computer network communication based on TCP/IP and UDP protocols. And short-range wireless transmission based on Bluetooth and infrared transmission standards.
本发明实施例的数据传输方法,主要应用于车载设备,当然也可以应用于其它的电子设备,如智能家居设备、移动终端、个人电脑等,本发明对此不作限定。以下以应用于车载设备为例进行详细说明。The data transmission method of the embodiment of the present invention is mainly applied to an in-vehicle device, and may be applied to other electronic devices, such as a smart home device, a mobile terminal, a personal computer, etc., which is not limited by the present invention. The following is a detailed description of the application to the in-vehicle device.
参照图1,提出本发明的数据传输方法第一实施例,所述方法包括以下步骤:Referring to FIG. 1, a first embodiment of a data transmission method of the present invention is proposed. The method includes the following steps:
S11、获取待传输的参数对应的代码。S11. Obtain a code corresponding to the parameter to be transmitted.
本发明实施例中,车载设备为每一种参数分配了对应的代码。当有参数需要传输时,车载设备则获取待传输的参数对应的代码。每次传输的参数可以是一种,也可以是两种或者多种,当至少两种参数时,则分别获取每一种参数的代码。In the embodiment of the present invention, the in-vehicle device assigns a corresponding code to each parameter. When there is a parameter to be transmitted, the in-vehicle device acquires a code corresponding to the parameter to be transmitted. The parameters for each transmission may be one type, or two or more types. When at least two types of parameters are used, the codes of each type of parameters are respectively obtained.
所述参数如速度、里程、经度、维度、胎压、点火/熄火状态等。所述代码可以是数字、字母、符号等,如01、02、03、AA、BB等。The parameters are such as speed, mileage, longitude, dimension, tire pressure, ignition/extinguish status, and the like. The code may be numbers, letters, symbols, etc., such as 01, 02, 03, AA, BB, and the like.
如图2所示,为本发明实施例中参数与代码的对应关系表。其中,参数包括速度、点火/熄火状态、胎压、经度、纬度等,它们分别对应的代码为01、02、03、04、05等。As shown in FIG. 2, it is a correspondence table between parameters and codes in the embodiment of the present invention. Among them, the parameters include speed, ignition/extinguishing state, tire pressure, longitude, latitude, etc., and their corresponding codes are 01, 02, 03, 04, 05, and so on.
进一步地,在步骤S11之前,车载设备还获取需要传输的参数,具体的,车载设备检测是否满足传输参数的条件,当满足传输参数的条件时,获取参数。Further, before step S11, the in-vehicle device further acquires parameters that need to be transmitted. Specifically, the in-vehicle device detects whether the condition of the transmission parameter is met, and when the condition of the transmission parameter is met, the parameter is acquired.
当参数为车机硬件数据时,由于硬件数据一般不会更改,因此车载设备只在用户注册成功时(或车载设备与外部设备首次连接成功时)向外传输一次,即当检测到用户注册成功时(或车载设备与外部设备首次连接成功时),车载设备则判定满足传输车机硬件数据这种参数的条件。When the parameter is the hardware data of the vehicle, since the hardware data generally does not change, the in-vehicle device transmits only once when the user is successfully registered (or when the in-vehicle device and the external device are successfully connected for the first time), that is, when the user registration is successfully detected. When the vehicle device and the external device are successfully connected for the first time, the in-vehicle device determines the condition that the parameter of the transmission hardware data is satisfied.
当参数为车机软件版本(如车机蓝牙版本、车机系统版本)时,车载设备在用户注册成功时(或车载设备与外部设备首次连接成功时)向外传输一次,每当软件版本更新时,再向外传输一次。即当检测到用户注册成功(或车载设备与外部设备首次连接成功)或软件版本更新时,车载设备则判定满足传输车机软件版本这种参数的条件。When the parameter is the car software version (such as the car phone Bluetooth version, the car system version), the in-vehicle device is transmitted once when the user is successfully registered (or when the in-vehicle device and the external device are successfully connected for the first time), whenever the software version is updated. Then, transfer it again. That is, when it is detected that the user registration is successful (or the in-vehicle device is successfully connected to the external device for the first time) or the software version is updated, the in-vehicle device determines the condition that the parameter of the transmission car software version is satisfied.
当参数为车机报警数据时,系统根据实际情况设置警戒值,用户也可以根据实际需要设置警戒值,并根据警戒值生产警戒规则,车载设备根据预设的警戒规则判断车机报警数据这种参数是否达到警戒值,当达到警戒值时,判定满足传输车机报警数据这种参数的条件。When the parameter is the vehicle alarm data, the system sets the warning value according to the actual situation, the user can also set the warning value according to the actual needs, and according to the warning value production alert rule, the vehicle device determines the vehicle alarm data according to the preset warning rule. Whether the parameter reaches the warning value, when the warning value is reached, the condition that the parameter of the transmission vehicle alarm data is satisfied is determined.
例如:当速度超过警戒值时,则判定满足传输速度数据的条件,以进行超速报警;当加速度超过警戒值时,则判定满足传输加速度的条件,以进行急加速急减速报警;当位置数据(如经纬度)超过警戒值时,则判定满足传输位置数据的条件,以进行电子围栏报警。For example, when the speed exceeds the warning value, the condition that the transmission speed data is satisfied is determined to perform the overspeed alarm; when the acceleration exceeds the warning value, the condition that the transmission acceleration is satisfied is determined to perform the sudden acceleration and deceleration alarm; when the position data ( If the latitude and longitude exceeds the warning value, the condition that the transmission position data is satisfied is determined to perform an electronic fence alarm.
当参数为行程数据时,车载设备可以根据用户点火/熄火作为一个行程,上传行程数据。即当检测到车辆从点火状态切换到熄火状态时,判定满足传输行程数据这种参数的条件。When the parameter is the trip data, the in-vehicle device can upload the trip data according to the user's ignition/extinguish as a trip. That is, when it is detected that the vehicle is switched from the ignition state to the flameout state, the condition that the parameter of the transmission stroke data is satisfied is determined.
当参数为车机实时数据(如经纬度、速度、点火状态、胎压等)时,车载设备根据预设的时间规则判断当前是否到达传输车机实时数据这种参数的时间,若是,则判定满足传输车机实时数据这种参数的条件。所述时间规则如周期性的传输或定时的传输,例如每隔30秒传输一次、每天的某个或某几个时刻传输一次等。When the parameter is real-time data of the vehicle (such as latitude and longitude, speed, ignition state, tire pressure, etc.), the in-vehicle device determines whether the current time of transmitting the real-time data of the vehicle is reached according to a preset time rule, and if so, the determination is satisfied. The condition of this parameter for transmitting real-time data of the vehicle. The time rules are, for example, periodic transmissions or scheduled transmissions, such as transmissions every 30 seconds, transmissions once or some times a day, and the like.
S12、根据预设的协议格式将代码、参数和通用数据合成为协议数据。S12. Synthesize code, parameters, and general data into protocol data according to a preset protocol format.
本发明实施例预设了协议格式,包括内容数据的组成格式和最终的协议数据的组成格式。车载设备首先将代码和参数组合为内容数据,比如将代码置于参数之前,组成一个字符串,当然也可以将代码置于参数之后。然后,车载设备将内容数据和通用数据组合为协议数据,比如将内容数据插入到两个通用数据之间的位置,组合为协议数据。The embodiment of the invention presets a protocol format, including a composition format of the content data and a composition format of the final protocol data. The in-vehicle device first combines the code and parameters into content data, such as placing the code before the parameter to form a string, or of course placing the code after the parameter. The in-vehicle device then combines the content data and the general data into protocol data, such as inserting the content data into a location between the two general data, combined into protocol data.
例如,协议数据的组成格式如下:For example, the format of the protocol data is as follows:
开始符协议号设备号内容数据验证值时间结束符Start character protocol number device number content data verification value time end
该协议数据包括通用数据和内容数据,通用数据包括开始符、协议号、设备号、验证值、时间和结束符,内容数据被插入到设备号和验证值两个通用数据之间的位置,当然也可以根据需要插入到其它位置,本发明对此不做限定。The protocol data includes general data and content data, and the general data includes a start character, a protocol number, a device number, a verification value, a time, and a terminator, and the content data is inserted between the device number and the verification value. It can also be inserted into other locations as needed, which is not limited by the present invention.
由于获取的参数的原始数据为十进制或状态值,因此将代码和参数组合为内容数据之前,还需要根据实际情况对某些参数进行进制转换。例如:对于速度,需转换为八进制,长度范围为00-FF;对于点火/熄火状态,需转换为二进制,分别为0和1,如0代表熄火,1代表点火;对于胎压,需转换为八进制,长度范围为0000-FFFF;对于经度,保持十进制,长度固定为十位,前三位为小数点之前的数字,最后一位1代表东经,0代表西经,反之亦可,如1139207991代表东经113.920799。Since the raw data of the obtained parameters is decimal or state value, before combining the code and parameters into content data, some parameters need to be converted according to the actual situation. For example: for speed, it needs to be converted to octal, the length range is 00-FF; for the ignition/extinguish state, it needs to be converted to binary, 0 and 1, respectively, such as 0 for flameout, 1 for ignition; for tire pressure, need to be converted to Octal, length range is 0000-FFFF; for longitude, keep decimal, the length is fixed to ten, the first three digits are the number before the decimal point, the last digit 1 represents the east longitude, 0 represents the west longitude, and vice versa, such as 1139207991 represents the east longitude 113.920799.
S13、向外传输协议数据。S13. Transmit protocol data to the outside.
本发明实施例中,车载设备向服务器上传协议数据,服务器根据预设的协议格式将协议数据解析为用户数据,并予以存储,然后主动的或根据用户的终端设备的请求,向终端设备发送用户数据。终端设备接收用户数据并予以输出,如在显示屏上显示。In the embodiment of the present invention, the in-vehicle device uploads protocol data to the server, and the server parses the protocol data into user data according to a preset protocol format, and stores the data, and then sends the user to the terminal device actively or according to the request of the user terminal device. data. The terminal device receives the user data and outputs it, as shown on the display.
例如,假设服务器接收到的协议数据为:For example, suppose the protocol data received by the server is:
28  01  656565  030050  68  180203 142723  2928 01 656565 030050 68 180203 142723 29
服务器将协议数据解析为:开始符28,协议号01,设备号656565,内容数据030050,验证值68,时间180203 142723,结束符29。其中,内容数据030050中,03代表胎压,0050为八进制数据,转换为十进制则为80,说明胎压为80kpa;时间180203 142723代表2018年2月3日14点27分23秒。The server parses the protocol data into: start character 28, protocol number 01, device number 656565, content data 030050, verification value 68, time 180203 142723, and terminator 29. Among them, in the content data 030050, 03 represents the tire pressure, 0050 is the octal data, 80 is converted to decimal, indicating that the tire pressure is 80 kPa; time 180203 142723 represents 14:27:23 on February 3, 2018.
前述协议数据中的内容数据只包括胎压一个参数,在具体应用中,内容数据也可以包括两个或者多个参数,因为每个参数有对应的代码,因此服务器可以根据代码解析出不同的参数。The content data in the foregoing protocol data only includes one parameter of the tire pressure. In a specific application, the content data may also include two or more parameters, because each parameter has a corresponding code, so the server can parse different parameters according to the code. .
在具体实施时,用户可以在终端设备上安装特定的应用(APP),通过应用登录服务器并注册账号,并绑定对应的车辆和车载设备,车载设备、服务器和终端设备依次建立通信连接,并传输数据,当然车载设备也可以与终端设备建立通信连接。In a specific implementation, the user can install a specific application (APP) on the terminal device, log in to the server through the application, register the account, and bind the corresponding vehicle and the in-vehicle device, and the in-vehicle device, the server, and the terminal device sequentially establish a communication connection, and To transmit data, of course, the in-vehicle device can also establish a communication connection with the terminal device.
在某些实施例中,车载设备也可以直接将协议数据发送给用户的终端设备,终端设备接收到协议数据后根据预设的协议格式解析协议数据,获取用户数据,并予以输出,如在显示屏上显示。In some embodiments, the in-vehicle device can also directly send the protocol data to the terminal device of the user. After receiving the protocol data, the terminal device parses the protocol data according to the preset protocol format, obtains the user data, and outputs the data, such as in the display. Displayed on the screen.
从而,车载设备在传输数据时更加灵活,每次仅根据实际需要传输必要的数据,减少了数据的传输量,节省了数据流量和带宽资源,减小了服务器的压力。Therefore, the in-vehicle device is more flexible in transmitting data, and only needs necessary data to be transmitted according to actual needs at a time, thereby reducing the amount of data transmission, saving data traffic and bandwidth resources, and reducing the pressure on the server.
进一步地,如图3所示,在本发明的数据传输方法第二实施例中,步骤S11之前还包括以下步骤:Further, as shown in FIG. 3, in the second embodiment of the data transmission method of the present invention, before step S11, the following steps are further included:
S09、当接收到新增目标参数的检测功能的请求时,增加目标参数检测功能。S09: When receiving the request for the detection function of the new target parameter, the target parameter detection function is added.
S10、为目标参数分配对应的代码。S10. Assign a corresponding code to the target parameter.
本实施例中,用户可以自定义增加一些参数的检测功能。车载设备接收到新增目标参数的检测功能的请求时,则增加目标参数检测功能,并为目标参数分配对应的代码。In this embodiment, the user can customize the detection function of adding some parameters. When the in-vehicle device receives the request for the detection function of the new target parameter, the target parameter detection function is added, and the corresponding code is assigned to the target parameter.
例如,用户为车辆安装胎压外设,胎压外设数据会通过USB接口或者串口形式和车载设备联通。终端设备通过应用接收用户开启胎压检测功能的指令,向用户展示目前的软件版本所能适配的所有外设,用户则选择对应的外设。终端设备向服务器发送开启胎压检测功能的请求,服务器将该请求转发给车载设备。车载设备接收到请求后,分析车机基本功能里是否包含胎压检测功能,如果没有,则在车机基本功能里增加胎压检测功能,并为胎压分配对应的代码,同时将基本功能里的胎压检测功能与实时数据模块中的胎压启动代码关联。后续实时数据模块就会增加胎压的检测,车载设备则将胎压数据附加到车机实时数据中,上传至服务器。用户通过终端设备进入车机页面或者刷新该页面,终端设备即发送请求到服务器获取车机的实时数据,并展示给用户,用户即可查看包括胎压在内的车机实时数据。如果车辆没有实际安装某个外设或者取消某个外设,则对应的数据不会显示。For example, the user installs a tire pressure peripheral for the vehicle, and the tire pressure peripheral data is communicated with the vehicle device through a USB interface or a serial port. The terminal device receives the user's instruction to turn on the tire pressure detection function through the application, and displays to the user all the peripheral devices that the current software version can adapt, and the user selects the corresponding peripheral device. The terminal device sends a request to the server to turn on the tire pressure detecting function, and the server forwards the request to the in-vehicle device. After receiving the request, the on-board device analyzes whether the basic function of the vehicle includes the tire pressure detection function. If not, the tire pressure detection function is added in the basic function of the vehicle, and the corresponding code is assigned to the tire pressure, and the basic function is also The tire pressure detection function is associated with the tire pressure activation code in the real-time data module. Subsequent real-time data modules will increase the detection of tire pressure, and the vehicle-mounted equipment will add the tire pressure data to the real-time data of the vehicle and upload it to the server. The user enters the vehicle machine page through the terminal device or refreshes the page, and the terminal device sends a request to the server to acquire the real-time data of the vehicle, and displays it to the user, and the user can view the real-time data of the vehicle including the tire pressure. If the vehicle does not actually install a peripheral or cancel a peripheral, the corresponding data will not be displayed.
从而,用户可以根据实际需要为车辆增加外设,进而增加对应的参数检测功能,提升了功能的扩展性。Therefore, the user can add peripherals to the vehicle according to actual needs, thereby increasing the corresponding parameter detection function and improving the scalability of the function.
本发明实施例的数据传输方法,通过为参数分配对应的代码,利用代码来解析识别参数的种类,使得车载设备无需每次都传输固定种类的参数,而是根据实际情况传输需要的参数,因此提高了数据传输的灵活性,节省了数据流量和带宽资源,降低了服务器的负担。在此基础上,用户还可以根据需要增加新的参数检测功能,车载设备只需为新增的参数分配一个代码即可,从而大大提高了功能的扩展性。In the data transmission method of the embodiment of the present invention, by assigning a corresponding code to the parameter, the code is used to analyze the type of the identification parameter, so that the in-vehicle device does not need to transmit a fixed type of parameter every time, but transmits the required parameter according to the actual situation, so Increased data transmission flexibility, saving data traffic and bandwidth resources, reducing the burden on the server. On this basis, the user can also add a new parameter detection function as needed, and the in-vehicle device only needs to assign a code to the newly added parameters, thereby greatly improving the scalability of the function.
采用本发明实施例的数据传输方法,具有以下有益效果:The data transmission method using the embodiment of the present invention has the following beneficial effects:
(1)、传输数据可以自适应实际外设或者根据用户实际要求调整,更人性化的传输数据,应用性强,数据外设无限制。(1), the transmission data can be adapted to the actual peripherals or adjusted according to the actual requirements of the user, more user-friendly transmission of data, strong applicability, unlimited data peripherals.
(2)、不丢失安全性。无论原有协议或者新协议,安全性的验证是必须的,预防恶意攻击服务器。(2), no loss of security. Regardless of the original protocol or the new protocol, security verification is necessary to prevent malicious attacks on the server.
(3)、软件更新不会影响使用。即使软件更新,也只是更新内容数据的格式,如果某个参数之前的定义不合理(例如速度的范围过小),可以新增数据格式,原有格式不会改变。(3), software updates will not affect the use. Even if the software is updated, it only updates the format of the content data. If the previous definition of a parameter is unreasonable (for example, the speed range is too small), the data format can be added, and the original format will not change.
参照图4,提出本发明的数据传输装置第一实施例,所述装置包括代码获取模块10、数据合成模块20和数据传输模块30,其中:代码获取模块10,设置为获取待传输的参数对应的代码;数据合成模块20,设置为根据预设的协议格式将参数、代码和通用数据合成为协议数据;数据传输模块30,设置为向外传输协议数据。Referring to FIG. 4, a first embodiment of a data transmission apparatus of the present invention is provided. The apparatus includes a code acquisition module 10, a data synthesis module 20, and a data transmission module 30. The code acquisition module 10 is configured to acquire a parameter to be transmitted. The data synthesizing module 20 is configured to synthesize parameters, codes, and general data into protocol data according to a preset protocol format; and the data transmission module 30 is configured to transmit protocol data to the outside.
本发明实施例中,为每一种参数分配了对应的代码。当有参数需要传输时,代码获取模块10则获取待传输的参数对应的代码。每次传输的参数可以是一种,也可以是两种或者多种,当至少两种参数时,代码获取模块10则分别获取每一种参数的代码。In the embodiment of the present invention, a corresponding code is assigned to each parameter. When there is a parameter to be transmitted, the code acquisition module 10 acquires a code corresponding to the parameter to be transmitted. The parameters of each transmission may be one type or two or more types. When at least two parameters are used, the code acquisition module 10 acquires codes of each type of parameters respectively.
所述参数如速度、里程、经度、维度、胎压、点火/熄火状态等。所述代码可以是数字、字母、符号等,如01、02、03、AA、BB等。The parameters are such as speed, mileage, longitude, dimension, tire pressure, ignition/extinguish status, and the like. The code may be numbers, letters, symbols, etc., such as 01, 02, 03, AA, BB, and the like.
如图2所示,为本发明实施例中参数与代码的对应关系表。其中,参数包括速度、点火/熄火状态、胎压、经度、纬度等,它们分别对应的代码为01、02、03、04、05等。As shown in FIG. 2, it is a correspondence table between parameters and codes in the embodiment of the present invention. Among them, the parameters include speed, ignition/extinguishing state, tire pressure, longitude, latitude, etc., and their corresponding codes are 01, 02, 03, 04, 05, and so on.
本发明实施例预设了协议格式,包括内容数据的组成格式和最终的协议数据的组成格式。如图5所示,数据合成模块20包括第一组合单元21和第二组合单元22,其中:第一组合单元21,设置为将代码和参数组合为内容数据,比如将代码置于参数之前,组成一个字符串,当然也可以将代码置于参数之后;第二组合单元22,设置为将内容数据和通用数据组合为协议数据,比如将内容数据插入到两个通用数据之间的位置,组合为协议数据。The embodiment of the invention presets a protocol format, including a composition format of the content data and a composition format of the final protocol data. As shown in FIG. 5, the data synthesizing module 20 includes a first combining unit 21 and a second combining unit 22, wherein: the first combining unit 21 is arranged to combine code and parameters into content data, such as placing a code before the parameter, Forming a string, of course, the code can be placed after the parameter; the second combining unit 22 is configured to combine the content data and the general data into protocol data, such as inserting the content data into a position between two common data, combining For protocol data.
例如,协议数据的组成格式如下:For example, the format of the protocol data is as follows:
开始符协议号设备号内容数据验证值时间结束符Start character protocol number device number content data verification value time end
该协议数据包括通用数据和内容数据,通用数据包括开始符、协议号、设备号、验证值、时间和结束符,第二组合单元22可以将内容数据插入到设备号和验证值两个通用数据之间的位置,当然也可以根据需要插入到其它位置,本发明对此不做限定。The protocol data includes general data including a start character, a protocol number, a device number, a verification value, a time, and a terminator, and the second combining unit 22 can insert the content data into two common data of the device number and the verification value. The position between the two can be inserted into other positions as needed, which is not limited by the present invention.
由于获取的参数的原始数据为十进制或状态值,因此将代码和参数组合为内容数据之前,第一组合单元21还需要根据实际情况对某些参数进行进制转换。例如:对于速度,需转换为八进制,长度范围为00-FF;对于点火/熄火状态,需转换为二进制,分别为0和1,如0代表熄火,1代表点火;对于胎压,需转换为八进制,长度范围为0000-FFFF;对于经度,保持十进制,长度固定为十位,前三位为小数点之前的数字,最后一位1代表东经,0代表西经,反之亦可,如1139207991代表东经113.920799。Since the original data of the acquired parameters is a decimal or state value, before combining the code and the parameters into the content data, the first combining unit 21 also needs to perform some conversion on the parameters according to the actual situation. For example: for speed, it needs to be converted to octal, the length range is 00-FF; for the ignition/extinguish state, it needs to be converted to binary, 0 and 1, respectively, such as 0 for flameout, 1 for ignition; for tire pressure, need to be converted to Octal, length range is 0000-FFFF; for longitude, keep decimal, the length is fixed to ten, the first three digits are the number before the decimal point, the last digit 1 represents the east longitude, 0 represents the west longitude, and vice versa, such as 1139207991 represents the east longitude 113.920799.
本发明实施例中,数据传输模块30向服务器上传协议数据,服务器根据预设的协议格式将协议数据解析为用户数据,并予以存储,然后主动的或根据用户的终端设备的请求,向终端设备发送用户数据。终端设备接收用户数据并予以输出,如在显示屏上显示。In the embodiment of the present invention, the data transmission module 30 uploads protocol data to the server, and the server parses the protocol data into user data according to a preset protocol format, and stores the data, and then actively or according to the request of the user terminal device, to the terminal device. Send user data. The terminal device receives the user data and outputs it, as shown on the display.
例如,假设服务器接收到的协议数据为:For example, suppose the protocol data received by the server is:
28  01  656565  030050  68  180203 142723  2928 01 656565 030050 68 180203 142723 29
服务器将协议数据解析为:开始符28,协议号01,设备号656565,内容数据030050,验证值68,时间180203 142723,结束符29。其中,内容数据030050中,03代表胎压,0050为八进制数据,转换为十进制则为80,说明胎压为80kpa;时间180203 142723代表2018年2月3日14点27分23秒。The server parses the protocol data into: start character 28, protocol number 01, device number 656565, content data 030050, verification value 68, time 180203 142723, and terminator 29. Among them, in the content data 030050, 03 represents the tire pressure, 0050 is the octal data, 80 is converted to decimal, indicating that the tire pressure is 80 kPa; time 180203 142723 represents 14:27:23 on February 3, 2018.
前述协议数据中的内容数据只包括胎压一个参数,在具体应用中,内容数据也可以包括两个或者多个参数,因为每个参数有对应的代码,因此服务器可以根据代码解析出不同的参数。The content data in the foregoing protocol data only includes one parameter of the tire pressure. In a specific application, the content data may also include two or more parameters, because each parameter has a corresponding code, so the server can parse different parameters according to the code. .
在某些实施例中,数据传输模块30也可以直接将协议数据发送给用户的终端设备,终端设备接收到协议数据后根据预设的协议格式解析协议数据,获取用户数据,并予以输出,如在显示屏上显示。In some embodiments, the data transmission module 30 can also directly send the protocol data to the terminal device of the user. After receiving the protocol data, the terminal device parses the protocol data according to the preset protocol format, acquires the user data, and outputs the data, such as Displayed on the display.
进一步地,该装置还包括参数获取模块40,其设置为获取需要传输的参数。具体的,参数获取模块40如图6所示,包括检测单元41和获取单元42,其中:检测单元41,设置为检测是否满足传输参数的条件;获取单元42,设置为当满足传输参数的条件时,获取参数。Further, the apparatus further includes a parameter acquisition module 40 configured to acquire parameters that need to be transmitted. Specifically, the parameter obtaining module 40 includes a detecting unit 41 and an obtaining unit 42 as shown in FIG. 6, wherein: the detecting unit 41 is configured to detect whether the condition of the transmission parameter is met; and the obtaining unit 42 is configured to satisfy the condition of the transmission parameter. When, get the parameters.
当参数为车机硬件数据时,由于硬件数据一般不会更改,因此车载设备只在用户注册成功时(或车载设备与外部设备首次连接成功时)向外传输一次,即检测单元41检测到用户注册成功时(或车载设备与外部设备首次连接成功时),则判定满足传输车机硬件数据这种参数的条件。When the parameter is the hardware data of the vehicle, since the hardware data generally does not change, the in-vehicle device transmits only once when the user is successfully registered (or when the in-vehicle device and the external device are successfully connected for the first time), that is, the detecting unit 41 detects the user. When the registration is successful (or when the in-vehicle device and the external device are successfully connected for the first time), the condition for satisfying the parameter of transmitting the hardware data of the vehicle is determined.
当参数为车机软件版本(如车机蓝牙版本、车机系统版本)时,车载设备在用户注册成功时(或车载设备与外部设备首次连接成功时)向外传输一次,每当软件版本更新时,再向外传输一次。即检测单元41检测到用户注册成功(或车载设备与外部设备首次连接成功)或软件版本更新时,车载设备则判定满足传输车机软件版本这种参数的条件。When the parameter is the car software version (such as the car phone Bluetooth version, the car system version), the in-vehicle device is transmitted once when the user is successfully registered (or when the in-vehicle device and the external device are successfully connected for the first time), whenever the software version is updated. Then, transfer it again. That is, when the detecting unit 41 detects that the user registration is successful (or the first connection between the in-vehicle device and the external device is successful) or the software version is updated, the in-vehicle device determines the condition that the parameter of the transmission car software version is satisfied.
当参数为行程数据时,车载设备可以根据用户点火/熄火作为一个行程,上传行程数据。即检测单元41检测到车辆从点火状态切换到熄火状态时,判定满足传输行程数据这种参数的条件。When the parameter is the trip data, the in-vehicle device can upload the trip data according to the user's ignition/extinguish as a trip. That is, when the detecting unit 41 detects that the vehicle is switched from the ignition state to the flameout state, it determines the condition that the parameter of the transmission stroke data is satisfied.
当参数为车机实时数据(如经纬度、速度、点火状态、胎压等)时,检测单元41如图7所示,包括第一判断单元411和第一判定单元412,其中:第一判断单元411,设置为根据预设的时间规则判断当前是否到达传输车机实时数据这种参数的时间;第一判定单元412,设置为若到达传输车机实时数据这种参数的时间,则判定满足传输车机实时数据这种参数的条件。所述时间规则如周期性的传输或定时的传输,例如每隔30秒传输一次、每天的某个或某几个时刻传输一次等。When the parameter is real-time data of the vehicle (such as latitude and longitude, speed, ignition state, tire pressure, etc.), the detecting unit 41 includes a first determining unit 411 and a first determining unit 412, as shown in FIG. 7, wherein: the first determining unit 411, configured to determine, according to a preset time rule, whether the current time of transmitting the real-time data of the vehicle is reached. The first determining unit 412 is configured to determine that the transmission is satisfied if the time of transmitting the real-time data of the vehicle is reached. The real-time data of the vehicle is the condition of this parameter. The time rules are, for example, periodic transmissions or scheduled transmissions, such as transmissions every 30 seconds, transmissions once or some times a day, and the like.
当参数为车机报警数据时,系统根据实际情况设置警戒值,用户也可以根据实际需要设置警戒值,并根据警戒值生产警戒规则。此时,检测单元41如图8所示,包括第二判断单元413和第二判定单元414,其中:第二判断单元413,设置为根据预设的警戒规则判断参数是否达到警戒值;第二判定单元414,设置为若参数达到警戒值,则判定满足传输参数的条件。When the parameter is the vehicle alarm data, the system sets the warning value according to the actual situation. The user can also set the warning value according to the actual needs and produce the warning rule according to the warning value. At this time, as shown in FIG. 8, the detecting unit 41 includes a second determining unit 413 and a second determining unit 414, wherein: the second determining unit 413 is configured to determine whether the parameter reaches the warning value according to the preset warning rule; The determining unit 414 is configured to determine that the condition of the transmission parameter is satisfied if the parameter reaches the warning value.
例如:当速度超过警戒值时,第二判定单元414则判定满足传输速度数据的条件,以进行超速报警;当加速度超过警戒值时,第二判定单元414则判定满足传输加速度的条件,以进行急加速急减速报警;当位置数据(如经纬度)超过警戒值时,第二判定单元414则判定满足传输位置数据的条件,以进行电子围栏报警。For example, when the speed exceeds the warning value, the second determining unit 414 determines that the condition of the transmission speed data is satisfied to perform the overspeed alarm; when the acceleration exceeds the warning value, the second determining unit 414 determines that the condition of the transmission acceleration is satisfied. When the position data (such as latitude and longitude) exceeds the warning value, the second determining unit 414 determines that the condition of the transmission position data is satisfied to perform the electronic fence alarm.
从而,车载设备在传输数据时更加灵活,每次仅根据实际需要传输必要的数据,减少了数据的传输量,节省了数据流量和带宽资源,减小了服务器的压力。Therefore, the in-vehicle device is more flexible in transmitting data, and only needs necessary data to be transmitted according to actual needs at a time, thereby reducing the amount of data transmission, saving data traffic and bandwidth resources, and reducing the pressure on the server.
更进一步地,如图9所示,在本发明的数据传输装置第二实施例中,该装置还包括功能开启模块50,如图10所示,功能开启模块50包括增加单元51和分配单元52,其中:增加单元51,设置为当接收到新增目标参数的检测功能的请求时,增加目标参数检测功能;分配单元52,设置为为目标参数分配对应的代码。Further, as shown in FIG. 9, in the second embodiment of the data transmission device of the present invention, the device further includes a function opening module 50. As shown in FIG. 10, the function opening module 50 includes an adding unit 51 and an allocating unit 52. , wherein: the adding unit 51 is configured to increase the target parameter detecting function when receiving the request for the detecting function of the newly added target parameter; the assigning unit 52 is configured to allocate the corresponding code for the target parameter.
从而,用户可以根据实际需要为车辆增加外设,进而增加对应的参数检测功能,提升了功能的扩展性。Therefore, the user can add peripherals to the vehicle according to actual needs, thereby increasing the corresponding parameter detection function and improving the scalability of the function.
本发明实施例的数据传输装置,数据传输方法,通过为参数分配对应的代码,利用代码来解析识别参数的种类,使得车载设备无需每次都传输固定种类的参数,而是根据实际情况传输需要的参数,因此提高了数据传输的灵活性,节省了数据流量和带宽资源,降低了服务器的负担。在此基础上,用户还可以根据需要增加新的参数检测功能,车载设备只需为新增的参数分配一个代码即可,从而大大提高了功能的扩展性。The data transmission device of the embodiment of the present invention, by assigning a corresponding code to a parameter, and using the code to analyze the type of the identification parameter, so that the in-vehicle device does not need to transmit a fixed type of parameter every time, but needs to transmit according to actual conditions. The parameters, thus increasing the flexibility of data transmission, saving data traffic and bandwidth resources, reducing the burden on the server. On this basis, the user can also add a new parameter detection function as needed, and the in-vehicle device only needs to assign a code to the newly added parameters, thereby greatly improving the scalability of the function.
本发明同时提出一种车载设备,其包括存储器、处理器和至少一个被存储在存储器中并被配置为由处理器执行的应用程序,所述应用程序被配置为用于执行权利一种数据传输方法。所述数据传输方法包括以下步骤:获取待传输的参数对应的代码;根据预设的协议格式将参数、代码和通用数据合成为协议数据;向外传输协议数据。本实施例中所描述的数据传输方法为本发明中上述实施例所涉及的数据传输方法,在此不再赘述。The invention also proposes an in-vehicle device comprising a memory, a processor and at least one application stored in the memory and configured to be executed by the processor, the application being configured to execute a data transmission method. The data transmission method includes the following steps: acquiring a code corresponding to a parameter to be transmitted; synthesizing the parameter, the code, and the general data into protocol data according to a preset protocol format; and transmitting the protocol data to the outside. The data transmission method described in this embodiment is the data transmission method in the foregoing embodiment of the present invention, and details are not described herein again.
本领域技术人员可以理解,本发明包括涉及用于执行本申请中所述操作中的一项或多项的设备。这些设备可以为所需的目的而专门设计和制造,或者也可以包括通用计算机中的已知设备。这些设备具有存储在其内的计算机程序,这些计算机程序选择性地激活或重构。这样的计算机程序可以被存储在设备(例如,计算机)可读介质中或者存储在适于存储电子指令并分别耦联到总线的任何类型的介质中,所述计算机可读介质包括但不限于任何类型的盘(包括软盘、硬盘、光盘、CD-ROM、和磁光盘)、ROM(Read-Only Memory,只读存储器)、RAM(Random Access Memory,随机存储器)、EPROM(Erasable Programmable Read-Only Memory,可擦写可编程只读存储器)、EEPROM(Electrically Erasable Programmable Read-Only Memory,电可擦可编程只读存储器)、闪存、磁性卡片或光线卡片。也就是,可读介质包括由设备(例如,计算机)以能够读的形式存储或传输信息的任何介质。Those skilled in the art will appreciate that the present invention includes apparatus that is directed to performing one or more of the operations described herein. These devices may be specially designed and manufactured for the required purposes, or may also include known devices in a general purpose computer. These devices have computer programs stored therein that are selectively activated or reconfigured. Such computer programs may be stored in a device (eg, computer) readable medium or in any type of medium suitable for storing electronic instructions and coupled to a bus, respectively, including but not limited to any Types of disks (including floppy disks, hard disks, optical disks, CD-ROMs, and magneto-optical disks), ROM (Read-Only Memory), RAM (Random Access Memory), EPROM (Erasable Programmable Read-Only) Memory, rewritable programmable read only memory), EEPROM (Electrically Erasable Programmable Read-Only Memory, flash memory, magnetic card or light card. That is, a readable medium includes any medium that is stored or transmitted by a device (eg, a computer) in a readable form.
本技术领域技术人员可以理解,可以用计算机程序指令来实现这些结构图和/或框图和/或流图中的每个框以及这些结构图和/或框图和/或流图中的框的组合。本技术领域技术人员可以理解,可以将这些计算机程序指令提供给通用计算机、专业计算机或其他可编程数据处理方法的处理器来实现,从而通过计算机或其他可编程数据处理方法的处理器来执行本发明公开的结构图和/或框图和/或流图的框或多个框中指定的方案。Those skilled in the art will appreciate that each block of the block diagrams and/or block diagrams and/or flow diagrams and combinations of blocks in the block diagrams and/or block diagrams and/or flow diagrams can be implemented by computer program instructions. . Those skilled in the art will appreciate that these computer program instructions can be implemented by a general purpose computer, a professional computer, or a processor of other programmable data processing methods, such that the processor is executed by a computer or other programmable data processing method. The blocks of the disclosed structure and/or block diagrams and/or flow diagrams or blocks specified in the various blocks.
本技术领域技术人员可以理解,本发明中已经讨论过的各种操作、方法、流程中的步骤、措施、方案可以被交替、更改、组合或删除。进一步地,具有本发明中已经讨论过的各种操作、方法、流程中的其他步骤、措施、方案也可以被交替、更改、重排、分解、组合或删除。进一步地,现有技术中的具有与本发明中公开的各种操作、方法、流程中的步骤、措施、方案也可以被交替、更改、重排、分解、组合或删除。Those skilled in the art can understand that the steps, measures, and solutions in the various operations, methods, and processes that have been discussed in the present invention may be alternated, changed, combined, or deleted. Further, other steps, measures, and schemes of the various operations, methods, and processes that have been discussed in the present invention may be alternated, modified, rearranged, decomposed, combined, or deleted. Further, the steps, measures, and solutions in the various operations, methods, and processes disclosed in the present invention may also be alternated, modified, rearranged, decomposed, combined, or deleted.
以上所述仅为本发明的优选实施例,并非因此限制本发明的专利范围,凡是利用本发明说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本发明的专利保护范围内。The above is only the preferred embodiment of the present invention, and is not intended to limit the scope of the invention, and the equivalent structure or equivalent process transformations made by the description of the invention and the drawings are directly or indirectly applied to other related The technical field is equally included in the scope of patent protection of the present invention.

Claims (20)

  1. 一种数据传输方法,包括以下步骤:A data transmission method includes the following steps:
    获取待传输的参数对应的代码;Obtain a code corresponding to the parameter to be transmitted;
    根据预设的协议格式将所述参数、所述代码和通用数据合成为协议数据;Synthesizing the parameter, the code, and the general data into protocol data according to a preset protocol format;
    向外传输所述协议数据。The protocol data is transmitted out.
  2. 根据权利要求1所述的数据传输方法,其中,所述根据预设的协议格式将所述参数、所述代码和通用数据合成为协议数据的步骤包括:The data transmission method according to claim 1, wherein said step of synthesizing said parameter, said code and general data into protocol data according to a preset protocol format comprises:
    将所述代码和所述参数组合为内容数据;Combining the code and the parameters into content data;
    将所述内容数据和所述通用数据组合为所述协议数据。The content data and the universal data are combined into the protocol data.
  3. 根据权利要求2所述的数据传输方法,其中,所述将所述代码和所述参数组合为内容数据的步骤包括:The data transmission method according to claim 2, wherein said step of combining said code and said parameter into content data comprises:
    将所述代码置于所述参数之前,组成一个字符串。Put the code before the argument to form a string.
  4. 根据权利要求2所述的数据传输方法,其中,所述将所述内容数据和所述通用数据组合为所述协议数据的步骤包括:The data transmission method according to claim 2, wherein said step of combining said content data and said general data into said protocol data comprises:
    将所述内容数据插入到两个通用数据之间的位置,组合为所述协议数据。The content data is inserted into a location between two general data, combined into the protocol data.
  5. 根据权利要求4所述的数据传输方法,其中,所述两个通用数据分别为设备号和验证值。The data transmission method according to claim 4, wherein the two general data are a device number and a verification value, respectively.
  6. 根据权利要求1所述的数据传输方法,其中,所述参数至少有一个,每一个参数对应一个代码。The data transmission method according to claim 1, wherein said parameter has at least one of which each parameter corresponds to a code.
  7. 根据权利要求1所述的数据传输方法,其中,所述获取待传输的参数对应的代码的步骤之前还包括:The data transmission method according to claim 1, wherein the step of acquiring the code corresponding to the parameter to be transmitted further comprises:
    当接收到新增目标参数的检测功能的请求时,增加目标参数检测功能;When the request for the detection function of the new target parameter is received, the target parameter detection function is added;
    为所述目标参数分配对应的代码。A corresponding code is assigned to the target parameter.
  8. 根据权利要求1所述的数据传输方法,其中,所述获取待传输的参数对应的代码的步骤之前还包括:The data transmission method according to claim 1, wherein the step of acquiring the code corresponding to the parameter to be transmitted further comprises:
    检测是否满足传输参数的条件;Detect whether the conditions of the transmission parameters are met;
    当满足传输参数的条件时,获取参数。The parameters are obtained when the conditions of the transmission parameters are met.
  9. 根据权利要求8所述的数据传输方法,其中,所述检测是否满足传输参数的条件的步骤包括:The data transmission method according to claim 8, wherein the step of detecting whether the condition of the transmission parameter is satisfied comprises:
    根据预设的时间规则判断当前是否到达传输参数的时间;Determining whether the current transmission parameter is reached according to a preset time rule;
    若是,判定满足传输参数的条件。If so, the condition that the transmission parameter is satisfied is determined.
  10. 根据权利要求8所述的数据传输方法,其中,所述检测是否满足传输参数的条件的步骤包括:The data transmission method according to claim 8, wherein the step of detecting whether the condition of the transmission parameter is satisfied comprises:
    根据预设的警戒规则判断参数是否达到警戒值;Determine whether the parameter reaches the warning value according to the preset warning rule;
    若是,判定满足传输参数的条件。If so, the condition that the transmission parameter is satisfied is determined.
  11. 一种数据传输装置,包括:A data transmission device comprising:
    代码获取模块,设置为获取待传输的参数对应的代码;a code acquisition module, configured to obtain a code corresponding to the parameter to be transmitted;
    数据合成模块,设置为根据预设的协议格式将所述参数、所述代码和通用数据合成为协议数据;a data synthesizing module configured to synthesize the parameter, the code, and general data into protocol data according to a preset protocol format;
    数据传输模块,设置为向外传输所述协议数据。A data transmission module configured to transmit the protocol data outward.
  12. 根据权利要求11所述的数据传输装置,其中,所述数据合成模块包括:The data transmission device according to claim 11, wherein said data synthesis module comprises:
    第一组合单元,设置为将所述代码和所述参数组合为内容数据;a first combination unit configured to combine the code and the parameter into content data;
    第二组合单元,设置为将所述内容数据和所述通用数据组合为所述协议数据。A second combining unit is arranged to combine the content data and the universal data into the protocol data.
  13. 根据权利要求12所述的数据传输装置,其中,所述第一组合单元设置为:将所述代码置于所述参数之前,组成一个字符串。The data transmission device according to claim 12, wherein said first combining unit is arranged to form said character string before said parameter is placed before said parameter.
  14. 根据权利要求12所述的数据传输装置,其中,所述第二组合单元设置为:将所述内容数据插入到两个通用数据之间的位置,组合为所述协议数据。The data transmission device according to claim 12, wherein said second combining unit is arranged to insert said content data into a position between two general data, combined into said protocol data.
  15. 根据权利要求14所述的数据传输装置,其中,所述两个通用数据分别为设备号和验证值。The data transmission device according to claim 14, wherein said two general data are a device number and a verification value, respectively.
  16. 根据权利要求11所述的数据传输装置,其中,所述参数至少有一个,每一个参数对应一个代码。The data transmission device according to claim 11, wherein said parameter has at least one parameter, and each parameter corresponds to a code.
  17. 根据权利要求11所述的数据传输装置,其中,所述装置还包括功能开启模块,所述功能开启模块包括:The data transmission device of claim 11, wherein the device further comprises a function opening module, the function opening module comprising:
    增加单元,设置为当接收到新增目标参数的检测功能的请求时,增加目标参数检测功能;Adding a unit, being set to increase a target parameter detection function when receiving a request for a detection function of a new target parameter;
    分配单元,设置为为所述目标参数分配对应的代码。An allocation unit configured to assign a corresponding code to the target parameter.
  18. 根据权利要求11所述的数据传输装置,其中,所述装置还包括参数获取模块,所述参数获取模块包括:The data transmission device of claim 11, wherein the device further comprises a parameter acquisition module, the parameter acquisition module comprising:
    检测单元,设置为检测是否满足传输参数的条件;a detecting unit configured to detect whether a condition of the transmission parameter is satisfied;
    获取单元,设置为当满足传输参数的条件时,获取参数。The acquisition unit is set to acquire the parameters when the conditions of the transmission parameters are met.
  19. 根据权利要求18所述的数据传输装置,其中,所述检测单元包括:The data transmission device according to claim 18, wherein said detecting unit comprises:
    第一判断单元,设置为根据预设的时间规则判断当前是否到达传输参数的时间;The first determining unit is configured to determine, according to the preset time rule, whether the current transmission parameter is reached;
    第一判定单元,设置为若当前到达传输参数的时间,则判定满足传输参数的条件。The first determining unit is configured to determine a condition that the transmission parameter is satisfied if the time at which the transmission parameter is currently reached.
  20. 一种车载设备,包括存储器、处理器和至少一个被存储在所述存储器中并被配置为由所述处理器执行的应用程序,其中,所述应用程序被配置为用于执行权利要求1所述的数据传输方法。An in-vehicle device comprising a memory, a processor, and at least one application stored in the memory and configured to be executed by the processor, wherein the application is configured to perform the method of claim 1. The data transmission method described.
PCT/CN2018/082025 2018-03-26 2018-04-04 Data transmission method, apparatus, and vehicle-mounted device WO2019184000A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810252286.0A CN108551475A (en) 2018-03-26 2018-03-26 Data transmission method and device
CN201810252286.0 2018-03-26

Publications (1)

Publication Number Publication Date
WO2019184000A1 true WO2019184000A1 (en) 2019-10-03

Family

ID=63517036

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/082025 WO2019184000A1 (en) 2018-03-26 2018-04-04 Data transmission method, apparatus, and vehicle-mounted device

Country Status (2)

Country Link
CN (1) CN108551475A (en)
WO (1) WO2019184000A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109495547B (en) * 2018-10-26 2022-05-03 北京车和家信息技术有限公司 Vehicle signal acquisition method and device, cloud server and vehicle
CN111130969B (en) * 2019-12-30 2021-06-18 歌尔科技有限公司 Serial port data receiving method and device, earphone, charging equipment and storage medium
CN117938318A (en) * 2024-03-25 2024-04-26 天津布尔科技有限公司 Custom protocol template generation method and system applied to Internet of vehicles

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101841452A (en) * 2010-04-30 2010-09-22 北汽福田汽车股份有限公司 Vehicle control local area network (LAN) CAN network
US20170206717A1 (en) * 2016-01-19 2017-07-20 Trendfire Technologies, Inc. System and method for driver evaluation, rating, and skills improvement

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1241411C (en) * 2002-09-04 2006-02-08 北京中视联数字系统有限公司 Method for realtime transmitting and receiving stock certificate data
CN103985256B (en) * 2014-04-28 2016-07-13 深圳威易森科技有限公司 vehicle identification data processing method, device and system
CN107341166B (en) * 2016-11-29 2020-03-24 安徽江淮汽车集团股份有限公司 Recommendation method and system for vehicle-mounted APP
CN107770740A (en) * 2017-09-30 2018-03-06 蔚来汽车有限公司 Vehicle-mounted data transmission method, method of reseptance and corresponding system
CN107682439B (en) * 2017-10-12 2020-06-05 深圳市沃特沃德股份有限公司 Data transmission method and device
CN107801213A (en) * 2017-10-23 2018-03-13 深圳市沃特沃德股份有限公司 Data transmission method and device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101841452A (en) * 2010-04-30 2010-09-22 北汽福田汽车股份有限公司 Vehicle control local area network (LAN) CAN network
US20170206717A1 (en) * 2016-01-19 2017-07-20 Trendfire Technologies, Inc. System and method for driver evaluation, rating, and skills improvement

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
GENERAL ADMINISTRATION OF QUALITY SUPERVISION, INSPECTION AND QUARANTINE OF THE PEOPLE REPUBLIC OF CHINA: "Technical specifications of remote service and management system for electric vehicles - Part 3: Communication protocol and data format", 29 August 2016, GB/T 32960.3-2016, NATIONAL STANDARD OF THE PEOPLE’S REPUBLIC OF CHINA, pages: 2 - 14 *

Also Published As

Publication number Publication date
CN108551475A (en) 2018-09-18

Similar Documents

Publication Publication Date Title
EP2706725B1 (en) Vehicle information processing system and methods
WO2019184000A1 (en) Data transmission method, apparatus, and vehicle-mounted device
CN105992306B (en) Binding method of terminal and home gateway
CN103987033A (en) Method, device and system for equipment to be connected with Wi-Fi network
CN103997510A (en) System and method for a human machine interface
EP2423806A1 (en) Method and device for transmitting universal serial bus audio data through a wireless data terminal
CN108538289B (en) Method, device and terminal equipment for realizing voice remote control based on Bluetooth
CN104036628A (en) Intelligent remote controller based on Bluetooth and quick pairing method
WO2020083258A1 (en) Data transmission method, vehicle-mounted communication device, and computer-readable storage medium
US9680604B2 (en) Method and apparatus for device to device communication
US11924631B2 (en) Bluetooth communication system capable of increasing generation efficiency of cypher keys required for data transmission between bluetooth host device and bluetooth device set, and related bluetooth device set
JP2017175211A (en) Inter-mobile body communication system, mobile body transmission controller, and mobile body reception controller
CN113553600A (en) Resource acquisition method, system, server and storage medium
CN110198533B (en) Method for remotely controlling BLE Bluetooth device and BLE Bluetooth device
CN106357786B (en) vehicle-mounted wireless interaction method and system based on DTMF
US9411050B1 (en) Global positioning system device for providing position location information to a smart device
CN203423731U (en) Real-time data transmission system in vehicle network
CN111726284A (en) WeChat sending method and device for vehicle-mounted intelligent sound box
CN104394188B (en) A kind of method and system of car networking data transmission
CN105866798A (en) Vehicle-mounted terminal IOT (Internet of Things) method based on Beidou communication
WO2022021439A1 (en) Transmission method and apparatus for sidelink synchronization signal
CN103997503A (en) Data collecting system based on CAN bus
WO2017063437A1 (en) Wearable device and method thereof for receiving and sending data
WO2018195763A1 (en) Intelligent in-vehicle system authenticating connection based on sound waves and method for connection in authentication
WO2018210139A1 (en) Wireless network node configuration method, apparatus, and system

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18911691

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18911691

Country of ref document: EP

Kind code of ref document: A1