Method and system for implementing interface conversion based on context association and scenario definition

Based on the method of context association and scene definition, automation realizes the conversion of electric vehicle interface, solving the problems of diverse standards in existing technologies, difficulty in adapting and debugging workload caused by different interfaces, and realizing fast and automated interface conversion.

CN117573091BActive Publication Date: 2025-01-28AUTOCORE INTELLIGENT TECH (NANJING) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202311574163.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-23
Publication Date
2025-01-28
Estimated Expiration
2043-11-23

AI Technical Summary

Technical Problem

The existing electric vehicle interface conversion technology has problems such as diverse standards, different interfaces, adaptation, and additional time and workload for functions, which increases debugging workload.

Method used

Adopting a method based on context association and scene definition, through scene classification modules, function context modules, and parameter relationship modules, the interface conversion is automated.

Benefits of technology

The modular management code function is implemented by the introduction of the scene definition, and the connection between the context association is introduced to the interface conversion. It is convenient for the interface conversion. The automatic interface conversion is quickly produced by introducing the function parameter correlation method.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117573091B_ABST
    Figure CN117573091B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and system for realizing interface conversion based on context association and scenario definition. Code is input into a scenario classification module. The scenario classification module configures the scenario configuration in the database according to different scenario conditions and outputs the scenario configuration in a classified manner. The output of the scenario classification module is used as the input of a function context module. The function context module generates output code with dependency relationships according to the context relationships of functions and classes. The output of the function context module is used as the input of a parameter relationship module. The parameter relationship module generates output code with parameter relationships according to the parameter relationships of functions and classes. The present invention realizes modular management of code functions by introducing scenario definition; by introducing context association, functional functions are associated with each other, which is convenient for interface conversion; by introducing function parameter association mode, conversion code can be quickly produced. The method of the present invention realizes interface conversion in an automated manner.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to electric vehicle interface conversion technology, and in particular to a method and system for realizing interface conversion based on context association and scene definition. Background Art

[0002] With the development of electric smart cars, car manufacturers can provide more and more functions to users. As "software-defined cars" become an industry consensus, there are many standards and interfaces for automotive software. If you want your company's products to be applicable to other standards or used on other platforms, you need to convert the interfaces. This will have the following disadvantages: there are many standards and different interfaces, which require adaptation; the same function requires extra time and workload; and a lot of debugging workload is increased. Summary of the invention

[0003] In order to solve the deficiencies in the prior art, the object of the present invention is to provide a method and system for implementing interface conversion based on context association and scenario definition.

[0004] To achieve the purpose of the present invention, the technical solution adopted by the present invention is:

[0005] A method for implementing interface conversion based on context association and scenario definition, comprising the steps of:

[0006] (1) The code is input into the scene classification module, and the scene classification module configures the scene configuration in the database according to different scene conditions and classifies and outputs the scene configuration;

[0007] (2) The output of the scene classification module is used as the input of the functional context module. The functional context module generates output code with dependencies based on the contextual relationships of functions and classes.

[0008] (3) The output of the functional context module is used as the input of the parameter relationship module. The parameter relationship module generates output code with parameter relationships based on the parameter relationships of functions and classes.

[0009] Furthermore, the specific workflow of the scene classification module includes:

[0010] (1.1) The scene reading module obtains the preset scene classification configuration from the scene configuration database; different functions and classes belong to different scenes by default;

[0011] (1.2) The scene reading module outputs the specific scene configuration to the scene classification module, and the scene classification module classifies and outputs the functions and classes according to the preset values.

[0012] Furthermore, the specific workflow of the functional context module includes:

[0013] (2.1) Configure the classified scenarios and read the preset context configurations of functions and classes from the context configuration database. Generate the context configurations through the multi-tree traversal algorithm module to generate a function relationship with context association.

[0014] (2.2) Output is performed through the context output module, and output code with dependencies is output.

