Communication data generation method and device, electronic equipment and storage medium

By determining the data protocol based on the data type field value of the communication data and generating target data, the problem of communication security threats between M-core and A-core is solved, and the reliability and security of communication are improved.

CN119544813APending Publication Date: 2025-02-28BEIJING CO WHEELS TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311110605.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-30
Publication Date
2025-02-28

AI Technical Summary

Technical Problem

In the prior art, the communication method between the M core and the A core is easily eavesdropped and may face security threats such as data leakage and tampering.

Method used

By determining the value of the data type field in the communication data to be generated, determining the corresponding data protocol based on the value, and generating target data according to the data protocol, the reliability and fault tolerance of data transmission are improved and communication security and stability are guaranteed.

Benefits of technology

By dynamically determining the data protocol, the generation of target data suitable for different data types is improved, and the reliability and fault tolerance of data transmission are ensured, ensuring the security and stability of communication.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119544813A_ABST
    Figure CN119544813A_ABST
Patent Text Reader

Abstract

The invention discloses a communication data generation method and device, electronic equipment and a storage medium, and relates to the technical field of data processing, and the main technical scheme comprises the steps of determining a value of a data type field in to-be-generated communication data; wherein the data type field is a field at a fixed position in the communication data; determining a corresponding data protocol according to the value of the data type field, and generating target data in the communication data to be generated according to the data protocol; wherein values of different data type fields correspond to different data protocols, and target data generated by different data protocols are different. The corresponding data protocol is determined according to the value of the data type field of the target data signal, then the target data in the communication information is determined through the determined data protocol, the data protocols are different, and the target data are different, so that the reliability and fault-tolerant capability of data transmission are improved, the communication safety and stability are guaranteed, and the user experience is improved. And the communication reliability is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of data processing technology, and in particular to a method and device for generating communication data, an electronic device, and a storage medium. Background Art

[0002] With the steady development of centralized electronic and electrical architecture, the automotive industry has begun to pay more and more attention to service-oriented software architecture (Service Oriented Architecture). Many manufacturers often deploy two computing units, MPU and MCU, in the central domain controller. It is a combination of a real-time core and a high-performance core, such as A core and M core. A core and M core can transmit data and work together to achieve complex software function development.

[0003] At present, in order to realize the development of complex software functions, the M core and the A core can transmit and collaborate data through IPCF (Inter-Process Communication Framework). IPCF provides a communication protocol that enables the M core and the A core to transfer data to each other and work together to complete tasks; although IPCF provides a communication protocol to realize data transmission and collaboration between the M core and the A core, this communication method is easy to be eavesdropped and may face security threats such as data leakage and tampering. Summary of the invention

[0004] The present invention provides a method, device, electronic device and storage medium for generating communication data, which is mainly aimed at solving security threats such as data leakage and tampering.

[0005] According to a first aspect of the present disclosure, a method for generating communication data is provided, comprising:

[0006] Determine the value of a data type field in the communication data to be generated; wherein the data type field is a field at a fixed position in the communication data;

[0007] According to the value of the data type field, the corresponding data protocol is determined, and the target data in the communication data to be generated is generated according to the data protocol; wherein, the values ​​of different data type fields correspond to different data protocols, and the target data generated by different data protocols are different.

[0008] Optionally, when the value of the data type field is a control command, determining the corresponding data protocol according to the value of the data type field, and generating the target data in the communication data to be generated according to the data protocol includes:

[0009] Determining that the data protocol corresponding to the control command is that the target data only includes communication control instructions;

[0010] The target data is generated according to a communication control instruction, wherein the communication control instruction includes one of a start request or a stop request.

[0011] Optionally, when the value of the data type field is a heartbeat value, determining the corresponding data protocol according to the value of the data type field, and generating the target data in the communication data to be generated according to the data protocol includes:

[0012] Determine that the data protocol corresponding to the control command is that the target data only includes the heartbeat value;

[0013] The target data is generated according to the current heartbeat value.

[0014] Optionally, when the value of the data type field is data transmission, determining the corresponding data protocol according to the value of the data type field, and generating the target data in the communication data to be generated according to the data protocol includes:

[0015] Determine that the data protocol corresponding to the control command is a target data packet that only contains target parameters in the target data; wherein the target parameters include at least one of a data packet ID, quantity, number, length, and data value;

