Vehicle-mounted communication protocol stack development method, storage medium and program product
By acquiring developer intent, utilizing knowledge bases and large language models to automatically retrieve feedback information, and performing security filtering, the problem of low development efficiency in vehicle communication protocol stacks has been solved, achieving an efficient and secure development process.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- VOYAH AUTOMOBILE TECH CO LTD
- Filing Date
- 2026-01-16
- Publication Date
- 2026-06-02
AI Technical Summary
During the development of the vehicle communication protocol stack, developers need to read a large amount of documentation and code, which leads to low efficiency.
By acquiring developer intent, utilizing knowledge bases and large language models to automatically retrieve feedback information, and performing security filtering, we provide accurate protocol principles, interface call examples, and debugging suggestions, build a domain-specific knowledge base, and achieve local deployment and multi-level security filtering.
It improves the development efficiency of vehicle communication protocol stacks, ensures information security, meets automotive-grade security requirements, and reduces development costs and technical barriers.
Smart Images

Figure CN122132008A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of software development technology, and in particular to a method for developing an in-vehicle communication protocol stack, a storage medium, and a program product. Background Technology
[0002] Vehicle communication protocol stack development is a process of designing, implementing, testing, and porting a dedicated protocol stack for automotive electronic systems. Its core objective is to support stable, real-time, and secure communication between various electronic control units (ECUs), vehicle terminals, and external devices within the vehicle.
[0003] Currently, the development of vehicle communication protocol stacks requires developers to first read a large amount of documentation and code before designing and testing the vehicle communication protocol stack, which is inefficient. Summary of the Invention
[0004] This application provides a method for developing an in-vehicle communication protocol stack, a storage medium, and a program product to improve the development efficiency of in-vehicle communication protocol stacks.
[0005] In a first aspect, embodiments of this application provide a method for developing an in-vehicle communication protocol stack, including:
[0006] Obtain the developer's development intent regarding the vehicle communication protocol stack;
[0007] Based on the development intent, knowledge fragments corresponding to the development intent are searched in the knowledge base, which contains knowledge related to vehicle communication protocols.
[0008] Based on the development intent and knowledge fragments, and using the locally deployed large language model, the first feedback information corresponding to the development intent is obtained. The first feedback information includes at least one of the following: a description of the protocol principle of the vehicle communication protocol, an interface call example, and debugging suggestions.
[0009] The first feedback information is security filtered to obtain the second feedback information corresponding to the development intent. The second feedback information is used to guide the development of the vehicle communication protocol stack. The security filtering is used to filter out unauthorized source code segments or sensitive information in the first feedback information.
[0010] In one possible implementation, based on the development intent and knowledge fragments, and using a locally deployed large language model, the first feedback information corresponding to the development intent is obtained, including:
[0011] Generate contextual information based on development intent and knowledge fragments;
[0012] The context information is input into the large language model to obtain the first feedback information corresponding to the development intent.
[0013] In one possible implementation, based on the development intent, knowledge fragments corresponding to the development intent are searched in the knowledge base, including:
[0014] The development intent is semantically understood and vectorized to obtain the semantic vector corresponding to the development intent.
[0015] Based on semantic vectors, knowledge fragments corresponding to the development intent are obtained by searching the knowledge base.
[0016] In one possible implementation, the first feedback information is security-filtered to obtain second feedback information corresponding to the development intent, including:
[0017] The first feedback information is subjected to multi-level security filtering to obtain the second feedback information corresponding to the development intent. The multi-level security filtering includes keyword blocking, semantic detection, and compliance verification.
[0018] In one possible implementation, based on the development intent, searching the knowledge base to obtain the knowledge fragment corresponding to the development intent further includes:
[0019] Retrieve the query type corresponding to the development intent. The query type includes protocol principles, interface usage instructions, and debugging scenario information.
[0020] Based on the development intent and query type, search the knowledge base to obtain the knowledge fragments corresponding to the development intent.
[0021] In one possible implementation, the knowledge base is constructed in the following way:
[0022] The protocol manual, application programming interface documentation, and sample code are segmented and structured to obtain preprocessed data;
[0023] The preprocessed data is vectorized using an embedding model and stored in a vector database to build a knowledge base.
[0024] In one possible implementation, the knowledge base is deployed on a user's private server and / or private cloud environment, achieving fully localized operation through containerization or microservices.
[0025] In one possible implementation, it also includes:
[0026] Obtain evaluation information based on the feedback;
[0027] Optimize the knowledge base based on development intent, feedback, and evaluation information.
[0028] Secondly, embodiments of this application provide a vehicle-mounted communication protocol stack development apparatus, comprising:
[0029] The first acquisition module is used to acquire the developer's development intent for the vehicle communication protocol stack;
[0030] The search module is used to search the knowledge base for knowledge fragments corresponding to the development intent based on the development intent. The knowledge base contains knowledge related to vehicle communication protocols.
[0031] The second acquisition module is used to obtain the first feedback information corresponding to the development intent based on the development intent and knowledge fragments and the large language model deployed locally. The first feedback information includes at least one of the following: a description of the protocol principle of the vehicle communication protocol, an interface call example, and debugging suggestions.
[0032] The security filtering module is used to perform security filtering on the first feedback information to obtain the second feedback information corresponding to the development intent. The second feedback information is used to guide the development of the vehicle communication protocol stack. The security filtering is used to filter out unauthorized source code segments or sensitive information in the first feedback information.
[0033] Thirdly, embodiments of this application provide a vehicle-mounted communication protocol stack development device, including: a memory and a processor;
[0034] The memory stores the instructions that the computer executes;
[0035] The processor executes computer execution instructions stored in memory, causing the processor to perform the methods described in the various possible implementations of the first aspect above.
[0036] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed, are used to implement the methods described in the various possible implementations of the first aspect above.
[0037] Fifthly, embodiments of this application provide a computer program product, including a computer program that, when executed, implements the methods described in the various possible implementations of the first aspect above.
[0038] The vehicle communication protocol stack development method, storage medium, and program product provided in this application embodiment obtain the developer's development intent for the vehicle communication protocol stack; based on the development intent, search in a knowledge base to obtain knowledge fragments corresponding to the development intent, the knowledge base containing knowledge related to the vehicle communication protocol; based on the development intent and knowledge fragments, obtain first feedback information corresponding to the development intent based on a locally deployed large language model, the first feedback information includes at least one of the following: a protocol principle description of the vehicle communication protocol, an interface call example, and debugging suggestions; perform security filtering on the first feedback information to obtain second feedback information corresponding to the development intent, the second feedback information is used to guide the development of the vehicle communication protocol stack, and the security filtering is used to filter out unauthorized source code segments or sensitive information in the first feedback information, thereby realizing automated search and acquisition of feedback information corresponding to the development intent, helping to improve the development efficiency of the vehicle communication protocol stack, and by filtering out unauthorized source code segments or sensitive information in the first feedback information, the data security of the knowledge base is ensured while improving the development efficiency of the vehicle communication protocol stack. Attached Figure Description
[0039] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0040] Figure 1 This is a schematic diagram of the development method for the vehicle communication protocol stack provided in an embodiment of this application;
[0041] Figure 2 A schematic diagram of the structure of the vehicle communication protocol stack development device provided in the embodiments of this application;
[0042] Figure 3 A schematic diagram of the structure of the vehicle communication protocol stack development device provided in the embodiments of this application.
[0043] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0044] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0045] Developing in-vehicle communication protocol stacks is a core supporting component of modern automotive electronic systems. Scalable service-oriented middleware over IP (SOME / IP) and diagnostic communication protocols over IP (DoIP) are AUTOSAR-standardized in-vehicle Ethernet protocols, commonly used for communication between vehicle ECUs and remote diagnostics. However, these protocols are complex, requiring developers to read extensive documentation and code to master them. Statistics show that 85% of in-vehicle developers need to consult over 200 pages of documentation when integrating the SOME / IP protocol, with an average problem-solving time of 4.7 hours, indicating low efficiency in in-vehicle communication protocol stack development.
[0046] The vehicle communication protocol stack development method provided in this application obtains the user's development intent, utilizes retrieval enhancement and Large Language Model (LLM) technology to automatically retrieve feedback information corresponding to the development intent from the knowledge base, and sets up a security filtering mechanism to improve the development efficiency of the vehicle communication protocol stack while ensuring information security.
[0047] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.
[0048] Figure 1 This is a schematic diagram of the development method for the vehicle communication protocol stack provided in an embodiment of this application. Figure 1 As shown in the figure, this application provides a method for developing an in-vehicle communication protocol stack, including:
[0049] S101. Obtain the developer's development intent for the vehicle communication protocol stack.
[0050] In one implementation, the developer's development intent regarding the vehicle communication protocol stack is obtained through a human-computer interaction interface. For example, the developer inputs natural language questions via a web interface, such as "How do I configure device identification in DoIP?" or "What are some use cases for the SOME / IP Subscribe service?"
[0051] S102. Based on the development intent, search the knowledge base to obtain the knowledge fragments corresponding to the development intent. The knowledge base contains knowledge related to the vehicle communication protocol.
[0052] Specifically, the development intent is understood and vectorized to obtain the intent vector corresponding to the development intent. Based on the intent vector, the knowledge fragment corresponding to the development intent is obtained by searching in the knowledge base.
[0053] The knowledge base contains SOME / IP and DoIP protocol manuals, internal API documentation from the development team, sample code, and other knowledge related to vehicle communication protocols. This knowledge is segmented, structured, and vectorized to construct the knowledge base.
[0054] S103. Based on the development intent and knowledge fragments, and using the locally deployed large language model, obtain the first feedback information corresponding to the development intent. The first feedback information includes at least one of the following: a description of the protocol principle of the vehicle communication protocol, an example of interface call, and debugging suggestions.
[0055] Specifically, based on the development intent provided by the developer and the knowledge fragments retrieved from the knowledge base, the large language model is driven to combine authoritative information in the knowledge fragments to perform semantic understanding and logical reasoning, and finally generate the first feedback information that accurately matches the development intent.
[0056] Deploying large language models locally offers significant advantages over relying on cloud-based models in terms of data security, response efficiency, and scenario adaptability. In local deployment mode, sensitive data such as development intent, core technical documents of in-vehicle communication protocols, and API call code do not need to be uploaded to external cloud servers. Instead, the entire process flows within the enterprise or R&D institution's intranet environment, effectively mitigating the risks of data leakage and intellectual property breaches, and meeting the stringent compliance requirements for functional safety and information security in the automotive electronics field.
[0057] S104. Perform security filtering on the first feedback information to obtain the second feedback information corresponding to the development intent. The second feedback information is used to guide the development of the vehicle communication protocol stack. The security filtering is used to filter out unauthorized source code segments or sensitive information in the first feedback information.
[0058] Specifically, security filtering includes keyword blocking, semantic detection, and compliance verification to ensure zero leakage of the core code of the output content and to meet automotive-grade security requirements.
[0059] Understandably, the second feedback information is feedback information that filters out unauthorized source code segments or sensitive information and is tailored to the development intent. Using the second feedback information, developers or automated devices can be guided to complete the implementation of the development intent.
[0060] The vehicle communication protocol stack development method provided in this application constructs a knowledge base corresponding to the vehicle communication protocol. Based on the development intent provided by the developer, it automatically retrieves knowledge fragments related to the development intent and utilizes the language integration capabilities of a large language model to obtain first feedback information corresponding to the development intent based on the instruction fragment and the development intent. This enables developers to quickly and efficiently locate key information from massive amounts of knowledge, improving the development efficiency of the vehicle communication protocol stack. Furthermore, the first feedback information undergoes security filtering to remove unauthorized source code segments or sensitive information, ensuring both full utilization of the knowledge base and information security.
[0061] In one possible implementation, based on the development intent and knowledge fragments, and using a locally deployed large language model, the first feedback information corresponding to the development intent is obtained, including:
[0062] Generate contextual information based on development intent and knowledge fragments;
[0063] The context information is input into the large language model to obtain the first feedback information corresponding to the development intent.
[0064] Specifically, combining the development intent and knowledge fragments of the specific in-vehicle communication protocol stack, and leveraging the full-process capabilities of Retrieval-Augmented Generation (RAG) technology, the development intent is first transformed into a precise semantic vector. Then, authoritative knowledge fragments highly matching the intent are retrieved from the knowledge base. These fragments are then filtered, integrated, and optimized to generate contextual information that fully supports the model's understanding requirements. This contextual information is combined with standardized instruction prompts and input into a large language model, driving the model to perform logical reasoning, content generation, and knowledge reuse based on the professional content within the context. Finally, it outputs initial feedback information that precisely matches the development intent.
[0065] The vehicle communication protocol stack development method provided in this application generates professional contextual information that fits the development intent through retrieval enhancement technology and inputs it into a large language model to obtain feedback. This not only avoids the risk of model illusion by relying on authoritative domain knowledge fragments and ensures the accuracy and professionalism of feedback content such as vehicle communication protocol principle explanations and interface call examples, but also allows the model output to more accurately match actual development needs, greatly improving the efficiency of technical decision-making related to protocol stack development. At the same time, it eliminates the need for full fine-tuning of the large language model, reducing development costs and technical barriers.
[0066] In one possible implementation, based on the development intent, knowledge fragments corresponding to the development intent are searched in the knowledge base, including:
[0067] The development intent is semantically understood and vectorized to obtain the semantic vector corresponding to the development intent.
[0068] Based on semantic vectors, knowledge fragments corresponding to the development intent are obtained by searching the knowledge base.
[0069] Specifically, a text embedding model adapted to the automotive electronics field is adopted to perform deep semantic analysis and feature extraction on the development intent, accurately capturing key information such as core requirements, technical directions and application scenarios, and then generating a low-dimensional dense semantic vector that can represent the core semantics of the development intent.
[0070] The semantic vector is then input into a pre-built knowledge base specific to the field of vehicle communication. Through vector similarity matching algorithms, such as cosine similarity and Euclidean distance, authoritative knowledge fragments with the highest semantic relevance to the development intent are retrieved from the knowledge base. These fragments cover protocol technical specifications, interface call manuals, test cases, troubleshooting solutions, etc., providing solid knowledge support for generating accurate technical feedback in the future.
[0071] In one implementation, a hybrid index structure is introduced, combining an inverted index and a vector similarity index to achieve efficient searching in a hierarchical manner. The inverted index quickly locates candidate document fragments and narrows the search scope by using key terms in the protocol documents, such as "SOME / IP service subscription" and "DoIP device identification." For example, when a user asks, "What are some use cases for SOME / IP's Subscribe service?", the inverted index can quickly filter document fragments containing "Subscribe service." Based on the initial filtering results, the vector similarity index further filters the fragments most relevant to the question through semantic matching, ensuring accurate matching for complex semantic questions.
[0072] The synergistic effect of hybrid indexes avoids the high computational overhead of calculating full vector similarity while retaining fine-grained parsing capabilities for multimodal inputs. For example, in scenarios with large protocol document volumes, the hybrid index structure can significantly reduce retrieval time while improving matching accuracy for debugging suggestion-type questions. Ultimately, it significantly reduces system resource consumption and improves retrieval efficiency in large-scale protocol document scenarios while ensuring semantic matching accuracy.
[0073] The vehicle communication protocol stack development method provided in this application, through deep semantic understanding and vectorization of the vehicle communication protocol stack development intent, and based on the semantic vector, accurately retrieves and matches knowledge fragments in a domain-specific knowledge base. This not only breaks through the limitations of traditional keyword retrieval, effectively captures the core technical requirements in the development intent, and avoids interference from irrelevant information, but also quickly locates authoritative content such as protocol specifications, interface cases, and debugging solutions that are highly consistent with development needs. This lays a solid foundation for generating accurate and professional technical feedback in the future, and significantly improves the efficiency and accuracy of vehicle communication protocol stack development-related tasks.
[0074] In one possible implementation, the first feedback information is security-filtered to obtain second feedback information corresponding to the development intent, including:
[0075] The first feedback information is subjected to multi-level security filtering to obtain the second feedback information corresponding to the development intent. The multi-level security filtering includes keyword blocking, semantic detection, and compliance verification.
[0076] To meet the security requirements of the in-vehicle communication protocol stack, the knowledge base and large language model are deployed entirely within the enterprise, with zero access from the external network. A three-tiered security filtering pipeline is also in place, including keyword blocking, semantic detection, and compliance verification, ensuring zero leakage of core code in the output content and meeting automotive-grade security requirements.
[0077] Specifically, the first level of the multi-level security filtering system deploys a keyword blocking mechanism, relying on regular expression matching technology to accurately identify and block sensitive keywords, core parameter identifiers, and confidential terms related to the development of the vehicle communication protocol stack. The second level enables a semantic detection module, building a source code leakage risk identification model based on a lightweight Transformer-based Bidirectional Encoder Representations from Transformers (BERT) classifier. This model performs deep semantic analysis on the output content, effectively identifying high-risk information such as core algorithm fragments, interface keys, and underlying protocol implementation logic hidden in natural language descriptions or sample code. The third level implements full-dimensional compliance verification, comprehensively verifying the compliance and security of the output content against automotive-grade requirements. Through the collaborative filtering of these three levels, comprehensive protection is achieved from the text surface to the deep semantic layer, ensuring that the output content achieves the security goal of zero leakage of core code. The overall security level fully meets the stringent automotive-grade application standards in the automotive electronics field.
[0078] In one implementation, context-aware semantic enhancement filtering is introduced on top of the existing three-level security filtering. Specifically, a lightweight semantic model performs contextual analysis on the LLM output to determine whether it contains sensitive information. For example, when the sample code snippet generated by the LLM contains an internal protocol extension field, such as "Voyah_Private_Header," the semantic enhancement filtering module can combine the context of the protocol document, such as "this field is only used for internal communication and is not publicly disclosed," to determine its sensitivity and trigger a blocking mechanism. Furthermore, the filtering module can dynamically adjust the identification rules for sensitive fields based on the version information of the protocol specification; for example, fields added in new versions of the protocol require updating the whitelist. This implementation significantly improves the accuracy of security filtering through contextual analysis and version-aware filtering. For example, when the protocol document version iterates, the filtering module can automatically update the identification rules for sensitive fields, avoiding false or missed filtering due to version differences. In addition, contextual analysis can identify implicit sensitive information in the LLM output, such as indirectly exposing internal protocol fields through code logic, rather than relying solely on keyword matching, thus more comprehensively ensuring zero leakage of core code.
[0079] The vehicle communication protocol stack development method provided in this application establishes a three-level progressive security filtering pipeline that combines keyword blocking, semantic detection, and compliance verification. This pipeline can accurately identify and intercept confidential information such as core code, sensitive parameters, and algorithm logic related to vehicle communication protocol stack development from both surface text and deep semantic dimensions. It can also complete full-process compliance verification against automotive-grade security standards, achieving the protection goal of zero leakage of core code and ensuring that the output content fully meets the stringent requirements of vehicle information security, thus building a solid defense for the secure development and application of vehicle communication protocol stacks.
[0080] In one possible implementation, based on the development intent, knowledge fragments corresponding to the development intent are searched in the knowledge base, including...
[0081] Retrieve the query type corresponding to the development intent. The query type includes protocol principles, interface usage instructions, and debugging scenario information.
[0082] Based on the development intent and query type, search the knowledge base to obtain the knowledge fragments corresponding to the development intent.
[0083] Specifically, based on the input requirements for developing the vehicle communication protocol stack, the system uses a semantic parsing algorithm to accurately identify and obtain the query type corresponding to the development intent. This query type is divided into three core categories: protocol principles to support technical understanding, interface usage instructions to guide engineering practice, and debugging scenario information to solve practical problems. The system supports multiple input formats, including text, sample code snippets, and error log segments. The backend combines user questions with matching content from the knowledge base through a search module. Depending on the query type, a Prompt is intelligently constructed containing protocol principles, interface usage instructions, or debugging scenario information, guiding the LLM to generate accurate technical answers. For interface usage scenarios, pseudocode or pseudo-sample code can be returned to demonstrate the call flow, improving usability.
[0084] By combining clear development intentions with well-defined query types, multi-dimensional and precise searches are conducted in a pre-built knowledge base dedicated to the field of vehicle communication. This knowledge base covers authoritative content such as technical specifications of mainstream vehicle protocols such as SOME / IP and DoIP, interface call cases under the AUTOSAR architecture, and ECU communication fault diagnosis solutions. Finally, feedback information that highly matches the development intentions is selected and integrated to provide targeted support for the design, development, and verification of vehicle communication protocol stacks.
[0085] The vehicle communication protocol stack development method provided in this application first accurately identifies the query type corresponding to the vehicle communication protocol stack development intention, and then conducts targeted retrieval in the domain-specific knowledge base in combination with the development intention and query type. This not only avoids interference from irrelevant information and improves the accuracy and efficiency of retrieval, but also obtains the required content such as protocol principles, interface usage instructions or debugging scenario information in a targeted manner, ensuring that the feedback information is highly consistent with the actual development needs, and providing efficient and professional support for the design, implementation and debugging of the vehicle communication protocol stack.
[0086] In one possible implementation, the knowledge base is constructed in the following way:
[0087] The protocol manual, application programming interface documentation, and sample code are segmented and structured to obtain preprocessed data;
[0088] The preprocessed data is vectorized using an embedding model and stored in a vector database to build a knowledge base.
[0089] Specifically, the process begins with a systematic segmentation and structuring of protocol manuals, application programming interface (API) documentation, and sample code in the field of automotive communication. The text is broken down according to dimensions such as technical modules, content types, and application scenarios, and core information is annotated to form standardized preprocessed data. Then, using a professional embedding model adapted for the automotive electronics field, deep semantic analysis and feature extraction are performed on this preprocessed data. This transforms the discrete text content into low-dimensional dense vectors that represent its core semantics. The generated semantic vectors are then batch-stored into a high-performance vector database. By establishing vector indexes and optimizing similarity matching algorithms, a domain-specific knowledge base supporting the development needs of automotive communication protocol stacks is ultimately constructed.
[0090] The vehicle communication protocol stack development method provided in this application provides a way to effectively organize scattered technical content and extract core information by segmenting and structuring the protocol manuals, interface documentation, and sample code related to vehicle communication. Then, by using a professional embedding model, the preprocessed data is vectorized and stored in a vector database to build a domain-specific knowledge base. This not only enables efficient management and semantic-level retrieval of technical documents, significantly improving the matching accuracy between development intent and knowledge fragments, but also provides standardized and authoritative knowledge support for the implementation of subsequent retrieval enhancement technologies, thus facilitating the efficient advancement of vehicle communication protocol stack development-related tasks.
[0091] In one possible implementation, the knowledge base is deployed on a user's private server and / or private cloud environment, achieving fully localized operation through containerization or microservices.
[0092] The system is deployed entirely on the user's own server or in a private cloud environment, achieving fully localized operation through containerization or microservices, ensuring that sensitive data and core code are not leaked. A layered protection mechanism is employed, adding security barriers (such as NeMo Guardrails) to the front end of the LLM service to filter output and ensure that no unauthorized source code segments are generated. This leverages the powerful capabilities of LLM while meeting the stringent security and intellectual property protection requirements of the automotive industry.
[0093] By encapsulating and deploying the knowledge base using containerization (such as Docker and Kubernetes) or microservice architecture, modules can be decoupled, flexibly expanded, and rapidly maintained. This ensures that the knowledge base can complete the entire process of data storage, vector retrieval, and knowledge retrieval within a user-controlled intranet, achieving the goal of fully localized operation and meeting the stringent requirements for functional safety and information security in the automotive electronics field.
[0094] The vehicle communication protocol stack development method provided in this application deploys a dedicated knowledge base in the field of vehicle communication protocol stack development on a user's private server and / or private cloud environment, and achieves fully localized operation through containerization or microservices. This not only ensures the data security and privacy of core technical materials such as protocol manuals, interface documentation, and sample code, preventing the leakage of sensitive information and meeting automotive-grade security requirements, but also leverages the characteristics of containerization or microservices to achieve flexible expansion, rapid deployment, and efficient operation and maintenance of the knowledge base. At the same time, it eliminates dependence on the public network, ensuring low latency and high stability for operations such as retrieval and invocation, and provides secure, reliable, and independently controllable knowledge support for the technical requirements related to vehicle communication protocol stack development.
[0095] In one possible implementation, it also includes:
[0096] Obtain evaluation information based on the feedback;
[0097] Optimize the knowledge base based on development intent, feedback, and evaluation information.
[0098] Specifically, the knowledge base features an extensible mechanism, storing searchable documents in a vector database, allowing for easy addition of new protocol versions or expanded protocol documents. The system can collect user feedback for targeted fine-tuning or incremental learning, improving answer quality over time. It also supports pipelined updates, regularly synchronizing protocol standards and interface updates to keep the knowledge base up-to-date.
[0099] In one implementation, a protocol version-aware dynamic update mechanism is introduced into the knowledge base. Specifically, the system can monitor AUTOSAR standard updates or internal protocol extensions in real time and automatically extract key updates from new version documents using a version-aware document parser, such as new service interfaces and modified QoS policies. For example, when AUTOSAR releases a new version of the SOME / IP protocol, the system can parse the changes in the QoS parameter definitions for the Subscribe service in the new version document and update the relevant segments in the vector database. Furthermore, the system can combine version difference analysis to mark or delete outdated content in older version documents, ensuring that the knowledge base content is always synchronized with current development needs. This approach significantly improves the timeliness and scalability of the knowledge base through version-aware dynamic updates. For example, after a protocol version iteration, when a developer asks about "QoS policy configuration for SOME / IP service subscription," the system can directly reference the latest definition in the new version document, avoiding answer bias caused by an outdated knowledge base. In addition, version difference analysis can help developers quickly identify protocol change points, reduce reliance on document updates, and improve development efficiency.
[0100] The vehicle communication protocol stack development method provided in this application can dynamically update the knowledge base based on development intent, feedback information, and evaluation information, thereby improving the comprehensiveness and accuracy of the knowledge base.
[0101] Figure 2 This is a schematic diagram of the structure of the vehicle communication protocol stack development device provided in the embodiments of this application, as shown below. Figure 2 As shown, the vehicle communication protocol stack development device 20 provided in this embodiment includes:
[0102] The first acquisition module 201 is used to acquire the developer's development intent for the vehicle communication protocol stack;
[0103] The search module 202 is used to search the knowledge base corresponding to the development intent based on the development intent. The knowledge base contains knowledge related to the vehicle communication protocol.
[0104] The second acquisition module 203 is used to obtain the first feedback information corresponding to the development intention based on the development intention and knowledge fragments and the large language model deployed locally. The first feedback information includes at least one of the following: a description of the protocol principle of the vehicle communication protocol, an interface call example, and debugging suggestions.
[0105] The security filtering module 204 is used to perform security filtering on the first feedback information to obtain the second feedback information corresponding to the development intent. The second feedback information is used to guide the development of the vehicle communication protocol stack. The security filtering is used to filter out unauthorized source code segments or sensitive information in the first feedback information.
[0106] In one possible implementation, the second acquisition module 203 is specifically used for:
[0107] Generate contextual information based on development intent and knowledge fragments;
[0108] The context information is input into the large language model to obtain the first feedback information corresponding to the development intent.
[0109] In one possible implementation, the search module 202 is specifically used for:
[0110] The development intent is semantically understood and vectorized to obtain the semantic vector corresponding to the development intent.
[0111] Based on semantic vectors, knowledge fragments corresponding to the development intent are obtained by searching the knowledge base.
[0112] In one possible implementation, the security filtering module 204 is specifically used for:
[0113] The first feedback information is subjected to multi-level security filtering to obtain the second feedback information corresponding to the development intent. The multi-level security filtering includes keyword blocking, semantic detection, and compliance verification.
[0114] In one possible implementation, the search module 202 is specifically used for:
[0115] Retrieve the query type corresponding to the development intent. The query type includes protocol principles, interface usage instructions, and debugging scenario information.
[0116] Based on the development intent and query type, search the knowledge base to obtain the knowledge fragments corresponding to the development intent.
[0117] In one possible implementation, a knowledge base construction module is also included, specifically for:
[0118] The protocol manual, application programming interface documentation, and sample code are segmented and structured to obtain preprocessed data;
[0119] The preprocessed data is vectorized using an embedding model and stored in a vector database to build a knowledge base.
[0120] In one possible implementation, the knowledge base is deployed on a user's private server and / or private cloud environment, achieving fully localized operation through containerization or microservices.
[0121] In one possible implementation, the knowledge base building module is also used for:
[0122] Obtain evaluation information based on the feedback;
[0123] Optimize the knowledge base based on development intent, feedback, and evaluation information.
[0124] The vehicle communication protocol stack development device provided in this embodiment can execute the method provided in the above method embodiment. Its implementation principle and technical effect are similar, and will not be described in detail here.
[0125] Figure 3 This is a schematic diagram of the structure of the vehicle communication protocol stack development device provided in an embodiment of this application. Figure 3 As shown, the vehicle communication protocol stack development device 30 provided in this embodiment includes at least one processor 301 and a memory 302. Optionally, the vehicle communication protocol stack development device 30 further includes a communication interface 303. The processor 301, memory 302, and communication interface 303 are connected via a communication bus 304.
[0126] In a specific implementation, at least one processor 301 executes computer execution instructions stored in memory 302, causing at least one processor 301 to perform the above-described method.
[0127] The specific implementation process of processor 301 can be found in the above method embodiments, and its implementation principle and technical effect are similar. It will not be repeated here.
[0128] In the above embodiments, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor.
[0129] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage device.
[0130] 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. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.
[0131] This application also provides a computer program product, including a computer program that, when executed, implements the above-described method.
[0132] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed, implement the above-described method.
[0133] The aforementioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The readable storage medium can be any available medium accessible to a general-purpose or special-purpose computer.
[0134] An exemplary readable storage medium is coupled to a processor, enabling the processor to read information from and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can reside in an application-specific integrated circuit (ASIC). Alternatively, the processor and the readable storage medium can exist as discrete components in the device.
[0135] The division of units is merely a logical functional division; in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or units, and may be electrical, mechanical, or other forms.
[0136] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0137] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0138] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0139] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.
[0140] Finally, it should be noted that other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein, and is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of the invention is limited only by the appended claims.
Claims
1. A method for developing an in-vehicle communication protocol stack, characterized in that, include: Obtain the developer's development intent regarding the vehicle communication protocol stack; Based on the development intent, knowledge fragments corresponding to the development intent are obtained by searching in the knowledge base, which contains knowledge related to vehicle communication protocols; Based on the development intent and the knowledge fragment, and based on the locally deployed large language model, the first feedback information corresponding to the development intent is obtained. The first feedback information includes at least one of the following: a description of the protocol principle of the vehicle communication protocol, an interface call example, and debugging suggestions. The first feedback information is subjected to security filtering to obtain the second feedback information corresponding to the development intention. The second feedback information is used to guide the development of the vehicle communication protocol stack. The security filtering is used to filter out unauthorized source code segments or sensitive information in the first feedback information.
2. The method for developing a vehicle-mounted communication protocol stack according to claim 1, characterized in that, The step of obtaining the first feedback information corresponding to the development intent based on the development intent and the knowledge fragment, and on a locally deployed large language model, includes: Generate contextual information based on the development intent and the knowledge fragments; The context information is input into the large language model to obtain the first feedback information corresponding to the development intent.
3. The method for developing a vehicle-mounted communication protocol stack according to claim 1, characterized in that, The step of searching the knowledge base to obtain the knowledge fragment corresponding to the development intention, based on the development intention, includes: The development intent is semantically understood and vectorized to obtain the semantic vector corresponding to the development intent; Based on the semantic vector, the knowledge fragment corresponding to the development intent is obtained by searching the knowledge base.
4. The method for developing a vehicle communication protocol stack according to any one of claims 1 to 3, characterized in that, The step of performing security filtering on the first feedback information to obtain the second feedback information corresponding to the development intent includes: The first feedback information is subjected to multi-level security filtering to obtain the second feedback information corresponding to the development intent. The multi-level security filtering includes keyword blocking, semantic detection, and compliance verification.
5. The method for developing a vehicle communication protocol stack according to any one of claims 1 to 4, characterized in that, Based on the development intent, the knowledge fragment corresponding to the development intent is obtained by searching the knowledge base, and the method further includes: Obtain the query type corresponding to the development intent, which includes protocol principles, interface usage instructions, and debugging scenario information; Based on the development intent and the query type, the knowledge fragment corresponding to the development intent is obtained by searching the knowledge base.
6. The method for developing a vehicle communication protocol stack according to any one of claims 1 to 4, characterized in that, The knowledge base is constructed in the following way: The protocol manual, application programming interface documentation, and sample code are segmented and structured to obtain preprocessed data; The preprocessed data is vectorized using an embedding model and stored in a vector database to construct the knowledge base.
7. The method for developing a vehicle communication protocol stack according to any one of claims 1 to 4, characterized in that, The knowledge base is deployed on the user's private server and / or private cloud environment, and runs fully locally through containerization or microservices.
8. The method for developing a vehicle communication protocol stack according to any one of claims 1 to 4, characterized in that, Also includes: Obtain evaluation information based on the feedback information; The knowledge base is optimized based on the development intent, the feedback information, and the evaluation information.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed, are used to implement the method as described in any one of claims 1-8.
10. A computer program product, characterized in that, Includes a computer program, which, when executed, implements the method according to any one of claims 1-8.