Code migration method between software development systems and electronic equipment

By converting and migrating the communication data description file of the first software development system, the high workload problem of developers manually modifying code in the prior art is solved, and the rapid migration and automated processing of software code are realized.

CN120066574APending Publication Date: 2025-05-30Z-ONE TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202311632130.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-11-30
Publication Date
2025-05-30

AI Technical Summary

Technical Problem

In the prior art, developers manually modify the code of the first software development system to the code of the second software development system, resulting in a large development workload and high requirements for developers.

Method used

By determining the communication data description file corresponding to the first software development system, it is converted into a communication data description file that can be recognized by the second software development system, and a business logic code that can be run by the second software development system is generated based on the converted description file.

Benefits of technology

The workload of developers is reduced, and the rapid migration of software code is realized, so that the code developed based on the first software development system can be executed by the second software development system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120066574A_ABST
    Figure CN120066574A_ABST
Patent Text Reader

Abstract

The invention provides a code migration method between software development systems and electronic equipment, and the method comprises the steps: determining a first communication data description file corresponding to a first software development system, converting the first communication data description file into a second communication data description file corresponding to a second software development system, and transmitting the second communication data description file to the second software development system, generating a service framework code according to the second communication data description file; determining a first business logic code corresponding to the first software development system, and converting first software interface information included in the first business logic code into second software interface information corresponding to a second software development system according to the second communication data description file, and generating a second business logic code corresponding to the second software development system and sending the second business logic code to the second software development system, so that the second software development system generates a target file executable by the target object according to the second business logic code and the service framework code. In this way, conversion and migration of software codes between software development systems are quicker and more convenient.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of code migration, and in particular, to a method for code migration between software development systems and an electronic device. Background Art

[0002] In recent years, with the increasing demand for vehicle intelligence development, vehicle development has become increasingly important. Therefore, various vehicle software development platforms have emerged to achieve vehicle development. For example, the current mainstream vehicle software development platforms are the Automotive Open System Architecture (AUTOSAR) and the Robot Operating System (Ros) suitable for robot open source. Ros, for example, includes Ros1, Ros2, etc. Among them, AUTOSAR is an open vehicle software development platform jointly developed by vehicle manufacturers and suppliers, aiming to improve the reusability, scalability, safety, and reliability of vehicle software. The AUTOSAR Adaptive Platform (AP) is one of the latest versions of the AUTOSAR architecture. AP is a service-oriented architecture that supports multiple communication protocols and multiple hardware platforms and has high flexibility and scalability. It is also a middleware platform widely used in the current vehicle field. Ros2 is the second-generation robot operating system for building robots, which includes a large number of robot-related software libraries and tool sets.

[0003] When conducting vehicle development, the Ros2 system is usually used for function development and testing. However, vehicle development based solely on the Ros2 system cannot meet the standard requirements for vehicle safety. Therefore, it is necessary to establish a communication connection between the Ros2 system and the AUTOSAR AP system, convert the relevant code generated by the Ros2 system development into the code in the AUTOSAR AP system that can meet the vehicle safety standard requirements, and then send and migrate it to the AUTOSAR AP system so that the AUTOSAR AP system runs the converted code to cooperate in vehicle function development.

[0004] In the prior art, when converting the code for vehicle development generated by the Ros2 system into the code that can be run by the AUTOSAR AP system, developers manually modify the code corresponding to the Ros2 system into the code that the AUTOSAR AP system can run, and then send and migrate the modified code to the AUTOSAR AP system for the AUTOSAR AP to cooperate in vehicle function development. This method results in a large development workload and high requirements for developers.

[0005] In addition, for other development platform systems for vehicle development or other electronic device development, when co-developing two systems, when the code of the first software development system needs to be migrated to the second software development system, usually developers manually modify the code of the first software development system into the code of the second software development system, and then send the modified code for migration to the second software development system, resulting in a large development workload and high requirements for developers. Summary of the Invention

[0006] The present application provides a method for code migration between software development systems and an electronic device, aiming to solve the problem in the prior art that developers manually modify the code of the first software development system into the code of the second software development system and then send the modified code for migration to the second software development system, resulting in a large development workload and high requirements for developers.

[0007] In a first aspect, the present application provides a method for code migration between software development systems, the method comprising: determining a first communication data description file corresponding to a first software development system, converting the first communication data description file into a second communication data description file corresponding to a second software development system, and sending the second communication data description file to the second software development system, so that the second software development system generates service framework code corresponding to the second software development system according to the second communication data description file; determining first business logic code corresponding to the first software development system, converting first software interface information included in the first business logic code into second software interface information corresponding to the second software development system according to the second communication data description file to generate second business logic code corresponding to the second software development system, and sending the second business logic code to the second software development system, so that the second software development system generates an executable target file for a target object according to the second business logic code and the service framework code.

[0008] In an implementation manner of the present application, the first software development system is a Ros2 system, and of course, it may also be other systems for vehicle development, and the second software development system is an AUTOSAR AP system, and of course, it may also be other systems for vehicle development.

[0009] The code migration method between software development systems provided by the implementation manner of this application determines the first communication data description file corresponding to the first software development system, converts the first communication data description file into a second communication data description file corresponding to the second software development system, so that the second software development system generates service framework code corresponding to the second software development system according to the second communication data description file. Convert the first software interface information included in the first business logic code generated by the first software development system into second software interface information corresponding to the second software development system according to the second communication data description file, so as to generate second business logic code corresponding to the second software development system, and send the second business logic code to the second software development system, so that the second software development system generates a target file that can be executed by the target object according to the service framework code and the second business logic code. In this way, when the business logic code generated by the first software development system needs to be migrated to the second software development system, the second communication data description file of the second software development system is determined based on the first communication data description file, so that the communication data of the first software development system has a corresponding relationship with the communication data of the second software development system, avoiding the problem that data cannot be recognized due to communication data differences. And, automatically modify the business logic code generated by the first software development system based on the generated second communication data description file to generate business logic code that can be recognized and run by the second software development system, and generate a target file for the target vehicle, so that the code developed based on the first software development system can be executed by the second software development system. In this way, without developers manually writing code corresponding to the second software development system based on the code generated by the first software development system, the code conversion and sending migration from the first software development system to the second software development system can be completed, reducing the workload of developers and making the migration of software code faster.

[0010] In an implementation manner of the code migration method between software development systems provided by the implementation manner of this application, converting the first communication data description file into a second communication data description file corresponding to the second software development system includes: determining the first communication data description information in the first communication data description file; generating first communication service information corresponding to the second software development system according to the first communication data description information; generating a second communication data description file corresponding to the second software development system according to the first communication service information.

[0011] In the implementation mode of the present application, based on the first communication data description information corresponding to the first software development system, the first communication service information corresponding to the second software development system is generated, and then based on the first communication service information, the second communication data description file corresponding to the second software development system is generated. In this way, the second communication data description file of the second software development system is directly generated based on the communication data description file of the first software development system, so that there is a corresponding relationship between the communication data attributes of the two software development systems, avoiding the problem that message data cannot be recognized when communication data is exchanged between the two software development systems.

