Vehicle-mounted communication method, vehicle-mounted communication device, vehicle and storage medium

By responding to the target application's opening command in the vehicle, calling the connection function to send a connection request to the target server, and calling the connection function again when the connection fails, the problem of cumbersome connection in the vehicle entertainment system is solved, and the connection efficiency and user experience are improved.

CN119562231APending Publication Date: 2025-03-04GREAT WALL MOTOR CO LTD
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
CN202411693864.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-25
Publication Date
2025-03-04

AI Technical Summary

Technical Problem

The connection between the in-car entertainment system and the audio software playback server is relatively cumbersome, resulting in a long wait time for users and affecting the user experience.

Method used

In response to the opening instruction of the target application in the vehicle, the connection function in the target object is called to send a connection request to the target server and establish a connection with the first interface in the target object to obtain the current connection status. If the connection fails, call the connection function again to send the connection request to establish the connection.

Benefits of technology

In the case of connection failure, there is no need to repeat all interaction processes in the target object, and only the connection function needs to be called again to send the connection request, which can reduce the processing flow with the target server, thereby improving the efficiency of the vehicle connecting to the application server, saving connection time, and thus improving the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119562231A_ABST
    Figure CN119562231A_ABST
Patent Text Reader

Abstract

The invention provides a vehicle-mounted communication method, a vehicle-mounted communication device, a vehicle and a storage medium, and the method comprises the steps: calling a connection function in a target object to send a connection request to a target server in response to a starting instruction of a target application program in the vehicle; wherein the target server side is used for indicating the server side of the target application program; establishing a connection with a first interface in the target object to obtain a current connection state with the target server; and if the current connection state indicates that the connection fails, calling the connection function again to send the connection request to the target server, so that the vehicle establishes connection with the target server. According to the method, the efficiency of connecting the vehicle to the application program server can be improved, so that the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of vehicles, and more specifically, to an in-vehicle communication method, an in-vehicle communication device, a vehicle and a storage medium. Background Art

[0002] With the popularity of cars, more and more users use cars as a means of transportation. When driving, users usually play audio and video through the audio software in the car to improve the entertainment experience during driving and make the journey more enjoyable and relaxing.

[0003] In the related art, since the connection between the in-vehicle entertainment system and the audio software playback server is relatively cumbersome, it not only requires multiple connections, but also requires all the connection steps to be repeated in the event of a connection failure, resulting in a long waiting time for users and affecting the user experience. Therefore, how to improve the efficiency of connecting the vehicle to the application server to improve the user experience has become an urgent problem to be solved. Summary of the invention

[0004] The present application provides an in-vehicle communication method, an in-vehicle communication device, a vehicle and a storage medium. The method can improve the efficiency of connecting to a player server in a vehicle to improve the user experience.

[0005] In a first aspect, a vehicle-mounted communication method is provided, the method comprising:

[0006] In response to a start instruction of a target application in the vehicle, a connection function in the target object is called to send a connection request to a target server; wherein the target server is used to indicate a server of the target application;

[0007] Establishing a connection with a first interface in the target object to obtain a current connection status with the target server;

[0008] If the current connection status indicates that the connection fails, the connection function is called again to send the connection request to the target server, so that the vehicle establishes a connection with the target server.

[0009] The above technical solution responds to the start instruction of the target application in the vehicle, calls the connection function in the target object to send a connection request to the target server, and establishes a connection with the first interface in the target object to obtain the current connection status with the target server. If the current connection status indicates a connection failure, the connection function is called again to send a connection request to the target server to establish a connection between the vehicle and the target server. Compared with the prior art, in the event of a connection failure, the present application does not need to repeatedly execute all the interaction processes in the target object, but only needs to call the connection function again to send a connection request, which can reduce the processing flow with the target server, thereby improving the efficiency of the vehicle connecting to the application server, saving connection time, and thus improving the user experience.

[0010] In combination with the first aspect, in some possible implementations, the method further includes: determining a number of failures of the connection failure;

[0011] The calling the connection function again to send the connection request to the target server includes:

[0012] If the number of failures is less than or equal to the preset number of times, the connection function is called again to send the connection request to the target server.

[0013] According to the above technical solution, when the vehicle fails to connect to the target server, the number of connection failures is determined, and when the number of failures is less than or equal to the preset number, the connection function is called again to send a connection request to the target server. There is no need to repeatedly execute all the interaction processes in the target object, which can reduce the interaction process. In addition, in limited cases of connection failures, the connection function is directly called to send a connection request to the target server, which can improve the connection efficiency between the vehicle and the target server.

[0014] In combination with the first aspect and the above-mentioned implementation methods, in some possible implementation methods, the method also includes: if the number of failures is greater than the preset number of times, outputting a prompt message; wherein the prompt message is used to prompt that the vehicle has failed to connect to the target server and exit the target application.

[0015] The above technical solution outputs a prompt message when the current connection status between the vehicle and the target server indicates a connection failure, and the number of connection failures is greater than a preset number. Since the prompt message indicates that the vehicle has failed to connect to the target server, the target application is exited. The prompt message can avoid delaying the user's entertainment time as much as possible, thereby improving the user's experience.

[0016] In combination with the first aspect and the above implementations, in some possible implementations, the method further includes: if the current connection state indicates a successful connection, establishing a connection with a second interface in the target object;

[0017] Data is transmitted to the target server via the second interface.

[0018] In the above technical solution, when the current connection status between the vehicle and the target server indicates a successful connection, a connection is established with the second interface in the target object, data can be transmitted with the target server through the second interface, and the user's entertainment needs can be realized in real time through the target server.