[0015] Furthermore, the specific workflow of the parameter relationship module includes:

[0016] (3.1) Determine the output according to the functional context classification, read the preset function and class parameter configuration from the parameter configuration database through the parameter relationship reading module, perform generation operations on the parameter relationship configuration through the multi-tree traversal algorithm module, and generate a function definition with parameter association;

[0017] (3.2) Generate the final result for output, and output the output code with parameter relationship.

[0018] A system for implementing interface conversion based on context association and scenario definition, comprising three modules, namely, a scenario classification module, a function context module, and a parameter relationship module;

[0019] It also includes a configuration database, which includes a scene configuration database, a context configuration database, and a parameter configuration database;

[0020] The scenario classification module configures the scenario configuration in the database according to different scenario conditions and classifies the scenario configuration. The function context module generates output code with dependency relationships based on the contextual relationships between functions and classes. The parameter relationship module generates output code with parameter relationships based on the parameter relationships between functions and classes.

[0021] Furthermore, the scene classification module includes a scene reading module and a scene classification module;

[0022] The scene reading module goes to the scene configuration database to obtain the preset scene classification configuration, and outputs the specific scene configuration to the scene classification module. Different functions and classes belong to different scenes according to the preset values. The scene classification module classifies and outputs the functions and classes according to the preset values.

[0023] Furthermore, the functional context module includes a multi-tree traversal algorithm module and a context output module;

[0024] Configure the classified scenarios, read the preset function and class context configurations from the context configuration database, generate operations on the context configurations through the multi-tree traversal algorithm module, generate function relationships with context associations, and output them through the context output module.

[0025] Furthermore, the parameter relationship module includes a parameter relationship reading module and a multi-branch tree depth traversal algorithm module;

[0026] The output is determined according to the functional context classification. The parameter relationship reading module reads the preset function and class parameter configuration from the parameter configuration database. The multi-tree traversal algorithm module performs generation operations on the parameter relationship configuration to generate a function definition with parameter association, and outputs the final generated result.

[0027] The beneficial effects of the present invention are that, compared with the prior art, the present invention realizes modular management of code functions by introducing scenario definition; by introducing context association, functional functions are associated with each other, which is convenient for interface conversion; by introducing function parameter association mode, conversion code can be quickly produced. The method of the present invention realizes interface conversion in an automated manner. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] Figure 1 It is a schematic diagram of a system for implementing interface conversion based on context association and scenario definition according to the present invention;

[0029] Figure 2 is a schematic diagram of the scene classification module;

[0030] Figure 3 is a schematic diagram of the output result of the scene classification module in an embodiment of the present invention;

[0031] Figure 4 It is a schematic diagram of the functional context module;

[0032] Figure 5 is a schematic diagram of the output result of the functional context module in an embodiment of the present invention;

[0033] Figure 6 It is a schematic diagram of parameter relationship module;

[0034] Figure 7 It is a schematic diagram of the multi-branch tree depth traversal algorithm;

[0035] Figure 8 Schematic diagram of output results of an embodiment of the present invention. DETAILED DESCRIPTION

[0036] The technical solution of the present invention is further described below in conjunction with the accompanying drawings and embodiments. The following embodiments are only used to more clearly illustrate the technical solution of the present invention, and cannot be used to limit the protection scope of this application.

[0037] like Figure 1As shown, the system for implementing interface conversion based on context association and scenario definition described in the present invention includes three modules, namely, a scenario classification module (Scenario Detect Module), a functional context module (FuncContext Module), and a parameter relationship module (Parameter Relation Module); the input code is first input into the scenario classification module, the scenario classification module is connected to the functional context module, the functional context module is connected to the parameter relationship module, and the parameter relationship module outputs the code.

[0038] It also includes a configuration database. The scene classification module, the function context module, and the parameter relationship module are all connected to the configuration database. The configuration database includes a scene configuration database, a context configuration database, and a parameter configuration database.

