Vehicle-mounted application compiling method and device, computer equipment and readable storage medium

By obtaining vehicle model information and obtaining corresponding development information from special and public development file directories, compiling and packaging, the incompile and incompile and packaged problem is solved due to the numerous branches of development information under multiple vehicle models, and efficient in-vehicle application compilation is achieved.

CN119621065APending Publication Date: 2025-03-14CHONGQING SELIS PHOENIX INTELLIGENT INNOVATION TECH CO LTD

Patent Information

Application Number
CN202411584742.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-07
Publication Date
2025-03-14

Smart Images

  • Figure CN119621065A_ABST
    Figure CN119621065A_ABST
Patent Text Reader

Abstract

The invention relates to a vehicle-mounted application compiling method and device, computer equipment and a computer readable storage medium. The method comprises the steps of obtaining vehicle type information of a vehicle used for carrying a target vehicle-mounted application, and obtaining special development information, corresponding to the vehicle type information, of the target vehicle-mounted application from a preset special development file directory associated with the vehicle type information according to the vehicle type information; acquiring public development information corresponding to the target vehicle-mounted application from a preset public development file directory; and compiling and packaging the special development information and the public development information to generate a compiling file, corresponding to the vehicle type information, of the target vehicle-mounted application. By adopting the method, the compiling efficiency of the vehicle-mounted application can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of vehicle-mounted application development, and in particular to a vehicle-mounted application compilation method, apparatus, computer equipment, computer-readable storage medium, and computer program product. Background Art

[0002] With the development of in-vehicle application development technology, a technology for compiling in-vehicle applications has emerged. The source code of the in-vehicle application that needs to be compiled is first created and developed, and then the source code can be converted into an executable program, such as an application package, by compiling the application, and finally deployed to the in-vehicle system.

[0003] In-vehicle applications usually need to be installed on multiple car models, but the same application may have certain differences on different car models, such as the position or color of each control on the same page may be different on different car models. In traditional technology, in order to solve the above differences, different car model projects usually have different branches for development information management, one development information corresponds to one car model, and when compiling an in-vehicle application, the corresponding development information can be selected to complete the compilation according to the car model equipped with the in-vehicle application.

[0004] However, in the above-mentioned automobile application compilation method, when multiple vehicle model projects are carried out at the same time, there will be many corresponding development information branches. If there are common problems that need to be modified, each development information branch needs to submit the same development information. In this case, it is easy to miss a branch and fail to synchronize development information. In addition, since each piece of development information must be submitted to each branch synchronously, a lot of time will be wasted, so the efficiency of vehicle application compilation is low. Summary of the invention

[0005] Based on this, it is necessary to provide a vehicle-mounted application compilation method, device, computer equipment, computer-readable storage medium and computer program product that can improve the efficiency of vehicle-mounted application compilation in response to the above technical problems.

[0006] In a first aspect, the present application provides a method for compiling an in-vehicle application, comprising:

[0007] Acquire vehicle model information of a vehicle for carrying a target vehicle-mounted application, and acquire, based on the vehicle model information, dedicated development information of the target vehicle-mounted application corresponding to the vehicle model information from a preset dedicated development file directory associated with the vehicle model information;

[0008] Acquire public development information corresponding to the target vehicle-mounted application from a preset public development file directory;

[0009] The dedicated development information and the public development information are compiled and packaged to generate a compilation file of the target vehicle application corresponding to the vehicle model information.

[0010] In one of the embodiments, the dedicated development file directory includes: a dedicated code file directory, the dedicated development information includes dedicated code information corresponding to the target vehicle application and the vehicle model information; the public development file directory includes a public code file directory, and the public development information includes public code information corresponding to the target vehicle application; obtaining the dedicated development information corresponding to the target vehicle application and the vehicle model information from the pre-set dedicated development file directory associated with the vehicle model information includes: obtaining the dedicated code information corresponding to the target vehicle application and the vehicle model information from the dedicated code file directory associated with the vehicle model information; obtaining the public development information corresponding to the target vehicle application from the pre-set public development file directory includes: obtaining the public code information corresponding to the target vehicle application from the public code file directory.

[0011] In one of the embodiments, before obtaining the vehicle model information of the car equipped with the target vehicle-mounted application, it also includes: obtaining common code information obtained based on the common business logic of the target vehicle-mounted application, and special code information corresponding to each vehicle model information obtained based on the differentiated business logic of the target vehicle-mounted application corresponding to different vehicle model information; the common code information includes a common business logic code and an abstract interface code for calling the differentiated business logic code corresponding to each vehicle model information; the special code information corresponding to each vehicle model information includes the differentiated business logic code corresponding to each vehicle model information; the common code information is stored in the common development file directory, and the special code information corresponding to each vehicle model information is stored in the special code file directory corresponding to each vehicle model information.

[0012] In one embodiment, the dedicated development file directory includes: a dedicated media resource directory, the dedicated development information includes dedicated media resources corresponding to the target vehicle application and the vehicle model information; the public development file directory includes a public media resource directory, and the public development information includes public media resources corresponding to the target vehicle application; obtaining the dedicated development information corresponding to the target vehicle application and the vehicle model information from the pre-set dedicated development file directory associated with the vehicle model information includes: obtaining the dedicated media resources corresponding to the target vehicle application and the vehicle model information from the dedicated media resource directory associated with the vehicle model information; obtaining the public development information corresponding to the target vehicle application from the pre-set public development file directory includes: obtaining the public media resources corresponding to the target vehicle application from the public development file directory.