[0016] A table lookup is performed in a preset data table according to the target parameters, and the target data packet is generated according to the table lookup result; wherein the preset data table is a table configured in advance, including encapsulated data packets, and the data packets include at least one signal to be transmitted.

[0017] Optionally, when the value of the data type field is a data reception response, determining a corresponding data protocol according to the value of the data type field, and generating target data in the communication data to be generated according to the data protocol includes:

[0018] Determine that the control command determines that the data protocol includes only the confirmation result and the error cause in the target data;

[0019] If the confirmation result is that the data is normal, the generated target data only includes the confirmation result;

[0020] If the confirmation result is a data anomaly, the generated target data includes the confirmation result and an error type; wherein the error type includes at least one of a message ID error, a length error, and a checksum error.

[0021] Optionally, before performing a table lookup according to the target parameter and determining a corresponding target data packet according to the table lookup result to generate the target data, the method further includes:

[0022] The preset data table is generated according to at least one CAN matrix file, at least one LIN matrix file and ASW signal information.

[0023] According to a second aspect of the present disclosure, there is provided a device for generating communication data, comprising:

[0024] A first determining unit, configured to determine a value of a data type field in the communication data to be generated; wherein the data type field is a field at a fixed position in the communication data;

[0025] The second determination unit is used to determine the corresponding data protocol according to the value of the data type field, and generate the target data in the communication data to be generated according to the data protocol; wherein the values ​​of different data type fields correspond to different data protocols, and the target data generated by different data protocols are different.

[0026] Optionally, when the value of the data type field is a control command, the second determining unit includes:

[0027] A first determination module is used to determine that the data protocol corresponding to the control command is that the target data only contains communication control instructions;

[0028] The first generating module is used to generate the target data according to the current communication control instruction; wherein the communication control instruction includes one of a start request or a stop request.

[0029] Optionally, when the value of the data type field is a heartbeat value, the second determining unit includes:

[0030] The first determination module is further used to determine that the data protocol corresponding to the control command is that the target data only contains the heartbeat value;

[0031] The first generating module is further used to generate the target data according to the current heartbeat value.

[0032] Optionally, when the value of the data type field is data transmission, the second determining unit includes:

[0033] The first determination module is further used to determine that the data protocol corresponding to the control command is a target data packet that only contains target parameters corresponding to the target data; wherein the target parameters include at least one of a data packet ID, quantity, number, length, and data value;

[0034] The first generating module is further used to look up a preset data table according to the target parameters, and generate the target data according to the target data packet in the table lookup result; wherein the preset data table is a table configured in advance, containing encapsulated data packets, and the data packets contain at least one signal to be transmitted.

[0035] Optionally, when the value of the data type field is data reception response, the second determining unit includes:

[0036] The first determination module is further used to determine that the control command determines that the data protocol only includes the confirmation result and the error cause in the target data;

[0037] The first generating module is further configured to generate the target data including only the confirmation result when the confirmation result is that the data is normal;

[0038] The first generating module is further used to generate the target data including the confirmation result and the error type when the confirmation result is data abnormality; wherein the error type includes at least one of a message ID error, a length error, and a checksum error.

[0039] Optionally, the device further comprises:

[0040] The generating unit is used to generate the preset data table according to at least one CAN matrix file, at least one LIN matrix file and ASW signal information before the second determining unit performs a table lookup according to the target parameter and determines the corresponding target data packet to generate the target data according to the table lookup result.

[0041] According to a third aspect of the present disclosure, there is provided an electronic device, including:

[0042] at least one processor; and

[0043] a memory communicatively connected to the at least one processor; wherein,

[0044] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method described in the first aspect.

[0045] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute the method described in the first aspect.

[0046] According to a fifth aspect of the present disclosure, a computer program product is provided, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements the method as described in the first aspect above.

[0047] The present disclosure provides a method, device, electronic device and storage medium for generating communication data, and the main technical scheme includes: determining the value of a data type field in the communication data to be generated; wherein the data type field is a field at a fixed position in the communication data; determining the corresponding data protocol according to the value of the data type field, and generating target data in the communication data to be generated according to the data protocol; wherein the values ​​of different data type fields correspond to different data protocols, and the target data generated by different data protocols are different. Compared with the related art, the embodiment of the present application determines the corresponding data protocol according to the value of the data type field of the target data signal, and then determines the target data in the communication information through the determined data protocol. Due to the different data protocols, the target data is also different, thereby improving the reliability and fault tolerance of data transmission, ensuring the security and stability of communication, and ensuring the reliability of communication.