[0019] In combination with the first aspect and the above implementation manner, in some possible implementation manners, the performing data transmission with the target server through the second interface includes:

[0020] If a target operation of the user in the target application is detected, a target instruction is generated based on the target operation;

[0021] The target instruction is sent to the target server through the second interface to synchronize the playback status in the target application.

[0022] In the above technical solution, if the current connection status indicates a successful connection, a connection is established with the second interface in the target object, and the target application is monitored in real time; if a target operation of the user in the target application is detected, a target instruction is generated based on the target operation, and the target instruction is sent to the target server through the second interface to synchronize the playback status in the target application; by monitoring the target application, and then based on the user's target operation, a target instruction can be generated and sent to the target server to synchronize the playback status in the target application, so that the user can determine the current playback status through the target application.

[0023] In combination with the first aspect and the above-mentioned implementation methods, in some possible implementation methods, the method also includes: if an update instruction sent by the target server is received, updating the playback status in the display interface of the target application based on the update instruction; wherein the update instruction is generated by the target server based on the target instruction.

[0024] The above technical solution sends a target instruction to the target server through the second interface. If an update instruction sent by the target server is received, the playback status in the display interface of the target application is updated based on the update instruction. Since the update instruction is generated by the target server based on the target instruction, the playback status in the display interface of the target application is updated through the update instruction. This can synchronize the user operation with the corresponding execution operation of the target server, and then synchronize the playback status in the display interface of the target application, so that the user can clearly understand the current playback status of the target application, thereby improving the user's experience.

[0025] In combination with the first aspect and the above implementation, in some possible implementations, obtaining the current connection state with the target server includes:

[0026] Obtaining an objective function; wherein the objective function is used to indicate the connection status between the vehicle and the target server;

[0027] If the target function is the first preset function, determining that the vehicle is successfully connected to the target server;

[0028] If the target function is the second preset function, it is determined that the vehicle fails to connect to the target server.

[0029] The above technical solution obtains the target function through the first interface. Since the target function indicates the connection status between the vehicle and the target server, the connection status between the vehicle and the target server can be quickly determined by confirming the target function with the preset function, thereby saving the time for determining the connection status between the vehicle and the target server.

[0030] In a second aspect, a vehicle-mounted communication device is provided, the prompting device comprising:

[0031] A detection module, configured to respond to a start instruction of a target application in the vehicle, call a connection function in a target object to send a connection request to a target server; wherein the target server is used to indicate a server of the target application;

[0032] An acquisition module, used to establish a connection with the first interface in the target object to obtain a current connection status with the target server;

[0033] The connection module is used to call the connection function again to send the connection request to the target server if the current connection status indicates that the connection fails, so that the vehicle can establish a connection with the target server.

[0034] In a third aspect, a vehicle is provided, comprising a memory and a processor, wherein the memory is used to store executable program code; the processor is used to call and run the executable program code from the memory, so that the vehicle executes the in-vehicle communication method in the above-mentioned first aspect or any possible implementation of the first aspect.

[0035] In a fourth aspect, a computer-readable storage medium is provided, which stores a computer program code. When the computer program code runs on a computer, the computer executes the vehicle-mounted communication method in the above-mentioned first aspect or any possible implementation of the first aspect.

[0036] In a fifth aspect, a computer program product is provided, which includes: a computer program code, which, when executed on a computer, enables the computer to execute the vehicle-mounted communication method in the above-mentioned first aspect or any possible implementation of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 It is a scenario schematic diagram of a vehicle-mounted communication method provided in an embodiment of the present application;

[0038] Figure 2 It is a schematic diagram of a framework of a vehicle-mounted communication method provided in an embodiment of the present application;

[0039] Figure 3 is a schematic flow chart of a vehicle-mounted communication method provided in an embodiment of the present application;

[0040] Figure 4 is a schematic flow chart of another vehicle-mounted communication method provided in an embodiment of the present application;

[0041] Figure 5 is a structural schematic diagram of a vehicle-mounted communication device provided in an embodiment of the present application;

[0042] Figure 6 It is a structural schematic diagram of a vehicle provided in an embodiment of the present application. DETAILED DESCRIPTION

[0043] The technical solution in the present application will be described clearly and in detail below in conjunction with the accompanying drawings. In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B: "and / or" in the text is only a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, "multiple" means two or more than two.

[0044] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as suggesting or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features.

[0045] It is understandable that media session provides a universal way for audio or video to interact, and is a bridge between the human-computer interaction interface and the playback control service. For example, after the vehicle establishes a connection with the server, the vehicle's central control screen controls the audio and video playback, and the rear screen can also control the audio and video playback. In addition, the audio and video playback can also be controlled by voice.

[0046] However, the use of media sessions in the prior art must be accessed according to inherent logic, and the access logic and details are too complicated, resulting in an increased workload. Specifically, since the connection between the in-vehicle entertainment system and the audio software playback server is relatively cumbersome, not only does it require multiple connections, but in the event of a connection failure, all connection steps need to be repeated, resulting in a long waiting time for the user, affecting the user experience. In view of this, the present application provides a vehicle-mounted communication method, a vehicle-mounted communication device, a vehicle, and a storage medium, which can improve the efficiency of connecting to a player server in a vehicle to improve the user experience.

[0047] Figure 1 It is a scenario diagram of a vehicle-mounted communication method provided in an embodiment of the present application.

[0048] For example, Figure 1 As shown, in response to the start instruction of the target application in the vehicle 100 , the vehicle 100 establishes a connection with the target server 110 of the target application so that data can be exchanged between the vehicle 100 and the target server 110 .