[0013] In one of the embodiments, before obtaining the vehicle model information of the vehicle equipped with the target vehicle-mounted application, it also includes: obtaining public media resources associated with the target vehicle-mounted application, and dedicated media resources corresponding to different vehicle model information of the target vehicle-mounted application; storing the public media resources in the public media resource directory, and storing the dedicated media resources corresponding to each vehicle model information in the dedicated media resource directory corresponding to each vehicle model information.

[0014] In one of the embodiments, the vehicle-mounted application compilation method further includes: in response to a development information update request for the target vehicle-mounted application, obtaining an information type of the development information to be updated; when the information type represents that the development information to be updated is public development information, updating the public development information corresponding to the target vehicle-mounted application stored in the public development file directory based on the development information to be updated.

[0015] In one of the embodiments, after obtaining the information type of the development information to be updated, it also includes: when the information type represents that the development information to be updated is dedicated development information, obtaining the vehicle model information corresponding to the development information to be updated; based on the development information to be updated, updating the dedicated development information corresponding to the target vehicle-mounted application stored in the dedicated development file directory associated with the vehicle model information.

[0016] In a second aspect, the present application also provides a vehicle-mounted application compilation device, including:

[0017] A dedicated information acquisition module, used to acquire vehicle model information of a vehicle used to carry a target vehicle-mounted application, and acquire dedicated development information corresponding to the target vehicle-mounted application and the vehicle model information from a pre-set dedicated development file directory associated with the vehicle model information according to the vehicle model information;

[0018] A public information acquisition module, used to acquire the public development information corresponding to the target vehicle-mounted application from a preset public development file directory;

[0019] The compilation file generation module is used to compile and package the dedicated development information and the public development information to generate a compilation file of the target vehicle application corresponding to the vehicle model information.

[0020] In a third aspect, the present application further provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method described in any one of the embodiments of the first aspect when executing the computer program.

[0021] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the method described in any one of the embodiments of the first aspect.

[0022] In a fifth aspect, the present application further provides a computer program product, comprising a computer program, which, when executed by a processor, implements the steps of the method described in any one of the embodiments of the first aspect.

[0023] The above-mentioned vehicle-mounted application compilation method, device, computer equipment, computer-readable storage medium and computer program product obtain the vehicle model information of the vehicle used to carry the target vehicle-mounted application, and based on the vehicle model information, obtain the dedicated development information of the target vehicle-mounted application corresponding to the vehicle model information from a pre-set dedicated development file directory associated with the vehicle model information; obtain the public development information corresponding to the target vehicle-mounted application from a pre-set public development file directory; compile and package the dedicated development information and the public development information to generate a compiled file of the target vehicle-mounted application corresponding to the vehicle model information. When compiling an in-vehicle application, the present application can first determine the vehicle model information of the vehicle equipped with the target in-vehicle application, and then obtain the dedicated development information from the dedicated development file directory associated with the vehicle model information according to the vehicle model information, and obtain the public development information from the public development file directory, so as to compile and package the dedicated development information and the public development information to generate a compilation file corresponding to the vehicle model information of the target in-vehicle application. Compared with the prior art that directly classifies and manages the development information according to the vehicle model information, the present application can jointly manage the public development information and classify the dedicated development information at the same time. When making modifications, if the modification is a common problem, only the public development information needs to be updated, and there is no need to synchronize all branches. Therefore, the compilation efficiency of the in-vehicle application can be improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0025] Figure 1 It is a flowchart of a method for compiling an in-vehicle application in one embodiment;

[0026] Figure 2 A schematic diagram of a process for obtaining code information in an embodiment;

[0027] Figure 3A schematic diagram of a process for updating development information in one embodiment;

[0028] Figure 4 It is a structural block diagram of a vehicle-mounted application compiling device in one embodiment;

[0029] Figure 5 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0030] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0031] In one embodiment, Figure 1 As shown, a method for compiling an in-vehicle application is provided. This embodiment uses the method applied to a server as an example for illustration. It is understandable that the method can also be applied to a terminal, and can also be applied to a system including a terminal and a server, and is implemented through the interaction between the terminal and the server. In this embodiment, the method includes the following steps:

[0032] Step S101, obtaining vehicle model information of a vehicle for carrying a target vehicle-mounted application, and obtaining, based on the vehicle model information, dedicated development information corresponding to the target vehicle-mounted application and the vehicle model information from a pre-set dedicated development file directory associated with the vehicle model information.

[0033] Among them, the target vehicle-mounted application refers to the vehicle-mounted application that needs to be compiled to generate an application APK, for example, it can be a vehicle-mounted music APP application, and the vehicle model information refers to the model of the car used to carry the above-mentioned target vehicle-mounted application, which can include multiple types. For example, the vehicle-mounted music APP application is installed in car A and car B respectively, and the model of car A is model A, and the model of car B is model B, then the model information of the car equipped with the target vehicle-mounted application can include model A and model B.

