WO2019010686A1 - Data processing method and data processing apparatus - Google Patents

Data processing method and data processing apparatus Download PDF

Info

Publication number
WO2019010686A1
WO2019010686A1 PCT/CN2017/092888 CN2017092888W WO2019010686A1 WO 2019010686 A1 WO2019010686 A1 WO 2019010686A1 CN 2017092888 W CN2017092888 W CN 2017092888W WO 2019010686 A1 WO2019010686 A1 WO 2019010686A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
processed
data packet
packet
parsing
Prior art date
Application number
PCT/CN2017/092888
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 深圳市元征科技股份有限公司
Priority to CN201780000617.5A priority Critical patent/CN107636602A/en
Priority to PCT/CN2017/092888 priority patent/WO2019010686A1/en
Publication of WO2019010686A1 publication Critical patent/WO2019010686A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/40Network security protocols
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers

Definitions

  • the present invention belongs to the technical field of vehicle networking, and in particular, to a data processing method and a data processing device.
  • the embodiments of the present invention provide a data processing method and a data processing device, so as to solve the complexity that the data format received or output by the existing vehicle terminal is not necessarily suitable for the host factory, which causes the product of the host factory to burst. Increased issues that affect product burst cycles.
  • a first aspect of the present invention provides a data processing method, including:
  • a second aspect of the present invention provides a data processing apparatus, including:
  • a data buffering unit configured to receive data to be processed uploaded by the terminal according to a preset data storage manner, and store the to-be-processed data in a data buffer area;
  • a data parsing unit configured to call the protocol library to parse the to-be-processed data, and output parsing result data in a specified format
  • a data storage unit configured to store the parsing result data.
  • a third aspect of the present invention provides a data processing system, including: a terminal and a data processing device;
  • the terminal is configured to upload data to be processed according to a preset data storage manner
  • the data processing device is configured to receive data to be processed uploaded by the terminal according to a preset data storage manner, and store the to-be-processed data in a data buffer area; invoke a protocol library to parse the to-be-processed data, and Outputting parsing result data of a specified format; storing the parsing result data.
  • a fourth aspect of the present invention provides a data processing device, including: a processor, a transceiver device coupled to the processor, and a memory coupled to the processor, the memory for storing one a group program code; receiving, by the transceiver device, data to be processed uploaded by the terminal according to a preset data storage manner; the processor calling the program code in the memory to perform the following operations: storing the to-be-processed data into a data cache And calling the protocol library to parse the to-be-processed data, and outputting the parsing result data in a specified format; storing the parsing result data through a memory.
  • a fifth aspect of the invention provides a computer readable storage medium storing a computer program, the computer program being executed by a processor to implement the steps of the data processing method as described above.
  • the present invention has the beneficial effects compared with the prior art: the present invention receives the data to be processed uploaded by the terminal according to a preset data storage manner, and stores the to-be-processed data in the data buffer area, and then invokes The protocol library parses the to-be-processed data, and outputs the parsing result data of the specified format, and finally stores the parsing result data, and the host factory user does not need to care about the data format of the terminal data, thereby reducing the complexity of the product bursting and shortening the product burst. Cycle, improve product delivery speed.
  • FIG. 1 is a system architecture diagram of a data processing system according to an embodiment of the present invention.
  • FIG. 2 is a schematic diagram of an application scenario of a data processing system according to an embodiment of the present invention.
  • FIG. 3 is a flowchart of implementing a data processing method on a data processing device side according to an embodiment of the present invention.
  • FIG. 3 is a flowchart of an implementation of another data processing method on a data processing device side according to an embodiment of the present invention
  • FIG. 3b is a flowchart of an implementation of another data processing method on the data processing device side according to an embodiment of the present invention.
  • FIG. 3c is a flowchart showing an implementation of another data processing method on the data processing device side according to an embodiment of the present invention.
  • FIG. 4 is a structural block diagram of a data processing apparatus according to an embodiment of the present invention.
  • FIG. 5 is a schematic diagram of a data processing device according to an embodiment of the present invention.
  • the data processing system includes a terminal 1 and a data processing device 2, wherein:
  • the terminal 1 is configured to upload data to be processed according to a preset data storage manner.
  • the terminal 1 may be an in-vehicle terminal, and the in-vehicle terminal is a front-end device of the vehicle monitoring and management system, and may also be called a vehicle scheduling monitoring terminal (TCU terminal), having integrated positioning, communication, and automobile.
  • TCU terminal vehicle scheduling monitoring terminal
  • a number of functions such as a tachograph.
  • the terminal 1 uploads the collected data to be processed according to a preset data storage manner, and the data to be processed includes vehicle diagnostic data, such as vehicle speed, speed, and total mileage.
  • the terminal 1 uploads vehicle diagnostic data according to the data storage mode of the code table.
  • the data storage mode of the code table is a data storage mode defined according to the custom communication protocol of the terminal 1. For example, the number of bits of the binary number corresponding to different data contents in the data to be processed is pre-defined, and the data to be processed uploaded by the terminal 1 according to the code table is stored, and the data to be processed is stored in the data buffer.
  • the data to be processed is converted into a binary number. If the data to be processed includes the vehicle speed, the first position of the binary number is set to 1. If the data to be processed includes the rotation speed, the second position of the binary number is set to 1. If the total mileage is not included in the to-be-processed data, the third position of the binary number is 0. If the to-be-processed data includes fuel consumption, the third position of the binary number is set to 1.
  • the data processing device 2 is configured to receive data to be processed uploaded by the terminal 1 according to a preset data storage manner, and store the to-be-processed data in a data buffer area; and invoke a protocol library to parse the to-be-processed data. And outputting the parsing result data of the specified format; storing and parsing the parsing result data.
  • the data processing device 2 is configured to receive data to be processed that is uploaded by the terminal 1 according to a preset data storage manner, for example, the data to be processed uploaded by the receiving terminal 1 according to the data storage manner of the code table, and
  • the data to be processed is stored in the data buffer of the data processing device 2, and the protocol library is called to parse the data to be processed in the data buffer.
  • the database buffer may be parsed by the application server of the data processing device 2 by calling the protocol library.
  • the data to be processed uploaded by the terminal 1 outputs the parsing result data of the specified format.
  • the calling protocol library parses the data to be processed that is uploaded to the data buffer, instead of receiving the cached data in the data buffer before this time, in the protocol library.
  • the communication protocol includes standard communication protocols and custom communication protocols, such as the J1939 protocol of CAN BUS, the J1979 protocol, and the private diagnostic protocol.
  • the analysis result data of the specified format outputted after parsing is stored in a designated area, for example, stored in the database server of the data processing device 2.
  • the specified format can be in JSON format.
  • the data processing device 2 receives the terminal 1 and uploads according to a preset data storage manner. Pending data to improve parsing speed.
  • the data processing system may establish a wireless connection between the data processing device 2 and the plurality of terminals 1 by using a Bluetooth technology, a WIFI technology, or a 3G/4G technology, or may use a serial port technology or a USB interface technology.
  • the wired connection between the data processing device 2 and the terminal 1 is established.
  • the data processing system includes an in-vehicle terminal and a data processing device, where the data processing device includes an application server and a database server.
  • the vehicle terminal uploads the data to be processed according to the code table manner
  • the application server receives the data to be processed uploaded by the vehicle terminal according to the code table by using the signal of the mobile base station, and stores the to-be-processed data in the data buffer area, and the call includes J1939.
  • Protocol J1979 protocol, private diagnostic protocol, and other protocol protocol parsing data buffer area, the data to be processed uploaded by the vehicle terminal, outputting the parsing result data in JSON format, and storing the parsing result data to the data processing device In the database server, for users to use.
  • the terminal uploads the data to be processed according to a preset data storage manner
  • the data processing device receives the data to be processed uploaded by the terminal according to a preset data storage manner, and the data to be processed is
  • the user saves the data buffer, and then calls the protocol library to parse the data to be processed, and outputs the parsing result data in a specified format, such as the JS ON format, and finally stores the parsed result data in the specified format, and the user does not need to care about the data format of the terminal data. , thereby reducing the complexity of product bursts, shortening product burst cycles, and increasing product delivery speed.
  • FIG. 3 is a flowchart of a data processing method according to an embodiment of the present invention.
  • the execution body of the process is the data processing device 2 shown in FIG. 1, which is described in detail as follows:
  • Step S201 Receive data to be processed uploaded by the terminal according to a preset data storage manner, and store the to-be-processed data in a data buffer.
  • the terminal may be an in-vehicle terminal
  • the data to be processed includes vehicle diagnostic data, such as data such as vehicle speed, rotational speed, total mileage, fuel consumption, and the like.
  • the preset data storage manner may be a data storage manner of the code table, and the code table is a data storage manner customized according to the terminal's custom communication protocol. For example, the number of bits of the binary number corresponding to different data contents in the data to be processed is pre-customized, and the data to be processed is stored in the data buffer according to the data to be processed uploaded by the terminal according to the code table.
  • the data to be processed is converted into a binary number, if the data to be processed includes a speed , the first position of the binary number is 1, if the to-be-processed data includes the rotation speed, the second position of the binary number is set to 1. If the total data is not included in the to-be-processed data, the third position of the binary number is 0, if the fuel to be processed includes fuel consumption, the third position of the binary number is set to 1.
  • Step S202 calling the protocol library to parse the to-be-processed data, and outputting parsing result data in a specified format.
  • the calling protocol library parses the data to be processed that is uploaded this time, that is, the protocol library is called to parse the latest uploaded pending data, where the protocol library can be used.
  • C + + burst, C + + package protocol parsing module into a dynamic link library file for program call, output in the form of (.so) library, can be called across the platform, which is convenient for users to call, the protocol library includes communication protocol, Communication protocols include standard communication protocols and custom communication protocols, such as the J1939 protocol of CAN BUS, the J1979 protocol, and the private diagnostic protocol.
  • the parsing result data is obtained, and the protocol of the login packet data, the GPS data packet, the private data stream (the storage method of the code table), the fault code (private storage), and the like are obtained. Parsing the result data of the data, and outputting the parsing result data in a specified format, such as parsing the result data as described in the JSON format.
  • JSON Ja vaScript Object Notation
  • JSON is a lightweight data exchange format. It is based on a subset of the JavaScript Programming Language, Standard ECMA-262 3rd Edition - December 1999.
  • JSON uses a completely language-independent text format, but also uses a habit similar to the C language family (including C, C++, C#, Java, JavaScript, Perl, Python, etc.).
  • the data in JSON format is easy for people to read and write, and the same is easy for machine parsing and generation, and effectively improve network transmission efficiency.
  • the data to be processed is parsed by calling a protocol library, and the parsing result data in the JSON format is output, which is convenient for the user to read and use.
  • the step S202 specifically includes:
  • the protocol in the protocol library is invoked, and the data packet is intercepted from the received data to be processed, and the characteristic parameters of the data packet include a consecutively arranged header, a trailer, a packet length, and a data service number, and further, The characteristic parameters of the data packet also include a command word, a data content, and a check digit.
  • the intercepting data packet may include a login data packet, a positioning data packet, a vehicle diagnostic data stream, and a fault code
  • the login data packet includes protocol data of the terminal custom communication protocol, such as a terminal.
  • the terminal number the GPS data packet includes positioning information of the vehicle
  • the vehicle diagnostic data stream includes actual data of the vehicle, such as data such as vehicle speed, speed, total mileage, fuel consumption, etc.
  • the fault code includes fault information of the vehicle.
  • the vehicle diagnostic data stream is stored and uploaded in a data stream code table manner, and other data packets may be stored and uploaded in a specified format.
  • the data packet in order to detect the validity of the data packet, it may be determined whether the data packet is a data packet that meets a user's requirement, and if not, the data packet is invalid, and an invalid prompt is sent, if the data packet is satisfied.
  • the data packet requested by the user parses the content of the data packet and outputs the parsing result data in a specified format. Further, invalid data packets are deleted to reduce storage space usage.
  • the validity of the data packet is detected, including:
  • B l acquiring characteristic parameters of the data packet
  • the feature parameters of the data packet are obtained, that is, the packet header, the packet tail, the packet length, and the data service of the data packet are obtained. No.
  • the feature parameters such as the header, the end of the packet, the packet length, and the data service number in the intercepted data packet are compared with the standard packet format parameters specified by the communication protocol in the protocol library. If matched, the data packet is valid. If the match is matched, the packet is invalid.
  • the detecting the validity of the data packet includes:
  • the terminal number corresponding to the data packet is searched, that is, the terminal number of the data packet terminal is sent.
  • the terminal number is the first time that the terminal is connected to the data processing device and registered on the data processing device, and is randomly allocated by the data processing device or allocated according to a certain standard.
  • the data processing device After the terminal is first connected to the data processing device and registered on the data processing device, the data processing device notifies the terminal number to the terminal, and simultaneously stores the terminal number on the data processing device.
  • the terminal sends the data to be processed to the data processing device the data of the number is included in the data to be processed transmitted by the terminal.
  • the terminal number is obtained, and the terminal number in the custom communication protocol in the protocol library is matched and matched, that is, the data processing device searches for the presence of the terminal number, and if the terminal number is not found, Then, the above data packet is invalid, and the terminal that sends the data packet is illegally connected to the data processing device. If the above terminal number is found, the above data packet is valid, and the terminal transmitting the data packet is legally connected to the data processing device, and the next step is performed.
  • parsing the content of the data packet, and generating the parsing result data of the specified format includes:
  • the communication protocol in the protocol library includes a standard communication protocol and a custom communication protocol, such as the J1939 protocol of the CAN BUS, the J1979 protocol, and the private diagnostic protocol. If the data packet intercepted from the received data to be processed is a valid data packet, the data packet is parsed according to a byte bit corresponding to a standard communication protocol in the communication protocol, and the parsing result data of the specified format is output, or The data item of the custom communication protocol in the communication protocol parses the data packet, and outputs parsing result data in a specified format, where the communication protocol includes a standard communication protocol and a custom communication protocol, and the specified format may be JSON format.
  • Step S203 storing the parsing result data.
  • the parsing result data of the JSON format is stored, for example, to a database server of the data processing device for use by the user.
  • the data processing method further includes:
  • the data to be processed of the data buffer is cleared every preset period.
  • the to-be-processed data stored in the data buffer is cleared every predetermined period to ensure that the data buffer has sufficient storage space to receive the newly-processed pending data of the terminal.
  • the data processing device receives the data to be processed uploaded by the terminal according to a preset data storage manner, and stores the to-be-processed data in a data buffer area, and then invokes the protocol library to parse the data.
  • the complexity shorten the product bursting period, and improve the delivery speed of the product.
  • the data to be processed in the data buffer area is periodically cleared to ensure that the data buffer has sufficient storage space to receive the newly uploaded pending data of the terminal.
  • FIG. 4 is a structural block diagram of a data processing apparatus according to an embodiment of the present invention. For convenience of description, only parts related to the embodiment of the present invention are shown. .
  • the data processing apparatus includes: a data buffer unit 41, a data parsing unit 42, and a data storage unit 43, wherein:
  • the data buffering unit 41 is configured to receive data to be processed uploaded by the terminal according to a preset data storage manner, and store the to-be-processed data in a data buffer.
  • the terminal may be an in-vehicle terminal
  • the data to be processed includes vehicle diagnostic data, such as data such as vehicle speed, rotational speed, total mileage, fuel consumption, and the like.
  • the preset data storage manner may be a data storage manner of the code table, and the code table is a data storage manner customized according to the terminal's custom communication protocol. For example, the number of bits of the binary number corresponding to different data contents in the data to be processed is pre-customized, and the data to be processed is stored in the data buffer according to the data to be processed uploaded by the terminal according to the code table. Exemplarily, the data to be processed is converted into a binary number.
  • the first position of the binary number is set to 1. If the data to be processed includes the rotation speed, the second position of the binary number is set to 1. If the total mileage is not included in the to-be-processed data, the third position of the binary number is 0, if the to-be-processed The fuel consumption is included in the data, and the third position of the binary number is set to 1.
  • the data parsing unit 42 is configured to call the protocol library to parse the to-be-processed data, and output the parsing result data in a specified format.
  • the calling protocol library parses the pending data to be processed, that is, invokes the protocol library to parse the latest uploaded pending data, where the protocol library can be used.
  • C + + burst, C + + package protocol parsing module into a dynamic link library file for program call, output in the form of (.so) library, can be called across the platform, which is convenient for customers to call, the protocol library includes standard communication protocol Various protocols such as custom communication protocols, such as the J1939 protocol of CAN BUS, the J1979 protocol, and the private diagnostic protocol.
  • the parsing result data is obtained, and the protocol of the login packet data, the GPS data packet, the private data stream (the storage method of the code table), the fault code (private storage), and the like are obtained. Parsing the result data of the data, and outputting the parsing result data in a specified format, such as parsing the result data as described in the JSON format.
  • the data storage unit 43 is configured to store the parsing result data.
  • the data parsing unit 42 includes:
  • a packet intercepting module configured to intercept a data packet from the received data to be processed, where the data packet includes a login data packet, a positioning data packet, a vehicle diagnostic data stream, and a fault code;
  • a packet detection module configured to detect validity of the data packet
  • an invalid prompting module configured to send an invalid prompt if the data packet is invalid
  • the packet parsing module is configured to parse the content of the data packet if the data packet is valid, and generate parsing result data in a specified format.
  • the protocol in the protocol library is invoked, and the data packet is intercepted from the received data to be processed, and the characteristic parameters of the data packet include a consecutively arranged header, a trailer, a packet length, and a data service number. Further, The characteristic parameters of the data packet also include a command word, a data content, and a check digit.
  • the intercepting data packet may include a login data packet, a positioning data packet, a vehicle diagnostic data stream, and a fault code, where the login data packet includes protocol data of the terminal custom communication protocol, such as a terminal.
  • the vehicle diagnostic data stream is stored and uploaded in a data stream code table manner, and other data packets may be specified. Format storage upload. Further, in order to detect the validity of the data packet, it may be determined whether the data packet is a data packet that meets a user's requirement, and if not, the data packet is invalid, and an invalid prompt is sent, if the data packet is satisfied.
  • the data packet requested by the user parses the content of the data packet and outputs the parsing result data in a specified format. Further, invalid data packets are deleted to reduce storage space usage.
  • the data packet detecting module includes:
  • a feature parameter obtaining module configured to acquire feature parameters of the data packet
  • a feature parameter matching module configured to determine whether the feature parameter matches a data packet format parameter specified by a communication protocol in the protocol library; if matched, the data packet is valid; if not, the prompting node The data packet is invalid.
  • the feature parameters of the data packet are obtained, that is, the packet header, the packet tail, the packet length, and the data service of the data packet are obtained. No.
  • the feature parameters such as the header, the end of the packet, the packet length, and the data service number in the intercepted data packet are compared with the standard packet format parameters specified by the communication protocol in the protocol library. If matched, the data packet is valid. If the match is matched, the packet is invalid.
  • the data packet detecting module includes:
  • a number obtaining module configured to acquire a terminal number of the data packet
  • a matching comparison module configured to compare the terminal number with a terminal number of a custom communication protocol in the protocol library; if matched, the data packet is valid; if not, the data packet invalid.
  • the terminal number corresponding to the data packet is searched, that is, the terminal number of the data packet terminal is sent.
  • the terminal number is that the terminal is initially connected to the data processing device and registered on the data processing device, randomly assigned by the data processing device, or allocated according to a certain standard.
  • the data processing device After the terminal is first connected to the data processing device and registered on the data processing device, the data processing device notifies the terminal number to the terminal, and simultaneously stores the terminal number on the data processing device.
  • the terminal sends the data to be processed to the data processing device the data to be processed is included in the data to be processed transmitted by the terminal.
  • the terminal number is obtained, and the terminal number in the custom communication protocol in the protocol library is matched and matched, that is, the data processing device searches for the presence of the terminal number, and if the terminal number is not found, The above data packet Invalid, the terminal that sends the data packet above is illegally connected to the data processing device. If the terminal number is found, the data packet is valid, and the terminal that sends the data packet is legally connected to the data processing device.
  • the data packet parsing module includes:
  • a first protocol parsing module configured to parse the data packet according to a byte bit corresponding to the communication protocol, and output parsing result data in a specified format
  • the second protocol parsing module is configured to parse the data packet according to the data item of the communication protocol, and output parsing result data in a specified format.
  • the protocol library includes multiple protocol data, such as CAN.
  • the data packet intercepted from the received data to be processed is a valid data packet
  • the data packet is parsed according to a byte bit corresponding to a standard communication protocol in the communication protocol, and the parsing result data of the specified format is output, or
  • the data item of the custom communication protocol in the communication protocol parses the data packet, and outputs parsing result data in a specified format, where the communication protocol includes a standard communication protocol and a custom communication protocol, and the specified format may be JSON format.
  • the data processing device of the carrier terminal further includes:
  • the cache clearing unit is configured to clear the to-be-processed data of the data buffer area every preset period.
  • the to-be-processed data stored in the data buffer is cleared every preset period to ensure that the data buffer has sufficient storage space to receive the newly uploaded pending data of the terminal.
  • the data processing device receives the data to be processed uploaded by the terminal according to a preset data storage manner, and stores the to-be-processed data in the data buffer area, and then invokes the protocol library to be processed. Data, and outputting parsing result data in a specified format, such as JSON format, wherein the protocol library can be called across platforms, and finally the solution parsing result data is stored, and the user does not need to care about the data format of the terminal data, thereby reducing the complexity of product bursting. To shorten the product bursting cycle and improve the delivery speed of the product. Similarly, the data to be processed in the data buffer area is periodically cleared to ensure that the data buffer has sufficient storage space to receive the newly uploaded pending data of the terminal.
  • a specified format such as JSON format
  • FIG. 5 is a schematic diagram of a data processing device according to an embodiment of the present invention. As shown in Figure 5, the number of this embodiment The processing device 5 comprises: a processor 50, a memory 51 coupled to the processor, and a set of program codes 52, such as data processing programs, stored in the memory 51 and operable on the processor 50, Also included is a transceiver 53 coupled to the processor.
  • the processor 50 executes the program code 52 to implement the steps in the above various data processing method embodiments, such as steps 201 to 203 shown in FIG. 2.
  • the data processing device 5 stores a set of program codes 52 through the memory 51, and receives, by the transceiver device 53, data to be processed uploaded by the terminal according to a preset data storage manner.
  • the processor 50 calls the program code 52 in the memory 51 to perform the following operations:
  • the parsing result data is stored by the memory 51.
  • the specific manner in which the processor 50 executes the calling protocol library to parse the to-be-processed data and output the parsed result data in a specified format is:
  • the specific manner in which the processor 50 performs the detecting the validity of the data packet is: [0115] acquiring a feature parameter of the data packet;
  • the processor 50 executes the calling protocol library to parse the to-be-processed data, and output the parsing result data in a specified format:
  • the processor 50 executes the program code 52 to implement the functions of the modules/units in the foregoing device embodiments, such as the functions of the units 41 to 43 shown in FIG.
  • the program code 52 may be divided into one or more modules/units, which are stored in the memory 51 and executed by the processor 50.
  • the one or more modules/units may be a series of program code instruction segments capable of performing a particular function, the instruction segments being used to describe the execution of the program code 52 in the data processing device 5.
  • the program code 52 can be divided into a data buffer unit, a data parsing unit, and a data storage unit. The specific functions of each unit are as follows:
  • a data buffering unit configured to receive data to be processed uploaded by the terminal according to a preset data storage manner, and store the to-be-processed data in a data buffer area;
  • a data parsing unit configured to invoke a protocol library to parse the to-be-processed data, and output parsing result data in a specified format
  • a data storage unit configured to use the parsing result data.
  • the data processing device 5 may be a computing device such as a desktop computer, a notebook, a palmtop computer, and a cloud server.
  • the data processing device may include, but is not limited to, a processor 50, a memory 51, and a transceiver 53. It will be understood by those skilled in the art that FIG. 5 is merely an example of the data processing device 5 and does not constitute a limitation on the data processing device 5, and may include more or less components than those illustrated, or may combine certain components, or different.
  • the components, such as the data processing device may also include network access devices, buses, and the like.
  • the processor 50 may be a central processing unit (CPU), or may be another general-purpose processor, a digital signal processor (DSP), or an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), ready-to-use programmable gate array
  • CPU central processing unit
  • DSP digital signal processor
  • ASIC Application Specific Integrated Circuit
  • the general purpose processor may be a microprocessor or the processor or any conventional processor or the like.
  • the memory 51 may be an internal storage unit of the data processing device 5, such as the data processing device 5 Hard drive or memory.
  • the memory 51 may also be an external storage device of the data processing device 5, such as a plug-in hard disk equipped on the data processing device 5, a smart memory card (SMC), and a secure digital (Secure Digital, SD) card, flash card, etc.
  • the memory 51 may also include both an internal storage unit of the data processing device 5 and an external storage device.
  • the memory 51 is used to store the program code and other programs and data required by the data processing device.
  • the memory 51 can also be used to temporarily store data that has been output or is about to be output.
  • each functional unit and module described above is exemplified. In practical applications, the above functions may be assigned differently according to needs.
  • the functional unit and the module are completed, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the functions described above.
  • Each functional unit and module in the embodiment may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit, and the integrated unit may be implemented by hardware.
  • Formal implementation can also be implemented in the form of software functional units.
  • the disclosed apparatus and method may be implemented in other manners.
  • the system embodiment described above is merely illustrative.
  • the division of the module or unit is only a logical function division, and the actual implementation may have another division manner, for example, multiple units or components may be used. Combine or can be integrated into another system, or some features Can be ignored, or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
  • the unit described as a separate component may or may not be physically distributed, and the component displayed as a unit may or may not be a physical unit, that is, may be located in one place, or may be distributed to multiple On the network unit. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
  • the integrated unit if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable storage medium.
  • the present invention implements all or part of the processes in the foregoing embodiments, and may also be completed by a computer program to instruct related hardware.
  • the computer program may be stored in a computer readable storage medium. After the program is executed by the processor, the steps of the various method embodiments described above can be implemented.
  • the computer program comprises computer program code
  • the computer program code may be in the form of source code, object code form, executable file or some intermediate form.
  • the computer readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a removable hard disk, a magnetic disk, an optical disk, a computer memory, a Read-Only Memory (ROM). , Random Access Memory (RAM), electrical carrier signals, telecommunications signals, and software distribution media. It should be noted that the content contained in the computer readable medium may be appropriately increased or decreased according to the requirements of legislation and patent practice in a jurisdiction, for example, in some jurisdictions, according to legislation and patent practice, computer readable media It does not include electrical carrier signals and telecommunication signals.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