[0012] In an implementation mode of the code migration method between software development systems provided by the implementation mode of the present application, the first communication data description information includes a first data type, a first namespace corresponding to the first data type, and a first title information. Generating the first communication service information corresponding to the second software development system according to the first communication data description file includes: converting the first data type into a second data type corresponding to the second software development system based on a preset conversion rule; converting the first namespace into a second namespace corresponding to the second software development system; generating a first service name of the first communication service corresponding to the second software development system according to the first title information and the second namespace; processing the first title information based on a preset processing method to obtain a first interface name of the first service interface corresponding to the first communication service; obtaining a second title information of the first communication service according to the first title information; generating the first communication service information according to the second data type, the second namespace, the first service name, the first interface name, and the second title information.

[0013] In the implementation mode of the present application, the second data type, the second namespace, the first service name of the first communication service, the first interface name of the first service interface corresponding to the first communication service, and the second title information corresponding to the second software development system are obtained according to the first data type, the first namespace corresponding to the first data type, and the first title information included in the first communication data description information. In this way, there is a corresponding relationship between the data type and the title information of the service interface corresponding to the communication service of the second software development system and the first software development system, ensuring that message data can be recognized by each other and enabling the business logic code to run normally after migration.

[0014] In an implementation of the code migration method between software development systems provided by the implementation mode of the present application, generating first communication service information according to a second data type, a second namespace, a first service name, a first interface name, and second title information includes: using the second data type, the second namespace, the first service name, the first interface name, and the second title information as the first communication service information; or generating first service identification information corresponding to the first communication service and first interface identification information of the first service interface of the first communication service in a random generation or cumulative generation manner, and using the second data type, the second namespace, the first service name, the first interface name, the second title information, the first service identification information, and the first interface identification information as the first communication service information.

[0015] In the implementation mode of the present application, the first service identification information and the first interface identification information can be automatically generated in a random generation or cumulative generation manner, which speeds up the generation speed of the second communication data description file. Moreover, generating corresponding identification information based on the communication service and the service interface makes the information contained in the second communication data description file more complete.

[0016] In an implementation of the code migration method between software development systems provided by the implementation mode of the present application, generating a second communication data description file corresponding to a second software development system according to the first communication service information includes: determining a first instance corresponding to the first communication service; generating the second communication data description file according to the first communication service information and the first instance.

[0017] In the implementation mode of the present application, generating the second communication data description file according to the first communication service information and the first instance corresponding to the communication service enables the service framework code to be directly built based on the second communication data description file.

[0018] In an implementation of the code migration method between software development systems provided by the implementation mode of the present application, generating the second communication data description file according to the first communication service information and the first instance includes: generating model component definition information based on the first communication service information by using a modeling tool, and generating a software component model according to the model component definition information; exporting the software component model by using the modeling tool to obtain a communication data description file; generating the second communication data description file according to the first instance and the communication data description file.

[0019] In the implementation mode of the present application, generating a software component model based on a modeling tool and exporting the software component model to obtain a communication data description file. In this way, a communication data description file can be automatically generated based on the software component model without manually writing the communication data description file, which speeds up the generation of the service framework code.

[0020] In one implementation of the code migration method between software development systems provided in the implementation of the present application, determining first communication data description information in a first communication data description file includes: determining a standard communication data description file corresponding to the first software development system; parsing the first communication data description file and the standard communication data description file to obtain the first communication data description information.

[0021] In the implementation of the present application, the first communication data description information is obtained according to the first communication data description file and the standard communication data description file of the first software development system. No other operations need to be performed on the first software development system. The method is simple and can quickly obtain the first communication data description information.

[0022] In one implementation of the code migration method between software development systems provided in the implementation of the present application, a second software development system is enabled to generate a service framework code corresponding to the second software development system based on a second communication data description file, including: enabling the second software development system to obtain service configuration information based on the second communication data description file, and generating a service framework code corresponding to the second software development system based on the service configuration information.

[0023] In the implementation method of the present application, configuration information is obtained according to the second communication data description file, and a service framework code corresponding to the second software development system is generated according to the configuration information, so that the service interface information included in the generated service framework code has a corresponding service interface with the first software development system, and communication with the first software development system can be achieved based on the operation of the service framework code.

[0024] In one implementation of the code migration method between software development systems provided in the implementation of the present application, a first communication data description file is converted into a second communication data description file of a second software development system, including: based on the generation rules of the server side of the second software development system, the first communication data description file is converted into a communication data description file corresponding to the server side; and based on the generation rules of the consumer side of the second software development system, the first communication data description file is converted into a communication data description file corresponding to the consumer side; and the communication data description file corresponding to the server side and the communication data description file corresponding to the consumer side are used as second communication data description files.

[0025] In the implementation manner of the present application, the first communication data description file is converted into a communication data description file corresponding to the server end based on the generation rule of the server end of the second software development system, and the first communication data description file is converted into a communication data description file corresponding to the consumer end based on the generation rule of the consumer end of the second software development system. In this way, the code corresponding to the server end and the code corresponding to the consumer end in the service framework code can be built based on two different communication data description files, making the generation of the service framework code more accurate. Moreover, after the subsequent migration of the business logic code is completed, the target file generated based on the service framework code and the business logic code can enable the target object to execute better.

[0026] In a second aspect, the present application provides a method for code migration between software development systems, which is applied to a code migration system including a first software development system and a second software development system. The method includes: the first software development system determines a first communication data description file corresponding to the first software development system, converts the first communication data description file into a second communication data description file corresponding to the second software development system, and sends the second communication data description file to the second software development system, and determines the first business logic code corresponding to the first software development system, and converts the first software interface information included in the first business logic code into second software interface information corresponding to the second software development system according to the second communication data description file to generate second business logic code corresponding to the second software development system, and sends the second business logic code to the second software development system; the second software development system receives the second communication data description file and the second business logic code, generates service framework code corresponding to the second software development system according to the second communication data description file, and generates a target file that can be executed by the target object according to the second business logic code and the service framework code.

[0027] The method for code migration between software development systems provided by the present application can achieve the beneficial effects (or advantages) of the method for code migration between software development systems provided in the first aspect.

[0028] In a third aspect, an embodiment of the present application provides an electronic device, including: a processor, and a memory communicatively connected to the processor; the memory stores computer execution instructions; the processor executes the computer execution instructions stored in the memory to implement the method for code migration between software development systems provided in the implementation manner of the first aspect as described above.

[0029] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which computer execution instructions are stored, and when the computer execution instructions are executed by a processor, they are used to implement the method for code migration between software development systems provided in the implementation manner of the first aspect as described above.

[0030] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program which, when executed by a processor, implements the code migration method between software development systems provided by the implementation manner of the first aspect as described above.

[0031] It can be understood that for the beneficial effects of the above third aspect to fifth aspect, reference can also be made to the relevant descriptions in the first aspect above, and details are not repeated here. Description of the Drawings