[0048] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present application, nor is it intended to limit the scope of the present application. Other features of the present application will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.

[0050] Figure 1 A flow chart of a method for generating communication data provided by an embodiment of the present disclosure;

[0051] Figure 2 A schematic diagram of the structure of a communication data generating device provided in an embodiment of the present disclosure;

[0052] Figure 3 A schematic diagram of the structure of a communication data generating device provided in an embodiment of the present disclosure;

[0053] Figure 4 A schematic block diagram of an exemplary electronic device provided for an embodiment of the present disclosure. DETAILED DESCRIPTION

[0054] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

[0055] The following describes a method, an apparatus, an electronic device, and a storage medium for generating communication data according to an embodiment of the present disclosure with reference to the accompanying drawings.

[0056] Figure 1 A flow chart of a method for generating communication data provided by an embodiment of the present disclosure.

[0057] like Figure 1 As shown, the method comprises the following steps:

[0058] Step 101, determine the value of a data type field in the communication data to be generated; wherein the data type field is a field at a fixed position in the communication data.

[0059] In one implementable method of an embodiment of the present application, the communication data is the communication data between the A core and the M core, and the communication data includes two fields, HRAD and DATA. The value of the data type field of the target data signal is read in the HRAD field; a specific identifier or field can be used in the HRAD field to identify the value of the data type field of the target data signal, and the identifier can be pre-defined; specifically, the embodiment of the present application does not limit this.

[0060] The value of the data type field may include the format, structure, character length, byte order, data content, etc. of the data. The embodiment of the present application does not limit the value of the data type field.

[0061] Step 102, determine the corresponding data protocol according to the value of the data type field, and generate the target data in the communication data to be generated according to the data protocol; wherein, the values ​​of different data type fields correspond to different data protocols, and different data protocols generate different target data.

[0062] The values ​​of different data type fields usually correspond to different data protocols, because the values ​​of different data type fields may have different characteristics and requirements. The data protocol defines the structure, format, encoding method, transmission method and other rules of the data to ensure the correct parsing and processing of the data.

[0063] In one possible implementation of the present application, for the values ​​of some specific data type fields, a custom data protocol may be required; the custom protocol can define the structure and format of the data according to the characteristics and requirements of the data. For example, for sensor data, a custom sensor data protocol can be defined, including sensor type, data format, sampling rate, etc. Through the custom protocol, the requirements for the values ​​of specific data type fields can be met.

[0064] Generating target data in the communication data according to the data protocol can be performed according to the format and rules specified in the protocol. According to the requirements of the protocol, the data can be encoded, compressed, encrypted, etc. to generate target data that meets the requirements of the protocol.

[0065] By selecting the appropriate data protocol based on the value of the data type field and generating the target data in accordance with the protocol, you can ensure that the data is correctly parsed and processed during the communication process. This helps improve the reliability and efficiency of communication and ensures data consistency and interoperability.

[0066] The method for generating communication data provided by the present disclosure mainly includes the following technical solutions: determining the value of a data type field in the communication data to be generated; wherein the data type field is a field at a fixed position in the communication data; determining the corresponding data protocol according to the value of the data type field, and generating target data in the communication data to be generated according to the data protocol; wherein the values ​​of different data type fields correspond to different data protocols, and the target data generated by different data protocols are different. Compared with the related art, the embodiment of the present application determines the corresponding data protocol according to the value of the data type field of the target data signal, and then determines the target data in the communication information according to the determined data protocol. Due to the different data protocols, the target data is also different, thereby improving the reliability and fault tolerance of data transmission, ensuring the security and stability of communication, and ensuring the reliability of communication.

[0067] In one possible implementation of the embodiment of the present application, the value of the data type field includes: control command, heartbeat value, data transmission, data reception response; when the value of the data type field is a control command, the implementation process of step 102 can refer to the following steps:

[0068] Determining that the data protocol corresponding to the control command is that the target data only includes communication control instructions;

[0069] The target data is generated according to the current communication control instruction; wherein the communication control instruction includes a start request or a stop request.