A data processing method and data processing apparatus comprising: receiving data to be processed uploaded from a terminal according to a preset data storage mode, and storing the data to be processed in a data cache area; calling a protocol database to parse the data to be processed and to output the resulting parsed data in a specified format; and storing the parsed data. Consumer product development complexity can be reduced by means of the present method.

Description

一种数据处理方法及数据处理设备 技术领域  Data processing method and data processing device
[0001] 本发明属于车联网技术领域, 尤其涉及一种数据处理方法及数据处理设备。  [0001] The present invention belongs to the technical field of vehicle networking, and in particular, to a data processing method and a data processing device.
背景技术  Background technique
[0002] 随着汽车电子技术的飞速发展, 车联网随之兴起, 最新发布的 《GB/T  [0002] With the rapid development of automotive electronics technology, the Internet of Vehicles has arisen, the latest release of GB/T
32960-2016电动汽车远程服务与管理系统技术规范》 , 定义了车联网基本框架 : 车载终端及远程服务器, 其中的远程服务器提供了远程服务与管理。 现在, 车载终端产品如车载 TBOX越来越多地应用于市场, 同吋, 各主机厂对车载终端 需求越来越大。  32960-2016 Technical Specification for Electric Vehicle Remote Service and Management System, defines the basic framework of the vehicle network: vehicle terminal and remote server, where the remote server provides remote service and management. Nowadays, car terminal products such as the car TBOX are increasingly used in the market. At the same time, the demand for car terminals is increasing.
[0003] 车辆的功能复杂性日益提高, 安全、 环保、 节能方面的法规要求日益严格, 各 主机厂对车载终端的要求千差万别, 但是, 车载终端厂商在前期工作中难以获 取到各个主机厂的通讯协议, 同吋, 每一款车的车辆信息状态也不一定一致, 因此, 车载终端采用的通信协议与各个主机厂的需求不一定相同, 这些车载终 端的接收或者输出的数据格式不一定适合主机厂, 主机厂需要重新修改, 从而 导致主机厂产品幵发的复杂度增加, 影响产品幵发周期。  [0003] The functional complexity of vehicles is increasing day by day, and the regulatory requirements for safety, environmental protection, and energy conservation are becoming increasingly strict. The requirements of various OEMs for vehicle terminals vary widely. However, it is difficult for vehicle terminal manufacturers to obtain communication from various OEMs in the preliminary work. Agreement, peers, the vehicle information status of each vehicle is not necessarily the same. Therefore, the communication protocol adopted by the vehicle terminal is not necessarily the same as the requirements of each host factory. The data format of the receiving or outputting of these vehicle terminals is not necessarily suitable for the host. The factory and the main engine factory need to be re-modified, which leads to an increase in the complexity of the product of the main engine factory, which affects the product burst cycle.
技术问题  technical problem
[0004] 有鉴于此, 本发明实施例提供了一种数据处理方法及数据处理设备, 以解决现 有车载终端接收或输出的数据格式不一定适合主机厂, 导致主机厂产品幵发的 复杂度增加, 影响产品幵发周期的问题。  [0004] In view of this, the embodiments of the present invention provide a data processing method and a data processing device, so as to solve the complexity that the data format received or output by the existing vehicle terminal is not necessarily suitable for the host factory, which causes the product of the host factory to burst. Increased issues that affect product burst cycles.
问题的解决方案  Problem solution
技术解决方案  Technical solution
[0005] 本发明第一方面提供了一种数据处理方法, 包括: [0005] A first aspect of the present invention provides a data processing method, including:
[0006] 接收终端按预设的数据存储方式上传的待处理数据, 并将所述待处理数据存入 数据缓存区;  [0006] receiving data to be processed uploaded by the terminal according to a preset data storage manner, and storing the to-be-processed data in a data buffer area;
[0007] 调用协议库解析所述待处理数据, 并输出指定格式的解析结果数据;  [0007] calling the protocol library to parse the to-be-processed data, and outputting parsing result data in a specified format;
[0008] 存储所述解析结果数据。 [0009] 本发明第二方面提供了一种数据处理装置, 包括: [0008] storing the parsing result data. [0009] A second aspect of the present invention provides a data processing apparatus, including:
[0010] 数据缓存单元, 用于接收终端按预设的数据存储方式上传的待处理数据, 并将 所述待处理数据存入数据缓存区;  [0010] a data buffering unit, configured to receive data to be processed uploaded by the terminal according to a preset data storage manner, and store the to-be-processed data in a data buffer area;
[0011] 数据解析单元, 用于调用协议库解析所述待处理数据, 并输出指定格式的解析 结果数据;  [0011] a data parsing unit, configured to call the protocol library to parse the to-be-processed data, and output parsing result data in a specified format;
[0012] 数据存储单元, 用于存储所述解析结果数据。  [0012] a data storage unit, configured to store the parsing result data.
[0013] 本发明第三方面提供了一种数据处理系统, 包括: 终端和数据处理设备; [0013] A third aspect of the present invention provides a data processing system, including: a terminal and a data processing device;
[0014] 所述终端, 用于按预设的数据存储方式上传待处理数据; [0014] the terminal is configured to upload data to be processed according to a preset data storage manner;
[0015] 所述数据处理设备, 用于接收终端按预设的数据存储方式上传的待处理数据, 并将所述待处理数据存入数据缓存区; 调用协议库解析所述待处理数据, 并输 出指定格式的解析结果数据; 存储所述解析结果数据。  [0015] the data processing device is configured to receive data to be processed uploaded by the terminal according to a preset data storage manner, and store the to-be-processed data in a data buffer area; invoke a protocol library to parse the to-be-processed data, and Outputting parsing result data of a specified format; storing the parsing result data.
[0016] 本发明第四方面提供了一种数据处理设备, 包括: 处理器, 与所述处理器耦合 连接的收发装置, 以及与所述处理器耦合连接的存储器, 所述存储器用于存储 一组程序代码; 通过所述收发装置接收终端按预设的数据存储方式上传的待处 理数据; 所述处理器调用所述存储器中的程序代码执行以下操作: 将所述待处 理数据存入数据缓存区, 调用协议库解析所述待处理数据, 并输出指定格式的 解析结果数据; 通过存储器存储所述解析结果数据。  [0016] A fourth aspect of the present invention provides a data processing device, including: a processor, a transceiver device coupled to the processor, and a memory coupled to the processor, the memory for storing one a group program code; receiving, by the transceiver device, data to be processed uploaded by the terminal according to a preset data storage manner; the processor calling the program code in the memory to perform the following operations: storing the to-be-processed data into a data cache And calling the protocol library to parse the to-be-processed data, and outputting the parsing result data in a specified format; storing the parsing result data through a memory.
[0017] 本发明第五方面提供了一种计算机可读存储介质, 所述计算机可读存储介质存 储有计算机程序, 所述计算机程序被处理器执行吋实现如上所述数据处理方法 的步骤。  A fifth aspect of the invention provides a computer readable storage medium storing a computer program, the computer program being executed by a processor to implement the steps of the data processing method as described above.
发明的有益效果  Advantageous effects of the invention
有益效果  Beneficial effect
[0018] 本发明与现有技术相比存在的有益效果是: 本发明通过接收终端按预设的数据 存储方式上传的待处理数据, 并将所述待处理数据存入数据缓存区, 再调用协 议库解析所述待处理数据, 并输出指定格式的解析结果数据, 最后存储所述解 析结果数据, 主机厂用户无需关心终端数据的数据格式, 从而降低产品幵发的 复杂程度, 缩短产品幵发周期, 提高产品的交付速度。  [0018] The present invention has the beneficial effects compared with the prior art: the present invention receives the data to be processed uploaded by the terminal according to a preset data storage manner, and stores the to-be-processed data in the data buffer area, and then invokes The protocol library parses the to-be-processed data, and outputs the parsing result data of the specified format, and finally stores the parsing result data, and the host factory user does not need to care about the data format of the terminal data, thereby reducing the complexity of the product bursting and shortening the product burst. Cycle, improve product delivery speed.
对附图的简要说明 附图说明 Brief description of the drawing DRAWINGS
[0019] 为了更清楚地说明本发明实施例中的技术方案, 下面将对实施例或现有技术描 述中所需要使用的附图作简单地介绍, 显而易见地, 下面描述中的附图仅仅是 本发明的一些实施例, 对于本领域普通技术人员来讲, 在不付出创造性劳动性 的前提下, 还可以根据这些附图获得其他的附图。  [0019] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings to be used in the embodiments or the prior art description will be briefly described below. Obviously, the drawings in the following description are merely Some embodiments of the present invention may also be used to obtain other drawings based on these drawings without departing from the skilled artisan.
[0020] 图 1是本发明实施例提供的一种数据处理系统的系统架构图; 1 is a system architecture diagram of a data processing system according to an embodiment of the present invention;
[0021] 图 2是本发明实施例提供的一种数据处理系统的应用场景示意图; [0021] FIG. 2 is a schematic diagram of an application scenario of a data processing system according to an embodiment of the present invention;
[0022] 图 3是本发明实施例提供的数据处理设备侧的一种数据处理方法的实现流程图 3 is a flowchart of implementing a data processing method on a data processing device side according to an embodiment of the present invention.
[0023] 图 3a是本发明实施例提供的数据处理设备侧的另一种数据处理方法的实现流程 图; FIG. 3 is a flowchart of an implementation of another data processing method on a data processing device side according to an embodiment of the present invention; FIG.
[0024] 图 3b是本发明实施例提供的数据处理设备侧的再一种数据处理方法的实现流程 图;  [0024] FIG. 3b is a flowchart of an implementation of another data processing method on the data processing device side according to an embodiment of the present invention;
[0025] 图 3c是本发明实施例提供的数据处理设备侧的再一种数据处理方法的实现流程 图;  [0025] FIG. 3c is a flowchart showing an implementation of another data processing method on the data processing device side according to an embodiment of the present invention;
[0026] 图 4是本发明实施例提供的一种数据处理装置的结构框图;  4 is a structural block diagram of a data processing apparatus according to an embodiment of the present invention;
[0027] 图 5是本发明实施例提供的一种数据处理设备的示意图。 FIG. 5 is a schematic diagram of a data processing device according to an embodiment of the present invention.
本发明的实施方式 Embodiments of the invention
[0028] 以下描述中, 为了说明而不是为了限定, 提出了诸如特定系统结构、 技术之类 的具体细节, 以便透彻理解本发明实施例。 然而, 本领域的技术人员应当清楚 , 在没有这些具体细节的其它实施例中也可以实现本发明。 在其它情况中, 省 略对众所周知的系统、 装置、 电路以及方法的详细说明, 以免不必要的细节妨 碍本发明的描述。  [0028] In the following description, for purposes of illustration and description However, it will be apparent to those skilled in the art that the present invention may be practiced in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the invention.
[0029] 为了说明本发明所述的技术方案, 下面通过具体实施例来进行说明。  [0029] In order to explain the technical solutions described in the present invention, the following description will be made by way of specific embodiments.
[0030] 实施例 1 Embodiment 1
[0031] 图 1示出了本发明实施例提供的一种数据处理系统的系统架构图, 详述如下: 为了便于说明, 仅示出了与本发明实施例相关的部分。 [0032] 参照图 1, 所述数据处理系统包括终端 1与数据处理设备 2, 其中: 1 is a system architecture diagram of a data processing system according to an embodiment of the present invention, which is described in detail below. For convenience of description, only parts related to the embodiments of the present invention are shown. [0032] Referring to FIG. 1, the data processing system includes a terminal 1 and a data processing device 2, wherein:
[0033] 所述终端 1, 用于按预设的数据存储方式上传待处理数据。 [0033] The terminal 1 is configured to upload data to be processed according to a preset data storage manner.
[0034] 具体地, 在本发明实施例中, 终端 1可以是车载终端, 车载终端是车辆监控管 理系统的前端设备, 也可以叫做车辆调度监控终端 (TCU终端), 具有集成定位, 通信、 汽车行驶记录仪等多项功能。 终端 1要将采集的待处理数据按预设的数据 存储方式进行上传, 待处理数据包括车辆诊断数据, 例如车速、 转速、 总里程[0034] Specifically, in the embodiment of the present invention, the terminal 1 may be an in-vehicle terminal, and the in-vehicle terminal is a front-end device of the vehicle monitoring and management system, and may also be called a vehicle scheduling monitoring terminal (TCU terminal), having integrated positioning, communication, and automobile. A number of functions such as a tachograph. The terminal 1 uploads the collected data to be processed according to a preset data storage manner, and the data to be processed includes vehicle diagnostic data, such as vehicle speed, speed, and total mileage.
、 油耗等数据。 在本发明实施例中, 终端 1按码表的数据存储方式上传车辆诊断 数据。 其中, 码表的数据存储方式是根据终端 1的自定义通信协议定义的一种数 据存储方式。 例如, 预先自定义待处理数据中不同数据内容对应的二进制数的 位数, 根据终端 1按码表上传的待处理数据, 并将所述待处理数据存入数据缓存 区。 示例性的, 将待处理数据转换为二进制数, 若该待处理数据中包括车速, 则将二进制数的第一位置 1, 若该待处理数据中包括转速, 则将二进制数的第二 位置 1, 若该待处理数据中不包括总里程, 则将二进数的第三位置 0, 若该待处 理数据中包括油耗, 则将二进制数的第三位置 1。 , fuel consumption and other data. In the embodiment of the present invention, the terminal 1 uploads vehicle diagnostic data according to the data storage mode of the code table. The data storage mode of the code table is a data storage mode defined according to the custom communication protocol of the terminal 1. For example, the number of bits of the binary number corresponding to different data contents in the data to be processed is pre-defined, and the data to be processed uploaded by the terminal 1 according to the code table is stored, and the data to be processed is stored in the data buffer. Exemplarily, the data to be processed is converted into a binary number. If the data to be processed includes the vehicle speed, the first position of the binary number is set to 1. If the data to be processed includes the rotation speed, the second position of the binary number is set to 1. If the total mileage is not included in the to-be-processed data, the third position of the binary number is 0. If the to-be-processed data includes fuel consumption, the third position of the binary number is set to 1.
[0035] 所述数据处理设备 2, 用于接收终端 1按预设的数据存储方式上传的待处理数据 , 并将所述待处理数据存入数据缓存区; 调用协议库解析所述待处理数据, 并 输出指定格式的解析结果数据; 存储解析所述解析结果数据。  [0035] The data processing device 2 is configured to receive data to be processed uploaded by the terminal 1 according to a preset data storage manner, and store the to-be-processed data in a data buffer area; and invoke a protocol library to parse the to-be-processed data. And outputting the parsing result data of the specified format; storing and parsing the parsing result data.
[0036] 具体地, 所述数据处理设备 2, 用于接收终端 1按预设的数据存储方式上传的待 处理数据, 例如, 接收终端 1按码表的数据存储方式上传的待处理数据, 并将所 述待处理数据存入数据处理设备 2的数据缓存区, 调用协议库解析该数据缓存区 中的待处理数据, 具体地, 可通过数据处理设备 2的应用服务器调用协议库解析 数据库缓存区中, 本次终端 1上传的待处理数据, 输出指定格式的解析结果数据 。 即当终端 1实吋上传待处理数据吋, 调用协议库解析的是本次上传至数据缓冲 区的待处理数据, 而不是在这次之前数据缓存区中接收缓存的数据, 所述协议 库中的通信协议包括标准通信协议与自定义通信协议, 如 CAN BUS的J1939协议 、 J1979协议和私有诊断协议。 将解析后输出的指定格式的解析结果数据存入指 定区域, 例如存入数据处理设备 2的数据库服务器。 其中, 指定格式可以是 JSON 格式。 本发明实施例中, 数据处理设备 2接收终端 1按预设的数据存储方式上传 的待处理数据, 以便提高解析速度。 [0036] Specifically, the data processing device 2 is configured to receive data to be processed that is uploaded by the terminal 1 according to a preset data storage manner, for example, the data to be processed uploaded by the receiving terminal 1 according to the data storage manner of the code table, and The data to be processed is stored in the data buffer of the data processing device 2, and the protocol library is called to parse the data to be processed in the data buffer. Specifically, the database buffer may be parsed by the application server of the data processing device 2 by calling the protocol library. The data to be processed uploaded by the terminal 1 outputs the parsing result data of the specified format. That is, when the terminal 1 actually uploads the data to be processed, the calling protocol library parses the data to be processed that is uploaded to the data buffer, instead of receiving the cached data in the data buffer before this time, in the protocol library. The communication protocol includes standard communication protocols and custom communication protocols, such as the J1939 protocol of CAN BUS, the J1979 protocol, and the private diagnostic protocol. The analysis result data of the specified format outputted after parsing is stored in a designated area, for example, stored in the database server of the data processing device 2. Wherein, the specified format can be in JSON format. In the embodiment of the present invention, the data processing device 2 receives the terminal 1 and uploads according to a preset data storage manner. Pending data to improve parsing speed.
[0037] 可选地, 所述数据处理系统可以采用蓝牙技术、 WIFI技术或 3G/4G技术等建 立数据处理设备 2与多个终端 1之间的无线连接, 也可以采用串口技术或者 USB 接口技术等建立数据处理设备 2与终端 1之间的有线连接。  [0037] Optionally, the data processing system may establish a wireless connection between the data processing device 2 and the plurality of terminals 1 by using a Bluetooth technology, a WIFI technology, or a 3G/4G technology, or may use a serial port technology or a USB interface technology. The wired connection between the data processing device 2 and the terminal 1 is established.
[0038] 以一个应用场景为例, 如图 2所示, 所述数据处理系统中包括车载终端和数据 处理设备, 其中, 数据处理设备包括应用服务器以及数据库服务器。 车载终端 将待处理数据按码表方式上传, 应用服务器通过移动基站的信号, 接收车载终 端按码表方式上传的待处理数据, 并将所述待处理数据存入数据缓存区中, 调 用包括 J1939协议、 J1979协议、 私有诊断协议等多种协议的协议库解析数据缓存 区中, 本次车载终端上传的待处理数据, 输出 JSON格式的解析结果数据, 将该 解析结果数据存储至数据处理设备的数据库服务器中, 供用户使用。  [0038] Taking an application scenario as an example, as shown in FIG. 2, the data processing system includes an in-vehicle terminal and a data processing device, where the data processing device includes an application server and a database server. The vehicle terminal uploads the data to be processed according to the code table manner, and the application server receives the data to be processed uploaded by the vehicle terminal according to the code table by using the signal of the mobile base station, and stores the to-be-processed data in the data buffer area, and the call includes J1939. Protocol, J1979 protocol, private diagnostic protocol, and other protocol protocol parsing data buffer area, the data to be processed uploaded by the vehicle terminal, outputting the parsing result data in JSON format, and storing the parsing result data to the data processing device In the database server, for users to use.
[0039] 本发明第 1实施例中, 终端按预设的数据存储方式上传待处理数据, 数据处理 设备通过接收终端按预设的数据存储方式上传的待处理数据, 并将所述待处理 数据存入数据缓存区, 再调用协议库解析所述待处理数据, 并输出指定格式如 JS ON格式的解析结果数据, 最后存储解析后生成指定格式的解析结果数据, 用户 无需关心终端数据的数据格式, 从而降低产品幵发的复杂程度, 缩短产品幵发 周期, 提高产品的交付速度。  [0039] In the first embodiment of the present invention, the terminal uploads the data to be processed according to a preset data storage manner, and the data processing device receives the data to be processed uploaded by the terminal according to a preset data storage manner, and the data to be processed is The user saves the data buffer, and then calls the protocol library to parse the data to be processed, and outputs the parsing result data in a specified format, such as the JS ON format, and finally stores the parsed result data in the specified format, and the user does not need to care about the data format of the terminal data. , thereby reducing the complexity of product bursts, shortening product burst cycles, and increasing product delivery speed.
[0040] 实施例 2  Embodiment 2
[0041] 图 3示出了本发明实施例提供的一种数据处理方法的流程图, 在本实施例中, 该流程的执行主体为图 1所示的数据处理设备 2, 详述如下:  [0041] FIG. 3 is a flowchart of a data processing method according to an embodiment of the present invention. In this embodiment, the execution body of the process is the data processing device 2 shown in FIG. 1, which is described in detail as follows:
[0042] 步骤 S201 , 接收终端按预设的数据存储方式上传的待处理数据, 并将所述待处 理数据存入数据缓存区。  [0042] Step S201: Receive data to be processed uploaded by the terminal according to a preset data storage manner, and store the to-be-processed data in a data buffer.
[0043] 其中, 终端可以为车载终端, 此吋, 所述待处理数据包括车辆诊断数据, 例如 车速、 转速、 总里程、 油耗等数据。 在本发明实施例中, 预设的数据存储方式 可以是码表的数据存储方式, 码表是根据终端的自定义通信协议自定义的一种 数据存储方式。 例如, 预先自定义待处理数据中不同数据内容对应的二进制数 的位数, 根据终端按码表上传的待处理数据, 并将所述待处理数据存入数据缓 存区。 示例性的, 将待处理数据转换为二进制数, 若该待处理数据中包括车速 , 则将二进制数的第一位置 1, 若该待处理数据中包括转速, 则将二进制数的第 二位置 1, 若该待处理数据中不包括总里程, 则将二进数的第三位置 0, 若该待 处理数据中包括油耗, 则将二进制数的第三位置 1。 [0043] wherein, the terminal may be an in-vehicle terminal, and the data to be processed includes vehicle diagnostic data, such as data such as vehicle speed, rotational speed, total mileage, fuel consumption, and the like. In the embodiment of the present invention, the preset data storage manner may be a data storage manner of the code table, and the code table is a data storage manner customized according to the terminal's custom communication protocol. For example, the number of bits of the binary number corresponding to different data contents in the data to be processed is pre-customized, and the data to be processed is stored in the data buffer according to the data to be processed uploaded by the terminal according to the code table. Exemplarily, the data to be processed is converted into a binary number, if the data to be processed includes a speed , the first position of the binary number is 1, if the to-be-processed data includes the rotation speed, the second position of the binary number is set to 1. If the total data is not included in the to-be-processed data, the third position of the binary number is 0, if the fuel to be processed includes fuel consumption, the third position of the binary number is set to 1.
[0044] 步骤 S202, 调用协议库解析所述待处理数据, 并输出指定格式的解析结果数据  [0044] Step S202, calling the protocol library to parse the to-be-processed data, and outputting parsing result data in a specified format.
[0045] 具体地, 当终端实吋上传待处理数据吋, 调用协议库解析的是本次上传的待处 理数据, 也即调用协议库解析最新的上传的待处理数据, 其中, 协议库可使用 C ++幵发, C++将协议解析模块封装成动态链接库文件供程序调用, 以 (.so)库的形 式输出, 可跨平台调用, 从而方便用户调用, 所述协议库中包括通信协议, 通 信协议包括标准通信协议与自定义通信协议等多种协议, 如 CAN BUS的J1939协 议、 J1979协议和私有诊断协议。 通过调用协议库的多种协议数据对接收的待处 理数据进行解析得到解析结果数据, 获取登录包数据、 GPS数据包、 私有数据流 (码表的存储方式)、 故障码 (私有存储)等协议数据的解析结果数据, 并按指定格 式输出所述解析结果数据, 如按 JSON格式所述解析结果数据。 具体地, JSON(Ja vaScript Object Notation)是一种轻量级的数据交换格式。 它基于 JavaScript Programming Language, Standard ECMA-262 3rd Edition - December 1999的 ^■个子 集。 JSON采用完全独立于语言的文本格式, 但是也使用了类似于 C语言家族的 习惯 (包括 C, C++, C#, Java, JavaScript, Perl, Python等) 。 JSON格式的数据易于 人阅读和编写, 同吋也易于机器解析和生成, 并有效地提升网络传输效率。 在 本发明实施例中, 通过调用协议库解析所述待处理数据, 并输出 JSON格式的解 析结果数据, 方便用户读取使用。 [0045] Specifically, when the terminal actually uploads the data to be processed, the calling protocol library parses the data to be processed that is uploaded this time, that is, the protocol library is called to parse the latest uploaded pending data, where the protocol library can be used. C + + burst, C + + package protocol parsing module into a dynamic link library file for program call, output in the form of (.so) library, can be called across the platform, which is convenient for users to call, the protocol library includes communication protocol, Communication protocols include standard communication protocols and custom communication protocols, such as the J1939 protocol of CAN BUS, the J1979 protocol, and the private diagnostic protocol. By parsing the received data to be processed by calling various protocol data of the protocol library, the parsing result data is obtained, and the protocol of the login packet data, the GPS data packet, the private data stream (the storage method of the code table), the fault code (private storage), and the like are obtained. Parsing the result data of the data, and outputting the parsing result data in a specified format, such as parsing the result data as described in the JSON format. Specifically, JSON (Ja vaScript Object Notation) is a lightweight data exchange format. It is based on a subset of the JavaScript Programming Language, Standard ECMA-262 3rd Edition - December 1999. JSON uses a completely language-independent text format, but also uses a habit similar to the C language family (including C, C++, C#, Java, JavaScript, Perl, Python, etc.). The data in JSON format is easy for people to read and write, and the same is easy for machine parsing and generation, and effectively improve network transmission efficiency. In the embodiment of the present invention, the data to be processed is parsed by calling a protocol library, and the parsing result data in the JSON format is output, which is convenient for the user to read and use.
[0046] 可选地, 如图 3a所示, 为获取解析结果数据, 所述步骤 S202具体包括:  [0046] Optionally, as shown in FIG. 3, in order to obtain the parsing result data, the step S202 specifically includes:
[0047] Al、 从接收的所述待处理数据中截取数据包, 其中, 所述数据包包括登录数据 包、 定位数据包、 车辆诊断数据流以及故障码。 [0047] Al, intercepting a data packet from the received data to be processed, where the data packet includes a login data packet, a positioning data packet, a vehicle diagnostic data stream, and a fault code.
[0048] A2、 检测所述数据包的有效性。  [0048] A2. Detecting the validity of the data packet.
[0049] A3、 若所述数据包无效, 则发送无效提示。 [0049] A3. If the data packet is invalid, an invalid prompt is sent.
[0050] A4、 若所述数据包有效, 则解析所述数据包的内容, 并输出指定格式的解析结 [0051] 具体地, 调用协议库中的协议, 从接收的待处理数据中截取数据包, 该数据包 的特征参数包括连续排列的包头、 包尾、 包长以及数据业务编号, 进一步地, 所述数据包的特征参数还包括命令字、 数据内容及校验位。 可选地, 在本发明 实施例中, 截取数据包可包括登录数据包、 定位数据包、 车辆诊断数据流以及 故障码, 其中, 登录数据包包括终端自定义通信协议的协议数据, 如终端的终 端编号; GPS数据包包括车辆的定位信息; 车辆诊断数据流包括车辆的实吋数 据, 例如车速、 转速、 总里程、 油耗等数据; 故障码包括车辆的故障信息。 其 中, 所述车辆诊断数据流以数据流码表方式存储上传, 其它数据包可以按指定 格式存储上传。 进一步地, 为检测所述数据包的有效性, 可判断所述数据包是 否为满足用户需求的数据包, 若不满足, 则所述数据包无效, 发送无效提示, 若所述数据包为满足用户需求的数据包, 则解析所述数据包的内容, 并输出指 定格式的解析结果数据。 进一步地, 刪除无效数据包以减少存储空间占用。 [0050] A4. If the data packet is valid, parsing the content of the data packet, and outputting a resolution of the specified format. [0051] Specifically, the protocol in the protocol library is invoked, and the data packet is intercepted from the received data to be processed, and the characteristic parameters of the data packet include a consecutively arranged header, a trailer, a packet length, and a data service number, and further, The characteristic parameters of the data packet also include a command word, a data content, and a check digit. Optionally, in the embodiment of the present invention, the intercepting data packet may include a login data packet, a positioning data packet, a vehicle diagnostic data stream, and a fault code, where the login data packet includes protocol data of the terminal custom communication protocol, such as a terminal. The terminal number; the GPS data packet includes positioning information of the vehicle; the vehicle diagnostic data stream includes actual data of the vehicle, such as data such as vehicle speed, speed, total mileage, fuel consumption, etc.; the fault code includes fault information of the vehicle. The vehicle diagnostic data stream is stored and uploaded in a data stream code table manner, and other data packets may be stored and uploaded in a specified format. Further, in order to detect the validity of the data packet, it may be determined whether the data packet is a data packet that meets a user's requirement, and if not, the data packet is invalid, and an invalid prompt is sent, if the data packet is satisfied. The data packet requested by the user parses the content of the data packet and outputs the parsing result data in a specified format. Further, invalid data packets are deleted to reduce storage space usage.
[0052] 进一步地, 如图 3b所示, 为准确获取数据包的有效性, 避免随意丢弃, 所述检 测所述数据包的有效性, 包括:  [0052] Further, as shown in FIG. 3b, in order to accurately obtain the validity of the data packet and avoid discarding randomly, the validity of the data packet is detected, including:
[0053] B l、 获取所述数据包的特征参数;  [0053] B l, acquiring characteristic parameters of the data packet;
[0054] B2、 判断所述特征参数是否与所述协议库中通信协议规定的数据包格式参数相 匹配;  [0054] B2, determining whether the feature parameter matches a data packet format parameter specified by a communication protocol in the protocol library;
[0055] B3、 若匹配, 则所述数据包有效;  [0055] B3. If matched, the data packet is valid;
[0056] B4、 若不匹配, 则提示所述数据包无效。 [0056] B4. If there is no match, the data packet is prompted to be invalid.
[0057] 具体地, 在本发明实施例中, 从接收的待处理数据中截取数据包后, 获取所述 数据包的特征参数, 即, 获取数据包的包头、 包尾、 包长以及数据业务编号, 将截取的数据包中包头、 包尾、 包长以及数据业务编号等特征参数与协议库中 通信协议规定的标准的数据包格式参数进行比对匹配, 若匹配, 则所述数据包 有效; 若比配, 则提示所述数据包无效。  [0057] Specifically, in the embodiment of the present invention, after the data packet is intercepted from the received data to be processed, the feature parameters of the data packet are obtained, that is, the packet header, the packet tail, the packet length, and the data service of the data packet are obtained. No. The feature parameters such as the header, the end of the packet, the packet length, and the data service number in the intercepted data packet are compared with the standard packet format parameters specified by the communication protocol in the protocol library. If matched, the data packet is valid. If the match is matched, the packet is invalid.
[0058] 可选地, 如图 3c所示, 所述检测所述数据包的有效性, 包括:  [0058] Optionally, as shown in FIG. 3c, the detecting the validity of the data packet includes:
[0059] Cl、 获取所述数据包的终端编号;  [0059] Cl, obtaining a terminal number of the data packet;
[0060] C2、 将所述终端编号与协议库中自定义通信协议的终端编号进行比对匹配; [0061] C3、 若匹配, 则所述数据包有效; [0062] C4、 若不匹配, 则提示所述数据包无效。 [0060] C2, comparing the terminal number with a terminal number of a custom communication protocol in the protocol library; [0061] C3, if matched, the data packet is valid; [0062] C4. If there is no match, the data packet is prompted to be invalid.
[0063] 具体地, 在本发明实施例中, 从接收的待处理数据中截取数据包后, 査找所述 数据包对应的终端编号, 即发送所述数据包终端的终端编号。 上述终端编号是 终端初次与数据处理设备连接并在上述数据处理设备上注册吋, 由数据处理设 备随机分配, 或按照某种标准分配的。 终端初次与数据处理设备连接并在数据 处理设备上注册吋, 数据处理设备将终端编号通知至该终端, 同吋将该终端编 号存储在数据处理设备上。 当终端向数据处理设备发送待处理数据吋, 在其发 送的待处理数据中包含有该编号的信息。 在本发明实施例中, 获取终端编号, 并与协议库中自定义通信协议中的终端编号进行比对匹配, 即, 在数据处理设 备査找是否存在上述终端编号, 如果没有査找到上述终端编号, 则上述数据包 无效, 上述发送数据包的终端与数据处理设备是非法连接。 如果査找到上述终 端编号, 则上述数据包有效, 上述发送数据包的终端与数据处理设备是合法连 接, 执行下一步骤。  [0063] Specifically, in the embodiment of the present invention, after the data packet is intercepted from the received data to be processed, the terminal number corresponding to the data packet is searched, that is, the terminal number of the data packet terminal is sent. The terminal number is the first time that the terminal is connected to the data processing device and registered on the data processing device, and is randomly allocated by the data processing device or allocated according to a certain standard. After the terminal is first connected to the data processing device and registered on the data processing device, the data processing device notifies the terminal number to the terminal, and simultaneously stores the terminal number on the data processing device. When the terminal sends the data to be processed to the data processing device, the data of the number is included in the data to be processed transmitted by the terminal. In the embodiment of the present invention, the terminal number is obtained, and the terminal number in the custom communication protocol in the protocol library is matched and matched, that is, the data processing device searches for the presence of the terminal number, and if the terminal number is not found, Then, the above data packet is invalid, and the terminal that sends the data packet is illegally connected to the data processing device. If the above terminal number is found, the above data packet is valid, and the terminal transmitting the data packet is legally connected to the data processing device, and the next step is performed.
[0064] 进一步地, 所述若所述数据包有效, 则解析所述数据包的内容, 并生成指定格 式的解析结果数据, 包括:  [0064] Further, if the data packet is valid, parsing the content of the data packet, and generating the parsing result data of the specified format, includes:
[0065] 按照通信协议对应的字节位对所述数据包进行解析, 并输出指定格式的解析结 果数据。 [0065] parsing the data packet according to a byte bit corresponding to the communication protocol, and outputting the parsing result data of the specified format.
[0066] 或者, [0066] Alternatively,
[0067] 按照通信协议的数据项对所述数据包进行解析, 并输出指定格式的解析结果数 据。  And parsing the data packet according to the data item of the communication protocol, and outputting the analysis result data of the specified format.
[0068] 具体地, 在本发明实施例中, 协议库中的通信协议包括标准通信协议和自定义 通信协议, 如 CAN BUS的J1939协议、 J1979协议和私有诊断协议。 若从接收的 待处理数据中截取的数据包是有效数据包, 则按照通信协议中的标准通信协议 对应的字节位对所述数据包进行解析, 输出指定格式的解析结果数据, 或者, 按照通信协议中的自定义通信协议的数据项对所述数据包进行解析, 输出指定 格式的解析结果数据, 其中, 所述通信协议包括标准通信协议和自定义通信协 议, 所述指定格式可以是 JSON格式。  [0068] Specifically, in the embodiment of the present invention, the communication protocol in the protocol library includes a standard communication protocol and a custom communication protocol, such as the J1939 protocol of the CAN BUS, the J1979 protocol, and the private diagnostic protocol. If the data packet intercepted from the received data to be processed is a valid data packet, the data packet is parsed according to a byte bit corresponding to a standard communication protocol in the communication protocol, and the parsing result data of the specified format is output, or The data item of the custom communication protocol in the communication protocol parses the data packet, and outputs parsing result data in a specified format, where the communication protocol includes a standard communication protocol and a custom communication protocol, and the specified format may be JSON format.
[0069] 步骤 S203 , 存储所述解析结果数据。 [0070] 可选地, 在本发明实施例中, 将 JSON格式的解析结果数据进行存储, 例如存 储至数据处理设备的数据库服务器, 以供用户使用。 [0069] Step S203, storing the parsing result data. [0070] Optionally, in the embodiment of the present invention, the parsing result data of the JSON format is stored, for example, to a database server of the data processing device for use by the user.
[0071] 可选地, 在本发明实施例中, 所述数据处理方法, 还包括: [0071] Optionally, in the embodiment of the present invention, the data processing method further includes:
[0072] 每隔预设吋间周期, 清除所述数据缓存区的待处理数据。 [0072] The data to be processed of the data buffer is cleared every preset period.
[0073] 具体地, 每隔预设吋间周期将存储在数据缓存区的待处理数据清除, 以保证数 据缓存区有足够的存储空间接收终端新上传的待处理数据。  [0073] Specifically, the to-be-processed data stored in the data buffer is cleared every predetermined period to ensure that the data buffer has sufficient storage space to receive the newly-processed pending data of the terminal.
[0074] 本发明第 2实施例中, 数据处理设备通过接收终端按预设的数据存储方式上传 的待处理数据, 并将所述待处理数据存入数据缓存区, 再调用协议库解析所述 待处理数据, 并输出指定格式如 JSON格式的解析结果数据, 其中, 所述协议库 可以跨平台调用, 最后存储所述解析结果数据, 用户无需关心终端数据的数据 格式, 从而降低产品幵发的复杂程度, 缩短产品幵发周期, 提高产品的交付速 度, 同吋, 定期清除所述数据缓存区的待处理数据, 以保证数据缓存区有足够 的存储空间接收终端新上传的待处理数据。  [0074] In the second embodiment of the present invention, the data processing device receives the data to be processed uploaded by the terminal according to a preset data storage manner, and stores the to-be-processed data in a data buffer area, and then invokes the protocol library to parse the data. Data to be processed, and outputting parsing result data in a specified format, such as JSON format, wherein the protocol library can be called across platforms, and finally storing the parsing result data, and the user does not need to care about the data format of the terminal data, thereby reducing product bursts. The complexity, shorten the product bursting period, and improve the delivery speed of the product. Similarly, the data to be processed in the data buffer area is periodically cleared to ensure that the data buffer has sufficient storage space to receive the newly uploaded pending data of the terminal.
[0075] 实施例 3  Example 3
[0076] 对应于上文实施例所述的数据处理方法, 图 4示出了本发明实施例提供的数据 处理装置的结构框图, 为了便于说明, 仅示出了与本发明实施例相关的部分。  [0076] Corresponding to the data processing method described in the foregoing embodiment, FIG. 4 is a structural block diagram of a data processing apparatus according to an embodiment of the present invention. For convenience of description, only parts related to the embodiment of the present invention are shown. .
[0077] 参照图 4, 该数据处理装置包括: 数据缓存单元 41, 数据解析单元 42, 数据存 储单元 43, 其中:  Referring to FIG. 4, the data processing apparatus includes: a data buffer unit 41, a data parsing unit 42, and a data storage unit 43, wherein:
[0078] 数据缓存单元 41, 用于接收终端按预设的数据存储方式上传的待处理数据, 并 将所述待处理数据存入数据缓存区。  [0078] The data buffering unit 41 is configured to receive data to be processed uploaded by the terminal according to a preset data storage manner, and store the to-be-processed data in a data buffer.
[0079] 其中, 终端可以为车载终端, 此吋, 待处理数据包括车辆诊断数据, 例如车速 、 转速、 总里程、 油耗等数据。 在本发明实施例中, 预设的数据存储方式可以 是码表的数据存储方式, 码表是根据终端的自定义通信协议自定义的一种数据 存储方式。 例如, 预先自定义待处理数据中不同数据内容对应的二进制数的位 数, 根据终端按码表上传的待处理数据, 并将所述待处理数据存入数据缓存区 。 示例性的, 将待处理数据转换为二进制数, 若该待处理数据中包括车速, 则 将二进制数的第一位置 1, 若该待处理数据中包括转速, 则将二进制数的第二位 置 1, 若该待处理数据中不包括总里程, 则将二进数的第三位置 0, 若该待处理 数据中包括油耗, 则将二进制数的第三位置 1。 [0079] wherein, the terminal may be an in-vehicle terminal, and the data to be processed includes vehicle diagnostic data, such as data such as vehicle speed, rotational speed, total mileage, fuel consumption, and the like. In the embodiment of the present invention, the preset data storage manner may be a data storage manner of the code table, and the code table is a data storage manner customized according to the terminal's custom communication protocol. For example, the number of bits of the binary number corresponding to different data contents in the data to be processed is pre-customized, and the data to be processed is stored in the data buffer according to the data to be processed uploaded by the terminal according to the code table. Exemplarily, the data to be processed is converted into a binary number. If the data to be processed includes the vehicle speed, the first position of the binary number is set to 1. If the data to be processed includes the rotation speed, the second position of the binary number is set to 1. If the total mileage is not included in the to-be-processed data, the third position of the binary number is 0, if the to-be-processed The fuel consumption is included in the data, and the third position of the binary number is set to 1.
[0080] 数据解析单元 42, 用于调用协议库解析所述待处理数据, 并输出指定格式的解 析结果数据。 [0080] The data parsing unit 42 is configured to call the protocol library to parse the to-be-processed data, and output the parsing result data in a specified format.
[0081] 具体地, 当终端实吋上传待处理数据吋, 调用协议库解析的是本次上传的待处 理数据, 也即调用协议库解析最新的上传的待处理数据, 其中, 协议库可使用 C ++幵发, C++将协议解析模块封装成动态链接库文件供程序调用, 以 (.so)库的形 式输出, 可跨平台调用, 从而方便客户调用, 所述协议库中包括标准通信协议 与自定义通信协议等多种协议, 如 CAN BUS的J1939协议、 J1979协议和私有诊 断协议。 通过调用协议库的多种协议数据对接收的待处理数据进行解析得到解 析结果数据, 获取登录包数据、 GPS数据包、 私有数据流 (码表的存储方式)、 故 障码 (私有存储)等协议数据的解析结果数据, 并按指定格式输出所述解析结果数 据, 如按 JSON格式所述解析结果数据。 [0081] Specifically, when the terminal actually uploads the to-be-processed data, the calling protocol library parses the pending data to be processed, that is, invokes the protocol library to parse the latest uploaded pending data, where the protocol library can be used. C + + burst, C + + package protocol parsing module into a dynamic link library file for program call, output in the form of (.so) library, can be called across the platform, which is convenient for customers to call, the protocol library includes standard communication protocol Various protocols such as custom communication protocols, such as the J1939 protocol of CAN BUS, the J1979 protocol, and the private diagnostic protocol. By parsing the received data to be processed by calling various protocol data of the protocol library, the parsing result data is obtained, and the protocol of the login packet data, the GPS data packet, the private data stream (the storage method of the code table), the fault code (private storage), and the like are obtained. Parsing the result data of the data, and outputting the parsing result data in a specified format, such as parsing the result data as described in the JSON format.
[0082] 数据存储单元 43, 用于存储所述解析结果数据。  [0082] The data storage unit 43 is configured to store the parsing result data.
[0083] 可选地, 所述数据解析单元 42包括:  [0083] Optionally, the data parsing unit 42 includes:
[0084] 数据包截取模块, 用于从接收的待处理数据中截取数据包, 所述数据包包括登 录数据包、 定位数据包、 车辆诊断数据流以及故障码;  [0084] a packet intercepting module, configured to intercept a data packet from the received data to be processed, where the data packet includes a login data packet, a positioning data packet, a vehicle diagnostic data stream, and a fault code;
[0085] 数据包检测模块, 用于检测所述数据包的有效性; [0085] a packet detection module, configured to detect validity of the data packet;
[0086] 无效提示模块, 用于若所述数据包无效, 则发送无效提示; [0086] an invalid prompting module, configured to send an invalid prompt if the data packet is invalid;
[0087] 数据包解析模块, 用于若所述数据包有效, 则解析所述数据包的内容, 并生成 指定格式的解析结果数据。 [0087] The packet parsing module is configured to parse the content of the data packet if the data packet is valid, and generate parsing result data in a specified format.
[0088] 具体地, 调用协议库中的协议, 从接收的待处理数据中截取数据包, 该数据包 的特征参数包括连续排列的包头、 包尾、 包长以及数据业务编号, 进一步地, 所述数据包的特征参数还包括命令字、 数据内容及校验位。 可选地, 在本发明 实施例中, 截取数据包可包括登录数据包、 定位数据包、 车辆诊断数据流以及 故障码, 其中, 登录数据包包括终端自定义通信协议的协议数据, 如终端的终 端编号; GPS数据包包括车辆的定位信息; 车辆诊断数据流包括车辆的实吋数 据, 例如车速、 转速、 总里程、 油耗等数据; 故障码包括车辆的故障信息。 其 中, 所述车辆诊断数据流以数据流码表方式存储上传, 其它数据包可以按指定 格式存储上传。 进一步地, 为检测所述数据包的有效性, 可判断所述数据包是 否为满足用户需求的数据包, 若不满足, 则所述数据包无效, 发送无效提示, 若所述数据包为满足用户需求的数据包, 则解析所述数据包的内容, 并输出指 定格式的解析结果数据。 进一步地, 刪除无效数据包以减少存储空间占用。 [0088] Specifically, the protocol in the protocol library is invoked, and the data packet is intercepted from the received data to be processed, and the characteristic parameters of the data packet include a consecutively arranged header, a trailer, a packet length, and a data service number. Further, The characteristic parameters of the data packet also include a command word, a data content, and a check digit. Optionally, in the embodiment of the present invention, the intercepting data packet may include a login data packet, a positioning data packet, a vehicle diagnostic data stream, and a fault code, where the login data packet includes protocol data of the terminal custom communication protocol, such as a terminal. The terminal number; the GPS data packet includes positioning information of the vehicle; the vehicle diagnostic data stream includes actual data of the vehicle, such as data such as vehicle speed, speed, total mileage, fuel consumption, etc.; the fault code includes fault information of the vehicle. The vehicle diagnostic data stream is stored and uploaded in a data stream code table manner, and other data packets may be specified. Format storage upload. Further, in order to detect the validity of the data packet, it may be determined whether the data packet is a data packet that meets a user's requirement, and if not, the data packet is invalid, and an invalid prompt is sent, if the data packet is satisfied. The data packet requested by the user parses the content of the data packet and outputs the parsing result data in a specified format. Further, invalid data packets are deleted to reduce storage space usage.
[0089] 可选地, 为准确获取数据包的有效性, 避免随意丢弃, 所述检测所述数据包的 有效性, 所述数据包检测模块包括:  [0089] Optionally, in order to accurately obtain the validity of the data packet and avoid the random discarding, the detecting the validity of the data packet, the data packet detecting module includes:
[0090] 特征参数获取模块, 用于获取所述数据包的特征参数; [0090] a feature parameter obtaining module, configured to acquire feature parameters of the data packet;
[0091] 特征参数匹配模块, 用于判断所述特征参数是否与所述协议库中通信协议规定 的数据包格式参数相匹配; 若匹配, 则所述数据包有效; 若不匹配, 则提示所 述数据包无效。  [0091] a feature parameter matching module, configured to determine whether the feature parameter matches a data packet format parameter specified by a communication protocol in the protocol library; if matched, the data packet is valid; if not, the prompting node The data packet is invalid.
[0092] 具体地, 在本发明实施例中, 从接收的待处理数据中截取数据包后, 获取所述 数据包的特征参数, 即, 获取数据包的包头、 包尾、 包长以及数据业务编号, 将截取的数据包中包头、 包尾、 包长以及数据业务编号等特征参数与协议库中 通信协议规定的标准的数据包格式参数进行比对匹配, 若匹配, 则所述数据包 有效; 若比配, 则提示所述数据包无效。  [0092] Specifically, in the embodiment of the present invention, after the data packet is intercepted from the received data to be processed, the feature parameters of the data packet are obtained, that is, the packet header, the packet tail, the packet length, and the data service of the data packet are obtained. No. The feature parameters such as the header, the end of the packet, the packet length, and the data service number in the intercepted data packet are compared with the standard packet format parameters specified by the communication protocol in the protocol library. If matched, the data packet is valid. If the match is matched, the packet is invalid.
[0093] 可选地, 所述数据包检测模块包括:  [0093] Optionally, the data packet detecting module includes:
[0094] 编号获取模块, 用于获取所述数据包的终端编号;  [0094] a number obtaining module, configured to acquire a terminal number of the data packet;
[0095] 匹配比对模块, 用于将所述终端编号与协议库中自定义通信协议的终端编号进 行比对匹配; 若匹配, 则所述数据包有效; 若不匹配, 则所述数据包无效。  [0095] a matching comparison module, configured to compare the terminal number with a terminal number of a custom communication protocol in the protocol library; if matched, the data packet is valid; if not, the data packet invalid.
[0096] 具体地, 在本发明实施例中, 从接收的待处理数据中截取数据包后, 査找所述 数据包对应的终端编号, 即发送所述数据包终端的终端编号。 上述终端编号是 终端初次与数据处理设备连接并在上述数据处理设备上注册吋, 由数据处理设 备随机分配, 或按照某种标准分配的。 终端初次与数据处理设备连接并在数据 处理设备上注册吋, 数据处理设备将终端编号通知至该终端, 同吋将该终端编 号存储在数据处理设备上。 当终端向数据处理设备发送待处理数据吋, 在其发 送的待处理数据中包含有该编号的信息。 在本发明实施例中, 获取终端编号, 并与协议库中自定义通信协议中的终端编号进行比对匹配, 即, 在数据处理设 备査找是否存在上述终端编号, 如果没有査找到上述终端编号, 则上述数据包 无效, 上述发送数据包的终端与数据处理设备是非法连接。 如果査找到上述终 端编号, 则上述数据包有效, 上述发送数据包的终端与数据处理设备是合法连 接。 [0096] Specifically, in the embodiment of the present invention, after the data packet is intercepted from the received data to be processed, the terminal number corresponding to the data packet is searched, that is, the terminal number of the data packet terminal is sent. The terminal number is that the terminal is initially connected to the data processing device and registered on the data processing device, randomly assigned by the data processing device, or allocated according to a certain standard. After the terminal is first connected to the data processing device and registered on the data processing device, the data processing device notifies the terminal number to the terminal, and simultaneously stores the terminal number on the data processing device. When the terminal sends the data to be processed to the data processing device, the data to be processed is included in the data to be processed transmitted by the terminal. In the embodiment of the present invention, the terminal number is obtained, and the terminal number in the custom communication protocol in the protocol library is matched and matched, that is, the data processing device searches for the presence of the terminal number, and if the terminal number is not found, The above data packet Invalid, the terminal that sends the data packet above is illegally connected to the data processing device. If the terminal number is found, the data packet is valid, and the terminal that sends the data packet is legally connected to the data processing device.
[0097] 可选地, 所述数据包解析模块包括:  [0097] Optionally, the data packet parsing module includes:
[0098] 第一协议解析模块, 用于按照通信协议对应的字节位对所述数据包进行解析, 并输出指定格式的解析结果数据;  [0098] a first protocol parsing module, configured to parse the data packet according to a byte bit corresponding to the communication protocol, and output parsing result data in a specified format;
[0099] 第二协议解析模块, 用于按照通信协议的数据项对所述数据包进行解析, 并输 出指定格式的解析结果数据。  [0099] The second protocol parsing module is configured to parse the data packet according to the data item of the communication protocol, and output parsing result data in a specified format.
[0100] 具体地, 在本发明实施例中, 协议库中包括多种协议数据, 如 CAN  [0100] Specifically, in the embodiment of the present invention, the protocol library includes multiple protocol data, such as CAN.
BUS的 J1939协议、 J1979协议和私有诊断协议。 若从接收的待处理数据中截取的 数据包是有效数据包, 则按照通信协议中的标准通信协议对应的字节位对所述 数据包进行解析, 输出指定格式的解析结果数据, 或者, 按照通信协议中的自 定义通信协议的数据项对所述数据包进行解析, 输出指定格式的解析结果数据 , 其中, 所述通信协议包括标准通信协议和自定义通信协议, 所述指定格式可 以是 JSON格式。  BUS's J1939 protocol, J1979 protocol and private diagnostic protocol. If the data packet intercepted from the received data to be processed is a valid data packet, the data packet is parsed according to a byte bit corresponding to a standard communication protocol in the communication protocol, and the parsing result data of the specified format is output, or The data item of the custom communication protocol in the communication protocol parses the data packet, and outputs parsing result data in a specified format, where the communication protocol includes a standard communication protocol and a custom communication protocol, and the specified format may be JSON format.
[0101] 可选地, 所述载终端数据处理装置还包括:  [0101] Optionally, the data processing device of the carrier terminal further includes:
[0102] 缓存清除单元, 用于每隔预设吋间周期, 清除所述数据缓存区的待处理数据。  [0102] The cache clearing unit is configured to clear the to-be-processed data of the data buffer area every preset period.
[0103] 具体地, 每隔预设吋间周期将存储在数据缓存区的待处理数据清除, 以保证数 据缓存区有足够的存储空间接收终端新上传的待处理数据。  [0103] Specifically, the to-be-processed data stored in the data buffer is cleared every preset period to ensure that the data buffer has sufficient storage space to receive the newly uploaded pending data of the terminal.
[0104] 本发明第 3实施例中, 数据处理设备通过接收终端按预设的数据存储方式上传 的待处理数据, 并将所述待处理数据存入数据缓存区, 再调用协议库解析待处 理数据, 并输出指定格式如 JSON格式的解析结果数据, 其中, 所述协议库可以 跨平台调用, 最后存储解所述解析结果数据, 用户无需关心终端数据的数据格 式, 从而降低产品幵发的复杂程度, 缩短产品幵发周期, 提高产品的交付速度 , 同吋, 定期清除所述数据缓存区的待处理数据, 以保证数据缓存区有足够的 存储空间接收终端新上传的待处理数据。  [0104] In the third embodiment of the present invention, the data processing device receives the data to be processed uploaded by the terminal according to a preset data storage manner, and stores the to-be-processed data in the data buffer area, and then invokes the protocol library to be processed. Data, and outputting parsing result data in a specified format, such as JSON format, wherein the protocol library can be called across platforms, and finally the solution parsing result data is stored, and the user does not need to care about the data format of the terminal data, thereby reducing the complexity of product bursting. To shorten the product bursting cycle and improve the delivery speed of the product. Similarly, the data to be processed in the data buffer area is periodically cleared to ensure that the data buffer has sufficient storage space to receive the newly uploaded pending data of the terminal.
[0105] 实施例 4  Example 4
[0106] 图 5是本发明实施例提供的数据处理设备的示意图。 如图 5所示, 该实施例的数 据处理设备 5包括: 处理器 50、 与所述处理器耦合连接的存储器 51以及存储在所 述存储器 51中并可在所述处理器 50上运行的一组程序代码 52, 例如数据处理程 序, 还包括与所述处理器耦合连接的收发装置 53。 所述处理器 50执行所述程序 代码 52吋实现上述各个数据处理方法实施例中的步骤, 例如图 2所示的步骤 201 至 203。 FIG. 5 is a schematic diagram of a data processing device according to an embodiment of the present invention. As shown in Figure 5, the number of this embodiment The processing device 5 comprises: a processor 50, a memory 51 coupled to the processor, and a set of program codes 52, such as data processing programs, stored in the memory 51 and operable on the processor 50, Also included is a transceiver 53 coupled to the processor. The processor 50 executes the program code 52 to implement the steps in the above various data processing method embodiments, such as steps 201 to 203 shown in FIG. 2.
[0107] 示例性地, 在本发明实施例中, 数据处理设备 5通过存储器 51存储一组程序代 码 52, 通过所述收发装置 53接收终端按预设的数据存储方式上传的待处理数据 , 所述处理器 50调用所述存储器 51中的程序代码 52执行以下操作:  [0107] Illustratively, in the embodiment of the present invention, the data processing device 5 stores a set of program codes 52 through the memory 51, and receives, by the transceiver device 53, data to be processed uploaded by the terminal according to a preset data storage manner. The processor 50 calls the program code 52 in the memory 51 to perform the following operations:
[0108] 将所述待处理数据存入数据缓存区, 调用协议库解析所述待处理数据, 并输出 指定格式的解析结果数据;  [0108] storing the to-be-processed data in a data buffer, calling a protocol library to parse the to-be-processed data, and outputting parsing result data in a specified format;
[0109] 通过存储器 51存储所述解析结果数据。  [0109] The parsing result data is stored by the memory 51.
[0110] 可选地, 所述处理器 50执行所述调用协议库解析所述待处理数据, 并输出指定 格式的解析结果数据的具体方式为:  [0110] Optionally, the specific manner in which the processor 50 executes the calling protocol library to parse the to-be-processed data and output the parsed result data in a specified format is:
[0111] 从接收的所述待处理数据中截取数据包; [0111] intercepting a data packet from the received data to be processed;
[0112] 检测所述数据包的有效性; [0112] detecting the validity of the data packet;
[0113] 若所述数据包有效, 则解析所述数据包的内容, 并输出指定格式的解析结果数 据。  [0113] If the data packet is valid, the content of the data packet is parsed, and the parsing result data of the specified format is output.
[0114] 可选地, 所述处理器 50执行所述检测所述数据包的有效性的具体方式为: [0115] 获取所述数据包的特征参数;  [0114] Optionally, the specific manner in which the processor 50 performs the detecting the validity of the data packet is: [0115] acquiring a feature parameter of the data packet;
[0116] 判断所述特征参数是否与所述协议库中通信协议规定的数据包格式参数相匹配  [0116] determining whether the feature parameter matches a data packet format parameter specified by a communication protocol in the protocol library
[0117] 若匹配, 则所述数据包有效; [0117] if matched, the data packet is valid;
[0118] 若不匹配, 则提示所述数据包无效。 [0118] If there is no match, the data packet is prompted to be invalid.
[0119] 可选地, 所述处理器 50执行所述调用协议库解析所述待处理数据, 并输出指定 格式的解析结果数据的具体方式为:  [0119] Optionally, the processor 50 executes the calling protocol library to parse the to-be-processed data, and output the parsing result data in a specified format:
[0120] 按照通信协议对应的字节位对所述数据包进行解析, 并输出指定格式的解析结 果数据; [0120] parsing the data packet according to a byte bit corresponding to the communication protocol, and outputting the parsing result data of the specified format;
[0121] 或, [0122] 按照通信协议的数据项对所述数据包进行解析, 并输出指定格式的解析结果数 据。 [0121] or, [0122] parsing the data packet according to a data item of a communication protocol, and outputting parsing result data of a specified format.
[0123] 或者, 在本发明实施例中, 所述处理器 50执行所述程序代码 52吋实现上述各装 置实施例中各模块 /单元的功能, 例如图 4所示单元 41至 43的功能。  [0123] Alternatively, in the embodiment of the present invention, the processor 50 executes the program code 52 to implement the functions of the modules/units in the foregoing device embodiments, such as the functions of the units 41 to 43 shown in FIG.
[0124] 示例性的, 所述程序代码 52可以被分割成一个或多个模块 /单元, 所述一个或 者多个模块 /单元被存储在所述存储器 51中, 并由所述处理器 50执行, 以完成本 发明。 所述一个或多个模块 /单元可以是能够完成特定功能的一系列程序代码指 令段, 该指令段用于描述所述程序代码 52在所述数据处理设备 5中的执行过程。 例如, 所述程序代码 52可以被分割成数据缓存单元、 数据解析单元、 数据存储 单元, 各单元具体功能如下:  [0124] Illustratively, the program code 52 may be divided into one or more modules/units, which are stored in the memory 51 and executed by the processor 50. To complete the present invention. The one or more modules/units may be a series of program code instruction segments capable of performing a particular function, the instruction segments being used to describe the execution of the program code 52 in the data processing device 5. For example, the program code 52 can be divided into a data buffer unit, a data parsing unit, and a data storage unit. The specific functions of each unit are as follows:
[0125] 数据缓存单元, 用于接收终端按预设的数据存储方式上传的待处理数据, 并将 所述待处理数据存入数据缓存区;  [0125] a data buffering unit, configured to receive data to be processed uploaded by the terminal according to a preset data storage manner, and store the to-be-processed data in a data buffer area;
[0126] 数据解析单元, 用于调用协议库解析所述待处理数据, 并输出指定格式的解析 结果数据;  [0126] a data parsing unit, configured to invoke a protocol library to parse the to-be-processed data, and output parsing result data in a specified format;
[0127] 数据存储单元, 用于所述解析结果数据。  [0127] a data storage unit, configured to use the parsing result data.
[0128] 所述数据处理设备 5可以是桌上型计算机、 笔记本、 掌上电脑及云端服务器等 计算设备。 所述数据处理设备可包括, 但不仅限于, 处理器 50、 存储器 51、 收 发装置 53。 本领域技术人员可以理解, 图 5仅仅是数据处理设备 5的示例, 并不 构成对数据处理设备 5的限定, 可以包括比图示更多或更少的部件, 或者组合某 些部件, 或者不同的部件, 例如所述数据处理设备还可以包括网络接入设备、 总线等。  [0128] The data processing device 5 may be a computing device such as a desktop computer, a notebook, a palmtop computer, and a cloud server. The data processing device may include, but is not limited to, a processor 50, a memory 51, and a transceiver 53. It will be understood by those skilled in the art that FIG. 5 is merely an example of the data processing device 5 and does not constitute a limitation on the data processing device 5, and may include more or less components than those illustrated, or may combine certain components, or different. The components, such as the data processing device, may also include network access devices, buses, and the like.
[0129] 所称处理器 50可以是中央处理单元 (Central Processing Unit, CPU) , 还可以是其 他通用处理器、 数字信号处理器(Digital Signal Processor, DSP)、 专用集成电路 (Application Specific Integrated Circuit, ASIC)、 现成可编程门阵列  The processor 50 may be a central processing unit (CPU), or may be another general-purpose processor, a digital signal processor (DSP), or an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), ready-to-use programmable gate array
(Field-Programmable Gate Array , FPGA)或者其他可编程逻辑器件、 分立门或者 晶体管逻辑器件、 分立硬件组件等。 通用处理器可以是微处理器或者该处理器 也可以是任何常规的处理器等。  (Field-Programmable Gate Array, FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, etc. The general purpose processor may be a microprocessor or the processor or any conventional processor or the like.
[0130] 所述存储器 51可以是所述数据处理设备 5的内部存储单元, 例如数据处理设备 5 的硬盘或内存。 所述存储器 51也可以是所述数据处理设备 5的外部存储设备, 例 如所述数据处理设备 5上配备的插接式硬盘, 智能存储卡 (Smart Media Card, SMC) , 安全数字 (Secure Digital, SD) 卡, 闪存卡 (Flash Card) 等。 进一步 地, 所述存储器 51还可以既包括所述数据处理设备 5的内部存储单元也包括外部 存储设备。 所述存储器 51用于存储所述程序代码以及所述数据处理设备所需的 其他程序和数据。 所述存储器 51还可以用于暂吋地存储已经输出或者将要输出 的数据。 [0130] The memory 51 may be an internal storage unit of the data processing device 5, such as the data processing device 5 Hard drive or memory. The memory 51 may also be an external storage device of the data processing device 5, such as a plug-in hard disk equipped on the data processing device 5, a smart memory card (SMC), and a secure digital (Secure Digital, SD) card, flash card, etc. Further, the memory 51 may also include both an internal storage unit of the data processing device 5 and an external storage device. The memory 51 is used to store the program code and other programs and data required by the data processing device. The memory 51 can also be used to temporarily store data that has been output or is about to be output.
[0131] 所属领域的技术人员可以清楚地了解到, 为了描述的方便和简洁, 仅以上述各 功能单元、 模块的划分进行举例说明, 实际应用中, 可以根据需要而将上述功 能分配由不同的功能单元、 模块完成, 即将所述装置的内部结构划分成不同的 功能单元或模块, 以完成以上描述的全部或者部分功能。 实施例中的各功能单 元、 模块可以集成在一个处理单元中, 也可以是各个单元单独物理存在, 也可 以两个或两个以上单元集成在一个单元中, 上述集成的单元既可以采用硬件的 形式实现, 也可以采用软件功能单元的形式实现。 另外, 各功能单元、 模块的 具体名称也只是为了便于相互区分, 并不用于限制本申请的保护范围。 上述系 统中单元、 模块的具体工作过程, 可以参考前述方法实施例中的对应过程, 在 此不再赘述。  [0131] It will be clearly understood by those skilled in the art that, for convenience and brevity of description, only the division of each functional unit and module described above is exemplified. In practical applications, the above functions may be assigned differently according to needs. The functional unit and the module are completed, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the functions described above. Each functional unit and module in the embodiment may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit, and the integrated unit may be implemented by hardware. Formal implementation can also be implemented in the form of software functional units. In addition, the specific names of the respective functional units and modules are only for the purpose of facilitating mutual differentiation, and are not intended to limit the scope of protection of the present application. For the specific working process of the units and modules in the foregoing system, reference may be made to the corresponding processes in the foregoing method embodiments, and details are not described herein again.
[0132] 在上述实施例中, 对各个实施例的描述都各有侧重, 某个实施例中没有详述或 记载的部分, 可以参见其它实施例的相关描述。  [0132] In the above embodiments, the descriptions of the various embodiments are different, and the parts that are not detailed or described in the specific embodiments may be referred to the related descriptions of other embodiments.
[0133] 本领域普通技术人员可以意识到, 结合本文中所公幵的实施例描述的各示例的 单元及算法步骤, 能够以电子硬件、 或者计算机软件和电子硬件的结合来实现 。 这些功能究竟以硬件还是软件方式来执行, 取决于技术方案的特定应用和设 计约束条件。 专业技术人员可以对每个特定的应用来使用不同方法来实现所描 述的功能, 但是这种实现不应认为超出本发明的范围。  [0133] Those of ordinary skill in the art will appreciate that the elements and algorithm steps of the various examples described in connection with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the solution. A person skilled in the art can use different methods for implementing the described functions for each particular application, but such implementation should not be considered to be beyond the scope of the present invention.
[0134] 在本发明所提供的实施例中, 应该理解到, 所揭露的装置和方法, 可以通过其 它的方式实现。 例如, 以上所描述的系统实施例仅仅是示意性的, 例如, 所述 模块或单元的划分, 仅仅为一种逻辑功能划分, 实际实现吋可以有另外的划分 方式, 例如多个单元或组件可以结合或者可以集成到另一个系统, 或一些特征 可以忽略, 或不执行。 另一点, 所显示或讨论的相互之间的耦合或直接耦合或 通讯连接可以是通过一些接口, 装置或单元的间接耦合或通讯连接, 可以是电 性, 机械或其它的形式。 [0134] In the embodiments provided by the present invention, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the system embodiment described above is merely illustrative. For example, the division of the module or unit is only a logical function division, and the actual implementation may have another division manner, for example, multiple units or components may be used. Combine or can be integrated into another system, or some features Can be ignored, or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
[0135] 所述作为分离部件说明的单元可以是或者也可以不是物理上分幵的, 作为单元 显示的部件可以是或者也可以不是物理单元, 即可以位于一个地方, 或者也可 以分布到多个网络单元上。 可以根据实际的需要选择其中的部分或者全部单元 来实现本实施例方案的目的。  [0135] The unit described as a separate component may or may not be physically distributed, and the component displayed as a unit may or may not be a physical unit, that is, may be located in one place, or may be distributed to multiple On the network unit. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
[0136] 另外, 在本发明各个实施例中的各功能单元可以集成在一个处理单元中, 也可 以是各个单元单独物理存在, 也可以两个或两个以上单元集成在一个单元中。 上述集成的单元既可以采用硬件的形式实现, 也可以采用软件功能单元的形式 实现。  [0136] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
[0137] 所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用 吋, 可以存储在一个计算机可读取存储介质中。 基于这样的理解, 本发明实现 上述实施例方法中的全部或部分流程, 也可以通过计算机程序来指令相关的硬 件来完成, 所述的计算机程序可存储于一计算机可读存储介质中, 该计算机程 序在被处理器执行吋, 可实现上述各个方法实施例的步骤。 其中, 所述计算机 程序包括计算机程序代码, 所述计算机程序代码可以为源代码形式、 对象代码 形式、 可执行文件或某些中间形式等。 所述计算机可读介质可以包括: 能够携 带所述计算机程序代码的任何实体或装置、 记录介质、 U盘、 移动硬盘、 磁碟、 光盘、 计算机存储器、 只读存储器 (ROM, Read-Only Memory) 、 随机存取存 储器 (RAM, Random Access Memory) 、 电载波信号、 电信信号以及软件分发 介质等。 需要说明的是, 所述计算机可读介质包含的内容可以根据司法管辖区 内立法和专利实践的要求进行适当的增减, 例如在某些司法管辖区, 根据立法 和专利实践, 计算机可读介质不包括是电载波信号和电信信号。  [0137] The integrated unit, if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable storage medium. Based on such understanding, the present invention implements all or part of the processes in the foregoing embodiments, and may also be completed by a computer program to instruct related hardware. The computer program may be stored in a computer readable storage medium. After the program is executed by the processor, the steps of the various method embodiments described above can be implemented. Wherein, the computer program comprises computer program code, and the computer program code may be in the form of source code, object code form, executable file or some intermediate form. The computer readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a removable hard disk, a magnetic disk, an optical disk, a computer memory, a Read-Only Memory (ROM). , Random Access Memory (RAM), electrical carrier signals, telecommunications signals, and software distribution media. It should be noted that the content contained in the computer readable medium may be appropriately increased or decreased according to the requirements of legislation and patent practice in a jurisdiction, for example, in some jurisdictions, according to legislation and patent practice, computer readable media It does not include electrical carrier signals and telecommunication signals.
[0138] 以上所述实施例仅用以说明本发明的技术方案, 而非对其限制; 尽管参照前述 实施例对本发明进行了详细的说明, 本领域的普通技术人员应当理解: 其依然 可以对前述各实施例所记载的技术方案进行修改, 或者对其中部分技术特征进 行等同替换; 而这些修改或者替换, 并不使相应技术方案的本质脱离本发明各 实施例技术方案的精神和范围, 均应包含在本发明的保护范围之内。 The above described embodiments are merely illustrative of the technical solutions of the present invention, and are not intended to be limiting; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art will understand that The technical solutions described in the foregoing embodiments are modified, or some of the technical features are equivalently replaced; and the modifications or substitutions do not deviate from the essence of the corresponding technical solutions. The spirit and scope of the embodiments of the present invention should be included in the scope of the present invention.

Claims

权利要求书 Claim
一种数据处理方法, 其特征在于, 所述数据处理方法, 包括: 接收终端按预设的数据存储方式上传的待处理数据, 并将所述待处理 数据存入数据缓存区; A data processing method, the data processing method includes: receiving data to be processed uploaded by a terminal according to a preset data storage manner, and storing the to-be-processed data in a data buffer area;
调用协议库解析所述待处理数据, 并输出指定格式的解析结果数据; 存储所述解析结果数据。 Calling the protocol library to parse the to-be-processed data, and outputting parsing result data in a specified format; storing the parsing result data.
如权利要求 1所述的数据处理方法, 其特征在于, 所述调用协议库解 析所述待处理数据, 并输出指定格式的解析结果数据, 具体包括: 从接收的所述待处理数据中截取数据包; The data processing method according to claim 1, wherein the calling protocol library parses the data to be processed and outputs the parsing result data of the specified format, specifically: intercepting data from the received data to be processed. Package
检测所述数据包的有效性; Detecting the validity of the data packet;
若所述数据包有效, 则解析所述数据包的内容, 并输出指定格式的解 析结果数据。 If the data packet is valid, the content of the data packet is parsed, and the analysis result data of the specified format is output.
如权利要求 2所述的数据处理方法, 其特征在于, 所述检测所述数据 包的有效性, 具体包括: The data processing method according to claim 2, wherein the detecting the validity of the data packet specifically includes:
获取所述数据包的特征参数; Obtaining characteristic parameters of the data packet;
判断所述特征参数是否与所述协议库中通信协议规定的数据包格式参 数相匹配; Determining whether the feature parameter matches a data packet format parameter specified by a communication protocol in the protocol library;
若匹配, 则所述数据包有效; If matched, the data packet is valid;
若不匹配, 则提示所述数据包无效。 If there is no match, the packet is indicated to be invalid.
如权利要求 2所述的数据处理方法, 其特征在于, 所述若所述数据包 有效, 则解析所述数据包的内容, 并输出指定格式的解析结果数据, 具体包括: The data processing method according to claim 2, wherein, if the data packet is valid, parsing the content of the data packet and outputting the parsing result data of the specified format, specifically:
按照通信协议对应的字节位对所述数据包进行解析, 并输出指定格式 的解析结果数据。 The data packet is parsed according to a byte bit corresponding to the communication protocol, and the parsing result data of the specified format is output.
如权利要求 2所述的数据处理方法, 其特征在于, 所述若所述数据包 有效, 则解析所述数据包的内容, 并输出指定格式的解析结果数据, 具体包括: The data processing method according to claim 2, wherein, if the data packet is valid, parsing the content of the data packet and outputting the parsing result data of the specified format, specifically:
按照通信协议的数据项对所述数据包进行解析, 并输出指定格式的解 析结果数据。 Parsing the data packet according to the data item of the communication protocol, and outputting a solution in a specified format Analysis of the result data.
一种数据处理设备, 包括: 处理器, 与所述处理器耦合连接的收发装 置, 以及与所述处理器耦合连接的存储器, 其特征在于, A data processing device, comprising: a processor, a transceiver coupled to the processor, and a memory coupled to the processor, wherein
所述存储器用于存储一组程序代码; The memory is for storing a set of program codes;
通过所述收发装置接收终端按预设的数据存储方式上传的待处理数据 所述处理器调用所述存储器中的程序代码执行以下操作: 将所述待处 理数据存入数据缓存区, 调用协议库解析所述待处理数据, 并输出指 定格式的解析结果数据; Receiving, by the transceiver device, the to-be-processed data uploaded by the terminal according to a preset data storage manner, the processor calling the program code in the memory to perform the following operations: storing the to-be-processed data in a data buffer area, and calling a protocol library Parsing the to-be-processed data, and outputting parsing result data in a specified format;
通过存储器存储所述解析结果数据。 The parsing result data is stored by a memory.
如权利要求 6所述的设备终端, 其特征在于, 所述处理器执行所述调 用协议库解析所述待处理数据, 并输出指定格式的解析结果数据的具 体方式为: The device terminal according to claim 6, wherein the processor executes the call protocol library to parse the data to be processed, and outputs the parsed result data in a specified format:
从接收的所述待处理数据中截取数据包; Obtaining a data packet from the received data to be processed;
检测所述数据包的有效性; Detecting the validity of the data packet;
若所述数据包有效, 则解析所述数据包的内容, 并输出指定格式的解 析结果数据。 If the data packet is valid, the content of the data packet is parsed, and the analysis result data of the specified format is output.
如权利要求 7所述的设备终端, 其特征在于, 所述处理器执行所述检 测所述数据包的有效性的具体方式为: The device terminal according to claim 7, wherein the specific manner in which the processor performs the detection of the validity of the data packet is:
获取所述数据包的特征参数; Obtaining characteristic parameters of the data packet;
判断所述特征参数是否与所述协议库中通信协议规定的数据包格式参 数相匹配; Determining whether the feature parameter matches a data packet format parameter specified by a communication protocol in the protocol library;
若匹配, 则所述数据包有效; If matched, the data packet is valid;
若不匹配, 则提示所述数据包无效。 If there is no match, the packet is indicated to be invalid.
如权利要求 7所述的数据处理设备, 其特征在于, 所述处理器执行所 述调用协议库解析所述待处理数据, 并输出指定格式的解析结果数据 的具体方式为: The data processing device according to claim 7, wherein the processor executes the calling protocol library to parse the data to be processed, and outputs the parsing result data in a specified format:
按照通信协议对应的字节位对所述数据包进行解析, 并输出指定格式 的解析结果数据; Parsing the data packet according to a byte bit corresponding to the communication protocol, and outputting the specified format Analytical result data;
或,  Or,
按照通信协议的数据项对所述数据包进行解析, 并输出指定格式的解 析结果数据。  The data packet is parsed according to the data item of the communication protocol, and the analysis result data of the specified format is output.
[权利要求 10] —种计算机可读存储介质, 所述计算机可读存储介质存储有计算机程 序, 其特征在于, 所述计算机程序被处理器执行吋实现如权利要求 1 至 5任一项所述方法的步骤。  [Claim 10] A computer readable storage medium storing a computer program, wherein the computer program is executed by a processor, implementing the method of any one of claims 1 to 5 The steps of the method.
PCT/CN2017/092888 2017-07-14 2017-07-14 Data processing method and data processing apparatus WO2019010686A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201780000617.5A CN107636602A (en) 2017-07-14 2017-07-14 A kind of data processing method and data processing equipment
PCT/CN2017/092888 WO2019010686A1 (en) 2017-07-14 2017-07-14 Data processing method and data processing apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2017/092888 WO2019010686A1 (en) 2017-07-14 2017-07-14 Data processing method and data processing apparatus

Publications (1)

Publication Number Publication Date
WO2019010686A1 true WO2019010686A1 (en) 2019-01-17

Family

ID=61107343

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/092888 WO2019010686A1 (en) 2017-07-14 2017-07-14 Data processing method and data processing apparatus

Country Status (2)

Country Link
CN (1) CN107636602A (en)
WO (1) WO2019010686A1 (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110377235A (en) * 2019-07-26 2019-10-25 Oppo(重庆)智能科技有限公司 Data processing method, device, mobile terminal and computer readable storage medium
CN110502736A (en) * 2019-08-23 2019-11-26 北京润科通用技术有限公司 A kind of bus data analysis method and device
CN111061795A (en) * 2019-12-19 2020-04-24 新奥数能科技有限公司 Data processing method and device, intelligent terminal and storage medium
CN112200465A (en) * 2020-10-14 2021-01-08 安徽继远软件有限公司 Electric power AI method and system based on multimedia information intelligent analysis
CN113015132A (en) * 2021-03-25 2021-06-22 联合汽车电子有限公司 Communication method and communication system
CN113905108A (en) * 2021-10-28 2022-01-07 珠海一微半导体股份有限公司 Custom protocol analysis device and system for USB communication and operation method thereof
CN113936357A (en) * 2021-11-03 2022-01-14 浙江吉利控股集团有限公司 Diagnostic data issuing method, system, equipment and storage medium
CN114531476A (en) * 2021-12-30 2022-05-24 爱普(福建)科技有限公司 Method and system for analyzing industrial protocol and converting data
CN114880148A (en) * 2022-07-12 2022-08-09 深圳融安网络科技有限公司 Data processing method, device and computer readable storage medium
CN115543584A (en) * 2022-11-25 2022-12-30 苏州魔视智能科技有限公司 Data processing method, device, equipment and medium

Families Citing this family (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108429796A (en) * 2018-02-23 2018-08-21 航天新长征电动汽车技术有限公司 A kind of general vehicle remote monitoring terminal, system and method
CN108509652B (en) * 2018-04-17 2021-01-22 山东大众益康网络科技有限公司 Data processing system and method
CN108628243A (en) * 2018-05-09 2018-10-09 南京博内特信息科技有限公司 A kind of report control platform of Multifunctional new energy automobile
CN108989293B (en) * 2018-06-27 2021-06-18 武汉虹信技术服务有限责任公司 Intelligent building management platform adaptation system and adaptation method
CN109714327A (en) * 2018-12-21 2019-05-03 深圳市元征科技股份有限公司 Data processing method, device, terminal, system and server
CN109857359B (en) * 2019-02-14 2023-12-26 深圳前海骁客影像科技设计有限公司 MIPI data processing method, device and circuit
CN109951820A (en) * 2019-02-25 2019-06-28 深圳市元征科技股份有限公司 A kind of data transmission method and relevant apparatus
CN110490993B (en) * 2019-08-22 2022-02-11 公安部交通管理科学研究所 Automobile driving recorder reading device and system
CN111147540B (en) * 2019-11-18 2022-09-16 深圳市元征科技股份有限公司 File transmission method, device, equipment and storage medium
CN110930712B (en) * 2019-12-30 2021-07-20 山东国惠安创智能物联发展有限公司 Electric vehicle remote control method and system
CN111242779B (en) * 2020-01-03 2023-08-18 湖南工商大学 Financial data characteristic selection and prediction method, device, equipment and storage medium
CN111907827B (en) * 2020-07-21 2022-07-12 广州佳帆计算机有限公司 Product package detection method and system
CN114466072B (en) * 2020-11-10 2024-04-02 深圳Tcl新技术有限公司 Data processing method, intelligent terminal and computer readable storage medium
CN112532644A (en) * 2020-12-08 2021-03-19 航天科技控股集团股份有限公司 Real-time data analysis system based on Tbox new energy automobile
CN113364732B (en) * 2021-04-22 2023-04-07 东风电驱动系统有限公司 Vehicle-mounted terminal communication protocol analysis method and device
CN113923272A (en) * 2021-09-16 2022-01-11 珠海格力电器股份有限公司 Data analysis method and device and server equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080167758A1 (en) * 2007-01-08 2008-07-10 Ford Global Technologies, Llc Wireless Gateway Apparatus and Method of Bridging Data Between Vehicle Based and External Data Networks
CN102420809A (en) * 2011-08-19 2012-04-18 中联重科股份有限公司 Terminal managing system, server and method
CN105306173A (en) * 2015-11-17 2016-02-03 天泽信息产业股份有限公司 Adaptive Internet of vehicles terminal access method
CN106027606A (en) * 2016-04-30 2016-10-12 北京智驾互联信息服务有限公司 Data processing device of vehicle OBD (On-Board Diagnostic)
CN106686000A (en) * 2017-02-27 2017-05-17 江苏徐工信息技术股份有限公司 Multi-data-type multi-communication-protocol data access method for internet access of construction machinery vehicle

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103179175A (en) * 2011-12-26 2013-06-26 北京四维图新科技股份有限公司 Remote information service system and communication method and device thereof
CN102546827B (en) * 2012-02-24 2015-12-02 深圳市长宇电器有限公司 Receive and dispatch method and the device of multiple protocol data of vehicle-mounting terminals on the server
CN103747004A (en) * 2014-01-19 2014-04-23 樊建 Realizing method of internet of things communication protocol
CN105701122B (en) * 2014-11-28 2020-06-16 深圳市腾讯计算机系统有限公司 Log collection method, device and system
CN105227574B (en) * 2015-10-20 2018-09-21 东南大学 A kind of electric vehicle positioning of compatible multiple terminals access chases after theft system and its method
CN106910368A (en) * 2017-04-07 2017-06-30 中科车港(深圳)实业股份有限公司 A kind of vehicle parking management method, apparatus and system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080167758A1 (en) * 2007-01-08 2008-07-10 Ford Global Technologies, Llc Wireless Gateway Apparatus and Method of Bridging Data Between Vehicle Based and External Data Networks
CN102420809A (en) * 2011-08-19 2012-04-18 中联重科股份有限公司 Terminal managing system, server and method
CN105306173A (en) * 2015-11-17 2016-02-03 天泽信息产业股份有限公司 Adaptive Internet of vehicles terminal access method
CN106027606A (en) * 2016-04-30 2016-10-12 北京智驾互联信息服务有限公司 Data processing device of vehicle OBD (On-Board Diagnostic)
CN106686000A (en) * 2017-02-27 2017-05-17 江苏徐工信息技术股份有限公司 Multi-data-type multi-communication-protocol data access method for internet access of construction machinery vehicle

Cited By (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110377235A (en) * 2019-07-26 2019-10-25 Oppo(重庆)智能科技有限公司 Data processing method, device, mobile terminal and computer readable storage medium
CN110377235B (en) * 2019-07-26 2023-04-07 Oppo(重庆)智能科技有限公司 Data processing method and device, mobile terminal and computer readable storage medium
CN110502736A (en) * 2019-08-23 2019-11-26 北京润科通用技术有限公司 A kind of bus data analysis method and device
CN110502736B (en) * 2019-08-23 2023-12-22 北京润科通用技术有限公司 Bus data analysis method and device
CN111061795B (en) * 2019-12-19 2024-03-08 新奥数能科技有限公司 Data processing method and device, intelligent terminal and storage medium
CN111061795A (en) * 2019-12-19 2020-04-24 新奥数能科技有限公司 Data processing method and device, intelligent terminal and storage medium
CN112200465A (en) * 2020-10-14 2021-01-08 安徽继远软件有限公司 Electric power AI method and system based on multimedia information intelligent analysis
CN112200465B (en) * 2020-10-14 2024-04-19 安徽继远软件有限公司 Electric power AI method and system based on multimedia information intelligent analysis
CN113015132B (en) * 2021-03-25 2023-09-22 联合汽车电子有限公司 Communication method and communication system
CN113015132A (en) * 2021-03-25 2021-06-22 联合汽车电子有限公司 Communication method and communication system
CN113905108A (en) * 2021-10-28 2022-01-07 珠海一微半导体股份有限公司 Custom protocol analysis device and system for USB communication and operation method thereof
CN113905108B (en) * 2021-10-28 2024-02-23 珠海一微半导体股份有限公司 Custom protocol analysis device and system for USB communication and operation method thereof
CN113936357B (en) * 2021-11-03 2024-04-12 浙江吉利控股集团有限公司 Diagnostic data issuing method, system, equipment and storage medium
CN113936357A (en) * 2021-11-03 2022-01-14 浙江吉利控股集团有限公司 Diagnostic data issuing method, system, equipment and storage medium
CN114531476B (en) * 2021-12-30 2023-10-20 爱普(福建)科技有限公司 Industrial protocol analysis and data conversion method and system
CN114531476A (en) * 2021-12-30 2022-05-24 爱普(福建)科技有限公司 Method and system for analyzing industrial protocol and converting data
CN114880148A (en) * 2022-07-12 2022-08-09 深圳融安网络科技有限公司 Data processing method, device and computer readable storage medium
CN115543584A (en) * 2022-11-25 2022-12-30 苏州魔视智能科技有限公司 Data processing method, device, equipment and medium

Also Published As

Publication number Publication date
CN107636602A (en) 2018-01-26

Similar Documents

Publication Publication Date Title
WO2019010686A1 (en) Data processing method and data processing apparatus
CN108965484B (en) Internet of things data transmission method, system and terminal
CN104734911A (en) CAN bus network management test system and method
US20140142801A1 (en) Failsafe communication system and method
CN109040210B (en) Communication method between applications, terminal equipment and storage medium
WO2021022794A1 (en) Rdma-based data transmission method, network card, server and medium
CN113872967B (en) Vehicle information transmission method and device, electronic equipment and storage medium
CN111427335A (en) Vehicle remote diagnosis method, equipment connector and vehicle connector
US20220358075A1 (en) Pcie-based data transmission method and apparatus
US10033842B2 (en) GRE message encapsulation method, decapsulation method, and corresponding devices
EP3087498A1 (en) Electronic device having two processors to process data
WO2011137648A1 (en) Download method and system based on management data input/output interface
US20230300720A1 (en) Network distribution method and apparatus
WO2017071429A1 (en) Data access method and bus
CN112311720A (en) Data transmission method and device
CN112422485B (en) Communication method and device of transmission control protocol
TWI452886B (en) Method of unified parameter mapping
CN109639555B (en) Link layer message generation method, link layer message generation device and terminal equipment
CN109525550B (en) Data message processing method, device and system
US20130156050A1 (en) Data transfer apparatus, data transfer method, and inter-chip communication system
WO2020097919A1 (en) Power backoff method, terminal device and storage medium
CN110830263A (en) Automatic login method and device for vehicle-mounted system
US20180248808A1 (en) Communication method, communication apparatus, and program
CN111224773A (en) Quantum key management equipment
CN112637151B (en) Data message transmission method, terminal device, server and storage medium

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: 17917612

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: 17917612

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 17917612

Country of ref document: EP

Kind code of ref document: A1