[0034] The dedicated development file directory is used to store differentiated development information for different car models, that is, the file directory of dedicated development information. There are multiple dedicated development file directories, corresponding to different car models. For example, the dedicated development file directory may include a dedicated development file directory A and a dedicated development file directory B, wherein the dedicated development file directory A is mainly used to store the dedicated development information corresponding to car model A, and the dedicated development file directory B is used to store the dedicated development information corresponding to car model B. Taking the target in-vehicle application as an in-vehicle music APP application as an example, different car models need to use different music players. In car model A, the music player MediaPlayer needs to be used, and in car model B, the ExoPlayer needs to be used. Then, the development information related to the music player MediaPlayer can be stored in the dedicated development file directory A, and the development information related to the music player ExoPlayer can be stored in the dedicated development file directory B.

[0035] Specifically, when compiling the target vehicle-mounted application, the vehicle model information of the vehicle equipped with the above-mentioned target vehicle-mounted application can be determined first, and then based on the above-mentioned vehicle model information, the dedicated development information of the target vehicle-mounted application corresponding to each vehicle model information can be obtained from the pre-set dedicated development file directory associated with each vehicle model information.

[0036] Step S102 : acquiring public development information corresponding to the target vehicle-mounted application from a preset public development file directory.

[0037] Public development information refers to the development information used to compile the target vehicle application, which is required for all vehicle models. It can represent the common function implementation part of the target vehicle application in different vehicle models, and the public development file directory is the file directory used to store public development information. Continuing to take the target vehicle application as a vehicle music APP application as an example, the public development information can be the development information used to implement the public processing logic of the player, such as the processing logic of play, pause, previous song, next song, etc., then the public development file directory can store the development information of the public processing logic of the above player.

[0038] Specifically, when compiling the target vehicle application, the server can obtain the public development information corresponding to the target vehicle application from the public development file directory in addition to obtaining the dedicated development information from the dedicated development file directory associated with the vehicle model information.

[0039] Step S103 , compile and package the dedicated development information and the public development information to generate a compilation file of the target vehicle application corresponding to the vehicle model information.

[0040] Finally, the server can compile and package the public development information and the dedicated development information corresponding to each vehicle model information, so as to generate a compilation file corresponding to each vehicle model information of the target vehicle application. For example, after obtaining the public development information and the dedicated development information A corresponding to vehicle model A and the dedicated development information B corresponding to vehicle model B, the server can compile and package the public development information and the dedicated development information A to generate a compilation file A corresponding to vehicle model A, and compile and package the public development information and the dedicated development information B to generate a compilation file B corresponding to vehicle model B.

[0041] In the above-mentioned vehicle application compilation method, by obtaining the vehicle model information of the vehicle used to carry the target vehicle application, based on the vehicle model information, obtaining the dedicated development information of the target vehicle application corresponding to the vehicle model information from a pre-set dedicated development file directory associated with the vehicle model information; obtaining the public development information corresponding to the target vehicle application from a pre-set public development file directory; compiling and packaging the dedicated development information and the public development information to generate a compilation file of the target vehicle application corresponding to the vehicle model information. When compiling an in-vehicle application, the present application can first determine the vehicle model information of the vehicle equipped with the target in-vehicle application, and then obtain the dedicated development information from the dedicated development file directory associated with the vehicle model information according to the vehicle model information, and obtain the public development information from the public development file directory, so as to compile and package the dedicated development information and the public development information to generate a compilation file corresponding to the vehicle model information of the target in-vehicle application. Compared with the prior art that directly classifies and manages the development information according to the vehicle model information, the present application can jointly manage the public development information and classify the dedicated development information at the same time. When making modifications, if the modification is a common problem, only the public development information needs to be updated, and there is no need to synchronize all branches. Therefore, the compilation efficiency of the in-vehicle application can be improved.

[0042] In one embodiment, a dedicated development file directory includes: a dedicated code file directory, the dedicated development information includes dedicated code information corresponding to the target vehicle application and the vehicle model information; a public development file directory includes a public code file directory, and the public development information includes public code information corresponding to the target vehicle application; step S101 may further include: obtaining the dedicated code information corresponding to the target vehicle application and the vehicle model information from the dedicated code file directory associated with the vehicle model information; step S102 may further include: obtaining the public code information corresponding to the target vehicle application from the public code file directory.

[0043] In this embodiment, the development information may be code information, so the dedicated development file directory may be a dedicated code file directory for storing dedicated code information, for example, a java_sub file directory, and the java_sub file directory may include java_sub_a and java_sub_b, which respectively represent a dedicated code file directory corresponding to vehicle type A and a dedicated code file directory corresponding to vehicle type B. The dedicated code file directory of vehicle type A may store dedicated code information of vehicle type A, and the dedicated code file directory of vehicle type B may store dedicated code information of vehicle type B. Specifically, after determining each vehicle type information, the server may obtain the dedicated code information for each vehicle type information on the target vehicle from the dedicated code file directory associated with each vehicle type information.

[0044] The public code file directory may be a file directory for storing public code information, such as a java file directory, in which public code information corresponding to all vehicle models may be stored. Specifically, the server may also obtain the public code information corresponding to the target vehicle application from the pre-built public code file directory.

