CN109392191B - Communication method between automobile data recorder and terminal, automobile data recorder and storage medium - Google Patents

Communication method between automobile data recorder and terminal, automobile data recorder and storage medium Download PDF

Info

Publication number
CN109392191B
CN109392191B CN201811448794.2A CN201811448794A CN109392191B CN 109392191 B CN109392191 B CN 109392191B CN 201811448794 A CN201811448794 A CN 201811448794A CN 109392191 B CN109392191 B CN 109392191B
Authority
CN
China
Prior art keywords
module
identifier
terminal
identification
command
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811448794.2A
Other languages
Chinese (zh)
Other versions
CN109392191A (en
Inventor
高涛
王承松
王一澎
傅雪松
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Skyworth Automobile Intelligence Co ltd
Original Assignee
Shenzhen Skyworth Automobile Intelligence Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Skyworth Automobile Intelligence Co ltd filed Critical Shenzhen Skyworth Automobile Intelligence Co ltd
Priority to CN201811448794.2A priority Critical patent/CN109392191B/en
Publication of CN109392191A publication Critical patent/CN109392191A/en
Application granted granted Critical
Publication of CN109392191B publication Critical patent/CN109392191B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/10Active monitoring, e.g. heartbeat, ping or trace-route
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L5/00Arrangements affording multiple use of the transmission path
    • H04L5/003Arrangements for allocating sub-channels of the transmission path
    • H04L5/0053Allocation of signaling, i.e. of overhead other than pilot signals
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/76Television signal recording
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W24/00Supervisory, monitoring or testing arrangements
    • H04W24/08Testing, supervising or monitoring using real traffic
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/20Manipulation of established connections
    • H04W76/25Maintenance of established connections

Abstract

The embodiment of the invention discloses a communication method of an automobile data recorder and a terminal, the automobile data recorder and a storage medium, wherein the method comprises the following steps: receiving a control message sent by a terminal, wherein the control message comprises a module identifier, a command identifier and a data parameter which correspond to the module identifier, and the control message is compiled according to a custom communication protocol format; determining a response module according to the module identifier, and controlling the response module to respond according to the command identifier and the data parameter corresponding to the module identifier; and generating a feedback message according to the response result of the response module and the self-defined communication protocol format, and sending the feedback message to the terminal. The embodiment of the invention provides a communication method of an automobile data recorder and a terminal, the automobile data recorder and a storage medium, which are used for realizing real-time interaction of the automobile data recorder and the terminal.

Description

Communication method between automobile data recorder and terminal, automobile data recorder and storage medium
Technical Field
The embodiment of the invention relates to the technology of automobile data recorders, in particular to a communication method between an automobile data recorder and a terminal, the automobile data recorder and a storage medium.
Background
In recent years, the domestic automobile market is developed at a high speed, and China becomes the first automobile production and sale market in the world. However, the development of the vehicle-mounted electronic device is relatively slow compared to the explosion of the internet and the consumer electronic device. At present, a plurality of car owners often go to a car distribution market or a 4S shop to add an automobile data recorder after purchasing a new car, and functions of evidence collection, journey photographing, video recording and the like of the automobile data recorder become indispensable to the car owners.
At present, the traditional automobile data recorder is single in function and cannot interact with real-time communication of a terminal, so that the automobile data recorder cannot be controlled through the terminal and the like, and the operation convenience of the automobile data recorder is low.
Disclosure of Invention
In view of this, the embodiment of the present invention provides a communication method between an automobile data recorder and a terminal, the automobile data recorder and a storage medium, which are used for implementing real-time interaction between the automobile data recorder and the terminal.
In a first aspect, an embodiment of the present invention provides a method for communicating a vehicle event data recorder with a terminal, where the method includes:
receiving a control message sent by a terminal, wherein the control message comprises a module identifier, a command identifier and a data parameter corresponding to the module identifier, and the control message is compiled according to a custom communication protocol format;
determining a response module according to the module identifier, and controlling the response module to respond according to the command identifier and the data parameter corresponding to the module identifier;
and generating a feedback message according to the response result of the response module and the self-defined communication protocol format, and sending the feedback message to the terminal.
Optionally, the customized communication protocol format includes at least one of the following: content item, content item size, and content item order of the message.
Optionally, the controlling, according to the command identifier and the data parameter corresponding to the module identifier, the response module to perform the response includes:
judging whether the data parameters are null or not;
if not, controlling a response module to respond according to the command identifier and the data parameter corresponding to the module identifier;
and if so, controlling the response module to respond according to the command identifier corresponding to the module identifier.
Optionally, before the receiving the control message sent by the terminal, the method further includes: and establishing connection with a terminal, wherein the connection is WIFI connection, data network connection, Bluetooth connection, radio frequency connection or serial port connection.
Optionally, the communication method between the automobile data recorder and the terminal further includes:
receiving a first heartbeat message sent by a terminal, and keeping connection with the terminal according to the first heartbeat message;
and sending the second heartbeat information to the terminal so that the terminal can keep connection with the automobile data recorder according to the second heartbeat information.
Optionally, the module identifier includes at least one of: a query module identification, a control module identification and a setting module identification; accordingly, the method can be used for solving the problems that,
when the module identification is the query module identification, the command identification corresponding to the module identification comprises at least one of the following items: inquiring real-time preview state, inquiring video parameter, inquiring photographing state, inquiring recording state, inquiring SD card state, parking monitoring state and recorder version information;
when the module identification is the control module identification, the command identification corresponding to the module identification comprises at least one of the following items: controlling real-time preview, controlling video recording, controlling photographing and controlling sound recording;
when the module identifier is the set module identifier, the command identifier corresponding to the module identifier includes at least one of the following items: setting time, formatting the SD card, recovering to leave the factory, setting collision sensitivity, setting language, setting white balance, setting exposure, setting light source frequency, setting a voice broadcast switch, setting a watermark switch, setting a key prompt tone switch, setting a 3D noise reduction switch, setting a distortion correction switch, setting recording duration, setting recording resolution and firmware upgrade.
Optionally, the communication method between the automobile data recorder and the terminal further includes:
when the module identification is a query module identification and the command identification corresponding to the module identification is a query video state, the data parameter is a camera identification;
when the module identification is the control module identification and the command identification corresponding to the module identification is used for controlling real-time preview, the data parameters are preview opening and preview closing; when the command identifier corresponding to the module identifier is a control video, the data parameters are to start and stop video recording; when the command mark corresponding to the module mark is used for controlling recording, the data parameters are recording starting and recording stopping;
when the module identification is a setting module identification and the command identification corresponding to the module identification is setting time, the data parameter is a time parameter; when the command mark corresponding to the module mark is set with sensitivity, the data parameter is a sensitivity parameter; when the command mark corresponding to the module mark is a set language, the data parameter is a language type; when the command mark corresponding to the module mark is set to be white balance, the data parameter is a white balance parameter; when the command identifier corresponding to the module identifier is set to be the exposure, the data parameter is the exposure parameter; when the command mark corresponding to the module mark is the set light source frequency, the data parameter is the light source frequency parameter; when the command identifier corresponding to the module identifier is used for setting a voice broadcasting switch, a watermark switch, a key prompt tone switch, a 3D noise reduction switch or a distortion correction switch, the data parameter is on and off; when the command mark corresponding to the module mark is set to record the time length, the data parameter is a time parameter; and when the command identifier corresponding to the module identifier is set to record resolution, the data parameter is a resolution parameter.
Optionally, the communication method between the automobile data recorder and the terminal further includes:
and starting an http server, searching a local resource file according to the http request when receiving the http request sent by the terminal, and sending the resource file to the terminal.
In a second aspect, an embodiment of the present invention provides a driving recorder, including:
one or more processors;
a memory for storing one or more programs;
when the one or more programs are executed by the one or more processors, the one or more processors implement the communication method between the automobile data recorder and the terminal according to any embodiment of the invention.
In a third aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements a method for communicating a vehicle event data recorder with a terminal according to any embodiment of the present invention.
The embodiment of the invention provides a communication method between an automobile data recorder and a terminal, the automobile data recorder and a storage medium, wherein the method comprises the following steps: receiving a control message sent by a terminal, wherein the control message comprises a module identifier, a command identifier and a data parameter which correspond to the module identifier, and the control message is compiled according to a custom communication protocol format; determining a response module according to the module identifier, and controlling the response module to respond according to the command identifier and the data parameter corresponding to the module identifier; and generating a feedback message according to the response result of the response module and the self-defined communication protocol format, and sending the feedback message to the terminal. The terminal compiles a control message according to a self-defined communication protocol rule and sends the control message to the automobile data recorder; the automobile data recorder receives and responds to the control message, generates a feedback message according to a response result and a self-defined communication protocol rule, and sends the feedback message to the terminal, so that real-time interaction between the automobile data recorder and the terminal is realized.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, a brief description will be given below of the drawings required for the embodiments or the technical solutions in the prior art, and it is obvious that the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a flowchart of a communication method between a vehicle event data recorder and a terminal according to an embodiment of the present invention;
fig. 2 is a logic diagram of communication interaction in a communication method between a vehicle event data recorder and a terminal according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a vehicle event data recorder according to a fourth embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the technical solutions of the present invention will be clearly and completely described through embodiments with reference to the accompanying drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention. In the following embodiments, optional features and examples are provided in each embodiment, and various features described in the embodiments may be combined to form a plurality of alternatives, and each numbered embodiment should not be regarded as only one technical solution.
Example one
Fig. 1 is a flowchart of a communication method between an automobile data recorder and a terminal according to an embodiment of the present invention, where this embodiment is applicable to a case where the automobile data recorder communicates with the terminal, and the method may be implemented by the automobile data recorder, and may be specifically implemented by software and/or hardware in the automobile data recorder.
Referring to fig. 1, the communication method between the automobile data recorder and the terminal includes the following steps:
s110, receiving a control message sent by the terminal, wherein the control message comprises a module identifier, a command identifier and a data parameter corresponding to the module identifier, and the control message is written according to a self-defined communication protocol format.
The tachograph may receive control messages sent by a terminal, wherein the terminal may include, but is not limited to, a mobile terminal such as a mobile phone, a laptop, a PAD (tablet), etc., and a stationary terminal such as a desktop computer, etc.
The module identifier included in the control message, the command identifier and the data parameter corresponding to the module identifier are content items that the control message specified in the custom communication protocol format can include. And the automobile data recorder can respond to the control message according to the module identification contained in the control message, the command identification and the data parameter corresponding to the module identification.
Optionally, the custom communication protocol format includes at least one of the following: content item, content item size, and content item order of the message.
The content item of the message specified in the custom communication protocol format may include a frame header identifier, a data parameter length, and a check bit, in addition to a module identifier, a command identifier and a data parameter corresponding to the module identifier. The data packet of the control message can be identified through the frame header identification, whether the data parameter accords with the regulation can be judged through the data parameter length, and whether the control message can be executed can be judged through the check bit. Further, the content items of the message specified in the custom communication protocol format may also include other content, and are not limited to the above content items. Wherein, the content item of the message can be composed of numerical values, letters and/or word symbols; preferably, the content items of the message are numerical values, which may be binary, octal, decimal or hexadecimal values, for example.
The size of the content item may be understood as the number of bytes of the specified content item, for example, the size of the module identifier may be specified as 1 byte, the size of the frame header identifier may be specified as 2 bytes, and the size of the check bit may be specified as 4 bytes. Through the setting of the content items of the small bytes, instructions can be simplified, bandwidth occupation is reduced, transmission efficiency of control messages is improved, and higher transmission performance is achieved in a transmission channel with low bandwidth.
The content item sequence may be understood as an arrangement sequence or a transmission sequence of each content item in a data packet corresponding to the control message. Illustratively, the content item order may be, for example, frame header-module identification-command identification-data parameter length-data parameter-check bit, or frame header-module identification-command identification-data parameter length-check bit. The content item order may also be other reasonable orders, and is not limited to the above content item order.
The communication protocol may be made more complete by specifying the content item, content item size, and content item order of the message in a custom communication protocol format. The terminal compiles a control message according to a user-defined communication protocol format; the automobile data recorder analyzes and responds the control message according to the user-defined communication protocol format, and the response result is fed back to the terminal to generate a feedback message according to the user-defined communication protocol format, so that interaction between the terminal and the automobile data recorder can be completed.
And S120, determining a response module according to the module identifier, and controlling the response module to respond according to the command identifier and the data parameter corresponding to the module identifier.
The response module can be understood as a module corresponding to what kind of response is performed by the automobile data recorder, for example, the response module can be an inquiry module, and the status of each function of the automobile data recorder can be inquired through the inquiry module, for example, the functional status of the photographing function of the automobile data recorder can be inquired. Each response module can uniquely correspond to one module identifier, the corresponding relation between the module identifier and the response module can be stored in a preset storage unit, and the response module required for responding to the control message can be determined by inquiring the corresponding relation between the module identifier and the response module.
The command identifier corresponding to the module identifier may be understood as an operation object identifier for which objects can be operated by the response module corresponding to the module identifier. For example, when the response module is a control module, the control module may control the on and off of the emergency video, and may also control the on and off of the parking monitoring, and the like, and at this time, the identifier corresponding to the control of the emergency video and the identifier corresponding to the control of the parking monitoring may be used as the command identifier. For example, when the command identifier for querying the video recording status corresponding to the query module is 0x01, the command identifier for setting the time corresponding to the module may also be 0x 01. After the response module is determined by the module identifier, the command identifier corresponding to the response module is searched, so that the control message is ensured to be correctly responded.
The data parameter may or may not be null. For example, when the response module is a query module, and the command identifier is used for querying the state of the SD card, the query module directly queries the state of the SD card and determines that the SD card is in an insertion state or a removal state, and at this time, the data parameter may be null; for another example, when the response module is a control module, and when the command identifier is used for controlling the real-time preview, the control module needs to determine whether to control the real-time preview to be opened or closed, and which camera needs to be controlled, at this time, the data parameter is not empty, and specifically, the method may include opening the front-end camera for real-time preview, closing the front-end camera for real-time preview, opening the back-end camera for real-time preview, or closing the back-end camera for real-time preview, and the like. When the data parameter is null, the data parameter may specifically be 0x 00; when the data parameter is not null, it may be set to 0x01, 0x02, or 0x03, etc., and is not limited herein.
Optionally, controlling the response module to respond according to the command identifier and the data parameter corresponding to the module identifier, including:
judging whether the data parameters are null or not; if not, controlling a response module to respond according to the command identifier and the data parameter corresponding to the module identifier; and if so, controlling the response module to respond according to the command identifier corresponding to the module identifier.
When the data parameter is empty, the response module can directly respond to the control message according to the command identifier; and when the data parameter is not empty, the response module needs to respond the control message according to the command identifier and the data parameter. By judging whether the data parameters are empty or not, the automobile data recorder can perform condition-based response aiming at different command identifications corresponding to different response modules, and the response efficiency of the control message is improved.
And S130, generating a feedback message according to the response result of the response module and the self-defined communication protocol format, and sending the feedback message to the terminal.
The response result can be identified by a numerical value preset in a custom communication protocol format. For example, when the module identifier in the control message is the query module identifier and the command identifier is the query video state, the automobile data recorder calls the query module to query the video state, and the obtained video state is the response result, where the response result may be, for example, that the front-end camera does not record video, the front-end camera is recording video, the back-end camera does not record video, or the back-end camera is recording video. Each response result may correspond to a preset value, for example, the value of the front camera being used for recording may be 0x 01.
After the preset numerical value corresponding to the response result is obtained, the numerical value can be written into the content item of the data parameter corresponding to the feedback message, wherein the writing rule of the feedback message refers to the writing rule of the control message, that is, the control message and the feedback message are written according to the self-defined communication protocol rule. In addition, the module identification and the command identification in the feedback message are the same as those in the corresponding control message. Illustratively, when the module identifier in the control message is the query module identifier, the command identifier is the query video state, and the response result is that the previous video is being recorded, the module identifier in the feedback message is also the query module identifier, the command identifier is also the query video state, and the data parameter is a numerical value corresponding to the previous video.
Optionally, before receiving the control message sent by the terminal, the method further includes: and establishing connection with a terminal, wherein the connection is WIFI connection, data network connection, Bluetooth connection, radio frequency connection or serial port connection.
The interactive messages between the automobile data recorder and the terminal can be transmitted in a network connection mode such as WIFI connection or data network connection, can also be transmitted in a radio wave mode such as Bluetooth connection or radio frequency connection, and can also be transmitted in a serial connection mode such as RS-232. The communication method between the automobile data recorder and the terminal provided in the embodiment can be realized in both a high-bandwidth connection mode and a low-bandwidth connection mode.
Optionally, the communication method between the automobile data recorder and the terminal further includes: receiving a first heartbeat message sent by a terminal, and keeping connection with the terminal according to the first heartbeat message; and sending the second heartbeat information to the terminal so that the terminal keeps connection with the automobile data recorder according to the second heartbeat information.
The automobile data recorder can keep a connection state with the terminal according to the received first heartbeat message, and meanwhile, the second heartbeat message can be replied to the terminal, so that the terminal can keep the connection state with the automobile data recorder according to the second heartbeat message. When the automobile data recorder does not receive heartbeat information sent by the terminal within a preset time interval, connection with the terminal can be actively disconnected, and therefore resource occupation of the automobile data recorder is saved.
Fig. 2 is a communication interaction logic diagram in a communication method between a vehicle event data recorder and a terminal according to an embodiment of the present invention. The interactive logic mainly comprises the following steps:
s210, the terminal writes a control message according to a custom communication protocol format, wherein the control message comprises a module identifier, and a command identifier and a data parameter which correspond to the module identifier;
s220, the terminal sends a control message to the automobile data recorder;
s230, the automobile data recorder determines a response module according to the module identifier, and controls the response module to respond according to the command identifier and the data parameter corresponding to the module identifier;
s240, the automobile data recorder generates a feedback message according to the response result of the response module and the self-defined communication protocol format;
s250, the automobile data recorder sends a feedback message to the terminal;
s260, the terminal sends the first heartbeat message to the automobile data recorder;
s270, the automobile data recorder keeps connection with the terminal according to the first heartbeat message;
s280, the automobile data recorder sends second heartbeat information to the terminal;
and S290, the terminal keeps connection with the automobile data recorder according to the second heartbeat information.
The communication interaction logic between the terminal and the automobile data recorder accords with a client/server mode (C/S mode), the terminal serves as the client, and the automobile data recorder serves as the server. The terminal sends the control message to the automobile data recorder, and the automobile data recorder responds and feeds back according to the received control message, so that interaction between the terminal and the automobile data recorder is realized. In addition, the automobile data recorder can also receive first heartbeat information sent by the terminal, the connection with the terminal is kept according to the first heartbeat information, and meanwhile, second heartbeat information can be replied to the terminal, so that the terminal and the automobile data recorder are kept in a connection state according to the second heartbeat information.
The communication method between the automobile data recorder and the terminal provided by the embodiment receives a control message sent by the terminal, wherein the control message comprises a module identifier, a command identifier and a data parameter corresponding to the module identifier, and the control message is compiled according to a custom communication protocol format; determining a response module according to the module identifier, and controlling the response module to respond according to the command identifier and the data parameter corresponding to the module identifier; and generating a feedback message according to the response result of the response module and the self-defined communication protocol format, and sending the feedback message to the terminal. The terminal compiles a control message according to a self-defined communication protocol rule and sends the control message to the automobile data recorder; the automobile data recorder receives and responds to the control message, generates a feedback message according to a response result and a self-defined communication protocol rule, and sends the feedback message to the terminal, so that real-time interaction between the automobile data recorder and the terminal is realized.
Example two
In this embodiment, on the basis of the above embodiments, the custom communication protocol format is defined in detail. The present embodiment has the same inventive concept as the above embodiments, and the same or corresponding terms as the above embodiments are explained, and the present embodiment is not described again.
Optionally, in the communication method between the driving recorder and the terminal, the module identifier includes at least one of the following: a query module identification, a control module identification and a setting module identification; accordingly, the method can be used for solving the problems that,
when the module identification is the query module identification, the command identification corresponding to the module identification comprises at least one of the following items: inquiring real-time preview state, inquiring video parameter, inquiring photographing state, inquiring recording state, inquiring SD card state, parking monitoring state and recorder version information;
when the module identification is the control module identification, the command identification corresponding to the module identification comprises at least one of the following items: controlling real-time preview, controlling video recording, controlling photographing and controlling sound recording;
when the module identifier is the set module identifier, the command identifier corresponding to the module identifier includes at least one of the following items: setting time, formatting the SD card, recovering to leave the factory, setting collision sensitivity, setting language, setting white balance, setting exposure, setting light source frequency, setting a voice broadcast switch, setting a watermark switch, setting a key prompt tone switch, setting a 3D noise reduction switch, setting a distortion correction switch, setting recording duration, setting recording resolution and firmware upgrade.
Optionally, in the communication method between the driving recorder and the terminal, the method further includes:
when the module identification is a query module identification and the command identification corresponding to the module identification is a query video state, the data parameter is a camera identification;
when the module identification is the control module identification and the command identification corresponding to the module identification is used for controlling real-time preview, the data parameters are preview opening and preview closing; when the command identifier corresponding to the module identifier is a control video, the data parameters are to start and stop video recording; when the command mark corresponding to the module mark is used for controlling recording, the data parameters are recording starting and recording stopping;
when the module identification is a setting module identification and the command identification corresponding to the module identification is setting time, the data parameter is a time parameter; when the command mark corresponding to the module mark is set with sensitivity, the data parameter is a sensitivity parameter; when the command mark corresponding to the module mark is a set language, the data parameter is a language type; when the command mark corresponding to the module mark is set to be white balance, the data parameter is a white balance parameter; when the command identifier corresponding to the module identifier is set to be the exposure, the data parameter is the exposure parameter; when the command mark corresponding to the module mark is the set light source frequency, the data parameter is the light source frequency parameter; when the command identifier corresponding to the module identifier is used for setting a voice broadcasting switch, a watermark switch, a key prompt tone switch, a 3D noise reduction switch or a distortion correction switch, the data parameter is on and off; when the command mark corresponding to the module mark is set to record the time length, the data parameter is a time parameter; and when the command identifier corresponding to the module identifier is set to record resolution, the data parameter is a resolution parameter.
For example, when the module identifier is the query module identifier and the command identifier corresponding to the module identifier is the query video recording state, the control message received by the automobile data recorder may be 1FFF 00010100 (check code abbreviation), and a specific explanation of the control message is shown in table 1. Referring to table 1, 2 bytes of 1FFF corresponding to sequence number 1 is a frame header identifier; the 1-byte 00 representation module corresponding to the sequence number 2 is marked as a query module; the 1 byte 01 corresponding to the sequence number 3 represents that the command identifier corresponding to the query module is in a video query state; 01 of 1 byte corresponding to the sequence number 4 is the length of the data parameter; 00 corresponding to sequence number 5 is a data parameter, and the data parameter can be considered as null; the 4 bytes of data corresponding to the data 6 are check codes, which are not shown in the control message, and may be CRC check codes.
TABLE 1
Figure BDA0001883622390000131
At this time, after the vehicle event data recorder queries the video recording state by calling the query module, the feedback message sent to the terminal may be 1F FF 00010101 (check code is omitted), and a specific explanation of the feedback message is shown in table 2. Referring to table 2, the 2-byte 1FFF corresponding to the sequence number 1 is the frame header identifier; the 1-byte 00 representation module corresponding to the sequence number 2 is marked as a query module; the 1 byte 01 corresponding to the sequence number 3 represents that the command identifier corresponding to the query module is in a video query state; 01 of 1 byte corresponding to the sequence number 4 is the length of the data parameter; 01 corresponding to the serial number 5 is a data parameter, and the data parameter corresponds to the previous video; the 4 bytes of data corresponding to the data 6 are check codes, which are not shown in the control message, and may be CRC check codes. When the rear camera is not available, the corresponding numerical parameters can be reserved, and the video recording states of the multiple cameras can be set.
TABLE 2
Figure BDA0001883622390000141
The state of each function of the automobile data recorder can be fed back to the terminal through a feedback message after receiving a control instruction sent by the terminal, and the feedback message can be automatically generated and fed back to the terminal when the state of each function changes.
All the disclosed numerical values in this embodiment are exemplary examples, and the frame header identifier, each module identifier, the command identifier corresponding to each module, the data parameter length, the sequence of the data parameter and the check code, the numerical value and the byte number may be changed according to the actual situation. The content items in the control messages and feedback messages written in the communication protocol format may also be added, deleted and replaced according to the actual situation. And adding, deleting and replacing the response module corresponding to the module identifier, the operation object corresponding to the command identifier and the numerical value corresponding to the data parameter according to the actual situation.
The communication method between the automobile data recorder and the terminal provided by the embodiment defines the format of the user-defined communication protocol in detail, the communication protocol provided by the embodiment is shorter and more refined, the occupied bandwidth is small, the communication protocol can be transmitted in a network connection mode and also can be transmitted in connection modes such as a serial port, and the communication on a low-bandwidth connection channel has obvious advantages. In addition, the present embodiment has the same inventive concept as the above embodiments, and technical details that are not described in detail in the present embodiment can be referred to the above embodiments, and the present embodiment can achieve the same advantageous effects as the above embodiments.
EXAMPLE III
On the basis of the foregoing embodiments, in order to improve a communication method between the automobile data recorder and the terminal, the embodiment of installing an http server in the automobile data recorder is provided, so that the terminal can access a resource file of the automobile data recorder through an http protocol. The same or corresponding terms as those of the above-described embodiments are explained, and the description of the present embodiment is omitted.
Optionally, the communication method between the automobile data recorder and the terminal further includes:
and starting the http server, searching a local resource file according to the http request when receiving the http request sent by the terminal, and sending the resource file to the terminal.
The http server can be added to the automobile data recorder in advance. After the automobile data recorder starts the http server, if the terminal needs to access the local resource files of the automobile data recorder, such as photos, ordinary videos or locked videos, stored on the automobile data recorder, the terminal can send an http request to the automobile data recorder according to an http protocol. When the automobile data recorder receives the http request sent by the terminal, the corresponding local resource file can be searched according to the address contained in the http request.
In the communication method between the driving recorder and the terminal provided by this embodiment, the http server is installed in the driving recorder, so that the terminal can access the resource file of the driving recorder through an http protocol. In addition, the present embodiment has the same inventive concept as the above embodiments, and technical details that are not described in detail in the present embodiment can be referred to the above embodiments, and the present embodiment can achieve the same advantageous effects as the above embodiments.
Example four
The embodiment provides a vehicle event data recorder which can be used for communicating with a terminal. Fig. 3 is a schematic structural diagram of a vehicle event data recorder according to a fourth embodiment of the present invention. Referring to fig. 3, the event data recorder includes:
one or more processors 310;
a memory 320 for storing one or more programs;
when the one or more programs are executed by the one or more processors 310, the one or more processors 310 are enabled to implement the method for communicating the automobile data recorder with the terminal as set forth in embodiments one to three.
In FIG. 3, a processor 310 is illustrated as an example; the processor 310 and the memory 320 may be connected by a bus or other means, such as the bus connection shown in FIG. 3.
The memory 320 is a computer-readable storage medium, and can be used for storing software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to the communication method between the vehicle event data recorder and the terminal in the embodiment of the present invention. The processor 310 executes various functional applications and data processing of the automobile data recorder by running the software programs, instructions and modules stored in the memory 320, that is, the communication method between the automobile data recorder and the terminal is realized.
The memory 320 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the drive recorder, and the like. Further, the memory 320 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, the memory 320 may further include memory located remotely from the processor 310, which may be connected to the tachograph through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
In addition, according to different forms of the automobile data recorder, in addition to the processor 310 and the memory 320, the automobile data recorder may include other modules or structures, for example, the automobile data recorder may be a terminal with an audio playing function, and then further includes a speaker; for another example, the automobile data recorder may be a terminal with a touch function, and further includes a touch screen for displaying a control interface for a user to perform a touch operation on the control interface.
The vehicle event data recorder provided in this embodiment and the vehicle event data recorder communication method provided in embodiments one to three belong to the same inventive concept, and technical details that are not described in detail in this embodiment can be referred to in embodiments one to three, and this embodiment has the same beneficial effects as in embodiments one to three.
EXAMPLE five
The present embodiment provides a computer-readable storage medium on which a computer program is stored, which when executed by a processor, implements the method of communicating a vehicle event recorder with a terminal as set forth in embodiments one to three.
The computer-readable storage medium provided by the present embodiment and the communication method between the car recorder and the terminal provided by the first to third embodiments belong to the same inventive concept, and technical details that are not described in detail in the present embodiment can be referred to the first to third embodiments, and the present embodiment has the same beneficial effects as the first to third embodiments.
From the above description of the embodiments, it is obvious for those skilled in the art that the present invention can be implemented by software and necessary general hardware, and certainly, can also be implemented by hardware, but the former is a better embodiment in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which can be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device) to execute the methods according to the embodiments of the present invention.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (6)

