Application version number management method, application upgrade method, and device
By defining and centrally managing application version numbers in the on-board operating system, the problem that applications are difficult to obtain other application version numbers is solved, and efficient management of application version numbers and application upgrade support is achieved.
Patent Information
- Application Number
- CN202310424627.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-19
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2043-04-19
AI Technical Summary
In the on-board operating system, due to the difficulty of cross-process communication, it is difficult for applications to directly obtain the version number of other applications, and the existing processing methods are inefficient and inconvenient.
By defining the version number in the application's code and using the version number management module to centrally store and manage the version number of each application, a query interface is provided to facilitate obtaining the version number of the target application.
It realizes efficient management of application version numbers, which facilitates other applications or middleware to query the version numbers of other applications, and supports application upgrade management.
Smart Images

Figure CN116450203B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to application development technology, and in particular to an application version number management, application upgrade method, and device. Background Art
[0002] The version number of an application is generally maintained by the application itself and is widely used in scenarios such as application upgrades. In an in-vehicle operating system, since cross-process communication is very difficult, it is difficult for an application to directly obtain the version number of other applications. The existing processing method is that developers use the serial port to print out the version number of the application and then manually identify it. Obviously, this method is inconvenient and inefficient, and it needs to be improved. Summary of the invention
[0003] In view of this, an embodiment of the present invention provides an application version number management method, an application upgrade method and a device, which can conveniently and efficiently obtain the application version number.
[0004] An embodiment of the present invention discloses a method for managing application version numbers, including: obtaining the version numbers of multiple applications respectively; storing the obtained version numbers in a storage area; and providing a version number management module for receiving a query request from a queryer, and based on the received query request, querying the version number of the target application from the storage area and feeding it back to the queryer.
[0005] The version number of each application is defined in the code of each application, and the step of obtaining the version numbers of each of the multiple applications includes: identifying the version number of each application from the code of each of the multiple applications.
[0006] Among them, macro variables are added to the code of the application, and the version number of the application is defined in the macro variables; the step of identifying the version number of each application from the respective codes of the multiple applications includes: determining the position of the macro variable from the respective codes of the multiple applications, and then extracting the version number of the application from the macro variable.
[0007] The version number management module has a query interface, which is a runtime environment layer RTE interface that complies with the Autosar standard. The inquirer queries the version number of the target application through the query interface.
[0008] Among them, the query request includes: a storage address acquisition request and a version number acquisition request, the version number management module acquires the storage address of the version number of the target application based on the storage address acquisition request, and acquires the version number of the target application based on the version number acquisition request and the acquired storage address.
[0009] An embodiment of the present invention discloses an application upgrade method, comprising: a first application sends a query request to a version number management module to request to obtain the version number of a second application, wherein the first application and the second application have an associated relationship; the first application receives the version number of the second application returned by the version number management module, the version number of the second application and the version numbers of other applications are stored together in a storage area, the version number of the second application is queried from the storage area by the version number management module based on the query request and fed back to the first application; the first application performs an upgrade operation according to the version number of the first application and the version number of the second application.
[0010] An embodiment of the present invention discloses a device for managing application version numbers, including: an acquisition module, used to acquire the version numbers of multiple applications respectively; a storage module, used to store the acquired version numbers in a storage area; and a version number management module, used to receive a query request from a queryer, and based on the received query request, query the version number of the target application from the storage area and feed it back to the queryer.
[0011] An embodiment of the present invention discloses an application upgrade device, which is used for a first application and includes: a sending module, which is used to send a query request to a version number management module to request to obtain the version number of a second application, wherein the first application and the second application have an associated relationship; a receiving module, which is used to receive the version number of the second application returned by the version number management module, the version number of the second application and the version numbers of other applications are stored together in a storage area, the version number of the second application is queried from the storage area by the version number management module based on the query request and fed back to the receiving module; and an upgrading module, which is used to perform an upgrading operation according to the version number of the first application and the version number of the second application.
[0012] An embodiment of the present invention discloses an electronic device, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute the executable instructions to implement a method according to an embodiment of the present invention.
[0013] An embodiment of the present invention discloses a computer-readable storage medium on which a computer program is stored. The computer program includes executable instructions. When the executable instructions are executed by a processor, a method according to an embodiment of the present invention is implemented.
[0014] Beneficial effects of the embodiments of the present invention:
[0015] In an embodiment of the present invention, the version number of each application is stored in a storage area, and then a version number management module is provided to centrally manage the version number of each application, so that an application or middleware can easily query the version number of other applications, thereby achieving efficient management of application version numbers. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Other details and advantages of the present invention will become apparent from the detailed description provided below. It should be understood that the following drawings are merely illustrative and thus cannot be considered as limiting the present invention, and the following will be described in detail with reference to the drawings, wherein:
[0017] Figure 1 It is a flowchart of an embodiment of a method for managing application version numbers of the present invention;
[0018] Figure 2 is a flow chart of an embodiment of an application upgrade method of the present invention;
[0019] Figure 3 It is a structural diagram of an embodiment of a device for managing application version numbers of the present invention;
[0020] Figure 4 is a schematic diagram of the structure of an embodiment of an application upgrading device of the present invention;
[0021] Figure 5 It is a schematic structural diagram of an embodiment of an electronic device of the present invention. DETAILED DESCRIPTION
[0022] In order to make the technical problems, technical solutions and beneficial effects to be solved by the present invention clearer and more understandable, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only for explaining the present invention and are not intended to limit the present invention.
[0023] In the description of the present invention, it is to be understood that the terms "first" and "second" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. Moreover, the terms "first", "second", etc. are applicable to distinguishing similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the terms used in this way are interchangeable where appropriate so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein.
[0024] like Figure 1 As shown, it is a flow chart of an embodiment of the method for managing application version numbers of the present invention. The management method can, for example, centrally manage the version numbers of various applications in an operating system (such as an in-vehicle operating system) to facilitate applications or middleware to efficiently query the version numbers of other applications, to support the judgment of whether an application can be upgraded, or to support the management of synchronous upgrades between applications.
[0025] Specifically, the method for managing the version number of the application includes the following steps:
[0026] Step S102: Obtain the version numbers of the respective applications.
[0027] The version number of each application is pre-written in the code of each application, and the version number is updated as the application is updated. Thus, in step S102 , the version number of each application can be obtained by scanning the code of each application.
[0028] Specifically, a macro variable may be added to the code, and then the version number of the application may be defined in the macro variable. For example, the macro variable may be defined as: # macro variable start; constant = "version number"; # macro variable end. Thus, when obtaining the version number, step S102 may first identify the position of the macro variable start and the macro variable end from the application code, and then extract the data of the "version number" field from the constant to obtain the version number of the application.
[0029] Defining the application version number through macro variables helps to unify the format and specifications, making it easy to quickly and accurately locate the application version number.
[0030] In addition, by defining and updating the application version number through macro variables, the application developer only needs to focus on his own application development without considering the logic of subsequent integrators and system parties, which helps to reduce the difficulty of application development.
[0031] Step S104: Store the version number obtained in step S102 in the storage area.
[0032] After the version number of a certain application is extracted in step S102, the version number of the application may be written into a certain address segment of the storage area to achieve centralized storage and management of the version numbers of various applications.
[0033] Step S106: providing a version number management module, which is used to receive a query request from a queryer, and based on the received query request, query the version number of the target application from the storage area and feed it back to the queryer.
[0034] The inquirer may be, for example, an application or middleware in an operating system.
[0035] The version number management module has a query interface, which is an RTE (Run Time Environment) interface that complies with the Autosar (Automotive Open System Architecture) standard. The queryer can query the version number of the target application by calling or subscribing to the query interface. The RTE interface helps to achieve interconnection between the version number management module and other applications or middleware.
[0036] In addition, the query request may include, for example: a storage address acquisition request and a version number acquisition request. The version number management module acquires the storage address of the target application's version number based on the storage address acquisition request, and acquires the target application's version number based on the version number acquisition request and the acquired storage address.
[0037] In the embodiment of the present invention, the version number of each application is centrally managed through the version number management module, so that other applications or middleware can easily obtain the version number of the target application efficiently.
[0038] like Figure 2 FIG. 1 is a flow chart of an embodiment of an application upgrade method of the present invention. The application upgrade method comprises the following steps:
[0039] Step S202: The first application sends a query request to the version number management module to request to obtain the version number of the second application.
[0040] The first application and the second application have an association relationship. For example, the association relationship between the first application and the second application can be reflected in: when the first application is version 3.0, the second application cannot be lower than version 2.0. Therefore, when the first application is to be upgraded to version 3.0, if the version of the second application is lower than version 2.0, the first application cannot be upgraded. At this time, you can choose to prompt the user to upgrade the version of the second application to version 2.0 or above first, or control the first application and the second application to be upgraded synchronously.
[0041] Step S204: The first application receives the version number of the second application returned by the version number management module, wherein the version number of the second application and the version numbers of other applications are stored together in the storage area, and the version number of the second application is queried from the storage area by the version number management module based on the query request and fed back to the first application.
[0042] Specifically, for the content of the version number management module, please refer to Figure 1 The embodiments of the present invention are not described in detail here.
[0043] Step S206: The first application performs an upgrade operation according to the version number of the first application and the version number of the second application.
[0044] The first application can obtain its own version number in a manner that refers to an existing manner. In addition, the first application can determine whether to perform an upgrade based on its own version number and the version number of the second application, or upgrade the first application and the second application synchronously.
[0045] In this embodiment, through the version number management module, the first application can easily and efficiently obtain the version number of the second application, thereby realizing application upgrade management. In addition, obtaining the version number of other applications through the version number management module for upgrade management is only one of the many application scenarios of the version number management solution of the embodiment of the present invention, and is not a limitation of the version number management solution of the embodiment of the present invention.
[0046] like Figure 3 FIG. 1 is a schematic diagram of the structure of an embodiment of a management device for application version numbers of the present invention. The management device 3 includes:
[0047] The acquisition module 302 is used to acquire the version numbers of the multiple applications.
[0048] The storage module 304 is used to store the obtained version number in the storage area. And
[0049] The version number management module 306 is used to receive a query request from a queryer, and based on the received query request, query the version number of the target application from the storage area and feed it back to the queryer.
[0050] It should be noted that the management device 3 is a device embodiment corresponding to the above-mentioned management method, so the operation details of each module in the management device 3 have been described in the above-mentioned method embodiment and will not be repeated here.
[0051] like Figure 4 , which is a schematic diagram of the structure of an embodiment of an application upgrade device of the present invention, the application upgrade device can be used for a first application to control the upgrade of the first application. Specifically, the application upgrade device 4 includes:
[0052] The sending module 402 is used to send a query request to the version number management module to request to obtain the version number of the second application, wherein the first application and the second application are associated.
[0053] The receiving module 404 is used to receive the version number of the second application returned by the version number management module. The version number of the second application and the version numbers of other applications are stored together in the storage area. The version number of the second application is queried from the storage area by the version number management module based on the query request and fed back to the receiving module.
[0054] The upgrade module 406 is used to perform an upgrade operation according to the version number of the first application and the version number of the second application.
[0055] It should be noted that the upgrade device 4 is a device embodiment corresponding to the above-mentioned upgrade method, so the operation details of each module in the upgrade device 4 have been described in the above-mentioned method embodiment and will not be repeated here.
[0056] like Figure 5 , which is a schematic diagram of the structure of an embodiment of an electronic device of the present invention, the electronic device 5 comprises: a processor 502; and a memory 504, for storing executable instructions of the processor; wherein the processor 502 is configured to execute the executable instructions to implement the method of the embodiment of the present invention, for example Figure 1 Or the method shown in 2.
[0057] In addition, an embodiment of the present invention further provides a computer-readable storage medium on which a computer program is stored. The computer program includes executable instructions. When the executable instructions are executed by a processor, the method according to the embodiment of the present invention is implemented.
[0058] The description of the above storage medium and device embodiments is similar to the description of the above method embodiments, and has similar beneficial effects as the method embodiments. For technical details not disclosed in the storage medium and device embodiments of this application, please refer to the description of the method embodiments of this application for understanding.
[0059] The processor may be at least one of an application specific integrated circuit (ASIC), a digital signal processor (DSP), a digital signal processing device (DSPD), a programmable logic device (PLD), a field programmable gate array (FPGA), a central processing unit (CPU), a controller, a microcontroller, a microprocessor, etc. It is understandable that the electronic device that implements the function of the processor may also be other, and the embodiments of the present application are not specifically limited.
[0060] The above-mentioned computer storage medium / memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic random access memory (FRAM), a flash memory (Flash Memory), a magnetic surface memory, an optical disc, or a compact disc read-only memory (CD-ROM) and other memories; it can also be various terminals including one or any combination of the above-mentioned memories, such as mobile phones, computers, tablet devices, personal digital assistants, vehicle-mounted devices, etc.
[0061] It should be noted that the above description is only for example and not for limitation of the present invention. In other embodiments of the present invention, the method may have more, fewer or different steps, and the order, inclusion and function of each step may be different from that described and illustrated. For example, generally multiple steps can be combined into a single step, and a single step can also be divided into multiple steps. For those of ordinary skill in the art, without paying creative work, the sequential changes of each step are also within the scope of protection of the present invention.
[0062] The technical solution of the present invention, in essence or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor or a microcontroller to perform all or part of the steps of the method described in each embodiment of the present invention.
[0063] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.
[0064] Although the present invention has been disclosed as above with preferred embodiments, the present invention is not limited thereto. Any changes and modifications made by any person skilled in the art without departing from the spirit and scope of the present invention should be included in the protection scope of the present invention, and therefore the protection scope of the present invention should be subject to the scope defined by the claims.
Claims
1. A method for managing application version numbers, characterized in that: The management method is used to centrally manage the version numbers of various applications in the vehicle-mounted operating system to facilitate applications or middleware to query the version numbers of other applications. The management method includes: Obtaining version numbers of various applications in the vehicle operating system; Writing the obtained version numbers into the address segments in the storage area respectively, so as to realize the centralized storage of the application version numbers; and A version number management module is provided, which is used to receive a query request from an application or middleware in the operating system for querying the version number of other applications, and based on the received query request, query the version number of the other application from the storage area and feed it back to the queryer; The version number management module has a query interface, which is a runtime environment layer RTE interface that complies with the Autosar standard. The application or middleware in the operating system queries the version number of the other application through the query interface; In this process, a macro variable is added to the code of the application, the version number of the application is defined in the macro variable, the position of the macro variable is determined from the code of each application, and then the version number of the application is extracted from the macro variable.
2. The method for managing the version number of an application according to claim 1, characterized in that: The query request includes: a storage address acquisition request and a version number acquisition request. The version number management module acquires the storage address of the version number of the other application based on the storage address acquisition request, and acquires the version number of the other application based on the version number acquisition request and the acquired storage address.
3. An application upgrade method, characterized in that: The method for a first application in a vehicle operating system to query a version number of a second application in the vehicle operating system through a version number management module in the vehicle operating system includes: The first application sends a query request to the version number management module to request to obtain the version number of the second application, wherein the first application and the second application have an associated relationship; The first application receives the version number of the second application returned by the version number management module, the version number of the second application and the version numbers of other applications are stored together in the storage area, and the version number of the second application is queried from the storage area by the version number management module based on the query request and fed back to the first application; The first application performs an upgrade operation according to a version number of the first application and a version number of the second application; The version number management module has a query interface, which is a runtime environment layer RTE interface that complies with the Autosar standard, and the first application queries the version number of the second application through the query interface; Wherein, a macro variable is added to the application code, the application version number is defined in the macro variable, and the position of the macro variable is determined from the respective code of each application, and then the application version number is extracted from the macro variable and stored in the storage area.
4. A device for managing application version numbers, characterized in that: It is used to centrally manage the version numbers of various applications in the vehicle operating system to facilitate applications or middleware to query the version numbers of other applications, including: An acquisition module, used to acquire the version number of each application in the vehicle operating system; A storage module, used to write the obtained version numbers into the address segments in the storage area respectively, so as to realize the centralized storage of the application version numbers; and A version number management module, used to receive a query request from an application or middleware in the operating system for querying the version number of other applications, and based on the received query request, query the version number of the other application from the storage area and feed it back to the queryer; The version number management module has a query interface, which is a runtime environment layer RTE interface that complies with the Autosar standard. The application or middleware in the operating system queries the version number of the other application through the query interface; In this process, a macro variable is added to the code of the application, the version number of the application is defined in the macro variable, the position of the macro variable is determined from the code of each application, and then the version number of the application is extracted from the macro variable.
5. An application upgrade device, for a first application in a vehicle operating system to query the version number of a second application in the vehicle operating system through a version number management module in the vehicle operating system, characterized in that: include: A sending module, configured to send a query request to the version number management module to request to obtain a version number of a second application, wherein the first application and the second application have an associated relationship; a receiving module, configured to receive a version number of a second application returned by the version number management module, wherein the version number of the second application and the version numbers of other applications are stored together in a storage area, and the version number of the second application is queried from the storage area by the version number management module based on the query request and fed back to the receiving module; An upgrade module, configured to perform an upgrade operation according to a version number of the first application and a version number of the second application; The version number management module has a query interface, which is a runtime environment layer RTE interface that complies with the Autosar standard, and the first application queries the version number of the second application through the query interface; Wherein, a macro variable is added to the code of the application, the version number of the application is defined in the macro variable, and the position of the macro variable is determined from the code of each application, and then the version number of the application is extracted from the macro variable and stored in the storage area.
6. An electronic device, characterized in that: include: processor; as well as A memory, configured to store executable instructions of the processor; The processor is configured to execute the executable instructions to implement the method according to any one of claims 1 to 2.
7. A computer-readable storage medium having a computer program stored thereon, the computer program comprising executable instructions, and when the executable instructions are executed by a processor, the method according to any one of claims 1 to 2 is implemented.
Citation Information
Patent Citations
Software publishing and deploying method, device and system
CN110389773A
Software product version number merging and upgrading method and equipment and storage medium
CN111736895A