[0045] In this embodiment, the development information may be code information, the dedicated development file directory may be a dedicated code file directory, the dedicated development information may be dedicated code information, the public development file directory may be a public code file directory, and the public development information may be public code information. This embodiment can improve the efficiency of code file modification by distinguishing the development code into public business code and dedicated business code for differentiated needs.

[0046] In addition, if Figure 2 As shown, before step S101, the following steps may also be included:

[0047] Step S201, obtaining common code information obtained based on the common business logic of the target vehicle-mounted application, and special code information corresponding to each vehicle model information obtained based on the differentiated business logic of the target vehicle-mounted application corresponding to different vehicle model information; the common code information includes a common business logic code and an abstract interface code for calling the differentiated business logic code corresponding to each vehicle model information; the special code information corresponding to each vehicle model information includes the differentiated business logic code corresponding to each vehicle model information.

[0048] The common business logic refers to the common business logic that needs to be executed when the target vehicle application runs on different models of vehicles, and the common code information can be code information written based on the common business logic. The common code information can be composed of two parts, the common business logic code and the abstract interface code. The common business logic code is the code information used to implement the common business logic, and the abstract interface code is the code information used to call the differentiated business logic code corresponding to each vehicle model information. In this embodiment, the differentiated differentiated business logic code can be encapsulated into a unified abstract interface, so that different models can be implemented based on actual business, and the final interface implementation is completed based on the proxy design pattern.

[0049] Differentiated business logic refers to the differentiated business logic executed by the target in-vehicle application on different models of vehicles. The dedicated code information may be code information written based on the differentiated business logic, and the code information may be composed of differentiated business logic codes for implementing the differentiated business logic.

[0050] Specifically, the development user can first identify the public business logic of the target vehicle application and the differentiated business logic corresponding to different vehicle model information, and then write the public code information based on the public business logic. The public code information may include the public business logic code for implementing the public business logic and the abstract interface code for calling the differentiated business logic code corresponding to different vehicle model information. At the same time, the development user can also write the dedicated code information based on the differentiated business logic of the target vehicle application corresponding to different vehicle model information. The dedicated code information may include the differentiated business logic code for implementing the differentiated business logic of each vehicle model information. After the public code information and the dedicated code information are written, the development user can upload the above code information to the server so that the server can obtain the above public code information and dedicated code information.

[0051] Step S202, storing the public code information in a public development file directory, and storing the special code information corresponding to each vehicle model information in a special code file directory corresponding to each vehicle model information.

[0052] After obtaining the public code information and the special code information corresponding to each vehicle model, the server can store the public code information in the public development file directory, and store the special code information in the special code file directory corresponding to each vehicle model, thereby completing the storage of the code information.

[0053] In this embodiment, the common code information obtained by the common business logic of the target vehicle-mounted application and the special code information obtained by the differentiated business logic of the target vehicle-mounted application corresponding to different vehicle model information can be respectively stored in a common development file directory and a special code file directory corresponding to each vehicle model information, thereby storing the common code in the common code file directory and the special code in the special code file directory corresponding to each vehicle model. In this way, the common code and the special code can be stored separately, thereby improving the intelligence of the code storage method.

[0054] In one embodiment, a dedicated development file directory includes: a dedicated media resource directory, dedicated development information includes dedicated media resources corresponding to the target vehicle application and vehicle model information; a public development file directory includes a public media resource directory, and public development information includes public media resources corresponding to the target vehicle application; step S101 may further include: obtaining dedicated media resources corresponding to the target vehicle application and vehicle model information from the dedicated media resource directory associated with the vehicle model information; step S102 may further include: obtaining public media resources corresponding to the target vehicle application from the public development file directory.

[0055] In this embodiment, the development information may also be media resources, such as pictures, text, colors and other resources. Similar to the code, there may be the same media resources and different media resources on different vehicle models. Therefore, the dedicated development file directory may be a dedicated media resource directory for storing dedicated media resources for each vehicle model. For example, it may be a res_sub file directory. The res_sub file directory may include res_sub_a and res_sub_b, which respectively represent the dedicated media resource directory corresponding to vehicle model A and the dedicated media resource directory corresponding to vehicle model B. The dedicated media resource directory of vehicle model A may store dedicated media resources of vehicle model A, and the dedicated media resource directory of vehicle model B may store dedicated media resources of vehicle model B. Specifically, after determining each vehicle model information, the server may obtain the dedicated media resources for each vehicle model information on the target vehicle from the dedicated media resource directory associated with each vehicle model information.

[0056] The public media resource directory may be a file directory for storing public media resources, such as a res file directory, which may store public media resources corresponding to all vehicle models. Specifically, the server may also obtain the public media resources corresponding to the target vehicle-mounted application from the pre-built public media resource directory.

[0057] In this embodiment, the development information can also be a media resource, the dedicated development file directory can be a dedicated media resource directory, the dedicated development information can be a dedicated media resource, the public development file directory can be a public media resource directory, and the public development information can be a public media resource. This embodiment can improve the modification efficiency of media resources by distinguishing media resources into public media resources and dedicated media resources with differentiated needs.

[0058] In addition, before step S101, it can also include: obtaining public media resources associated with the target vehicle-mounted application, and dedicated media resources corresponding to different vehicle model information of the target vehicle-mounted application; storing the public media resources in a public media resource directory, and storing the dedicated media resources corresponding to each vehicle model information in a dedicated media resource directory corresponding to each vehicle model information.

