Development method, software product, device, vehicle and storage medium
By dynamically assigning communication configuration parameters to on-board applications, the problem of low development efficiency caused by the large number of configuration items in on-board software development is solved, and a more efficient development process and more reliable parameter management is achieved.
Patent Information
- Application Number
- CN202410272102.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-08
- Publication Date
- 2025-06-13
AI Technical Summary
In the development of existing in-vehicle software, the development efficiency of application software is mainly due to the need to configure a large number of service interface configuration items and operation parameter configuration items.
By assigning communication configuration parameters to the application when it is running it, developers only need to generate applications on the development device without configuring communication configuration parameters. The method includes obtaining preset parameter configuration information, determining unoccupied parameter values, and assigning these parameter values to the application.
It reduces the number of configuration items that developers need to configure, improves the development efficiency of application software, and ensures the reliability and availability of parameter allocation.
Smart Images

Figure CN120144145A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of vehicle networking, and particularly to a development method, software product, device, vehicle, and storage medium. Background Art
[0002] With the continuous development of vehicle technologies, people's requirements for vehicle intelligence are also getting higher and higher. Intelligent vehicles are a typical type of high-tech vehicles, which integrate various auxiliary functions, including but not limited to sensing functions, planning and control functions, adaptive cruise functions, and autonomous driving functions, etc. These auxiliary functions make vehicles more and more intelligent and electronic, but at the same time, they also make the software structure of vehicles more and more complex.
[0003] Currently, when developers develop application software for in-vehicle auxiliary functions, even for a very simple application software, they often need to configure a very large number of configuration items, including service interface configuration items and configuration items for related operating configuration parameters. These large numbers of configuration items will greatly reduce the development efficiency of application software and are not conducive to improving the development experience of developers.
[0004] In summary, how to improve the development efficiency of application software is a technical problem that urgently needs to be solved in the current field of in-vehicle software development. Summary of the Invention
[0005] This application provides a development method, software product, device, vehicle, and storage medium to improve the development efficiency of application software.
[0006] In a first aspect, this application provides a development method, which includes: First, obtain first development information, where the first development information includes a first application program, and the first application program is an application program generated by a user on a development device; then, run the first application program and allocate first communication configuration parameters to the first application program.
[0007] By using the above method, by allocating the first communication configuration parameters to the first application program when running the first application program, developers can generate the first application program only on the development device without needing to configure the communication configuration parameters of the first application program. In this way, the number of configuration items that developers need to configure can be reduced, effectively improving the development efficiency of developers for application software.
[0008] In a possible design, allocating the first communication configuration parameters to the first application program includes: First, obtain preset parameter configuration information, where the preset parameter configuration information includes the allocation range of resource type parameters; then, determine the unoccupied parameter values of the resource type parameters in the allocation range of the resource type parameters, and allocate the unoccupied parameter values of the resource type parameters to the first application program.
[0009] With the above design, it can be ensured that the resource class parameters allocated to the first application are not occupied by other applications, thereby ensuring that the resource class parameters of each application do not conflict, guaranteeing the reliability and availability of parameter allocation, and at the same time reducing development costs and maintenance costs.
[0010] In a possible design, when allocating the first communication configuration parameters to the first application, it includes: First, obtain the preset parameter configuration information, which includes the default parameter values of non-resource class parameters; then, determine whether the specified parameter values of non-resource class parameters are indicated in the first development information. If so, allocate the specified parameter values of non-resource class parameters to the first application. If not, allocate the default parameter values of non-resource class parameters to the first application.
[0011] With the above design, the specified non-resource class parameters or default non-resource class parameters can be allocated to the first application, so as to be adaptable to business scenarios with specified requirements or business scenarios without specified requirements, and realize the universality of the development method.
[0012] In a possible design, after allocating the first communication configuration parameters to the first application, it further includes: storing the first communication configuration parameters corresponding to the first application into the parameter allocation information. Among them, the parameter allocation information includes the communication configuration parameters corresponding to one or more applications, and the communication configuration parameters corresponding to one or more applications can be allocated to the application by the running device, or can be modified by the user, or can be carried in the development information.
[0013] With the above design, by setting the parameter allocation information to store the communication configuration parameters corresponding to the application, it can provide a reference benchmark for the subsequent allocation operation of the application, and by updating the communication configuration parameters in the reference benchmark in real time, its comprehensiveness and accuracy can be ensured.
[0014] In a further possible design, after storing the first communication configuration parameters corresponding to the first application into the parameter allocation information, it further includes: marking the parameter values of the resource class parameters in the first communication configuration parameters as occupied.
[0015] With the above design, by marking the occupied resource class parameters in the parameter allocation information, when allocating communication configuration parameters to the application, the unoccupied resource class parameters can be quickly located, and thus the allocation efficiency of the unoccupied resource class parameters can be improved.
[0016] In a possible design, before allocating the first communication configuration parameters to the first application, it further includes: determining that there is no second communication configuration parameter corresponding to the first application in the parameter allocation information.
[0017] With the above design, the first communication configuration parameter will only be allocated to the first application if no communication configuration parameter has been allocated to the first application before. This can avoid the phenomenon of repeatedly allocating communication configuration parameters to the same application, save meaningless operation processes, and reduce resource overhead.
[0018] In a further possible design, if there is a second communication configuration parameter corresponding to the first application in the parameter allocation information, a communication channel for the first application can be established based on the second communication configuration parameter.
[0019] With the above design, the communication configuration parameter included in the parameter allocation information can be directly used to establish a communication channel, so as to improve the startup efficiency of the application.
[0020] In a possible design, after allocating the first communication configuration parameter to the first application, it further includes: exporting the first communication configuration parameter to the development device based on the first instruction, and obtaining a third communication configuration parameter, where the third communication configuration parameter is obtained after the user modifies the first communication configuration parameter on the development device. The first instruction can be, for example, an update instruction, an export instruction, a copy instruction, or other instructions of the developer. In the scenario where the first instruction is received, a communication channel can be established based on the third communication configuration parameter modified by the developer. In the scenario where the first instruction is not received, a communication channel can be directly established based on the automatically allocated first communication configuration parameter.
[0021] With the above design, when the automatically allocated communication configuration parameter does not meet the actual scenario requirements, it can also support the developer to modify one or more configuration items in the automatically allocated communication configuration parameter, so that the communication configuration parameter that meets the actual scenario requirements can be used to start or run the application.
[0022] In a further possible design, after obtaining the third communication configuration parameter, it further includes: updating the first communication configuration parameter corresponding to the first application in the parameter allocation information according to the third communication configuration parameter. The update method can be modification, marking, or overwriting, etc.
[0023] With the above design, the communication configuration parameter stored in the parameter allocation information can be updated in real time to ensure its accuracy.
[0024] In a further possible design, the third communication configuration parameter can also be stored in the development device; the method further includes: obtaining second development information, where the second development information includes the first application and the third communication configuration parameter, running the first application, and establishing a communication channel for the first application based on the third communication configuration parameter.
[0025] With the above design, the exported communication configuration parameters can also be stored as static communication configuration parameters in the development device. In this way, the next time an application is developed, the static communication configuration parameters in the development device can be directly obtained, and the application can be directly run for testing without allocating communication configuration parameters for the application again, thereby improving the initialization speed of the application startup.
[0026] In a possible design, before allocating the first communication configuration parameter for the first application, it further includes: determining that the fourth communication configuration parameter of the first application is not included in the first development information.
[0027] With the above design, only when there are no static communication configuration parameters will communication configuration parameters be dynamically allocated for the application, thus avoiding unnecessary allocation processes and saving processing resources.
[0028] In a further possible design, if the fourth communication configuration parameter of the first application is included in the first development information, a communication channel for the first application is established based on the fourth communication configuration parameter.
[0029] With the above design, in the case of the existence of static communication configuration parameters, the application can be directly run using the static configuration parameters, thus improving the initialization speed of the application.
[0030] In a further possible design, in the case where the fourth communication configuration parameter of the first application is included in the first development information, the method further includes: obtaining parameter allocation information and querying whether there is a second communication configuration parameter corresponding to the first application in the parameter allocation information. If there is a second communication configuration parameter corresponding to the first application in the parameter allocation information, but the second communication configuration parameter is different from the fourth communication configuration parameter, or there is a second communication configuration parameter corresponding to another application in the parameter allocation information, a first prompt message is generated, and the first prompt message is used to prompt that the fourth communication configuration parameter is incorrect.
[0031] With the above design, the communication configuration parameters dynamically allocated in the parameter allocation information can be used to verify the static communication configuration parameters to detect parameter inconsistency errors or resource conflict errors, and then it is convenient to prompt the developer to modify the incorrect communication configuration parameters in time to ensure that the application runs using the correct communication configuration parameters and improve the running accuracy.
[0032] In a further possible design, when the fourth communication configuration parameter corresponding to the application does not exist in the parameter allocation information, the fourth communication configuration parameter corresponding to the first application can also be stored in the parameter allocation information.
[0033] With the above design, static communication configuration parameters can be used to complete the parameter allocation information to ensure the comprehensiveness of the parameter allocation information.
[0034] In a possible design, the first application program can be a server application program or a client application program for in-vehicle services.
[0035] With the above design, the development efficiency of in-vehicle service software for developers can be improved to meet the growing in-vehicle service requirements.
[0036] In a second aspect, the present application provides a software product, which includes: a communication middleware and a parameter server; the communication middleware is used for sending a parameter request message to the parameter server when running a first application program, the first application program is included in the first development information, and the first application program is an application program generated by a user on a development device; the parameter server is used for allocating first communication configuration parameters for the first application program according to the parameter request message and sending the first communication configuration parameters to the communication middleware.
[0037] With the above solution, by setting a parameter server outside the communication middleware, flexible management and allocation of communication configuration parameters for each application program can be achieved by the parameter server, that is, various operations related to communication configuration parameters can be independently implemented through a separate software process.
[0038] In a possible design, the communication middleware is further used for: establishing a communication channel for the first application program based on the first communication configuration parameters.
[0039] In a possible design, the parameter server is specifically used for: first, obtaining preset parameter configuration information, where the preset parameter configuration information includes the allocation range of resource type parameters; then, determining the unoccupied parameter values of the resource type parameters in the allocation range of the resource type parameters and allocating the unoccupied parameter values of the resource type parameters to the first application program.
[0040] In a possible design, the parameter server is specifically used for: first, obtaining preset parameter configuration information, where the preset parameter configuration information includes the default parameter values of non-resource type parameters; then, determining whether the first development information further indicates the specified parameter values of the non-resource type parameters, if so, allocating the specified parameter values of the non-resource type parameters to the first application program, if not, allocating the default parameter values of the non-resource type parameters to the first application program.
[0041] In a possible design, after the parameter server allocates the first communication configuration parameter for the first application, it is further used to: store the first communication configuration parameter corresponding to the first application into the parameter allocation information. The parameter allocation information includes communication configuration parameters corresponding to one or more applications, and the communication configuration parameters corresponding to one or more applications are allocated by the parameter server to one or more applications, or modified by the user, or carried in the development information.
[0042] In a possible design, before the parameter server allocates the first communication configuration parameter for the first application, it is further used to: query the parameter allocation information according to the parameter request message, and determine that there is no second communication configuration parameter corresponding to the first application in the parameter allocation information.
[0043] In a further possible design, the parameter server is further used to: if there is a second communication configuration parameter corresponding to the first application in the parameter allocation information, send the second communication configuration parameter to the communication middleware.
[0044] In a further possible design, the communication middleware is further used to: establish a communication channel for the first application based on the second communication configuration parameter.
[0045] In a possible design, the parameter server is further used to: export the first communication configuration parameter to the development device based on the first instruction, and obtain the third communication configuration parameter imported by the development device, and then send the third communication parameter to the communication middleware. The third communication configuration parameter is obtained after the user modifies the first communication configuration parameter on the development device.
[0046] In a further possible design, the communication middleware is further used to: establish a communication channel for the first application based on the third communication configuration parameter.
[0047] In a further possible design, after the parameter server obtains the third communication configuration parameter imported by the development device, it is further used to: update the first communication configuration parameter corresponding to the first application in the parameter allocation information according to the third communication configuration parameter.
[0048] In a further possible design, the third communication configuration parameter is also stored in the development device. In this case, the communication middleware is further used to: when the second development information includes the first application and the third communication configuration parameter, when running the first application in the second development information, establish a communication channel for the first application based on the third communication configuration parameter.
[0049] In a possible design, before the communication middleware allocates the first communication configuration parameter for the first application, it is further used to: determine that the first development information does not include the fourth communication configuration parameter of the first application.
[0050] In a further possible design, the communication middleware is further configured to: if the first development information includes the fourth communication configuration parameter of the first application program, establish a communication channel for the first application program based on the fourth communication configuration parameter.
[0051] In a further possible design, the communication middleware is further configured to: send a parameter verification request to the parameter server, where the parameter verification request includes the fourth communication configuration parameter; the parameter server is further configured to: obtain parameter allocation information, and if the second communication configuration parameter corresponding to the first application program exists in the parameter allocation information but is different from the fourth communication configuration parameter, or if the fourth communication configuration parameter corresponding to other application programs exists in the parameter allocation information, return a response message indicating parameter verification failure to the communication middleware; the communication middleware is further configured to: generate a first prompt message according to the response message indicating parameter verification failure, and the first prompt message is used to prompt that the fourth communication configuration parameter is incorrect.
[0052] In a further possible design, the parameter server is further configured to: if the fourth communication configuration parameter corresponding to the application program does not exist in the parameter allocation information, store the fourth communication configuration parameter corresponding to the first application program in the parameter allocation information.
[0053] In a further possible design, the parameter server is further configured to: if the second communication configuration parameter corresponding to the first application program exists in the parameter allocation information but is different from the fourth communication configuration parameter, return a response message indicating parameter verification inconsistency to the communication middleware; if the fourth communication configuration parameter corresponding to other application programs exists in the parameter allocation information, return a response message indicating parameter resource conflict to the communication middleware.
[0054] In a third aspect, the present application provides a development device, and the development device can be a device or component that uses the communication middleware for communication. For example, when the development solution is applied to the field of intelligent driving, the development device can be a vehicle, an in-vehicle device or an in-vehicle component, or can also be an embedded device that is embedded in the vehicle and can control the vehicle, the in-vehicle device or the in-vehicle component to run the application program in the operating environment of the vehicle. Alternatively, it can also be a device or component outside the vehicle, such as a device, a development device or its component dedicated to testing. These devices or components also need to be encapsulated with the in-vehicle communication middleware and the underlying operating environment to smoothly run the application program.
[0055] The development device includes: an acquisition unit, configured to acquire first development information, where the first development information includes a first application program, and the first application program is an application program generated by a user on a development device; an allocation unit, configured to run the first application program and allocate a first communication configuration parameter for the first application program.
[0056] In a possible design, the development device may further include a communication unit, and the communication unit is configured to: establish a communication channel for a first application based on first communication configuration parameters.
[0057] In a possible design, the first application may be a server application or a client application of in-vehicle service type.
[0058] In a possible design, the allocation unit is specifically configured to: first, obtain preset parameter configuration information, where the preset parameter configuration information includes the allocation range of resource type parameters; then, determine the unoccupied parameter values of the resource type parameters within the allocation range of the resource type parameters; and then, allocate the unoccupied parameter values of the resource type parameters to the first application.
[0059] In a possible design, the allocation unit is specifically configured to: first, obtain preset parameter configuration information, where the preset parameter configuration information includes the default parameter values of non-resource type parameters; then, if the first development information also indicates the specified parameter values of the non-resource type parameters, allocate the specified parameter values of the non-resource type parameters to the first application; or, if the first development information does not indicate the specified parameter values of the non-resource type parameters, allocate the default parameter values of the non-resource type parameters to the first application.
[0060] In a possible design, after allocating the first communication configuration parameters to the first application, the allocation unit is further configured to: store the first communication configuration parameters corresponding to the first application into the parameter allocation information. Wherein, the parameter allocation information includes the communication configuration parameters corresponding to one or more applications, and the communication configuration parameters corresponding to one or more applications are allocated to the applications by the running device, or modified by the user, or carried in the development information.
[0061] In a possible design, before allocating the first communication configuration parameters to the first application, the allocation unit is further configured to: determine that there is no second communication configuration parameter corresponding to the first application in the parameter allocation information.
[0062] In a further possible design, the allocation unit is further configured to: if there is a second communication configuration parameter corresponding to the first application in the parameter allocation information, establish a communication channel for the first application based on the second communication configuration parameter.
[0063] In a possible design, the allocation unit is further configured to: export the first communication configuration parameters to the development device based on a first instruction; the acquisition unit is further configured to: acquire third communication configuration parameters, where the third communication configuration parameters are obtained after the user modifies the first communication configuration parameters on the development device.
[0064] In a further possible design, the development device may further include a communication unit, and the communication unit is configured to: establish a communication channel for a first application program based on a third communication configuration parameter.
[0065] In a further possible design, after the obtaining unit obtains the third communication configuration parameter, the allocation unit is further configured to: update the first communication configuration parameter corresponding to the first application program in the parameter allocation information according to the third communication configuration parameter.
[0066] In a further possible design, the third communication configuration parameter is further stored in the development device. In this case, the obtaining unit is further configured to: obtain second development information, where the second development information includes the first application program and the third communication configuration parameter; the communication unit is further configured to: run the first application program and establish a communication channel for the first application program based on the third communication configuration parameter.
[0067] In a possible design, before the allocation unit allocates the first communication configuration parameter for the first application program, the allocation unit is further configured to: determine that the fourth communication configuration parameter of the first application program is not included in the first development information.
[0068] In a further possible design, the development device may further include a communication unit, and the allocation unit is further configured to: if the fourth communication configuration parameter of the first application program is included in the first development information, instruct the communication unit to establish a communication channel for the first application program based on the fourth communication configuration parameter.
[0069] In a further possible design, the obtaining unit is further configured to: obtain parameter allocation information; the allocation unit is further configured to: if there is a second communication configuration parameter corresponding to the first application program in the parameter allocation information, but the second communication configuration parameter is different from the fourth communication configuration parameter, or there is a fourth communication configuration parameter corresponding to another application program in the parameter allocation information, generate a first prompt message, and the first prompt message is used to prompt that an error occurs in the fourth communication configuration parameter.
[0070] In a further possible design, the allocation unit is further configured to: when there is no fourth communication configuration parameter corresponding to the application program in the parameter allocation information, store the fourth communication configuration parameter corresponding to the first application program into the parameter allocation information.
[0071] In a fourth aspect, the present application provides a development device, including a processor, the processor is coupled to a memory, and the processor is configured to execute computer programs or instructions stored in the memory, so that the development device executes the development method as described in the first aspect or any one of the designs in the first aspect above.
[0072] Fifth aspect, the present application provides a vehicle, including units or modules for implementing the development method in the above-mentioned first aspect or any design of the above-mentioned first aspect. For example, it may include the development device in the above-mentioned third aspect or any design of the above-mentioned third aspect, or may include the development device in the above-mentioned fourth aspect.
[0073] Sixth aspect, the present application provides a test device, which includes the operating environment required for the first application. The test device can implement the development method in the above-mentioned first aspect or any design of the above-mentioned first aspect. The test device may include units or modules for implementing the development method in the above-mentioned first aspect or any design of the above-mentioned first aspect. For example, it may include the development device in the above-mentioned third aspect or any design of the above-mentioned third aspect, or may include the development device in the above-mentioned fourth aspect.
[0074] Seventh aspect, the present application provides a computer-readable storage medium, which stores a program or instructions. When the program or instructions are executed, the development method in the above-mentioned first aspect or any design of the above-mentioned first aspect is implemented.
[0075] Eighth aspect, the present application provides a computer program product, which includes computer program code. When the computer program code runs on a computer, the computer is caused to execute the development method in the above-mentioned first aspect or any design of the first aspect.
[0076] The technical effects that can be achieved by the above-mentioned second aspect to the eighth aspect can refer to the description of the beneficial effects in the above-mentioned first aspect, and will not be repeated here one by one. Description of the Drawings
[0077] Figure 1 Exemplarily shows a schematic diagram of a possible application scenario provided by the present application;
[0078] Figure 2 Exemplarily shows a schematic diagram of the software architecture for application development provided by the present application;
[0079] Figure 3a Exemplarily shows a schematic diagram of the configuration process of an AP CM;
[0080] Figure 3b Exemplarily shows a schematic diagram of the process of a development method provided by the industry;
[0081] Figure 4 Exemplarily shows a schematic diagram of the process of a development method provided by the present application;
[0082] Figure 5 Exemplarily shows a schematic diagram of the process of configuring an application program in a development device provided by the present application;
[0083] Figure 6 Exemplarily shown is a schematic diagram of a software architecture of an operating device provided by the present application;
[0084] Figure 7 Exemplarily shown is a schematic diagram of a distribution process of communication configuration parameters provided by the present application;
[0085] Figure 8 Exemplarily shown is a development flow chart of a server application provided by the present application;
[0086] Figure 9 Exemplarily shown is a development flow chart of a client application provided by the present application;
[0087] Figure 10 Exemplarily shown is a schematic diagram of a modification process of communication configuration parameters provided by the present application;
[0088] Figure 11 Exemplarily shown is a schematic diagram of a process of modifying communication configuration parameters in a development device provided by the present application;
[0089] Figure 12 Exemplarily shown is a schematic diagram of a process of running an application using the modified communication configuration parameters provided by the present application;
[0090] Figure 13 Exemplarily shown is a schematic diagram of a verification process of communication configuration parameters provided by the present application;
[0091] Figure 14 Exemplarily shown is a complete flow chart of a development method provided by the present application;
[0092] Figure 15 Exemplarily shown is a schematic diagram of a parameter optimization interface provided by the present application;
[0093] Figure 16 Exemplarily shown is a possible structural schematic diagram of a development device provided by the present application;
[0094] Figure 17 Exemplarily shown is a possible structural schematic diagram of another development device provided by the present application. Detailed implementation manners
[0095] Next, embodiments of the present application will be described in detail with reference to the accompanying drawings.
[0096] Hereinafter, possible application scenarios of the present application will be introduced. It should be noted that these introductions are for the convenience of those skilled in the art to understand and do not constitute a limitation on the protection scope required by the present application.
[0097] Please refer toFigure 1 , showing a schematic diagram of a possible application scenario provided by the present application. The illustration takes the development solution applied to the vehicle networking as an example. As Figure 1 shown, this application scenario includes a development device 100 and an operating device 200. The development device 100 refers to a device for developers to develop software programs and related configuration files, and specifically can be a computer, a laptop, or other user terminals. The operating device 200 refers to a device that runs the software programs developed by developers, and specifically can be a vehicle or components in a vehicle, such as in-vehicle chips, in-vehicle controllers, in-vehicle terminals, in-vehicle modules, in-vehicle component groups, in-vehicle components, in-vehicle units, or in-vehicle sensors, etc., or can also be devices or components outside the vehicle, such as embedded devices, servers, cloud servers, laptops, mobile phones, wearable devices, robots, and smart home devices, etc., or can also be the development device, that is, the development device 100 and the operating device 200 are the same device. It should be noted that when the operating device 200 is a device or component outside the vehicle, the operating environment information required for the software to be developed to run in an actual vehicle can also be configured in these devices or components, so as to be able to replace the actual vehicle to implement the running test of the software to be developed.
[0098] As Figure 1 shown, development information can be transmitted between the development device 100 and the operating device 200. The development information includes the software programs developed by developers in the development device 100, or may also include related configuration files. Among them, there are many ways to transmit the development information. For example, in one example, the development device 100 and the operating device 200 can be connected by wired or wireless means. In this case, the development device 100 can automatically or under the trigger of an instruction transmit the development information to the operating device 200. Another example, in another example, the development device 100 and the operating device 200 may not be connected, but the development information is manually copied between the two by developers. Another example, in yet another example, the development information can also be transmitted through a third-party device for transfer. And so on, there are many possible implementation methods, which will not be listed one by one here.
[0099] It should be understood that the possible application scenarios given above are only examples. The development solution provided by this application can also be applied to other possible scenarios, rather than being limited to the scenarios exemplified above. For example, it can also be applied to other means of transportation, such as ships, airplanes, helicopters, trains, subways, and high-speed rails, etc., to assist developers in developing related functional software and improve the intelligence of the operation of means of transportation. Another example is that it can also be applied to other communication devices other than means of transportation, such as access network devices, mobile terminals, walkie-talkies, mobile phones, fax machines, pagers, computers, radio stations, satellite phones, radios, digital TVs, and routers, etc., to achieve the high efficiency of communication service development. Another example is that it can also be applied to near-eye display (NED) devices, including but not limited to augmented reality (AR) glasses, AR helmets, virtual reality (VR) glasses, or VR helmets, etc. By simplifying the development process of application software in NED devices, it can assist in realizing a more intelligent display experience. Another example is that it can also be applied to aircraft, smart home devices, smart medical devices, and industrial devices. And so on. They are not listed one by one here.
[0100] It should be noted that the application scenarios described in this application are for more clearly explaining the technical solution of this application and do not constitute a limitation on the technical solution provided by this application.
[0101] Based on Figure 1 the application scenarios shown, please refer to Figure 2 , which shows a schematic diagram of the software architecture for developing an application program provided by this application. As Figure 2As shown in the figure, in this software architecture, the development device 100 can be configured with development tools. The development tools are a software toolkit that can present a visual configuration interface to the user, enabling the user to directly configure development information on the development device 100 through interface interaction, such as code files and running configuration files of application programs. The running device 200 can include three layers from top to bottom: the business layer, the communication middleware, and the protocol layer. The communication middleware can support different types of communication protocols for the lower layer (protocol layer) through the abstraction of communication semantics, and provide a unified service interface for the upper layer (business layer). With the support of the communication middleware, developers can use the unified service interface in the development device 100 to develop application programs. After the same set of application programs are imported into different running devices 200, they can run in the actual vehicle environment that supports different communication protocols, different hardware, and different operating systems through the cooperation of the communication middleware and the communication protocol configuration in the protocol layer, realizing the decoupling of business code from the underlying communication protocol, hardware, and operating system. Through this software architecture design, developers can focus more on the development of the business layer without having to pay attention to the detailed differences in the underlying operating system, hardware, and communication protocol, thereby improving the development efficiency of developers.
[0102] At present, many communication middleware have been developed in the field of intelligent vehicles, such as, but not limited to: a scalable service-oriented open-source middleware over the Internet Protocol (IP) layer (an implementation of scalable service oriented middleware over IP, VSOMEIP), Data Distribution Service (DDS), Robot Operating System (ROS), Common Application Programming Interface (commonAPI), Automotive Open System Architecture (AUTOSAR), etc. Among them, as an automotive industry standard specification, AUTOSAR has launched an Adaptive Platform (AP) on top of the original Classic Platform (CP). AP provides Communication Management (CM) as its communication module, which is developed based on the Service-Oriented Architecture (SOA) development mode, and can provide great convenience in terms of communication interfaces, platform switching, and third-party interoperability. It has been widely used in major intelligent driving platforms.
[0103] Although AP CM provides a unified API, it has a very complex modeling configuration process. For example, please refer to Figure 3a, even for a very simple communication service, developers still need to configure multiple types of configurations on the development device 100, including networking configuration, node configuration, component configuration, service interface configuration, protocol configuration, service instance and network and process mapping, etc. If network or communication security issues are considered, security configuration also needs to be involved. Among these configurations, networking configuration, node configuration, component configuration, protocol configuration, and service instance and network and process mapping can also be collectively referred to as communication-related configurations. However, whether it is communication-related configuration, service interface configuration, or security configuration, they all involve multiple configuration items. For example, please refer to Table 1 below. In AP CM, the service interface configuration contains approximately 30 configuration items; the communication-related configuration contains approximately 170 configuration items, involving approximately 10 protocol common configuration items, approximately 60 DDS configuration items, and approximately 100 SOME / IP configuration items; the security configuration contains approximately 50 configuration items, involving end-to-end (E2E) communication protection configuration, identity and access management (IAM) configuration, security onboard communication (Secoc) configuration, and transport layer security (TLS) configuration, etc.
[0104] Table 1
[0105]
[0106] According to Table 1 above, there are approximately 250 configuration items in total in AP CM. Although a communication service may not use all the configuration items, AP CM stipulates that a certain number of configuration items must be configured each time. For example, please refer to Table 2 below. Although the number of basic communication items (i.e., service interface configuration items) in AP CM is only 30, the number of mandatory configuration items is as many as 70. That is to say, a relatively comprehensive communication service requires developers to configure at least 70 configuration items. Such a large number of configuration items will inevitably affect the development efficiency of developers for the communication service, and thus reduce the usability of the communication middleware.
[0107] In addition, apart from AP CM, other communication middleware also has the problem of a large number of configuration items. For example, continuing to refer to Table 2, in the two types of communication middleware, namely commonAPI or VSOMEIP for SOME / IP, although the number of basic communication items is only 20, the number of mandatory configuration items is as many as 100. That is to say, for a relatively comprehensive communication service, developers need to configure at least 100 configuration items. Obviously, the number of configuration items required for these two types of communication middleware is even more than that of AP CM, resulting in lower development efficiency and poorer usability of communication services.
[0108] Table 2
[0109] Number of configuration items Number of mandatory items Number of basic communication items AP CM 250 70 30 commonAPI(SOME / IP) 150 100 20 VSOMEIP 150 100 20
[0110] In summary, the existing communication middleware has the problem of a large number of configuration items, and this problem is mainly caused by the existing development and testing processes. For example, please refer to Figure 3b , which shows a schematic flowchart of a development method provided by the industry. This method mainly includes the following steps:
[0111] Step 301, the developer configures service interface configuration items and operation parameter configuration items in the development device 100.
[0112] As Figure 3b shown, in the development device 100, the development tools may include a communication configuration tool, a code generation tool, and a configuration generation tool. The communication configuration tool interfaces with the developer and can present a visual interface to the developer. The developer can start the software configuration process by selecting service interface configuration items (such as the data type used for communication, communication form, etc.) and operation parameter configuration items (such as IP address, IP port, SOME / IP, EventID, DDS Topic, etc.) in the visual interface and clicking "Finish".
[0113] Step 302, the developer compiles and generates an application program corresponding to the service interface on the development device 100.
[0114] Here, the communication configuration tool can first generate a standard communication configuration file according to the service interface configuration items and operation parameter configuration items selected by the user, and call the code generation tool to generate service interface code according to the service interface configuration item information in the standard communication configuration file. The service interface code contains application programming interfaces (APIs) required for service development. The developer can use the service interface code to add corresponding business logic, and thus compile and generate an application program corresponding to the service interface.
[0115] Step 303, the development device 100 generates a running configuration file according to the operation parameter configuration items.
[0116] Here, the communication configuration tool can call the configuration generation tool to generate a running configuration file related to the application program according to the running parameter configuration item information in the standard communication configuration file.
[0117] It should be noted that the related operations of the communication configuration tool, the code generation tool, and the configuration generation tool are internal operations of the development device 100. More specifically, they are internal operations of the development tools and are invisible to developers. That is to say, developers only need to configure the service interface configuration items and running parameter configuration items on the development device 100, and perform the corresponding compilation operations, then they can directly obtain the corresponding application program and running configuration file.
[0118] Step 304, the development device 100 exports the application program and the running configuration file to the running device 200.
[0119] Here, combined with Figure 2 , after the running device 200 receives the application program and the running configuration file, it can start the application program. After the application program starts, the business layer of the running device 200 will call the corresponding interface of the communication middleware. The communication middleware reads the running configuration file and sets the read running configuration information to the protocol layer. After that, the communication middleware can call the relevant interfaces in the protocol layer to create a communication channel for the application program and execute the corresponding communication logic based on this communication channel.
[0120] Adopting the above development solution provided by the industry, in addition to configuring the service interface configuration items on the development device 100, developers also need to configure the running parameter configuration items. Combining the above Table 1 and Table 2, although the number of service interface configuration items is not large, the number of running parameter configuration items (that is, the configuration items other than the service interface configuration items in the required configuration items) is very large. For example, there are only 30 service interface configuration items in AP CM, but the required configuration items reach 70. Similarly, there are only 20 service interface configuration items in commonAPI or VSOMEIP based on SOME / IP, but the required configuration items reach 100. Obviously, configuring both the service interface configuration items and the running parameter configuration items requires developers to configure a very large number of configuration items on the development device 100, which is the main reason for reducing the development efficiency.
[0121] In view of this, the present application provides a development method. This method allocates communication configuration parameters for the application program by the running device, so that developers only need to configure the service interface configuration items on the development device, and no longer need to configure the running parameter configuration items, thereby effectively reducing the number of configuration items that developers need to configure and improving the development efficiency of the application program.
[0122] The following specifically describes the development solution proposed in this application in conjunction with specific attached drawings.
[0123] In various embodiments of this application, without special instructions and logical conflicts, the terms and / or descriptions between different embodiments are consistent and can be cross-referenced. The technical features in different embodiments can be combined to form new embodiments according to their internal logical relationships.
[0124] Please refer to Figure 4 , which is a schematic flowchart of a development method provided by this application. This method is applicable to operating devices, such as Figure 1 or Figure 2 the operating device 200 shown. As Figure 4 shown, this method includes:
[0125] Step 401, the operating device obtains first development information, and the first development information includes a first application program, and the first application program is an application program generated by the user on the development device.
[0126] Here, the user can be understood as a developer. The first application program can be understood as a computer program file of application software, such as a binary file.
[0127] Optionally, the first application program can be a program file written or compiled by the developer using the development tools in the development device 100. For example, please refer to Figure 5 , when developing application software is required, the developer can start the communication configuration tool in the development device 100 and configure service interface configuration items in the provided visual interface, including data types used for communication, communication forms, and other information related to the interface, etc. The communication configuration tool generates a standard communication configuration file according to the service interface configuration items, such as an ARXML file of Autosar, an idl file of DDS, an fidl file or an fdepl file of commonAPI, etc. Then, the communication configuration tool can call the code generation tool to generate service interface code for the application software according to the service interface configuration item information in the standard communication configuration file, and the developer adds corresponding business logic to the service interface code, thereby compiling and generating the first application program.
[0128] Further, optionally, after generating the first application, the developer may export the first application from the development device 100 to the running device 200. For example, the developer may manually copy the first application to the running device 200 through a storage device, or the developer may trigger the development device 100 to automatically send the first application to the running device 200 through an instruction, and the triggering methods of the instruction may include but are not limited to: voice instruction, interface instruction, button instruction, gesture instruction, brain wave instruction, etc. Of course, it may also be that the development device 100 automatically sends it to the running device 200 after determining that the first application is generated, and the specific method is not limited.
[0129] Through the above configuration method, the developer can only configure the service interface configuration items on the development device 100, compile and generate the corresponding application program, and then perform subsequent application operations, without the need to configure the running parameter configuration items. For example, referring to Table 2, only about 30 service interface configuration items can be configured in the development tool of AP CM, without the need to configure 70 mandatory items, or only about 20 service interface configuration items can be configured in the development tool of commonAPI (SOME / IP) or VSOMEIP, without the need to configure 100 mandatory items. In this way, a large number of configuration items can be saved, and the development efficiency of developers can be significantly improved.
[0130] Step 402, the running device runs the first application and allocates the first communication configuration parameter for the first application.
[0131] Here, after receiving the first application, the running device 200 may store the first application in the local storage space.
[0132] After that, if the running device 200 receives the start instruction from the developer, it may run the first application stored locally (or, it may also not receive the instruction but run automatically), and at the same time obtain the communication configuration parameter corresponding to the first application locally. However, since the development device 100 only sends the first application to the running device 200, the running device 200 cannot obtain the communication configuration parameter, that is, there is no static communication configuration parameter. In this case, the running device 200 may dynamically allocate the first communication configuration parameter for the first application.
[0133] Optionally, in a possible allocation method, the running device 200 stores preset parameter configuration information, which includes the allocation range of resource type parameters and / or the default parameter values of non-resource type parameters. Among them, resource type parameters refer to parameters that cannot be repeatedly allocated, such as but not limited to: service identity (identity document, ID), service port, communication entity ID, and process ID, etc. Non-resource type parameters refer to parameters that can be repeatedly allocated, such as but not limited to: IP address and communication protocol, etc. When it is necessary to allocate the first communication configuration parameters to the first application, the running device 200 can first obtain the preset parameter configuration information, and then:
[0134] If the preset parameter configuration information includes the allocation range of resource type parameters, the running device 200 can first determine the unoccupied parameter values of the resource type parameters from the allocation range of the resource type parameters according to each communication configuration parameter that has been allocated, and then allocate the parameter values of the resource type parameters to the first application according to the unoccupied parameter values. In this way, it can be ensured that the resource type parameters allocated to each application are not repeated, that is, the conflict problem of resource type parameters can be avoided, so as to ensure the reliability and availability of the allocated resource type parameters;
[0135] If the preset parameter configuration information includes the default values of non-resource type parameters, the running device 200 can first determine whether the specified parameter values of the non-resource type parameters are indicated in the first development information. If so, the specified parameter values of the non-resource type parameters are allocated to the first application, otherwise, the default values of the non-resource type parameters (when there are multiple default values, one of the default values can be selected) are allocated to the first application. In this way, the allocation method can be adapted to business scenarios with specified non-resource type parameter requirements or business scenarios without specified non-resource type parameter requirements, and the universality of the allocation method can be realized.
[0136] It should be understood that the present application does not limit that only the above allocation method can be used. For example, in another possible allocation method, the preset parameter configuration information can also be managed by a third-party device. When the running device 200 needs to allocate the first communication configuration parameters to the first application, it can directly send a parameter request message to the third-party device, and the third-party device queries the corresponding communication configuration parameters from the preset parameter configuration information according to the parameter request message and returns them to the running device 200. Or, in still another possible allocation method, it can also be that the running device 200 obtains the preset parameter configuration information from the third-party device and then allocates the first communication configuration parameters by itself, and so on. There are many possible allocation methods, which will not be listed one by one here.
[0137] Optionally, after the running device 200 allocates the first communication configuration parameter for the first application, it can also establish a communication channel for the first application based on the first communication configuration parameter. This communication channel can be a communication channel for testing or a communication channel in an actual usage scenario, and there is no specific limitation.
[0138] For example, taking the communication channel for testing as an example, in specific implementation, the running device 200 can start the first application. At this time, the service layer in the running device 200 will call the corresponding interface in the communication middleware. The communication middleware obtains the dynamically allocated first communication configuration parameter and configures it to the underlying protocol layer. Then, it calls the relevant interface from the protocol layer to establish a communication channel for the first application and execute relevant communication logic based on this communication channel, such as performing communication interaction with virtual components. After that, if the communication logic result shows that the communication channel can communicate normally, it indicates that the first application and the first communication configuration parameter are correct. Therefore, developers can apply the first application and the first communication configuration parameter to the real vehicle environment. If the communication logic result shows that the communication channel cannot communicate normally, it indicates that there is an error in the development process. In this case, developers need to correct the first application or the first communication configuration parameter according to the exception information and then apply it to the real vehicle environment.
[0139] Another example is the communication channel in an actual usage scenario. In specific implementation, the running device 200 can be a real vehicle or a component in a real vehicle. The real vehicle or a component in the real vehicle can establish a communication channel for the first application through the service layer and the communication middleware, in combination with the first communication configuration parameter and the relevant interfaces in the underlying protocol layer, and implement communication with other components in the vehicle based on this communication channel to realize vehicle functions.
[0140] Using the above development method, by allocating communication configuration parameters for the application when the application is running through the running device, developers can only configure the service interface configuration items in the development device without having to configure the running parameter configuration items. In this way, the number of configuration items required for developing the application can be significantly reduced, effectively improving the development efficiency of developers, and further improving the usability of the development method.
[0141] In a possible implementation manner, to flexibly manage the communication configuration parameters of one or more applications, a parameter server can also be set in the running device 200, such as Figure 6 shown. This parameter server can be understood as a software process in the running device 200. This software process can be set outside the software process where the communication middleware is located or can be set in the software process where the communication middleware is located and exist as a service interface. For the convenience of understanding the solution, the following will introduce the case where the parameter server is set outside the communication middleware.
[0142] Based on Figure 6 the software architecture shown, please refer to Figure 7 , which is a schematic diagram of the allocation process of communication configuration parameters provided by this application. The process includes the following steps:
[0143] Step 701, the parameter server starts.
[0144] Here, after the running device 200 receives the instruction from the developer to start the first application, it can first start the parameter server, for example, by means of an instruction trigger, so that the subsequent communication middleware can successfully interact with the parameter server.
[0145] Step 702, the communication middleware runs the first application.
[0146] Here, after the running device 200 starts the parameter server, it can then call the corresponding interface in the communication middleware through the service layer to run the communication function in the first application.
[0147] Optionally, the communication middleware, as well as the service layer above it and the protocol layer below it, can be understood as another software process in the running device 200. That is to say, the communication middleware and the parameter server belong to different software processes. The communication middleware is mainly responsible for running the communication function in the application, while the parameter server is mainly responsible for managing and allocating the communication configuration parameters of the application. In this way, through the communication middleware and the parameter server, the decoupling of running the application and allocating the communication configuration parameters can be achieved, and then the separate maintenance and management of operations related to the communication configuration parameters can be realized.
[0148] Step 703, the communication middleware sends a parameter request message to the parameter server.
[0149] Here, the communication middleware can first obtain the communication configuration parameters corresponding to the first application locally. However, since the user only configures the service interface configuration item and does not configure the running parameter configuration item, the communication middleware cannot obtain the communication configuration parameters. That is, there are no static communication configuration parameters for the first application. In this case, the communication middleware can send a parameter request message to the parameter server.
[0150] Optionally, the parameter request message may include the parameter identifier applied for by the first application, or may also include some other information, such as the specified parameter value of non-resource type parameters.
[0151] Step 704, the parameter server allocates the first communication configuration parameter for the first application according to the preset parameter configuration information.
[0152] Here, the preset parameter configuration information can be stored in a certain storage space of the running device 200, and the address information of this storage space is known to the parameter server. That is to say, the parameter server can obtain the preset parameter configuration information. In this way, the parameter server can dynamically allocate the first communication configuration parameters for the first application program. For example, allocate the unoccupied parameter values of the resource class parameters for the first application program, and the specified parameter values of the non-resource class parameters indicated by the first request message or the default parameter values of the non-resource class parameters included in the preset parameter configuration information. The specific allocation process can refer to step 402 above and will not be repeated here.
[0153] Step 705, the parameter server sends the first communication configuration parameters to the communication middleware.
[0154] Here, after receiving the first communication configuration parameters from the parameter server, the communication middleware can add the first communication configuration parameters to the bottom protocol layer, and then call the relevant interfaces in the bottom protocol layer to establish the communication channel of the first application program.
[0155] In a possible implementation manner, after the parameter server allocates the first communication configuration parameters for the first application program, it can also synchronously store the first communication configuration parameters corresponding to the first application program locally. For example, the parameter server can also store parameter allocation information, which includes the communication configuration parameters corresponding to one or more application programs. The communication configuration parameters corresponding to any application program can be those allocated by the parameter server to this application program, or modified or optimized by developers, or carried in the development information. For example, the running parameter configuration items are synchronously configured during the development of the application program by the developer in the development device. After the parameter server allocates the first communication configuration parameters for the first application program, it can also add the first communication configuration parameters corresponding to the first application program to the parameter allocation information. In this way, when the communication middleware requests the communication configuration parameters of the first application program next time, the parameter server can directly query the corresponding first communication configuration parameters from the parameter allocation information and return them to the communication middleware, without having to execute the allocation process again, which can improve the initialization speed of the first application program.
[0156] Optionally, the parameter allocation information can be stored in any storage form, such as a table, an image, a database, a stack, or a formula, etc. Taking table storage as an example, please refer to Table 3.1 and Table 3.2, which show a schematic diagram of a parameter allocation table provided by the present application. This schematic diagram takes the parameter allocation table including multiple sub-tables as an example. Among them, Table 3.1 can be understood as a sub-table based on the service name, and Table 3.2 can be understood as a sub-table based on the process name. That is, Table 3.1 shows the parameters related to the service name, and Table 3.2 shows the parameters of different services related to the process name. Of course, the actual parameter allocation table can also include other sub-tables, such as a sub-table based on the communication entity name, a sub-table based on the application program name, etc., or the actual parameter allocation table can also be presented as a complete table, and the present application does not make specific limitations on this.
[0157] Table 3.1
[0158]
[0159]
[0160] Table 3.2
[0161]
[0162] As shown in Table 3.1 and Table 3.2 above, the parameter allocation table may include the parameter names and parameter values of one or more parameters corresponding to one or more services. For example, taking the radar service as an example, in the sub-table shown in Table 3.1, the Radar service can have different service instances, such as service instance 1 and service instance 2. The communication protocols supported by these two service instances are both DDS, the service IDs are both 1, the communication entity names are both Event1, the E2E DataID of service instance 1 is 1, and the E2E DataID of service instance 2 is 2. In the sub-table shown in Table 3.2, a Process1 process can correspond to different services and service parameters. Different service instances of any service have different service ports. For example, the service port of service instance 1 of the Radar service is 33641, the service port of service instance 1 of the Camera service is 33641, the service port of service instance 2 of the Camera service is 33642, and the service port of service instance 3 of the Lidar service is 33641. It should be understood that Table 3.1 and Table 3.2 are only examples, and there can be other parameter names and parameter values in the actual sub-table, which will not be listed one by one here.
[0163] Further, optionally, the parameters in the parameter allocation table may include resource type parameters, which may include, for example, but are not limited to, the service instance name, service ID, communication entity name, and E2E DataID in Table 3.1, and the service port in Table 3.2. The parameter values of the resource type parameters in the parameter allocation table are all occupied parameter values. For example, in the sub-tables shown in Table 3.1 and Table 3.2, the E2E DataID 1 and service port 33641 of the Radar service have been occupied by service instance 1, and the E2E DataID 2 of the Radar service has been occupied by service instance 1. Therefore, if the parameter server subsequently receives a parameter request message for the Radar service, it needs to allocate other service instance names except service instance name 1 and service instance name 2, such as service instance name 3, it needs to allocate other E2E DataIDs except E2E DataID 1 and E2E DataID 2, such as E2E DataID 3, and it needs to allocate other service ports except service port 33641, such as service port 33642.
[0164] Further, optionally, to implement the classified management of the occupied and unoccupied parameter values of the resource type parameters, the parameter server can also mark the parameter values of the resource type parameters in the parameter allocation table as occupied. For example, after the parameter server stores the first communication configuration parameters corresponding to the first application program into the parameter allocation table, it can also mark the parameter values of the resource type parameters included in the first communication configuration parameters as occupied. Among them, there are many ways to mark. For example, it can be marked as occupied through software. For example, in the software program, set 1 for the occupied parameter values of the resource type parameters and set 0 for the unoccupied parameter values of the resource type parameters. Or, it can also be marked in a table. For example, color annotation, text annotation, line annotation, shape annotation, etc. are performed in the parameter allocation table, and the specific method is not limited. Or, it can also be marked in the preset parameter configuration information. For example, delete the occupied parameter values within the allocation range of the resource type parameters in the preset parameter configuration information, or add colors or comments to the occupied parameter values within the allocation range of the resource type parameters in the preset parameter configuration information, and so on. There are many possible marking methods, which will not be listed one by one here.
[0165] Further, optionally, the parameters in the parameter allocation table may also include non-resource type parameters, such as, but not limited to, the service names and communication protocols in Table 3.1. The parameter values of the non-resource type parameters in the parameter allocation table may be the parameter values specified in the parameter request message, or may also be the default parameter values of the non-resource type parameters in the preset parameter configuration information. The parameter values of the non-resource type parameters corresponding to different application programs may be repeated. For example, in the parameter allocation table shown in Table 3.1, the communication protocols supported by Service Instance 1 and Service Instance 2 of the Radar service are both DDS. If the parameter server subsequently receives a parameter request message and the service specified in the parameter request message is Radar, the parameter server can still allocate the service name Radar to this Radar service. If the default communication protocol in the preset parameter configuration information is DDS, the parameter server can still allocate the communication protocol DDS to this Radar service.
[0166] In a possible implementation manner, the first application program may be a server application program or a client application program for in-vehicle services. Among them, the server refers to the end for providing communication services, and the client refers to the end for using the communication services provided by the server. The server application program can directly establish a communication channel during operation, or can first establish a communication service and then establish a communication channel. Similarly, the client application program can directly establish a communication channel for communicating with the server during operation, or can first discover the communication service of the server and then establish a communication channel for communicating with the server. Among them, the parameters of the communication service and the communication channel are different. The parameters of the communication service may include, for example, the service name, communication protocol, service ID, service instance, and other service parameters in Table 3.1 above, while the parameters of the communication channel may include the relevant parameters of the communication entity in Table 3.1 above, the E2E DataID in Table 3.2, and other channel parameters. In the communication process between the server and the client, in addition to the service parameters, for the two parties of the service to successfully establish data communication, it is also necessary for the server and the client to configure consistent channel parameters (also called communication entity parameters). These channel parameters may be obtained together during the process of requesting service parameters, or may be obtained separately by requesting service parameters twice, and the specific method is not limited.
[0167] To further introduce the specific parameter allocation process, the implementation processes of applying for all parameters at once and applying for different parameters separately twice are described in detail below through Implementation Method 1 and Implementation Method 2 respectively.
[0168] Implementation method 1
[0169] Please refer to Figure 8, showing a development flow chart of a server - side application provided by this application. The illustration takes the direct establishment of a communication channel by the server - side application as an example. The process includes the following steps:
[0170] Step 801, the parameter server starts.
[0171] Step 802, the communication middleware runs the first application.
[0172] Here, after the running device 200 receives a service - providing request sent by a developer, according to the service - providing request, it first starts the parameter server, and then calls the corresponding interface in the communication middleware through the service layer to run the communication function in the first application.
[0173] Step 803, the communication middleware sends a parameter request message to the parameter server, and this parameter request message is used to request service parameters and channel parameters.
[0174] Here, assume that the running device 200 only receives the first application sent by the development device 100. Then the communication middleware cannot query the static communication configuration parameters corresponding to the first application locally. Therefore, the communication middleware can send a parameter request message to the parameter server to request the communication configuration parameters corresponding to the first application.
[0175] Optionally, the parameter name information of each service parameter and each channel parameter requested by the first application can be carried in the message body of the parameter request message. The parameter name information of the service parameter can include, for example, but not limited to: service name, service instance name, and process information (such as process name), etc. The parameter name information of the channel parameter can include, for example, but not limited to: communication entity identifier (such as communication entity name) and attribute information of the communication entity. This attribute information can be, for example, the names of Event, Method, Field of AP CM and the setter, getter, notifier setting information of Field, etc.
[0176] Step 804, the parameter server allocates the first communication configuration parameters for the first application according to the preset parameter configuration information. The first communication configuration parameters include the parameter values of the service parameters and the parameter values of the channel parameters.
[0177] Step 805, the parameter server sends a parameter response message to the communication middleware, which carries the first communication configuration parameters.
[0178] In the above - mentioned steps 804 and 805, after the parameter server receives the parameter request message, it can first query the parameter allocation information (such as the parameter allocation tables shown in Table 3.1 and Table 3.2), and determine whether the second communication configuration parameters corresponding to the first application are already stored in the parameter allocation information:
[0179] If the second communication configuration parameters are already stored in the parameter allocation information, and the second communication configuration parameters include both all service parameters and all channel parameters, the parameter server can directly generate a parameter response message based on the second communication configuration parameters and return it to the communication middleware;
[0180] If the second communication configuration parameters are already stored in the parameter allocation information, but the second communication configuration parameters only include some of the service parameters and / or channel parameters, such as only including service parameters or some of them, or only including channel parameters or some of them, or including all service parameters and some channel parameters, or including all channel parameters and some service parameters, or including some channel parameters and some service parameters, the parameter server can obtain the preset parameter configuration information again, and based on the unoccupied parameter values of the resource type parameters and the default parameter values of the non-resource type parameters in the preset parameter configuration information, allocate parameter values for the channel parameters and / or service parameters not included in the second communication configuration parameters. After that, the parameter server can store the parameter values of the parameters allocated this time into the parameter allocation information, and mark the parameter values of the resource type parameters as occupied. Also, the parameter server can generate a parameter response message based on the parameter values of the parameters allocated this time and the parameter values of the parameters already stored in the second communication configuration parameters, and return it to the communication middleware;
[0181] If the second communication configuration parameters are not stored in the parameter allocation information, the parameter server can obtain the preset parameter configuration information again, and based on the unoccupied parameter values of the resource type parameters and the default parameter values of the non-resource type parameters in the preset parameter configuration information, dynamically allocate the first communication configuration parameters for the first application program. The first communication configuration parameters include all service parameters and all channel parameters. After that, the parameter server can store the first communication configuration parameters corresponding to the first application program into the parameter allocation information, and mark the parameter values of the resource type parameters as occupied. Also, the parameter server can generate a parameter response message based on the dynamically allocated first communication configuration parameters and return it to the communication middleware.
[0182] Step 806, the communication middleware creates a communication service according to the parameter values of the service parameters in the first communication configuration parameters, and establishes a communication channel according to the parameter values of the channel parameters in the first communication configuration parameters.
[0183] Here, after receiving the parameter response message returned by the parameter server, the communication middleware can add the communication configuration parameters (including service parameters and channel parameters) carried in it to the bottom protocol layer, and then call the relevant interfaces in the bottom protocol layer to establish the communication channel of the first application program to initiate the service provision process.
[0184] By adopting the above allocation process, the service parameters and channel parameters can be directly allocated through one communication between the parameter server and the communication middleware, enabling the communication middleware to directly execute the channel logic based on these two types of parameters obtained from the parameter server, thereby reducing communication overhead and improving the running efficiency of the application program.
[0185] Implementation method 2
[0186] Please refer to Figure 9 , which shows a development flowchart of a client application provided by this application. The client can be started before the server or after the server. When the client is started before the server, since the server is started at an indefinite time, in the case where the server has not been started, if the client obtains the channel parameters first, it will occupy some resources, but there will be no communication between the client and the server, so the channel parameters of the client are not used, which will cause waste of resources. At the same time, creating channels will also result in channel redundancy, affecting the running background noise. Therefore, in order to save resources and reduce the running background noise at the same time, the startup method of the client can be divided into two stages, that is, first discover the communication service of the server and then establish a communication channel. As Figure 9 shown, this process may specifically include the following steps:
[0187] Step 901, the parameter server starts.
[0188] Step 902, the communication middleware runs the first application program.
[0189] Step 903, the communication middleware sends a service parameter request message to the parameter server, and this service parameter request message is used to request service parameters.
[0190] Here, the parameter name information of each service parameter requested by the first application program can be carried in the message of the service parameter request message, such as service name, service instance name, and process name, etc.
[0191] Step 904, the parameter server allocates service configuration parameters for the first application program according to the preset parameter configuration information, and the service configuration parameters include the parameter values of the service parameters.
[0192] Step 905, the parameter server sends a service parameter response message to the communication middleware, which carries the service configuration parameters.
[0193] In the above steps 904 and 905, after receiving the service parameter request message, the parameter server can first query the parameter allocation information (such as the parameter allocation tables shown in Table 3.1 and Table 3.2):
[0194] When the server application has provided the corresponding communication service, the server application has requested the service parameters and channel parameters when establishing the communication service. Therefore, the parameter allocation information will store the parameter values of the service parameters and channel parameters corresponding to the first application. Therefore, the parameter server can query the parameter value of the service parameter corresponding to the first application from the parameter allocation information. The parameter server can directly generate a service parameter response message according to the parameter value of the service parameter and directly return it to the communication middleware;
[0195] Conversely, when the server application has not provided the corresponding communication service, or the communication service provided by the server application is different from the communication service requested by the client application, the parameter allocation information may not store the parameter values of all the service parameters corresponding to the first application. In this case, the parameter server can query the preset parameter configuration information, and then allocate the parameter values of the service parameters not included in the parameter allocation information according to the unoccupied parameter values of the resource type parameters and the default parameter values of the non-resource type parameters therein. The parameter server can also generate service configuration parameters according to the parameter values of the service parameters allocated this time and the parameter values of the service parameters already included in the parameter allocation information, and then carry the service configuration parameters in the service parameter response message and return them to the communication middleware. In addition, the parameter server can also store the parameter values of the service parameters allocated this time into the parameter allocation information and mark the parameter values of the resource type parameters as occupied.
[0196] Using the above example, even if the client application starts before the server application starts, the server application can also obtain the service configuration parameters allocated when the client application starts from the parameter allocation information when starting, so as to maintain the consistency of the service parameters between the server and the client and facilitate the successful establishment of communication between the two parties of the service.
[0197] Step 906, the communication middleware performs service discovery according to the service configuration parameters.
[0198] Step 907, if the communication middleware discovers that the server has provided the corresponding service, it sends a channel parameter request message to the parameter server, and the channel parameter request message is used to request the channel parameters.
[0199] Here, the communication middleware can add service configuration parameters to the bottom protocol layer and call relevant interfaces in the bottom protocol layer to perform service discovery. If the service discovery result shows that the server has provided the corresponding communication service, a client entity needs to be established to communicate with the server. Therefore, the communication middleware can also send a channel parameter request message to the parameter server. The message of the channel parameter request message can carry the parameter name information of each channel parameter requested by the first application program, such as the communication entity identifier (such as the communication entity name), and the attribute information of the communication entity, such as the names of Event, Method, and Field of AP CM, and the notifier, setter, and getter setting information of Field. Conversely, if the service discovery result shows that the server has not provided the corresponding service, it can wait for the server to provide the service (for example, the server sends a notification message to the client after startup), and then send the above channel parameter request message to the parameter server.
[0200] Step 908: The parameter server allocates channel configuration parameters for the first application program according to the preset parameter configuration information. The channel configuration parameters include the parameter values of the channel parameters.
[0201] Step 909: The parameter server sends a channel parameter response message to the communication middleware, which carries the channel configuration parameters.
[0202] In the above steps 908 and 909, after receiving the channel parameter request message, the parameter server can first query the parameter allocation information (such as the parameter allocation tables shown in Tables 3.1 and 3.2):
[0203] In the case where the server application program has provided the corresponding communication service, the server application program has requested service parameters and channel parameters when establishing the communication service. Therefore, the parameter values of the service parameters and channel parameters corresponding to the first application program are stored in the parameter allocation information. Therefore, the parameter server can query the parameter values of the channel parameters corresponding to the first application program from the parameter allocation information. The parameter server can directly generate a service parameter response message according to the parameter values of the channel parameters and directly return it to the communication middleware;
[0204] Conversely, when the server application has not provided the corresponding communication service, or the communication service provided by the server application is different from the communication service requested by the client application, the parameter value of all channel parameters corresponding to the first application may not be stored in the parameter allocation information. In this case, the parameter server can query the preset parameter configuration information again, and then allocate the parameter value of the channel parameter that does not exist in the parameter allocation information for the first application according to the unoccupied parameter value of the resource class parameter and the default parameter value of the non-resource class parameter in it. The parameter server can also generate channel configuration parameters based on the parameter value of the channel parameter allocated this time and the parameter value of the channel parameter that already exists in the parameter allocation information, and then carry the channel configuration parameters in the channel parameter response message and return them to the communication middleware. In addition, the parameter server can also store the parameter value of the channel parameter allocated this time into the parameter allocation information and mark the parameter value of the resource class parameter as occupied.
[0205] Step 910, the communication middleware establishes a communication channel according to the channel configuration parameters.
[0206] Here, after receiving the channel configuration parameters returned by the parameter server, the communication middleware can add the channel configuration parameters to the bottom protocol layer and call the relevant interfaces of the bottom protocol layer to establish a communication channel on the previously sent communication service for communication interaction with the server application.
[0207] By adopting the above allocation process, the service parameters and channel parameters corresponding to the client application can be obtained through two communications between the parameter server and the communication middleware respectively to perform service discovery and channel establishment in sequence. In this way, it can be ensured that the client applies for channel parameters only after the server starts, thus avoiding resource occupation caused by the server not starting for a long time while the client applies for channel parameters in advance, and the running background noise caused by the client establishing a communication channel in advance.
[0208] In some special scenarios, the communication configuration parameters automatically assigned by the parameter server may not meet the requirements of the special scenario. For example, in a possible situation, the parameter server defaults to assigning the packet aggregation attribute of SOME / IP Event as disabling packet aggregation (that is, immediately sending the message), and defaults to assigning the data sending method of SOME / IP Event as unicast sending. However, for scenarios with limited network resources and low service latency requirements, such as high-performance communication scenarios, in order to reduce network traffic, it is usually necessary to set the packet aggregation attribute of SOME / IP Event of certain communication entities to packet aggregation sending and multicast communication, etc. Another example is that in another possible situation, the parameter server defaults to assigning a certain service ID, a certain port or a certain other parameter value to the client and the server, but in a third-party communication scenario, the third party clearly defines that the client and the server use another service ID, another port or another parameter value. In these cases, there will be a problem that the communication configuration parameters automatically assigned by the parameter server do not match the actual application scenario requirements.
[0209] To solve the above problems, in a possible implementation, the running device 200 can also support exporting the communication configuration parameters stored in the parameter allocation information to the development device 100 side for modification. For example, please refer to Figure 10 , which shows a schematic diagram of a modification process of a communication configuration parameter provided by this application. The process includes the following steps:
[0210] Step 1001, the running device assigns first communication configuration parameters to the first application.
[0211] Here, the first communication configuration parameters may include communication protocol configuration information related to the first application, the process information it belongs to, communication topology information, environment configuration information, etc., or may also include other parameter information.
[0212] Here, the first communication configuration parameters can be stored in the parameter allocation information of the running device 200. Among them, the first communication configuration parameters can be those previously assigned by the parameter server to the first application, those previously assigned by the parameter server to the first application and then modified by the user, or those generated by the user after configuring the running parameter configuration items on the development device, and the specific is not limited.
[0213] Step 1002, the running device sends the first communication configuration parameters to the development device based on the first instruction.
[0214] Here, the parameter server can support exporting the communication configuration parameters in the parameter allocation information.
[0215] In one example, the first instruction may be an update instruction, an export instruction, a copy instruction, or other instructions from a developer. For example, if the developer determines that the first communication configuration parameter needs to be optimized and adjusted, the developer can manually copy the first communication configuration parameter from the parameter allocation information of the running device 200 to the development device 100 through a storage device, or can instruct the parameter server in the running device 200 to automatically send the first communication configuration parameter to the development device 100 by means of voice indication, text indication, gesture indication, etc.
[0216] Alternatively, in another example, when the development device 100 exports the first application to the running device 200, the first instruction can also be carried synchronously. Therefore, after the parameter server in the running device 200 allocates the first communication configuration parameter for the first application, it can directly send the first communication configuration parameter to the development device 100.
[0217] Of course, it can also be other export methods, which are not specifically limited.
[0218] Step 1003: The development device displays the first communication configuration parameter to the developer.
[0219] Step 1004: The development device obtains a third communication configuration parameter, which is obtained by the developer modifying the first communication configuration parameter on the development device.
[0220] Optionally, please refer to Figure 11 , in the above steps 1003 and 1004, after the development device 100 obtains the first communication configuration parameter, it can call a communication configuration tool to perform format conversion on the first communication configuration parameter. The communication configuration tool can automatically generate a standard communication configuration file according to the parameter-related information in the first communication configuration parameter, such as an ARXML file of Autosar, etc. Among them, the standard communication configuration file is a visual interface file, and the communication configuration tool can display the corresponding configuration interface on the display screen of the development device 100 according to the standard communication configuration file, so that the developer can directly modify the relevant configuration content on the configuration interface, such as specifying the communication entity to be modified to packet aggregation transmission, multicast communication, etc., and modifying the parameter values of service ID, service port, or other parameters to the parameter values specified by a third party, etc. After that, the communication configuration tool can send the standard communication configuration file modified by the developer to the configuration generation tool, and the configuration generation tool can generate a third communication configuration parameter according to the modified standard communication configuration file.
[0221] Among them, the format of the third communication configuration parameter may be the same as or different from that of the standard communication configuration file. For example, in one example, the format of the third communication configuration parameter is different from that of the standard communication configuration file, but the same as that of the first communication configuration parameter. In this way, the third communication configuration parameter can be used as the running configuration file to directly support the running test of the first application.
[0222] Step 1005, the development device sends the third communication configuration parameter to the running device.
[0223] Here, it can be that the developer manually copies the third communication configuration parameter from the development device 100 to the running device 200 using a storage device, or it can be that the development device 100 is instructed to automatically send the third communication configuration parameter to the running device 200, or it can also be that the development device 100 directly sends it to the development device 200 after detecting the generation of the third communication configuration parameter. There is no specific limitation.
[0224] Step 1006, the running device establishes a communication channel for the first application based on the third communication configuration parameter.
[0225] Here, after receiving the third communication configuration parameter, the parameter server in the running device 200 can update the communication configuration parameter corresponding to the first application stored in the parameter allocation information according to the third communication configuration parameter. Among them, the update method can be, for example, modifying the first communication configuration parameter corresponding to the first application to the third communication configuration parameter, or using the third communication configuration parameter to overwrite the original first communication configuration parameter, or marking text on the original first communication configuration parameter, etc. In this way, when the subsequent communication middleware requests the communication configuration parameter of the first application from the parameter server again, the parameter server can directly return the third communication configuration parameter modified by the user to the communication middleware by querying the parameter allocation information, so that the communication middleware can establish a communication channel for the first application based on the third communication configuration parameter modified by the user to achieve communication testing for special scenarios.
[0226] Using the above method, it is possible to support developers to modify or optimize the communication configuration parameters in certain scenarios. Although developers still need to use development tools to configure the communication configuration parameters, the parameter server has automatically generated complete communication configuration parameters before configuration. Developers only need to modify one or several of the parameter configurations (such as packet aggregation and multicast configuration) (also known as single-point configuration optimization) specifically, instead of configuring all the running parameter configuration items as in the prior art. Therefore, on the basis of significantly reducing the configuration items, the modified communication configuration parameters can better meet the actual scenario requirements.
[0227] It should be noted that after the parameter server assigns the first communication configuration parameter to the first application, if there is the first instruction in the above content, it can wait for the development device to return the modified third communication configuration parameter and then establish a communication channel based on the modified third communication configuration parameter. If there is no first instruction in the above content, it can directly establish a communication channel based on the first communication configuration parameter assigned by the parameter server. In this way, the development method can be compatible with both special scenarios that require modification of communication configuration parameters and ordinary scenarios that do not require modification of communication configuration parameters, achieving the universality of the development method.
[0228] In the above development method, since a dynamic parameter allocation process is added before the application actually runs, the startup speed of the application may slow down. Therefore, the above development method may not be applicable to some scenarios that require quick startup.
[0229] To solve this problem, in a possible implementation, the development device 100 can also store the first communication configuration parameter exported by the running device 200 (corresponding to the scenario where the communication configuration parameter does not need to be modified) or the modified third communication configuration parameter (corresponding to the scenario where the communication configuration parameter needs to be modified) by the developer locally as a static running configuration file. Taking the third communication configuration parameter as an example, please refer to Figure 12 , when the developer develops the first application again later, the developer can still only configure the service interface configuration item on the development device 100, and the service interface configuration item is generated into the first application after passing through the communication configuration tool, code generation tool, and user compilation in the development device 100. Since the third communication configuration parameter corresponding to the first application has been statically stored locally on the development device 100, the developer can also directly obtain the static third communication configuration parameter from the local of the development device 100 and export the first application and the static third communication configuration parameter together as the second development information to the running device 200. In this way, since the second development information contains both the first application and the static third communication configuration parameter, after the running device 200 starts the first application, it can directly obtain the static third communication configuration parameter to establish the communication channel of the first application without having to reassign the communication configuration parameter for the first application, thus saving the dynamic parameter allocation process before the first application starts and effectively improving the initialization speed of the first application.
[0230] Furthermore, optionally, to ensure the consistency between the static communication configuration parameter stored on the development device 100 side and the communication configuration parameter managed on the running device 200 side, in the scenario of receiving the static third communication configuration parameter, the running device 200 can also verify the static third communication configuration parameter based on the communication configuration parameter managed on the running device 200 side. For example, please refer to Figure 13, showing a schematic diagram of a verification process for communication configuration parameters provided by this application. This process is applicable to the communication middleware and parameter server in the operating device 200, and mainly includes the following steps:
[0231] Step 1301, the communication middleware runs the first application program in the second development information.
[0232] Step 1302, the communication middleware establishes a communication channel for the first application program based on the third communication configuration parameters in the second development information.
[0233] Here, when the communication middleware obtains the static third communication configuration parameters, it can directly establish a communication channel corresponding to the first application program based on the third communication configuration parameters and execute the subsequent communication logic to improve the initialization speed of the first application program.
[0234] Step 1303, the communication middleware sends a parameter verification request to the parameter server, and the parameter verification request carries the third communication configuration parameters corresponding to the first application program.
[0235] Optionally, the parameter verification request may include some or all of the parameter information in the third communication configuration parameters. For example, it may at least include the parameter value information of the resource class parameters, and the parameter value information of the resource class parameters can be used to determine conflicts with the occupied resource class parameters managed in the parameter server.
[0236] Furthermore, optionally, the parameter verification request can be initiated in the service providing process of the server application program, or the service discovery process of the client application program, or the communication instance creation process of the client application program. If it is initiated in the service providing process, the parameter verification request may include the parameter value information of the resource class parameters among the two types of parameters, namely service parameters and channel parameters. If it is initiated in the service discovery process, the parameter verification request may include the parameter value information of the resource class parameters in the service parameters and does not include the relevant information of the channel parameters. If it is initiated in the communication instance creation process, the parameter verification request may include the parameter value information of the resource class parameters in the channel parameters and does not include the relevant information of the service parameters.
[0237] Step 1304, the parameter server determines whether there is a fifth communication configuration parameter corresponding to the first application program in the parameter allocation information. If so, it executes step 1305; if not, it executes step 1308.
[0238] Here, the parameter server can query the parameter allocation information according to the service name, service instance ID, and process information of the third communication configuration parameters to determine whether there is a fifth communication configuration parameter corresponding to the first application program.
[0239] Step 1305, the parameter server determines whether the fifth communication configuration parameter is the same as the third communication configuration parameter. If not, step 1306 is executed; if so, step 1307 is executed.
[0240] Step 1306, the parameter server sends a response message indicating inconsistent parameter verification to the communication middleware.
[0241] Here, when the fifth communication configuration parameter corresponding to the first application is already stored in the parameter allocation information, but the fifth communication configuration parameter is different from the third communication configuration parameter carried in the second development information, it indicates that the static third communication configuration parameter stored in the development device 100 is inconsistent with the fifth communication configuration parameter managed in the running device 200, and there is an error in the communication configuration parameter of the first application. In this case, the parameter server can return a response message indicating inconsistent parameter verification to the communication middleware, so that the communication middleware can prompt this response message to the developer to remind the developer to perform error correction processing.
[0242] Step 1307, the parameter server returns a response message indicating successful parameter verification to the communication middleware.
[0243] Here, when the fifth communication configuration parameter corresponding to the first application is already stored in the parameter allocation information, and the fifth communication configuration parameter is the same as the third communication configuration parameter carried in the second development information, it indicates that the static third communication configuration parameter stored in the development device 100 is consistent with the fifth communication configuration parameter managed in the running device 200, and the third communication configuration parameter carried in the second development information is correct. In this case, the parameter server may not perform any operation, or it may also return a response message indicating successful parameter verification to the communication middleware, so that the communication middleware can notify it to the developer to facilitate the developer to understand the parameter verification result.
[0244] Step 1308, the parameter server determines whether there is a third communication configuration parameter corresponding to other applications in the parameter allocation information. If so, step 1309 is executed; if not, step 1310 is executed.
[0245] Step 1309, the parameter server returns a response message indicating parameter verification conflict to the communication middleware.
[0246] Here, when the communication configuration parameters corresponding to the first application are not stored in the parameter allocation information, but the third communication configuration parameters corresponding to other applications are stored, especially when the parameter values of the resource type parameters in the third communication configuration parameters are occupied by other applications, it indicates that there is a resource conflict between the third communication configuration parameters corresponding to the first application and the communication configuration parameters of other applications. In this case, the parameter server can return a response message indicating a parameter verification conflict to the communication middleware, so that the communication middleware can prompt this response message to the developer to remind the developer to resolve the resource conflict problem between the first application and other applications.
[0247] Step 1310, the parameter server stores the third communication configuration parameters corresponding to the first application into the parameter allocation information.
[0248] Here, when the third communication configuration parameters corresponding to the application are not stored in the parameter allocation information, especially when there is no parameter value of the resource type parameter in the third communication configuration parameters occupied by other applications, it indicates that the resource type parameters in the third communication configuration parameters have not been occupied and can be allocated to the first application. In this case, the parameter server can add the third communication configuration parameters corresponding to the first application to the parameter allocation information, so that when the communication middleware applies for the communication configuration parameters corresponding to the first application next time, the parameter server can directly return the third communication configuration parameters in the parameter allocation information to the communication middleware, thereby improving the allocation speed of the communication configuration parameters.
[0249] Using the above method, in the scenario where the development information contains static communication configuration parameters, by performing parameter verification on the static communication configuration parameters, the incorrect communication configuration parameters can be located, thereby timely locating communication problems and ensuring that the application program runs with the correct communication configuration parameters to improve the running accuracy.
[0250] It should be noted that the above parameter verification operation can be executed before the channel establishment operation, after the channel establishment operation, or both in parallel. For example, in one example, the above step 1302 can be executed before step 1303, that is to say, the communication middleware first executes the communication function of the application program based on the static communication configuration parameters, and then performs parameter verification on the static communication configuration parameters to give priority to ensuring the initialization speed of the application program. Another example, in another example, the above step 1302 can be executed after step 1307 or step 1310, that is to say, after verifying that the static communication configuration parameters are correct, the static communication configuration parameters are used to execute the communication function of the application program to give priority to ensuring the running accuracy of the application program. Another example, in yet another example, two processes can be used to execute the above step 1302 and steps 1303 to 1310 respectively. As long as it is found that the static communication configuration parameters are incorrect, the running operation of the application program is immediately stopped, so as to ensure the initialization speed of the application program while ensuring the running accuracy of the application program as much as possible.
[0251] Based on the various implementation solutions described above, taking the first development information as an example, the following further describes the complete development process.
[0252] Please refer to Figure 14 , which shows a complete flowchart of a development method provided by the present application. The process includes:
[0253] Step 1401, the development device sends the first development information to the running device, and the first development information includes a first application program.
[0254] Here, the first application program can be configured and generated by the developer in the development tool of the development device 100 for the service interface configuration item and after compilation. For specific reference, see the foregoing content.
[0255] Step 1402, the running device determines whether the first development information includes the fourth communication configuration parameter corresponding to the first application program. If so, step 1403 is executed; if not, step 1407 is executed.
[0256] Here, the fourth communication configuration parameter can be the static communication configuration parameter stored in the development device 100. The static communication configuration parameter can be the one previously assigned by the running device 200 to the first application program, or the one previously assigned by the running device 200 to the first application program and then modified by the developer. Of course, it can also be generated by the developer configuring the running parameter configuration item in the development tool of the development device 100, and no specific limitation is made.
[0257] Step 1403, the running device establishes a communication channel for the first application program based on the fourth communication configuration parameter.
[0258] Here, the operating device 200 can directly establish a communication channel based on the static fourth communication configuration parameter to improve the initialization speed of the application program, thereby improving the efficiency of communication testing.
[0259] Step 1404, the operating device uses the parameter allocation information to verify the fourth communication configuration parameter. If the verification fails, step 1405 is executed; if the verification is successful, step 1406 is executed.
[0260] Here, when it is necessary to verify the fourth communication configuration parameter in the first development information, the operating device 200 can obtain the parameter allocation information, which includes the communication configuration parameters corresponding to one or more application programs. Then, the operating device 200 can search for the second communication configuration parameter corresponding to the first application program from the parameter allocation information. If the second communication configuration parameter corresponding to the first application program does not exist in the parameter allocation information, and the fourth communication configuration parameters corresponding to other application programs also do not exist, or if the second communication configuration parameter corresponding to the first application program exists in the parameter allocation information and the second communication configuration parameter is consistent with the fourth communication configuration parameter, the operating device 200 determines that the fourth communication parameter verification is successful; otherwise, it determines that the fourth communication parameter verification fails. For the specific implementation of the verification process, reference can be made to the above Figure 13 and the relevant text descriptions, which will not be repeated here one by one.
[0261] Step 1405, the operating device sends a first prompt message to the developer, and the first prompt message is used to prompt that there is an error in the fourth communication configuration parameter.
[0262] Here, if the reason for the verification error is that the fourth communication configuration parameter corresponding to other application programs exists in the parameter allocation information, the first prompt message can prompt that there is a resource conflict error in the first application program. If the reason for the verification error is that the second communication configuration parameter corresponding to the first application program in the parameter allocation information is inconsistent with the fourth communication configuration parameter in the first development information, the first prompt message can prompt that there is an error in the parameters of the first application program.
[0263] Step 1406, the operating device ends the verification.
[0264] Here, the operating device 200 can also send a second prompt message to the developer, and the second prompt message is used to prompt that the fourth communication configuration parameter is correct, so that the developer can timely understand the execution progress of the verification process.
[0265] Step 1407, the operating device determines whether the second communication configuration parameter corresponding to the first application program exists in the parameter allocation information. If so, step 1408 is executed; if not, step 1409 is executed.
[0266] Step 1408: The operating device establishes a communication channel for the first application program based on the second communication configuration parameters.
[0267] Here, the operating device 200 manages the parameter allocation information. If the second communication configuration parameters corresponding to the first application program are already stored in the parameter allocation information, the operating device 200 can directly obtain the second communication configuration parameters to run the first application program, so as to improve the running efficiency of the first application program.
[0268] Step 1409: The operating device allocates the first communication configuration parameters for the first application program and adds them to the parameter allocation information.
[0269] Here, the operating device 200 can obtain the preset parameter configuration information. According to the allocation range of the resource type parameters and the default parameter values of the non-resource type parameters in the preset parameter configuration information, it allocates the parameter values of the unoccupied resource type parameters for the first application program, and allocates the specified parameter values of the non-resource type parameters indicated by the first development information or the default parameter values of the non-resource type parameters.
[0270] Here, after the operating device 200 allocates the first communication configuration parameters for the first application program, it can also add the first communication configuration parameters corresponding to the first application program to the parameter allocation information, so that when developing the first application program again next time, it can directly obtain the first communication configuration parameters in the parameter allocation information to run the first application program, so as to improve the running efficiency of the first application program.
[0271] Furthermore, the operating device 200 can also mark the parameter values of the resource type parameters in the first communication configuration parameters as occupied in the parameter allocation information, so as to more conveniently refer to the occupied mark and allocate the unoccupied parameter values of the resource type parameters for the next application program.
[0272] Step 1410: If the operating device does not receive the first instruction, it establishes a communication channel for the first application program based on the first communication configuration parameters.
[0273] Step 1411: If the operating device receives the first instruction, it sends the first communication configuration parameters to the development device based on the first indication.
[0274] Here, after the first communication configuration parameters are allocated, if the first instruction from the developer is received, it indicates that the first communication configuration parameters may not be suitable for the current scenario and need to be modified or optimized. In this case, the running device 200 can export the first communication configuration parameters to the development device 100, for example, export them to the development device 100 according to the first instruction from the developer. On the contrary, if the first instruction from the developer is not received, it indicates that the first communication configuration parameters are more suitable for the current scenario and do not need to be modified. In this case, the running device 200 can directly establish the communication channel for the first application based on the first communication configuration parameters.
[0275] Step 1412, the development device obtains the third communication configuration parameters modified by the developer for the first communication configuration parameters and takes the third communication configuration parameters as the local static configuration file
[0276] Here, the development device 100 can display each configuration item of the first communication configuration parameters to the developer in an interface interaction manner based on the development tool, so that the developer can targetedly adjust one or more of the configuration items to modify and obtain the third communication configuration parameters.
[0277] Here, the development device 100 can store the modified or optimized third communication configuration parameters locally, so that when the first application is developed again next time, it can directly obtain the local third communication configuration parameters and send them to the running device together, thus avoiding the process of reallocating communication configuration parameters and improving the initialization running speed of the application.
[0278] Step 1413, the development device sends the third communication configuration parameters to the running device.
[0279] Step 1414, the running device establishes the communication channel for the first application based on the third communication configuration parameters.
[0280] Here, after receiving the third communication configuration parameters, the running device can also update the second communication configuration parameters corresponding to the first application in the parameter allocation information according to the third communication configuration parameters to maintain the accuracy of the parameter allocation information. In this way, when the developer develops the first application again next time, the running device can directly obtain the third communication configuration parameters modified or optimized by the user from the parameter allocation information to run the first application, meeting the requirements of special scenarios.
[0281] Based on the above development process, a specific example is given below to illustrate the details of this development process in an actual application scenario.
[0282] Suppose it is necessary to allocate communication configuration parameters based on AP CM communication for an application, and it is required to optimize the allocated communication configuration parameters and then convert them into a static running configuration file in the development device. Then, the development and debugging process of the entire application can include the following five steps:
[0283] Step 1: The developer only needs to configure the service interface information shown in Table 4 below in the communication configuration tool of the development device, including service name, communication entity type, communication entity name, communication data type, Field attribute, and information on whether it is a FireAndForget Method, etc. Then, the service interface files required for AP CM communication, such as xxx_skeleton.h, xxx_proxy.h, etc., where xxx is the service name, can be generated through the code generation tool. After that, the user can add the corresponding business logic based on this service interface file, thereby compiling and generating the corresponding application, and then the application can be exported to the running device for the development and debugging of the application.
[0284] Table 4
[0285]
[0286] Step 2: After receiving the application, before running the application, the running device needs to first start the process where the parameter server is located. After the process where the parameter server is located is started, it will first read the preset parameter configuration file (i.e., the aforementioned preset parameter configuration information). The preset parameter configuration file contains the default parameter information of non-resource type parameters and the allocation range information of resource type parameters, such as the default protocol is SOME / IP, the allocation range of the service port of SOME / IP, the allocation range of the service ID of SOME / IP, etc. Then, the parameter server will also read the service parameter list (i.e., the aforementioned parameter allocation information). The service parameter list contains the communication configuration parameters corresponding to each application for which parameters have been allocated. The parameter server marks the parameter value information of the resource type parameters of the communication configuration parameters already allocated in the service parameter list as occupied.
[0287] After the running device starts the process where the parameter server is located, it can then run the application. If the application corresponds to a server-side application, then the following Step 3(A) is executed next. If the application corresponds to a client-side application, then the following Step 3(B) is executed next.
[0288] Step 3 (A): After the server application starts, it provides services by calling the OfferService interface in the AP CM through the business layer. Taking the Radar service and service instance 2 as an example, during the process of providing services by the OfferService interface, the AP CM first checks whether there is a static parameter configuration file for the Radar service and service instance 2 (that is, whether there are communication configuration parameters sent from the development device side together with the service interface file). If there is a static parameter configuration file, the AP CM can directly add this static parameter configuration file to the protocol layer, call the relevant interfaces in the protocol layer to establish a communication channel, and create a service instance to improve the creation speed of the service instance. The AP CM can also perform parameter verification in the manner described in Step 4 below. After that, if the parameter verification is successful, the verification can be ended; if the parameter verification is not successful, it can wait for the developer to correct the incorrect parameters and then restart the development process. On the contrary, if there is no static parameter configuration file, the AP CM can send a parameter query request (that is, the aforementioned parameter request message) to the parameter server. The parameter query request contains the request information of service discovery parameters (that is, the aforementioned service parameters), such as service name, service instance ID, and process name, etc., and also contains the request information of communication entity parameters (that is, the aforementioned channel parameters), such as the name of Event, the name of Method, the name of Field, and the type of Field (Notifier, Getter, Setter), etc.
[0289] After receiving the parameter query request, the parameter server checks whether all the configuration parameters of the Radar service and service instance 2 already exist in the service parameter list, including the requested service discovery parameters and communication entity parameters. If they exist, it means that the parameter server has previously allocated configuration parameters for the Radar service and service instance 2. Therefore, the parameter server can directly return the relevant information of the allocated configuration parameters to the AP CM. If only some configuration parameters exist, for example, the service ID of the Radar service has been allocated, but the Event ID, Method ID, etc. have not been allocated to the communication entity, it means that the parameter server has only previously allocated some configuration parameters for the Radar service and service instance 2, and the configuration parameters of the Radar service and service instance 2 are incomplete. In this case, the parameter server also needs to allocate the unallocated configuration parameters, and after the allocation is completed, return the relevant information of the existing configuration parameters and the configuration parameters allocated this time to the AP CM. Or, if no configuration parameters exist, it means that the parameter server has not allocated configuration parameters for the Radar service and service instance 2. In this case, the parameter server can allocate all the requested configuration parameters, and after the allocation is completed, return the relevant information of all the allocated configuration parameters to the AP CM.
[0290] Taking the configuration parameters of the non - existent Radar service and Service Instance 2 as an example, based on the service interface information shown in Table 4, Table 5 shows a schematic table for the allocation of service IDs. Since the service applied for in Table 4 is the Radar service, as shown in Table 5, the Radar service defaults to using the SOME / IP protocol, and the SOME / IP protocol has already allocated the service ID 1 to the Camera service. Therefore, the parameter server can allocate the service ID 2 that is not used within the SOME / IP protocol to the Radar service. Of course, other unused service IDs can also be allocated, such as service ID 3, service ID 4, ……, etc., without sequential allocation, and the specific allocation method is not limited.
[0291] Table 5
[0292] Service name Protocol Service ID Camera SOME / IP 1 Radar SOME / IP 2 Lidar DDS 1 Fusion DDS 2 …… …… ……
[0293] Based on the service interface information shown in Table 4, Table 6 shows a schematic table for the allocation of service ports. The service ports can be allocated according to the process name information. For example, as shown in Table 6, assuming that the Radar service already has Service Instance ID 1 and Service Instance ID 1 uses the service port 33641, then the service instance ID 2 can be allocated to the Radar service requested in Table 4, and the service port 33642 can be allocated to Service Instance ID 2.
[0294] Table 6
[0295]
[0296] Based on the service interface information shown in Table 4, Table 7 shows a schematic table for the allocation of communication entity parameters. Assuming that the allocation range of Event ID is 0 to 32767 and the allocation range of Method ID is 32768 to 65535, then, as shown in Table 7, the parameter server can allocate Event ID, Method ID, Field Notifier ID, Field Setter ID, and Field Getter ID according to the number order of Events, Methods, and Fields of the Radar service. Moreover, Field Notifier can be allocated in combination with Events, and Field Setter and Field Getter can be allocated in combination with Methods. For example, as shown in Table 4, this Radar service requests two communication entities, Event1 and Event2. Therefore, as shown in Table 7, Event ID = 0 can be allocated to the Radar Event1 communication entity, Event ID = 1 can be allocated to the Radar Event2 communication entity, Event ID = 2 can be allocated to the Radar Field1Notifier communication entity, Method ID = 32768 can be allocated to the Radar Method1 communication entity, Method ID = 32769 can be allocated to the Radar Field1 Setter communication entity, and Method ID = 32770 can be allocated to the Radar Field1 Getter communication entity.
[0297] Table 7
[0298] Communication entity name Event ID Camera Event1 0 Camera Field Notifier 1 Radar Event1 0 Radar Event2 1 Radar Field1 Notifier 2 Radar Method1 32768 Radar Field1 Setter 32769 Radar Field1 Getter 32770
[0299] Based on the communication entity parameters allocated in Table 7, Table 8 shows a schematic table for the allocation of E2E DataID. The E2E DataID of each communication entity is unique within the scope of the protocol. That is to say, a unique E2E DataID can be allocated to each communication instance within the scope of the protocol. For example, taking sequential allocation as an example, as shown in Table 8, assuming that the most recent Camera Event1 communication entity is allocated the E2E DataID 90, then for each communication entity of the Radar service in Table 7, the E2E DataID = 91 can be allocated to the RadarEvent1 communication entity, the E2E DataID = 92 can be allocated to the Radar Event2 communication entity, the E2E DataID = 93 can be allocated to the Radar Field1 Notifier communication entity, the E2E DataID = 94 can be allocated to the Radar Method1 communication entity, the E2E DataID = 95 can be allocated to the Radar Field1 Setter communication entity, and the E2E DataID = 96 can be allocated to the RadarField1Getter communication entity.
[0300] Table 8
[0301] Communication entity name E2E DataID …… …… Cmera Event1 90 Radar Event1 91 Radar Event2 92 Radar Field1 Notifier 93 Radar Method1 94 Radar Field1 Setter 95 Radar Field1 Getter 96
[0302] After the parameter server allocates all the configuration parameters of the Radar service and Service Instance 2 in the above manner, it can store the corresponding relationship between the Radar service, Service Instance 2, and the configuration parameters in the service parameter list, and can return to the APCM, enabling the APCM to start the service discovery and communication entity creation process on the server side based on the obtained configuration parameters, and establish the communication channel corresponding to the server-side application program.
[0303] Step 3 (B): After the client application starts, it discovers services by calling the StartFindService / FindService interfaces in the AP CM through the business layer. For example, still taking the Radar service and service instance 2 as an example, in this process, the AP CM first checks whether there is a static parameter configuration file for the Radar service and service instance 2. If it exists, the static parameter configuration file can be directly added to the protocol layer to call the relevant interfaces in the protocol layer to create a service instance. The AP CM can also perform parameter verification in the manner described in Step 4 below. If the parameter verification is successful, the verification can be ended. If the parameter verification is not successful, it can wait for the developer to correct the incorrect parameters and then restart the development process. Conversely, if there is no static parameter configuration file, the AP CM can send a service parameter query request (i.e., the aforementioned service parameter request message) to the parameter server. The service parameter query request contains the request information for service discovery parameters, such as the service name, service instance ID, and process name, etc. After receiving the service parameter query request, the parameter server executes the query and allocation process for service discovery parameters and returns the queried or allocated service discovery parameters to the AP CM. This process is the same as the service discovery parameter query process after the parameter server receives the parameter query request of the server-side OfferService in Step 3 (A) above.
[0304] After the AP CM receives the service parameters returned by the parameter server, it can use these service parameters to start service discovery. After discovering the service, a communication entity for the client application needs to be created. At this time, a communication entity parameter query request (i.e., the aforementioned channel parameter request message) needs to be sent to the parameter server. The communication entity parameter query request contains the request information for communication entity parameters, such as the name of the Event, the name of the Method, the name of the Field, and the type of the Field, such as Notifier, Getter, Setter, etc. After receiving the communication entity parameter query request, the parameter server executes the query and allocation process for communication entity parameters and returns the queried or allocated communication entity parameters to the AP CM. This process is the same as the communication entity parameter query process after the parameter server receives the parameter query request of the server-side OfferService in Step 3 (A) above. After the APCM receives the communication entity parameters returned by the parameter server, it adds the communication entity parameters to the protocol layer to call the relevant interfaces in the protocol layer to create a communication entity for the client application, establish a communication channel corresponding to the client application, and communicate and interact with the communication channel corresponding to the server-side application through this communication channel.
[0305] Step 4. In Step 3(A) or Step 3(B) above, after the server application or the client application is started, if there is already a static parameter configuration file, the server can send the static parameter configuration file to the parameter server through a parameter verification request during OfferService, or the client can do so during StartFindService / FindService to initiate parameter verification.
[0306] The parameter server checks whether the static parameter configuration file is consistent with the configuration parameters of the same server or the same client in the service parameter list, and checks whether there are conflicts in the resource information of the static parameter configuration file with the configuration parameters of other servers or clients in the service parameter list. For example, still taking the Radar service, service instance 2 as an example, if the Radar service, service instance 2 already exists in the service parameter list, it is necessary to check whether the service ID assigned to this Radar service, service instance 2 in the service parameter list, and the EventID, MethodID, etc. of Event and Method are consistent with the static parameter configuration file, and check whether the ports of each service instance of the Radar service, service instance 2 in the static parameter configuration file are the same as the ports used by other processes in the service parameter list, resulting in port conflicts, and so on. If the check finds that the parameters are consistent or there are no resource conflicts, the parameter server can end the verification, or it can also return a response message indicating successful parameter verification to the server or the client. If the check finds that the parameters are inconsistent or there are resource conflicts, the parameter server can return a response message indicating unsuccessful parameter verification to the server or the client. The server or the client can, based on this response message, prompt the developer with error information, instructing the developer to manually correct the parameter error.
[0307] Step 5. To optimize one or more configuration parameters, the configuration parameters dynamically allocated by the parameter server can also support export processing. For example, still taking the Radar service, service instance 2 as an example, the following content shows the content of a configuration parameter file exported by the parameter server, which contains the parameter value information of the automatically allocated resource class parameters and the parameter value information of the non-resource class parameters, such as the process information and operating environment information of the server or client of the Radar service, service instance 2:
[0308]
[0309] Further, the configuration parameter file can be exported to the AP CM configuration tool. The AP CM configuration tool is pre-installed on the development device and includes the communication configuration tool and the configuration generation tool in the foregoing content. The configuration parameter file can be a file in Manifest format. After reading the content of the imported configuration parameter file, the communication configuration tool can convert it into a standardized configuration file in ARXML format. For example, it can convert the process name information into Process / ProcessDesign configuration, convert the service ID, instance ID, EventID, MethodID, etc. into SomeipServiceInterface-Deployment and ProvidedSomeipServiceInstance / RequiredSomeipServiceInstance configurations, convert network information such as IP into EthernetCommunicationConnector configuration, and convert the association information between services, processes, and networks into SomeipServiceInstanceTo-MachineMapping and ServiceInstanceToPortPrototypeMapping configurations. The standardized configuration file in ARXML format can be displayed to developers through the graphical configuration tool so that developers can perform optimized configuration of one or more communication parameters. For example, please refer to Figure 15 , which shows a schematic diagram of a parameter optimization interface provided by the present application. Developers can modify some configuration items on this parameter optimization interface, such as modifying the packet aggregation configuration, multicast configuration, etc., so that the modified configuration parameters can meet the requirements of special scenarios.
[0310] In addition, the optimized standardized configuration file is still in ARXML format, and this standardized configuration file can also be converted into a static parameter configuration file through the configuration generation tool. Among them, the static parameter configuration file and the parameter configuration file dynamically allocated in the parameter allocation information can be of the same type of file or different types of files. For example, it can be converted into a parameter configuration file with the same format as the parameter configuration file exported by the parameter server, such as a file in Manifest format, and then stored locally on the development device. In this way, when the application starts next time, it can directly obtain the local static parameter configuration file for running tests, without the need to re-allocate parameters or convert the format, thus improving the initialization speed of the application startup.
[0311] Based on the above development method, by providing a parameter server process and using this parameter server process to implement the dynamic allocation function of configuration parameters, the import function of static parameter configuration files, and the parameter verification function of static parameter configuration files and dynamically allocated configuration parameters, it is possible to optimize the complex communication configuration process while ensuring the reliability of resource allocation, improving the efficiency of application development and debugging, and solving the problems of complex configuration, poor usability, and low development efficiency existing in the development and debugging of application programs based on communication middleware such as AP CM or SOME / IP in the prior art.
[0312] It should be noted that the above development method not only involves the improvement of adding a parameter server process, but also involves the improvement of the communication middleware, such as the improvement of the interaction process of the communication middleware. Specifically, the existing communication middleware only obtains static parameter configuration files. If it cannot obtain them, it directly returns error messages. In this application, when the improved communication middleware cannot obtain the static parameter configuration file, it will also interact with the parameter server process to obtain the configuration parameters dynamically allocated by the parameter server. Moreover, when the improved communication middleware in this application obtains the static parameter configuration file, it will also interact with the parameter server process to verify the parameters of the static parameter configuration file via the parameter server. That is to say, whether there is a static parameter configuration file or not, the subsequent execution process of the communication middleware in this application is different from that of the existing communication middleware.
[0313] In addition, the above development method can be applied in the field of intelligent vehicles. For example, it can be integrated and implemented in hardware, or exist in the form of a software product. Subsequently, this software product can be loaded in the hardware for direct application. Among them, the hardware can be, for example, a vehicle, in-vehicle equipment or vehicle components, or can also be equipment or components outside the vehicle, such as electronic equipment, development equipment or their components. The equipment or components outside the vehicle also need to be configured with the same operating environment as the vehicle to facilitate the development and testing of application programs using this operating environment. Or, it can also be an embedded device, which can be embedded in the vehicle as an external controller to control the components inside the vehicle to develop and test application programs in the operating environment of the vehicle.
[0314] Of course, the above development method can also be extended to any device or system with requirements for development efficiency. For example, it can also be applied to any movable device, including but not limited to ships, airplanes, high-speed rails, trains, helicopters, lawn mowers, mobile robots, etc. Or, it can also be applied to any communication device with communication functions, such as base stations, access network devices, terminal devices, printers, smart home devices, intelligent industrial devices, and so on.
[0315] In addition, with the evolution of the system architecture and the emergence of new scenarios, the development solution provided by this application is also applicable to similar technical problems, and this application does not make specific limitations in this regard.
[0316] Based on the above-described development method, this application can also provide a development device, which can be used to execute the above development method. For related features, please refer to the above method embodiments and will not be elaborated here.
[0317] In a possible implementation manner, please refer to Figure 16 , which shows a possible structural schematic diagram of the development device. The development device 1600 can be a chip or a circuit, such as a chip or a circuit that can be set in a vehicle or vehicle-mounted device, or a chip or a circuit in an electronic device outside the vehicle. The development device 1600 can correspond to the running device in the above method, such as the running device 200. The development device 1600 can implement the steps executed by the running device, or the communication middleware and parameter server in the running device, as shown in any of the methods in Figure 4 、 7 -10, 13, 14.
[0318] As Figure 16 shown, the development device 1600 can include an acquisition unit 1610 and an allocation unit 1620. When the development device 1600 executes the development method as shown in Figure 4 , the acquisition unit 1610 is used to acquire first development information, and the first development information includes a first application program, and the first application program is an application program generated by the user on the development device; the allocation unit 1620 is used to run the first application program and allocate first communication configuration parameters to the first application program.
[0319] For the concepts, explanations, detailed descriptions, and other steps related to the technical solution provided by this application embodiment involved in the development device 1600, please refer to the descriptions of these contents in the foregoing method or other embodiments, and will not be elaborated here.
[0320] It should be understood that the division of the units of the above development device 1600 is only a logical function division. In actual implementation, it can be fully or partially integrated into a physical entity, or physically separated. This application does not make specific limitations in this regard. The functions of each unit in the above development device 1600 can refer to the implementation of the corresponding method embodiments and will not be elaborated here.
[0321] In another possible implementation manner, please refer to Figure 17 , which shows another possible structural schematic diagram of the development device. The development device 1700 can be a chip or a chip system. Optionally, the chip system can be composed of chips, or can include chips and other discrete devices. As Figure 17As shown in the figure, the development device 1700 may include at least one processor 1710 and a memory 1720. The at least one processor 1710 is coupled to the memory 1720, and the memory 1720 may be located inside or outside the development device 1700. The memory 1720 stores computer programs or instructions necessary for implementing any of the above method embodiments. The at least one processor 1710 completes the development method in any of the above method embodiments by executing the computer programs or instructions stored in the memory 1720.
[0322] The development device 1700 may further include a communication interface 1730. The development device 1700 can interact with other devices through the communication interface 1730. The communication interface 1730 may be a circuit, a bus, a transceiver, or any other device that can be used for information interaction, or it can be called a signal transceiver unit. When the development device 1700 is a chip - type device or a circuit, the communication interface 1730 in the development device 1700 can also be an input - output circuit, which can input data (or receive data) and output data (or send data). The at least one processor 1710 is an integrated processor, a microprocessor, or an integrated circuit, and the at least one processor 1710 can determine the output data based on the input data.
[0323] In the development device 1700, the at least one processor 1710 can obtain the computer programs or instructions stored in the memory 1720 to execute the steps in any of the above method embodiments, or to implement the steps executed by the running device, or the communication middleware and parameter server in the running device as shown in Figure 4 、 7 -10, 13, 14. For example, when implementing the steps shown in the above Figure 4 figure, the at least one processor 1710 can obtain first development information through the communication interface 1730. The first development information includes a first application program, and the first application program is an application program generated by the user on the development device. The at least one processor 1710 can run the first application program and allocate first communication configuration parameters for the first application program.
[0324] The above - mentioned processor 1710 can be a general - purpose processor, a digital signal processor, an application - specific integrated circuit, a field - programmable gate array, or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, and can implement or execute the various methods, steps, and logic block diagrams disclosed in the present application. The general - purpose processor can be a microprocessor or any conventional processor, etc. The steps of the method disclosed in combination with the present application can be directly embodied as being executed by a hardware processor, or executed by a combination of hardware and software modules in the processor.
[0325] The aforementioned memory 1720 may be a non-volatile memory, such as a hard disk drive (HDD) or a solid-state drive (SSD), etc., or may also be a volatile memory, such as a random-access memory (RAM). The memory may also be any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 1720 in this application may also be a circuit or any other device capable of implementing a storage function, for storing computer programs, computer programs or instructions, and / or data.
[0326] For the concepts, explanations, detailed descriptions, and other steps related to the technical solution provided in the embodiments of this application involved in the development device 1700, please refer to the descriptions of these contents in the foregoing method or other embodiments, and will not be elaborated herein.
[0327] Based on the above-described development method, this application can also provide a software product, which may include the communication middleware and the parameter server in the foregoing content. Among them, the communication middleware and the parameter server may belong to different software processes, or may also belong to the same software process, and no specific limitation is made.
[0328] Based on the above-described development method, this application can also provide a vehicle, which may include units or modules for implementing the above development method, such as may include as above Figure 16 or Figure 17 the development device shown, and will not be repeated here.
[0329] Exemplarily, the vehicle may be a sedan, a truck, a motorcycle, a bus, a recreational vehicle, a playground vehicle, a construction equipment, a tram, a toy car, a golf cart, a train, etc., and no special limitation is made in this application. In addition, the vehicle may be a new energy vehicle, including an electric vehicle, such as a two-wheel drive electric vehicle or a four-wheel drive electric vehicle, or may also be a fuel vehicle, and no limitation is made in this application either.
[0330] Based on the above-described development method, this application can also provide an electronic device, in which a running environment related to the application under test can be stored, such as various underlying protocols, operating systems, and hardware in a vehicle. The electronic device may include units or modules for implementing the above development method, such as may include as above Figure 16 or Figure 17 the development device shown.
[0331] Based on the development method described above, the present application also provides a computer-readable storage medium storing a program or instructions, which, when running on a development device, cause the development device to execute the method as described in any one of Figure 4 , 7 -10, 13, 14 in any of the embodiments.
[0332] Based on the development method described above, the present application can also provide a computer program product, which includes: computer program code that, when running on a computer, causes the computer to execute the method as described in any one of Figure 4 , 7 -10, 13, 14 in any of the embodiments.
[0333] In the present application, "a plurality of" means two or more. "And / or" describes the association relationship of associated objects and indicates that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone, where A and B can be singular or plural. "At least one (item)" or its similar expression refers to any combination of these, including any combination of single or plural items. For example, at least one of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single items or multiple items. Additionally, in the present application, the term "optionally" or "exemplarily" is used to give examples, illustrations, or explanations. Any embodiment or design described as "example" or "optional" in the present application should not be construed as being more preferred or having more advantages than other embodiments or designs. Or it can be understood that using the word "example" or "optional" is intended to present the concept in a specific way and does not constitute a limitation to the present application.
[0334] It can be understood that the various numerical numbers involved in the present application are only for the convenience of description and are not used to limit the scope of the embodiments of the present application. The magnitude of the sequence numbers of the above processes does not mean the order of execution, and the order of execution of each process should be determined by its function and internal logic. Terms such as "first", "second", "third", "fourth", etc. are used to distinguish similar objects and do not necessarily need to describe a specific order or sequence. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion. For example, including a series of steps or units. A method, system, product, or device does not have to be limited to the clearly listed steps or units, but may include other steps or units not clearly listed or inherent to these processes, methods, products, or devices.
Claims
1. A development method, characterized in that: The method comprises: Acquire first development information, where the first development information includes a first application, and the first application is an application generated by a user on a development device; The first application is run, and a first communication configuration parameter is allocated to the first application.
2. The method according to claim 1, characterized in that The allocating the first communication configuration parameter to the first application comprises: Obtaining preset parameter configuration information, wherein the preset parameter configuration information includes an allocation range of resource class parameters; Determining an unoccupied parameter value of the resource class parameter in an allocation range of the resource class parameter; Allocating unoccupied parameter values of the resource class parameters to the first application.
3. The method according to claim 1 or 2, characterized in that The allocating the first communication configuration parameter to the first application comprises: Obtaining preset parameter configuration information, wherein the preset parameter configuration information includes default parameter values of non-resource parameters; If the first development information also indicates a specified parameter value for a non-resource parameter, the specified parameter value for the non-resource parameter is assigned to the first application; if the first development information does not indicate a specified parameter value for a non-resource parameter, the default parameter value for the non-resource parameter is assigned to the first application.
4. The method according to any one of claims 1 to 3, characterized in that After allocating the first communication configuration parameter to the first application, the method further includes: storing the first communication configuration parameter corresponding to the first application in parameter allocation information; The parameter allocation information includes communication configuration parameters corresponding to one or more applications, and the communication configuration parameters corresponding to the one or more applications are allocated to the one or more applications by the running device, or are modified by the user, or are carried in the development information.
5. The method according to any one of claims 1 to 4, characterized in that Before allocating the first communication configuration parameter to the first application, the method further includes: It is determined that the second communication configuration parameter corresponding to the first application does not exist in the parameter allocation information.
6. The method according to claim 5, characterized in that The method further comprises: If the parameter allocation information contains a second communication configuration parameter corresponding to the first application, a communication channel for the first application is established based on the second communication configuration parameter.
7. The method according to any one of claims 1 to 6, characterized in that The method further comprises: exporting the first communication configuration parameter to the development device based on a first instruction; A third communication configuration parameter is obtained, where the third communication configuration parameter is obtained after the user modifies the first communication configuration parameter on the development device.
8. The method according to claim 7, characterized in that After obtaining the third communication configuration parameter, the method further includes: The first communication configuration parameter corresponding to the first application in the parameter allocation information is updated according to the third communication configuration parameter.
9. The method according to claim 7 or 8, characterized in that The third communication configuration parameter is also stored in the development device; the method further comprises: Acquire second development information, where the second development information includes the first application and the third communication configuration parameter; Run the first application, and establish a communication channel for the first application based on the third communication configuration parameter.
10. The method according to any one of claims 1 to 9, characterized in that Before allocating the first communication configuration parameter to the first application, the method further includes: It is determined that the first development information does not include a fourth communication configuration parameter of the first application.
11. The method according to claim 10, characterized in that The method further comprises: If the first development information includes the fourth communication configuration parameter of the first application, a communication channel of the first application is established based on the fourth communication configuration parameter.
12. The method according to claim 11, characterized in that The method further comprises: If the parameter allocation information contains a second communication configuration parameter corresponding to the first application, but the second communication configuration parameter is different from the fourth communication configuration parameter, or the parameter allocation information contains other applications corresponding to the fourth communication configuration parameter, a first prompt message is generated, and the first prompt message is used to prompt that an error has occurred in the fourth communication configuration parameter.
13. The method according to claim 11 or 12, characterized in that The method further comprises: When there is no application corresponding to the fourth communication configuration parameter in the parameter allocation information, the fourth communication configuration parameter corresponding to the first application is stored in the parameter allocation information.
14. The method according to any one of claims 1 to 13, characterized in that The first application is a server application or a client application of the vehicle-mounted business type.
15. A software product, characterized in that include: Communication middleware and parameter server; The communication middleware is used to send a parameter request message to the parameter server when running the first application, the first application is included in the first development information, and the first application is an application generated by a user on a development device; The parameter server is used to allocate a first communication configuration parameter to the first application according to the parameter request message, and send the first communication configuration parameter to the communication middleware.
16. The software product according to claim 15, characterized in that The parameter server is specifically used for: Obtaining preset parameter configuration information, wherein the preset parameter configuration information includes an allocation range of resource class parameters; Determining an unoccupied parameter value of the resource class parameter in an allocation range of the resource class parameter; Allocating unoccupied parameter values of the resource class parameters to the first application.
17. The software product according to claim 15 or 16, characterized in that: The parameter server is specifically used for: Obtaining preset parameter configuration information, wherein the preset parameter configuration information includes default parameter values of non-resource parameters; If the first development information also indicates a specified parameter value for a non-resource parameter, the specified parameter value for the non-resource parameter is assigned to the first application; if the first development information does not indicate a specified parameter value for a non-resource parameter, the default parameter value for the non-resource parameter is assigned to the first application.
18. A software product according to any one of claims 15 to 17, characterized in that After allocating the first communication configuration parameter to the first application, the parameter server is further configured to: storing the first communication configuration parameter corresponding to the first application in parameter allocation information; The parameter allocation information includes communication configuration parameters corresponding to one or more applications, and the communication configuration parameters corresponding to the one or more applications are allocated to the one or more applications by the parameter server, or are modified by the user, or are carried in the development information.
19. A software product according to any one of claims 15 to 18, characterized in that Before allocating the first communication configuration parameter to the first application, the parameter server is further configured to: querying parameter allocation information according to the parameter request message; It is determined that a second communication configuration parameter corresponding to the first application does not exist in the parameter allocation information.
20. The software product of claim 19, wherein: The parameter server is also used for: If the parameter allocation information contains a second communication configuration parameter corresponding to the first application, the second communication configuration parameter is sent to the communication middleware.
21. A software product as claimed in any one of claims 15 to 20, characterized in that The parameter server is also used to: export the first communication configuration parameter to the development device based on the first instruction, obtain the third communication configuration parameter imported by the development device, and send the third communication parameter to the communication middleware; the third communication configuration parameter is obtained after the user modifies the first communication configuration parameter on the development device.
22. The software product of claim 21, wherein: After acquiring the third communication configuration parameter imported by the development device, the parameter server is further used to: The first communication configuration parameter corresponding to the first application in the parameter allocation information is updated according to the third communication configuration parameter.
23. The software product according to claim 21 or 22, characterized in that The third communication configuration parameter is also stored in the development device; The communication middleware is further used for: when the second development information includes the first application and the third communication configuration parameters, when the first application in the second development information is running, establishing a communication channel for the first application based on the third communication configuration parameters.
24. A software product as claimed in any one of claims 15 to 23, characterized in that Before allocating the first communication configuration parameter to the first application, the communication middleware is further used to: It is determined that the first development information does not include a fourth communication configuration parameter of the first application.
25. The software product of claim 24, wherein: The communication middleware is also used for: If the first development information includes the fourth communication configuration parameter of the first application, a communication channel of the first application is established based on the fourth communication configuration parameter.
26. A software product according to claim 24 or 25, characterized in that The communication middleware is further used to: send a parameter verification request to the parameter server, wherein the parameter verification request includes the fourth communication configuration parameter; The parameter server is further used to: obtain parameter allocation information, and if the parameter allocation information contains a second communication configuration parameter corresponding to the first application, but the second communication configuration parameter is different from the fourth communication configuration parameter, or the parameter allocation information contains another application corresponding to the fourth communication configuration parameter, then return a response message indicating parameter verification failure to the communication middleware; The communication middleware is further used to generate a first prompt message according to the response message of the parameter verification failure, wherein the first prompt message is used to prompt that an error occurs in the fourth communication configuration parameter.
27. The software product according to claim 25 or 26, characterized in that The parameter server is also used for: If there is no application corresponding to the fourth communication configuration parameter in the parameter allocation information, the fourth communication configuration parameter corresponding to the first application is stored in the parameter allocation information.
28. A development device, characterized in that The method comprises a unit / module for implementing the method as claimed in any one of claims 1 to 14.
29. A development device, characterized in that comprising a processor coupled to a memory: The processor is configured to execute the computer program or instructions stored in the memory, so that the development device executes the method according to any one of claims 1 to 14.
30. A vehicle, characterized in that: Comprising a development device as claimed in claim 28 or 29.
31. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a program or an instruction, and when the program or the instruction is executed, the method according to any one of claims 1 to 14 is implemented.