In-vehicle camera state acquisition method and device, electronic equipment and storage medium
By setting the to-be-set status and register lock status of the camera in the vehicle, the camera status is automatically reported, which solves the problem of slow response speed of the camera function in the vehicle, improves the speed and accuracy of camera fault judgment, and improves the user experience.
Patent Information
- Application Number
- CN202410746178.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-11
- Publication Date
- 2024-10-01
AI Technical Summary
The response speed of the camera function in the vehicle is slow, and the camera failure cannot be determined in time, which affects the in-vehicle function experience.
By setting the camera's to-be-set status in the camera request, and judging the camera status based on the preset status and register lock status, automatic reporting of the camera status is achieved and the response time is reduced.
Improved the speed and accuracy of camera status reporting, timely judgment of camera failures, and improved user experience.
Smart Images

Figure CN118741077A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of vehicle technology, and specifically to a method, device, electronic device and storage medium for acquiring the status of a camera in a vehicle. Background Art
[0002] The increasing demand for images in vehicle functions has led to an increase in the requirements for the function response speed and process of the camera. The camera function in the vehicle is generally deployed in Android (Android system) and QNX (an operating system). When the upper-level application calls the camera function, if the camera does not exist or is faulty, the application cannot determine the camera failure in time. The fault can only be fed back when the application does not receive the data frame. The long response speed will affect the experience of the vehicle function. Summary of the invention
[0003] In view of the above problems, embodiments of the present application provide a method, device, electronic device and storage medium for obtaining the status of a camera in a vehicle, which are used to reduce the reporting time of the camera status.
[0004] According to one aspect of an embodiment of the present application, a method for obtaining the status of a camera in a vehicle is provided, comprising: receiving a request to call a camera; wherein the request includes a state to be set for the camera; assigning the value of the state to be set to a preset state; and reporting the status of the camera based on the value of the preset state and the value of the lock state of a register in the camera.
[0005] In an optional manner, reporting the status of the camera based on the value of the preset status and the value of the lock status of the register in the camera further includes: if the value of the preset status satisfies a preset first condition, and the value of the lock status of the register in the camera satisfies a preset second condition, reporting the status of the camera; if the value of the preset status does not satisfy the preset first condition, and the value of the lock status of the register in the camera does not satisfy the preset second condition, not reporting the status of the camera.
[0006] In an optional manner, reporting the status of the camera based on the value of the preset status and the value of the lock status of the register in the camera further includes: detecting the value of the preset status and the value of the lock status; if the value of the preset status is not zero and the value of the lock status indicates that it is not connected, reporting the status of the camera.
[0007] In an optional manner, reporting the status of the camera based on the value of the preset status and the value of the lock status of the register in the camera further includes: obtaining the connection status of the camera at a previous moment; if the value of the preset status is not zero, the value of the lock status indicates disconnected, and the connection status of the camera at a previous moment indicates disconnected, reporting the status of the camera.
[0008] In an optional manner, the method further includes: after reporting the state of the camera, setting the value of the preset state to zero.
[0009] In an optional manner, reporting the state of the camera further includes: acquiring a target state of the camera at a current moment; wherein the target state indicates that the state of the camera is not connected; and reporting the target state.
[0010] In an optional manner, the request also includes a camera identifier; before reporting the status of the camera based on the value of the preset status and the value of the lock status of the register in the camera, the method also includes: determining the camera based on the camera identifier, and turning on the camera in response to the request.
[0011] According to another aspect of an embodiment of the present application, a device for acquiring the status of a camera in a vehicle is provided, comprising: a first request acquisition module, used to acquire a first request for calling a target camera; wherein the first request includes a first logical identifier indicating the target camera; a second request acquisition module, used to acquire a second request for calling the target camera; wherein the second request includes a second logical identifier indicating the target camera; and a display multiplexing module, used to bind the first logical identifier and the second logical identifier to realize the display of a first application of the first request and a second application of the second request in an operating system interface based on the bound first logical identifier and second logical identifier.
[0012] According to another aspect of an embodiment of the present application, a device for acquiring the status of a camera in a vehicle is provided, comprising a request acquisition module for receiving a request for calling a camera; wherein the request includes a state to be set for the camera; an assignment module for assigning the value of the state to be set to a preset state; and a status reporting module for reporting the status of the camera based on the value of the preset state and the value of the lock state of a register in the camera.
[0013] According to one aspect of an embodiment of the present application, an electronic device is provided, including: a controller; and a memory for storing one or more programs, which, when executed by the controller, executes the above-mentioned method for acquiring the status of an in-vehicle camera.
[0014] According to one aspect of an embodiment of the present application, a computer-readable storage medium is also provided, on which computer-readable instructions are stored. When the computer-readable instructions are executed by a processor of a computer, the computer executes the above-mentioned method for obtaining the status of an in-vehicle camera.
[0015] According to one aspect of the embodiment of the present application, a computer program product or a computer program is also provided, the computer program product or the computer program includes a computer instruction, and the computer instruction is stored in a computer-readable storage medium. The processor of the computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the above-mentioned method for obtaining the state of the in-vehicle camera.
[0016] When the present application sends a request to call the camera, the camera's to-be-set state is set in the request, so as to assign the value of the to-be-set state to the preset state, thereby judging whether the camera responds to the request and opens normally through the value of the preset state and the value of the lock state. As a result, the camera's state can be automatically reported after the request is sent, without waiting for the failure to be fed back when no data frame is received, thereby reducing the response time and improving the response speed.
[0017] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present application, and are used together with the specification to explain the principles of the present application. Obviously, the drawings described below are only some embodiments of the present application, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0019] Figure 1 It is an implementation scenario diagram shown in an exemplary embodiment of the present application.
[0020] Figure 2 It is a flowchart of a method for obtaining the status of a camera in a vehicle shown in an exemplary embodiment of the present application.
[0021] Figure 3 It is a timing diagram of sending a request shown in an exemplary embodiment of the present application.
[0022] Figure 4 It is a structural schematic diagram of a device for acquiring the state of a camera in a vehicle shown in another exemplary embodiment of the present application.
[0023] Figure 5 It is a structural diagram of a computer system of an electronic device shown in an exemplary embodiment of the present application. DETAILED DESCRIPTION
[0024] Here, exemplary embodiments will be described in detail, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are only examples of devices and methods consistent with some aspects of the present application as detailed in the attached claims.
[0025] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities may be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.
[0026] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps can be decomposed, and some operations / steps can be combined or partially combined, so the actual execution order may change according to actual conditions.
[0027] The term "multiple" as used in this application refers to two or more than two. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the related objects are in an "or" relationship.
[0028] The increasing demand for images in vehicle functions has led to an increase in the requirements for the function response speed and process of the camera. The camera function in the vehicle is generally deployed in Android (Android system) and QNX (an operating system). When the upper-level application calls the camera function, if the camera does not exist or is faulty, the application cannot determine the camera failure in time. The fault can only be fed back when the application does not receive the data frame. The long response speed will affect the experience of the vehicle function.
[0029] In some ways, communication or file system storage status and reporting can be adopted in Android or QNX, but these methods will lead to redundancy of drivers in Android or QNX, and the difference with the native operation logic is too large, and the implementation cost is high.
[0030] Please refer to Figure 1 , Figure 1 This is an implementation scenario diagram shown in an exemplary embodiment of the present application, which includes a vehicle-mounted terminal and a server; wherein the vehicle-mounted terminal includes a display, which can be used for image display.
[0031] In some embodiments, the vehicle terminal is connected to the server for communication, and the camera status acquisition device in the vehicle is set in the server. It can be understood that Figure 1 The number of vehicle-mounted terminals in the figure is for illustration only, and in other embodiments, the number may be other.
[0032] In this embodiment, the vehicle terminal can receive the user's operation to generate a request to call the camera based on the user's operation. The operation can be an operation in which the user clicks on an application in the vehicle terminal on an interface, or an operation in which the language recognition module of the vehicle terminal accepts a voice command issued by the user, or an operation in which the camera module of the vehicle terminal recognizes the user's behavior. The generated operation enters the server, and the server receives the request to call the camera; wherein the request includes the camera's state to be set; the value of the state to be set is assigned to the preset state; and the camera state is reported based on the value of the preset state and the value of the lock state of the register in the camera.
[0033] In this embodiment, the server can be an independent physical server or a server cluster or distributed system composed of multiple physical servers, wherein multiple servers can form a blockchain, and the server is a node on the blockchain. The server can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network) and big data and artificial intelligence platforms, and there is no restriction on this here.
[0034] In some embodiments, the vehicle-mounted terminal receives the user's operation, and the application generates a corresponding request. It can be understood that the generation of the request can be completed in the server, and the server also includes a driving module. After the request is generated, the request is transmitted to the driving module, so that the driving module in the server reports the status based on the request. The reported status will eventually be fed back to the application. The application can render the status on the screen and display the reported status through the interface of the vehicle-mounted terminal.
[0035] Understandably, Figure 1 Although an implementation scenario diagram is shown, it is for illustrative purposes only. In other embodiments, there may be other implementation scenarios, which are not specifically limited here.
[0036] One aspect of the present application provides a method for obtaining the status of a camera in a vehicle. Figure 2 , Figure 2 is a flow chart of a method for obtaining the status of a camera in a vehicle according to an exemplary embodiment of the present application. The method for obtaining the status of a camera in a vehicle can be applied to Figure 1 In the server, or applied to Figure 1 The driver module of the server includes at least S210 to S230, which are described in detail as follows:
[0037] S210: receiving a request for invoking a camera; wherein the request includes a state of the camera to be set.
[0038] In this embodiment, a request for calling a camera may be generated by operating an application, and the request is used to instruct to turn on a corresponding camera.
[0039] The pending state indicates that the camera needs to enter the open state. Its value can be set by yourself, but it must not be zero.
[0040] In some embodiments, the request may include a camera identifier, and the camera to be opened for this request may be determined through the camera identifier.
[0041] It is understandable that there may be multiple cameras in the car computer, and different cameras correspond to different positions or functions. When the application is executed, the corresponding camera will be called to realize the functions required by the application in the car computer.
[0042] Different cameras correspond to different camera identifiers. Therefore, when obtaining a request, the camera that needs to be turned on corresponding to the request can be determined through the camera identifier. That is, when a request is received, the camera is determined based on the camera identifier in the request, and the camera is turned on in response to the request.
[0043] In some embodiments, the vehicle-mounted terminal receives the user's operation so that the relevant application generates a request to call the camera, and the request is sent to the driving module to complete the corresponding operation.
[0044] In some embodiments, the timing diagram of sending the request can refer to Figure 3 In the server, the request sending can be implemented through relevant functions. For example, in some embodiments, the request sending is implemented through the SendState function.
[0045] like Figure 3As shown, in one embodiment, Qualcomm native interfaces such as ais_open are used in the car computer. When the application calls the qcarcam_open interface (the camera native interface is exposed to the application for use), ais_open can be called, and the current state is set to AIS_USR_STATE_OPENED in ais_open. Each time ais_open is called, the current state is sent to the AisInput Configurer.cpp file through the newly added interface SendState for core event processing. Through the interface in the central system (a link processing framework of ais), it interacts with the device management interface (Camerasensordevice.cpp) of the driver. Specifically, Camera_Sensor_AEEUID_CTL_SEND_OPEN_STATE is a defined state, which is sent to Camerasensordevice.cpp through the SendState function in AisInput Configurer.cpp. Camerasensordevice.cpp parses Camera_Senso r_AEEUID_CTL_SEND_OPEN_STATE, call the SendState function in this state, send state (to be set state) through SensorDriver.cpp, and finally call the interface sensor_send_data function in the driver module max96722.c to obtain and store the state (state) to be set in the request. The process of calling the sensor_send_data function is Sensor_AEEUID_Custom_Fun c.sensor_send_state(state).
[0046] S220: Assign the value of the state to be set to the preset state.
[0047] In this embodiment, the preset state can be regarded as a global variable, and the value of the state to be set is assigned to the preset state, so that the value of the preset state is the value of the state to be set. In this process, if the preset state is not assigned a value, its default value is 0. By assigning the value of the state to be set to the preset state, the request for the application to turn on the camera can be confirmed based on the value of the preset state. At this time, the camera should be turned on based on the request.
[0048] In one embodiment, the sensor_send_data interface function in the driver module max96722.c realizes the acquisition and storage of the state to be set in the request. The sensor_send_state function mainly realizes saving the issued state in the global variable open_state. The global variable open_state can be regarded as a preset state, and its default value is 0. When the state to be set is issued in a subsequent request, the value of the state to be set can be assigned to the preset state. In this way, by detecting the value of the preset state, it can be determined whether to report the state of the camera, and reset after the reporting is completed, that is, the value of the preset state is reset to zero. In this way, it can be set that the state of the camera is reported only when the value of the preset state is not zero, and the state that the camera reports once based on the request opening type can be realized. In this way, whether the camera is normally turned on can be detected, and the reporting process is automatically realized after receiving the request, thereby reducing the reporting delay.
[0049] S230: Reporting the state of the camera based on the value of the preset state and the value of the lock state of the register in the camera.
[0050] In this embodiment, a register is provided in the camera, so that it can be determined whether to report the status of the camera according to the value of the preset status and the value of the lock status of the register.
[0051] In this embodiment, the lock state can be obtained by reading the state of the register in the driver module, which is used to determine whether the camera is connected.
[0052] In some embodiments, if the value of the preset state satisfies a preset first condition, and the value of the lock state of the register in the camera satisfies a preset second condition, the state of the camera is reported; if the value of the preset state does not satisfy the preset first condition, and the value of the lock state of the register in the camera does not satisfy the preset second condition, the state of the camera is not reported.
[0053] It can be understood that the first condition and the second condition can be set by yourself. For example, if the first condition is not zero and the second condition indicates that it is not connected, the value of the preset state is not zero and the value of the lock state indicates that it is not connected. The status of the camera is reported. The purpose is that after the request is sent, if the camera is still not connected, that is, the camera fails to start, the status of the camera can be reported at this time to indicate that the camera fails to start.
[0054] Of course, it is understandable that the first condition and the second condition are set differently depending on the purpose of the report. For example, the second condition can be set to zero. If the second condition indicates that it is not connected, the value of the preset state is not zero and the value of the lock state indicates that it is not connected. The state of the camera is reported. The purpose is to report the state of the camera when the request is not sent or the state of the camera has been reported once and the camera is in the off state.
[0055] In some embodiments, the value of the preset state and the value of the lock state are detected; if the value of the preset state is not zero and the value of the lock state indicates that it is not connected, the state of the camera is reported.
[0056] In this embodiment, after the request is issued, the value of the state to be set is assigned to the preset state, and the value of the preset state is not zero. The request indicates that the camera is turned on. The value of the lock state indicates that it is not connected, which means that the camera fails to turn on. In this way, the state of the camera can be reported to prompt a camera startup error.
[0057] In other embodiments, the connection status of the camera at the previous moment is obtained; if the value of the preset status is not zero, the value of the lock status indicates that it is not connected, and the connection status of the camera at the previous moment indicates that it is not connected, the status of the camera is reported.
[0058] In this embodiment, the connection status of the camera at the previous moment indicates that it is not connected, indicating that the camera was not connected before receiving the request, so as to confirm that the camera should be changed from the closed state to the open state after receiving the request. In this way, a detection is added to determine whether the connection status of the camera at the previous moment indicates that it is not connected, so that when the camera is turned on for the first time or responds to the request from the closed state to be turned on, but fails to turn on, the camera status reporting condition is met. In this way, the camera status is reported once only when the request is sent and the camera fails to turn on, indicating that the request failed. The camera status reporting can be realized through one report, and it can be ensured that this report is caused by the failure of the request execution, thereby avoiding the impact of automatic reporting of the camera being in the closed state in other scenarios.
[0059] In some embodiments, after the camera status is reported, the preset status is reset, that is, the value of the preset status is set to zero. At the same time, the condition for reporting the camera status is satisfied only when the value of the preset status is set to non-zero. Therefore, when the request is sent and the camera fails to start, the camera status can be reported once. The camera startup failure can be warned through a single status report, and there is no need to report multiple times subsequently, thereby reducing the use of communication lines.
[0060] In some embodiments, the camera reporting process may refer to the following methods:
[0061]
[0062]
[0063] In the above code, it can be considered that when the value of the preset state is not zero, the value of the lock state indicates that it is not connected, and the connection state of the camera at the previous moment indicates that it is not connected, the state of the camera is reported, and after the reporting is completed, the value of the preset state is set to zero.
[0064] In this embodiment, the lock state is regarded as Lock_state, a value of Lock_state of unlocked indicates unconnected, and a value of Lock_state of cked indicates connected.
[0065] Last_input_event indicates the connection status of the camera at the previous moment. The default value is QCARCAM_INPUT_SIGNAL_LOS, which indicates that the camera is not connected. When the camera is connected, its value will switch to QCARCAM_INPUT_SIGNAL_VALID. Open_state is the default state.
[0066] The max96722 is the driver module.
[0067] It can be understood that when the camera is in the turned-on state in response to the request, there is no need to report the camera status. When the camera is reported, the target state of the camera at the current moment is obtained; wherein the target state indicates that the camera status is not connected; and the target state is reported.
[0068] In some embodiments, the driver module detects the target state of the camera and may send the target state to the application via report_ais_event so that the application can render and display it to the user to prompt the camera to be turned on.
[0069] In some embodiments, through the method for obtaining the status of the camera in the vehicle proposed in this embodiment, the average time consumed for receiving the camera status report is 93.7ms, while the average time consumed for receiving the camera report by waiting for a fault to be fed back only when no data frame is received is 526.5ms, which greatly reduces the time for reporting the status of the camera and can quickly respond to determine the camera fault condition.
[0070] In this embodiment, a method for obtaining the status of a camera in a vehicle is proposed. When a request for calling a camera is issued, the state to be set of the camera is set in the request, so that the value of the state to be set is assigned to the preset state, so as to judge whether the camera responds to the request and turns on normally through the value of the preset state and the value of the lock state. Therefore, after the request is issued, the status of the camera can be automatically reported, and there is no need to wait until no data frame is received before feedback of the fault, thereby reducing the response time and improving the response speed. In addition, the process only adds the preset state, and proposes to use the preset state value and the lock state value as the reporting conditions of the camera state, so that the camera fault can be reported in time, the display performance of the fault interface is well optimized, and the user experience is improved. At the same time, the process does not need to modify the native logic, and the preset state and judgment conditions can be added to the native operation logic, and the implementation cost is low.
[0071] Another aspect of the present application also provides a device for obtaining the state of a camera in a vehicle, such as Figure 4 As shown, Figure 4 400 is a schematic diagram of a structure of a vehicle-mounted camera status acquisition device according to an exemplary embodiment of the present application. The vehicle-mounted camera status acquisition device 400 comprises:
[0072] The request acquisition module 410 is used to receive a request for calling a camera, wherein the request includes a state of the camera to be set.
[0073] The value assignment module 430 is used to assign the value of the state to be set to the preset state.
[0074] The status reporting module 450 is used to report the status of the camera based on the value of the preset status and the value of the lock status of the register in the camera.
[0075] In an optional manner, the status reporting module further includes:
[0076] The first judgment unit is used to report the state of the camera if the value of the preset state meets the preset first condition and the value of the lock state of the register in the camera meets the preset second condition.
[0077] The second judgment unit is used for not reporting the state of the camera if the value of the preset state does not meet the preset first condition and the value of the lock state of the register in the camera does not meet the preset second condition.
[0078] In an optional manner, the status reporting module further includes:
[0079] The detection unit is used to detect the value of the preset state and the value of the lock state.
[0080] The third judgment unit is configured to report the state of the camera if the value of the preset state is not zero and the value of the lock state indicates that the camera is not connected.
[0081] In an optional manner, the status reporting module further includes:
[0082] The first state acquisition unit is used to acquire the connection state of the camera at a previous moment.
[0083] The fourth judgment unit is used to report the state of the camera if the value of the preset state is not zero, the value of the lock state indicates that it is not connected, and the connection state of the camera at the previous moment indicates that it is not connected.
[0084] In an optional manner, the device for acquiring the state of the camera in the vehicle further includes:
[0085] The reset module is used to set the value of the preset state to zero after reporting the state of the camera.
[0086] In an optional manner, the status reporting module further includes:
[0087] The second state acquisition unit is used to acquire the target state of the camera at the current moment; wherein the target state indicates that the state of the camera is not connected.
[0088] The status reporting unit is used to report the target status.
[0089] In an optional manner, the request further includes a camera identifier; and the device for acquiring the camera status in the vehicle further includes:
[0090] The camera activation module is used to determine the camera based on the camera identifier and activate the camera in response to a request.
[0091] When this embodiment sends a request to call the camera, the camera's state to be set is set in the request, so that the value of the state to be set is assigned to the preset state, so as to judge whether the camera responds to the request and opens normally through the value of the preset state and the value of the lock state. Therefore, after the request is sent, the camera's state can be automatically reported, and there is no need to wait until no data frame is received before feedback of the fault, thereby reducing the response time and improving the response speed. In addition, this process only adds the preset state, and proposes to use the preset state value and the lock state value as the reporting conditions of the camera state, so that the camera's fault can be reported in time, the display performance of the fault interface is well optimized, and the user experience is improved. At the same time, this process does not need to modify the native logic, and the preset state and judgment conditions can be added to the native operation logic, and the implementation cost is low.
[0092] It should be noted that the in-vehicle camera status acquisition device provided in the above embodiment and the in-vehicle camera status acquisition method provided in the above embodiment belong to the same concept, and the specific manner in which each module and unit performs the operation has been described in detail in the method embodiment and will not be repeated here.
[0093] Another aspect of the present application also provides an electronic device, including: a controller; a memory for storing one or more programs, when the one or more programs are executed by the controller, to execute the above-mentioned method for obtaining the status of the in-vehicle camera.
[0094] See also Figure 5 , Figure 5 1 is a schematic diagram of the structure of a computer system of an electronic device shown in an exemplary embodiment of the present application, which shows a schematic diagram of the structure of a computer system of an electronic device suitable for implementing an embodiment of the present application.
[0095] It should be noted that Figure 5 The computer system 500 of the electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0096] like Figure 5As shown, the computer system 500 includes a central processing unit (CPU) 501, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 502 or the program loaded from the storage part 508 to the random access memory (RAM) 503, such as executing the method in the above embodiment. In the RAM 503, various programs and data required for system operation are also stored. The CPU 501, ROM 502 and RAM 503 are connected to each other through a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.
[0097] The following components are connected to the I / O interface 505: an input section 506 including a keyboard, a mouse, etc.; an output section 507 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 508 including a hard disk, etc.; and a communication section 509 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 509 performs communication processing via a network such as the Internet. A drive 510 is also connected to the I / O interface 505 as needed. A removable medium 511, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 510 as needed so that a computer program read therefrom is installed into the storage section 508 as needed.
[0098] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a computer program for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication section 509, and / or installed from a removable medium 511. When the computer program is executed by a central processing unit (CPU) 501, various functions defined in the system of the present application are executed.
[0099] It should be noted that the computer-readable medium shown in the embodiment of the present application can be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium can be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media can include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a 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 above. In the present application, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it. In the present application, a computer-readable signal medium can include a data signal propagated in a baseband or as a part of a carrier wave, wherein a computer-readable computer program is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate, or transmit programs for use by or in conjunction with an instruction execution system, apparatus, or device. The computer program contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
[0100] The flowchart and block diagram in the accompanying drawings illustrate the possible architecture, functions and operations of the system, method and computer program product according to various embodiments of the present application. Wherein, each box in the flowchart or block diagram can represent a module, a program segment, or a part of the code, and the above-mentioned module, program segment, or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0101] The units involved in the embodiments described in this application may be implemented by software or hardware, and the units described may also be set in a processor. The names of these units do not constitute limitations on the units themselves in some cases.
[0102] Another aspect of the present application further provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the vehicle light control method as described above is implemented. The computer-readable storage medium may be included in the electronic device described in the above embodiment, or may exist independently without being assembled into the electronic device.
[0103] Another aspect of the present application also provides a computer program product or a computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the vehicle light control method provided in each of the above embodiments.
[0104] According to one aspect of an embodiment of the present application, a computer system is also provided, including a central processing unit (CPU), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) or a program loaded from a storage portion into a random access memory (RAM), such as executing the method in the above embodiment. In RAM, various programs and data required for system operation are also stored. CPU, ROM and RAM are connected to each other via a bus. An input / output (I / O) interface is also connected to the bus.
[0105] The following components are connected to the I / O interface: an input part including a keyboard, a mouse, etc.; an output part including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker; a storage part including a hard disk, etc.; and a communication part including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication part performs communication processing via a network such as the Internet. A drive is also connected to the I / O interface as needed. Removable media, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., are installed on the drive as needed so that the computer program read therefrom is installed into the storage part as needed.
[0106] The above content is only a preferred exemplary embodiment of the present application and is not intended to limit the implementation scheme of the present application. A person skilled in the art can easily make corresponding changes or modifications based on the main concept and spirit of the present application. Therefore, the scope of protection of the present application shall be based on the scope of protection required by the claims.
Claims
1. A method for obtaining the status of a camera in a vehicle. It is characterized in that include: Receiving a request for calling a camera; wherein the request includes a state of the camera to be set; Assigning the value of the state to be set to the preset state; The state of the camera is reported based on the value of the preset state and the value of the lock state of the register in the camera.
2. The method according to claim 1, It is characterized in that The reporting of the state of the camera based on the value of the preset state and the value of the lock state of the register in the camera further includes: If the value of the preset state meets the preset first condition, and the value of the lock state of the register in the camera meets the preset second condition, reporting the state of the camera; If the value of the preset state does not satisfy the preset first condition, and the value of the lock state of the register in the camera does not satisfy the preset second condition, the state of the camera is not reported.
3. The method according to claim 1, It is characterized in that The reporting of the state of the camera based on the value of the preset state and the value of the lock state of the register in the camera further includes: detecting a value of the preset state and a value of the lock state; If the value of the preset state is not zero and the value of the lock state indicates that it is not connected, the state of the camera is reported.
4. The method according to claim 1, It is characterized in that The reporting of the state of the camera based on the value of the preset state and the value of the lock state of the register in the camera further includes: Obtaining the connection status of the camera at the previous moment; If the value of the preset state is not zero, the value of the lock state indicates that it is not connected, and the connection state of the camera at the previous moment indicates that it is not connected, the state of the camera is reported.
5. The method according to any one of claims 1 to 4, It is characterized in that The method further comprises: After the state of the camera is reported, the value of the preset state is set to zero.
6. The method according to any one of claims 1 to 4, It is characterized in that The reporting of the state of the camera further includes: Acquire the target state of the camera at the current moment; wherein the target state indicates that the state of the camera is not connected; The target status is reported.
7. The method according to any one of claims 1 to 4, It is characterized in that The request also includes a camera identifier; before reporting the state of the camera based on the value of the preset state and the value of the lock state of the register in the camera, the method also includes: The camera is determined based on the camera identifier, and the camera is turned on in response to the request.
8. A device for acquiring the status of a camera in a vehicle, It is characterized in that include: A request acquisition module, used to receive a request for calling a camera; wherein the request includes a state of the camera to be set; An assignment module, used for assigning the value of the state to be set to the preset state; The status reporting module is used to report the status of the camera based on the value of the preset status and the value of the lock status of the register in the camera.
9. An electronic device, It is characterized in that include: Controller; The memory is used to store one or more programs. When the one or more programs are executed by the controller, the controller implements the method for obtaining the status of the in-vehicle camera according to any one of claims 1 to 7.
10. A computer-readable storage medium, It is characterized in that Computer-readable instructions are stored thereon, and when the computer-readable instructions are executed by a processor of a computer, the computer is caused to execute the method for acquiring the state of an in-vehicle camera according to any one of claims 1 to 7.