[0049] Specifically, in response to a start instruction of a target application in the vehicle, a connection function in the target object is called to send a connection request to the target application, and a connection is established with the first interface in the target object to obtain a target function indicating the connection status between the vehicle and the target server. If the target function is a first preset function, it is determined that the current connection status between the vehicle and the target server indicates a successful connection. If the target function is a second preset function, it is determined that the current connection status between the vehicle and the target server indicates a failed connection.

[0050] Furthermore, when the current connection status between the vehicle and the target server indicates a connection failure, the connection function is called again to send a connection request to the target server so that the vehicle and the target server are connected; when the current connection status between the vehicle and the target server indicates a successful connection, a connection is established with the second interface in the target object, and data is transmitted with the target server through the second interface.

[0051] Exemplarily, the first preset function indicates a function for successfully connecting the vehicle to the target server, and the first preset function may be onConnected(). The second preset function indicates a function for failing to connect the vehicle to the target server, and the second preset function may be onConnectionFailed(). Specifically, the target function is a function triggered by the connection status between the vehicle and the target server, that is, when the connection between the vehicle and the target server is successful, the onConnected() function is triggered, and when the connection between the vehicle and the target server fails, the onConnectionFailed() function is triggered. By determining the target function, the current connection status between the vehicle and the target server can be determined.

[0052] Exemplarily, when the current connection status between the vehicle and the target server indicates a successful connection, if the user's target operation in the target application is detected, a target instruction is generated based on the target operation, and the target instruction is sent to the target server through the second interface. The target server performs the corresponding operation according to the target instruction, and generates an update instruction, which is sent to the vehicle (the playback status of the target application has changed according to the target instruction) to synchronize the playback status in the target application.

[0053] Optionally, the target instruction may include but is not limited to: pause, previous song, next song, loop mode, etc.

[0054] Optionally, the playing state may include but is not limited to: an idle state, a ready state, a playing state, a pause state, an end state, and the like.

[0055] For example, the user opens audio application A, determines that the start instruction of audio application A is detected, and the vehicle establishes a connection with the server of audio application A. When the vehicle is successfully connected to the server of audio application A, the user clicks the play button corresponding to song B, generates a play instruction for song B, and sends the play instruction for song B to the server of audio application A. The server of audio application A switches the song to be played according to the play instruction for song B, and generates an update instruction (updates the display content of the playback interface) and sends it to the vehicle. Upon receiving the update instruction, the vehicle media system updates the display interface of audio application A.

[0056] Figure 2 It is a schematic diagram of a framework of a vehicle-mounted communication method provided in an embodiment of the present application;

[0057] For example, Figure 2 As shown, a media session is configured in the vehicle, through which a connection can be established with a target server to achieve data interaction between the vehicle and the target server.

[0058] Exemplarily, create a MediaControllerManager object (target object), which is a singleton management class, and use the connectService method (method for connecting to the client) to bind to the target server of the target application. At the same time, pass in two interfaces (create interface 1 and interface 2). The two interfaces are interface 1 and interface 2. Interface 1 is used to monitor the connection status between the vehicle and the target server, and interface 2 is used to execute various events of media activities, such as media playlist data, player error information, current play progress, session communication data, player play status changes, changes in play media, changes in play media queue, changes in loop mode, etc.