[0039] The method for implementing interface conversion based on context association and scenario definition of the present invention comprises the steps of:

[0040] (1) The code is first input into the scene classification module, which configures the scene configuration in the database according to different scene conditions and outputs the scene configuration in a classified manner;

[0041] (2) The output of the scene classification module is used as the input of the functional context module. The functional context module generates output code with dependencies based on the contextual relationships of functions and classes.

[0042] (3) The output of the functional context module is used as the input of the parameter relationship module. The parameter relationship module generates output code with parameter relationships based on the parameter relationships of functions and classes.

[0043] like Figure 2 As shown, the scene classification module includes a scene reading module and a scene classification module. The input is first input into the scene reading module, the scene reading module is connected to the scene classification module, and the scene classification module is connected to the output. Among them, the scene reading module is connected to the scene configuration database.

[0044] The specific workflow of the scene classification module includes:

[0045] (1.1) The scene reading module will go to the scene configuration database to obtain the preset scene classification configuration; different functions and classes belong to different scenes by default;

[0046] (1.2) The scene reading module outputs the specific scene configuration to the scene classification module, and the scene classification module classifies and outputs the functions and classes according to the preset values.

[0047] The functions are classified by specific scenario definitions as shown in Table 1. The output results are as follows Figure 3 shown.

[0048] Table 1

[0049] function Scenario Fun1 1 Fun2 2 Fun3 1 Fun4 3 Fun5 2 Fun6 1 Fun7 1 Fun8 2 Fun9 1 Fun10 1 Fun11 2 Fun12 3 Fun13 2 Fun14 2

[0050] like Figure 4 As shown, the functional context module includes a multi-tree traversal algorithm module and a context output module. The output of the scene classification module is input into the multi-tree traversal algorithm module, the multi-tree traversal algorithm module is connected to the context output module, and the context output module is connected to the output. Among them, the multi-tree traversal algorithm module is connected to the context configuration database.

[0051] The specific workflow of the functional context module includes:

[0052] (2.1) Configure the classified scenarios and read the preset context configurations of functions and classes from the context configuration database. Generate the context configurations by traversing the multi-branch tree to generate a function relationship with context association.

[0053] (2.2) Output is performed through the context output module, and output code with dependencies is output.

[0054] The functions and classes are read through the specific context definition as shown in Table 2. The output result is as follows Figure 5 shown.

[0055] Table 2

[0056]

[0057] like Figure 6 As shown, the parameter relationship module includes a parameter relationship reading module and a multi-tree depth traversal algorithm module. The output of the function context module is input into the parameter relationship reading module, the parameter relationship reading module is connected to the multi-tree depth traversal algorithm module, and the multi-tree depth traversal algorithm module is connected to the output. Among them, the parameter relationship reading module is connected to the parameter configuration database.

[0058] The specific workflow of the parameter relationship module includes:

[0059] (3.1) Determine the output according to the functional context classification, and read the preset function and class parameter configuration from the parameter configuration database, perform generation operations on the parameter relationship configuration through the multi-branch tree depth traversal algorithm, and generate a function definition with parameter association;

[0060] (3.2) Generate the final result for output, and output the output code with parameter relationship.

[0061] By reading the parameter relationship of the preset function and class, as shown in Table 3 below. Table 3 defines the function parameters, return type and return value. The function parameter table defines the function parameter value and where the function is obtained.

[0062] Table 3

[0063]

[0064]

[0065] like Figure 7 As shown in the figure, the specific workflow of the multi-branch tree depth traversal algorithm includes:

[0066] (1) Start detecting from the bottom node of the tree node. If the parameter is passed down from above, add the parameter to each level from the upper layer to the lower layer; if not, assign the parameter value inside this function;

[0067] (2) After processing this node, continue to scan the previous sibling node; if there is one, check it; if not, scan the parent node; until all nodes are scanned.