[0070] In one implementation of an embodiment of the present application, following the description of the above-mentioned embodiment of the application, the communication data includes two fields, HRAD and DATA, wherein the DATA field is the target data, and it is determined that the DATA field only includes communication control instructions; generating the target data according to the current communication control instruction means generating target data that meets the protocol requirements according to the current communication control instruction type; for example, if the communication control instruction is a start request, then the generated target data can be a specific control instruction code for indicating the start request; if the communication control instruction is a stop request, then the generated target data can be another specific control instruction code for indicating a stop request; such as: a start request for data transmission from the M core to the A core, or a stop request for output transmission from the M core to the A core. Specifically, the embodiment of the present application does not limit this.

[0071] In an implementable manner of the embodiment of the present application, when the value of the data type field is a heartbeat value, step 102 includes:

[0072] Determine that the data protocol corresponding to the control command is that the target data only includes the heartbeat value;

[0073] The target data is generated according to the current heartbeat value.

[0074] Heartbeat values ​​are usually used to indicate the operating status of a communication system or device, as well as to maintain connection status with other systems. When determining the corresponding data protocol, the DATA field in the target data can be limited to contain only the heartbeat value to ensure the correct transmission and processing of the control command; the process of generating target data can be carried out according to the format and rules specified by the protocol, such as: according to the type and requirements of the heartbeat value, the corresponding numerical value or code can be inserted into a specific position in the target data to generate target data that meets the protocol requirements; in an implementable manner of an embodiment of the present application, if the current heartbeat value indicates that the connection is normal, the generated target data can be a specific numerical value or code used to indicate the normal connection status; if the current heartbeat value indicates that the connection is abnormal, the generated target data can be another specific numerical value or code used to indicate the abnormal connection status; specifically, the embodiment of the present application does not limit this.

[0075] In an implementation manner of the embodiment of the present application, when the value of the data type field is data transmission, step 102 can be implemented according to the following steps, including:

[0076] Determine that the data protocol corresponding to the control command is a target data packet that only contains target parameters in the target data; wherein the target parameters include at least one of a data packet ID, quantity, number, length, and data value;

[0077] A table lookup is performed in a preset data table according to the target parameters, and the target data packet is generated according to the table lookup result; wherein the preset data table is a table configured in advance, including encapsulated data packets, and the data packets include at least one signal to be transmitted.

[0078] In one implementable manner of an embodiment of the present application, the preset data table is pre-configured, and the preset data table is generated based on at least one CAN matrix file, at least one LIN matrix file and ASW signal information; wherein the CAN matrix file contains a set of CAN matrix files that need to be used, the LIN matrix file contains a set of all LIN matrix files that need to be used, and the ASW signal information is user-defined signal information. Specifically, the embodiment of the present application does not limit this.

[0079] For CAN matrix files and LIN matrix files, node definitions, message definitions, and signal definitions can be parsed. The node name and address information can be extracted from the node definition, the message ID, cycle, and sender / receiver node information can be extracted from the message definition, and the signal name, start bit, length, data type field value, and unit can be extracted from the signal definition.

[0080] Please refer to Table 1, which is a preset data table provided in an embodiment of the present application;

[0081] TopicName TopicID SigName SigID SigLen Direction TopicName1 0x0001 SignalName1 0 1 R TopicName1 0x0001 SignalName2 1 8 R TopicName1 0x0001 SignalName3 2 1 R TopicName2 0x0002 SignalName4 0 1 W TopicName2 0x0002 SignalName5 1 8 W TopicName2 0x0002 SignalName6 2 1 W

[0082] Table 1

[0083] Among them: TopicName: For CANLIN signals, you can use the MsgName of the CANLIN matrix, and for ASW signals, you can use the TopicName corresponding to ASWInterface.xlsx.

[0084] TopicId: For CANLIN signals, the MsgId of the CANLIN matrix can be used. For ASW signals, the TopicId can be automatically generated by sorting the Topics in the ASWInterface table.

[0085] SigName: For CANLIN signals, it can be generated according to the signal name of the CANLIN matrix. For ASW signals, SigName can be consistent with SigName in the ASWInterface table.

[0086] SigId: For CANLIN signals, it can be generated according to the signal sorting of the CANLIN matrix. For ASW signals, SigId can be automatically generated by sorting the signals in the ASWInterface table.