[0032] The drawings herein are incorporated into the specification and form a part of the specification, showing embodiments consistent with the present application, and are used together with the specification to explain the principles of the present application.

[0033] Figure 1 It is a schematic structural diagram of a code migration system between software development systems provided by an embodiment of the present application;

[0034] Figure 2 It is a schematic flowchart of a code migration method between software development systems provided by an embodiment of the present application;

[0035] Figure 3 It is a schematic connection diagram of a first software development system and a second software development system provided by an embodiment of the present application;

[0036] Figure 4 It is a schematic flowchart of the conversion of a communication data description file provided by an embodiment of the present application;

[0037] Figure 5 It is a schematic flowchart of generating first communication service information provided by an embodiment of the present application;

[0038] Figure 6 It is a schematic flowchart of the conversion of business logic code provided by an embodiment of the present application;

[0039] Figure 7 It is a schematic flowchart of another code migration method between software development systems provided by an embodiment of the present application;

[0040] Figure 8 It is a schematic flowchart of another code migration method between software development systems provided by an embodiment of the present application;

[0041] Figure 9 It is a schematic structural diagram of an electronic device provided by an embodiment of the present application.

[0042] Through the above-mentioned drawings, specific embodiments of the present application have been shown, and will be described in more detail hereinafter. These drawings and written descriptions are not intended to limit the scope of the concept of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. Detailed Description of Specific Embodiments

[0043] Here, exemplary embodiments will be described in detail, and examples are shown in the drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0044] As mentioned above, in the prior art, taking the Ros2 system and the AUTOSAR AP system as examples, for a development platform system for vehicle development, when co-developing a vehicle for the two systems, when the code data of the first software development system needs to be migrated to the second software development system so that the second software development system runs the corresponding code data, the developer manually modifies the code of the first software development system to the code of the second software development system and then sends the modified code for migration to the second software development system, resulting in a large development workload and high requirements for developers.

[0045] For example, CN115052031A discloses an interactive communication system between a non-Ros program and a Ros program. Among them, the Ros program includes a Ros node and a proxy node. After the Ros node and the proxy node complete data exchange, the proxy node forwards the data request to the central communication node so that the publisher of the central communication node forwards the converted ProtoBuf information to the non-Ros platform. In this way, the information communication between the Ros program and other programs is realized. However, the method of adding a proxy node and a central communication node will inevitably increase the system overhead. Moreover, for a system that does not support transmission in the ProtoBuf format, such as the AUTOSAR AP system, this method cannot be used for information communication between the two.

[0046] Furthermore, CN111198770A discloses a communication method, device and system for ROS1 messages, a conversion method and device. A ROS2 node receives a ROS1 message from a ROS1 node; the ROS2 node calls a conversion application programming interface (API) to pass the received ROS1 message to the conversion API; the ROS2 node obtains the ROS2 message returned by the conversion API. That is, CN111198770A only discloses message conversion based on a conversion application programming interface to enable recognition between two systems. However, it does not involve a technical solution for code migration based on the communication between two software development systems.

[0047] An implementation manner of the present application provides a code migration method between software development systems, which can be applied to a code migration system including a first software development system and a second software development system. Exemplarily, as Figure 1 shown, the first software development system is deployed on an electronic device such as a server, and the second software development system is deployed on a target device such as a vehicle.

[0048] In an implementation manner of the present application, the electronic device generates a second communication data description file corresponding to the second software development system based on the first communication data description file corresponding to the first software development system, and sends the second communication data description file to the second software development system, so that the second software development system generates a service framework code corresponding to the second software development system according to the second communication data description file. Moreover, the first business logic code for vehicle development in the first software development system is converted into the second business logic code of the second software development system, and the second business logic code is sent to the second software development system, so that the second software development system generates an executable target file for the target object according to the second business logic code and the service framework code. In this way, the business logic code and communication method for vehicle development by developers based on the first software development system can be converted into the business logic code that the second software development system can execute through conversion and migration, and the second software development system can perform message communication based on the communication data description file defined by the first software development system.

[0049] As Figure 2 shown, an implementation manner of the present application provides a code migration method between software development systems, which specifically includes the following steps.

[0050] S100, determine the first communication data description file corresponding to the first software development system, convert the first communication data description file into a second communication data description file corresponding to the second software development system, and send the second communication data description file to the second software development system, so that the second software development system generates a service framework code corresponding to the second software development system according to the second communication data description file.

[0051] S200, determine the first business logic code corresponding to the first software development system, convert the first software interface information included in the first business logic code into the second software interface information corresponding to the second software development system according to the second communication data description file, so as to generate the second business logic code corresponding to the second software development system, and send the second business logic code to the second software development system, so that the second software development system can generate the target file executable by the target object according to the second business logic code and the service framework code.

[0052] In the implementation manner of this application, the first software development system is the Ros2 system, and of course it can also be other systems used for vehicle development. The second software development system is the AUTOSAR AP system, and of course it can also be other systems used for vehicle development.

[0053] Among them, the Ros2 system is widely used in the field of robotics. The fields involved, such as modeling, path planning, perception, and navigation, almost completely overlap with the field of automotive autonomous driving. At the same time, the component-based toolkit of Ros2 is very rich. The AUTOSAR AP system is deployed on vehicles. If many existing algorithms developed based on the Ros2 system can be quickly migrated to the in-vehicle scenario based on the AUTORSAR architecture, it will surely improve the development efficiency and better reuse the algorithms.

[0054] The code migration method between software development systems provided by the implementation mode of this application determines the first communication data description file corresponding to the first software development system, converts the first communication data description file into a second communication data description file corresponding to the second software development system, and generates service framework code corresponding to the second software development system based on the second software development system according to the second communication data description file. Convert the first software interface information included in the first business logic code generated by the first software development system into second software interface information corresponding to the second software development system according to the second communication data description file, so as to generate second business logic code corresponding to the second software development system, and send the second business logic code to the second software development system, so that the second software development system can generate a target file that can be executed by the target object according to the service framework code and the second business logic code. In this way, when the business logic code generated by the first software development system needs to be migrated to the second software development system, the second communication data description file of the second software development system is determined based on the first communication data description file, so that the communication data of the first software development system has a corresponding relationship with the communication data of the second software development system, and moreover, the business logic code generated by the first software development system is automatically modified based on the generated second communication data description file to generate business logic code that can be recognized and run by the second software development system, and a target file of the target vehicle is generated, so that the code developed based on the first software development system can be executed by the second software development system. In this way, there is no need for developers to manually modify the code generated based on the first software development system, reducing the workload of developers and making the migration of software code faster.

[0055] Furthermore, the code migration method between software development systems provided by this application enables the business logic code to fully comply with the standards of the AUTOSAR AP system. Without introducing additional conversion resource consumption, the code migration can be completed. Moreover, it can enable automotive software developers to conveniently use various tool sets generated by Ros2, improving efficiency.