[0059] The public media resources associated with the target vehicle-mounted application refer to the media resources that the target vehicle-mounted application needs to use when installed on different vehicle models, while the dedicated media resources corresponding to different vehicle model information of the target vehicle-mounted application refer to the differentiated media resources that the target vehicle-mounted application carries on different vehicle models. The above media resources can also be provided by the development user. The development user can identify the same resources and differentiated resources used by the target vehicle-mounted application in each vehicle model as public media resources and dedicated media resources corresponding to different vehicle models, and then store the above public media resources and dedicated media resources corresponding to different vehicle models in the server. The server can obtain the above public media resources and dedicated media resources corresponding to different vehicle models, and store the public media resources in the public media resource directory, and store the dedicated media resources corresponding to each vehicle model in the dedicated media resource directory corresponding to each vehicle model, thereby completing the storage of media resources.

[0060] In this embodiment, the public media resources of the target vehicle-mounted application and the dedicated media resources corresponding to different vehicle model information can be respectively stored in the public media resource directory and the dedicated media resource directory corresponding to each vehicle model information, so that the public media resources can be stored in the public media resource directory and the dedicated media resources can be stored in the dedicated media resource directory corresponding to each vehicle model. In this way, the public media resources and the dedicated media resources can be stored separately, thereby improving the intelligence of the media resource storage method.

[0061] In one embodiment, Figure 3 As shown, the vehicle application compilation method may further include:

[0062] Step S301 : in response to a development information update request for a target vehicle-mounted application, obtaining the information type of the development information to be updated.

[0063] The development information update request refers to a user-triggered request to update the development information of the target vehicle application, for example, it can be to update the code of the target vehicle application, or it can be to update the media resources of the target vehicle application, and the development information to be updated refers to the development information that needs to be updated corresponding to the development information update request, and the information type is used to characterize the type of the development information to be updated, and the information type can be used to determine whether the development information to be updated belongs to the dedicated development information of a specific vehicle model or the public development information of all vehicle models. Specifically, when the user initiates a development information update request for the target vehicle application, the server can first determine the information type of the development information to be updated.

[0064] Step S302 : when the information type indicates that the development information to be updated is public development information, the public development information corresponding to the target vehicle-mounted application stored in the public development file directory is updated based on the development information to be updated.

[0065] Afterwards, if the information type represents that the development information to be updated is public development information belonging to all vehicle models, for example, it may be code or media resources that need to be modified for all vehicle models. In this case, the server only needs to update the public development information corresponding to the target vehicle application stored in the public development file directory based on the development information to be updated. In this way, there is no need to synchronize the development information to be updated to all vehicle model branches like multi-branch, thereby improving the efficiency of updating the development information.

[0066] In this embodiment, when updating development information, the information type of the development information to be updated can be determined first, and if the development information to be updated is public development information, only the public development information corresponding to the target vehicle-mounted application stored in the public development file directory can be updated based on the development information to be updated, without the need to synchronize the development information to be updated to all vehicle model branches, thereby improving the efficiency of updating the development information.

[0067] Furthermore, after step S301, it may also include: when the information type indicates that the development information to be updated is dedicated development information, obtaining vehicle model information corresponding to the development information to be updated; and updating the dedicated development information corresponding to the target vehicle-mounted application stored in the dedicated development file directory associated with the vehicle model information based on the development information to be updated.

[0068] If the information type indicates that the development information to be updated is special development information that updates only the development information of a specific vehicle model, the server can first obtain the vehicle model information corresponding to the development information to be updated, and then use the development information to be updated to update the special development information corresponding to the target vehicle application stored in the special development file directory corresponding to the vehicle model information. For example, the development information to be updated is development information that updates the special development information of vehicle model B. After the server determines that the vehicle model information corresponding to the development information to be updated is vehicle model B, it can use the development information to be updated to update the special development information corresponding to the target vehicle application stored in the special development file directory associated with vehicle model B.

[0069] In this embodiment, if the development information to be updated is dedicated development information, the vehicle model corresponding to the development information to be updated can be determined first, and only the dedicated development information corresponding to the target vehicle-mounted application stored in the dedicated development file directory corresponding to the vehicle model is updated, without the need to synchronize the development information to be updated to all vehicle model branches, thereby improving the efficiency of updating the development information.

[0070] In one embodiment, a method for implementing a platform-based design of vehicle-mounted applications is also provided. Only the same set of codes is needed to quickly adapt to different vehicle models. The common parts are uniformly extracted and placed in a unified file directory. The different parts of each vehicle model are then adapted separately. The common parts exist uniformly on different vehicle models. The common parts include common code logic and common resources, where common resources refer to common pictures, common classical Chinese, etc. When it is necessary to package APKs of different vehicle models, the common parts and the different parts are combined and packaged according to different vehicle model information.

