Communication data processing method and device based on JSON (JavaScript Object Notation)

By designing type mapping and configuration strategies in JSON format, the program logic and configuration information in the data processing of the communication bus are decoupled, solving the problems of low software development efficiency and poor reliability in existing technologies, and achieving improved software development efficiency and enhanced reliability.

CN121680955APending Publication Date: 2026-03-17BEIJING INST OF SPACE LAUNCH TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511512540.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-22
Publication Date
2026-03-17

AI Technical Summary

Technical Problem

In existing technologies, data processing software for communication buses suffers from complex data parsing rules and configuration information for various buses, resulting in the inability to decouple program logic from configuration information, which affects software reliability and development efficiency.

Method used

The JSON format is used for type mapping and configuration strategy design, forming a configuration strategy for command parsing, parameter processing and interface display. Communication data is processed through command configuration interface, parameter configuration interface and interface configuration interface to achieve decoupling of program logic and parameter configuration information.

Benefits of technology

It improves software development efficiency, reduces development and maintenance costs, and enhances software reliability and the uniformity and reliability of data processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121680955A_ABST
    Figure CN121680955A_ABST
Patent Text Reader

Abstract

The invention provides a JSON (JavaScript Object Notation)-based communication data processing method and a JSON-based communication data processing device, and solves the technical problems of low reliability and low development efficiency caused by incapability of decoupling program logic and configuration information in the existing complex data processing process. The method comprises the following steps: performing type mapping on a communication instruction, a communication identifier and a data load based on JSON according to a communication protocol definition; performing type mapping on the instruction parameters based on JSON according to the data encapsulation definition; performing parameter data mapping on the interface control based on JSON according to the definition of the interactive interface; forming a corresponding instruction configuration interface, a parameter configuration interface and an interface configuration interface; in the analysis process of communication data, original communication data of a communication bus is processed by calling an instruction configuration interface, a parameter configuration interface and an interface configuration interface, and structural data is formed based on JSON. Structured storage and hierarchical data processing of various buses and type parameters are achieved, development and maintenance cost is reduced, and reliability and development efficiency are improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of communication data processing, and in particular to a communication data processing method and device based on JSON. BACKGROUND

[0002] In the existing software development process, intensive data processing is a crucial link for software performance. A reasonable data processing flow can improve the performance, accuracy and reliability of software. Data processing software for communication buses usually needs to process a large amount of communication data in real time, such as parsing, processing and display. However, due to the differences in integrated communication buses of devices, the parsing rules, packaging rules and parameter configuration forms of various buses are complex and diverse. Unlike the relatively stable processing logic of programs, the configuration information of programs is more abundant and flexible, which means that more effort needs to be invested to ensure the stability of the processing process and the reliability of the processing result, which will affect the software reliability and development efficiency.

[0003] Only by structurally designing the configuration data processing rules of different communication buses and forming unified parameter information configuration can the software data processing function be unified, structured and automated, thereby improving the software development efficiency.

[0004] In the prior art, JSON (JavaScript Object Notation) is a lightweight data exchange format that can support nested structures and represent complex data (such as objects containing arrays and arrays containing objects). In order to improve the processing reliability and development efficiency of software, structured design of various configuration information can be considered to realize standardized data processing of various bus types and various types of instruction parameters by using JSON. SUMMARY

[0005] In view of the above problems, the embodiments of the present application provide a communication data processing method and device based on JSON, which solves the technical problem that the program logic and configuration information cannot be decoupled in the existing complex data processing process, resulting in low reliability and development efficiency.

[0006] The communication data processing method based on JSON of the embodiments of the present application comprises:

[0007] According to the communication protocol definition, the communication instruction, the communication identifier and the data payload are type-mapped based on JSON to form an instruction parsing configuration strategy;

[0008] According to the data packaging definition, the instruction parameters are type-mapped based on JSON to form a parameter processing configuration strategy;

[0009] According to the interactive interface definition, the interface control is mapped based on JSON parameter data, and an interface display configuration strategy is formed;

[0010] According to the instruction analysis configuration strategy, the parameter processing configuration strategy and the interface display configuration strategy, corresponding instruction configuration interfaces, parameter configuration interfaces and interface configuration interfaces are formed;