[0056] Next, taking the first software development system as the Ros2 system and the second software development system as the AUTOSAR AP system as an example, the code migration method between software development systems provided by the implementation mode of this application will be described in detail.

[0057] As Figure 3As shown in the figure, the Ros2 system includes an operating system OS, a Ros2 middleware layer, and upper-layer business logic code based on the application programming interface (also known as the application programming interface, Application Programming Interface, abbreviated as API) of the Ros2 system. The AUTOSAR AP system includes an operating system OS, an AUTOSAR AP middleware layer, and upper-layer business logic code based on the API of the service framework code of the AUTOSAR AP system.

[0058] Among them, the Ros2 system uses the Data-Distribution Service (abbreviated as DDS) based on the RTPS (Real-Time Publish-Subscribe) protocol as the middleware layer. DDS is an industrial standard for publish-subscribe communication in real-time and embedded systems. The standard of the AUTOSAR AP system also supports using the DDS protocol stack for data transmission at the bottom layer. Therefore, the Ros2 system and the AUTOSAR AP system communicate and connect based on DDS to achieve dynamic service discovery, and the Ros system and the AUTOSAR AP system establish a communication connection with the vehicle through in-vehicle Ethernet.

[0059] It should be noted that although Ros2 contains a large number of robot-related software libraries and tool sets for developing the intelligent driving system of the vehicle, the Ros2 system itself is a middleware. Therefore, other development systems need to generate business logic code based on the API of the Ros system.

[0060] In the implementation manner of this application, the AUTOSAR AP system is deployed on the in-vehicle chip of the vehicle. Using the AUTOSAR AP system between in-vehicle chips can not only ensure the efficiency of data transmission but also conveniently send data to the upper computer. The Ros system is deployed in the upper computer. The Ros system can conveniently receive the data sent from the in-vehicle chip and, using the rich tool set, can conveniently record and playback data on the upper computer, and at the same time can conveniently perform code debugging.

[0061] Next, the technical content of step S100, which determines the first communication data description file corresponding to the first software development system, converts the first communication data description file into the second communication data description file corresponding to the second software development system, and sends the second communication data description file to the second software development system so that the second software development system generates the service framework code corresponding to the second software development system according to the second communication data description file, will be described in detail.

[0062] When developing code based on the Ros2 system, a data communication method suitable for Ros2 is generated based on the attributes of Ros2. For example, message communication is carried out in a way corresponding to the data type of the Ros2 system. Therefore, the message transmission method and interface data for the Ros2 system to communicate with other systems are different from those of the AUTOSAR AP system to communicate with other systems.

[0063] Therefore, in the implementation method of this application, before code migration, the communication method of the AUTOSAR AP system should first be constrained based on the communication data description file of the Ros2 system.

[0064] Furthermore, since the AUTOSAR AP system uses files in the arxml format to describe the design of the model and generate corresponding service framework code based on the arxml file, where the service and its deployment, instances, applications, etc. are defined in the arxml file, it is necessary to generate the arxml description file (as the second communication data description file) according to the information in the first communication data description file of Ros2.

[0065] In the implementation method of this application, first, determine the first communication data description file corresponding to the first software development system.

[0066] Exemplarily, determine multiple Msgs files (as an example of the first communication data description file) of the Ros2 system for describing communication data information.

[0067] Furthermore, convert the first communication data description file into a second communication data description file corresponding to the second software development system. As Figure 4 shown, the conversion of the communication data description file specifically includes the following steps.

[0068] S110, determine the first communication data description information in the first communication data description file.

[0069] Among them, the first communication data description information includes the first data type, the first namespace corresponding to the first data type, and the first title information.

[0070] Exemplarily, determine information such as the data type (as an example of the first data type) stored in the Msgs file, the namespace (as an example of the first namespace), etc., and determine the Topic information of the Msgs file (as an example of the first title information).

[0071] Further, determining the first communication data description information in the first communication data description file includes determining a standard communication data description file corresponding to the first software development system, parsing the first communication data description file and the standard communication data description file, and obtaining the first communication data description information.

[0072] Exemplarily, a custom Ros2 Msgs file of the Ros2 system and a standard Ros2Msgs file that comes with the Ros2 system (as an example of a standard communication data description file) are determined, and meta-information therein, such as the structure of the data type, namespace, and other information, is parsed by parsing the custom Ros2Msgs file and the standard Ros2 Msgs file.

[0073] Furthermore, Topic information of a pre-entered custom Ros2 Msgs file is obtained, so that the first communication data description information in the first communication data description file can be obtained.

[0074] In the implementation method of the present application, the first communication data description information can be obtained by directly parsing the Msgs file generated when compiling the code and the standard Msgs file that comes with the Ros2 system. There is no need to convert the Ros message into a Ros software package, and convert the Ros message into bus data, and then combine the bus data with other tools to send the message data to other systems, thereby reducing the complexity of the solution and obtaining the communication data description information in the simplest way, thereby reducing costs.

[0075] S120: Generate first communication service information corresponding to the second software development system according to the first communication data description information.

[0076] Exemplarily, the data type defined by the Ros2 system is converted into the data type of the AUTOSAR AP system, the namespace defined by the Ros2 system is converted into the namespace of the AUTOSAR AP system, the title information defined by the Ros2 system is converted into the title information of the AUTOSAR AP system, the service name of the communication service of the AUTOSAR AP system is generated according to the namespace and title information defined by the Ros2 system, and the title information of the Ros2 system is processed to obtain the interface name of the service interface corresponding to the communication service of the AUTOSARAP system. In this way, the first communication service information can be obtained, and then the arxml file corresponding to the AUTOSAR AP system is generated according to the first communication service information (as an example of the second communication data description file).

[0077] like Figure 5 As shown, generating the first communication service information corresponding to the AUTOSAR AP system according to the first communication data description information specifically includes the following steps.

[0078] S121, convert the first data type to the second data type corresponding to the second software development system based on a preset conversion rule.

[0079] Exemplarily, the data type conversion mainly includes the conversion of basic data types and custom complex data types.

[0080] For basic data types, the conversion is performed according to the conversion rules shown in Table 1 (as part of the examples of the preset conversion rules).

[0081] Table 1 Correspondence between the data types of the Ros2 system and the data types of the AUTOSAR AP system

[0082] Ros2 Msg AUTOSAR AP arxml uint8 uint8_t byte uint8_t char uint8_t int8 int8_t uint16 uint16_t int16 int16_t uint32 uint32_t int32 int32_t uint64 uint64_t int64 int64_t double / float64 double float8 / 16 / 32 float string string bool bool

[0083] That is, based on the preset conversion rule, convert the first data type uint8 recorded in the Msg file in the Ros2 system to the second data type uint8_t corresponding to the AUTOSAR AP system, the first data type byte to the second data type uint8_t, the first data type char to the second data type uint8_t, the first data type int8 to the second data type int8_t, the first data type uint16 to the second data type uint16_t, the first data type int16 to the second data type int16_t, the first data type uint32 to the second data type uint32_t, the first data type int32 to the second data type int32_t, the first data type uint64 to the second data type uint64_t, the first data type int64 to the second data type int64_t, the first data type double / float64 to the second data type double, the first data type float8 / 16 / 32 to the second data type float, the first data type string to the second data type string, and the first data type bool to the second data type bool.