[0059] Specifically, when executing the connectService method (the method for connecting to the client), a connection is established with the target server through the connection function, and a connection is established with interface 1. The connection status between the vehicle and the target server is determined through interface 1. When the connection status between the vehicle and the target server indicates a connection failure, a media browser (MediaBrowserCompat) is created, and the connection action is performed by calling the connection function in the media browser again (MediaBrowserCompat's connect(), the internal logic of mediaBrowserCompat's connect() is to bind the connection established by the target server through intent), and a connection is established with interface 1. If the connection between the vehicle and the target server fails, the connection function in the media browser (MediaBrowserCompat's connect()) is called again to perform the connection action.

[0060] When the vehicle is successfully connected to the target server, a MediaControllerCompat object (media controller) is created, and a connection is established with interface 2 in the MediaControllerCompat object (media controller), and instructions are transmitted to the target server through interface 2.

[0061] Exemplarily, after establishing a connection with interface 1, the connection status can be obtained through interface 1. Specifically, the target function is obtained through interface 1. The target function is triggered and executed based on the connection status between the vehicle and the target server. The connection status between the vehicle and the target server can be determined by determining the target function.

[0062] It is understandable that the target function may include any one of onConnected(), onConnectionSuspended() and onConnectionFailed(). When the vehicle is successfully connected to the target server, onConnected() is triggered; when the connection between the vehicle and the target server is blocked, onConnectionSuspended() is triggered; when the connection between the vehicle and the target server fails, onConnectionFailed() is triggered.

[0063] Exemplarily, when the vehicle is successfully connected to the target server, if the user's target operation in the target application is detected, the target instruction corresponding to the target operation is sent to the target server through the second interface. After receiving the instruction, the target server operates based on the business logic to control the function of the target application.

[0064] The above technical solution responds to the start instruction of the target application in the vehicle, calls the connection function in the target object to send a connection request to the target server, and establishes a connection with the first interface in the target object to obtain the current connection status with the target server. If the current connection status indicates a connection failure, the connection function is called again to send a connection request to the target server to establish a connection between the vehicle and the target server. Compared with the prior art, in the event of a connection failure, the present application does not need to repeatedly execute all the interaction processes in the target object, but only needs to call the connection function again to send a connection request, which can reduce the processing flow with the target server, thereby improving the efficiency of the vehicle connecting to the application server, saving connection time, and thus improving the user experience.

[0065] It is understandable that in the prior art, when a connection fails, it is necessary to recreate the connection object so as to establish a connection with the target server through the connection object; however, since the current execution process (i.e., the target object) is jumped out during the process of recreating the connection object and establishing a connection with the target server, and the life cycle of the target object is limited, the interface created in the target object may be released after jumping out of the current execution process. Furthermore, after the vehicle sends a connection request to the target server again, in order to obtain the connection status between the vehicle and the target server, it is necessary to recreate the target object, establish the interface, and other interactive processes, so as to monitor the connection status between the vehicle and the target server through the interface.

[0066] The present application sends a connection request to the target server by calling the connection function in the target object without jumping out of the target object, so the interface will not be released. In the event of a connection failure, the present application only needs to call the connection function again to send a connection request, which can improve the efficiency of the vehicle connecting to the application server.

[0067] Figure 3 It is a schematic flow chart of a vehicle-mounted communication method provided in an embodiment of the present application.

[0068] For example, Figure 3 The method shown may be executed by a vehicle's media system, a vehicle controller, or a chip.

[0069] For example, Figure 3 As shown, the method 300 includes the following processes:

[0070] S310, in response to a start instruction of a target application in the vehicle, calling a connection function in a target object to send a connection request to a target server.

[0071] Exemplarily, the target server indicates the server of the target application; for example, if the target application is audio application A, the target server indicates the server of audio application A; if the target application is video application B, the target server indicates the server of audio application B.

[0072] Exemplarily, in response to a start instruction of a target application in a vehicle, (MediaSession) calls a connection function (connect) in a connection service method (connectService method) of a target object (MediaControllerManager) to send a connection request to the target server.

[0073] It is understandable that sending a connection request to the target server is to establish a connection with the target server, that is, a connection is being established with the target server. Therefore, after sending the connection request, the vehicle and the target server may have been successfully connected, but the vehicle and the target server may also fail to connect.

[0074] S320, establishing a connection with the first interface in the target object to obtain a current connection status with the target server.

[0075] Exemplarily, the current connection status may indicate a successful connection, or the current connection status may indicate a failed connection; of course, the current connection status may also indicate a blocked connection; the current connection status may be determined based on actual conditions and is not specifically limited herein.

[0076] Exemplarily, a first interface is created in the target object (MediaControllerManager), and the first interface is used to monitor the current connection status between the vehicle and the target server of the target application.

[0077] Exemplarily, since a first interface is created in the target object (MediaControllerManager), and the first interface is used to monitor the current connection status between the vehicle and the target server of the target application, when a connection is established with the first interface in the target object, the current connection status between the vehicle and the target server is obtained.

[0078] Exemplarily, the current connection status with the target server is obtained through the first interface. Specifically, through the first interface, the target function triggered by the vehicle and the target server is obtained, and the target function indicates the connection status between the vehicle and the target server. When the target function is the first preset function, it is determined that the connection between the vehicle and the target server is successful; when the target function is the second preset function, it is determined that the connection between the vehicle and the target server fails. In addition, when the target function is the third preset function, it is determined that the connection between the vehicle and the target server is blocked.

[0079] Exemplarily, the first preset function indicates a function in which the vehicle is successfully connected to the target server, and the first preset function may be onConnected().

[0080] Exemplarily, the second preset function indicates a function in which the vehicle fails to connect to the target server, and the second preset function may be onConnectionFailed(). It is understandable that when the vehicle fails to connect to the target server, it may be due to a vehicle system failure, a connection logic error, a target server failure, a network connection error, a target server configuration error, etc. Therefore, when the vehicle fails to connect to the target server, the connection function may be called again to send a connection request to the target server to connect the vehicle to the target server.

[0081] Exemplarily, the third preset function indicates a function in which the connection between the vehicle and the target server is blocked, and the third preset function may be onConnectionSuspended(). It is understandable that when the connection between the vehicle and the target server is blocked, it may be due to a failure of the target server, an error in the network connection, an error in the configuration of the target server, etc. Therefore, when the connection between the vehicle and the target server is blocked, the connection function may be called again to send a connection request to the target server, so as to use the vehicle to connect to the target server.

[0082] The above technical solution obtains the target function through the first interface. Since the target function indicates the connection status between the vehicle and the target server, the connection status between the vehicle and the target server can be quickly determined by confirming the target function with the preset function, thereby saving the time for determining the connection status between the vehicle and the target server.

[0083] S330: If the current connection status indicates that the connection has failed, the connection function is called again to send a connection request to the target server, so that the vehicle can establish a connection with the target server.

[0084] It is understandable that the current connection status between the vehicle and the target server is updated according to the actual situation. For example, at the first moment, the vehicle fails to connect to the target server, and a connection request is sent to the target server by calling the connection function. At the second moment, the vehicle successfully connects to the target server; or, at the first moment, the vehicle fails to connect to the target server, and from the first moment to the third moment, connection requests are sent to the target server multiple times, and the current connection status between the vehicle and the target server indicates a connection failure. Therefore, the connection status between the vehicle and the target server needs to be acquired and determined in real time.

[0085] In one example, when the current connection status between the vehicle and the target server indicates a connection failure, a connection request is sent to the target server by calling the connection function again, that is, by calling the connection function (connect()) in MediaBrowserCompat (media browser) to send a connection request to the target server to use the vehicle to connect to the target server.

[0086] In another example, when the current connection status between the vehicle and the target server indicates a connection failure, the number of connection failures is determined, and whether the number of failures is less than or equal to a preset number. When the number of failures is less than or equal to the preset number, the connection function is called again to send a connection request to the target server.

[0087] Optionally, the preset number of times is but not limited to: 9, 10, 11, etc., and is not specifically limited here.

[0088] Exemplarily, the number of failures is used to indicate the number of times the vehicle fails to connect to the target application. For example, the current connection status between the vehicle and the target application is obtained through the first interface, and when the current connection status between the vehicle and the target application indicates a connection failure, the number of failures is accumulated once.

[0089] For example, the preset number of times is 10. When the current connection status between the vehicle and the target server indicates a connection failure, and the number of connection failures is determined to be 8, the connection function (connect()) in MediaBrowserCompat (media browser) is called again to send a connection request to the target server, so that the vehicle is connected to the target server.

[0090] According to the above technical solution, when the vehicle fails to connect to the target server, the number of connection failures is determined, and when the number of failures is less than or equal to the preset number, the connection function is called again to send a connection request to the target server. There is no need to repeatedly execute all the interaction processes in the target object, which can reduce the interaction process. In addition, in limited cases of connection failures, the connection function is directly called to send a connection request to the target server, which can improve the connection efficiency between the vehicle and the target server.

[0091] Exemplarily, when the current connection status between the vehicle and the target server indicates a connection failure, the number of connection failures is determined, and whether the number of failures is less than or equal to a preset number. When the number of failures is greater than the preset number, a prompt message is output. The prompt message is used to prompt that the connection between the vehicle and the target server has failed and to exit the target application.

[0092] For example, the preset number of times is 10. When the current connection status between the vehicle and the target server indicates a connection failure, and the number of connection failures is determined to be 11, a prompt message is output. The prompt message is to remind the user that the connection between the vehicle and the target server 10 has failed and the target application needs to be exited.

[0093] Exemplarily, the prompt information can be output by voice; for example, the voice content is: "Hello, because the vehicle has failed to connect to the target server 10 times, the target application has been exited, please try again later". The prompt information can also be displayed on the display screen in the vehicle; for example, the display content can include animation information, and the animation information indicates that the vehicle has failed to connect to the target server and exited the target application. Of course, the prompt information can also be a combination of voice output and animation display. The output method of the prompt information can be determined according to the actual situation and is not specifically limited here.

[0094] The above technical solution outputs a prompt message when the current connection status between the vehicle and the target server indicates a connection failure, and the number of connection failures is greater than a preset number. Since the prompt message indicates that the vehicle has failed to connect to the target server, the target application is exited. The prompt message can avoid delaying the user's entertainment time as much as possible, thereby improving the user's experience.

[0095] It is understandable that when the current connection status between the vehicle and the target server indicates a successful connection, the vehicle and the target server can exchange data.

[0096] Exemplarily, a second interface is created in the target object (MediaControllerManager), and the second interface is used to transmit instructions and data between the vehicle and the target server of the target application.

[0097] Exemplarily, since a second interface is created in the target object (MediaControllerManager), when the current connection status between the vehicle and the target server indicates a successful connection, a connection is established with the second interface in the target object, and data can be transmitted with the target server through the second interface, thereby realizing the user's entertainment needs in real time through the target server.

[0098] Specifically, when the current connection status between the vehicle and the target server of the target application indicates a successful connection, a connection is established with the second interface in the target object (MediaControllerManager), and the target application is monitored in real time. When the user's target operation in the target application is monitored, a target instruction is generated based on the target operation, and the target instruction is sent to the target server through the second interface to synchronize the playback status in the target application.

[0099] In the above technical solution, if the current connection status indicates a successful connection, a connection is established with the second interface in the target object, and the target application is monitored in real time; if a target operation of the user in the target application is detected, a target instruction is generated based on the target operation, and the target instruction is sent to the target server through the second interface to synchronize the playback status in the target application; by monitoring the target application, and then based on the user's target operation, a target instruction can be generated and sent to the target server to synchronize the playback status in the target application, so that the user can determine the current playback status through the target application.

[0100] Exemplarily, a target instruction is sent to a target server through a second interface. When the target server receives the target instruction, it performs a corresponding operation according to the target instruction and generates an update instruction. The update instruction is sent to the vehicle through the second interface. When the vehicle receives the update instruction sent by the target server, the playback status in the display interface of the target application is updated based on the update instruction.

[0101] For example, when the user clicks "Next Song", a target instruction is generated as "Switch to the next song according to the current playback mode", and the target instruction is sent to the target server. The target server performs the corresponding operation of switching to the next song according to the target instruction. After the switch is successful, an update instruction is generated as "Switch Successful". After receiving the "Switch Successful" instruction, the display interface of the target application is switched to the display content matching the next song.

[0102] The above technical solution sends a target instruction to the target server through the second interface. If an update instruction sent by the target server is received, the playback status in the display interface of the target application is updated based on the update instruction. Since the update instruction is generated by the target server based on the target instruction, the playback status in the display interface of the target application is updated through the update instruction. This can synchronize the user operation with the corresponding execution operation of the target server, and then synchronize the playback status in the display interface of the target application, so that the user can clearly understand the current playback status of the target application, thereby improving the user's experience.

[0103] Exemplarily, when the current connection status between the vehicle and the target server of the target application indicates a successful connection, data transmission between the vehicle and the target server of the target application is processed through interface 2 accessed in MediaControllerCompat (media controller). Data transmission may include various situations, such as playback errors, position changes, session events, playback state changes, metadata changes, queue changes, additional information changes, and repeat mode changes.

[0104] The above technical solution responds to the start instruction of the target application in the vehicle, calls the connection function in the target object to send a connection request to the target server, and establishes a connection with the first interface in the target object to obtain the current connection status with the target server. If the current connection status indicates a connection failure, the connection function is called again to send a connection request to the target server to establish a connection between the vehicle and the target server. Compared with the prior art, in the event of a connection failure, the present application does not need to repeatedly execute all the interaction processes in the target object, but only needs to call the connection function again to send a connection request, which can reduce the processing flow with the target server, thereby improving the efficiency of the vehicle connecting to the application server, saving connection time, and thus improving the user experience.

[0105] Figure 4 It is a schematic flow chart of another vehicle-mounted communication method provided in an embodiment of the present application.

[0106] For example, Figure 4 The method shown may be executed by a vehicle's media system, a vehicle controller, or a chip.

[0107] For example, Figure 4 As shown, the method 400 includes the following processes:

[0108] S401, in response to a start instruction of a target application in a vehicle, calling a connection function in a target object to send a connection request to a target server.

[0109] Exemplarily, the target server indicates a server of a target application.

[0110] Exemplarily, in response to the start instruction of the target application in the vehicle, the connection function in the connection server method of the target object is called to send a connection request to the target server. It can be understood that sending a connection request to the target server is to connect to the target server, and the connection between the vehicle and the target server may be successful or may fail.

[0111] S402: Establish a connection with a first interface in a target object to obtain a target function.

[0112] Exemplarily, a first interface is created in the target object, and the first interface is used to monitor the current connection status between the vehicle and the target server of the target application.

[0113] Exemplarily, since a first interface is created in the target object, when a connection is established with the first interface in the target object, the current connection status between the vehicle and the target server can be obtained.

[0114] Specifically, a connection is established with the first interface in the target object, and through the first interface, a target function triggered by the vehicle and the target server is obtained, the target function indicates the connection status between the vehicle and the target server, and then through the target function, the current connection status between the vehicle and the target server can be determined.

[0115] S403, whether the target function is the first preset function; if so, execute S404; if not, execute S409.

[0116] Exemplarily, the first preset function indicates a function for successfully connecting the vehicle to the target server.

[0117] Exemplarily, the second preset function indicates a function in which the vehicle fails to connect to the target server.

[0118] Exemplarily, through the first interface, a target function triggered by the vehicle and the target server is obtained, the target function indicates the connection status between the vehicle and the target server, and then by confirming whether the target function is the first preset function, it is determined whether the connection between the vehicle and the target server is successful.

[0119] S404, confirm that the connection is successful.

[0120] Exemplarily, since the first preset function indicates a function for successful connection between the vehicle and the target server, when the target function is the first preset function, the vehicle is successfully connected to the target server.

[0121] S405: Establish a connection with the second interface in the target object.

[0122] Exemplarily, when the current connection status between the vehicle and the target server indicates that the connection is successful, the vehicle and the target server perform data interaction. In order to perform data interaction, it is necessary to establish a connection with the second interface in the target object.

[0123] Exemplarily, a second interface is created in the target object, and the second interface is used to transmit instructions and data between the vehicle and the target server of the target application. When the current connection status between the vehicle and the target server indicates a successful connection, a connection is established with the second interface in the target object, and data can be transmitted with the target server through the second interface, thereby realizing the user's entertainment needs in real time through the target server.

[0124] S406: If a target operation of the user in the target application is detected, a target instruction is generated based on the target operation.

[0125] Exemplarily, after establishing a connection with the second interface, the target application is monitored, and if a target operation of a user in the target application is detected, a target instruction is generated based on the target operation. It is understandable that the target instruction is used to indicate the specific content of the target operation.

[0126] S407, sending a target instruction to the target server through the second interface.

[0127] Exemplarily, when a target operation of a user in a target application is detected, a target instruction is generated based on the target operation, and the target instruction is sent to a target server through a second interface so that the target server can determine the specific operation of the user.

[0128] S408: If an update instruction is received, update the play status in the display interface of the target application.

[0129] Exemplarily, when the target server receives the target instruction, it performs corresponding operations according to the target instruction and generates an update instruction, and sends the update instruction to the vehicle through the second interface. When the vehicle receives the update instruction sent by the target server, it updates the playback status in the display interface of the target application based on the update instruction.

[0130] S409, determining that the connection fails.

[0131] Exemplarily, when the objective function is not the first preset function, the objective function may be the second preset function, or the third preset function, where the second preset function indicates a function in which the connection between the vehicle and the target server fails, and the third preset function indicates a function in which the connection between the vehicle and the target server is blocked. If the objective function is not the first preset function, the connection between the vehicle and the target server fails.

[0132] S410, determining the number of connection failures.

[0133] Exemplarily, the number of failures is used to indicate the number of times the vehicle fails to connect to the target application. For example, the current connection status between the vehicle and the target application is obtained through the first interface, and when the current connection status between the vehicle and the target application indicates a connection failure, the number of failures is accumulated once.

[0134] S411, whether the number of failures is greater than a preset number; if so, execute S412; if not, execute S413.

[0135] Optionally, the preset number may be 9, 10, or 11. The preset number is determined based on actual conditions and is not specifically limited here.

[0136] Exemplarily, when the current connection status between the vehicle and the target server indicates a connection failure, the number of connection failures is determined, and based on the number of failures, the subsequent execution steps are determined.

[0137] S412, output prompt information.

[0138] Exemplarily, when the current connection status between the vehicle and the target server indicates a connection failure, the number of connection failures is determined, and whether the number of failures is less than or equal to a preset number. When the number of failures is greater than the preset number, a prompt message is output. The prompt message is used to prompt that the connection between the vehicle and the target server has failed and to exit the target application.

[0139] Exemplarily, the prompt information can be output via voice, or displayed on a display screen in the vehicle; of course, the prompt information can also be a combination of voice output and animation display, which is not specifically limited here.

[0140] S413, calling the connection function again to send a connection request to the target server.

[0141] Exemplarily, when the current connection status between the vehicle and the target server indicates a connection failure, the number of connection failures is determined, and when the number of failures is less than or equal to a preset number, the connection function is called again to send a connection request to the target server; thereby, there is no need to repeatedly execute all interaction processes in the target object, which can reduce the interaction process, and in limited cases of connection failures, directly calling the connection function to send a connection request to the target server can improve the connection efficiency between the vehicle and the target server.

[0142] The above technical solution responds to the start instruction of the target application in the vehicle, calls the connection function in the target object to send a connection request to the target server, and establishes a connection with the first interface in the target object to obtain the current connection status with the target server. If the current connection status indicates a connection failure, the connection function is called again to send a connection request to the target server to establish a connection between the vehicle and the target server. Compared with the prior art, in the event of a connection failure, the present application does not need to repeatedly execute all the interaction processes in the target object, but only needs to call the connection function again to send a connection request, which can reduce the processing flow with the target server, thereby improving the efficiency of the vehicle connecting to the application server, saving connection time, and thus improving the user experience.

[0143] It should be understood that the above examples are intended to help those skilled in the art understand the embodiments of the present application, rather than to limit the embodiments of the present application to the specific numerical values ​​or specific scenarios illustrated. Those skilled in the art can obviously make various equivalent modifications or changes based on the above examples, and such modifications or changes also fall within the scope of the embodiments of the present application.

[0144] Combination of the above Figures 1 to 4 The vehicle communication method provided by the embodiment of the present application is described in detail; Figure 5 and Figure 6 The device embodiments of the present application are described in detail. It should be understood that the device in the embodiments of the present application can execute the various methods of the aforementioned embodiments of the present application, that is, the specific working processes of the following various products can refer to the corresponding processes in the aforementioned method embodiments.

[0145] Figure 5 It is a structural schematic diagram of a vehicle-mounted communication device provided in an embodiment of the present application.

[0146] For example, Figure 5 As shown, the vehicle-mounted communication device 500 includes:

[0147] The detection module 510 is used to respond to the start instruction of the target application in the vehicle, call the connection function in the target object to send a connection request to the target server; wherein the target server is used to indicate the server of the target application;

[0148] The acquisition module 520 is used to establish a connection with the first interface in the target object to obtain the current connection status with the target server;

[0149] The connection module 530 is used to call the connection function again to send a connection request to the target server if the current connection status indicates that the connection fails, so that the vehicle can establish a connection with the target server.

[0150] Optionally, as an embodiment, the connection module 530 is specifically used for:

[0151] Determine the number of failed attempts to connect;

[0152] If the number of failures is less than or equal to the preset number, the connection function is called again to send a connection request to the target server.

[0153] Optionally, as an embodiment, the connection module 530 is specifically used for:

[0154] If the number of failures is greater than the preset number, a prompt message is output; wherein the prompt message is used to indicate that the vehicle has failed to connect to the target server and to exit the target application.

[0155] Optionally, as an embodiment, the connection module 530 is specifically used for:

[0156] If the current connection status indicates a successful connection, establishing a connection with the second interface in the target object;

[0157] Data is transmitted to the target server via the second interface.

[0158] Optionally, as an embodiment, the connection module 530 is specifically used for:

[0159] If a target operation of the user in the target application is detected, a target instruction is generated based on the target operation;

[0160] A target instruction is sent to the target server through the second interface to synchronize the playback status in the target application.

[0161] Optionally, as an embodiment, the connection module 530 is specifically used for:

[0162] If an update instruction sent by the target server is received, the play status in the display interface of the target application is updated based on the update instruction;

[0163] The update instruction is generated by the target server based on the target instruction.

[0164] Optionally, as an embodiment, the acquisition module 520 is specifically used for:

[0165] Obtaining a target function; wherein the target function is used to indicate the connection status between the vehicle and the target server;

[0166] If the target function is the first preset function, determining that the vehicle is successfully connected to the target server;

[0167] If the target function is the second preset function, it is determined that the vehicle fails to connect to the target server.

[0168] It should be noted that the above-mentioned vehicle communication device 500 is embodied in the form of a functional unit. The term "module" here can be implemented in the form of software and / or hardware, and is not specifically limited to this.

[0169] For example, a "module" may be a software program, a hardware circuit, or a combination of the two that implements the above functions. The hardware circuit may include an application specific integrated circuit (ASIC), an electronic circuit, a processor (such as a shared processor, a dedicated processor, or a group processor, etc.) and a memory for executing one or more software or firmware programs, a combined logic circuit, and / or other suitable components that support the described functions.

[0170] Therefore, the units of each example described in the embodiments of the present application can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present application.

[0171] Figure 6 It is a structural schematic diagram of a vehicle provided in an embodiment of the present application.

[0172] For example, the vehicle 600 and Figure 1 The vehicle 100 in FIG. 1 represents the same vehicle.

[0173] For example, Figure 6 As shown, the vehicle 600 includes: a memory 610 and a processor 620, wherein the memory 610 stores an executable program code 630, and the processor 620 is used to call and execute the executable program code 630 to perform a vehicle communication method.

[0174] Exemplarily, the memory 610 can be used to store relevant programs of the in-vehicle communication method provided in the embodiments of the present application; the processor 620 can call the relevant programs of the in-vehicle communication method stored in the memory 610 to execute the in-vehicle communication method of the embodiments of the present application; for example, in response to the start instruction of the target application in the vehicle, call the connection function in the target object to send a connection request to the target server; wherein the target server indicates the server of the target application; establish a connection with the first interface in the target object to obtain the current connection status with the target server; if the current connection status indicates a connection failure, call the connection function again to send a connection request to the target server to establish a connection between the vehicle and the target server.

[0175] In this embodiment, the functional modules of the device can be divided according to the above method example. For example, each functional module can be corresponded, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware. It should be noted that the division of modules in this embodiment is schematic and is only a logical function division. There may be other division methods in actual implementation.

[0176] In the case of dividing each functional module according to each function, the device may also include a detection module, an acquisition module, a connection module, etc. It should be noted that all relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module, which will not be repeated here.

[0177] It should be understood that the device provided in this embodiment is used to execute the above-mentioned vehicle-mounted communication method, and thus can achieve the same effect as the above-mentioned implementation method.

[0178] In the case of an integrated unit, the device may include a processing module and a storage module. When the device is applied to a vehicle, the processing module may be used to control and manage the actions of the vehicle. The storage module may be used to support the vehicle in executing related program codes, etc.

[0179] The processing module may be a processor or a controller, which may implement or execute various exemplary logic blocks, modules and circuits shown in conjunction with the disclosure of the present application. The processor may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, etc. The storage module may be a memory.

[0180] In addition, the device provided in the embodiments of the present application may specifically be a chip, component or module, and the chip may include a connected processor and memory; wherein the memory is used to store instructions, and when the processor calls and executes the instructions, the chip can execute a vehicle-mounted communication method provided in the above embodiments.

[0181] The present application also provides a computer-readable storage medium, which stores a computer program code. When the computer program code runs on a computer, the computer executes the above-mentioned related method steps to implement a vehicle-mounted communication method provided by the above-mentioned embodiment. Among them, computer-readable storage media may include but are not limited to any type of disk, including floppy disks, optical disks, digital versatile disks (DVD), compact disc read-only memory (CD-ROM), microdrives and magneto-optical disks, read-only memory (ROM), random access memory (RAM), erasable programmable read-only memory (EPROM), electrically erasable programmable read only memory (EEPROM), dynamic random access memory (DRAM), video random access memory (VRAM), flash memory devices, magnetic cards or optical cards, nanosystems (including molecular memory ICs), or any type of medium or device suitable for storing instructions and / or data.

[0182] The present application also provides a computer program product. When the computer program product is run on a computer, the computer is enabled to execute the above-mentioned related steps to implement a vehicle-mounted communication method provided in the above-mentioned embodiment.

[0183] Among them, the vehicle, computer-readable storage medium, computer program product or chip provided in this application are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above, and will not be repeated here.

[0184] Through the description of the above implementation methods, technical personnel in the relevant field can understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0185] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0186] The above contents are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A vehicle communication method, characterized in that: The method comprises: In response to a start instruction of a target application in the vehicle, a connection function in the target object is called to send a connection request to a target server; wherein the target server is used to indicate a server of the target application; Establishing a connection with a first interface in the target object to obtain a current connection status with the target server; If the current connection status indicates that the connection fails, the connection function is called again to send the connection request to the target server, so that the vehicle establishes a connection with the target server.