[0071] The specific implementation of the difference logic code part first needs to be encapsulated in a unified abstract interface, and different car models implement the abstract interface to realize specific different business logic. For example, most of the business logic of a page is the same on different car models, but the function that needs to be realized after clicking a button in the page is different on different car models. The difference between the different car models of the page is the business logic that needs to be realized on different car models after clicking the button. Therefore, it is necessary to abstract the click logic of the button in the page into an interface. Except for the click of the button, all other business logic is common. Then the page class is the public part and is placed under the public file directory, which is called the public business parent class. The page class of different car models inherits the aforementioned public business parent class and realizes the specific business logic after the button is clicked. The car model page class is called a differentiated business subclass, and then the differentiated business subclasses of different car models are placed in different file directories. Then, according to different car model information, the public business parent class and the differentiated business subclass are combined and packaged to realize the complete function of the page.

[0072] When there is a problem that needs to be modified, if it is a common problem, you only need to modify the public business parent class once. If it is a problem after clicking the above button, you only need to modify the differentiated business subclass of the specific model. In this way, you only need to modify it once to solve the problems of all models, instead of synchronizing the code to all model branches when modifying a problem like multiple branches, which greatly improves efficiency.

[0073] Similarly, resources such as pictures, text, and colors will have the same resources and different resources on different models. The same resources are placed in the public resource directory res, and different resources are placed in the resource directory res_sub corresponding to different models. When packaging APK, load the public resource directory res and the resource directory res_sub corresponding to the model according to different model information to form all the resources required by the model. When there are resources that need to be modified, if it is a public resource that needs to be modified, you only need to modify the directory under the public resource directory res. If it is a specific model resource that needs to be modified, you only need to modify the resources under the resource directory res_sub corresponding to the model.

[0074] The specific implementation of this method can be found in the following example:

[0075] 1. Implementation of logic code:

[0076] (1) Identify the common business codes for all vehicle models and the different business codes for differentiated needs. Encapsulate a unified abstract interface based on the differentiated business codes so that different vehicle models can implement specific operations based on actual business. The final interface implementation is completed based on the proxy design pattern.

[0077] For example, a car music APP application needs to use different music players in different car models. In car model A, the music player MediaPlayer needs to be used, and in car model B, the ExoPlayer needs to be used. Obviously, the common business is to play, pause, switch songs, etc. on the playback interface, and differentiation requires the construction of specific different music players. Therefore, it is necessary to define the common abstract interface IPlayerInterface of the player, which contains the player control methods such as play, pause, previous song, next song, etc., and declare the player variable musicPlayer of IPlayerInterface type in the playback interface MusicPlayPage.

[0078] Since the playback control logic is completed by the players of different models, it is necessary to define the player proxy class:

[0079] Model A is defined as MediaPlayerProxy, which wraps the MediaPlayer object. The actual playback control logic is completed by MediaPlayer.

[0080] Model B is defined as ExoPlayerProxy, which wraps the ExoPlayer object. The actual playback control logic is completed by ExoPlayer.

[0081] (2) Place the public business code and abstract interface files in (1) in the Java file directory:

[0082] The aforementioned player interface parent class MusicPlayPage and player abstract interface class IPlayerInterface are placed in the public java file directory.

[0083] (3) The specific vehicle model business requirement subclass inherits the public business code class in (1) to implement the abstract interface. The specific vehicle model subclass file is placed in the java_sub file directory corresponding to the vehicle model.

[0084] For example, in (1), model A needs to use MediaPlayer. In model A, the player interface subclass needs to construct a MediaPlayerProxy object, so the player interface subclass MusicPlayPageA and the player proxy class MediaPlayerProxy corresponding to model A are placed in the code file directory java_sub_aaa corresponding to model A.

[0085] Similarly, model B in (1) needs to use ExoPlayer, so the player interface subclass in model B needs to construct the ExoPlayerProxy object of the ExoPlayer player proxy class. Therefore, the player interface subclass MusicPlayPageB and the player proxy class ExoPlayerProxy corresponding to model B are placed in the code file directory java_sub_bbb corresponding to model B.

[0086] (4) Based on different vehicle model information, the java file directory and the java_sub file directory corresponding to different vehicle models are combined to form all the business codes for the vehicle model;

[0087] (5) When compiling and packaging, dynamically configure various vehicle model information.

[0088] 2. Resource loading implementation method:

[0089] (1) Identify the common resources and differentiated resources used by each vehicle model;

[0090] (2) Put the same resources in the res directory, and put the different resources for each model in the res_sub directory corresponding to each model;

[0091] (3) Based on different vehicle model information, the res file directory and the res_sub file directory corresponding to different vehicle models are combined to form all the resources of the vehicle model.

[0092] 3. Packaging method implementation:

[0093] Based on the above one and two, when compiling and packaging, the public java file directory, the public resource file directory res, and the java_sub file directory and res_sub file directory corresponding to the vehicle model selected based on different vehicle model information are combined together to construct all the resources required for different vehicle models and packaged into the application APK of the vehicle model.

[0094] In this embodiment, the architecture design can be completed with the proxy design pattern, the public services are encapsulated in the public service base class, the differentiated requirements are abstracted into a unified interface, and the abstract method encapsulation of the differentiated requirements is completed in the public service base class; the public service base class and the unified abstract interface are placed in a unified public code file directory; the actual service subclass based on the specific vehicle model inherits the public service base class to complete the specific implementation of the abstract method in the public service base class, and the implementation class file is placed in the code file directory corresponding to the vehicle model; the same resource files of each vehicle model are placed in a unified resource file directory, and the resource files specific to each vehicle model are placed in the resource file directory of the corresponding vehicle model; when compiling and packaging the application APK, the compilation server is configured with different vehicle model information, and based on different vehicle model information, the java file directory, java_sub file directory, res file directory, and res_sub file directory are used to combine into all the compiled files required for the specific vehicle model.