[0084] For custom complex data types, the complex data types in the Ros2 system include fixed-length arrays, variable-length arrays, Msg definitions, enumeration types, etc. The preset conversion rules for complex data types are that a fixed-length array (as an example of the first data type) is converted to an Array type (as an example of the second data type), a variable-length array (as an example of the first data type) is converted to a Vector type (as an example of the second data type), a Msg definition (as an example of the first data type) is converted to a Struct type (as an example of the second data type), and an enumeration type (as an example of the first data type) is converted to a basic data type (as an example of the second data type) according to the type defined by the enumeration value.

[0085] S122, convert the first namespace to a second namespace corresponding to the second software development system.

[0086] Exemplarily, generate the same namespace for the converted data type according to the first namespace of the Ros2 Msg as the second namespace of AUTOSAR AP.

[0087] For example, a custom Ros2 Msg with the file name FusedSlots.msg, its namespace is parking_perception_msgs::msg, and its message definition is: SlotVertex - slot, SlotVertex - boundary, uint32 - id, uint8 - type. Then its converted data type corresponding to AUTOSAR AP is a Sturct with the namespace parking_perception_msgs.

[0088] For example, the code after converting the Msg definition to a Struct type in the arxml file is: <category>STRUCTURE< / category> .

[0089] For the defined namespace, the code obtained after conversion in the arxml file is:

[0090] <short-name>parking_perception_msgs< / short-name>

[0091] <symbol>parking_perception_msgs< / symbol> .

[0092] For SlotVertex - slot, the code obtained after conversion in the arxml file is:

[0093] DEST = "STD-CPP-IMPLEMENTATION-DATA-TYPE"> / DataTypes / ImplementationDataTypes / SlotVertex.

[0094] For the SlotVertex-boundary, the code obtained after conversion in the arxml file is:

[0095] DEST = "STD-CPP-IMPLEMENTATION-DATA-TYPE"> / DataTypes / ImplementationDataTypes / SlotVertex.

[0096] For the uint32-id, the code obtained after conversion in the arxml file is:

[0097] DEST = "STD-CPP-IMPLEMENTATION-DATA-TYPE"> / DataTypes / ImplementationDataTypes / uint32_t.

[0098] For the uint8-type, the code obtained after conversion in the arxml file is:

[0099] DEST = "STD-CPP-IMPLEMENTATION-DATA-TYPE"> / DataTypes / ImplementationDataTypes / uint8_t.

[0100] S123, generate the first service name of the first communication service corresponding to the second software development system according to the first title information and the second namespace.

[0101] Exemplarily, for the Ros2 Msg configured with Topic, the Topic and the namespace are concatenated to form the service name of AUTOSARAP (as an example of the first service name of the first communication service).

[0102] S124, process the first title information based on a preset processing method to obtain the first interface name of the first service interface corresponding to the first communication service.

[0103] Exemplarily, after the Topic name is processed to remove the left slash ( / ), it is used as the Event type name of the service interface (as an example of the first interface name of the first service interface).

[0104] Among them, the data type of the first service interface is the data type converted in step S121, and the namespace is the namespace converted in step S122.

[0105] S125. Obtain the second title information of the first communication service according to the first title information.

[0106] Take the exemplary Topic name of Ros2 Msg (i.e., the first title information) as the Topic name in the DDS deployment information of the first service (i.e., the second title information).

[0107] S126. Generate the first communication service information according to the second data type, the second namespace, the first service name, the first interface name, and the second title information.

[0108] In the implementation manner of this application, generating the first communication service information according to the second data type, the second namespace, the first service name, the first interface name, and the second title information includes using the second data type, the second namespace, the first service name, the first interface name, and the second title information as the first communication service information.

[0109] That is, use the second data type, the second namespace, the first service name, the first interface name, and the second title information generated based on the foregoing steps S121 to S125 as the first communication service information for subsequent generation of the arxml file.

[0110] It should be noted that there is no difference in the order of steps S121 to S125, that is, they can be executed synchronously or in any order.

[0111] Or generate the first service identification information of the first communication service and the first interface identification information of the first service interface corresponding to the first communication service in a randomly generated or cumulative generated manner, and use the second data type, the second namespace, the first service name, the first interface name, the second title information, the first service identification information, and the first interface identification information as the first communication service information.

[0112] Exemplarily, for the communication service in AUTOSAR AP, it is also necessary to define the ID of the communication service (as an example of the first service identification information) and the ID of the service interface (as an example of the first interface identification information).

[0113] In the implementation manner of this application, as long as the service IDs are not repeated and the IDs of the service interfaces under the same service are not repeated. Therefore, the service ID and the service interface ID can be generated in a cumulative generated manner. For example, from number 1 until all services have corresponding non-repeated service IDs and all service interfaces have corresponding complementary service interface IDs.

[0114] Alternatively, when generating the service ID and service interface ID, a random generation method can be used. For example, for each service and its corresponding service interface, a service ID and a service interface ID are randomly generated. If the same service ID and service interface ID are randomly generated, the same service ID and service interface ID are regenerated.

[0115] In the implementation manner of this application, whether the service ID and service interface ID are generated by accumulation or random generation, they are both generated based on a preset generation rule. For example, it is stipulated that the ID number starts with a letter, or it is stipulated that the ID must be eight digits.

[0116] Next, continue to refer to Figure 4 , and execute step S130.

[0117] S130. Generate a second communication data description file corresponding to the second software development system according to the first communication service information.

[0118] Exemplarily, the aforementioned second data type, second namespace, second title information, first service name, first interface service name, first service identification information, first interface identification information, etc. are used to generate an arxml file based on the generation method of the arxml file.

[0119] In the implementation manner of this application, generating a second communication data description file corresponding to the second software development system according to the first communication service information includes: determining a first instance corresponding to the first communication service, and generating a second communication data description file according to the first communication service information and the first instance.

[0120] Exemplarily, in the arxml file, instances (i.e., the first instances) of the same data can be generated according to the number of exposed Topics. The final arxml file is generated according to the first service information and the instances.

[0121] In the implementation manner of this application, the arxml file includes instances, and the number of instances is the same as the number of Topics, that is, the same as the number of the first communication services. The AUTOSAR AP system and the operating system OS interact through the instance name. The instances include all Event interfaces (i.e., service interfaces) of the communication service.

[0122] The generation method of the first instance can be to generate according to the first communication service based on a preset generation method.

[0123] In the implementation manner of this application, to generate a second communication data description file according to the first communication service information and the first instance, first, based on a modeling tool, model component definition information is generated according to the first communication service information, and a software component model is generated according to the model component definition information.

[0124] Exemplarily, a modeling service definition is performed, that is, the generated first communication service information is used as model component definition information. Using the model component definition information as input, a software component model (Software Component, abbreviated as SWC) is modeled.