[0011] In the communication data analysis process, the communication raw data of the communication bus is processed by calling the instruction configuration interface, the parameter configuration interface and the interface configuration interface, and the structure data is formed based on JSON.

[0012] In an embodiment of the application, the instruction analysis configuration strategy includes:

[0013] The bus association information of the communication instruction is defined in JSON format;

[0014] The handshake feedback information of the communication instruction is defined in JSON format;

[0015] The data payload information of the communication instruction is defined in JSON format.

[0016] In an embodiment of the application, the parameter processing configuration strategy includes:

[0017] The instruction parameter type in the data payload is defined in JSON format;

[0018] The data type of the parameter type is defined in JSON format;

[0019] The data analysis rule of the parameter type is defined in JSON format.

[0020] In an embodiment of the application, the interface display configuration strategy includes:

[0021] The control object in the interface is defined in JSON format corresponding to the interactive interface;

[0022] The bound parameter type is defined in JSON format corresponding to the control object in the interface.

[0023] In an embodiment of the application, the corresponding instruction configuration interface, parameter configuration interface and interface configuration interface include:

[0024] The instruction configuration interface is formed according to the instruction configuration strategy, and the instruction processing program inputs the processing parameters and outputs the JSON format data processing result;

[0025] The parameter configuration interface is formed according to the parameter configuration strategy, and the parameter processing program inputs the processing parameters and outputs the JSON format data processing result;

[0026] According to the interface configuration strategy, an interface configuration interface is formed, and the interface processing program inputs processing parameters and outputs JSON format data processing results.

[0027] In an embodiment of the present application, the JSON-based formation of the structure data includes:

[0028] The communication original data is processed through the instruction configuration interface to form instruction interaction data.

[0029] The data packet is processed through the parameter configuration interface to form instruction parameter data.

[0030] The parameter data is processed through the interface configuration interface to form interface display data.

[0031] In an embodiment of the present application, in the instruction analysis configuration strategy, the instruction unique mark is a bus mark + an instruction ID.

[0032] In an embodiment of the present application, the JSON-based formation of the structure data includes instruction data, parameter data and control object data.

[0033] The JSON-based communication data processing device of the embodiment of the present application includes:

[0034] A memory is configured to store program codes of the processing process of the JSON-based communication data processing method.

[0035] A processor is configured to execute the program codes.

[0036] The JSON-based communication data processing device of the embodiment of the present application includes:

[0037] An instruction configuration module is configured to perform type mapping of communication instructions, communication identifiers and data payloads based on JSON according to a communication protocol definition, and form an instruction analysis configuration strategy.

[0038] A parameter configuration module is configured to perform type mapping of instruction parameters based on JSON according to a data encapsulation definition, and form a parameter processing configuration strategy.

[0039] A display configuration module is configured to perform parameter data mapping of interface controls based on JSON according to an interactive interface definition, and form an interface display configuration strategy.

[0040] An interface construction module is configured to form corresponding instruction configuration interfaces, parameter configuration interfaces and interface configuration interfaces according to the instruction analysis configuration strategy, the parameter processing configuration strategy and the interface display configuration strategy.

[0041] The data processing module is used to process the raw communication data of the communication bus by calling the instruction configuration interface, parameter configuration interface and interface configuration interface during the parsing process of communication data, and to form structured data based on JSON.

[0042] The JSON-based communication data processing method and apparatus of this invention realizes structured storage and hierarchical data processing of various buses and parameters of various types through JSON structured design configuration files. Program logic and parameter configuration information are decoupled, simplifying the software design and development process, improving software development efficiency, reducing software development and maintenance costs, and improving software reliability and development efficiency. Attached Figure Description

[0043] Figure 1 The diagram shown is a flowchart of a JSON-based communication data processing method according to an embodiment of the present invention.

[0044] Figure 2 The diagram shown is a schematic representation of instruction parsing data generated by a JSON-based communication data processing method according to an embodiment of the present invention.

[0045] Figure 3 The diagram shown is a schematic diagram of instruction parameter data generated by a JSON-based communication data processing method according to an embodiment of the present invention.

[0046] Figure 4 The diagram shown is a schematic representation of the interface data displayed by a JSON-based communication data processing method according to an embodiment of the present invention.

