Method and system for marking internal circulation of data item system
By binding the communication protocol of the vehicle terminal on the Internet of Vehicles platform and analyzing and marking the data, the chaos and error problems arise during the data access and forwarding of the Internet of Vehicles platform are solved, and the maintainability and accuracy of data forwarding are improved.
Patent Information
- Application Number
- CN202411680212.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-22
- Publication Date
- 2025-03-25
AI Technical Summary
The existing Internet of Vehicles platforms are prone to chaos and errors during data access and forwarding, and cannot effectively distinguish and manage the data forwarding logic of different models, resulting in data processing errors, increasing the pressure of computing resource and the complexity of model configuration management.
By binding the accessed vehicle terminal to the corresponding communication protocol, the data transmitted by the vehicle terminal is analyzed using the preset standard analytical protocol format, and the analyzed data is marked based on the preset internal tag information of the Internet of Vehicles platform, and stored in the message queue in real time, so that subsequent forwarding operations can be performed based on accurate data.
It improves the maintainability of data forwarding in the Internet of Vehicles, avoids data forwarding errors and repeated calculations, simplifies the expansion of the data system, and ensures the accuracy and consistency of data transmission.
Smart Images

Figure CN119697214A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of vehicle networking communication technology, and in particular to a method and system for marking the internal flow of data items in a system. Background Art
[0002] With the rapid development of the new energy vehicle industry, the demand for data access and forwarding on the Internet of Vehicles platform has increased significantly. Internet of Vehicles platforms related to new energy vehicles often need to access and forward a large amount of vehicle data. However, the current Internet of Vehicles platform has exceeded the application scope of national standard data during data access and forwarding, which easily causes confusion and errors in data access and forwarding.
[0003] For example, when different models report data, the platform cannot accurately distinguish and manage the forwarding logic of various types of data, resulting in errors in the platform's processing of accessed data, which directly affects the accuracy of the data. In addition, the new energy monitoring platform currently uses XML configuration files to implement data parsing. The same data may be repeatedly calculated in different business scenarios, which not only increases the pressure on car companies in computing resources, but also increases the complexity of vehicle configuration management. The current system cannot complete the reception and forwarding of data through freely configurable data sets.
[0004] Regarding data interaction in different business scenarios, the existing platform still has poor maintainability in receiving and forwarding custom data, which can easily lead to data forwarding errors and duplicate calculation of the same data. Summary of the invention
[0005] In view of this, the present invention provides a method and system for marking the internal flow of data items in a system to solve the problem of how to improve the maintainability of data forwarding in the Internet of Vehicles.
[0006] In a first aspect, the present invention provides a data item system internal circulation marking method, which is applied to a vehicle networking platform, wherein the vehicle networking platform is connected to at least one vehicle terminal, and the vehicle networking platform is connected to at least one third-party service platform, and the method includes:
[0007] Bind the connected vehicle terminal to the corresponding communication protocol;
[0008] Acquire first data transmitted by the target vehicle terminal, where the first data represents original message data collected by the vehicle terminal;
[0009] Parsing the first data according to a parsing format corresponding to a preset standard parsing protocol to obtain second data, wherein the second data represents a specific value corresponding to a preset data item in the vehicle information;
[0010] Marking the second data according to the preset internal label information of the Internet of Vehicles platform, and storing it in the message queue in real time;
[0011] When a target vehicle data forwarding request uploaded by a third-party business platform is obtained, the marked second data corresponding to the target vehicle terminal is obtained and parsed from the message queue according to the communication protocol corresponding to the target vehicle terminal, and the third data is obtained and forwarded to the third-party business platform, wherein the third data represents the message data generated according to the second data according to the communication protocol corresponding to the target vehicle terminal.
[0012] In the embodiment of the present invention, by binding the corresponding communication protocol when accessing the vehicle terminal, the platform can assign a protocol standard to each vehicle terminal, thereby performing unified data processing, solving the problem of data classification from the source, and there will be no confusion when forwarding data later. By adopting the preset standard parsing protocol format, the specific data of each vehicle terminal can be accurately parsed to obtain the second data. By marking the parsed second data according to the preset internal tag information of the Internet of Vehicles platform and storing it in the message queue in real time, it is ensured that the subsequent forwarding operation can be forwarded based on accurate data. Since different business scenarios can be uniformly processed based on the marked second data, the same data is avoided from being repeatedly calculated in different business scenarios. The present invention extracts and parses the marked data of the target vehicle terminal from the message queue through the corresponding communication protocol, generates a third data message that meets the request, avoids the disadvantages of repeated data processing, simplifies repeated business, and makes the data system (i.e., the Internet of Vehicles platform) easier to expand.
[0013] In an optional implementation, binding the connected vehicle terminal to a corresponding communication protocol specifically includes:
[0014] Get all vehicle types and the data item type corresponding to each vehicle type;
[0015] generating at least one communication protocol template according to the vehicle type and the data item type corresponding to each vehicle type;
[0016] When a vehicle terminal is connected, the type of the vehicle connected to the vehicle terminal is obtained;
[0017] The communication protocol corresponding to the access vehicle terminal is bound according to the vehicle type and the communication protocol template.
[0018] The embodiment of the present invention generates corresponding communication protocol templates for different vehicle types. The Internet of Vehicles platform can automatically match the corresponding communication protocol according to the vehicle type of each vehicle terminal. Each vehicle terminal uses a unified protocol standard during data transmission and parsing, while the data item formats of different vehicle types may be different. After binding the communication protocol, the data of each vehicle terminal will be parsed and processed according to its corresponding protocol. When a new vehicle type is connected, it is only necessary to bind the corresponding new communication protocol template, without making a lot of adjustments to the existing data system structure, thereby improving the scalability of the data system (i.e., the Internet of Vehicles platform).
[0019] In an optional implementation manner, parsing the first data according to a parsing format corresponding to a preset standard parsing protocol to obtain the second data specifically includes:
[0020] Obtain the name of the data item, the position of the data item in the byte stream, the number of places occupied by the data item, the offset of the data item, and the coefficient of the data item according to the preset standard parsing protocol;
[0021] The first data is parsed in a parsing format according to the name of the data item, the position of the data item in the byte stream, the number of places occupied by the data item, the offset of the data item, and the coefficient of the data item to obtain the second data, specifically including: determining the first byte position in the byte stream corresponding to the first data according to the position of the data item in the byte stream, starting from the first byte position, adding the same number of bits as the number of places occupied by the data item to obtain the second byte position; subtracting the offset of the data item from the second byte position to obtain the third byte position, and multiplying the third byte position by the coefficient of the data item to obtain the value of the data item as the second data.
[0022] The embodiment of the present invention ensures the accuracy of the parsed data through the specific parameters of the data item name, the position of the data item in the byte stream, the number of data item occupancy, the offset of the data item, and the coefficient of the data item, thereby providing a data basis for the subsequent internal marking process.
[0023] In an optional implementation, acquiring and parsing the marked second data corresponding to the target vehicle terminal from the message queue according to the communication protocol corresponding to the target vehicle terminal to obtain the third data specifically includes:
[0024] Selecting target data to be forwarded from a plurality of second data based on a forwarding rule of a communication protocol corresponding to the target vehicle terminal;
[0025] The third data is generated according to the target data based on the message rule of the communication protocol corresponding to the target vehicle terminal.
[0026] The embodiment of the present invention selects the target data to be forwarded from multiple second data based on the forwarding rules of the communication protocol corresponding to the target vehicle terminal, and screens out the specific data related to the current business scenario. Only the relevant target data will be processed, rather than all data being processed one by one, thereby avoiding data redundancy. The third data is generated based on the message rules of the communication protocol corresponding to the target vehicle terminal according to the target data, thereby ensuring the consistency of data when the Internet of Vehicles platform is connected with a third-party system.
[0027] In an optional implementation, the preset vehicle networking platform internal tag information and the second data are marked in the form of a key-value pair;
[0028] The method further comprises: acquiring a plurality of marked key-value pair data from the message queue at a preset interval, and storing the data in a cache database.
[0029] In the embodiment of the present invention, each data item can quickly locate the corresponding vehicle data by marking in the form of key-value pairs. After storing these key-value pair data in the cache database, when the third-party business platform requests the same vehicle data multiple times, the platform can directly read the marked key-value pair data from the cache database, reducing the number of direct accesses to the main database. Alleviate the resource pressure of the Internet of Vehicles platform.
[0030] In an optional embodiment, the method further includes:
[0031] When a target vehicle data calculation request uploaded by a third-party business platform is obtained, a request parameter corresponding to the target vehicle terminal is obtained based on the target vehicle data calculation request;
[0032] Query the corresponding key-value pair data from the cache database according to the request parameters;
[0033] Obtaining a target calculation item from the request parameter;
[0034] Determine the associated target preset calculation rule according to the target calculation item;
[0035] A calculation result is generated according to the key-value pair data based on the target preset calculation rules, and the calculation result is parsed according to the communication protocol corresponding to the target vehicle terminal to obtain fourth data, which is returned to the third-party business platform, wherein the fourth data represents the message data generated according to the calculation result according to the communication protocol corresponding to the target vehicle terminal.
[0036] In the embodiment of the present invention, key-value pair data can be dynamically queried from the cache database according to the request parameters, and the data can be calculated based on the target calculation item and the preset calculation rules, because each data calculation is strictly performed according to the associated rules, repeated calculations can be prevented. By querying data from the cache database and generating calculation results using the preset calculation rules, the calculation results are parsed based on the communication protocol, and the message data suitable for the requested business needs is generated, thereby ensuring the accuracy of data transmission.
[0037] In a second aspect, the present invention provides a data item system internal circulation marking system, which is applied to a vehicle networking platform, wherein the vehicle networking platform is connected to at least one vehicle terminal, and the vehicle networking platform is connected to at least one third-party business platform, and the system includes:
[0038] The vehicle terminal communication protocol binding module is used to bind the connected vehicle terminal to the corresponding communication protocol;
[0039] An original message collection module, used to obtain first data transmitted by a target vehicle terminal, wherein the first data represents original message data collected by the vehicle terminal;
[0040] A data parsing module, used to parse the first data according to a parsing format corresponding to a preset standard parsing protocol to obtain second data, wherein the second data represents a specific value corresponding to a preset data item in the vehicle information;
[0041] A data marking and storage module, used to mark the second data according to the preset internal label information of the Internet of Vehicles platform, and store it in the message queue in real time;
[0042] The data forwarding request processing module is used to obtain and parse the marked second data corresponding to the target vehicle terminal from the message queue according to the communication protocol corresponding to the target vehicle terminal when a target vehicle data forwarding request uploaded by the third-party business platform is obtained, obtain the third data, and forward it to the third-party business platform, wherein the third data represents the message data generated according to the second data according to the communication protocol corresponding to the target vehicle terminal.
[0043] In a third aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the data item system internal flow marking method of the first aspect or any corresponding embodiment thereof by executing the computer instructions.
[0044] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the method for marking the internal flow of data items in a system according to the first aspect or any corresponding embodiment thereof.
[0045] In a fifth aspect, the present invention provides a computer program product, comprising computer instructions for causing a computer to execute the method for marking internal circulation of a data item system according to the first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0047] Figure 1 is a schematic flow chart of a method for marking internal circulation of a data item system according to an embodiment of the present invention;
[0048] Figure 2 is a flow chart of another method for marking the internal circulation of data items in a system according to an embodiment of the present invention;
[0049] Figure 3 is a flow chart of another method for marking the internal circulation of data items in a system according to an embodiment of the present invention;
[0050] Figure 4 is a schematic diagram of vehicle communication protocol binding relationship according to an embodiment of the present invention;
[0051] Figure 5 is a flow chart of another method for marking the internal circulation of data items in a system according to an embodiment of the present invention;
[0052] Figure 6 is a schematic diagram of an application flow of a data item system internal flow marking method according to an embodiment of the present invention;
[0053] Figure 7 is a structural block diagram of a data item system internal flow marking system according to an embodiment of the present invention;
[0054] Figure 8 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0055] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0056] Many new energy vehicle networking platforms use XML configuration files to implement data parsing and processing. Data access, forwarding and parsing mainly rely on predefined XML files. XML parsing is relatively complex. As the amount of data increases, the parsing speed decreases, and the same data may be repeatedly calculated in different business scenarios.
[0057] For example, the vehicle status data may need to be used for both real-time monitoring and statistical analysis of historical data. Since the system cannot effectively distinguish these scenarios, calculations need to be performed each time data is accessed, increasing the consumption of computing resources.
[0058] In addition, the Internet of Vehicles platform only uses one communication protocol to transmit all vehicle data. If the data formats of different models are similar or overlap, it is impossible to accurately distinguish the source of these data, resulting in confusion in the data forwarding logic, which can easily cause erroneous data processing and data loss.
[0059] The method of the present invention is mainly used for data parsing, forwarding and tagging management of the Internet of Vehicles platform, such as a multi-terminal, multi-protocol Internet of Vehicles system. By binding each vehicle terminal with the corresponding communication protocol, it is ensured that the data transmission of different vehicle terminals is clearly distinguished at the protocol level, avoiding confusing data transmission parsing, using a preset standard parsing protocol format, and marking the parsed data with internal tags, effectively marking and distinguishing the processing requirements in different scenarios, avoiding repeated calculations each time data is accessed, and improving processing efficiency. Since the corresponding protocol can be bound to each vehicle terminal, the maintainability of the Internet of Vehicles platform can be effectively improved.
[0060] According to an embodiment of the present invention, an embodiment of a method for marking the internal flow of data items in a system is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0061] In this embodiment, a data item system internal circulation marking method is provided, which is applied to a vehicle networking platform, wherein the vehicle networking platform is connected to at least one vehicle terminal, and the vehicle networking platform is connected to at least one third-party service platform. Figure 1is a flow chart of a method for marking internal circulation of a data item system according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:
[0062] Step S101, binding the connected vehicle terminal to the corresponding communication protocol.
[0063] It should be noted that in the Internet of Vehicles platform, each connected vehicle terminal needs to be bound to a communication protocol. The purpose of binding the communication protocol of the connected vehicle terminal in the embodiment of the present invention is to ensure that the platform can correctly parse data from different vehicle terminals. Because the communication protocol of each vehicle is generated by combining its vehicle type, data item type, etc., each vehicle can only be associated with one communication protocol.
[0064] It is understandable that the data formats of different vehicle models may be different. A unified communication protocol can ensure that the Internet of Vehicles platform can accurately parse the data of different vehicles. Each vehicle has only one communication protocol, which can avoid confusion during data transmission and improve the maintainability of the platform.
[0065] Specifically, the binding process is to manually or automatically specify a communication protocol for the vehicle when the vehicle is connected to the platform. The corresponding protocol specifies in detail the sensor data items used by the vehicle and their parsing rules, including the position, offset, coefficient, etc. of the byte stream. For example, a vehicle's communication protocol may include data items such as mileage and speed, and each data item has a clear definition in the protocol, such as byte stream position, length, coefficient, etc.
[0066] Step S102, obtaining first data transmitted by the target vehicle terminal, wherein the first data represents original message data collected by the vehicle terminal.
[0067] The embodiment of the present invention receives and obtains the transmitted raw data message from the vehicle terminal. The message data is collected by the vehicle terminal through sensors, such as vehicle speed, mileage, voltage, etc., and uploaded to the Internet of Vehicles platform through wireless transmission. The raw data is received for subsequent analysis and processing. The raw data is unprocessed. Only after analysis can it become a useful data item for use by the platform and third-party services.
[0068] It should be noted that the raw data received by the platform is a string of byte streams, such as a message containing data collected by multiple sensors.
[0069] Specifically, the front-end machine detects and receives the first data by long-term monitoring of the communication with the vehicle terminal. The message format is transmitted in accordance with the format predetermined by the communication protocol (eg GB / T32960.3 format). Each piece of data will be timestamped when received to record the transmission time of the data.
[0070] Step S103, parsing the first data according to a parsing format corresponding to a preset standard parsing protocol to obtain second data, wherein the second data represents a specific value corresponding to a preset data item in the vehicle information.
[0071] In an embodiment of the present invention, the original message (first data) is parsed into standardized data items (second data), each of which represents a specific state of the vehicle; the original data is in the form of a byte stream and must be decoded according to the protocol to be converted into the data format required by the business.
[0072] Specifically, according to the bound protocol, data items are extracted from the byte stream, and data conversion is performed through offsets and coefficients to obtain specific data items.
[0073] An example of a first data provided in this embodiment is as follows:
[0074] <data>
[0075] <name> Mileage< / name>
[0076] <bytepos> 5< / bytepos>
[0077] <len> 8< / len>
[0078] <offset> 0< / offset>
[0079] <factor> 0.1< / factor>
[0080] < / data>
[0081] In the first data message mentioned above, the mileage data starts from the 5th byte position, has a length of 8 bits, an offset of 0, and a coefficient of 0.1. The Internet of Vehicles platform will take out this part of the data and calculate based on the offset and coefficient, and finally extract a piece of data (for example, 100), the corresponding data item of which is mileage, where "100" represents the second data.
[0082] Step S104: Mark the second data according to the preset internal tag information of the Internet of Vehicles platform and store it in the message queue in real time.
[0083] The embodiment of the present invention marks the parsed data so that the system can recognize the meaning of the second data. The platform internal label is a unique identifier. For example, the vehicle status label is set to carStatus, the charging status label is represented as chargeStatus, etc., where "carStatus" represents the label corresponding to the data item.
[0084] It is understandable that the purpose of tagging is to avoid duplicate calculations so that the same data can be reused in different business scenarios without having to reparse and calculate it each time.
[0085] Step S105, when a target vehicle data forwarding request uploaded by a third-party business platform is obtained, the marked second data corresponding to the target vehicle terminal is obtained and parsed from the message queue according to the communication protocol corresponding to the target vehicle terminal, and the third data is obtained and forwarded to the third-party business platform, wherein the third data represents the message data generated according to the second data according to the communication protocol corresponding to the target vehicle terminal.
[0086] In this embodiment, when the third-party business platform issues a forwarding request, the system extracts the data of the target vehicle terminal from the message queue, and formats it according to the corresponding protocol before forwarding it. This is because different business modules may need the same data items for different analyses, but in order to avoid repeated parsing, this embodiment pulls relevant data from the message queue according to the protocol specified in the forwarding request. Specifically, by retrieving the data in the message queue, the corresponding data items are extracted according to the previous tags, and repackaged into messages according to the format specified by the communication protocol.
[0087] For example, if the request requires two fields: carStatus and chargeStatus:
[0088] {
[0089] "carStatus":1,
[0090] "chargeStatus":3
[0091] }
[0092] It is packaged according to the target protocol format bound to the target vehicle terminal and sent to the third-party platform.
[0093] In the embodiment of the present invention, by binding the corresponding communication protocol when accessing the vehicle terminal, the platform can assign a protocol standard to each vehicle terminal, thereby performing unified data processing, solving the problem of data classification from the source, and there will be no confusion when forwarding data later. By adopting the preset standard parsing protocol format, the specific data of each vehicle terminal can be accurately parsed to obtain the second data. By marking the parsed second data according to the preset internal tag information of the Internet of Vehicles platform and storing it in the message queue in real time, it is ensured that the subsequent forwarding operation can be forwarded based on accurate data. Since different business scenarios can be uniformly processed based on the marked second data, the same data is avoided from being repeatedly calculated in different business scenarios. The present invention extracts and parses the marked data of the target vehicle terminal from the message queue through the corresponding communication protocol, generates a third data message that meets the request, avoids the disadvantages of repeated data processing, simplifies repeated business, and makes the data system (i.e., the Internet of Vehicles platform) easier to expand.
[0094] In this embodiment, a data item system internal circulation marking method is provided, which is applied to a vehicle networking platform, wherein the vehicle networking platform is connected to at least one vehicle terminal, and the vehicle networking platform is connected to at least one third-party service platform. Figure 2 is a flow chart of a method for marking internal circulation of a data item system according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps:
[0095] Step S201, binding the connected vehicle terminal to the corresponding communication protocol.
[0096] Specifically, the above step S201 includes:
[0097] Step S2011, obtaining all vehicle types and the data item type corresponding to each vehicle type.
[0098] It should be noted that the Internet of Vehicles platform needs to obtain all accessible vehicle type information and the data item type corresponding to each vehicle type in advance. Vehicle types can be classified according to manufacturer, model, drive type (such as pure electric, hybrid, etc.), and the data item type of each vehicle type is determined according to the data requirements reported by the vehicle. Pure electric vehicles may contain data items such as battery status and charging information, while fuel vehicles may not involve these two data items. Therefore, step S2021 obtains and organizes the vehicle type and its corresponding data items in advance to provide a data basis for subsequent protocol generation binding.
[0099] Specifically, the Internet of Vehicles platform needs to connect to a database containing vehicle types and their data items. The database will record all registered vehicle type information and their corresponding data items. When a new vehicle type appears, the latest vehicle type information can be obtained in real time through the vehicle manufacturer's API interface, or the platform operation and maintenance personnel can manually enter the new vehicle type.
[0100] Step S2012: generating at least one communication protocol template according to the vehicle type and the data item type corresponding to each vehicle type.
[0101] It is understandable that different vehicle types may have different data item formats, so different communication protocol templates need to be generated. The communication protocol template defines the data exchange format between the vehicle and the platform. Each vehicle type will have a corresponding communication protocol template. Ensure that the vehicle can transmit data in a unified protocol format after connecting to the platform. Using templates can simplify the management of communication protocols, so that there is no need to adjust the existing communication format when expanding new vehicle types in the future.
[0102] Specifically, the template contains information such as the position (bytePos), length (len), offset (offset), coefficient (factor) of each data item. For example, for a pure electric vehicle, its communication protocol template may contain the following structure:
[0103] <dataitem>
[0104] <name> BatteryVoltage< / name>
[0105] <bytepos> 10< / bytepos>
[0106] <len> 2< / len>
[0107] <offset> 0< / offset>
[0108] <factor> 0.01< / factor>
[0109] < / dataitem>
[0110] <dataitem>
[0111] <name> ChargeStatus< / name>
[0112] <bytepos> 12< / bytepos>
[0113] <len> 1< / len>
[0114] <offset> 0< / offset>
[0115] <factor> 1< / factor>
[0116] < / dataitem>
[0117] Step S2013, when a vehicle terminal is connected, the type of the vehicle connected to the vehicle terminal is obtained.
[0118] Specifically, most vehicles have a unique vehicle identification code, which can be read to query the database to determine the vehicle type. Some vehicle terminals will actively report their vehicle type information when accessing the platform, and the platform can identify the vehicle type based on this information, or the Internet of Vehicles platform can obtain vehicle type information in real time by connecting to the interface of the vehicle manufacturer or other third-party systems.
[0119] Step S2014, binding the communication protocol corresponding to the access vehicle terminal according to the vehicle type and the communication protocol template.
[0120] Specifically, a template corresponding to the vehicle type is found from the communication protocol template generated in step S2012, and the template is bound to the vehicle terminal. If the vehicle type or protocol template changes, the bound communication protocol can be dynamically updated. When there are new data items in the vehicle, the corresponding template can be updated.
[0121] For example, see Figure 3 , where vehicles 1 to 5 can represent pure electric vehicles, and the corresponding communication protocol 1 indicates that these vehicles correspond to the same type of communication template. Among them, the data item types of communication protocol 1 include vehicle motor, fuel cell, and positioning battery temperature, battery voltage, and battery extreme value. Vehicles 6 to 10 correspond to communication protocol 2, which can represent the communication protocol 2 corresponding to hybrid electric vehicles. Its data item types include vehicle motor fuel cell positioning, battery temperature, battery voltage, etc., and so on. Vehicles of the same type correspond to the same communication protocol template.
[0122] Step S202, obtaining first data transmitted by the target vehicle terminal, wherein the first data represents the original message data collected by the vehicle terminal. Figure 1 Step S102 of the illustrated embodiment will not be described in detail here.
[0123] Step S203, parsing the first data according to a parsing format corresponding to a preset standard parsing protocol to obtain second data, wherein the second data represents a specific value corresponding to a preset data item in the vehicle information.
[0124] Specifically, the above step S203 includes:
[0125] Step S2031, obtaining the data item name, the position of the data item in the byte stream, the number of places occupied by the data item, the offset of the data item, and the coefficient of the data item according to a preset standard parsing protocol.
[0126] It should be noted that, specifically, each vehicle type will have its own specific communication protocol template, and different data items (such as battery voltage, fuel consumption, etc.) will occupy different positions in the byte stream. In order to parse the correct information from the raw data uploaded by the vehicle, it is necessary to extract these parsing parameters according to the parsing protocol. First, the data item name is used to identify each specific data item, such as BatteryVoltage represents the battery voltage data item. Secondly, the position in the byte stream (bytePos) is used to specify the starting position of the data item in the original data message; the number of data item occupancy (len) indicates the byte length occupied by the data item in the byte stream, for example, the battery voltage data item may occupy 2 bytes; the offset (offset) is used to indicate the value that needs to be adjusted when parsing the data, which is used to deal with the displacement problem in data transmission; the coefficient (factor) is used to correct or convert the original parsed data, such as multiplying the original data in the byte by the coefficient to obtain the actual physical quantity (such as the actual voltage value).
[0127] Step S2032, parsing the first data in a parsing format according to the data item name, the position of the data item in the byte stream, the number of places occupied by the data item, the offset of the data item, and the coefficient of the data item to obtain the second data.
[0128] Further, step S2032 includes:
[0129] A1, determining a first byte position in a byte stream corresponding to the first data according to the position of the data item in the byte stream;
[0130] A2, starting from the first byte position, adding the same number of bits as the number of bits occupied by the data item to obtain the second byte position;
[0131] A3, subtracting the offset of the data item from the second byte position to obtain a third byte position;
[0132] A4, multiplying the third byte position by the coefficient of the data item to obtain the value of the data item as the second data.
[0133] Exemplarily, in the byte stream corresponding to the original data, the starting byte position of the data item is determined according to the position parameter of the data item in the byte stream obtained in advance. Each data item corresponds to a starting position. If the starting position of the BatteryVoltage data item is the 10th byte of the byte stream, the data item is parsed by reading the position starting from the 10th byte of the byte stream. The battery voltage data item occupies 2 bytes, so starting from the starting byte position (the 10th byte), two bytes (i.e., 10 and 11 bytes) are pushed back as the end position of the data item. After determining the starting and ending positions of the data item, the position of the data item is adjusted according to the offset in the parsing protocol. If the offset is a positive value, the position of the data item needs to be moved forward a certain number of bits; if it is a negative value, it needs to be moved backward to ensure that the extracted data is correctly aligned. After obtaining the adjusted byte position, the coefficients in the parsing protocol need to be applied to the parsed data for conversion. The coefficients convert the raw data in the byte into actual physical quantities. If the raw data of the battery voltage is 1500, the coefficient is 0.01, and the actual battery voltage is 15V.
[0134] The specific technical means of each of the above steps S2031 to S2032 are automatically completed through a preset communication protocol template, thereby ensuring that the parsing process is accurate.
[0135] The embodiment of the present invention ensures the accuracy of the parsed data through the specific parameters of the data item name, the position of the data item in the byte stream, the number of data item occupancy, the offset of the data item, and the coefficient of the data item, thereby providing a data basis for the subsequent internal marking process.
[0136] Step S204: Mark the second data according to the preset tag information of the Internet of Vehicles platform and store it in the message queue in real time. Figure 1 Step S104 of the illustrated embodiment will not be described in detail here.
[0137] Step S205, when a target vehicle data forwarding request uploaded by a third-party service platform is obtained, the marked second data corresponding to the target vehicle terminal is obtained and parsed from the message queue according to the communication protocol corresponding to the target vehicle terminal, and the third data is obtained and forwarded to the third-party service platform, wherein the third data represents the message data generated according to the communication protocol corresponding to the target vehicle terminal based on the second data. For details, please refer to Figure 1 Step S105 of the illustrated embodiment will not be described in detail here.
[0138] The embodiment of the present invention generates corresponding communication protocol templates for different vehicle types. The Internet of Vehicles platform can automatically match the corresponding communication protocol according to the vehicle type of each vehicle terminal. Each vehicle terminal uses a unified protocol standard during data transmission and parsing, while the data item formats of different vehicle types may be different. After binding the communication protocol, the data of each vehicle terminal will be parsed and processed according to its corresponding protocol. When a new vehicle type is connected, it is only necessary to bind the corresponding new communication protocol template, without making a lot of adjustments to the existing data system structure, thereby improving the scalability of the data system (i.e., the Internet of Vehicles platform).
[0139] This embodiment provides a data item system internal circulation marking method, which is applied to a vehicle networking platform, wherein the vehicle networking platform is connected to at least one vehicle terminal, and the vehicle networking platform is connected to at least one third-party service platform. Figure 4 is a flow chart of a method for marking internal circulation of a data item system according to an embodiment of the present invention. Figure 4 As shown, the process includes the following steps:
[0140] Step S401: Bind the connected vehicle terminal to the corresponding communication protocol. Figure 1 Step S101 of the illustrated embodiment will not be described in detail here.
[0141] Step S402, obtaining first data transmitted by the target vehicle terminal, wherein the first data represents the original message data collected by the vehicle terminal. Figure 1 Step S102 of the illustrated embodiment will not be described in detail here.
[0142] Step S403: parse the first data according to the parsing format corresponding to the preset standard parsing protocol to obtain second data, wherein the second data represents the specific value corresponding to the preset data item in the vehicle information. Figure 1 Step S103 of the illustrated embodiment will not be described in detail here.
[0143] Step S404: Mark the second data according to the preset tag information of the Internet of Vehicles platform and store it in the message queue in real time. Figure 1 Step S104 of the illustrated embodiment will not be described in detail here.
[0144] Step S405, when a target vehicle data forwarding request uploaded by a third-party business platform is obtained, the marked second data corresponding to the target vehicle terminal is obtained and parsed from the message queue according to the communication protocol corresponding to the target vehicle terminal, and the third data is obtained and forwarded to the third-party business platform, wherein the third data represents the message data generated according to the second data according to the communication protocol corresponding to the target vehicle terminal.
[0145] Specifically, the above step S405 includes:
[0146] Step S4051, selecting target data to be forwarded from a plurality of second data based on a forwarding rule of a communication protocol corresponding to the target vehicle terminal.
[0147] Specifically, a target vehicle data forwarding request is received from a third-party business platform, and the corresponding communication protocol is searched through the unique identifier of the target vehicle terminal (vehicle VIN code), and the protocol includes data items related to the target vehicle and their forwarding rules.
[0148] For example, the communication protocol of the target vehicle stipulates that the data items to be forwarded include vehicle speed (speed) and battery charge soc, and all relevant second data are obtained from the message queue and filtered according to the forwarding rules in the protocol. For example, the key-value pair data is as follows:
[0149] {
[0150] "carStatus":1,
[0151] "chargeStatus":3,
[0152] "carMode":1,
[0153] "speed":12.2,
[0154] "Odometer":6514,
[0155] }
[0156] If only two items are forwarded, the forwarding configuration is {"carStatus", "chargeStatus"}, and only these two fields are found in the internal tag key-value pair for forwarding, without re-parsing from the original data stream according to the standard format such as GB / T32960.
[0157] Step S4052: Generate third data according to the target data based on the message rules of the communication protocol corresponding to the target vehicle terminal.
[0158] Specifically, according to the communication protocol of the target data and the target vehicle, the corresponding message rules (including: the order of data items, data format, and how to process the offset and coefficient of the data items) are applied. If the communication protocol of the target vehicle stipulates that the position of carStatus in the message is byte 7, the length is 4 bytes, and the position of chargeStatus is byte 11, the length is 2 bytes. Based on this information, the target data is constructed into a byte stream according to the protocol requirements as the third data.
[0159] The embodiment of the present invention selects the target data to be forwarded from multiple second data based on the forwarding rules of the communication protocol corresponding to the target vehicle terminal, and screens out the specific data related to the current business scenario. Only the relevant target data will be processed, rather than all data being processed one by one, thereby avoiding data redundancy. The third data is generated based on the message rules of the communication protocol corresponding to the target vehicle terminal according to the target data, thereby ensuring the consistency of data when the Internet of Vehicles platform is connected with a third-party system.
[0160] In this embodiment, a data item system internal circulation marking method is provided, which can be used for the above-mentioned computer. Figure 5 is a flow chart of a method for marking internal circulation of a data item system according to an embodiment of the present invention. Figure 5 As shown, the process includes the following steps:
[0161] Step S501: Bind the connected vehicle terminal to the corresponding communication protocol. Figure 1 Step S101 of the illustrated embodiment will not be described in detail here.
[0162] Step S502: Acquire the first data transmitted by the target vehicle terminal, wherein the first data represents the original message data collected by the vehicle terminal. Figure 1 Step S102 of the illustrated embodiment will not be described in detail here.
[0163] Step S503: parse the first data according to the parsing format corresponding to the preset standard parsing protocol to obtain second data, wherein the second data represents the specific value corresponding to the preset data item in the vehicle information. Figure 1 Step S103 of the illustrated embodiment will not be described in detail here.
[0164] Step S504: Mark the second data according to the preset internal tag information of the Internet of Vehicles platform and store it in the message queue in real time.
[0165] Among them, the preset internal label information of the Internet of Vehicles platform and the second data are marked in the form of key-value pairs.
[0166] Step S505, when a target vehicle data forwarding request uploaded by a third-party service platform is obtained, the marked second data corresponding to the target vehicle terminal is obtained and parsed from the message queue according to the communication protocol corresponding to the target vehicle terminal, and the third data is obtained and forwarded to the third-party service platform, wherein the third data represents the message data generated according to the communication protocol corresponding to the target vehicle terminal based on the second data. For details, please refer to Figure 1 Step S105 of the illustrated embodiment will not be described in detail here.
[0167] Step S506, obtaining a plurality of marked key-value pairs from the message queue at a preset interval, and storing them in a cache database.
[0168] Specifically, multiple marked key-value pairs are extracted from the message queue through a timing mechanism and stored in a cache database (such as Redis). The data in the message queue is uploaded by the vehicle terminal and converted into the key-value pair format within the system after protocol parsing and marking. To extract the key-value pair data, you can use a scheduled task management tool or call the message queue interface within a preset time interval to batch pull the key-value pair data in the cache.
[0169] For example, the key-value pair data is as follows:
[0170] {
[0171] "carStatus":1,
[0172] "chargeStatus":3,
[0173] "speed":60,
[0174] "odometer":1000
[0175] }
[0176] Each key-value pair represents a specific vehicle data and is stored in Redis for subsequent queries.
[0177] Step S507, when a target vehicle data calculation request uploaded by a third-party business platform is obtained, a request parameter corresponding to the target vehicle terminal is obtained based on the target vehicle data calculation request;
[0178] Specifically, when a third-party business platform initiates a data calculation request, the request is first parsed to obtain the request parameters related to the target vehicle contained therein, including vehicle identification information, required data items, and calculation requirements. The request from the third-party business platform is received through the API interface, and after parsing, key parameters are extracted, including the vehicle's unique identifier (VIN number) and the vehicle data items that need to be calculated (mileage increment). The request parameters are verified to ensure that the parameter format is correct.
[0179] Step S508, querying corresponding key-value pair data from the cache database according to the request parameters;
[0180] Specifically, the query interface of the cache database is called to query the corresponding key-value pair data through the unique identifier of the vehicle (such as the VIN number) and the data item name (such as the Odometer mileage).
[0181] Step S509, obtaining a target calculation item from the request parameter;
[0182] Specifically, the target calculation item in the request is extracted, and the data to be calculated is clarified. For example, if the target calculation item is "calculate mileage" and the request parameter is "01".
[0183] Step S5010, determining an associated target preset calculation rule according to the target calculation item;
[0184] Specifically, the calculation rule in the database is searched according to the request parameter "01" corresponding to the target calculation item "calculate mileage". The calculation rule is preset by the platform. For example, the calculation rule for mileage increment may be: perform difference calculation on the mileage value within a day. The calculation rule library stores calculation rules for different data items. Each rule is preset according to the characteristics of the data item, including calculation operations such as addition, subtraction, and statistics.
[0185] Step S5011, generate a calculation result based on the target preset calculation rules according to the key-value pair data, parse the calculation result according to the communication protocol corresponding to the target vehicle terminal to obtain fourth data, and return it to the third-party business platform, wherein the fourth data represents the message data generated according to the calculation result according to the communication protocol corresponding to the target vehicle terminal.
[0186] Specifically, the calculation rules determined in step S5010 are used to perform calculations on the key-value pair data. Taking the daily mileage increment as an example, multiple Odometer data within a day are taken and subtracted in sequence to finally obtain the total increment. After the calculation result is generated, the calculation result is encapsulated into a message data that complies with the protocol according to the communication protocol format corresponding to the vehicle terminal, and the encapsulated message data is returned to the third-party platform through the API interface.
[0187] For example, if the request is for mileage data of a vehicle with a VIN of "10000012", the system will retrieve a key-value pair similar to the following from Redis:
[0188] {
[0189] "odometer":1000,
[0190] "speed":60,
[0191] "chargeStatus":3
[0192] }
[0193] Among them, the "odometer" value will be used for calculation according to the calculation rules.
[0194] In the embodiment of the present invention, key-value pair data can be dynamically queried from the cache database according to the request parameters, and the data can be calculated based on the target calculation item and the preset calculation rules, because each data calculation is strictly performed according to the associated rules, repeated calculations can be prevented. By querying data from the cache database and generating calculation results using the preset calculation rules, the calculation results are parsed based on the communication protocol, and the message data suitable for the requested business needs is generated, thereby ensuring the accuracy of data transmission.
[0195] In the embodiment of the present invention, each data item can quickly locate the corresponding vehicle data by marking in the form of key-value pairs. After storing these key-value pair data in the cache database, when the third-party business platform requests the same vehicle data multiple times, the platform can directly read the marked key-value pair data from the cache database, reducing the number of direct accesses to the main database. Alleviate the resource pressure of the Internet of Vehicles platform.
[0196] In actual application, please refer to Figure 6 The data item system internal flow marking method provided by the embodiment of the present invention first collects data on the vehicle side and reports the data according to the GB / T32960.3 protocol. The data is parsed on the Internet of Vehicles platform, and after the data item is parsed, the data is stored in the queue. At this time, the message and queue have been internally labeled. It can be used for snapshot storage, calculation, forwarding, docking with other business systems, etc.
[0197] In this embodiment, a data item system internal flow marking system is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and will not be repeated hereafter. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the system described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0198] This embodiment provides a data item system internal circulation marking system, such as Figure 7 As shown, including:
[0199] The vehicle terminal communication protocol binding module 701 is used to bind the connected vehicle terminal to the corresponding communication protocol;
[0200] The original message collection module 702 is used to obtain the first data transmitted by the target vehicle terminal, wherein the first data represents the original message data collected by the vehicle terminal;
[0201] A data parsing module 703, configured to parse the first data according to a parsing format corresponding to a preset standard parsing protocol to obtain second data, wherein the second data represents a specific value corresponding to a preset data item in the vehicle information;
[0202] The data marking and storage module 704 is used to mark the second data according to the preset internal label information of the Internet of Vehicles platform and store it in the message queue in real time;
[0203] The data forwarding request processing module 705 is used to obtain and parse the marked second data corresponding to the target vehicle terminal from the message queue according to the communication protocol corresponding to the target vehicle terminal when a target vehicle data forwarding request uploaded by the third-party business platform is obtained, obtain the third data, and forward it to the third-party business platform, wherein the third data represents the message data generated according to the second data according to the communication protocol corresponding to the target vehicle terminal.
[0204] In an optional implementation, the vehicle terminal communication protocol binding module 701 specifically includes:
[0205] The vehicle type and data item unit is used to obtain all vehicle types and the data item type corresponding to each vehicle type;
[0206] A communication protocol template generating unit, configured to generate at least one communication protocol template according to the vehicle type and the data item type corresponding to each vehicle type;
[0207] A vehicle terminal access identification unit, used to obtain the type of vehicle accessing the vehicle terminal when a vehicle terminal accesses the vehicle terminal;
[0208] The communication protocol binding unit is used to bind the communication protocol corresponding to the access vehicle terminal according to the vehicle type and the communication protocol template.
[0209] In an optional implementation, the data parsing module 703 specifically includes:
[0210] A protocol parsing standard unit, used to obtain the name of a data item, the position of the data item in a byte stream, the number of places occupied by the data item, the offset of the data item, and the coefficient of the data item according to a preset standard parsing protocol;
[0211] A data parsing unit is used to parse the first data according to the data item name, the position of the data item in the byte stream, the number of data item places, the offset of the data item, and the coefficient of the data item in accordance with the parsing format to obtain the second data, specifically comprising: determining the first byte position in the byte stream corresponding to the first data according to the position of the data item in the byte stream, starting from the first byte position, adding the same number of bits as the number of data item places to obtain the second byte position; subtracting the offset of the data item from the second byte position to obtain the third byte position, and multiplying the third byte position by the coefficient of the data item to obtain the value of the data item as the second data.
[0212] In an optional implementation manner, the data forwarding request processing module 705 specifically includes:
[0213] A target data selection unit, configured to select target data to be forwarded from a plurality of second data based on a forwarding rule of a communication protocol corresponding to the target vehicle terminal;
[0214] The third data generating unit is used to generate third data according to the target data based on the message rules of the communication protocol corresponding to the target vehicle terminal.
[0215] In an optional implementation, the preset vehicle networking platform internal tag information and the second data are marked in the form of a key-value pair; the above system also includes:
[0216] The data acquisition module is used to obtain a plurality of marked key-value pair data from the message queue at a preset interval and store them in a cache database.
[0217] In an optional embodiment, the above system further includes:
[0218] A request parsing module is used to obtain request parameters corresponding to the target vehicle terminal based on the target vehicle data calculation request when a target vehicle data calculation request uploaded by a third-party business platform is obtained;
[0219] A data query module, used to query corresponding key-value pair data from a cache database according to the request parameters;
[0220] A calculation item extraction module, used to obtain a target calculation item from the request parameter;
[0221] A rule matching module, used to determine the associated target preset calculation rule according to the target calculation item;
[0222] A result generation module is used to generate a calculation result based on the target preset calculation rules according to the key-value pair data, parse the calculation result according to the communication protocol corresponding to the target vehicle terminal to obtain fourth data, and return it to the third-party business platform, wherein the fourth data represents the message data generated according to the calculation result according to the communication protocol corresponding to the target vehicle terminal.
[0223] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.
[0224] The data item system internal flow marking system in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.
[0225] The embodiment of the present invention also provides a computer device having the above Figure 7 The data item system shown has an internal flow marking system.
[0226] See also Figure 8 , Figure 8 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Figure 8 As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 8 A processor 10 is taken as an example.
[0227] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.
[0228] The memory 20 stores instructions executable by at least one processor 10, so that at least one processor 10 executes the method shown in the above embodiment.
[0229] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0230] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.
[0231] The computer device further comprises a communication interface 30 for the computer device to communicate with other devices or a communication network.
[0232] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.
[0233] A part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of the computer program instruction in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc., and accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium accessible to the computer.
[0234] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the defined scope.
Claims
1. A method for marking the internal circulation of a data item system, characterized in that: Applied to a vehicle networking platform, the vehicle networking platform is connected to at least one vehicle terminal, and the vehicle networking platform is connected to at least one third-party service platform, and the method includes: Bind the connected vehicle terminal to the corresponding communication protocol; Acquire first data transmitted by the target vehicle terminal, where the first data represents original message data collected by the vehicle terminal; Parsing the first data according to a parsing format corresponding to a preset standard parsing protocol to obtain second data, wherein the second data represents a specific value corresponding to a preset data item in the vehicle information; Marking the second data according to the preset internal label information of the Internet of Vehicles platform, and storing it in the message queue in real time; When a target vehicle data forwarding request uploaded by a third-party business platform is obtained, the marked second data corresponding to the target vehicle terminal is obtained and parsed from the message queue according to the communication protocol corresponding to the target vehicle terminal, and the third data is obtained and forwarded to the third-party business platform, wherein the third data represents the message data generated according to the second data according to the communication protocol corresponding to the target vehicle terminal.
2. The method according to claim 1, characterized in that The step of binding the connected vehicle terminal to the corresponding communication protocol specifically includes: Get all vehicle types and the data item type corresponding to each vehicle type; generating at least one communication protocol template according to the vehicle type and the data item type corresponding to each vehicle type; When a vehicle terminal is connected, the type of the vehicle connected to the vehicle terminal is obtained; The communication protocol corresponding to the access vehicle terminal is bound according to the vehicle type and the communication protocol template.
3. The method according to claim 1 or 2, characterized in that: The step of parsing the first data according to a parsing format corresponding to a preset standard parsing protocol to obtain the second data specifically includes: Obtain the name of the data item, the position of the data item in the byte stream, the number of places occupied by the data item, the offset of the data item, and the coefficient of the data item according to the preset standard parsing protocol; The first data is parsed in a parsing format according to the name of the data item, the position of the data item in the byte stream, the number of places occupied by the data item, the offset of the data item, and the coefficient of the data item to obtain the second data, specifically including: determining the first byte position in the byte stream corresponding to the first data according to the position of the data item in the byte stream, starting from the first byte position, adding the same number of bits as the number of places occupied by the data item to obtain the second byte position; subtracting the offset of the data item from the second byte position to obtain the third byte position, and multiplying the third byte position by the coefficient of the data item to obtain the value of the data item as the second data.
4. The method according to claim 3, characterized in that The acquiring and parsing the marked second data corresponding to the target vehicle terminal from the message queue according to the communication protocol corresponding to the target vehicle terminal to obtain the third data specifically includes: Selecting target data to be forwarded from a plurality of second data based on a forwarding rule of a communication protocol corresponding to the target vehicle terminal; The third data is generated according to the target data based on the message rule of the communication protocol corresponding to the target vehicle terminal.
5. The method according to claim 4, characterized in that The preset vehicle networking platform internal tag information and the second data are marked in the form of a key-value pair; The method further comprises: acquiring a plurality of marked key-value pair data from the message queue at a preset interval, and storing the data in a cache database.
6. The method according to claim 5, characterized in that The method further comprises: When a target vehicle data calculation request uploaded by a third-party business platform is obtained, a request parameter corresponding to the target vehicle terminal is obtained based on the target vehicle data calculation request; Query the corresponding key-value pair data from the cache database according to the request parameters; Obtaining a target calculation item from the request parameter; Determine the associated target preset calculation rule according to the target calculation item; A calculation result is generated according to the key-value pair data based on the target preset calculation rules, and the calculation result is parsed according to the communication protocol corresponding to the target vehicle terminal to obtain fourth data, which is returned to the third-party business platform, wherein the fourth data represents the message data generated according to the calculation result according to the communication protocol corresponding to the target vehicle terminal.
7. The internal circulation marking system of the data item system is characterized by: Applied to a vehicle networking platform, the vehicle networking platform is connected to at least one vehicle terminal, the vehicle networking platform is connected to at least one third-party business platform, and the system includes: The vehicle terminal communication protocol binding module is used to bind the connected vehicle terminal to the corresponding communication protocol; An original message collection module, used to obtain first data transmitted by a target vehicle terminal, wherein the first data represents original message data collected by the vehicle terminal; A data parsing module, used to parse the first data according to a parsing format corresponding to a preset standard parsing protocol to obtain second data, wherein the second data represents a specific value corresponding to a preset data item in the vehicle information; A data marking and storage module, used to mark the second data according to the preset internal label information of the Internet of Vehicles platform, and store it in the message queue in real time; The data forwarding request processing module is used to obtain and parse the marked second data corresponding to the target vehicle terminal from the message queue according to the communication protocol corresponding to the target vehicle terminal when a target vehicle data forwarding request uploaded by the third-party business platform is obtained, obtain the third data, and forward it to the third-party business platform, wherein the third data represents the message data generated according to the second data according to the communication protocol corresponding to the target vehicle terminal.
8. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the data item system internal flow marking method according to any one of claims 1 to 6 by executing the computer instructions.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the data item system internal flow marking method described in any one of claims 1-6.
10. A computer program product, characterized in that It comprises computer instructions, and the computer instructions are used to make a computer execute the data item system internal circulation marking method described in any one of claims 1-6.
Citation Information
Cited By
Internet of vehicles measurement data access method, electronic equipment, computer readable storage medium and computer program product
CN121056347A