A sensor middleware-based data transmission method and system

CN117014502BActive Publication Date: 2026-10-16CHONGQING CHANGAN TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310983379.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-08-04
Publication Date
2026-10-16
Estimated Expiration
2043-08-04

AI Technical Summary

Technical Problem

[0006]本申请提供了一种基于传感器中间件的数据传输方法及相关设备,以解决相关技术中还没有可以将中间件的基础逻辑代码与数据发布逻辑解耦以减小数据订阅端需求变化时软件中间件开发者的工作量的技术问题

Benefits of technology

[0031] (1) The embodiments of this application decouple the basic logic code of the middleware from the data publishing logic to reduce the workload of software middleware developers when the needs of the data subscription end change.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117014502B_ABST
    Figure CN117014502B_ABST
Patent Text Reader

Abstract

The application relates to the field of automobile technology, in particular to a data transmission method and system based on a sensor middleware, wherein the method comprises the following steps: receiving subscription information; extracting target data in a target sensor according to the subscription content; obtaining a target transmission data description file and a target data corresponding file according to the transmission protocol type; obtaining a code generation system, analyzing the target transmission data description file and the target data corresponding file based on the code generation system, obtaining a first symbol table and a second symbol table, and generating transmission code based on the first symbol table and the second symbol table; integrating the target data and the transmission code, obtaining target output data, and sending the target output data to a subscription end. The application can decouple the basic logic code of the middleware from the data publishing logic, and reduces the workload of software middleware developers when the demand of the data subscription end changes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of middleware technology, specifically to a data transmission method and system based on sensor middleware. Background Technology

[0002] Currently, the automotive industry is experiencing rapid growth, with an increasing number of intelligent and personalized functions. This increasing functional demands have generated a significant need for data services. The traditional approach of deeply binding data service programs to data application programs leads to bloated codebases, limits the speed and quantity of application service program development, and makes it difficult to guarantee software quality.

[0003] The demand for numerous functional services has driven the adoption of the publish-subscribe model. However, in real-world development, publish-subscribe service middleware often encounters changes in data transmission protocols during development, testing, and even mass production. Currently, after adopting DDS and PROTO transmission protocols, service middleware often needs to modify its own code logic to meet the changing needs of subscribers. In the future, with the addition of more transmission protocols or updates to existing protocols, the amount of modification will be even greater. In existing technologies, once subscriber requirements change or new subscribers are added with inconsistent requirements, the publishing middleware often needs to replace the original data protocol, modify the transmission code, recompile, re-debug, and re-integrate. Clearly, this increases the workload for software developers.

[0004] Therefore, there is a need for a software design pattern or software operating system to decouple the basic logic code of middleware (such as driving data reading and time synchronization) from the data publishing logic, so as to reduce the workload of software middleware developers due to changes in the requirements of data subscribers.

[0005] Therefore, existing technologies still need to be improved and enhanced. Summary of the Invention

[0006] This application provides a data transmission method and related equipment based on sensor middleware, in order to solve the technical problem that there is no way to decouple the basic logic code of the middleware from the data publishing logic in order to reduce the workload of software middleware developers when the needs of the data subscriber change.

[0007] To achieve the above objectives, this application adopts the following technical solution:

[0008] The first aspect of this application provides a data transmission method based on sensor middleware, comprising the following steps: receiving subscription information, the subscription information including subscription content and transmission protocol type; extracting local target data according to the subscription content; obtaining a target transmission data description file and a target data corresponding file according to the transmission protocol type; obtaining a code generation system, parsing the target output data description file and the target data corresponding file based on the code generation system to obtain a first symbol table and a second symbol table, and generating transmission code based on the first symbol table and the second symbol table; integrating the target data and the transmission code to obtain target output data and sending the target output data to the subscriber.

[0009] Based on the above technical means, the embodiments of this application can decouple the basic logic code of the middleware from the data publishing logic, so as to reduce the workload of software middleware developers when the needs of the data subscription end change.

[0010] Optionally, in one embodiment of this application, before obtaining the target transmission data description file and the target data corresponding file according to the transmission protocol type, the method further includes: generating multiple sets of transmission files based on multiple transmission protocol types, each transmission protocol type corresponding to a set of transmission files, wherein each set of transmission files includes a transmission data description file and a data corresponding file.

