A task execution method, device, apparatus and storage medium
By automatically detecting the target folder and subfolders of the external storage device in the vehicle terminal, log capture or application upgrades can be performed without human-machine interaction when there are problems with the vehicle system, solving the problem of the vehicle system being unable to perform normal tasks and simplifying the operation process.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-26
- Publication Date
- 2026-03-20
AI Technical Summary
When the vehicle infotainment system's interface freezes or the touchscreen malfunctions, the system cannot perform its tasks properly, resulting in logs being unable to be exported or applications being unable to be upgraded, making the process cumbersome, time-consuming, and laborious.
When an external storage device is connected in the vehicle terminal, the system automatically detects whether the target folder and subfolders exist on the external storage device and performs corresponding tasks, such as log capture or application upgrade, without requiring input of commands through the human-machine interface.
When problems occur in the vehicle's infotainment system, logs are automatically exported or applications are upgraded, simplifying the operation process and avoiding the problems caused by interface freezes or touchscreen issues.
Smart Images

Figure CN114116630B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of vehicles, and in particular to a task execution method, device, equipment and storage medium. BACKGROUND
[0002] Currently, a car machine system usually includes an interactive interface. A user can control the car machine system to perform a corresponding task by performing an operation or inputting an instruction in the interactive interface. For example, when the car machine system has a problem, the user can perform a log export operation in the interactive interface to make the car machine system export a running log, or when an application in the car machine system needs to be upgraded, the user can input an upgrade instruction in the interactive interface to implement the upgrade of the car machine system.
[0003] However, the method of performing a corresponding task through the above interactive process needs to completely depend on the interactive interface. In this case, if the interactive interface is deadlocked or the touch screen has a problem, the user cannot perform an operation and input an instruction in the interactive interface, which causes the car machine system to be unable to normally perform a corresponding task. SUMMARY
[0004] Embodiments of the present application provide a task execution method, device, equipment and storage medium, which are used to solve the technical problem that the car machine system cannot normally perform a corresponding task when the interactive interface of the car machine system is deadlocked or the touch screen has a problem. In order to achieve the above purpose, embodiments of the present application adopt the following technical solutions:
[0005] In a first aspect, a task execution method is provided, which is applied to a vehicle terminal, and the method includes: in the case that an external storage device is detected to be connected, determining that a target folder exists in the external storage device; the target folder is used to instruct the vehicle terminal to determine whether a target subfolder exists in the target folder; the target subfolder corresponds to a pre-set target task; and in the case that the target subfolder exists in the target folder, performing the target task.
[0006] In a possible design, the target task is a log grabbing task, and performing the target task includes: in the case that the target subfolder includes a log grabbing script, executing the log grabbing script; the log grabbing script is used to store a target log in a pre-set log into the target subfolder; and the pre-set log is a log pre-stored in the vehicle terminal.
[0007] In a possible design, the target task is a log grabbing task, and performing the target task includes: in the case that the target subfolder does not include a log grabbing script, obtaining a pre-set log and storing the pre-set log into the target subfolder.
[0008] In a possible design, the target task is an upgrade task, and performing the target task comprises: in a case where the target sub-folder comprises an upgrade script and an upgrade package, executing the upgrade script based on the upgrade package; the upgrade script is used to upgrade a target application corresponding to the upgrade package in the vehicle terminal.
[0009] In a possible design, the method further comprises: after the target application is upgraded, generating an upgrade log of the target application, and storing the upgrade log in the target sub-folder.
[0010] In a possible design, the target folder is further used to instruct the vehicle terminal to determine whether the target sub-folder exists in the target folder, and the method further comprises: in a case where the target sub-folder exists in the target folder, verifying the legitimacy of the external storage device based on the authentication file; and in a case where the legitimacy of the external storage device is verified, determining whether the target sub-folder exists in the target folder.
[0011] In a possible design, the determining that the target folder exists in the external storage device in a case where it is detected that the external storage device is accessed comprises: in a case where it is detected that the touch screen of the vehicle terminal is abnormal and the external storage device is accessed, determining that the target folder exists in the external storage device.
[0012] In a second aspect, an external storage device is provided, and the external storage device comprises: a storage unit; the storage unit is configured to store a target folder and a target sub-folder; the target folder is used to instruct a vehicle terminal to determine whether the target sub-folder exists in the target folder; and the target sub-folder is used to instruct the vehicle terminal to perform a target task.
[0013] In a third aspect, a task execution apparatus is provided, and the apparatus is applied to a vehicle terminal, and the apparatus comprises: a determination unit and an execution unit; the determination unit is configured to determine that a target folder exists in an external storage device in a case where it is detected that the external storage device is accessed; the target folder is used to instruct the vehicle terminal to determine whether a target sub-folder exists in the target folder; the target sub-folder corresponds to a pre-set target task; and the execution unit is configured to perform the target task in a case where the target sub-folder exists in the target folder.
[0014] In a possible design, the target task is a log grabbing task, and the execution unit is specifically configured to: in a case where the target sub-folder comprises a log grabbing script, execute the log grabbing script; the log grabbing script is used to store a target log in a preset log into the target sub-folder; and the preset log is a log pre-stored in the vehicle terminal.
[0015] In a possible design, the target task is a log grabbing task, and the execution unit is specifically configured to: in a case where the target subfolder does not include a log grabbing script, obtain a preset log and store the preset log into the target subfolder.
[0016] In a possible design, the target task is an upgrading task, and the execution unit is specifically configured to: in a case where the target subfolder includes an upgrading script and an upgrading package, execute the upgrading script based on the upgrading package; the upgrading script is used to upgrade a target application program in the vehicle terminal corresponding to the upgrading package.
[0017] In a possible design, the task execution apparatus further includes a generation unit and a storage unit; the generation unit is configured to generate an upgrading log of the target application program after the target application program is upgraded; and the storage unit is configured to store the upgrading log generated by the generation unit into the target subfolder.
[0018] In a possible design, the target folder is further used to instruct the vehicle terminal to determine whether an authentication file exists in the target folder, and the task execution apparatus further includes a verification unit and a determination unit; the verification unit is configured to, in a case where the authentication file exists in the target folder, verify the legitimacy of the external storage device based on the authentication file; and the determination unit is configured to, in a case where the legitimacy of the external storage device is verified, determine whether the target subfolder exists in the target folder.
[0019] In a possible design, the determination unit is specifically configured to, in a case where it is detected that the touch screen of the vehicle terminal is abnormal and the external storage device is accessed, determine that the target folder exists in the external storage device.
[0020] In a fourth aspect, a computer readable storage medium storing one or more programs is provided, the one or more programs including instructions which, when executed by a computer, cause the computer to perform the task execution method in the first aspect.
[0021] In a fifth aspect, an electronic device is provided, including a processor and a memory; the memory is configured to store one or more programs, the one or more programs including computer execution instructions; when the electronic device is running, the processor executes the computer execution instructions stored in the memory, so that the electronic device performs the task execution method in the first aspect.
[0022] The application provides a task execution method, device, equipment and storage medium. The method can automatically detect whether a target folder exists in an external storage device when the external storage device is accessed. When it is determined that the target folder exists in the external storage device, the electronic device further automatically detects whether a target subfolder exists in the external storage device. When the target subfolder exists in the target folder, the vehicle-mounted terminal executes a target task corresponding to the target subfolder. Thus, when the vehicle-machine system has a problem and needs to export logs of the vehicle-mounted terminal or an application program in the vehicle-machine system needs to be upgraded, the vehicle-mounted terminal automatically exports the logs of the vehicle-mounted terminal or upgrades the application program in the vehicle-machine system when it is detected that the external storage device contains a log grabbing target subfolder or an application program upgrading target subfolder, without the need of inputting a related instruction through a man-machine interface, and the operation is simple and convenient. Thus, the technical problem that the vehicle-machine system cannot normally execute a corresponding task when an interactive interface of the vehicle-machine system is stuck or a touch screen has a problem is solved. BRIEF DESCRIPTION OF DRAWINGS
[0023] Figure 1 A task execution system structure schematic diagram is provided for an embodiment of the application.
[0024] Figure 2 A mobile storage device schematic diagram is provided for an embodiment of the application.
[0025] Figure 3 A task execution method flowchart is provided for an embodiment of the application. Figure 1
[0026] Figure 4 A task execution method flowchart is provided for an embodiment of the application. Figure 2
[0027] Figure 5 A task execution method flowchart is provided for an embodiment of the application. Figure 3
[0028] Figure 6 A task execution method flowchart is provided for an embodiment of the application. Figure 4
[0029] Figure 7 A task execution method flowchart is provided for an embodiment of the application. Figure 5
[0030] Figure 8 A task execution device structure schematic diagram is provided for an embodiment of the application.
[0031] Figure 9 An electronic device structure schematic diagram is provided for an embodiment of the application.Figure 1 ;
[0032] Figure 10 An electronic device structure diagram provided for an embodiment of the present application Figure 2 . DETAILED DESCRIPTION
[0033] The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application.
[0034] In the description of the present application, unless otherwise specified, " / " means "or", for example, A / B can mean A or B. "And / or" in this document is only a description of the association relationship of the associated objects, which means that there can be three kinds of relationships, for example, A and / or B, which can mean that A exists alone, A and B exist together, and B exists alone. In addition, "at least one" "multiple" means two or more. "First", "second", etc. do not limit the quantity and execution order, and "first", "second", etc. do not necessarily mean different.
[0035] In the prior art, when the car machine system has a problem and needs to export the log of the vehicle terminal or the application program in the car machine system needs to be upgraded, the relevant instructions input through the car machine system interactive interface need to be implemented. For example, when the car machine system has a problem, a professional needs to input relevant instructions in the car machine system interactive interface to export the log of the vehicle terminal, which is complicated. In particular, if the car machine system interactive interface is stuck or the car machine system interactive interface display has a problem, the log of the vehicle terminal cannot be exported. Subsequently, due to the limited space for storing the log of the vehicle terminal, the log of the vehicle terminal containing the current car machine system problem may be overwritten by the next log of the vehicle terminal. Therefore, if the log of the vehicle terminal containing the current car machine system problem is not exported in time, the technical personnel will not get the log of the vehicle terminal containing the current car machine system problem, which will greatly hinder the technical personnel from analyzing the problem of the car machine system. For example, when the application program in the car machine system needs to be upgraded, the technical personnel needs to carry a computer to the car and input relevant instructions through the car machine system interactive interface to upgrade the application program, which is time-consuming and laborious.
[0036] To solve the technical problems in the prior art, the application provides a task execution method, device, equipment and storage medium, which adds an application program in a vehicle machine system. The application program is started when the vehicle machine system is started and has the ability to read and write an external storage device. The application program further automatically detects whether a target subfolder exists in the external storage device when it is determined that a target folder exists in the external storage device. The application program executes a target task when the target subfolder exists in the target folder. In this way, the application can be implemented without inputting relevant instructions through a man-machine interface in the case that the vehicle machine system needs to export logs of a vehicle terminal or an application program in the vehicle machine system needs to be upgraded, and the operation is simple and convenient.
[0037] The task execution method provided by the embodiment of the application can be applied to a task execution system. Figure 1 A structural schematic diagram of the task execution system is shown. The task execution system 10 includes a vehicle terminal 11 and a mobile storage device 12. The vehicle terminal 11 is connected with the mobile storage device 12. The vehicle terminal 11 and the mobile storage device 12 can be connected through an interface.
[0038] In some embodiments, the vehicle terminal 11 can be a vehicle terminal in the vehicle machine system, for example, a device that is mounted on a vehicle and runs the vehicle machine system.
[0039] The vehicle terminal 11 can detect whether the mobile storage device 12 is connected in real time. When the mobile storage device 12 is detected to be connected, the vehicle terminal 11 detects whether the mobile storage device 12 has a target subfolder. The vehicle terminal 11 can write logs of the vehicle machine system into the mobile storage device 12 and can also obtain an upgrade package in the mobile storage device 12 and upgrade an application corresponding to the upgrade package.
[0040] In actual application, the vehicle terminal 11 includes a program (for example, a DebugService program) running in a native layer. The program is started by an init process of the vehicle machine system when the vehicle machine system is started. Running the DebugService program as a process can detect insertion information of the mobile storage device 12 and has the ability to read and write the mobile storage device 12. The vehicle machine system can be an Android system or other systems, which are not limited in the embodiment of the application.
[0041] The mobile storage device 12 includes any one or more of a U disk, a mobile hard disk, a card reader, a smart phone, a tablet computer, a wearable device and a camera, but the type of the mobile storage device is not specifically limited and can be selected according to actual conditions.
[0042] For example, Figure 2As shown, the mobile storage device 12 in this embodiment of the invention may include a root directory Car_Debug folder M11. The root directory Car_Debug folder includes an authentication file Certification.key M12, a Logs subfolder M13, and an update_app subfolder M14. The Logs subfolder may include a catch_log.sh script M15 and a log set Log M16. Figure 2 The example shows Log1 and log2; in real-world applications, there may be more or fewer logs. The update_app subfolder may contain the update_app.sh script M17 and the upgrade package set M18. Figure 3 The example shown includes upgrade package 1 and upgrade package 2. In practice, there may be more or fewer upgrade packages.
[0043] Figure 1 This is a flowchart illustrating a task execution method according to some exemplary embodiments. In some embodiments, the above-described task execution method can be applied to, for example... Figure 3 The task execution system shown.
[0044] In a design, such as Figure 4 As shown, the task execution method provided in this embodiment of the invention includes the following steps S201-S204:
[0045] S201. The vehicle terminal detects whether an external storage device is connected.
[0046] Among them, the vehicle-mounted terminal has the ability to read and write external storage devices.
[0047] As one possible implementation, the vehicle terminal periodically checks whether an external storage device is connected.
[0048] For example, 3 seconds is one cycle.
[0049] Specifically, after the vehicle system boots up, the inti process is started immediately. The inti process parses the inti.rc script file and starts the DebugService program based on its configuration information. The inti.rc script file contains a root-privileged file, which instructs the DebugService program to have root privileges. After starting, the DebugService program periodically checks for external storage device access.
[0050] As another possible implementation, the vehicle terminal can detect in real time whether an external storage device is connected.
[0051] S202, in a case where the vehicle-mounted terminal detects that the external storage device is accessed, the vehicle-mounted terminal determines whether the target folder exists in the external storage device. If it is determined that the target folder exists in the external storage device, step S203 is performed, and if it is determined that the target folder does not exist in the external storage device, step S201 is performed.
[0052] The target folder is used to instruct the vehicle-mounted terminal to determine whether the target sub-folder exists in the target folder, and the target sub-folder corresponds to a pre-set target task.
[0053] As a possible implementation, in a case where the vehicle-mounted terminal detects that the external storage device is accessed, the vehicle-mounted terminal queries the folders in the external storage device to determine whether the target folder exists in the external storage device.
[0054] Specifically, after the DebugService program of the vehicle-mounted terminal detects that the external storage device is accessed, the mount / remount command is executed to mount the external storage device as a readable and writable device. Then, the DebugService program of the vehicle-mounted terminal queries the content stored in the external storage device one by one to determine whether the target folder exists in the external storage device. Further, the vehicle-mounted terminal determines that the target folder exists in the external storage device according to the identification of the target folder.
[0055] It should be noted that the identification of the target folder is pre-stored in the vehicle-mounted terminal. The identification of the target folder can be the name of the target folder, or a fixed position character in the name of the target folder.
[0056] For example, taking the name of the target folder Car_Debug as an example, if the vehicle-mounted terminal determines that the target folder Car_Debug exists in the external storage device, the vehicle-mounted terminal starts to determine whether the corresponding target sub-folder exists in the target folder.
[0057] In a case where the identification of the target folder exists in the external storage device, the vehicle-mounted terminal determines that the target folder exists in the external storage device.
[0058] For example, the vehicle-mounted terminal can query the target folder (Car_Debug folder) in the external storage device through the DebugService program therein.
[0059] S203, the vehicle-mounted terminal determines whether the target sub-folder exists in the target folder. If the target sub-folder exists in the target folder, step S204 is performed, and if it is determined that the target sub-folder does not exist in the target folder, step S201 is performed. The target sub-folder is used to instruct the vehicle-mounted terminal to perform the target task corresponding to the target sub-folder.
[0060] As a possible implementation manner, the vehicle-mounted terminal queries the target folder, and determines whether the target sub-folder exists in the target folder.
[0061] S204, in a case where the target sub-folder exists in the target folder, the vehicle-mounted terminal executes the target task.
[0062] As a possible implementation manner, the vehicle-mounted terminal queries the target sub-folder in the target folder, and executes the target task corresponding to the target sub-folder.
[0063] It should be noted that the vehicle-mounted terminal stores a pre-set mapping relationship. The mapping relationship includes the target sub-folder and the target task, and the target sub-folder and the target task are in one-to-one correspondence. The vehicle-mounted terminal queries the target sub-folder in the target folder, queries the target task corresponding to the target sub-folder according to the mapping relationship, and executes the target task.
[0064] The specific implementation of this step can refer to the subsequent description of the embodiments of the present application, and will not be described here.
[0065] In one design, in a case where the target task is a log grabbing task, the log grabbing task is executed, as shown in the following. Figure 5 The S204 specifically includes the following S2041-S2044.
[0066] S2041, the vehicle-mounted terminal determines whether the target folder includes a log grabbing sub-folder.
[0067] Specifically, the DebugService program queries whether the target folder in the external storage device includes the target sub-folder (the log folder).
[0068] S2042, in a case where the vehicle-mounted terminal determines that the target folder includes the log grabbing sub-folder, the vehicle-mounted terminal determines whether the target sub-folder includes a log grabbing script.
[0069] The log grabbing script is used to store a target log in the log of the vehicle-mounted terminal to the target sub-folder. The log of the vehicle-mounted terminal is a log pre-generated by the vehicle-mounted terminal and stored in the vehicle-mounted terminal.
[0070] Specifically, the DebugService program queries whether the target folder in the external storage device includes the target sub-folder (the log folder), and further confirms whether the log grabbing script (the catch_log.sh script) is included in the log folder.
[0071] For example, the log of the vehicle-mounted terminal is all logs under the log storage directory of the vehicle-mounted terminal.
[0072] S2043, in a case where the target subfolder includes a log catching script, the vehicle terminal executes the log catching script.
[0073] The log catching script is a script for catching a specific log.
[0074] As a possible implementation, in a case where the target subfolder includes a log catching script, the vehicle terminal acquires the log catching script, catches a specified log according to the content of the log catching script, and then stores the specified log in the target subfolder in the vehicle terminal.
[0075] For example, the log catching script is a script for catching core logs.
[0076] Specifically, the DebugService program queries the target subfolder (log folder) for a log catching script (catch_log.sh script) and executes the catch_log.sh script line by line. The execution result of each line of command is to save a specific log in the log folder with a keyword as the file name.
[0077] It can be understood that the vehicle terminal acquires the log catching script to catch the log required by the user by using the above steps S2041-S2043. In a case where a plurality of logs are stored in the log storage directory of the vehicle terminal, the vehicle terminal acquires the logs in a targeted manner.
[0078] S2044, in a case where the target subfolder does not include a log catching script, the vehicle terminal acquires a preset log and stores the log of the vehicle terminal in the target subfolder.
[0079] As a possible implementation, in a case where the target subfolder does not query a log catching script, the vehicle terminal acquires a preset log and stores the preset log in the target subfolder.
[0080] Specifically, the DebugService program queries the target subfolder (log folder) for a log catching script (catch_log.sh script) and copies all logs under the log storage directory of the vehicle terminal to the log folder in the external storage device. When all logs are stored in the log folder in the external storage device, the DebugService program stores them by type, for example, the content of logcat is a file and the content of dumpsys is another file.
[0081] In one design, in a case where the target task is an upgrade task, the upgrade task is executed, such as Figure 6 As shown in the above S204, the S204 further includes the following S2045-S2047:
[0082] S2045, the vehicle terminal determines whether the target folder contains the target subfolder.
[0083] The target subfolder is an application upgrade folder.
[0084] As a possible implementation, the vehicle terminal queries the target folder to determine whether the target folder contains the target subfolder.
[0085] Specifically, the DebugService program queries whether the target folder in the external storage device contains the target subfolder (Update_app subfolder).
[0086] S2046, in the case where the vehicle terminal determines that the target folder contains the target subfolder, the vehicle terminal determines whether the upgrade script and the upgrade package are included in the target subfolder. If it is determined that the upgrade package is included in the target subfolder, step S2047 is executed, and if it is determined that the upgrade package is not included in the target subfolder, step S201 is executed.
[0087] The upgrade script is used to upgrade the target application in the vehicle terminal corresponding to the upgrade package.
[0088] As a possible implementation, in the case where the vehicle terminal determines that the target folder contains the target subfolder, the vehicle terminal queries the target folder to further determine whether the upgrade script and the upgrade package are included in the target subfolder.
[0089] Specifically, the DebugService program queries whether the upgrade script (update_app.sh) and the image file (.apk,.so, bin, jar, etc.) that needs to be upgraded corresponding to the upgrade script exist in the target subfolder (Update_app subfolder) in the external storage device.
[0090] S2047, in the case where the target subfolder contains the upgrade script and the upgrade package, the vehicle terminal executes the upgrade script based on the upgrade package.
[0091] As a possible implementation, in the case where the vehicle terminal queries the upgrade script and the upgrade package in the target subfolder, the vehicle terminal parses the upgrade script in the target subfolder and upgrades the target application in the vehicle terminal corresponding to the upgrade package based on the upgrade package.
[0092] For example, the vehicle terminal queries that the upgrade script in the target subfolder is a script for upgrading the navigation application, and queries the navigation application upgrade package in the target subfolder, and upgrades the navigation application in the vehicle terminal based on the navigation application upgrade package.
[0093] Specifically, the updata_app.sh script file is written according to a shell script language specification, and each line describes copying a specified upgrade file to a directory of the car machine system. The DebugServivce program parses the updata_app.sh script, thereby executing installation of an application upgrade package in the update_app folder to a specified directory of the car machine system. Thus, the application upgrade function is realized.
[0094] In actual application, if the upgrade subfolder and the log acquisition subfolder exist in the target folder, the vehicle terminal can execute S2041-S2044 first and then execute S2045-S2047, or execute S2045-S2047 first and then execute S2041-S2044, or execute S2041-S2044 and S2045-S2047 simultaneously, and the embodiments of the application do not limit this.
[0095] In actual application, if the vehicle terminal does not find the upgrade subfolder and the log acquisition subfolder in the target folder, the vehicle terminal re-executes S201.
[0096] In one design, in order to facilitate the user to know the upgrade result, as shown in Figure 7 After S2047, the above-mentioned S2047 further includes the following S2048-S2049:
[0097] S2048, the vehicle terminal generates an upgrade log of the target application after the target application upgrade is completed.
[0098] As one possible implementation manner, the vehicle terminal confirms whether the target application upgrade is successful after the target application upgrade is completed, and generates the upgrade log according to the upgrade result.
[0099] Exemplarily, the vehicle terminal generates the log of the upgrade failure after confirming that the target application upgrade fails.
[0100] S2049, the vehicle terminal stores the upgrade log into the target subfolder.
[0101] As one possible implementation manner, the vehicle terminal stores the upgrade log into the target subfolder.
[0102] Exemplarily, the vehicle terminal stores the upgrade log of the upgrade failure into the target subfolder. In one design, in order to ensure the safety of the task execution of the vehicle terminal and prevent people other than the developers from maliciously attacking the system by using the function, the target folder is further used to instruct the vehicle terminal to judge whether the authentication file exists in the target folder, as shown in Figure 8 The task execution method of the application further includes the following S205-S207:
[0103] S205, the vehicle terminal confirms whether the target folder includes the authentication file in the case of detecting the access of the external storage device. If it is judged that the external storage device includes the authentication file, step S206 is executed, and if it is judged that the external storage device includes the un-authentication file, step S201 is executed.
[0104] As a possible implementation, the vehicle terminal queries the target folder after detecting the access of the external storage device, and confirms whether the target folder includes the authentication file.
[0105] Specifically, the DebugService program queries whether the target folder in the external storage device includes the authentication file (Certification.key).
[0106] S206, the vehicle terminal verifies the legality of the external storage device based on the authentication file in the case of the target folder including the authentication file. If the legality of the external storage device is verified, step S207 is executed, and if the illegality of the external storage device is verified, step S201 is executed.
[0107] As a possible implementation, the vehicle terminal queries that the target folder includes the authentication file, and verifies and authenticates the legality of the external storage device according to the authentication file.
[0108] Specifically, the DebugService program queries the authentication file (Certification.key) in the target folder, reads the authentication file Certification.key into the memory, and then verifies and authenticates the authentication file Certification.key. The authentication file Certification.key is generated by using the sha256 digest algorithm on the basis of all the contents in the Car_Debug folder and a pre-generated public key.
[0109] S207, the vehicle terminal judges whether the target folder includes the target subfolder in the case of the legality of the external storage device passing the verification.
[0110] As a possible implementation, the vehicle terminal obtains the verification and authentication result of the legality of the external storage device, and judges whether the legality of the external storage device passes the verification according to the verification and authentication result. In the case of the legality of the external storage device passing the verification, the vehicle terminal further judges whether the target folder includes the target subfolder.
[0111] In one design, the task execution method in the embodiment of the application specifically includes the following S2021-S2022.
[0112] S2021, the vehicle terminal judges whether the target folder exists in the external storage device in the case that the vehicle terminal detects that the touch screen is abnormal and the external storage device is accessed.
[0113] As a possible implementation, the vehicle terminal judges whether the touch screen is abnormal, and further judges whether the target folder exists in the external storage device in the case that the touch screen is judged to be abnormal and the external storage device is accessed.
[0114] It should be noted that the touch screen abnormality can include touch screen damage, touch screen display abnormality, touch screen unable to display content, and touch screen unable to use due to system crash, and the like, which are not limited by the embodiments of the present application.
[0115] S2022, the vehicle terminal confirms that the target folder exists in the external storage device.
[0116] Subsequently, the vehicle terminal confirms that the target folder exists in the external storage device, and executes the above S203.
[0117] The present application provides a task execution method, device, equipment and storage medium, which can automatically detect whether the target folder exists in the external storage device in the case that the external storage device is accessed. In the case that the target folder exists in the external storage device, the electronic device further automatically detects whether the target subfolder exists in the external storage device. In the case that the target subfolder exists in the target folder, the vehicle terminal executes the target task corresponding to the target subfolder. Thus, in the case that the vehicle terminal needs to export the log of the vehicle terminal or the application program in the vehicle system needs to be upgraded due to the problem of the vehicle system, the vehicle terminal automatically exports the log of the vehicle terminal or upgrades the application program in the vehicle system in the case that the log grabbing target subfolder or the application program upgrading target subfolder exists in the external storage device, without the need of inputting the related instruction through the man-machine interaction interface, which is simple and convenient. Thus, the technical problem that the vehicle system cannot normally execute the corresponding task when the interaction interface of the vehicle system is stuck or the touch screen has a problem is solved.
[0118] The foregoing mainly describes the solutions provided by the embodiments of the present invention from a methodological perspective. To achieve the above functions, it includes corresponding hardware structures and / or software modules for executing each function. Those skilled in the art should readily recognize that, in conjunction with the units and algorithm steps of the various examples described in the embodiments disclosed herein, the embodiments of the present invention can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present invention.
[0119] In this embodiment of the invention, the server can be divided into functional modules according to the above method example. For example, each function can be divided into its own functional modules, or two or more functions can be integrated into one processing module. The integrated module can be implemented in hardware or as a software functional module. Optionally, the module division in this embodiment of the invention is illustrative and only represents one logical functional division; other division methods may be used in actual implementation.
[0120] Figure 8 This is a schematic diagram of a task execution device provided in an embodiment of the present invention. It is applied to an in-vehicle terminal. Figure 3 As shown, the task execution device 30 provided in this embodiment of the invention includes: a determination unit 301 and an execution unit 302.
[0121] The determining unit 301 is used to determine the existence of a target folder in the external storage device when an external storage device is detected to be connected; the target folder is used to instruct the vehicle terminal to determine whether a target subfolder exists in the target folder; the target subfolder corresponds to a pre-set target task. For example, such as... Figure 3 As shown, the determining unit 301 can be used to execute S201-S202.
[0122] Execution unit 302 is used to execute the target task if a target subfolder exists within the target folder. For example, ... Figure 4 As shown, execution unit 302 can be used to execute S204.
[0123] Optionally, the target task is a log capture task, and the execution unit 302 is specifically used to: execute the log capture script if the target subfolder includes a log capture script; the log capture script is used to store the target log in the log of the vehicle terminal to the target subfolder; the log of the vehicle terminal is the log pre-generated by the vehicle terminal and stored in the electronic device.
[0124] Optionally, the target task is a log grabbing task, and the execution unit 302 is specifically configured to: in a case where the target subfolder does not include a log grabbing script, acquire a preset log and store the preset log into the target subfolder. For example, as shown in Figure 5 the execution unit 302 can be configured to perform S2041-S2044.
[0125] Optionally, the target task is an upgrading task, and the execution unit 302 is specifically configured to: in a case where the target subfolder includes an upgrading script and an upgrading package, execute the upgrading script based on the upgrading package; the upgrading script is used to upgrade a target application program in the vehicle terminal corresponding to the upgrading package. For example, as shown in Figure 8 the execution unit 302 can be configured to perform S2045 and S2047.
[0126] Optionally, as shown in Figure 6 the task execution apparatus further includes a generation unit 303 and a storage unit 304.
[0127] The generation unit 303 is configured to generate an upgrading log of the target application program after the upgrading of the target application program is completed. For example, as shown in Figure 6 the generation unit 303 can be configured to perform S2048.
[0128] The storage unit 304 is configured to store the upgrading log generated by the generation unit into the target subfolder. For example, as shown in Figure 8 the storage unit 304 can be configured to perform S2049.
[0129] Optionally, as shown in Figure 7 the target folder is further used to instruct the vehicle terminal to judge whether the target folder exists in the external storage device, and the task execution apparatus further includes a verification unit 305 and a judgment unit 306.
[0130] The verification unit 305 is configured to, in a case where the target folder exists in the external storage device, verify the legality of the external storage device based on the authentication file. For example, as shown in Figure 7 the verification unit 305 can be configured to perform S205.
[0131] The judgment unit 306 is configured to, in a case where the legality of the external storage device is verified, judge whether the target subfolder exists in the target folder. For example, as shown in Figure 8 the judgment unit 306 can be configured to perform S207.
[0132] Optionally, as shown in Figure 9 the determination unit is specifically configured to, in a case where it is detected that the touch screen of the vehicle terminal is abnormal and the external storage device is accessed, determine that the target folder exists in the external storage device.
[0133] In the case of implementing the functions of the above-mentioned integrated modules in the form of hardware, the embodiments of the present application provide a possible structural schematic diagram of the electronic device involved in the above-mentioned embodiments. As shown in the figure, the electronic device 40 comprises a processor 401, a memory 402 and a bus 403. The processor 401 and the memory 402 can be connected through the bus 403. Figure 9
[0134] The processor 401 is the control center of the communication device, and can be one processor or a general term of multiple processing elements. For example, the processor 401 can be a general central processing unit (CPU), or other general-purpose processors, etc. The general-purpose processor can be a microprocessor or any conventional processor, etc.
[0135] As an embodiment, the processor 401 can comprise one or more CPUs, such as the CPU 0 and the CPU 1 shown in the figure. Figure 9
[0136] The memory 402 can be a read-only memory (ROM) or other type of static storage device that can store static information and instructions, a random access memory (RAM) or other type of dynamic storage device that can store information and instructions, an electrically erasable programmable read-only memory (EEPROM), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store desired program codes in the form of instructions or data structures and can be accessed by a computer, but is not limited to this.
[0137] As a possible implementation manner, the memory 402 can exist independently of the processor 401, and the memory 402 can be connected to the processor 401 through the bus 403, for storing instructions or program codes. When the processor 401 invokes and executes the instructions or program codes stored in the memory 402, the resource isolation method provided by the embodiments of the present application can be implemented.
[0138] In another possible implementation manner, the memory 402 can also be integrated with the processor 401.
[0139] The bus 403 can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, Figure 9 Only one thick line is used to represent the bus in the figure, but it does not mean that there is only one bus or only one type of bus.
[0140] It should be noted that, Figure 9 The structure shown does not constitute a limitation on the electronic device 40. In addition to the components shown, Figure 8 The electronic device 40 can include more or fewer components than shown, or combine certain components, or different component arrangements.
[0141] As an example, in combination with Figure 9 The function implemented by the determination unit 301 in the task execution apparatus 30 is the same as the function of the processor 401 in Figure 9
[0142] Optionally, as Figure 10 The electronic device 40 provided by the embodiment of the present application can further include a communication interface 404.
[0143] The communication interface 404 is used to connect with other devices through a communication network. The communication network can be an Ethernet, a wireless access network, a wireless local area network (WLAN), or the like. The communication interface 404 can include a receiving unit for receiving data, and a sending unit for sending data.
[0144] In one design, the communication interface in the electronic device provided by the embodiment of the present application can also be integrated in the processor.
[0145] Figure 10 Another hardware structure of the electronic device in the embodiment of the present application is shown. As Figure 10 The electronic device 50 includes a processor 501 and a communication interface 502. The processor 501 is coupled with the communication interface 502.
[0146] The function of the processor 501 can refer to the description of the processor 401 above. In addition, the processor 501 also has a storage function, which can refer to the function of the memory 402 above.
[0147] The communication interface 502 is configured to provide data for the processor 501. The communication interface 502 can be an internal interface of the communication device, or an external interface of the communication device (corresponding to the communication interface 404).
[0148] It should be noted that, Figure 10 The structure shown in the above embodiment does not constitute a limitation on the electronic device, except In addition to the components shown, the server can include more or less components, or different arrangements of the components, than shown. The server can also include components in addition to, or other than, those illustrated for the sake of providing the functions described.
[0149] Through the above description of the embodiments, those skilled in the art can clearly understand that, for the convenience and brevity of description, only the above-mentioned division of functional units is taken as an example. In actual application, the above-mentioned functions can be completed by different functional units according to needs, that is, the internal structure of the device is divided into different functional units to complete all or part of the functions described above. The specific working process of the above-mentioned system, device and unit can refer to the corresponding process in the foregoing method embodiments, which will not be described here.
[0150] The embodiment of the present application also provides an external storage device, which comprises a storage unit configured to store a target folder and a target subfolder. The target folder is configured to instruct the vehicle-mounted terminal to determine whether the target subfolder exists in the target folder. The target subfolder is configured to instruct the vehicle-mounted terminal to execute a target task. When the target subfolder is a log grabbing subfolder, the vehicle-mounted terminal executes a log grabbing task. When the target subfolder is an application program upgrading subfolder, the vehicle-mounted terminal executes an application program upgrading task.
[0151] The embodiment of the present application also provides a computer readable storage medium, which stores instructions. When a computer executes the instructions, the computer executes each step in the method flow shown in the above method embodiment.
[0152] The embodiment of the present application provides a computer program product comprising instructions, which, when executed on a computer, cause the computer to perform the task execution method in the above method embodiment.
[0153] The computer readable storage medium, for example, can be, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium include an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a register, a hard disk, an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. A specific exemplary storage medium is coupled to the processor such that the processor can read information from, and write information to, the storage medium. Of course, the storage medium can be a component of the processor. Suitable processors for the execution of a program of instructions include, by way of example, both general and special purpose microprocessors. The processor can be coupled to memory to store data and instructions for the processor. The memory can be a component of the processor. Suitable processors for the execution of a program of instructions include, by way of example, both general and special purpose microprocessors. The processor can be coupled to memory to store data and instructions for the processor. The memory can be a component of the processor. The various embodiments described herein can be implemented as a system that includes one or more computers.
[0154] The electronic device, the computer readable storage medium, and the computer program product in the embodiments of the present application can be applied to the above method, and the technical effects that can be achieved thereby can be referred to the above method embodiments. The embodiments of the present application will not be described here again.
[0155] The above merely describes specific embodiments of the present application, but the protection scope of the present application is not limited thereto. Any change or replacement within the technical scope disclosed by the present application should be covered within the protection scope of the present application.
Claims
1. A task execution method applied to an in-vehicle terminal, characterized in that, The method includes: Upon detecting an external storage device connection, it is determined that a target folder exists on the external storage device; the target folder is used to instruct the vehicle terminal to determine whether a target subfolder exists within the target folder; the target subfolder corresponds to a pre-set target task; the target folder is also used to instruct the vehicle terminal to determine whether an authentication file exists within the target folder; If the authentication file exists in the target folder, the legitimacy of the external storage device is verified based on the authentication file. If the external storage device passes the validity verification, determine whether the target subfolder exists in the target folder; If the target subfolder exists in the target folder, execute the target task; The target task is a log capture task, and executing the target task includes: If the target subfolder does not contain a log capture script, obtain preset logs and store the preset logs in the target subfolder; The target subfolder includes the log capture script, and the log capture script is executed; the log capture script is used to store the target logs in the logs of the vehicle terminal to the target subfolder; the logs of the vehicle terminal are logs pre-generated and stored in the vehicle terminal; The target task is an application upgrade task, and executing the target task includes: If the target subfolder includes an upgrade script and an upgrade package, the upgrade script is executed based on the upgrade package; the upgrade script is used to upgrade the target application in the vehicle terminal corresponding to the upgrade package.
2. The task execution method according to claim 1, characterized in that, The method further includes: After the target application upgrade is completed, an upgrade log for the target application is generated and stored in the target subfolder.
3. The task execution method according to claim 1, characterized in that, The step of determining the existence of a target folder on an external storage device upon detecting its access includes: When an abnormality is detected in the touchscreen of the vehicle terminal and the external storage device is connected, it is determined that a target folder exists in the external storage device.
4. A task execution device, applied to a vehicle-mounted terminal, characterized in that, The device includes: a determining unit, a verifying unit, a judging unit, and an execution unit; The determining unit is used to determine that a target folder exists in the external storage device when an external storage device is detected to be connected; the target folder is used to instruct the vehicle terminal to determine whether a target subfolder exists in the target folder; the target subfolder corresponds to a pre-set target task; the target folder is also used to instruct the vehicle terminal to determine whether an authentication file exists in the target folder; The verification unit is used to verify the legitimacy of the external storage device based on the authentication file if the authentication file exists in the target folder. The judgment unit is used to determine whether the target subfolder exists in the target folder if the external storage device passes the legality verification. The execution unit is configured to execute the target task if the target subfolder exists in the target folder; The target task is a log capture task, and the execution unit is specifically used for: If the target subfolder does not contain a log capture script, obtain preset logs and store the preset logs in the target subfolder; If the target subfolder includes the log capture script, the log capture script is executed; the log capture script is used to store the target logs in the vehicle terminal's logs to the target subfolder; the vehicle terminal's logs are logs pre-generated and stored in the vehicle terminal; The target task is an upgrade task, and the execution unit is specifically used for: If the target subfolder includes an upgrade script and an upgrade package, the upgrade script is executed based on the upgrade package; the upgrade script is used to upgrade the target application in the vehicle terminal corresponding to the upgrade package.
5. The task execution device according to claim 4, characterized in that, The device further includes: a generation unit and a storage unit; The generation unit is used to generate an upgrade log for the target application after the target application upgrade is completed. The storage unit is used to store the upgrade log generated by the generation unit into the target subfolder.
6. The task execution device according to claim 4, characterized in that, The determining unit is specifically used to determine that a target folder exists in the external storage device when an abnormality is detected in the touch screen of the vehicle terminal and the external storage device is connected.
7. A computer-readable storage medium for storing one or more programs, characterized in that, The one or more programs include instructions that, when executed by a computer, cause the computer to perform the task execution method as described in any one of claims 1-3.
8. An electronic device, characterized in that, include: A processor and a memory; wherein the memory is used to store one or more programs, the one or more programs including computer execution instructions, and when the electronic device is running, the processor executes the computer execution instructions stored in the memory to cause the electronic device to perform the task execution method according to any one of claims 1-3.
Citation Information
Patent Citations
Automatic log file exporting method and set-top box
CN107547943A
Upgrading method and device for vehicle-mounted intelligent terminal
CN112286559A