[0047] Figure 5 The diagram shown is an architectural schematic of a JSON-based communication data processing device according to an embodiment of the present invention. Detailed Implementation

[0048] To make the objectives, technical solutions, and advantages of this invention clearer and more understandable, the invention will be further described below in conjunction with the accompanying drawings and specific embodiments. Obviously, the described embodiments are merely some embodiments of this invention, and not all embodiments. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.

[0049] An embodiment of the present invention provides a JSON-based communication data processing method as follows: Figure 1 As shown. In Figure 1 In this embodiment, the following are included:

[0050] Step 100: Based on the communication protocol definition, map the communication commands, communication identifiers, and data payloads to JSON types to form a command parsing configuration strategy.

[0051] Those skilled in the art will understand that communication buses are primarily used for the transmission of data, address, and control signals, and corresponding communication protocols are formed based on the bus type. For example, communication protocols corresponding to different types of data buses include, but are not limited to, UART, SPI, and I2C. 2 Communication protocols such as C, CAN, and USB are used. Data packets or frames are parsed through these protocols to obtain relevant control commands, communication status indicators, and detailed parameter type descriptions and data required for command processing. Utilizing the JSON text data exchange format, based on its key-value pair ("key":value) and array ([value1,value2]) data structure, the definitions of command sets, communication status indicators, and data payloads in the communication protocol parsing rules are converted into structured JSON text. This allows for a structured construction of command sets, communication status indicators, and data payload rules, effectively ensuring both intuitive command definition and scalability. The command configuration strategy formed using JSON structured text can standardize the structured processing of configuration information for each specific communication command, maintaining the universality of the data definition method for a large number of communication commands and the consistency of the data storage structure.

[0052] Step 200: Based on the data encapsulation definition, map the command parameters to JSON types to form a parameter processing configuration strategy.

[0053] Those skilled in the art will understand that the parameter data of communication commands are typically encapsulated into valid data payloads using data encapsulation rules, and transmitted as data packets or partial data frames. The data payload is parsed through the data encapsulation definition to obtain various specific parameter type descriptions and parameter data for the corresponding communication command. Utilizing the JSON text data exchange format, based on its key-value pair ("key":value) and array ([value1,value2]) data structure, the logical definitions of parameter types and relationships between parameters in the encapsulation rules are converted into structured JSON text. This allows for the structured construction of parameter types, effectively ensuring both parameter intuitiveness and extensibility. The parameter configuration strategy formed using JSON structured text can guide the structured processing of parameter information for each specific communication command, maintaining the universality of the parameter data definition method and the consistency of the data storage structure.

[0054] Step 300: Based on the interactive interface definition, map the parameter data of the interface controls using JSON to form the interface display configuration strategy.

[0055] Those skilled in the art will understand that software interfaces are formed through different types of control objects. Parameter data of various parameter types can be bound to control objects to form corresponding data displays. Utilizing the JSON text data exchange format, based on its key-value pair ("key":value) and array ([value1,value2]) data structure, the data binding form between parameter types and control objects can be converted into structured JSON text. This allows for a structured definition that controls the data source and data display format, effectively ensuring both data visualization and spatial scalability. The interface configuration strategy formed using JSON structured text can guide the structured processing of each type of parameter data, maintaining the universality of customized processing of large amounts of parameter data and the consistency of data storage structure.

[0056] The instruction parsing configuration strategy, parameter processing configuration strategy, and interface display configuration strategy maintain a consistent organizational structure. Based on the correspondence between communication instructions, instruction parameter types, and the parameter data display interface, a hierarchical relationship and hierarchy are established among the corresponding configuration strategies.

[0057] Step 400: Based on the instruction parsing configuration strategy, parameter processing configuration strategy, and interface display configuration strategy, form the corresponding instruction configuration interface, parameter configuration interface, and interface configuration interface.

[0058] Those skilled in the art will understand that defining interfaces can determine the standards or specifications for the methods to be implemented. By defining instruction configuration interfaces, parameter configuration interfaces, and interface configuration interfaces, implementation specifications for the methods of acquiring corresponding instruction data, parameter data, and interface data are formed. This decouples the definition of instruction data configuration, parameter data configuration, and interface data configuration from the process of acquiring configuration processing data. It ensures that the implementation of various extensions of each configuration strategy can be quickly standardized through interfaces, guaranteeing the standardization and reliability of the data processing process for implementing each configuration strategy.