[0125] Furthermore, based on the modeling tool, the software component model is exported to obtain a communication data description file.

[0126] Exemplarily, the SWC is exported as an arxml interface file (as an example of the communication data description file) through the modeling tool.

[0127] According to the first instance and the communication data description file, a second communication data description file is generated.

[0128] Exemplarily, according to the communication service in the communication data description file, an instance corresponding to the communication service is added to the communication data description file to generate a final arxml file.

[0129] In the implementation manner of this application, the modeling tool can specifically be a third-party tool chain EA (Enterprise Architec), and of course, it can also be other modeling tools for generating a model and generating an arxml file based on the model.

[0130] In the implementation manner of this application, after modeling the SWC and after modeling the instance, information modeling can also be performed on other applications, processes, other modeling, etc. in the AUTOSAR AP system, or directly use the default modeling method of the AUTOSAR AP system to perform modeling on other applications, processes, other modeling, etc. in the AUTOSAR AP system.

[0131] Furthermore, after generating the second communication data description file, the second communication data description file is sent to the second software development system, so that the second software development system generates service framework code corresponding to the second software development system according to the second communication data description file.

[0132] Exemplarily, after generating the arxml file, the arxml file is sent to the AUTOSAR AP system, so that the AUTOSAR AP system generates service framework code corresponding to the AUTOSAR AP system according to the arxml file.

[0133] In the implementation manner of the present application, the second software development system generates service framework code corresponding to the second software development system according to the second communication data description file, including: enabling the second software development system to obtain service configuration information according to the second communication data description file, and generating service framework code corresponding to the second software development system according to the service configuration information.

[0134] Exemplarily, the AUTOSAR AP system obtains service configuration information according to the arxml file, and generates service framework code corresponding to the AUTOSAR AP system according to the service configuration information.

[0135] Exemplarily, import the arxml file as an AUTOSAR AP system component, obtain service configuration information such as data types, communication services, and service interfaces by parsing the arxml file, and construct the service framework code of the AUTOSAR AP system to construct various APIs required for communication, and complete the construction of the communication channel between the Ros2 system and the AUTOSAR AP system.

[0136] In the implementation manner of the present application, on the basis that the Ros2 system and the AUTOSAR AP system communicate through DDS, through the construction of the service framework code, when the Ros2 system and the AUTOSAR AP system communicate based on DDS, the data types of communication data can be kept consistent, and the communication services and service interfaces can have corresponding relationships. In this way, when the Ros2 system and the AUTOSAR AP system transmit message data, there will be no problem that the message data cannot be recognized due to the lack of communication services and service interfaces corresponding to the Ros2 system in the AUTOSAR AP system and the lack of data types corresponding to the service interfaces.

[0137] In another implementation manner of the present application, two corresponding arxml files can also be generated based on the server side and the consumer side of the AUTOSAR AP system.

[0138] In the implementation manner of the present application, the first communication data description file is converted into the second communication data description file of the second software development system. First, the first communication data description file is converted into the communication data description file corresponding to the server side based on the generation rule of the server side of the second software development system.

[0139] Exemplarily, based on the nature of the server side of the AUTOSAR AP system, based on the generation rule of the server side, and based on the foregoing generation method of the communication data description file, the communication data description file corresponding to the server side is generated.

[0140] And, the first communication data description file is converted into the communication data description file corresponding to the consumer side based on the generation rule of the consumer side of the second software development system.

[0141] Based on the nature of the consumer side of the AUTOSAR AP system, based on the generation rules of the consumer side, and based on the generation method of the foregoing communication data description file, a communication data description file corresponding to the consumer side is generated.

[0142] The communication data description file corresponding to the server side and the communication data description file corresponding to the consumer side are used as the second communication data description file.

[0143] In the implementation manner of this application, a second communication data description file of the AUTOSAR AP system can be generated based on the first communication data description file of the Ros2 system. For example, the attributes of the service interface are three types: PPort, RPort, and PRPort. Among them, the attributes of the service interface corresponding to the Ros2 system are two types. PPort corresponds to publisher; RPort corresponds to subscriber; PRPort corresponds to both publisher and subscriber. In this way, the attributes of the service interface of the AUTOSAR AP system corresponding to the attributes of the service interface in the msgs file in the Ros2 system can be generated.

[0144] Of course, two different second communication data description files can also be generated based on the first communication data description file.

[0145] For example, PPort corresponds to publisher, and a communication data description file corresponding to the server side is generated. RPort corresponds to subscriber, and a communication data description file corresponding to the consumer side is generated.

[0146] Of course, in the implementation manner of this application, two identical second communication data description files can also be generated. However, when generating the service framework code, the server side and the consumer side only need to use the service interfaces corresponding to the Topics they need.

[0147] Next, in step S200, the first business logic code corresponding to the first software development system is determined, the first software interface information included in the first business logic code is converted into the second software interface information corresponding to the second software development system according to the second communication data description file, so as to generate the second business logic code corresponding to the second software development system, and the second business logic code is sent to the second software development system, so that the second software development system generates the target file that the target object can execute according to the second business logic code and the service framework code. The technical content will be described in detail.

[0148] In the implementation manner of this application, the upper-layer application code (i.e., the business logic code) of the Ros2 system is migrated.

[0149] Exemplarily, the upper-layer business logic code of the Ros2 system is converted based on the arxml file by means of a script or command line. When converting, the APIs of Ros2 are replaced with the APIs for automatically generating service framework code.

[0150] For example, a pre-built tool is used to automatically obtain the APIs in the Ros2 system, and based on the attributes of the APIs in the Ros2 system, the APIs are generated in the corresponding arxml file. In this way, the APIs (i.e., the first software interface information) of the first upper-layer business logic code (i.e., the first business logic code) corresponding to the Ros2 system can be converted into the APIs (i.e., the second software interface information) of the second upper-layer business logic code (i.e., the second business logic code) corresponding to the AUTOSAR AP system.

[0151] In the implementation manner of this application, after the API conversion is automatically performed in the form of a script or command line by using a pre-built tool, the APIs corresponding to the Ros2 system and the APIs corresponding to the converted AUTOSAR AP system can be displayed on the interface for the user to confirm whether the API conversion is correct and manually modify the incorrect APIs.

[0152] In the implementation manner of this application, the APIs can specifically include the ServiceNode creation interface, the interface for obtaining the Node clock, the interface for starting the server service, the interface for stopping the server service, the interface for creating a publisher for publishing messages on a specific topic, the interface for creating a consumer for subscribing to a specific topic, the interface for publishing messages to consumers subscribing to a specific topic (different APIs for the ordinary reference and smart pointer methods), the interface for determining whether the peer is online, the interface for setting the cache length of the consumer queue, the interface for querying the cache length of the consumer queue, the interface for setting the data arrival policy, the interface for querying the data arrival policy, the interface for registering the callback for the peer going online, the remote synchronous call interface (different APIs for with or without return values), the remote asynchronous call interface (different APIs for with or without return values), etc. All the commonly used APIs in the Ros2 system are uniformly replaced. In this way, the upper-layer business logic code that the AUTOSAR AP system can execute based on the APIs of the AUTOSAR AP system can be generated.