[0011] Based on the above technical means, the embodiments of this application can generate multiple sets of transmission files based on multiple transmission protocol types and put them into a dynamic library. Each transmission protocol type corresponds to a set of transmission files, which are linked into the program in specific situations to complete the adaptive subscription of any data.

[0012] Optionally, in one embodiment of this application, the code generation system includes a communication description file parsing class, a data correspondence file parsing class, a code generation class, and dependencies, wherein the dependencies include multiple transport protocol libraries and a middleware output slot representation table.

[0013] Based on the above technical means, the embodiments of this application can automatically generate the required transmission code through communication description file parsing class, data correspondence file parsing class, code generation class and dependencies, which reduces the work of subsequent software developers and brings convenience to software developers.

[0014] Optionally, in one embodiment of this application, the step of parsing the target transmission data description file and the target data correspondence file based on the code generation system to obtain a first symbol table and a second symbol table includes: parsing the target transmission data description file based on the communication description file parsing class to obtain the first symbol table; and parsing the target data correspondence file based on the data correspondence file parsing class to obtain the second symbol table.

[0015] Based on the above technical means, the embodiments of this application can automatically generate the first symbol table and the second symbol table through the communication description file parsing class and the data correspondence file parsing class, which reduces the work of subsequent software developers and brings convenience to software developers.

[0016] Optionally, in one embodiment of this application, generating transmission code based on the first symbol table and the second symbol table includes: loading the first symbol table and the second symbol table based on the code generation class, and generating programming language code according to the first symbol table and the second symbol table to obtain the transmission code.

[0017] Based on the above technical means, the embodiments of this application can automatically generate programming language code through code generation classes, making subsequent transmission more convenient and efficient.

[0018] Optionally, in one embodiment of this application, generating programming language code based on the first symbol table and the second symbol table includes: calling a first script to load the first symbol table and generating first programming language code, wherein the first programming language code is C / C++ code or *.H code; and calling a second script to load the second symbol table and generating second programming language code, wherein the second programming language code is C / C++ code.

[0019] Based on the above technical means, the embodiments of this application can automatically call the corresponding script to load the corresponding symbol table and generate programming language code, which facilitates subsequent transmission and integration work.

[0020] Optionally, in one embodiment of this application, the second symbol table is used to specify the correspondence between the data transmission subscription terminal input slot and the middleware service data output slot, and the input terminal of the second symbol table is the first symbol table.

[0021] Based on the above technical means, the embodiments of this application specify the correspondence between the data transmission subscription terminal input slot and the middleware service data output slot, which enhances the accuracy of data transmission and brings convenience to subsequent transmission.

[0022] A second aspect of this application provides a data transmission system based on sensor middleware, comprising:

[0023] A receiving module is used to receive subscription information, which includes subscription content and transmission protocol type;

[0024] The extraction module is used to extract local target data based on the subscribed content;

[0025] The data acquisition module is used to acquire the target data description file and the target data corresponding file according to the transmission protocol type.

[0026] The code generation module is used to acquire a code generation system, parse the target output data description file and the target data corresponding file based on the code generation system to obtain a first symbol table and a second symbol table, and generate transmission code based on the first symbol table and the second symbol table;

[0027] An integration module is used to integrate the target data and the transmission code to obtain target output data and send the target output data to the subscriber.

[0028] A third aspect of this application provides a terminal device, the terminal device including a memory, a processor, and a data transmission program based on sensor middleware stored in the memory and executable on the processor. When the processor executes the data transmission program based on sensor middleware, it implements the data transmission method based on sensor middleware as described above.

[0029] A fourth aspect of this application provides a computer-readable storage medium storing a data transmission program based on sensor middleware, which, when executed by a processor, implements the data transmission method based on sensor middleware as described above.

[0030] The beneficial effects of this application are:

[0031] (1) The embodiments of this application decouple the basic logic code of the middleware from the data publishing logic to reduce the workload of software middleware developers when the needs of the data subscription end change.

[0032] (2) Multiple sets of transmission files can be generated based on various transmission protocol types and placed in the dynamic library. Each transmission protocol type corresponds to a set of transmission files, which can be linked into the program in specific situations to complete the adaptive adaptation of any subscription data.

[0033] (3) The embodiments of this application can automatically generate the required transmission code, making subsequent transmission more convenient and effective, while reducing the work of subsequent software developers and bringing convenience to software developers.