[0059] Step 500: During the parsing of communication data, the raw communication data of the communication bus is processed by calling the instruction configuration interface, parameter configuration interface and interface configuration interface to form JSON structured data.

[0060] The communication data is processed using the specific implementation methods (or functions) formed in each interface, resulting in JSON data text containing the relevant top and bottom data and data types for the corresponding configuration strategy. This JSON text is then used to establish a structured representation of the instructions, parameters, and data display configuration.

[0061] The JSON-based communication data processing method of this invention achieves unified processing of various buses and data types through JSON structured design configuration files, simplifying the software design and development process, improving software development efficiency, reducing software development and maintenance costs, and improving software reliability and development efficiency.

[0062] like Figure 1 As shown, in one embodiment of the present invention, step 100 includes:

[0063] Step 110: Define the bus association information for communication commands in JSON format.

[0064] Bus association information includes, but is not limited to, command ID, bus identifier, and data packet length. Given that different buses may have the same command ID, the configuration policy file configures the bus identifier and command ID to ensure command uniqueness. The bus identifier can be a device channel number, serial port COM port number, Ethernet port, bus address, etc. In one embodiment of this invention, the unique identifier of a command is the bus identifier + command ID. Multiple buses can be segmented using a fixed method. The data packet length is used to verify the correctness of the data packet length; inconsistent lengths indicate abnormal data.

[0065] Step 120: Define the handshake feedback information for the communication command in JSON format.

[0066] Handshake feedback information includes, but is not limited to, the reply ID, the reply frame sequence number auto-increment flag, the number of reply handshakes, the reply handshake cycle, and the handshake method.

[0067] Step 130: Define the data payload information of the communication command in JSON format.

[0068] Data payload information includes, but is not limited to, data verification identifiers and data storage types.

[0069] like Figure 1 As shown, in one embodiment of the present invention, step 200 includes:

[0070] Step 210: Define the instruction parameter types in the data payload in JSON format.

[0071] The types of instruction parameters used by the software for processing or display are explicitly defined using JSON format. The definition of instruction parameter types includes, but is not limited to, the parameter parsing rules, storage methods, and display parameters.

[0072] The parameter ID must be unique throughout the entire configuration file. In one embodiment of the present invention, the parameter ID naming method is instruction + processed display type + parameter meaning, such as "103_i32_VehPress1", where 103 is the data packet instruction ID (which can be abbreviated), i32 is the processed parameter type, and VehPress1 is the parameter meaning.

[0073] Step 220: Define the data type of the parameter in JSON format.

[0074] The data type of the parameter is defined using JSON format. In one embodiment of this invention, the parameter value in JSON format is uniformly in string format, and the software performs corresponding data conversion according to the data format of the parameter name. The data type parsed according to the data encapsulation definition in the communication protocol includes bits, int8, int16, int32, int64, uint8, uint16, uint32, uint64, float, double, QByteArray, heartbeat, etc. For example, "bits" indicates that the parameter is parsed as bits, "QByteArray" indicates that the parameter is parsed as a character array, and "heartbeat" indicates that the parameter is parsed as device heartbeat data.

[0075] Step 230: Define the data parsing rules for parameter types in JSON format.

[0076] The data parsing rules for type parameters are defined using JSON format. Based on the parameter parsing rules and display type, parameter attributes are dynamically matched and selected to form the definition of configuration parameters.

[0077] In one embodiment of the present invention, including but not limited to:

[0078] Define special data display formats, such as "0" representing raw parsed data and "1" representing offset processed data, i.e., display data = AX + B, where X is the raw data, etc.

[0079] The conversion logic when the parameter type and data type are inconsistent, for example, if the data display format showType is 1, then the processed data will be uniformly converted to double type;

[0080] The definition of object-oriented parameter types, such as the data queue storage flag queue, divides parameter data into overlay data and queue data according to the data storage type. Overlay data overwrites old data each time new data is received, while queue data is enqueued when new data is received.

[0081] The parameter data check period is defined, for example, in Cyschk. Periodic data can be used to check the data reception time. If no data is received after a specified time, the data can be determined to be invalid.