[0087] SigLen: For CANLIN signals, it can be generated according to the length of the signal in the CANLIN matrix. For ASW signals, the length can be generated by the value of the data type field of the signal in the ASWInterface table.

[0088] Direction: The CANLIN signal can be generated according to the direction of the signal in the CANLIN matrix. The direction of the ASW signal can be consistent with the direction of the signal in the ASWInterface table.

[0089] Looking up a preset data table according to the target parameter and generating the target data according to the target data packet in the table lookup result means looking up a table according to the preset data table and the value of the target parameter to find the corresponding target data packet, and generating target data that meets the protocol requirements according to the target data packet.

[0090] The preset data table may contain target data packets corresponding to various target parameters. According to the value of the target parameter, a table lookup operation is performed in the preset data table to find the corresponding target data packet. Then, according to the provisions of the target data packet, target data that meets the protocol requirements is generated.

[0091] In one implementable manner of the embodiment of the present application, a table is looked up according to the target parameters to determine the data to be transmitted, and the data to be transmitted is transmitted.

[0092] In an implementable manner of the embodiment of the present application, when the value of the data type field is data reception response, step 102 includes:

[0093] Determine that the control command determines that the data protocol includes only the confirmation result and the error cause in the target data;

[0094] If the confirmation result is that the data is normal, the generated target data only includes the confirmation result;

[0095] If the confirmation result is a data anomaly, the generated target data includes the confirmation result and an error type; wherein the error type includes at least one of a message ID error, a length error, and a checksum error.

[0096] In one implementable method of the embodiment of the present application, after core A and core M complete a communication, core M must return a response to the last communication. For example, after core A sends a control command to core M, core M must respond to the control command sent by core A to core M; after core A sends a heartbeat value to core M, core M must respond to the heartbeat value sent by core A to core M. Specifically, the embodiment of the present application does not limit this.

[0097] In one implementable manner of the embodiment of the present application, the response of the M core includes a judgment result of whether the data is normal. The data referred to here is the data sent by the A core to the M core, such as: this response is a response to the control command sent by the A core to the M core, then whether the data is normal here refers to whether the control command is normal; in an implementable manner of the embodiment of the present application, in the case of abnormal data, the target data may also include specific error causes, such as message ID error, message length error, inconsistent message CRC verification, etc.

[0098] In one possible implementation method of the embodiment of the present application, a message ID error refers to the presence of an incorrect message identifier in the target data, which may be caused by an error or incorrect configuration during the transmission process; a length error indicates that the length of the target data does not match the expected length, which may be caused by data truncation, loss or incompleteness; a checksum error indicates that the checksum and verification of the target data during the transmission process fails, which may be caused by errors, interference or noise in data transmission.

[0099] Corresponding to the above communication data generation method, the present invention also provides a communication data generation device. Since the device embodiment of the present invention corresponds to the above method embodiment, the details not disclosed in the device embodiment can be referred to the above method embodiment, and will not be repeated in the present invention.

[0100] Figure 2 A schematic diagram of a communication data generating device provided by an embodiment of the present disclosure is shown in FIG. Figure 2 As shown, including:

[0101] A first determining unit 21 is used to determine a value of a data type field in the communication data to be generated; wherein the data type field is a field at a fixed position in the communication data;

[0102] The second determination unit 22 is used to determine the corresponding data protocol according to the value of the data type field, and generate the target data in the communication data to be generated according to the data protocol; wherein the values ​​of different data type fields correspond to different data protocols, and the target data generated by different data protocols are different.

[0103] The communication data generation device provided by the present disclosure has a main technical solution including: determining the value of a data type field in the communication data to be generated; wherein the data type field is a field at a fixed position in the communication data; determining the corresponding data protocol according to the value of the data type field, and generating target data in the communication data to be generated according to the data protocol; wherein the values ​​of different data type fields correspond to different data protocols, and the target data generated by different data protocols are different. Compared with the related art, the embodiment of the present application determines the corresponding data protocol according to the value of the data type field of the target data signal, and then determines the target data in the communication information through the determined data protocol. Due to the different data protocols, the target data is also different, thereby improving the reliability and fault tolerance of data transmission, ensuring the security and stability of communication, and ensuring the reliability of communication.