[0095] Through this embodiment, the traditional method of maintaining codes in multiple branches of multiple models is solved, and the problem that any code modification needs to be submitted to all branches at the same time is avoided. The risk of missing branch codes can be avoided, and the situation that a certain problem has been solved in other models but not in a certain model can be avoided. In addition, the development efficiency can be greatly improved, and the new model business can be quickly adapted. The new model only needs to adapt to differentiated requirements, and the public part does not need to be changed. The code quality can also be greatly improved, the problem rate can be reduced, and the problem can be quickly located. Because each time a new model is added, only the different parts need to be implemented, so only the different parts will cause problems, and the public part will become more and more stable. It can also greatly reduce labor costs and time costs, because the different parts only need to invest very little manpower and time to develop.

[0096] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0097] Based on the same inventive concept, the embodiment of the present application also provides a vehicle-mounted application compilation device for implementing the vehicle-mounted application compilation method involved above. The implementation solution provided by the device to solve the problem is similar to the implementation solution recorded in the above method, so the specific limitations in one or more vehicle-mounted application compilation device embodiments provided below can refer to the limitations of the vehicle-mounted application compilation method above, and will not be repeated here.

[0098] In one embodiment, Figure 4 As shown, a vehicle-mounted application compilation device is provided, including: a dedicated information acquisition module 401, a public information acquisition module 402 and a compilation file generation module 403, wherein:

[0099] The dedicated information acquisition module 401 is used to acquire the vehicle model information of the vehicle used to carry the target vehicle application, and acquire the dedicated development information corresponding to the target vehicle application and the vehicle model information from the dedicated development file directory associated with the vehicle model information in advance according to the vehicle model information;

[0100] The public information acquisition module 402 is used to acquire the public development information corresponding to the target vehicle-mounted application from a preset public development file directory;

[0101] The compilation file generation module 403 is used to compile and package the dedicated development information and the public development information to generate a compilation file corresponding to the vehicle model information of the target vehicle application.

[0102] In one embodiment, a dedicated development file directory includes: a dedicated code file directory, the dedicated development information includes dedicated code information corresponding to the target vehicle application and the vehicle model information; a public development file directory includes a public code file directory, the public development information includes public code information corresponding to the target vehicle application; a dedicated information acquisition module 401 is further used to obtain the dedicated code information corresponding to the target vehicle application and the vehicle model information from the dedicated code file directory associated with the vehicle model information; the public information acquisition module 402 is further used to obtain the public code information corresponding to the target vehicle application from the public code file directory.

[0103] In one embodiment, the vehicle application compilation device also includes: a development information acquisition module, which is used to obtain common code information obtained based on the common business logic of the target vehicle application, and special code information corresponding to each vehicle model information obtained based on the differentiated business logic of the target vehicle application corresponding to different vehicle model information; the common code information includes common business logic code and abstract interface code for calling differentiated business logic code corresponding to each vehicle model information; the special code information corresponding to each vehicle model information includes differentiated business logic code corresponding to each vehicle model information; the common code information is stored in a common development file directory, and the special code information corresponding to each vehicle model information is stored in a special code file directory corresponding to each vehicle model information.

[0104] In one embodiment, a dedicated development file directory includes: a dedicated media resource directory, dedicated development information includes dedicated media resources corresponding to the target vehicle application and vehicle model information; a public development file directory includes a public media resource directory, public development information includes public media resources corresponding to the target vehicle application; a dedicated information acquisition module 401 is further used to obtain dedicated media resources corresponding to the target vehicle application and vehicle model information from the dedicated media resource directory associated with the vehicle model information; the public information acquisition module 402 is further used to obtain public media resources corresponding to the target vehicle application from the public development file directory.

[0105] In one embodiment, the vehicle-mounted application compilation device also includes: a development information acquisition module, which is used to obtain public media resources associated with the target vehicle-mounted application, and special media resources corresponding to different vehicle model information of the target vehicle-mounted application; store the public media resources in a public media resource directory, and store the special media resources corresponding to each vehicle model information in a special media resource directory corresponding to each vehicle model information.

[0106] In one embodiment, the vehicle-mounted application compilation device also includes: a development information update module, which is used to respond to a development information update request for a target vehicle-mounted application and obtain the information type of the development information to be updated; when the information type indicates that the development information to be updated is public development information, the public development information corresponding to the target vehicle-mounted application stored in the public development file directory is updated based on the development information to be updated.

[0107] In one embodiment, the development information update module is also used to obtain vehicle model information corresponding to the development information to be updated when the information type indicates that the development information to be updated is dedicated development information; and to update the dedicated development information corresponding to the target vehicle-mounted application stored in the dedicated development file directory associated with the vehicle model information based on the development information to be updated.

[0108] Each module in the above-mentioned vehicle-mounted application compilation device can be implemented in whole or in part by software, hardware, or a combination thereof. Each of the above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the corresponding operations of each of the above modules.