2. The method according to claim 1, characterized in that If the current connection status indicates a connection failure, the method further includes: Determining a number of failures of the connection; The calling the connection function again to send the connection request to the target server includes: If the number of failures is less than or equal to the preset number of times, the connection function is called again to send the connection request to the target server.

3. The method according to claim 2, characterized in that The method further comprises: If the number of failures is greater than the preset number, a prompt message is output; wherein the prompt message is used to prompt that the vehicle has failed to connect to the target server and to exit the target application.

4. The method according to claim 1, characterized in that: The method further comprises: If the current connection status indicates a successful connection, establishing a connection with the second interface in the target object; Data is transmitted to the target server via the second interface.

5. The method according to claim 4, characterized in that The data transmission with the target server through the second interface includes: If a target operation of the user in the target application is detected, a target instruction is generated based on the target operation; The target instruction is sent to the target server through the second interface to synchronize the playback status in the target application.

6. The method according to claim 5, characterized in that After sending the target instruction to the target server through the second interface, the method further includes: If an update instruction sent by the target server is received, updating the play status in the display interface of the target application based on the update instruction; The update instruction is generated by the target server based on the target instruction.

7. The method according to claim 1, characterized in that The obtaining of the current connection status with the target server includes: Obtaining an objective function; wherein the objective function is used to indicate the connection status between the vehicle and the target server; If the target function is the first preset function, determining that the vehicle is successfully connected to the target server; If the target function is the second preset function, it is determined that the vehicle fails to connect to the target server.

8. A vehicle-mounted communication device, characterized in that: The device comprises: A detection module, configured to respond to a start instruction of a target application in the vehicle, call a connection function in a target object to send a connection request to a target server; wherein the target server is used to indicate a server of the target application; An acquisition module, used to establish a connection with the first interface in the target object to obtain a current connection status with the target server; The connection module is used to call the connection function again to send the connection request to the target server if the current connection status indicates that the connection fails, so that the vehicle can establish a connection with the target server.

9. A vehicle, characterized in that: The vehicle comprises: A memory for storing executable program codes; A processor, configured to call and run the executable program code from the memory, so that the vehicle executes the vehicle-mounted communication method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed, the vehicle-mounted communication method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Expanding universal plug and play capabilities in power constrained environment

    CN101167339A

  • Data transmission method and device, terminal and storage medium

    CN110413420A

  • Method, device and equipment for establishing communication connection

    CN111698337A

  • Data processing device and method applied to automatic monitoring system of vehicle

    CN111914032A

  • Method and device for interaction between EDPS and OPC UA server through OPC UA client

    CN114390088A