[0104] Furthermore, in a possible implementation of this embodiment, as Figure 3 As shown, when the value of the data type field is a control command, the second determining unit 22 includes:

[0105] A first determination module 221, used to determine that the data protocol corresponding to the control command is that the target data only contains communication control instructions;

[0106] The first generating module 222 is used to generate the target data according to the current communication control instruction; wherein the communication control instruction includes one of a start request or a stop request.

[0107] Further, in a possible implementation of this embodiment, when the value of the data type field is a heartbeat value, the second determining unit 22 includes:

[0108] The first determination module 221 is further used to determine that the data protocol corresponding to the control command is that the target data only contains the heartbeat value;

[0109] The first generating module 222 is further configured to generate the target data according to the current heartbeat value.

[0110] Further, in a possible implementation manner of this embodiment, when the value of the data type field is data transmission, the second determining unit 22 includes:

[0111] The first determination module 221 is further used to determine that the data protocol corresponding to the control command is a target data packet that only contains target parameters corresponding to the target data; wherein the target parameters include at least one of a data packet ID, quantity, number, length, and data value;

[0112] The first generating module 222 is further used to look up a preset data table according to the target parameters, and generate the target data according to the target data packet in the lookup result; wherein the preset data table is a pre-configured table, containing encapsulated data packets, and the data packets contain at least one signal to be transmitted.

[0113] Further, in a possible implementation manner of this embodiment, when the value of the data type field is data reception response, the second determining unit 22 includes:

[0114] The first determination module 221 is further used to determine that the control command determines that the data protocol only includes the confirmation result and the error cause in the target data;

[0115] The first generating module 222 is further configured to generate the target data including only the confirmation result when the confirmation result is that the data is normal;

[0116] The first generating module 222 is further used to generate the target data including the confirmation result and the error type when the confirmation result is data abnormality; wherein the error type includes at least one of a message ID error, a length error, and a check error.

[0117] Furthermore, in a possible implementation of this embodiment, as Figure 3 As shown, the device also includes:

[0118] The generating unit 23 is used to generate the preset data table according to at least one CAN matrix file, at least one LIN matrix file and ASW signal information before the second determining unit 22 performs a table lookup according to the target parameter and determines the corresponding target data packet to generate the target data according to the table lookup result.

[0119] It should be noted that the above explanation of the method embodiment is also applicable to the device of this embodiment, and the principle is the same, which is not limited in this embodiment.

[0120] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.

[0121] Figure 4 A schematic block diagram of an example electronic device 300 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.

[0122] like Figure 4 As shown, the device 300 includes a computing unit 301, which can perform various appropriate actions and processes according to a computer program stored in a ROM (Read-Only Memory) 302 or a computer program loaded from a storage unit 308 to a RAM (Random Access Memory) 303. In the RAM 303, various programs and data required for the operation of the device 300 can also be stored. The computing unit 301, the ROM 302, and the RAM 303 are connected to each other via a bus 304. An I / O (Input / Output) interface 305 is also connected to the bus 304.

[0123] A number of components in the device 300 are connected to the I / O interface 305, including: an input unit 306, such as a keyboard, a mouse, etc.; an output unit 307, such as various types of displays, speakers, etc.; a storage unit 308, such as a disk, an optical disk, etc.; and a communication unit 309, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 309 allows the device 300 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0124] The computing unit 301 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 301 include, but are not limited to, a CPU (Central Processing Unit), a GPU (Graphic Processing Units), various dedicated AI (Artificial Intelligence) computing chips, various computing units running machine learning model algorithms, a DSP (Digital Signal Processor), and any appropriate processor, controller, microcontroller, etc. The computing unit 301 performs the various methods and processes described above, such as a method for generating communication data. For example, in some embodiments, the method for generating communication data may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 308. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 300 via the ROM 302 and / or the communication unit 309. When the computer program is loaded into the RAM 303 and executed by the computing unit 301, one or more steps of the method described above may be performed. Alternatively, in other embodiments, the computing unit 301 may be configured to execute the aforementioned communication data generation method in any other appropriate manner (for example, by means of firmware).

