Method for acquiring vehicle-mounted machine basic information, electronic equipment and computer storage medium
Technical Field
The present invention relates to the field of vehicle-mounted devices, and in particular, to a method for acquiring vehicle-mounted device basic information, an electronic device, and a computer storage medium.
Background
The upper application in the car machine needs to read the basic information of the car machine to normally run, but the basic information of the car machine is written into the car machine through a specific tool at the final production stage of the car machine, so that the early development and test personnel can not normally develop and test the upper application function of the car machine due to the fact that the car machine does not have the basic information, and the problem is urgently needed to be solved.
Disclosure of Invention
In view of the above, the present invention is proposed to provide a method, an electronic device and a computer storage medium for acquiring vehicle-mounted basic information that overcome or at least partially solve the above problems.
Particularly, the invention provides a method for acquiring vehicle-mounted machine basic information, which comprises the following steps:
after the car machine is started, identifying and judging whether a specific attribute value is stored in a setting storage module of the car machine;
if yes, receiving vehicle-mounted machine basic information input from the outside and storing the vehicle-mounted machine basic information in the setting storage module;
receiving a vehicle-machine basic information acquisition instruction sent by an upper-layer application on the vehicle machine;
and calling target vehicle-machine basic information corresponding to the vehicle-machine basic information acquisition instruction from the setting storage module and outputting the target vehicle-machine basic information to the upper application.
Optionally, when the specific attribute value is not stored in the setting storage module of the car machine, after receiving a car machine basic information obtaining instruction sent by an upper layer application on the car machine, the method further includes:
and calling target vehicle machine basic information corresponding to the vehicle machine basic information acquisition instruction from a storage module of the MCU of the vehicle machine and outputting the target vehicle machine basic information to the upper application.
Optionally, the in-vehicle device basic information at least includes identification information and configuration word information, where the identification information at least includes a VIN code, an XDSN code, an IHUID code, an in-vehicle device software version code, and an in-vehicle device hardware version code; and the configuration word information is used for representing the high, medium and low configuration information of the vehicle corresponding to the vehicle machine.
According to another aspect of the present invention, there is also provided an electronic device comprising a processor and a memory, the memory having stored therein a computer program, the processor being arranged to execute the computer program to perform the method of any one of the above.
According to yet another aspect of the present invention, there is also provided a computer storage medium having stored therein at least one instruction, at least one program, set of code or set of instructions, which is loaded by a processor and which performs a method as claimed in any preceding claim.
In the scheme provided by the invention, after the vehicle-mounted device is started, whether a specific attribute value is stored in a setting storage module of the vehicle-mounted device is firstly identified, and if the specific attribute value is stored in the setting storage module of the vehicle-mounted device, the vehicle-mounted device enters a debugging mode. In the debugging mode, the vehicle machine basic information input from the outside is received and stored in the setting storage module, and then after a vehicle machine basic information acquisition instruction sent by an upper layer application on the vehicle machine is received, the target vehicle machine basic information corresponding to the vehicle machine basic information acquisition instruction is called from the setting storage module and output to the upper layer application so that the upper layer application can normally run. Based on the scheme provided by the invention, research and development testers can write corresponding vehicle machine basic information into the vehicle machine according to actual requirements without writing the vehicle machine basic information into the vehicle machine through a specific tool, thereby greatly facilitating the research and development testers to develop or test vehicle machine system software.
The foregoing is a summary of the present invention, and so that the technical means of the present invention will be more clearly understood and appreciated in light of the following description, the present invention will now be described in detail with reference to the accompanying drawings.
The above and other objects, advantages and features of the present invention will become more apparent to those skilled in the art from the following detailed description of specific embodiments thereof, taken in conjunction with the accompanying drawings.
Drawings
Some specific embodiments of the invention will be described in detail hereinafter, by way of illustration and not limitation, with reference to the accompanying drawings. The same reference numbers in the drawings identify the same or similar elements or components. Those skilled in the art will appreciate that the drawings are not necessarily drawn to scale. In the drawings:
FIG. 1 is a schematic block diagram of a vehicle machine according to an embodiment of the present invention;
FIG. 2 is a block diagram of a schematic configuration of the electronic device of FIG. 1;
fig. 3 is a schematic flow chart of a method for acquiring vehicle-mounted device basic information according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
It should be noted that the technical features of the embodiments and alternative embodiments of the present invention may be combined with each other without conflict.
FIG. 1 is a block diagram of a vehicle machine 100 according to an embodiment of the present invention; fig. 2 is a schematic block diagram of the electronic device in fig. 1. Referring to fig. 1 and 2, the car machine 100 includes a setting storage module 110, an MCU130 and an electronic device 120, wherein the MCU130 includes a storage module 131. The setting storage module 110 is configured to store a specific attribute value and vehicle-mounted device basic information input by a research and development tester, specifically, the setting storage module 110 may be an Android system attribute module, and the setting storage module 110 may be configured to store the specific attribute value and the vehicle-mounted device basic information of the vehicle-mounted device 100. Specifically, the specific attribute values and the car machine basic information in the setting storage module 110 may be obtained by connecting a computer and the car machine 100 through an adb (Android Debug Bridge) by a development tester, and then writing the specific attribute values and the car machine basic information into the setting storage module 110 of the car machine 100 through an adb command. The storage module 131 of the MCU130 may be an Android Car Service (Android Car Service) module, and the storage module 131 of the MCU130 is mainly used for storing the in-vehicle basic information written by a specific tool. The electronic device 120 comprises a processor 121 and a memory 122, wherein the memory 122 stores a computer program 1221, and the processor 121 is arranged to execute the method in any of the following embodiments of the computer program 1221.
Based on the above-mentioned electronic device 120, an embodiment of the present invention further provides a method for acquiring vehicle-mounted device basic information, and fig. 3 is a flowchart illustrating the method for acquiring vehicle-mounted device basic information according to an embodiment of the present invention. Referring to fig. 3, the method may include at least the following steps:
step S302: after the car machine 100 is powered on, it is identified whether the specific attribute value is stored in the setting storage module 110 of the car machine 100.
Step S304: if yes, the vehicle-mounted device basic information input from the outside is received and stored in the setting storage module 110.
Step S306: and receiving a vehicle-machine basic information acquisition instruction sent by an upper-layer application on the vehicle machine 100.
Step S308: and calling the target vehicle-machine basic information corresponding to the vehicle-machine basic information acquisition instruction from the setting storage module 110 and outputting the target vehicle-machine basic information to an upper-layer application.
The car machine basic information mentioned in the above step may include at least identification information and configuration word information. The Identification information at least includes a VIN (Vehicle Identification Number) code, an XDSN (e-car product serial Number) code, an IHUID (information Head unit Identification code), a car software version code, and a car hardware version code. The configuration word information is used for representing high, medium and low configuration information of a vehicle corresponding to the vehicle machine.
And the upper application on the vehicle machine can identify the vehicle according to the identification information and present the functions of the vehicle machine to the user according to the configuration word information.
In the solution provided by the present invention, after the car machine is started, it is first identified whether the specific attribute value is stored in the setting storage module 110 of the car machine, and if yes, the car machine enters a debugging mode. In the debugging mode, the vehicle machine basic information input from the outside is received and stored in the setting storage module 110, and then after receiving a vehicle machine basic information acquisition instruction sent by an upper layer application on the vehicle machine, the target vehicle machine basic information corresponding to the vehicle machine basic information acquisition instruction is called from the setting storage module 110 and output to the upper layer application, so that the upper layer application can normally run. Based on the scheme provided by the invention, research and development testers can write corresponding vehicle machine basic information into the vehicle machine according to actual requirements without writing the vehicle machine basic information into the vehicle machine through a specific tool, thereby greatly facilitating the research and development testers to develop or test vehicle machine system software.
In addition, in some embodiments of the present invention, when the specific attribute value is not stored in the setting storage module 110 of the car machine, after receiving a car machine basic information obtaining instruction sent by an upper layer application on the car machine, the method further includes: and calling target vehicle machine basic information corresponding to the vehicle machine basic information acquisition instruction from a storage module 131 of the MCU130 of the vehicle machine and outputting the target vehicle machine basic information to an upper layer application.
If the specific attribute value is not stored in the setting storage module 110 of the car machine, it indicates that the car machine has written the car machine basic information through a specific tool when the car machine leaves the factory, and the car machine enters a normal mode. In the normal mode, the target vehicle machine basic information corresponding to the vehicle machine basic information acquisition instruction is called from the storage module 131 of the MCU130 of the vehicle machine and output to the upper layer application, so that the upper layer application operates normally.
According to another aspect of the invention, a computer storage medium is proposed, in which at least one instruction, at least one program, set of code or set of instructions is stored, which is loaded by a processor 121 and which performs the method according to any of the above.
The invention provides a method for acquiring vehicle-mounted machine basic information, an electronic device 120 and a computer storage medium. In the debugging mode, the vehicle-machine basic information input from the outside is received and stored in the setting storage module 110, and then after receiving a vehicle-machine basic information acquisition instruction sent by an upper layer application on the vehicle machine, the target vehicle-machine basic information corresponding to the vehicle-machine basic information acquisition instruction is called from the setting storage module 110 and output to the upper layer application. Based on the scheme provided by the invention, research and development testers can write corresponding vehicle machine basic information into the vehicle machine according to actual requirements without writing the vehicle machine basic information into the vehicle machine through a specific tool, thereby greatly facilitating the research and development testers to develop or test vehicle machine system software.
Thus, it should be appreciated by those skilled in the art that while a number of exemplary embodiments of the invention have been illustrated and described in detail herein, many other variations or modifications consistent with the principles of the invention may be directly determined or derived from the disclosure of the present invention without departing from the spirit and scope of the invention. Accordingly, the scope of the invention should be understood and interpreted to cover all such other variations or modifications.