[0034] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description

[0035] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein:

[0036] Figure 1 This is a flowchart illustrating a data transmission method based on sensor middleware according to an embodiment of this application;

[0037] Figure 2 This is an overall workflow diagram of a specific embodiment of this application;

[0038] Figure 3 Here is a code generation system architecture diagram of a specific embodiment of this application;

[0039] Figure 4 This is a schematic diagram of the structure of a data transmission system based on sensor middleware according to an embodiment of this application;

[0040] Figure 5 This is a block diagram illustrating the internal structure of a terminal device according to an embodiment of this application. Detailed Implementation

[0041] The embodiments of this application are described in detail below. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this application, and should not be construed as limiting this application.

[0042] The following describes a data transmission method based on sensor middleware according to embodiments of this application, with reference to the accompanying drawings. Addressing the issue mentioned in the background section that existing technologies lack the ability to decouple the basic logic code of middleware from the data publishing logic to reduce the workload of software middleware developers due to changes in data subscriber requirements, this embodiment provides a data transmission method based on sensor middleware. In this method, subscription information is received, including subscription content and a transmission protocol type. Target data is extracted from the target sensor according to the subscription content. Then, a target transmission data description file and a target data corresponding file are obtained according to the transmission protocol type. A code generation system is then used to parse the target output data description file and the target data corresponding file to obtain a first symbol table and a second symbol table. Transmission code is generated based on the first and second symbol tables. Finally, the target data and the transmission code are integrated to obtain target output data, which is then sent to the subscriber. This decouples the basic logic code of the middleware from the data publishing logic, reducing the workload of software middleware developers when data subscriber requirements change.

[0043] Specifically, Figure 1 This is a schematic diagram of a data transmission method based on sensor middleware provided in an embodiment of this application.

[0044] like Figure 1 As shown, the data transmission method based on sensor middleware includes the following steps:

[0045] In step S101, subscription information is received, which includes subscription content and transmission protocol type.

[0046] Specifically, the core of this embodiment lies in decoupling the basic logic of the middleware code from the data publishing logic. This decoupling allows the data publishing part to isolate data transmission. Therefore, upon receiving subscription information, it is necessary to obtain the subscription content and its corresponding transport protocol type based on the subscription information, so that the data publishing logic part can transmit data based on the transport protocol type.

[0047] In step S102, local target data is extracted based on the subscribed content.

[0048] Reference Figure 2 , Figure 2This is a flowchart of the overall middleware workflow. This embodiment uses the CAMERA abstract service middleware as an example. When subscription information is received, the content the subscriber wants to subscribe to is obtained. Then, the data obtained from the basic logic part of the camera middleware is classified to obtain the target data. During this process, regardless of the transmission protocol, the code of the basic logic part of the camera middleware does not need to be modified to complete the extraction of the target data. It is only necessary to send the data to the output module (i.e., the data publishing logic part) according to the specific interface of the decoupled output module during subsequent data transmission.

[0049] In step S103, the target transmission data description file and the target data corresponding file are obtained according to the transmission protocol type.

[0050] Before obtaining the target transmission data description file and the target data corresponding file according to the transmission protocol type, the following is also included:

[0051] Multiple sets of transmission files are generated based on various transmission protocol types. Each transmission protocol type corresponds to a set of transmission files. Each set of transmission files includes a transmission data description file and a data correspondence file.

[0052] Specifically, the decoupled data publishing portion is further abstracted to satisfy the adaptive function of existing data transmission protocols. For example, for existing DDS and PROTOBUFFER transmission protocols, for a specific intermediate layer (this embodiment uses the CAMERA abstract service middleware as an example), the data requirements of the subscriber can adapt to any subscription data while meeting the standard camera data abstraction. Furthermore, different data transmission protocols are abstracted and separated to generate dynamic libraries, which are then linked into the program in specific situations. That is, multiple sets of transmission files are generated based on various transmission protocol types and placed in the dynamic library. Each transmission protocol type corresponds to a set of transmission files, and each set of transmission files includes a transmission data description file and a data mapping file. Thus, when subscription information is received, the corresponding target transmission data description file and target data mapping file can be extracted from the dynamic library according to the transmission protocol type corresponding to the subscription information.

