Exception handling method and device, equipment, storage medium and program product
By realizing automatic power-off and power-on processing of the universal serial bus module in vehicle and machine equipment, the problem of users needing to manually handle abnormalities is solved, and the user experience and device stability are improved.
Patent Information
- Application Number
- CN202411606436.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-12
- Publication Date
- 2025-03-04
AI Technical Summary
When an abnormality occurs when an existing vehicle and computer equipment uses a universal serial bus interface, users need to manually find and solve it, which reduces the user experience.
The processor of the vehicle machine equipment generates a serial port message indicating that the general serial bus module is powered on and then powered on, and the controller control module is powered on and then powered on, actively realizing the hardware's re-powered on to ensure the normal execution of functional operations.
No need for users to manually handle abnormalities, which improves user experience and driving safety, and ensures the stability and integrity of vehicle equipment functions.
Smart Images

Figure CN119557130A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to an exception handling method, device, electronic device, and computer-readable storage medium. Background Art
[0002] Existing car equipment usually connects to various external devices through the universal serial bus interface to meet the diverse needs of users, such as charging a mobile phone, connecting a camera, or connecting a mobile phone to play audio and video, etc. When an exception occurs during the use of the universal serial bus interface, the user is usually required to find and resolve the exception, which reduces the user experience. Summary of the invention
[0003] The embodiments of the present disclosure provide an exception handling method, device, electronic device, computer-readable storage medium, and computer program product, which do not require users to search for and resolve exceptions, thereby improving user experience.
[0004] In a first aspect, an embodiment of the present disclosure proposes an exception handling method, including: a processor of a vehicle-mounted device generates a serial port message indicating that the universal serial bus module is powered off and then powered on in response to determining that an exception has occurred in a functional operation based on a universal serial bus module, and sends the serial port message to a controller of the vehicle-mounted device; the controller of the vehicle-mounted device controls the universal serial bus module to be powered off and then powered on through an input and output port based on the serial port message; the processor of the vehicle-mounted device configures the memory space again in response to determining that the universal serial bus module is powered off and then powered on and the functional operation is to configure memory space; the processor of the vehicle-mounted device continues data transmission based on record information associated with data transmission in response to determining that the universal serial bus module is powered off and then powered on and the functional operation is data transmission.
[0005] In a possible embodiment, the method provided in the first aspect also includes: the processor of the vehicle-mounted device initializes the universal serial bus module and configures the memory space in response to obtaining a power-on operation or a wake-up operation, and detects whether an abnormality occurs in the configured memory space; the processor of the vehicle-mounted device initializes the universal serial bus module again.
[0006] In a possible embodiment, the method provided in the first aspect also includes: the processor of the vehicle-mounted device obtains an application associated with the data transmission based on the error message in response to receiving an error message indicating an abnormal data transmission from the universal serial bus module; and the processor of the vehicle-mounted device obtains record information based on a memory mode of the application.
[0007] In a possible embodiment, the method provided in the first aspect further includes: after receiving the error message, the processor of the vehicle device deletes the sector data and stops data transmission.
[0008] In a second aspect, an embodiment of the present disclosure proposes an exception handling device, including: generating a sending module, which is configured to generate a serial port message instructing the universal serial bus module to be powered off and then on in response to determining that an abnormality has occurred in a functional operation based on a universal serial bus module through a processor, and send the serial port message to a controller. The sending module is configured to control the universal serial bus module to be powered off and then on based on the serial port message and input and output ports through the controller. The configuration module is configured to configure the memory space again in response to determining that the universal serial bus module is powered off and then on and the functional operation is to configure the memory space through the processor. The transmission module is configured to continue data transmission based on the record information associated with the data transmission in response to determining that the universal serial bus module is powered off and then on and the functional operation is data transmission through the processor.
[0009] In a possible embodiment, the device provided by the second aspect also includes: an initialization configuration module, which is configured to initialize the universal serial bus module and configure the memory space in response to obtaining a power-on operation or a wake-up operation through the processor, and detect whether an abnormality occurs in the configured memory space; an initialization module, which is configured so that the processor of the vehicle-mounted device initializes the universal serial bus module again.
[0010] In a possible embodiment, the device provided by the second aspect also includes: a first acquisition module, configured to obtain an application associated with the data transmission based on the error message received by the processor in response to an error message indicating an abnormal data transmission from the universal serial bus module; and a second acquisition module, configured to obtain the record information based on the memory mode of the application through the processor.
[0011] In a third aspect, an embodiment of the present disclosure provides an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can implement the exception handling method described in any implementation method in the first aspect when executing the instructions.
[0012] In a fourth aspect, an embodiment of the present disclosure provides a non-transitory computer-readable storage medium storing computer instructions, which are used to enable a computer to implement the exception handling method described in any implementation method of the first aspect when executed.
[0013] In a fifth aspect, an embodiment of the present disclosure provides a computer program product comprising a computer program, which, when executed by a processor, can implement the exception handling method described in any implementation manner in the first aspect.
[0014] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description.
[0015] According to the technical solution of the embodiment of the present disclosure, in response to determining that an abnormality has occurred in a functional operation based on a universal serial bus module, the universal serial bus module is powered off and then powered on again through the input and output ports, and the hardware is actively powered on again, so that the functions of the universal serial bus module can be used normally, and then the functional operation is continued. The user does not need to find and resolve the abnormality, which can improve the user experience. If an abnormality occurs in the configuration memory space, the vehicle computer function can be improved to improve the user experience. If an abnormality occurs in data transmission, data transmission can continue based on the recorded information associated with the data transmission, and the user does not need to be distracted to handle the abnormality, which can improve driving safety and user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Other features, objects and advantages of the present disclosure will become more apparent from the detailed description of non-limiting embodiments made with reference to the following drawings:
[0017] Figure 1 is an exemplary system architecture in which the present disclosure may be applied;
[0018] Figure 2 A flowchart of an exception handling method provided by an embodiment of the present disclosure;
[0019] Figure 3 A flowchart of another exception handling method provided by an embodiment of the present disclosure;
[0020] Figure 4 A flowchart of another exception handling method provided in an embodiment of the present disclosure;
[0021] Figure 5 A structural block diagram of an exception handling device provided in an embodiment of the present disclosure;
[0022] Figure 6 A schematic diagram of the structure of an electronic device suitable for executing an exception handling method provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0023] In order to better understand the present application, a more detailed description will be made of various aspects of the present application with reference to the accompanying drawings. It should be understood that these detailed descriptions are only descriptions of exemplary embodiments of the present application, and are not intended to limit the scope of the present application in any way. Throughout the specification, the same reference numerals refer to the same elements. The expression "and / or" includes any and all combinations of one or more of the associated listed items.
[0024] It should be understood that expressions such as "include", "including", "have", "contain" and / or "including" in this specification are open rather than closed expressions, which indicate the presence of the stated features, elements and / or components, but do not exclude the presence of one or more other features, elements, components and / or combinations thereof. In addition, when expressions such as "at least one of..." appear after a list of listed features, they modify the entire list of features rather than just the individual elements in the list. In addition, when describing embodiments of the present application, "may" is used to mean "one or more embodiments of the present application". And, the term "exemplary" is intended to refer to an example or illustration.
[0025] Unless otherwise specified, all words (including engineering terms and scientific and technological terms) used in this article have the same meaning as those commonly understood by ordinary technicians in the field to which this application belongs. It should also be understood that, unless clearly stated in this application, words defined in common dictionaries should be interpreted as having the same meaning as their meaning in the context of the relevant technology, and should not be interpreted in an idealized or overly formal sense.
[0026] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. In addition, unless explicitly limited or contradictory to the context, the specific steps included in the method described in the present application are not necessarily limited to the order described, but can be performed in any order or in parallel. The present application will be described in detail below with reference to the accompanying drawings and in conjunction with the embodiments.
[0027] Figure 1 An exemplary system architecture 100 is shown to which embodiments of the exception handling method, apparatus, electronic device, vehicle, computer-readable storage medium, and computer program product of the present disclosure may be applied.
[0028] like Figure 1 As shown, the system architecture 100 may include a vehicle device 101 and an external device 102. The vehicle device 101 may include: a processor, a controller, an input / output port, and a universal serial bus module. The external device 102 may be connected to the universal serial bus module of the vehicle device 101, for example, by wired connection.
[0029] The vehicle-mounted device 101 can be hardware or software. When the electronic device 101 is hardware, it can be various electronic devices, including but not limited to vehicle-mounted devices, vehicles, central control devices, vehicle-mounted systems, etc.; when the electronic device 101 is software, it can be installed in the electronic devices listed above, and it can be implemented as multiple software or software modules, or as a single software or software module, which is not specifically limited here. The external device 102 can be a device connected to the vehicle-mounted device 101, such as a mobile phone, camera, tablet and other terminal devices, and also a universal serial bus (USB) disk (abbreviated as U disk), a mobile solid-state hard disk, a solid-state hard disk box and other pluggable storage devices.
[0030] It should be understood that Figure 1 The number of vehicle-mounted devices and external devices in the embodiment is only for illustration. Any number of vehicle-mounted devices and external devices may be provided according to implementation requirements.
[0031] Please refer to Figure 2 , Figure 2 This is a flowchart of an exception handling method provided by an embodiment of the present disclosure, wherein process 200 includes the following steps:
[0032] Step 201: In response to determining that an abnormality occurs in a function operation based on a universal serial bus module, a processor of the vehicle device generates a serial port message instructing the universal serial bus module to be powered off and then powered on, and sends the serial port message to a controller of the vehicle device.
[0033] Exemplarily, the processor may be a microprocessor unit (MPU), etc., and the controller may be a microcontroller unit (MCU), etc. A universal serial bus (USB) module is configured in the vehicle device.
[0034] Exemplarily, the operation may include configuring memory space and / or data transmission. The abnormality of the functional operation may be an error or failure in configuring the memory space, or an error or failure in data transmission.
[0035] In this embodiment, the processor of the vehicle device detects an abnormality when configuring memory space for the universal serial bus module, or detects an abnormality in data transmission through the universal serial bus module, generates a serial port message, and the serial port message is used to instruct the universal serial bus module to be powered off and then powered on, and sends the serial port message to the controller of the vehicle device to instruct the controller to control the universal serial bus module to be powered off and then powered on, so as to realize hardware power-on. The processor and the controller can communicate with each other through the serial port protocol.
[0036] Optionally, the serial port message can be encapsulated into an interface function, which is called after the failure of the function related to the universal serial bus module. For example, a bit of 0 in the interface function indicates that the universal serial bus module is powered off, and a bit of 1 in the interface function indicates that the universal serial bus module is powered on, which is only an example.
[0037] Step 202: The controller of the vehicle machine device controls the universal serial bus module to be powered off and then powered on through the input and output ports based on the serial port message.
[0038] Exemplarily, the input / output port may be a general purpose input / output (GPIO) interface, and the controller of the vehicle machine device controls the power supply of the corresponding module through the input / output port, and the module includes a universal serial bus module.
[0039] In this embodiment, after receiving the serial port message, the controller of the vehicle-mounted device switches the state of the input / output port that powers the universal serial bus module. For example, after lowering the level of the input / output port that powers the universal serial bus module, the level of the input / output port that powers the universal serial bus module is raised, thereby controlling the universal serial bus module to be powered off and then powered on.
[0040] If the universal serial bus module is controlled to connect to an external device, simulated hot plugging of the external device (such as a camera, etc.) connected to the universal serial bus module can be achieved, without the need for the user to manually plug and unplug the external device, thereby improving the user experience.
[0041] Step 203: In response to determining that the universal serial bus module is powered off and then powered on and the functional operation is to configure the memory space, the processor of the vehicle device configures the memory space again.
[0042] After an exception occurs in the configuration memory space, it is determined that the universal serial bus module is powered on again and the memory space is configured again so that the functions of the universal serial bus module can be used normally without the user having to query the abnormal problem, thereby improving the vehicle computer functions and enhancing the user experience.
[0043] Step 204: In response to determining that the universal serial bus module is powered off and then powered on and the functional operation is data transmission, the processor of the vehicle device continues data transmission based on the record information associated with the data transmission.
[0044] Exemplarily, the recorded information includes, but is not limited to, one or more of the following: the time of failure of data transmission, the content of the transmitted data, the amount of data transmitted, and the transmission rate.
[0045] When data transmission is abnormal, the USB module is powered on again, and the external device connected to the USB module can be actively reconnected and mounted, and then data transmission can continue based on the recorded information associated with data transmission, such as continuing to play videos, so as to avoid users discovering device abnormalities and raising questions, and reduce the sense of disconnection for users. Users do not need to be distracted by plugging and unplugging devices, which can improve driving safety.
[0046] The exception handling method provided by the embodiment of the present disclosure, in response to determining that an exception occurs in a functional operation based on a universal serial bus module, controls the universal serial bus module to power off and then power on through an input and output port, actively powers on the hardware, and then continues to perform the functional operation. The user does not need to find and resolve the exception, which can improve the user experience.
[0047] Please refer to Figure 3 , Figure 3 A flowchart of another exception handling method provided by an embodiment of the present disclosure, wherein process 300 includes the following steps:
[0048] Step 301: In response to obtaining a power-on operation or a wake-up operation, the processor of the vehicle device initializes the universal serial bus module, configures the memory space, and detects whether an abnormality occurs in the configured memory space.
[0049] For example, the processor of the vehicle equipment can use the port function hub_port_connect to initialize the universal serial bus module, wait for the external device to connect to the universal serial bus module, and use the configuration space structure function usb_alloc_dev to configure the memory space.
[0050] For example, during the initialization of the USB module, an error or failure occurs when allocating space resources for the USB module.
[0051] Step 302: In response to determining that an abnormality occurs in the configuration memory space based on the USB module, the processor of the vehicle device generates a serial port message instructing the USB module to be powered off and then powered on, and sends the serial port message to the controller of the vehicle device.
[0052] Step 303: The controller of the vehicle machine device controls the universal serial bus module to be powered off and then powered on through the input and output ports based on the serial port message.
[0053] Optionally, the controller of the vehicle device can control the universal serial bus module through the input and output ports to power off and then power on based on the serial port message after a period of time (for example, a delay of 200ms after determining that an abnormality has occurred), for example, to re-power external devices.
[0054] The specific implementation of the above steps 302 and 303 can refer to the above steps 201 and 202, which will not be repeated here.
[0055] Step 304: In response to determining that the USB module is powered off and then powered on, the processor of the vehicle device initializes the USB module again and configures the memory space again.
[0056] The processor of the vehicle-mounted device responds to determining that the universal serial bus module is powered off and then powered on, and executes the port function hub_port_connect again to initialize the universal serial bus module, and executes the configuration space structure function usb_alloc_dev again to configure the memory space, which can solve the impact of occasional problems on user experience and improve the code logic.
[0057] Optionally, after the hub_port_connect function enters the error repair process, the processor of the vehicle device can also generate a serial port message to instruct the universal serial bus module to power off and then power on. After the universal serial bus module is powered on again, the port function hub_port_connect is executed again to initialize the universal serial bus module, which can improve the vehicle function and enhance the user experience.
[0058] In the exception handling method provided by the embodiment of the present disclosure, the processor of the vehicle-mounted device initializes the universal serial bus module and configures the memory space. After an exception occurs in the configuration of the memory space, a serial port message is sent to the controller of the vehicle-mounted device. The controller controls the universal serial bus module to power off and then power on through the input and output ports based on the serial port message. The processor of the vehicle-mounted device initializes the universal serial bus module and configures the memory space. After an exception occurs in the configuration of the memory space, the user does not need to query the exception problem, and the external device identification or terminal device charging can continue, etc., thereby improving the vehicle-mounted function and enhancing the user experience.
[0059] Please refer to Figure 4 , Figure 4 A flowchart of another exception handling method provided by an embodiment of the present disclosure, wherein process 400 includes the following steps:
[0060] Step 401: In response to determining that data transmission based on the universal serial bus module is abnormal, the processor of the vehicle-mounted device generates a serial port message instructing the universal serial bus module to be powered off and then powered on, sends the serial port message to the controller of the vehicle-mounted device, obtains an application associated with the data transmission, and obtains record information based on the memory mode of the application.
[0061] Optionally, the method provided by the embodiment of the present disclosure may further include: the processor of the vehicle device determines whether an abnormality occurs in the data transmission based on the universal serial bus module. For example, the processor of the vehicle device receives an error message from the universal serial bus module indicating that an abnormality occurs in the data transmission based on the universal serial bus module, and determines that an abnormality occurs in the data transmission based on the universal serial bus module according to the error message.
[0062] Optionally, the data transmission anomaly may be caused by an external device or by a vehicle-mounted device, which is not limited in the present disclosure.
[0063] Optionally, the error message may include information related to the data transmission, such as an application identifier associated with the data transmission. The processor of the vehicle device obtains the application associated with the data transmission according to the application identifier associated with the data transmission, and obtains the record information based on the memory mode of the application.
[0064] The embodiment of the present disclosure does not limit the execution order of generating the serial port message and obtaining the record information. The serial port message can be generated first and then the record information can be obtained, or the record information can be obtained first and then the serial port message can be generated.
[0065] In some embodiments, the method provided by the embodiment of the present disclosure may further include: after receiving the error message, the processor of the vehicle device deletes the sector data and stops the data transmission. After receiving the error message indicating that the data transmission is abnormal, the processor of the vehicle device releases resources, clears the sector data, and stops the data transmission. The embodiment of the present disclosure does not limit the execution order of deleting the sector data, generating the serial port message, and obtaining the record information.
[0066] Step 402: The controller of the vehicle machine device controls the universal serial bus module to be powered off and then powered on through the input and output ports based on the serial port message.
[0067] Step 403: In response to determining that the universal serial bus module is powered off and then powered on, the processor of the vehicle device continues to perform data transmission based on the recorded information associated with the data transmission.
[0068] The specific implementation of the above steps 402 and 403 can refer to the above steps 202 and 204, which will not be repeated here.
[0069] The method provided by the embodiment of the present disclosure determines that an abnormality has occurred in data transmission based on a universal serial bus module, obtains data transmission related record information, controls the universal serial bus module to power off and then power on, and continues data transmission based on the record information, thereby reducing the user's sense of disconnection.
[0070] To deepen understanding, the present disclosure also provides specific implementation solutions in combination with specific application scenarios.
[0071] Take the electrical connection between a USB flash drive and a universal serial bus module of a vehicle-mounted device as an example. In response to obtaining a power-on operation or a wake-up operation, the MPU of the vehicle-mounted device uses the port function hub_port_connect to initialize the universal serial bus module, uses the configuration space structure function usb_alloc_dev to configure the memory space, and detects whether an abnormality occurs in the configuration memory space.
[0072] When the MPU detects that there is no abnormality in the configuration memory space and detects the operation of playing music in the USB flash drive, the USB flash drive sends the music data to the vehicle-mounted device through the universal serial bus module, and the vehicle-mounted device receives the music data and plays the music.
[0073] If the MPU detects that an abnormality has occurred in the configuration memory space, it generates a serial port message instructing the universal serial bus module to be powered off and then powered on, and sends the serial port message to the MCU of the vehicle device. Based on the serial port message, the MCU controls the universal serial bus module to be powered off and then powered on through GPIO, which can realize simulated hot plugging of the USB flash drive (if the USB flash drive is already connected) that is electrically connected to the universal serial bus module, without the need for the user to manually plug in and out the USB flash drive. In response to determining that the universal serial bus module has been powered off and then powered on, the MPU initializes the universal serial bus module again, configures the memory space again, and detects whether an abnormality has occurred in the configuration memory space. If an abnormality has been detected in the configuration memory space again, the above steps can be repeated. If the MPU detects that the configuration memory space is normal, the vehicle device and the USB flash drive can interact and transmit data based on the user's playback operation, such as playing music.
[0074] When the U disk interacts with the vehicle-mounted device through the universal serial bus module and the vehicle-mounted device plays music through the music reference, the MPU can detect whether there is an abnormality in the data transmission based on the universal serial bus module. If an abnormality occurs, a serial port message is generated and sent to the MCU. The record information can also be obtained based on the memory mode of the music application. The record information can record the abnormal time, the content of the transmitted music data, the amount of data transmitted, etc. After receiving the serial port message, the MCU controls the universal serial bus module to power off and then power on through GPIO to reconnect the U disk, without the user manually unplugging and plugging the U disk. In response to determining that the universal serial bus module has been powered off and then powered on, the MPU continues to play music based on the recorded information. The reconnected U disk continues to send music data to the vehicle-mounted device, which can reduce the sense of disconnection for users.
[0075] Further references Figure 5 As an implementation of the methods shown in the above figures, the present disclosure provides an embodiment of an exception handling device. The device embodiment corresponds to the above method embodiment, and the device can be specifically applied to various electronic devices.
[0076] like Figure 5As shown, the exception handling device 500 of this embodiment may include: a generation and sending module 501, a sending module 502, a configuration module 503 and a transmission module 504. Among them, the generation and sending module 501 is configured to generate a serial port message indicating that the universal serial bus module is powered off and then powered on in response to determining that an abnormality occurs in the functional operation based on the universal serial bus module through the processor, and send the serial port message to the controller. The sending module 502 is configured to control the universal serial bus module to be powered off and then powered on based on the serial port message and the input and output ports through the controller. The configuration module 503 is configured to configure the memory space again in response to determining that the universal serial bus module is powered off and then powered on and the functional operation is to configure the memory space through the processor. The transmission module 504 is configured to continue data transmission based on the record information associated with the data transmission in response to determining that the universal serial bus module is powered off and then powered on and the functional operation is data transmission through the processor.
[0077] In this embodiment, in the exception handling device 500: the specific processing of generating the sending module 501, the sending module 502, the configuration module 503 and the transmission module 504 and the technical effects brought about by them can refer to the relevant descriptions of the above embodiments respectively, and will not be repeated here.
[0078] In a possible embodiment, the exception handling device 500 also includes: an initialization configuration module, which is configured to initialize the universal serial bus module and configure the memory space in response to obtaining a power-on operation or a wake-up operation through the processor, and detect whether an abnormality occurs in the configured memory space; an initialization module, which is configured so that the processor of the vehicle-mounted device initializes the universal serial bus module again.
[0079] In a possible embodiment, the exception handling device 500 also includes: a first acquisition module, configured to obtain an application associated with the data transmission based on the error message received by the processor in response to an error message indicating that an exception has occurred in the data transmission from the universal serial bus module; and a second acquisition module, configured to obtain the record information based on the memory mode of the application through the processor.
[0080] In a possible embodiment, the exception handling device 500 further includes: a clear transmission module, configured to delete sector data and stop data transmission after receiving the error message through the processor.
[0081] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can implement the exception handling method described in any of the above embodiments when executing.
[0082] According to an embodiment of the present disclosure, the present disclosure further provides a readable storage medium, which stores computer instructions, and the computer instructions are used to enable a computer to implement the exception handling method described in any of the above embodiments when executed.
[0083] According to an embodiment of the present disclosure, the present disclosure further provides a computer program product, which can implement the exception handling method described in any of the above embodiments when executed by a processor.
[0084] Figure 6 A schematic block diagram of an example electronic device 600 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of vehicle-mounted devices, vehicles, central control devices, and vehicle systems. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.
[0085] like Figure 6 As shown, the device 600 includes a computing unit 601, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 602 or a computer program loaded from a storage unit 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the device 600 can also be stored. The computing unit 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0086] A number of components in the device 600 are connected to the I / O interface 605, including: an input unit 606, such as a keyboard, a mouse, etc.; an output unit 607, such as various types of displays, speakers, etc.; a storage unit 608, such as a disk, an optical disk, etc.; and a communication unit 609, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 609 allows the device 600 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0087] The computing unit 601 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 601 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 601 performs the various methods and processes described above, such as exception handling methods. For example, in some embodiments, the exception handling method may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 608. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 600 via ROM 602 and / or communication unit 609. When the computer program is loaded into RAM 603 and executed by the computing unit 601, one or more steps of the exception handling method described above may be performed. Alternatively, in other embodiments, the computing unit 601 may be configured to perform the exception handling method in any other appropriate manner (e.g., by means of firmware).
[0088] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0089] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0090] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0091] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0092] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.
[0093] According to the technical solution of the embodiment of the present disclosure, in response to determining that an abnormality has occurred in a functional operation based on a universal serial bus module, the universal serial bus module is powered off and then powered on again through the input and output ports, and the hardware is actively powered on again, so that the functions of the universal serial bus module can be used normally, and then the functional operation is continued. The user does not need to find and resolve the abnormality, which can improve the user experience. If an abnormality occurs in the configuration memory space, the vehicle computer function can be improved to improve the user experience. If an abnormality occurs in data transmission, data transmission can continue based on the recorded information associated with the data transmission, and the user does not need to be distracted to handle the abnormality, which can improve driving safety and user experience.
[0094] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.
[0095] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.
Claims
1. An exception handling method, comprising: The processor of the vehicle device generates a serial port message instructing the universal serial bus module to be powered off and then powered on in response to determining that an abnormality occurs in the functional operation based on the universal serial bus module, and sends the serial port message to the controller of the vehicle device; The controller of the vehicle equipment controls the universal serial bus module to be powered off and then powered on through the input and output ports based on the serial port message; The processor of the vehicle device configures the memory space again in response to determining that the universal serial bus module is powered off and then powered on and the functional operation is to configure the memory space; In response to determining that the universal serial bus module is powered off and then powered on and the functional operation is data transmission, the processor of the vehicle device continues data transmission based on the record information associated with the data transmission.
2. The method according to claim 1, wherein: The method further comprises: The processor of the vehicle machine device initializes the universal serial bus module and configures the memory space in response to obtaining the power-on operation or the wake-up operation, and detects whether an abnormality occurs in the configured memory space; The processor of the vehicle equipment initializes the universal serial bus module again.
3. The method according to claim 1, wherein: The method further comprises: The processor of the vehicle device, in response to receiving an error message from the universal serial bus module indicating that data transmission is abnormal, obtains an application associated with the data transmission based on the error message; The processor of the vehicle device obtains the record information based on the memory mode of the application.
4. The method according to claim 3, wherein: The method further comprises: After receiving the error message, the processor of the vehicle device deletes the sector data and stops data transmission.
5. An exception handling device, comprising: a generating and sending module configured to generate, through a processor, a serial port message instructing the universal serial bus module to be powered off and then powered on in response to determining that an abnormality occurs in a functional operation based on the universal serial bus module, and send the serial port message to the controller; a sending module configured to control the universal serial bus module to be powered off and then powered on based on the serial port message and the input and output ports through the controller; a configuration module configured to reconfigure the memory space in response to determining, through the processor, that the universal serial bus module is powered off and then powered on and the functional operation is to configure the memory space; The transmission module is configured to respond to the processor's determination that the universal serial bus module is powered off and then powered on and the functional operation is data transmission, and continue data transmission based on the record information associated with the data transmission.
6. The device according to claim 5, wherein: The device also includes: an initialization configuration module, configured to initialize the universal serial bus module and configure the memory space in response to obtaining a power-on operation or a wake-up operation through the processor, and detect whether an abnormality occurs in the configured memory space; The initialization module is configured so that the processor of the vehicle device initializes the universal serial bus module again.
7. The device according to claim 5, wherein: The device also includes: A first acquisition module is configured to, in response to receiving an error message indicating that data transmission is abnormal from the universal serial bus module through the processor, obtain an application associated with the data transmission based on the error message; The second acquisition module is configured to obtain the record information based on the memory mode of the application through the processor.
8. An electronic device, comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the exception handling method according to any one of claims 1 to 4.
9. A non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause the computer to execute the exception handling method according to any one of claims 1 to 4.
10. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the steps of the exception handling method according to any one of claims 1 to 4 are implemented.