[0109] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 5 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store dedicated development information and public development information. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for compiling an in-vehicle application is implemented.

[0110] Those skilled in the art will understand that Figure 5 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0111] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.

[0112] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0113] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.

[0114] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0115] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.

[0116] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0117] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A method for compiling an in-vehicle application, characterized in that: The method comprises: Acquire vehicle model information of a vehicle for carrying a target vehicle-mounted application, and acquire, based on the vehicle model information, dedicated development information of the target vehicle-mounted application corresponding to the vehicle model information from a pre-set dedicated development file directory associated with the vehicle model information; Acquire public development information corresponding to the target vehicle-mounted application from a preset public development file directory; The dedicated development information and the public development information are compiled and packaged to generate a compilation file of the target vehicle application corresponding to the vehicle model information.

2. The method according to claim 1, characterized in that: The dedicated development file directory includes: a dedicated code file directory, the dedicated development information includes dedicated code information corresponding to the target vehicle application and the vehicle model information; the public development file directory includes a public code file directory, the public development information includes public code information corresponding to the target vehicle application; The acquiring, from a preset directory of dedicated development files associated with the vehicle type information, dedicated development information corresponding to the target vehicle application and the vehicle type information comprises: Acquire the dedicated code information corresponding to the target vehicle application and the vehicle model information from the dedicated code file directory associated with the vehicle model information; The obtaining the public development information corresponding to the target vehicle-mounted application from a preset public development file directory includes: Obtain public code information corresponding to the target vehicle-mounted application from the public code file directory.

3. The method according to claim 2, characterized in that Before obtaining the vehicle model information of the vehicle carrying the target vehicle application, the method further includes: Acquire common code information obtained based on the common business logic of the target vehicle-mounted application, and special code information corresponding to each vehicle type information obtained based on the differentiated business logic of the target vehicle-mounted application corresponding to different vehicle type information; the common code information includes a common business logic code and an abstract interface code for calling the differentiated business logic code corresponding to each vehicle type information; the special code information corresponding to each vehicle type information includes the differentiated business logic code corresponding to each vehicle type information; The public code information is stored in the public development file directory, and the special code information corresponding to each vehicle model information is stored in the special code file directory corresponding to each vehicle model information.

4. The method according to claim 1, characterized in that The dedicated development file directory includes: a dedicated media resource directory, the dedicated development information includes the dedicated media resources corresponding to the target vehicle application and the vehicle model information; the public development file directory includes a public media resource directory, the public development information includes the public media resources corresponding to the target vehicle application; The acquiring, from a preset directory of dedicated development files associated with the vehicle type information, dedicated development information corresponding to the target vehicle application and the vehicle type information comprises: Acquire the dedicated media resource corresponding to the target vehicle application and the vehicle model information from the dedicated media resource directory associated with the vehicle model information; The obtaining the public development information corresponding to the target vehicle-mounted application from a preset public development file directory includes: Obtain public media resources corresponding to the target vehicle-mounted application from the public development file directory.

5. The method according to claim 4, characterized in that Before obtaining the vehicle model information of the vehicle carrying the target vehicle application, the method further includes: Acquire the public media resources associated with the target vehicle-mounted application and the dedicated media resources of the target vehicle-mounted application corresponding to different vehicle model information; The public media resources are stored in the public media resource directory, and the dedicated media resources corresponding to each vehicle type information are stored in the dedicated media resource directory corresponding to each vehicle type information.

6. The method according to any one of claims 1 to 5, characterized in that: The method further comprises: In response to a development information update request for the target vehicle-mounted application, obtaining an information type of the development information to be updated; In a case where the information type indicates that the development information to be updated is public development information, the public development information corresponding to the target in-vehicle application stored in the public development file directory is updated based on the development information to be updated.

7. The method according to claim 6, characterized in that After obtaining the information type of the development information to be updated, the method further includes: When the information type indicates that the development information to be updated is dedicated development information, obtaining vehicle model information corresponding to the development information to be updated; The dedicated development information corresponding to the target vehicle-mounted application stored in the dedicated development file directory associated with the vehicle model information is updated based on the development information to be updated.

8. A vehicle-mounted application compilation device, characterized in that: The device comprises: A dedicated information acquisition module, used to acquire vehicle model information of a vehicle used to carry a target vehicle-mounted application, and acquire dedicated development information corresponding to the target vehicle-mounted application and the vehicle model information from a pre-set dedicated development file directory associated with the vehicle model information according to the vehicle model information; A public information acquisition module, used to acquire the public development information corresponding to the target vehicle-mounted application from a preset public development file directory; The compilation file generation module is used to compile and package the dedicated development information and the public development information to generate a compilation file of the target vehicle application corresponding to the vehicle model information.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Application installation package compiling method and device, storage medium and terminal

    CN109857405A

  • Application program development method and device, terminal equipment and readable storage medium

    CN113760239A

  • Vehicle-mounted system configuration method, device and system, vehicle, electronic equipment and medium

    CN114924785A

  • Application updating method and device

    CN116737200A

  • Application development method and tool, device, and storage medium thereof

    WO2018177260A1

Cited By

  • Software integration system and method, software configuration system and method, vehicle and electronic equipment

    CN121143900A