[0053] In step S104, a code generation system is obtained, and the target output data description file and the target data corresponding file are parsed based on the code generation system to obtain a first symbol table and a second symbol table, and a transmission code is generated based on the first symbol table and the second symbol table.

[0054] Specific reference Figure 3 , Figure 3This is an architecture diagram of the entire code generation system. It can be seen that the code generation system includes a communication description file parsing class, a data mapping file parsing class, a code generation class, and dependencies. The dependencies include multiple transport protocol libraries and a middleware output slot representation table.

[0055] from Figure 3 As can be seen, the code generation system has input and output sections. The input section includes a transmission data description file and a data mapping description file. In this embodiment, the target transmission data description file and the target data mapping file are obtained based on the transmission protocol type and then input into the code generation system. The code generation system parses the target transmission data description file and the target data mapping file to obtain a first symbol table and a second symbol table.

[0056] Based on the code generation system, the target transmission data description file and the target data corresponding file are parsed to obtain the first symbol table and the second symbol table, including:

[0057] The target transmission data description file is parsed using a communication description file parsing class to obtain the first symbol table;

[0058] The target data corresponding file is parsed based on the data correspondence file parsing class to obtain the second symbol table.

[0059] In this embodiment, the transmission data description file supports IDL, PROTO (i.e., DDS and PROTOBUFFER transmission protocols), etc. In the code generation system, the communication description file parsing class parses the corresponding target transmission data description file and generates a first symbol table for further processing by the system, while the data correspondence file parsing class parses the corresponding target data correspondence file and generates a second symbol table for further processing by the system.

[0060] Specifically, in this embodiment, the target data file is in JSON format, which specifies the correspondence between the input slot of the subscription client and the data output slot provided by the middleware service. For example, when the subscription client needs the lookahead data and timestamps from the CAMERA abstract middleware module, the target data file is a JSON file, which corresponds to:

[0061] {"time":"time_stamp","camera_data":[{"data":"front"}]}

[0062] Then, the data mapping file parsing class parses this JSON file into a second symbol table for further processing by the code generation system. The standard data output set of the target middleware is defined by the middleware service provider and published to subscribers. For example, in the CAMERA abstract service middleware, the basic logic code categorizes the target data acquired from the camera and sends it to the output module according to the specific interface of the decoupled output module. Theoretically, this basic logic code will be frozen after development and will not be affected by changes on the subscriber side.

[0063] After obtaining the first symbol table and the second symbol table, a transmission code is generated based on the first symbol table and the second symbol table.

[0064] The generation of transmission codes based on the first symbol table and the second symbol table includes:

[0065] The code generation class loads the first and second symbol tables, and generates programming language code based on the first and second symbol tables to obtain the transmission code.

[0066] Programming language code is generated based on the first symbol table and the second symbol table, including:

[0067] The first script is invoked to load the first symbol table and generate the first programming language code, which is either C / C++ code or *.H code.

[0068] The second script is invoked to load the second symbol table and generate second programming language code, which is C / C++ code.

[0069] The second symbol table is used to specify the correspondence between the input slots of the data transmission subscription end and the data output slots of the middleware service. The input end of the second symbol table is the first symbol table.

[0070] In other words, the code generation class in the final code generation system will load the second symbol table generated above and generate the specified transport module C++ / C code. At the same time, the code generation system will also call the script to generate the corresponding C / C++ and *.H code from the first symbol table corresponding to the IDL / PROTO file for use by the integrator.

[0071] In step S105, the target data and transmission code are integrated to obtain the target output data, and the target output data is sent to the subscriber.

[0072] Specifically, after obtaining the transmission code, the integrator places the generated transmission code and the target data extracted from the middleware logic code into a designated folder, and then compiles and integrates them or incorporates them into the integration script.

[0073] In summary, the embodiments of this application decouple the basic logic part of the middleware code from the data publishing logic part. The decoupled data publishing part can isolate data transmission. Specifically, in this embodiment, after receiving subscription information, the target data is extracted by the basic logic part of the middleware, then the data publishing logic part of the middleware calculates and generates transmission code, and finally the target data and the transmission code are integrated to obtain the target output data, which is then sent to the subscriber. This solves the problem of a large workload for middleware developers when the needs of the data subscriber change.