1. A communication method between a vehicle event data recorder and a terminal is characterized by comprising the following steps:
receiving a control message sent by a terminal, wherein the control message comprises a module identifier, a command identifier and a data parameter corresponding to the module identifier, and the control message is compiled according to a custom communication protocol format;
the module identification comprises at least one of: a query module identification, a control module identification and a setting module identification; accordingly, the method can be used for solving the problems that,
when the module identification is the query module identification, the command identification corresponding to the module identification comprises at least one of the following items: inquiring real-time preview state, inquiring video parameter, inquiring photographing state, inquiring recording state, inquiring SD card state, parking monitoring state and recorder version information;
when the module identification is the control module identification, the command identification corresponding to the module identification comprises at least one of the following items: controlling real-time preview, controlling video recording, controlling photographing and controlling sound recording;
when the module identifier is the set module identifier, the command identifier corresponding to the module identifier includes at least one of the following items: setting time, formatting an SD card, recovering from a factory, setting collision sensitivity, setting language, setting white balance, setting exposure, setting light source frequency, setting a voice broadcast switch, setting a watermark switch, setting a key prompt tone switch, setting a 3D noise reduction switch, setting a distortion correction switch, setting recording duration, setting recording resolution and firmware upgrading;
when the module identification is a query module identification and the command identification corresponding to the module identification is a query video state, the data parameter is a camera identification;
when the module identification is the control module identification and the command identification corresponding to the module identification is used for controlling real-time preview, the data parameters are preview opening and preview closing; when the command identifier corresponding to the module identifier is a control video, the data parameters are to start and stop video recording; when the command mark corresponding to the module mark is used for controlling recording, the data parameters are recording starting and recording stopping;
when the module identification is a setting module identification and the command identification corresponding to the module identification is setting time, the data parameter is a time parameter; when the command mark corresponding to the module mark is set with sensitivity, the data parameter is a sensitivity parameter; when the command mark corresponding to the module mark is a set language, the data parameter is a language type; when the command mark corresponding to the module mark is set to be white balance, the data parameter is a white balance parameter; when the command identifier corresponding to the module identifier is set to be the exposure, the data parameter is the exposure parameter; when the command mark corresponding to the module mark is the set light source frequency, the data parameter is the light source frequency parameter; when the command identifier corresponding to the module identifier is used for setting a voice broadcasting switch, a watermark switch, a key prompt tone switch, a 3D noise reduction switch or a distortion correction switch, the data parameter is on and off; when the command mark corresponding to the module mark is set to record the time length, the data parameter is a time parameter; when the command identifier corresponding to the module identifier is set to record resolution, the data parameter is a resolution parameter;
determining a response module according to the module identifier, and controlling the response module to respond according to the command identifier and the data parameter corresponding to the module identifier;
the step of controlling the response module to respond according to the command identifier and the data parameter corresponding to the module identifier comprises the following steps:
judging whether the data parameters are null or not;
if not, controlling a response module to respond according to the command identifier and the data parameter corresponding to the module identifier;
if yes, controlling a response module to respond according to the command identifier corresponding to the module identifier;
generating a feedback message according to a response result of the response module and a self-defined communication protocol format, and sending the feedback message to the terminal;
wherein the custom communication protocol format comprises at least one of: content item, content item size and content item order of the message;
wherein the content items of the message comprise: the module identification is a command identification and a data parameter corresponding to the module identification, a frame header identification, a data parameter length and a check bit;
the form of the content item of the message comprises: numerical values, letters and/or symbols;
wherein the size of the content item is the number of bytes of the specified content item;
wherein, the content item sequence is the arrangement sequence or transmission sequence of each content item in the data packet corresponding to the control message;
the content item order is: frame header-module identification-command identification-data parameter length-data parameter-check bit.
2. The method of claim 1, wherein before the receiving the control message sent by the terminal, further comprising: and establishing connection with a terminal, wherein the connection is WIFI connection, data network connection, Bluetooth connection, radio frequency connection or serial port connection.
3. The method of claim 1, further comprising:
receiving a first heartbeat message sent by a terminal, and keeping connection with the terminal according to the first heartbeat message;
and sending the second heartbeat information to the terminal so that the terminal can keep connection with the automobile data recorder according to the second heartbeat information.
4. The method of claim 1, further comprising:
and starting an http server, searching a local resource file according to the http request when receiving the http request sent by the terminal, and sending the resource file to the terminal.
5. An automobile data recorder, characterized in that, the automobile data recorder includes:
one or more processors;
a memory for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement the method for communicating a vehicle event data recorder with a terminal as claimed in any one of claims 1-4.
6. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, implements a method for communicating a tachograph with a terminal according to any one of claims 1 to 4.
CN201811448794.2A 2018-11-28 2018-11-28 Communication method between automobile data recorder and terminal, automobile data recorder and storage medium Active CN109392191B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811448794.2A CN109392191B (en) 2018-11-28 2018-11-28 Communication method between automobile data recorder and terminal, automobile data recorder and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811448794.2A CN109392191B (en) 2018-11-28 2018-11-28 Communication method between automobile data recorder and terminal, automobile data recorder and storage medium