[0125] Various embodiments of the systems and techniques described above herein may be implemented in digital electronic circuit systems, integrated circuit systems, FPGAs (Field Programmable Gate Arrays), ASICs (Application-Specific Integrated Circuits), ASSPs (Application Specific Standard Products), SOCs (System On Chips), CPLDs (Complex Programmable Logic Devices), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include: being implemented in one or more computer programs that may be executed and / or interpreted on a programmable system including at least one programmable processor that may be a dedicated or general-purpose programmable processor that may receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0126] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0127] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any suitable combination of the foregoing. More specific examples of machine-readable storage media may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a RAM, a ROM, an EPROM (Electrically Programmable Read-Only-Memory) or a flash memory, an optical fiber, a CD-ROM (Compact Dis sc Read-Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0128] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (Cathode-Ray Tube) or LCD (Liquid Crystal Display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball), through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0129] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: LAN (Local Area Network), WAN (Wide Area Network), the Internet, and blockchain networks.

[0130] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship between the client and the server is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services ("Virtual Private Server", or "VPS" for short). The server may also be a server of a distributed system, or a server combined with a blockchain.

[0131] It should be noted that artificial intelligence is a discipline that studies how computers can simulate certain human thought processes and intelligent behaviors (such as learning, reasoning, thinking, planning, etc.), and includes both hardware-level and software-level technologies. Artificial intelligence hardware technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, and big data processing; artificial intelligence software technologies mainly include computer vision technology, speech recognition technology, natural language processing technology, as well as machine learning / deep learning, big data processing technology, knowledge graph technology, and other major directions.

[0132] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.

[0133] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.

Claims

1. A method for generating communication data, characterized in that: include: Determine the value of a data type field in the communication data to be generated; wherein the data type field is a field at a fixed position in the communication data; According to the value of the data type field, the corresponding data protocol is determined, and the target data in the communication data to be generated is generated according to the data protocol; wherein, the values ​​of different data type fields correspond to different data protocols, and the target data generated by different data protocols are different.

2. According to claim 1, it is characterized in that When the value of the data type field is a control command, determining the corresponding data protocol according to the value of the data type field, and generating the target data in the communication data to be generated according to the data protocol includes: Determining that the data protocol corresponding to the control command is that the target data only includes communication control instructions; The target data is generated according to a communication control instruction, wherein the communication control instruction includes one of a start request or a stop request.

3. The method according to claim 1, characterized in that When the value of the data type field is a heartbeat value, determining the corresponding data protocol according to the value of the data type field, and generating the target data in the communication data to be generated according to the data protocol includes: Determine that the data protocol corresponding to the control command is that the target data only includes the heartbeat value; The target data is generated according to the current heartbeat value.

4. The method according to claim 1, characterized in that: When the value of the data type field is data transmission, determining the corresponding data protocol according to the value of the data type field, and generating the target data in the communication data to be generated according to the data protocol includes: Determine that the data protocol corresponding to the control command is a target data packet that only contains target parameters in the target data; wherein the target parameters include at least one of a data packet ID, quantity, number, length, and data value; A table lookup is performed in a preset data table according to the target parameters, and the target data packet is generated according to the table lookup result; wherein the preset data table is a table configured in advance, including encapsulated data packets, and the data packets include at least one signal to be transmitted.

5. The method according to claim 1, characterized in that When the value of the data type field is a data reception response, determining the corresponding data protocol according to the value of the data type field, and generating the target data in the communication data to be generated according to the data protocol includes: Determine that the control command determines that the data protocol includes only the confirmation result and the error cause in the target data; If the confirmation result is that the data is normal, the generated target data only includes the confirmation result; If the confirmation result is a data anomaly, the generated target data includes the confirmation result and an error type; wherein the error type includes at least one of a message ID error, a length error, and a checksum error.

6. The method according to claim 4, characterized in that Before performing a table lookup according to the target parameter and determining the corresponding target data packet according to the table lookup result to generate the target data, the method further includes: The preset data table is generated according to at least one CAN matrix file, at least one LIN matrix file and ASW signal information.

7. A communication data generating device, characterized in that: include: A first determining unit, configured to determine a value of a data type field in the communication data to be generated; wherein the data type field is a field at a fixed position in the communication data; The second determination unit is used to determine the corresponding data protocol according to the value of the data type field, and generate the target data in the communication data to be generated according to the data protocol; wherein the values ​​of different data type fields correspond to different data protocols, and the target data generated by different data protocols are different.

8. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 6.

9. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-6.

10. A computer program product, characterized in that The invention comprises a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 6.