[0074] The data transmission method based on sensor middleware proposed in this application can acquire target vehicle data, which is the DDS service signal data of the target vehicle. Then, the target vehicle data is parsed based on a target service code file, where the target service code file contains the code that provides the information for parsing the DDS service signal data structure. Finally, the target data is analyzed to obtain a problem analysis report for the target vehicle. This method allows for easy data extraction and analysis of vehicles using DDS signals, solving the technical problem of not yet being able to parse vehicle-side DDS service signals in related technologies. It also facilitates the inspection and management of corresponding vehicles by development and testing personnel.

[0075] Next, with reference to the accompanying drawings, a data transmission system based on sensor middleware proposed according to an embodiment of this application is described.

[0076] like Figure 4 As shown, the data transmission system 10 based on sensor middleware includes: a receiving module 100, an extraction module 200, a data acquisition module 300, a code generation module 400, and an integration module 500.

[0077] Specifically, the receiving module 100 is used to receive subscription information, which includes subscription content and transmission protocol type;

[0078] Extraction module 200 is used to extract target data from the target sensor based on the subscribed content;

[0079] The data acquisition module 300 is used to acquire the target data description file and the target data corresponding file according to the transmission protocol type.

[0080] The code generation module 400 is used to acquire the code generation system, parse the target output data description file and the target data corresponding file based on the code generation system, obtain the first symbol table and the second symbol table, and generate the transmission code based on the first symbol table and the second symbol table;

[0081] Integration module 500 is used to integrate target data and transmission code to obtain target output data and send the target output data to the subscriber.

[0082] It should be noted that the foregoing explanation of the data transmission method embodiment based on sensor middleware also applies to the data transmission system based on sensor middleware in this embodiment, and will not be repeated here.

[0083] Figure 5 A schematic diagram of the structure of a terminal device provided in an embodiment of this application. The terminal device may include:

[0084] The memory 501, the processor 502, and the computer program stored on the memory 501 and capable of running on the processor 502.

[0085] When the processor 502 executes the program, it implements the data transmission method based on sensor middleware provided in the above embodiments.

[0086] Furthermore, the terminal equipment also includes:

[0087] Communication interface 503 is used for communication between memory 501 and processor 502.

[0088] The memory 501 is used to store computer programs that can run on the processor 502.

[0089] The memory 501 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk storage device.

[0090] If the memory 501, processor 502, and communication interface 503 are implemented independently, then the communication interface 503, memory 501, and processor 502 can be interconnected via a bus to complete communication between them. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 5 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0091] Optionally, in a specific implementation, if the memory 501, processor 502, and communication interface 503 are integrated on a single chip, then the memory 501, processor 502, and communication interface 503 can communicate with each other through an internal interface.

[0092] Processor 502 may be a central processing unit (CPU), an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of this application.

[0093] This embodiment also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described data transmission method based on sensor middleware.

[0094] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.

[0095] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, "N" means at least two, such as two, three, etc., unless otherwise explicitly specified.

[0096] Any process or method described in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or N executable instructions for implementing custom logic functions or processes, and the scope of the preferred embodiments of this application includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as should be understood by those skilled in the art to which embodiments of this application pertain.

[0097] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can read and execute instructions from or in conjunction with such an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by or in conjunction with an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). In addition, computer-readable media can even be paper or other suitable media on which programs can be printed, because programs can be obtained electronically by optically scanning paper or other media, followed by editing, interpreting or otherwise processing as necessary, and then stored in computer memory.

[0098] It should be understood that the various parts of this application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, the N steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. If implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.

[0099] Those skilled in the art will understand that all or part of the steps of the methods described in the above embodiments can be implemented by a program instructing related hardware, and the program can be stored in a computer-readable storage medium. When executed, the program includes one or a combination of the steps of the method embodiments.

[0100] Furthermore, the functional units in the various embodiments of this application can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.

[0101] The storage medium mentioned above can be a read-only memory, a disk, or an optical disk, etc. Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of this application.

Claims