[0082] Parameter data can be displayed using mapping definitions. For example, data can be displayed in a Map table. When displaying only a portion of the data, it is necessary to show the identifier corresponding to the parameter data, which can be configured through the Map table.

[0083] like Figure 1 As shown, in one embodiment of the present invention, step 300 includes:

[0084] Step 310: Define the control objects in the corresponding interactive interface in JSON format.

[0085] Regarding the binding and display rules for controls and parameter data in the software interface, controls on different interfaces may have the same name, requiring each interface to have a separate interface data processing configuration file.

[0086] Step 320: Define the parameter types bound to the control objects in the corresponding interface in JSON format.

[0087] The control object ID must correspond to the parameter ID. One parameter ID can correspond to multiple display control IDs on the interface. For complex controls, corresponding parameter IDs can be added based on the display attributes.

[0088] like Figure 1 As shown, in one embodiment of the present invention, step 400 includes:

[0089] Step 410: Form an instruction configuration interface based on the instruction configuration strategy, so that the instruction processor can input processing parameters and output JSON format data processing results.

[0090] The instruction configuration interface standardizes the input and output of the instruction processor. In one embodiment of the present invention, the instruction configuration interface for the raw data of the communication bus includes:

[0091]

[0092] Step 420: Based on the parameter configuration strategy, a parameter configuration interface is formed, which is used by the parameter processing program to input processing parameters and output JSON format data processing results.

[0093] The parameter configuration interface standardizes the input and output of the parameter processing program. In one embodiment of the present invention, the parameter configuration interface includes:

[0094] No. Name Data Type Description 1 paraID string Parameter ID 2 name string Parameter Name 3 value string Parameter Value 4 type string Data Analysis Type 5 bytes int Number of Bytes of Parameter Analysis 6 byte_pos string Starting Position of Bytes of Parameter Analysis 7 bits int Number of Bits of Parameter Analysis 8 bit_pos int Bit Position of Parameter Analysis 9 showType int Data Display Format 10 A int Data Multiples When Processing Data 11 B int Data Offset When Processing Data 12 precision int Data Display Precision 13 unit int Data Display Unit 14 cyschk int Periodic Data Check Period 15 queue int Data Queue Storage Flag 16 queueMax int Maximum Number of Data Queue Storage 17 map Map Data Display Map Table

[0095] Step 430: Generate an interface configuration interface based on the interface configuration strategy, so that the interface processing program can input processing parameters and output JSON format data processing results.

[0096] The interface configuration interface standardizes the input and output of the interface processing program. In one embodiment of the present invention, the interface configuration interface includes:

[0097] No. Name Data Type Description 1 ctrlId string Interface Display Control ID 2 name string Interface Display Control Name 3 type string Interface Display Control Type 4 ctrlProperty string Interface Display Property 5 paraID string Display Parameter ID 6 tabWgtItemType string Table Control Cell Control Type 7 row int Row Position of Table Control Cell 8 column int Column Position of Table Control Cell

[0098] like Figure 1 As shown, in one embodiment of the present invention, step 500 includes:

[0099] Step 510: Process the raw communication data through the instruction configuration interface to form instruction interaction data.

[0100] Command interaction data is stored in structured data format using JSON. This JSON format establishes a structured definition of communication commands and enables distributed data storage.

[0101] Step 520: Process the data packet through the parameter configuration interface to form instruction parameter data.

[0102] The parameter data is stored in structured data format using JSON. This JSON format is used to establish structured definitions and distributed data storage for command parameters.

[0103] Step 530: Process parameter data through the interface configuration interface to form the interface display data.

[0104] The interface displays data in JSON format, forming a structured data storage system. JSON format is used to establish structured definitions and distributed data storage between parameters and interface controls.

[0105] The bus communication data processing process formed by the JSON-based communication data processing method in the above embodiments mainly includes:

[0106] a) Load the instruction parsing configuration strategy file, parameter processing configuration strategy file, and interface display configuration strategy file for raw data when the software starts up, and establish the instruction configuration interface, parameter configuration interface, and interface configuration interface.

[0107] b) The software acquires raw communication data from a defined communication bus;