[0153] Further, after the second business logic code is generated, the second business logic code is sent to the AUTOSAR AP system. The AUTOSAR AP system generates the target file that the target object can execute according to the second business logic code and the generated service framework code.

[0154] Exemplarily, the AUTOSAR AP system uses the corresponding compilation chain to combine and compile the service framework code and the second business logic code to produce a program that can run on a vehicle chip (as an example of the target object) and library files (as an example of the target files).

[0155] Of course, it is also possible to compile a program that can run on a vehicle terminal or a vehicle controller (as another example of the target object) and library files.

[0156] The target object executes the program and library files to implement the corresponding functions. In this way, the development of a certain function of the vehicle can be completed.

[0157] Of course, after the vehicle executes the program and library files to implement the corresponding functions, result data will be generated. The vehicle chip can transmit the result data to the host computer, and the Ros2 system in the host computer can display and analyze the result data based on the built-in tool library so that users can view the development results more intuitively.

[0158] As Figure 6 shown, in the implementation manner of the present application, the code types of the Ros2 system and the AUTOSAR AP system can both be C++ business logic codes. The conversion of the business logic code specifically includes the following steps.

[0159] S210, C++ business logic code based on the Ros interface.

[0160] S220, convert it to C++ business logic code based on the AUTOSAR AP interface.

[0161] S230, compile it into an executable file (i.e., a program that can run) and library files that can run on a vehicle chip based on the AUTOSAR AP system.

[0162] S240, run on the vehicle chip.

[0163] In the implementation manner of the present application, based on the communication data description file, conversions of information such as data types are performed, without the need to perform message data conversion when message data is generated during the running state of the program, without introducing any overhead, saving the resource consumption of the system, and reducing the transmission delay. And since the data type definitions used in the Ros system and the AUTOSAR AP system are equivalent (i.e., have a corresponding relationship), and including the namespace and member definitions (such as communication service definitions and service interface definitions, etc.) all have a corresponding relationship. Therefore, as Figure 2As shown in the figure, when the Ros system and the AUTOSAR AP system communicate directly through Ethernet, no additional data conversion is required, and the visualization program or playback tool of the Ros2 system can be used for debugging and troubleshooting. In addition, by converting and migrating the business logic code, the application generated by the Ros2 system can be quickly migrated to the application of the AUTOSAR AP system.

[0164] In the implementation of this application, Figure 7 As shown, by parsing the meta-information of the custom Ros2 Msgs and the system's standard Ros2Msgs, and based on the entry of Topic information, an AUTOSAR AP model description file (i.e., arxml file) is generated, and the service framework code is automatically generated according to the description file. The upper-level business logic code of the API of the automatically generated service framework code (i.e., the upper-level business logic code) is compiled into executable files and library files that can be run by the vehicle chip.

[0165] In another implementation of the present application, Figure 8 As shown, a code migration method between software development systems is also disclosed, which is applied to a code migration system including a first software development system and a second software development system, and specifically includes the following steps.

[0166] S310, the first software development system determines a first communication data description file corresponding to the first software development system, converts the first communication data description file into a second communication data description file corresponding to the second software development system, and sends the second communication data description file to the second software development system, and determines a first business logic code corresponding to the first software development system, converts first software interface information included in the first business logic code into second software interface information corresponding to the second software development system according to the second communication data description file to generate a second business logic code corresponding to the second software development system, and sends the second business logic code to the second software development system.

[0167] S320, the second software development system receives the second communication data description file and the second business logic code, generates a service framework code corresponding to the second software development system according to the second communication data description file, and generates a target file executable by the target object according to the second business logic code and the service framework code.

[0168] In the implementation manner of this application, the process of converting the first communication data description file into the second communication data description file and the process of converting the first service logic code into the second service logic code can be executed by the Ros2 system. For the specific processes of the conversion, refer to the foregoing steps S100 to S200, steps S210 to S230, and steps S121 to S126, which will not be elaborated here.

[0169] For the second software development system to generate service framework code corresponding to the second software development system according to the second communication data description file, and to generate the target file that the target object can execute according to the second service logic code and the service framework code, refer to the specific processes of steps S210 to S240 executed by the entire second software development system, which will not be elaborated here.

[0170] The code migration system between software development systems provided in the embodiments of this application can be used to execute the code migration method between software development systems described in the foregoing embodiments. Their implementation principles and technical effects are similar and will not be elaborated here.

[0171] In the implementation manner of this application, the code migration method between software development systems is applied to an electronic device, which can be an upper computer, a computer, or other devices.

[0172] Figure 9 It is a schematic structural diagram of the electronic device provided in the embodiments of this application. As Figure 9 shown, the electronic device may include: a transceiver 121, a processor 122, and a memory 123.

[0173] The processor 122 executes the computer execution instructions stored in the memory, enabling the processor 122 to execute the solutions in the foregoing embodiments. The processor 122 can be a general-purpose processor, including a central processing unit CPU, a network processor (NP), etc.; it can also be a digital data processor DSP, an application-specific integrated circuit ASIC, a field programmable gate array FPGA, or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0174] The memory 123 is connected to the processor 122 through a system bus and completes communication with each other. The memory 123 is used to store computer program instructions.

[0175] By way of example and not limitation, the memory 123 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive, or a combination of two or more of these. Where appropriate, the memory 123 may include removable or non-removable (or fixed) media. Where appropriate, the memory 123 may be internal or external to the integrated gateway device. In a particular embodiment, the memory 123 is a non-volatile solid-state memory. In a particular embodiment, the memory 123 includes a read-only memory (ROM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), an electrically rewritable ROM (EAROM), or a flash memory, or a combination of two or more of these.

[0176] The transceiver 121 can be used to obtain the task to be run and the configuration information of the task to be run.

[0177] The system bus can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The system bus can be divided into an address bus, a data bus, a control bus, etc. For the sake of simplicity of representation, only a thick line is shown in the figure, but it does not mean that there is only one bus or one type of bus. The transceiver is used to implement the communication between the database access device and other computers (such as clients, read-write libraries, and read-only libraries). The memory may contain a random access memory (RAM) and may also include a non-volatile memory.

[0178] The electronic device provided by the implementation manner of the present application is used to execute the technical solution of the code migration method in the software development system in the above-mentioned embodiment.

[0179] The embodiment of the present application also provides a chip for running instructions, and the chip is used to execute the technical solution of the code migration method between software development systems in the above-mentioned embodiment.

[0180] The embodiment of the present application also provides a computer-readable storage medium, in which computer instructions are stored. When the computer instructions run on the processor of the electronic device, the processor of the electronic device is caused to execute the technical solution of the code migration method between software development systems in the above-mentioned embodiment.