1. A data transmission method based on sensor middleware, characterized in that, Includes the following steps: Receive subscription information, which includes subscription content and transmission protocol type; Extract local target data based on the subscribed content; According to the transmission protocol type, obtain the target transmission data description file and the target data corresponding file, wherein the target data corresponding file is a JSON file; A code generation system is obtained, and based on the code generation system, the target transmission data description file and the target data corresponding file are parsed to obtain a first symbol table and a second symbol table, and transmission code is generated based on the first symbol table and the second symbol table; The target data and the transmission code are integrated to obtain target output data, and the target output data is sent to the subscriber. The basic logic code of the middleware is frozen after development is completed and is not affected by changes in the subscriber. The second symbol table is used to specify the correspondence between the input slot of the data transmission subscription end and the data output slot of the middleware service, and the input end of the second symbol table is the first symbol table; Before obtaining the target transmission data description file and the target data corresponding file according to the transmission protocol type, the method further includes: Multiple sets of transmission files are generated based on various transmission protocol types. Different data transmission protocols are abstracted and separated to generate dynamic libraries. In the linking process, each transmission protocol type corresponds to a set of transmission files. Each set of transmission files includes a transmission data description file and a data correspondence file. The code generation system includes a communication description file parsing class, a data mapping file parsing class, a code generation class, and dependencies. The dependencies include multiple transmission protocol libraries and a middleware output slot description table. The process of parsing the target transmission data description file and the target data corresponding file based on the code generation system to obtain a first symbol table and a second symbol table includes: The target transmission data description file is parsed based on the communication description file parsing class to obtain the first symbol table; The target data correspondence file is parsed based on the data correspondence file parsing class to obtain the second symbol table; The generation of transmission codes based on the first symbol table and the second symbol table includes: The code generation class loads the first symbol table and the second symbol table, and generates programming language code based on the first symbol table and the second symbol table to obtain the transmission code.

2. The method as described in claim 1, characterized in that, The generation of programming language code based on the first symbol table and the second symbol table includes: The first script is invoked to load the first symbol table and generate code in a first programming language, wherein the first programming language code is C / C++ code or... .H code; The second script is invoked to load the second symbol table and generate second programming language code, which is C / C++ code.

3. A data transmission system based on sensor middleware, characterized in that, include: A receiving module is used to receive subscription information, which includes subscription content and transmission protocol type; The extraction module is used to extract local target data based on the subscribed content; The data acquisition module is used to acquire a target data description file and a target data corresponding file according to the transmission protocol type, wherein the target data corresponding file is a JSON file; The code generation module is used to acquire a code generation system, parse the target transmission data description file and the target data corresponding file based on the code generation system to obtain a first symbol table and a second symbol table, and generate transmission code based on the first symbol table and the second symbol table; An integration module is used to integrate the target data and the transmission code to obtain target output data and send the target output data to the subscriber. The basic logic code of the middleware is frozen after development is completed and is not affected by changes in the subscriber. The second symbol table is used to specify the correspondence between the input slot of the data transmission subscription end and the data output slot of the middleware service, and the input end of the second symbol table is the first symbol table; Before obtaining the target transmission data description file and the target data corresponding file according to the transmission protocol type, the method further includes: Multiple sets of transmission files are generated based on various transmission protocol types. Different data transmission protocols are abstracted and separated to generate dynamic libraries. In the linking process, each transmission protocol type corresponds to a set of transmission files. Each set of transmission files includes a transmission data description file and a data correspondence file. The code generation system includes a communication description file parsing class, a data mapping file parsing class, a code generation class, and dependencies. The dependencies include multiple transmission protocol libraries and a middleware output slot description table. The process of parsing the target transmission data description file and the target data corresponding file based on the code generation system to obtain a first symbol table and a second symbol table includes: The target transmission data description file is parsed based on the communication description file parsing class to obtain the first symbol table; The target data correspondence file is parsed based on the data correspondence file parsing class to obtain the second symbol table; The generation of transmission codes based on the first symbol table and the second symbol table includes: The code generation class loads the first symbol table and the second symbol table, and generates programming language code based on the first symbol table and the second symbol table to obtain the transmission code.

4. A terminal device, characterized in that, The terminal device includes a memory, a processor, and a sensor middleware-based data transmission program stored in the memory and executable on the processor. When the processor executes the sensor middleware-based data transmission program, it implements the steps of the sensor middleware-based data transmission method as described in any one of claims 1 and 2.

5. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a data transmission program based on sensor middleware, which, when executed by a processor, implements the steps of the data transmission method based on sensor middleware as described in any one of claims 1 and 2.

Citation Information

Patent Citations

  • Data transmission method and device, equipment and medium

    CN113938531A

  • Service communication method and system for modules in vehicle-mounted terminal and vehicle

    CN114564317A