[0108] c) Based on the instruction configuration interface, the raw data is parsed to obtain the data packet corresponding to the bus identifier + instruction ID;

[0109] d) Based on the instruction configuration interface, the raw data is parsed to obtain the corresponding bus identifier + instruction ID instruction interaction function;

[0110] e) The data packet is parsed according to the parameter configuration interface to obtain the parameter data;

[0111] f) The parameter data is parsed and bound to the interface controls according to the interface configuration interface, and the parsed parameter data is updated to the software interface.

[0112] g) The parameter data is stored in JSON format and made available for use by various modules of the software.

[0113] An embodiment of the present invention provides a JSON-based communication data processing apparatus, comprising:

[0114] A memory for storing the program code of the processing procedure of the JSON-based communication data processing method in the above embodiments;

[0115] A processor is a program code used to execute the processing procedure of the JSON-based communication data processing method described in the above embodiments.

[0116] The processor can be a DSP (Digital Signal Processor), an FPGA (Field-Programmable Gate Array), an MCU (Microcontroller Unit) system board, a SoC (System on a Chip) system board, or a PLC (Programmable Logic Controller) minimum system including I / O.

[0117] An embodiment of the present invention provides a JSON-based communication data processing device, such as... Figure 5 As shown. In Figure 5 In this embodiment, the following are included:

[0118] The instruction configuration module 10 is used to map communication instructions, communication identifiers and data payloads to JSON types according to the communication protocol definition, forming an instruction parsing configuration strategy;

[0119] The parameter configuration module 20 is used to map the command parameters to JSON types based on the data encapsulation definition to form a parameter processing configuration strategy.

[0120] The display configuration module 30 is used to map the parameter data of the interface controls based on JSON according to the interactive interface definition, so as to form an interface display configuration strategy.

[0121] The interface construction module 40 is used to form corresponding instruction configuration interfaces, parameter configuration interfaces and interface configuration interfaces based on the instruction parsing configuration strategy, parameter processing configuration strategy and interface display configuration strategy.

[0122] The data processing module 50 is used to process the raw communication data of the communication bus by calling the instruction configuration interface, parameter configuration interface and interface configuration interface during the parsing process of communication data, and form structured data based on JSON.

[0123] like Figure 5 As shown, in one embodiment of the present invention, the instruction configuration module 10 includes:

[0124] Instruction specification definition unit 11 is used to define the bus association information of communication instructions in JSON format;

[0125] The instruction interaction definition unit 12 is used to define the handshake feedback information of the communication instruction in JSON format;

[0126] Command payload definition unit 13 is used to define the data payload information of communication commands in JSON format.

[0127] like Figure 5 As shown, in one embodiment of the present invention, the parameter configuration module 20 includes:

[0128] Parameter type definition unit 21 is used to define the instruction parameter type in the data payload in JSON format;

[0129] Parameter data definition unit 22 is used to define the data type of the parameter type in JSON format;

[0130] Parameter mapping definition unit 23 is used to define data parsing rules for parameter types in JSON format.

[0131] like Figure 5 As shown, in one embodiment of the present invention, the configuration module 30 includes:

[0132] Interface object definition unit 31 is used to define control objects in the interface in JSON format for the corresponding interactive interface;

[0133] Object mapping definition unit 32 is used to define the parameter types bound to control objects in the corresponding interface in JSON format.

[0134] like Figure 5 As shown, in one embodiment of the present invention, the interface construction module 40 includes:

[0135] The instruction interface definition unit 41 is used to form an instruction configuration interface according to the instruction configuration strategy, so that the instruction processor can input processing parameters and output JSON format data processing results.

[0136] The parameter interface definition unit 42 is used to form a parameter configuration interface according to the parameter configuration strategy, so that the parameter processing program can input the processing parameters and output the JSON format data processing results.

[0137] The interface definition unit 43 is used to form an interface configuration interface according to the interface configuration strategy, so that the interface processing program can input processing parameters and output JSON format data processing results.

[0138] like Figure 5 As shown, in one embodiment of the present invention, the data processing module 50 includes:

[0139] The instruction interface calling unit 51 is used to process the raw communication data through the instruction configuration interface to form instruction interaction data;

[0140] The parameter interface calling unit 52 is used to process data packets through the parameter configuration interface to form instruction parameter data;