[0068] After the method of the present invention passes through the three modules of scene classification module, function context module and parameter relationship module, the service interface can be implemented according to the context association and scene definition method. Figure 8 Interface conversion shown.

[0069] The beneficial effects of the present invention are that, compared with the prior art, the present invention realizes modular management of code functions by introducing scenario definition; by introducing context association, functional functions are associated with each other, which is convenient for interface conversion; by introducing function parameter association mode, conversion code can be quickly produced. The method of the present invention realizes interface conversion in an automated manner.

[0070] The applicant of the present invention has made a detailed explanation and description of the implementation examples of the present invention in conjunction with the drawings in the specification. However, those skilled in the art should understand that the above implementation examples are only preferred implementation schemes of the present invention, and the detailed description is only to help readers better understand the spirit of the present invention, but not to limit the scope of protection of the present invention. On the contrary, any improvements or modifications based on the inventive spirit of the present invention should fall within the scope of protection of the present invention.

Claims

1. A method for implementing interface conversion based on context association and scenario definition, characterized in that: Includes steps: (1) The code is input into the scene classification module. The scene classification module configures the scene configuration in the database according to different scene conditions and outputs the scene configuration in a classified manner; The specific workflow of the scene classification module includes: (1.1) The scene reading module goes to the scene configuration database to obtain the preset scene classification configuration; different functions and classes belong to different scenes by default; (1.2) The scene reading module outputs the specific scene configuration to the scene classification module, and the scene classification module classifies and outputs the functions and classes according to the preset values; (2) The output of the scene classification module is used as the input of the functional context module. The functional context module generates output code with dependencies based on the contextual relationships between functions and classes. The specific workflow of the functional context module includes: (2.1) Configure the classified scenarios and read the preset context configurations of functions and classes from the context configuration database. Generate the context configurations through the multi-tree traversal algorithm module to generate function relationships with context associations. (2.2) Output through the context output module, outputting the output code with dependencies; (3) The output of the function context module is used as the input of the parameter relationship module. The parameter relationship module generates output code with parameter relationships based on the parameter relationships of functions and classes. The specific workflow of the parameter relationship module includes: (3.1) Determine the output according to the functional context classification, read the preset function and class parameter configuration from the parameter configuration database through the parameter relationship reading module, perform generation operations on the parameter relationship configuration through the multi-tree traversal algorithm module, and generate a function definition with parameter association; (3.2) Generate the final result for output, and output the output code with parameter relationship.

2. A system for implementing interface conversion based on context association and scenario definition, characterized in that: It includes three modules: scene classification module, function context module, and parameter relationship module; It also includes a configuration database, which includes a scene configuration database, a context configuration database, and a parameter configuration database; The scenario classification module configures the scenario configuration in the database according to different scenario conditions and outputs the scenario configuration in a classified manner; the function context module generates output code with dependencies based on the contextual relationship between functions and classes; The parameter relationship module generates output code with parameter relationships according to the parameter relationships of functions and classes; The scene classification module includes a scene reading module and a scene classification module; The scene reading module obtains the preset scene classification configuration from the scene configuration database, and outputs the specific scene configuration to the scene classification module. Different functions and classes belong to different scenes according to the preset values. The scene classification module classifies and outputs the functions and classes according to the preset values. The functional context module includes a multi-tree traversal algorithm module and a context output module; Configure the classified scenarios, read the preset function and class context configurations from the context configuration database, generate the context configurations through the multi-tree traversal algorithm module, generate function relationships with context associations, and output them through the context output module; The parameter relationship module includes a parameter relationship reading module and a multi-branch tree depth traversal algorithm module; The output is determined according to the functional context classification. The parameter relationship reading module reads the preset function and class parameter configuration from the parameter configuration database. The multi-tree traversal algorithm module performs generation operations on the parameter relationship configuration to generate a function definition with parameter association, and outputs the final generated result.

Citation Information

Patent Citations

  • Business processing method and device, storage medium and equipment

    CN115018473A