Publications (2)

Publication Number Publication Date
CN109392191A CN109392191A (en) 2019-02-26
CN109392191B true CN109392191B (en) 2021-03-09

Family

ID=65430173

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811448794.2A Active CN109392191B (en) 2018-11-28 2018-11-28 Communication method between automobile data recorder and terminal, automobile data recorder and storage medium

Country Status (1)

Country Link
CN (1) CN109392191B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110336650B (en) * 2019-07-02 2022-03-22 苏州华兴源创科技股份有限公司 Signaling interaction system and method

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105049767A (en) * 2015-08-18 2015-11-11 深圳市为有视讯有限公司 Method for generating photographing associated short video through picture pick-up device and downloading and playing short video
CN105160837A (en) * 2015-09-29 2015-12-16 爱培科科技开发(深圳)有限公司 Driving alarm information via-cloud acquisition method and system based mobile terminal
CN105721557A (en) * 2016-01-25 2016-06-29 深圳市为有视讯有限公司 Vehicle-mounted information transmission system
CN105869233A (en) * 2016-03-25 2016-08-17 奇瑞汽车股份有限公司 Travel recorder for realizing intelligent interaction, and control method thereof
CN106327609A (en) * 2015-07-07 2017-01-11 北京易车互联信息技术有限公司 Control method, device and system for automobile data recorder
CN106340162A (en) * 2015-07-07 2017-01-18 北京易车互联信息技术有限公司 Automobile data recorder, control method, device and system thereof
CN107818610A (en) * 2017-11-22 2018-03-20 深圳市沃特沃德股份有限公司 The method and device of remotely controlling vehicle mounted systematic collaboration drive recorder shooting

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130238185A1 (en) * 2012-03-07 2013-09-12 Cheng-Yi Cho Car video device enabling wireless transmission to and from portable communication device
CN103067405A (en) * 2013-01-11 2013-04-24 深圳市盛视科技有限公司 Method and device for cross-network safe transmission
CN106462378A (en) * 2016-09-28 2017-02-22 北京小米移动软件有限公司 Display method, apparatus and automobile data recorder

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106327609A (en) * 2015-07-07 2017-01-11 北京易车互联信息技术有限公司 Control method, device and system for automobile data recorder
CN106340162A (en) * 2015-07-07 2017-01-18 北京易车互联信息技术有限公司 Automobile data recorder, control method, device and system thereof
CN105049767A (en) * 2015-08-18 2015-11-11 深圳市为有视讯有限公司 Method for generating photographing associated short video through picture pick-up device and downloading and playing short video
CN105160837A (en) * 2015-09-29 2015-12-16 爱培科科技开发(深圳)有限公司 Driving alarm information via-cloud acquisition method and system based mobile terminal
CN105721557A (en) * 2016-01-25 2016-06-29 深圳市为有视讯有限公司 Vehicle-mounted information transmission system
CN105869233A (en) * 2016-03-25 2016-08-17 奇瑞汽车股份有限公司 Travel recorder for realizing intelligent interaction, and control method thereof
CN107818610A (en) * 2017-11-22 2018-03-20 深圳市沃特沃德股份有限公司 The method and device of remotely controlling vehicle mounted systematic collaboration drive recorder shooting