[0141] The interface call unit 53 is used to process parameter data through the interface configuration interface to form interface display data.

[0142] The above description is merely a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A JSON-based communication data processing method, characterized by, The method comprises the following steps: According to the communication protocol definition, the communication instruction, the communication identifier and the data payload are type-mapped based on JSON to form an instruction analysis configuration strategy; According to the data encapsulation definition, the instruction parameters are type-mapped based on JSON to form a parameter processing configuration strategy; According to the interactive interface definition, the interface control is parameter data-mapped based on JSON to form an interface display configuration strategy; According to the instruction analysis configuration strategy, the parameter processing configuration strategy and the interface display configuration strategy, corresponding instruction configuration interfaces, parameter configuration interfaces and interface configuration interfaces are formed; In the analysis process of the communication data, the communication raw data of the communication bus is processed by calling the instruction configuration interfaces, the parameter configuration interfaces and the interface configuration interfaces, and the structure data is formed based on JSON. 2.The JSON-based communication data processing method of claim 1, wherein, The formation of the instruction analysis configuration strategy comprises the following steps: The bus association information of the communication instruction is defined in the JSON format; The handshake feedback information of the communication instruction is defined in the JSON format; The data payload information of the communication instruction is defined in the JSON format. 3.The JSON-based communication data processing method of claim 1, wherein, The formation of the parameter processing configuration strategy comprises the following steps: The instruction parameter type in the data payload is defined in the JSON format; The data type of the parameter type is defined in the JSON format; The data analysis rule of the parameter type is defined in the JSON format. 4.The JSON-based communication data processing method of claim 1, wherein, The formation of the interface display configuration strategy comprises the following steps: The control object in the interface is defined in the JSON format corresponding to the interactive interface; The bound parameter type is defined in the JSON format corresponding to the control object in the interface. 5.The JSON-based communication data processing method of claim 1, wherein, The formation of the corresponding instruction configuration interfaces, parameter configuration interfaces and interface configuration interfaces comprises the following steps: According to the instruction configuration strategy, the instruction configuration interfaces are formed, and the instruction processing program inputs the processing parameters and outputs the JSON format data processing results; According to the parameter configuration strategy, the parameter configuration interfaces are formed, and the parameter processing program inputs the processing parameters and outputs the JSON format data processing results; According to the interface configuration strategy, the interface configuration interfaces are formed, and the interface processing program inputs the processing parameters and outputs the JSON format data processing results. 6.The JSON-based communication data processing method of claim 1, wherein, The formation of the structure data based on JSON comprises the following steps: The communication raw data is processed by the instruction configuration interfaces to form the instruction interactive data; The data packet is processed by the parameter configuration interfaces to form the instruction parameter data; The parameter data is processed by the interface configuration interfaces to form the interface display data. 7.The JSON-based communication data processing method of claim 1, wherein, In the instruction analysis configuration strategy, the instruction unique mark is the bus mark + the instruction ID. 8.The JSON-based communication data processing method of claim 1, wherein, The formation of the structure data based on JSON comprises the instruction data, the parameter data and the control object data.

9. A JSON-based communication data processing apparatus, characterized by, The method comprises the following steps: The memory is used for storing the program code of the processing process of the JSON-based communication data processing method according to any one of claims 1 to 8; The processor is used for executing the program code.

10. A JSON-based communication data processing apparatus, characterized by, The method comprises the following steps: The instruction configuration module is used for type-mapping the communication instruction, the communication identifier and the data payload based on JSON according to the communication protocol definition to form an instruction analysis configuration strategy; The parameter configuration module is used for type-mapping the instruction parameters based on JSON according to the data encapsulation definition to form a parameter processing configuration strategy; The display configuration module is used for parameter data-mapping the interface control based on JSON according to the interactive interface definition to form an interface display configuration strategy; The interface building module is configured to parse the configuration strategy, process the configuration strategy, and display the configuration strategy according to instructions to form corresponding instruction configuration interfaces, parameter configuration interfaces, and interface configuration interfaces. The data processing module is configured to process communication raw data of the communication bus based on JSON to form structure data in the parsing process of the communication data by calling the instruction configuration interfaces, the parameter configuration interfaces, and the interface configuration interfaces.