[0181] In some possible implementations, aspects of the method provided in this application can also be implemented in the form of a program product, which includes program code. When the program product runs on a processor of an electronic device, the program code is used to cause the processor of the electronic device to execute the steps in the method according to various exemplary embodiments of this application described above in this specification. For example, the electronic device can execute the code migration method between software development systems recorded in the embodiments of this application.

[0182] The program product can adopt any combination of one or more readable media. The readable media can be a readable data medium or a readable storage medium. The readable storage medium can be, for example, but not limited to: an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples (non-exhaustive list) of the readable storage medium include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0183] The implementation manner of this application also provides a computer program product. The computer program product includes a computer program, which is stored in a computer-readable storage medium. At least one processor can read the computer program from the computer-readable storage medium. When at least one processor executes the computer program, the technical solution of the code migration method between software development systems in the above embodiments can be implemented.

[0184] This application is described with reference to the flowcharts and / or block diagrams of the method, device, and computer program product according to this application. It should be understood that each process and / or block in the flowchart and / or block diagram, and the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable information processing devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable information processing devices generate a device for implementing the functions specified in Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.

[0185] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable information processing device to work in a specific manner, so that the instructions stored in the computer-readable memory generate a manufactured article including an instruction device, and the instruction device implements the functions in the process Figure 1 one process or multiple processes and / or blocksFigure 1 The functions specified in one or more boxes.

[0186] These computer program instructions can also be loaded onto a computer or other programmable information processing device, so that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process. Thus, the instructions executed on the computer or other programmable device provide for implementing the steps of the functions specified in one Figure 1 process or more processes and / or boxes Figure 1 or more boxes.

[0187] Those skilled in the art will readily conceive of other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any variations, uses, or adaptations of the present application, which follow the general principles of the present application and include known common knowledge or conventional technical means in the technical field not disclosed in the present application.

[0188] It should be understood that the present application is not limited to the exact structures described above and shown in the drawings, and various modifications and changes can be made without departing from its scope.

Claims

1. A method for code migration between software development systems, characterized in that, the method includes: Determine a first communication data description file corresponding to a first software development system, convert the first communication data description file into a second communication data description file corresponding to a second software development system, and send the second communication data description file to the second software development system, so that the second software development system generates service framework code corresponding to the second software development system according to the second communication data description file; Determine the first business logic code corresponding to the first software development system, convert the first software interface information included in the first business logic code into second software interface information corresponding to the second software development system according to the second communication data description file, to generate second business logic code corresponding to the second software development system, and send the second business logic code to the second software development system, so that the second software development system generates an executable target file for the target object according to the second business logic code and the service framework code.

2. The method for code migration between software development systems according to claim 1, characterized in that, converting the first communication data description file into a second communication data description file corresponding to a second software development system includes: Determine the first communication data description information in the first communication data description file; Generate first communication service information corresponding to the second software development system according to the first communication data description information; Generate a second communication data description file corresponding to the second software development system according to the first communication service information.

3. The method for code migration between software development systems according to claim 2, characterized in that, the first communication data description information includes a first data type, a first namespace corresponding to the first data type, and first title information. Generating first communication service information corresponding to the second software development system according to the first communication data description file includes: Convert the first data type into a second data type corresponding to the second software development system based on a preset conversion rule; Convert the first namespace into a second namespace corresponding to the second software development system; Generate a first service name of the first communication service corresponding to the second software development system according to the first title information and the second namespace; Process the first title information based on a preset processing method to obtain a first interface name of the first service interface corresponding to the first communication service; Obtain second title information of the first communication service according to the first title information; Generate the first communication service information according to the second data type, the second namespace, the first service name, the first interface name, and the second title information.

4. The method for code migration between software development systems according to claim 3, characterized in that, Generating the first communication service information according to the second data type, the second namespace, the first service name, the first interface name, and the second title information includes: Using the second data type, the second namespace, the first service name, the first interface name, and the second title information as the first communication service information; or Generating the first service identification information corresponding to the first communication service and the first interface identification information of the first service interface corresponding to the first communication service in a manner of random generation or cumulative generation, and using the second data type, the second namespace, the first service name, the first interface name, the second title information, the first service identification information, and the first interface identification information as the first communication service information.

5. The method for code migration between software development systems according to claim 4, wherein, Generating a second communication data description file corresponding to the second software development system according to the first communication service information includes: Determining a first instance corresponding to the first communication service; Generating the second communication data description file according to the first communication service information and the first instance.

6. The method for code migration between software development systems according to claim 5, wherein, Generating the second communication data description file according to the first communication service information and the first instance includes: Generating model component definition information based on the first communication service information by using a modeling tool, and generating a software component model according to the model component definition information; Exporting the software component model based on the modeling tool to obtain a communication data description file; Generating the second communication data description file according to the first instance and the communication data description file.

7. The method for code migration between software development systems according to any one of claims 2-6, wherein, Determining the first communication data description information in the first communication data description file includes: Determining a standard communication data description file corresponding to the first software development system; Parsing the first communication data description file and the standard communication data description file to obtain the first communication data description information.

8. The method for code migration between software development systems according to any one of claims 1-7, wherein, Enabling the second software development system to generate service framework code corresponding to the second software development system according to the second communication data description file includes: Enabling the second software development system to obtain service configuration information according to the second communication data description file, and generating the service framework code corresponding to the second software development system according to the service configuration information.

9. The method for code migration between software development systems according to any one of claims 1-8, wherein, Converting the first communication data description file into a second communication data description file of a second software development system includes: Convert the first communication data description file into the communication data description file corresponding to the server end based on the generation rules of the server end of the second software development system; and Convert the first communication data description file into the communication data description file corresponding to the consumer end based on the generation rules of the consumer end of the second software development system; Use the communication data description file corresponding to the server end and the communication data description file corresponding to the consumer end as the second communication data description file.

10. The code migration method between software development systems according to any one of claims 1-9, characterized in that the first software development system is a Ros2 system, and the second software development system is an AUTOSAR AP system.

11. A code migration method between software development systems, characterized in that applied to a code migration system including a first software development system and a second software development system, the method includes: The first software development system determines the first communication data description file corresponding to the first software development system, converts the first communication data description file into a second communication data description file corresponding to the second software development system, and sends the second communication data description file to the second software development system, and determines the first business logic code corresponding to the first software development system, and converts the first software interface information included in the first business logic code into the second software interface information corresponding to the second software development system according to the second communication data description file, so as to generate the second business logic code corresponding to the second software development system, and send the second business logic code to the second software development system; The second software development system receives the second communication data description file and the second business logic code, generates the service framework code corresponding to the second software development system according to the second communication data description file, and generates the target file executable by the target object according to the second business logic code and the service framework code.

12. An electronic device, characterized in that comprises: a processor, and a memory communicatively connected to the processor; The memory stores computer execution instructions; the processor executes the computer execution instructions stored in the memory, so that the electronic device implements the code migration method between software development systems according to any one of claims 1-10.

Citation Information

Cited By

  • Method and device for generating description file of SWC in ECU and vehicle-mounted ECU

    CN121116289A