Also Published As

Publication number Publication date
CN109392191A (en) 2019-02-26

Similar Documents

Publication Publication Date Title
WO2020223854A1 (en) Device network configuration method and apparatus, electronic device and storage medium
EP1886469A1 (en) A method for generating an update status alert in a device
CN109617963B (en) Equipment control method and device and Internet of things system
CN109725543B (en) Equipment control code configuration method and device, cloud server and network system
CN109392191B (en) Communication method between automobile data recorder and terminal, automobile data recorder and storage medium
CN109298878A (en) Law-enforcing recorder upgrade-system and law-enforcing recorder upgrade method based on Internet of Things
CN111464351A (en) Network distribution method and device for intelligent household equipment, terminal equipment and storage medium
CN108052401B (en) System attribute monitoring method, terminal device and computer readable storage medium
CN109213580A (en) Using exchange method and device
US20230161304A1 (en) Method and system for interaction between vehicle and smart device
CN116055538A (en) Control method and device of Internet of things equipment, terminal equipment and storage medium
CN113412468A (en) SDK plug-in loading method and device, mobile terminal and storage medium
CN114422436A (en) Gateway, gateway control method, gateway control device, electronic equipment and storage medium
CN114651236A (en) Resource deleting method, device, equipment and storage medium
CN108322812B (en) Multi-screen interaction method and device and terminal
CN114979087B (en) Message processing method, device, equipment and storage medium
CN111935271A (en) Data updating method, device and storage medium
CN110730439B (en) Method and device for dynamically connecting Bluetooth equipment
JP2019091444A (en) Processing method of smart interactive, device, facility and computer storage medium
CN109218841B (en) Barrage message transmission method, device, equipment and storage medium
WO2024002298A1 (en) Voice instruction processing method, apparatus and system, and storage medium
CN116743761B (en) Cooperative working method and electronic equipment
CN102143608B (en) Start card and instruction processing method thereof
CN109246484B (en) Barrage message transmission method, device, equipment and storage medium
CN111182012B (en) Intelligent equipment management method, device and system

Legal Events

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