Vehicle communication method and device, electronic equipment and storage medium
By establishing a local area network and forwarding broadcast data through an in-vehicle router, the problem of data communication between vehicles in special areas is solved, enabling information synchronization and data sharing between vehicles. This has a wider range of applications and improves data sharing efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING BERLIN INTERACTIVE TECH CO LTD
- Filing Date
- 2023-02-07
- Publication Date
- 2026-04-14
Smart Images

Figure CN116056040B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of vehicle technology, and more specifically, to a vehicle communication method, device, electronic device, and storage medium. Background Technology
[0002] With the development of automotive technology, each vehicle can act as a mobile network terminal, enabling data sharing between vehicles through data communication. However, in certain special circumstances, such as when vehicles are traveling in remote mountainous areas or uninhabited regions, normal data communication between vehicles is impossible, preventing them from sharing data with other vehicles. Summary of the Invention
[0003] This application provides a vehicle communication method, device, electronic device, and storage medium, which can solve the problem in the prior art that vehicles cannot conduct normal data communication under certain special circumstances.
[0004] The technical solution is as follows:
[0005] According to one aspect of the embodiments of this application, a method for vehicle communication is provided, the method being applied to a first in-vehicle server, including:
[0006] Connect to a local area network (LAN); the LAN is established based on at least one vehicle-mounted router.
[0007] Send first broadcast data to any of the vehicle routers, so that the vehicle routers can forward the first broadcast data to the second vehicle server; the first broadcast data is used to enable the second vehicle server to identify the identity of the first vehicle server;
[0008] Receive second broadcast data forwarded via the vehicle router; the second broadcast data is sent by the second vehicle server; the second broadcast data is used to enable the first vehicle server to identify the identity of the second vehicle server;
[0009] The second vehicle server is determined based on the second broadcast data, and information synchronization is established between the two vehicle servers.
[0010] Optionally, establishing information synchronization with the second vehicle-mounted server includes:
[0011] Create the first shared file directory;
[0012] The system monitors the file information in the first shared file directory. When a change in the file information is detected, the changed file information is synchronized to the second shared file directory of the second vehicle server.
[0013] Optionally, the process of establishing information synchronization with the second vehicle-mounted server may further include:
[0014] Send a first file sharing request to the second vehicle-mounted server;
[0015] Receive the second token returned by the second server in response to the first file sharing request;
[0016] Receive the second file sharing request sent by the second vehicle-mounted server;
[0017] In response to the second file sharing request, a first token is sent to the second vehicle server;
[0018] When the first vehicle server receives the second token and the second vehicle server receives the first token, it is determined that the file sharing permission authentication between the first and second vehicle servers is successful.
[0019] Optionally, the method further includes:
[0020] Receive account information sent by the first terminal;
[0021] Based on the account information, determine the account binding status of the account information;
[0022] If the account binding status is not bound, then a login credential is assigned to the account information, and the account information is bound to the first vehicle server;
[0023] If the account binding status is "bound", the configuration information of the first vehicle server is returned to the first terminal, and the first terminal is instructed to connect to the second terminal.
[0024] Optionally, the first terminal is connected to the second terminal, including:
[0025] The first terminal configures itself based on the configuration information and sends third broadcast data to any of the vehicle routers, so that the vehicle routers can forward the third broadcast data to the second terminal; the third broadcast data is used to enable the second terminal to identify the identity of the first terminal;
[0026] The system receives fourth broadcast data forwarded via the vehicle-mounted router; the fourth broadcast data is sent by the second terminal; the fourth broadcast data is used to enable the first terminal to identify the identity of the second terminal.
[0027] The second terminal is determined based on the fourth broadcast data, and a connection is established between the second terminal and the second terminal.
[0028] Optionally, the method further includes:
[0029] The system receives a file sent by the first terminal; the file is generated by the first terminal controlling the first image acquisition device to execute a corresponding target function by calling the function corresponding to the target function file, and after the first image acquisition device finishes executing the target function.
[0030] Save the file to the first shared file directory.
[0031] Optionally, the method further includes:
[0032] Send a live stream address interface to the first terminal so that the first terminal can obtain the corresponding live stream address based on the live stream address interface and send the live stream address interface to the second terminal;
[0033] The live stream address is used to store the video stream obtained by the first terminal by calling the function corresponding to the live stream function file to enable the live stream function of the first image acquisition device.
[0034] The live stream address interface is used to enable the second terminal to obtain the live stream address and watch the live stream of the first image acquisition device through the live stream address.
[0035] According to another aspect of the embodiments of this application, a vehicle communication device is provided, the device comprising:
[0036] A connection module for connecting to a local area network (LAN); the LAN is established based on at least one vehicle-mounted router.
[0037] The first broadcast module is used to send first broadcast data to any of the vehicle routers, so that the vehicle routers can forward the first broadcast data to the second vehicle server; the first broadcast data is used to enable the second vehicle server to identify the identity of the first vehicle server.
[0038] The second broadcast module is used to receive second broadcast data forwarded via the vehicle router; the second broadcast data is sent by the second vehicle server; the second broadcast data is used to enable the first vehicle server to identify the identity of the second vehicle server;
[0039] The information synchronization module is used to determine the second vehicle server based on the second broadcast data and establish information synchronization with the second vehicle server.
[0040] According to another aspect of the embodiments of this application, an electronic device is provided, the electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of any of the above-described vehicle communication methods.
[0041] According to another aspect of the embodiments of this application, a computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, implements the steps of any of the vehicle communication methods described above.
[0042] The beneficial effects of the technical solution provided in this application are:
[0043] A local area network (LAN) is established using at least one vehicle-mounted router. Both the first and second vehicle-mounted servers, which require data sharing, are connected to this LAN. Information synchronization between the first and second vehicle-mounted servers is achieved by forwarding first and second broadcast data through any of the vehicle-mounted routers. Since the first and second vehicle-mounted servers synchronize information via the LAN, they do not rely on mobile networks for communication. This allows for normal communication and data sharing even in remote areas with poor or no mobile network signal, such as mountainous regions or uninhabited areas, thus broadening its applicability.
[0044] Data sharing is achieved by synchronizing information between servers on the first and second vehicles. When a device on the second vehicle needs to obtain data collected by a device on the first vehicle, it can simply obtain the data directly from the second vehicle server without sending a data request to the first vehicle or receiving the data returned by the first vehicle. This greatly reduces the number of data transmissions and improves the efficiency of data sharing. Attached Figure Description
[0045] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments of this application will be briefly introduced below.
[0046] Figure 1 A flowchart illustrating a vehicle communication method provided in an embodiment of this application;
[0047] Figure 2 This is a schematic diagram of the structure of a vehicle communication system provided in an embodiment of this application;
[0048] Figure 3 A flowchart illustrating a vehicle communication method according to another embodiment of this application;
[0049] Figure 4 A flowchart illustrating a vehicle communication method provided in another embodiment of this application.
[0050] Figure 5 This is a schematic diagram of the structure of a vehicle communication device provided in an embodiment of this application;
[0051] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0052] The embodiments of this application are described below with reference to the accompanying drawings. It should be understood that the embodiments described below with reference to the accompanying drawings are exemplary descriptions for explaining the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions of the embodiments of this application.
[0053] Those skilled in the art will understand that, unless otherwise stated, the singular forms “a,” “an,” and “the” used herein may also include the plural forms. It should be further understood that the terms “comprising” and “including” as used in embodiments of this application mean that the corresponding feature can be implemented as the presented feature, information, data, step, operation, element, and / or component, but do not exclude implementation as other features, information, data, step, operation, element, component, and / or combinations thereof supported by the art. It should be understood that when we say that an element is “connected” or “coupled” to another element, the one element can be directly connected or coupled to the other element, or it can mean that the one element and the other element establish a connection relationship through an intermediate element. Furthermore, “connected” or “coupled” as used herein can include wireless connection or wireless coupling. The term “and / or” as used herein indicates at least one of the items defined by the term; for example, “A and / or B” can be implemented as “A,” or as “B,” or as “A and B.”
[0054] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.
[0055] The technical solutions of this application and their effects are described below through several exemplary embodiments. It should be noted that the following embodiments can be referenced, borrowed from, or combined with each other. Identical terms, similar features, and similar implementation steps in different embodiments will not be repeated.
[0056] Figure 1 This is a flowchart illustrating a vehicle communication method provided in an embodiment of this application, as shown below. Figure 1 As shown, taking the application of this method to a first vehicle-mounted server as an example, the method includes:
[0057] Step S101: Connect to the local area network (LAN); the LAN is established based on at least one vehicle-mounted router.
[0058] Specifically, the first vehicle-mounted server can be a server mounted on the first vehicle, and the second vehicle-mounted server can be a server mounted on the second vehicle. Both the first and second vehicle-mounted servers can be NAS (Network Attached Storage) devices.
[0059] In practical application scenarios, there may be at least two vehicles. The embodiments of this application and subsequent embodiments are illustrated using the communication between the first vehicle and the second vehicle among at least two vehicles as an example. Those skilled in the art will understand that the above examples do not constitute a limitation on the embodiments of this application.
[0060] Before performing step S101, at least one vehicle-mounted router can be used to establish a local area network. When there are at least two vehicle-mounted routers, the mesh (wireless mesh) function or bridging function of each of the at least two routers can be enabled to make them a local area network.
[0061] When there is one vehicle-mounted router, the vehicle-mounted router can be installed in the first vehicle or the second vehicle, or in other vehicles other than the first vehicle and the second vehicle; when there are two vehicle-mounted routers, one vehicle-mounted router can be installed in the first vehicle and the other vehicle-mounted router can be installed in the second vehicle; one vehicle-mounted router can be installed in the first vehicle or the second vehicle, and the other vehicle-mounted router can be installed in other vehicles other than the first vehicle and the second vehicle. This application does not limit the specific installation method of at least one vehicle-mounted router.
[0062] After the local area network (LAN) is established, the first vehicle-mounted server can connect to it. For example, it can obtain the LAN's Wi-Fi name and password, and configure the Wi-Fi name and password on the first vehicle-mounted server to enable it to connect to the LAN. Furthermore, devices that communicate with the first vehicle-mounted server can also be connected to the LAN, allowing subsequent devices to communicate via it.
[0063] It should be noted that the coverage area of a local area network (LAN) is an area, generally ranging from a few meters to tens of kilometers. All vehicles connected to the same LAN need to always be within the coverage area of that LAN.
[0064] Step S102: Send first broadcast data to any vehicle router so that the vehicle router can forward the first broadcast data to the second vehicle server; the first broadcast data is used to enable the second vehicle server to identify the identity of the first vehicle server.
[0065] Specifically, the first vehicle-mounted server can send first broadcast data to any vehicle-mounted router used to establish a local area network. The first broadcast data may include the identity information of the first vehicle-mounted server. After receiving the first broadcast data, the vehicle-mounted router forwards the first broadcast data to the second vehicle-mounted server. The second vehicle-mounted server receives the first broadcast data and identifies the identity of the first vehicle-mounted server through the first broadcast data.
[0066] Both the first vehicle-mounted server and the second vehicle-mounted server are connected to the vehicle-mounted router via Wi-Fi, and both the first vehicle-mounted server and the second vehicle-mounted server are equipped with Wi-Fi modules for communication.
[0067] Step S103: Receive second broadcast data forwarded by the vehicle router; the second broadcast data is sent by the second vehicle server; the second broadcast data is used to enable the first vehicle server to identify the identity of the second vehicle server.
[0068] Specifically, the second vehicle-mounted server can also send second broadcast data to the vehicle-mounted router. The second broadcast data may include identity information for the second vehicle-mounted server. After receiving the second broadcast data, the vehicle-mounted router forwards the second broadcast data to the first vehicle-mounted server. The first vehicle-mounted server receives the second broadcast data and identifies the identity of the second vehicle-mounted server through the second broadcast data.
[0069] Step S104: Determine the second vehicle-mounted server based on the second broadcast data, and establish information synchronization with the second vehicle-mounted server.
[0070] Specifically, after steps S102 and S103 are executed, the first vehicle-mounted server receives the second broadcast data, and the second vehicle-mounted server receives the first broadcast data. Then, the first vehicle-mounted server can identify the identity of the second vehicle-mounted server based on the second broadcast data, and the second vehicle-mounted server can identify the identity of the first vehicle-mounted server based on the first broadcast data.
[0071] Thus, by using at least one vehicle-mounted router, i.e., a local area network gateway, as the medium for data transmission between the first vehicle-mounted server and the second vehicle-mounted server, both the first and second vehicle-mounted servers that need to share data can identify each other's identities, thereby enabling direct connection between the first and second vehicle-mounted servers and establishing information synchronization between them.
[0072] The information synchronization between the first vehicle-mounted server and the second vehicle-mounted server refers to the process where, when the information stored on either the first or second vehicle-mounted server is updated, the information stored on the other vehicle-mounted server is also updated accordingly. For example, when a new file is added to the first vehicle-mounted server, the same file will be added to the second vehicle-mounted server through information synchronization, ensuring that the data stored on the first and second vehicle-mounted servers is always consistent.
[0073] The vehicle communication method provided in this application establishes a local area network (LAN) through at least one vehicle-mounted router. Both the first and second vehicle-mounted servers, which require data sharing, are connected to the LAN. Information synchronization between the first and second vehicle-mounted servers is established by forwarding first and second broadcast data through any vehicle-mounted router. Since the first and second vehicle-mounted servers achieve information synchronization through the LAN, they do not rely on mobile networks for communication. This allows for normal communication and data sharing even in remote areas with poor or no mobile network signals, such as mountainous or uninhabited areas, thus broadening its applicability.
[0074] Data sharing is achieved by synchronizing information between servers on the first and second vehicles. When a device on the second vehicle needs to obtain data collected by a device on the first vehicle, it can simply obtain the data directly from the second vehicle server without sending a data request to the first vehicle or receiving the data returned by the first vehicle. This greatly reduces the number of data transmissions and improves the efficiency of data sharing.
[0075] As an optional embodiment, the method includes establishing information synchronization with the second vehicle-mounted server, comprising:
[0076] Create the first shared file directory;
[0077] The system monitors the file information in the first shared file directory. When a change in the file information is detected, the changed file information is synchronized to the second shared file directory of the second vehicle server.
[0078] Specifically, a first shared file directory can be created in the first vehicle-mounted server. The first shared file directory can be a directory for storing shared files, and the file information in the first shared file directory can be monitored. The file information can include the files stored in the first shared file directory. When changes in the file information are detected, such as adding, deleting, or updating files, the changed file information is synchronized to the second shared file directory on the second vehicle-mounted server, so that the files stored in the first shared file directory and the second shared file directory are always consistent.
[0079] Optionally, when a new file is detected in the first shared file directory, the new file can be sent directly to the second vehicle server via a peer-to-peer protocol, so that the second vehicle server can store the new file in the second shared file directory; when a file is detected to be deleted in the first shared file directory, the name of the deleted file can be sent directly to the second vehicle server via a peer-to-peer protocol, so that the second vehicle server can delete the corresponding file in the second shared file directory based on the name of the deleted file; when a file is detected to be updated in the first shared file directory, the updated file can be sent directly to the second vehicle server via a peer-to-peer protocol, so that the second vehicle server can overwrite the previous file in the second shared file directory with the updated file.
[0080] Those skilled in the art will recognize that the aforementioned surveillance process was conducted with the user's authorization or permission.
[0081] Similarly, the second vehicle-mounted server can perform the same steps as the first vehicle-mounted server described above, create a second shared file directory, and monitor the file information in the second shared file directory. When it detects that the file information in the second shared file directory has changed, it will synchronize the changed file information to the first shared file directory of the first vehicle-mounted server.
[0082] As an optional embodiment, the method further includes, before establishing information synchronization with the second vehicle-mounted server:
[0083] Send the first file sharing request to the second vehicle-mounted server;
[0084] Receive the second token returned by the second vehicle server in response to the first file sharing request;
[0085] Receive a second file sharing request sent by the second vehicle-mounted server;
[0086] In response to the second file-sharing request, a first token is sent to the second vehicle-mounted server;
[0087] When the first vehicle server receives the second token and the second vehicle server receives the first token, the file sharing permission authentication between the two servers is confirmed to be successful.
[0088] Specifically, before establishing information synchronization between the first vehicle-mounted server and the second vehicle-mounted server, file sharing permissions between them can be authenticated. The first vehicle-mounted server sends a first file sharing request to the second vehicle-mounted server, the second vehicle-mounted server receives the first file sharing request, responds to the first file sharing request, and sends a second token to the first vehicle-mounted server.
[0089] Similarly, the second vehicle-mounted server sends a second file-sharing request to the first vehicle-mounted server. The first vehicle-mounted server receives the second file-sharing request and responds by sending a first token to the second vehicle-mounted server. The first token and the second token are used for authentication of the first and second vehicle-mounted servers, respectively.
[0090] When the first vehicle-mounted server receives the second token and the second vehicle-mounted server receives the first token, the token exchange between the two parties is completed. This confirms that the file sharing permission authentication between the first and second vehicle-mounted servers is successful, and information synchronization between the two parties can then be established.
[0091] As an optional embodiment, the method further includes:
[0092] Receive account information sent by the first terminal;
[0093] Determine the account binding status based on the account information;
[0094] If the account binding status is not bound, then a login credential will be assigned to the account information, and the account information will be bound to the first vehicle-mounted server;
[0095] If the account binding status is "bound", the configuration information of the first vehicle server will be returned to the first terminal, and the first terminal will be instructed to connect to the second terminal.
[0096] Specifically, the first vehicle may also be equipped with a first terminal, which can be an in-vehicle terminal or a user terminal. The user terminal may include a smartphone, tablet, laptop, intelligent voice interaction device (such as a smart speaker), or wearable electronic device (such as a smartwatch). Similarly, the second vehicle may also be equipped with a second terminal.
[0097] In addition to synchronizing information between servers, the first vehicle and the second vehicle can also establish data communication between the first terminal and the second terminal by connecting the first terminal and the second terminal to a local area network.
[0098] Before establishing data communication between the first terminal and the second terminal, the first vehicle-mounted server needs to configure the first terminal. The first terminal sends account information to the first vehicle-mounted server. After receiving the account information, the first vehicle-mounted server needs to determine the account's binding status. If the account status is unbound, it means that the account has not logged into the first vehicle-mounted server. In this case, a login credential needs to be assigned to the account, and the account information needs to be stored in the first vehicle-mounted server. The account binding status of the account information is then set to bound.
[0099] In this application, a login credentials can be obtained by the user entering an account and password on the first terminal; alternatively, a third-party account can be used for login, and the OpenID (an open account) returned upon successful login can be used as the login credentials. This application does not limit the specific method of login.
[0100] If the account is bound, it means that the account has logged into the first vehicle server, can return the configuration information of the first vehicle server to the first terminal, and establish a connection between the first terminal and the second terminal.
[0101] Furthermore, if the account is confirmed to be bound, it can be verified. If verification is successful, the first terminal is configured to access it; if verification fails, the first terminal is not allowed to access and cannot obtain a token to log in to the server interface. If the first terminal forgets its account password when logging in, it can also manually reset the first vehicle-mounted server for initialization.
[0102] For the second vehicle-mounted server, the same steps described above can be performed to configure the second terminal, which will not be repeated here.
[0103] As an optional embodiment, the first terminal is connected to the second terminal, including:
[0104] The first terminal configures itself based on the configuration information and sends third broadcast data to any vehicle router, so that the vehicle router can forward the third broadcast data to the second terminal; the third broadcast data is used to enable the second terminal to identify the identity of the first terminal.
[0105] Receive fourth broadcast data forwarded via the vehicle router; the fourth broadcast data is sent by the second terminal; the fourth broadcast data is used to enable the first terminal to identify the identity of the second terminal;
[0106] The second terminal is identified based on the fourth broadcast data, and a connection is established with the second terminal.
[0107] Specifically, after the first terminal completes the configuration, it can send third broadcast data to any vehicle-mounted router used to establish the local area network. The third broadcast data may include the identity information of the first terminal for identification. After receiving the third broadcast data, the vehicle-mounted router forwards the third broadcast data to the second terminal. The second terminal receives the third broadcast data and identifies the identity of the first terminal through the third broadcast data.
[0108] The second terminal can also send fourth broadcast data to the vehicle router. The fourth broadcast data may include identity information for the second terminal. After receiving the fourth broadcast data, the vehicle router forwards the fourth broadcast data to the first terminal. The first terminal receives the fourth broadcast data and identifies the identity of the second terminal through the second broadcast data.
[0109] Both the first terminal and the second terminal are connected to the vehicle-mounted router via Wi-Fi, and both the first terminal and the second terminal are equipped with Wi-Fi modules for communication.
[0110] After the first terminal identifies the identity of the second terminal, and the second terminal identifies the identity of the first terminal, the first terminal and the second terminal can be directly connected. For example, a direct TCP (Transmission Control Protocol) connection can be established between the first terminal and the second terminal, through which various subsequent data streams can be transmitted.
[0111] After the first terminal and the second terminal establish a connection, they can communicate and share data, such as route information, navigation information, image information, and audio / video information. Taking route information as an example, vehicle A's terminal (hereinafter referred to as vehicle A) shares route information with vehicle B's terminal (hereinafter referred to as vehicle B), and both can add annotations to the route. For example, vehicle A might note in the route that location X has good scenery or dangerous road conditions, suggesting that vehicle B use a drone to take photos or scout the route, and mark this location as suitable for drone travel. When vehicle B passes through this area, the route provides drone travel information prompts, including but not limited to: the drone's departure point, flight path, hovering point, hovering direction and angle, flight parameters, and shooting parameters. Furthermore, after receiving the route message from vehicle A, vehicle B can choose whether to download it. If the route file is downloaded, vehicle B's navigation route will be loaded with the corresponding route information.
[0112] It should be noted that when multiple terminals are connected to the same local area network (LAN), any two terminals connected to that LAN can establish a connection using the method described above, thereby enabling data communication between multiple terminals within the same LAN. With multiple terminals logged in, all vehicle terminals can receive voice, text, image, location, and control commands sent by other vehicles' terminals via the LAN. For example, if vehicle A sends a message through its terminal software, then the terminals of vehicles B and C on the same network will both receive that message.
[0113] In addition, when the terminal device is offline (such as outside the signal coverage area), unreceived messages are always temporarily stored, and all messages will continue to be received when the device is restored to online status.
[0114] In this embodiment, data communication between the first terminal and the second terminal is established through a local area network, without relying on a mobile network for communication. Even in remote areas with poor mobile network signals or no network, such as mountainous areas or uninhabited areas, normal communication can be carried out, making it more widely applicable.
[0115] As an optional embodiment, the method further includes:
[0116] Receive a file sent by the first terminal; the file is generated by the first terminal controlling the first image acquisition device to execute the corresponding target function by calling the function corresponding to the target function file, and after the first image acquisition device finishes executing the target function.
[0117] Save the file to the first shared file directory.
[0118] Specifically, the first vehicle can also be equipped with a first image acquisition device, which can be a camera. The image acquisition device can be mounted on the vehicle, for example, four cameras can be externally mounted in the front, rear, left, and right directions of the vehicle; or it can be mounted on a vehicle-mounted drone, which refers to a drone mounted on a vehicle, such as on the roof. Since the drone can leave the vehicle and fly to an area at a certain distance from the vehicle, the image acquisition device mounted on the drone can capture a larger area.
[0119] The first terminal can call the function corresponding to the preset target function file to control the first image acquisition device to execute the corresponding target function, and send the file generated by the first image acquisition device after execution to the first vehicle server. The first vehicle server saves the received file to the first shared file directory. When a new file is detected in the first shared file directory, the new file is sent to the second vehicle server so that the second vehicle server can store the file in the second shared file directory, so that the second shared file directory is updated synchronously with the first shared file directory.
[0120] Among them, the function files can be files used to control the image acquisition device to perform a certain function. Each function file can correspond to one function, and each function file records the method to implement the corresponding function. Each method can be represented in function form. Each function file can be packaged using an SDK (Software Development Kit) and pre-loaded on the first terminal.
[0121] The target function file can be a file used to control the image acquisition device to perform the target function, which may include taking pictures, recording videos, acquiring files, exporting files, etc.
[0122] The method provided in the embodiments of this application will be described below with reference to an example.
[0123] When the user of the first vehicle instructs the first image acquisition device to take a picture via the first terminal, the first terminal calls the picture-taking function file to control the first image acquisition device to start the picture-taking function and set the picture-taking mode to HDR (High Dynamic Range Imaging). After the picture is taken, the first terminal calls the file acquisition function file to obtain the storage address of the captured photo in the first image acquisition device, and then calls the file export function file to export the captured photo to the specified format. The generated file is sent back to the file system inside the first terminal. When the first terminal detects the generation of a new file, it will obtain the file upload interface of the first vehicle server and send the file to the first vehicle server through this interface. The first vehicle server receives the file and saves it to the first shared file directory. When the first vehicle server detects a new file in the first shared file directory, it can directly transfer the file to the corresponding second shared file directory in the second vehicle server through a point-to-point protocol.
[0124] In this embodiment of the application, by establishing data sharing between the first vehicle server and the second vehicle server, the second vehicle can obtain photos or videos taken or recorded by the first vehicle in real time, thereby realizing the sharing of photo or video recording functions between the first vehicle and the second vehicle.
[0125] As an optional embodiment, the method further includes:
[0126] Send the live stream address interface to the first terminal so that the first terminal can obtain the corresponding live stream address based on the live stream address interface, and then send the live stream address interface to the second terminal;
[0127] The live stream address is used to store the video stream obtained by the first terminal by calling the function corresponding to the live stream function file to start the live stream function of the first image acquisition device.
[0128] The live stream address interface is used to enable the second terminal to obtain the live stream address and watch the live stream from the first image acquisition device through the live stream address.
[0129] Specifically, the first vehicle-mounted server sends a live streaming address interface to the first terminal. The first terminal receives the live streaming address interface and obtains the corresponding live streaming address based on it. The first terminal can then call the function corresponding to the live streaming function file to enable the live streaming function of the first image acquisition device and push the real-time captured video stream to the live streaming address.
[0130] When a user of the first vehicle requests to share the live stream, the first terminal sends the live stream address interface to the second terminal. The second terminal receives the live stream address interface, accesses it to obtain the corresponding live stream address, and can then watch the live stream from the first image acquisition device. When multiple devices are involved in the live stream, the live stream address interface can include information about each device and its corresponding live stream address.
[0131] In this embodiment of the application, by establishing data communication between the first terminal and the second terminal, the first terminal shares the live broadcast address interface with the second terminal, thereby realizing the sharing of live broadcast function between the first vehicle and the second vehicle.
[0132] As an optional embodiment, Figure 2 This is a schematic diagram of the structure of a vehicle communication system provided in an embodiment of this application, as shown below. Figure 2 As shown, the vehicle communication system includes a first vehicle and a second vehicle. The first vehicle is equipped with a first vehicle-mounted router, a first vehicle-mounted server, a first image acquisition device, a first terminal, and a drone. The drone may carry the image acquisition device. The second vehicle is equipped with a second vehicle-mounted router, a second vehicle-mounted server, a second image acquisition device, and a second terminal. The first vehicle-mounted router and the second vehicle-mounted router establish a local area network through wireless bridging.
[0133] In the first vehicle, the first terminal, the first image acquisition device, and the drone are connected to the first vehicle-mounted router via Wi-Fi, and the first vehicle-mounted router is connected to the first vehicle-mounted server via LAN (Local Area Network). In the second vehicle, the second terminal and the second image acquisition device are connected to the second vehicle-mounted router via Wi-Fi, and the second vehicle-mounted router is connected to the second vehicle-mounted server via LAN.
[0134] As an optional embodiment, in Figure 2 In the vehicle communication system shown, Figure 3 This is a flowchart illustrating a vehicle communication method provided in an embodiment of this application, as shown below. Figure 3 As shown, APP1 is installed on the first terminal, and APP2 is installed on the second terminal. The local area network gateway can be any in-vehicle router that establishes the local area network. Figure 2 The first or second vehicle-mounted router in the system.
[0135] On the first vehicle side, when APP1 on the first terminal starts, the user enters their account and the IP address (Internet Protocol) of the first vehicle server and sends a request to the first vehicle server to register the account name. After completing the registration, the first vehicle server returns configuration information to APP1. APP1 completes the configuration based on the configuration information and then broadcasts online information to the gateway. The online information is used to identify the identity of APP1. The second vehicle side performs the same steps. APP1 receives the broadcast message, discovers APP2, and APP2 receives the broadcast message, discovers APP1. Then, a long TCP connection is established between APP1 and APP2. APP1 and APP2 send team-up messages to each other, completing the direct connection between APP1 and APP2, thereby enabling data communication between APP1 on the first terminal and APP2 on the second terminal.
[0136] As an optional embodiment, in Figure 2 In the vehicle communication system shown, Figure 4 This is a flowchart illustrating a vehicle communication method provided in an embodiment of this application, as shown below. Figure 4 As shown, the first vehicle-mounted server sends a broadcast message for the first vehicle to the gateway, registering the first vehicle via broadcast. Simultaneously, the second vehicle-mounted server sends a broadcast message for the second vehicle to the gateway, registering the second vehicle via broadcast. The first and second vehicle-mounted servers receive each other's broadcast messages and record the other's server IP address. Then, the first and second vehicles request file-sharing permissions from each other and return their respective tokens. Once the first and second vehicle-mounted servers have exchanged tokens, file synchronization between them can be established.
[0137] Figure 5 This is a schematic diagram of the structure of a vehicle communication device provided in an embodiment of this application, as shown below. Figure 5 As shown, the apparatus of this embodiment may include:
[0138] Connection module 201 is used to connect to a local area network (LAN); the LAN is established based on at least one vehicle-mounted router.
[0139] The first broadcast module 202 is used to send first broadcast data to any of the vehicle routers, so that the vehicle routers can forward the first broadcast data to the second vehicle server; the first broadcast data is used to enable the second vehicle server to identify the identity of the first vehicle server;
[0140] The second broadcast module 203 is used to receive second broadcast data forwarded via the vehicle router; the second broadcast data is sent by the second vehicle server; the second broadcast data is used to enable the first vehicle server to identify the identity of the second vehicle server;
[0141] The information synchronization module 204 is used to determine the second vehicle server based on the second broadcast data and establish information synchronization with the second vehicle server.
[0142] As an optional embodiment, the information synchronization module is specifically used for:
[0143] Create the first shared file directory;
[0144] The system monitors the file information in the first shared file directory. When a change in the file information is detected, the changed file information is synchronized to the second shared file directory of the second vehicle server.
[0145] As an optional embodiment, the device further includes an authentication module for:
[0146] Send a first file sharing request to the second vehicle-mounted server;
[0147] Receive the second token returned by the second server in response to the first file sharing request;
[0148] Receive the second file sharing request sent by the second vehicle-mounted server;
[0149] In response to the second file sharing request, a first token is sent to the second vehicle server;
[0150] When the first vehicle server receives the second token and the second vehicle server receives the first token, it is determined that the file sharing permission authentication between the first and second vehicle servers is successful.
[0151] As an optional embodiment, the device further includes an account registration module for:
[0152] Receive account information sent by the first terminal;
[0153] Based on the account information, determine the account binding status of the account information;
[0154] If the account binding status is not bound, then a login credential is assigned to the account information, and the account information is bound to the first vehicle server;
[0155] If the account binding status is "bound", the configuration information of the first vehicle server is returned to the first terminal, and the first terminal is instructed to connect to the second terminal.
[0156] As an optional embodiment, the first terminal is connected to the second terminal, including:
[0157] The first terminal configures itself based on the configuration information and sends third broadcast data to any of the vehicle routers, so that the vehicle routers can forward the third broadcast data to the second terminal; the third broadcast data is used to enable the second terminal to identify the identity of the first terminal;
[0158] The system receives fourth broadcast data forwarded via the vehicle-mounted router; the fourth broadcast data is sent by the second terminal; the fourth broadcast data is used to enable the first terminal to identify the identity of the second terminal.
[0159] The second terminal is determined based on the fourth broadcast data, and a connection is established between the second terminal and the second terminal.
[0160] As an optional embodiment, the device further includes a target function execution module for:
[0161] The system receives a file sent by the first terminal; the file is generated by the first terminal controlling the first image acquisition device to execute a corresponding target function by calling the function corresponding to the target function file, and after the first image acquisition device finishes executing the target function.
[0162] Save the file to the first shared file directory.
[0163] As an optional embodiment, the device also includes a live streaming module for...
[0164] Send a live stream address interface to the first terminal so that the first terminal can obtain the corresponding live stream address based on the live stream address interface and send the live stream address interface to the second terminal;
[0165] The live stream address is used to store the video stream obtained by the first terminal by calling the function corresponding to the live stream function file to enable the live stream function of the first image acquisition device.
[0166] The live stream address interface is used to enable the second terminal to obtain the live stream address and watch the live stream of the first image acquisition device through the live stream address.
[0167] The apparatus in this application embodiment can execute the method provided in this application embodiment, and the implementation principle is similar. The actions performed by each module in the apparatus of each embodiment of this application correspond to the steps in the method of each embodiment of this application. For detailed functional descriptions of each module of the apparatus, please refer to the descriptions in the corresponding methods shown above, which will not be repeated here.
[0168] This application provides an electronic device including a memory, a processor, and a computer program stored in the memory. The processor executes the computer program to implement the steps of the vehicle communication method described above. Compared with related technologies, it can achieve the following: establishing a local area network (LAN) through at least one vehicle-mounted router, connecting both a first vehicle-mounted server and a second vehicle-mounted server that need to share data to the LAN, and establishing information synchronization between the first and second vehicle-mounted servers by forwarding first and second broadcast data through any vehicle-mounted router. The first and second vehicle-mounted servers achieve information synchronization through the LAN, eliminating the need for mobile network communication. Even in remote areas with poor or no mobile network signals, such as mountainous or uninhabited areas, normal communication and data sharing are possible, broadening the applicability. Data sharing is achieved through information synchronization between the servers on the first and second vehicles. When a device on the second vehicle needs to obtain data collected by a device on the first vehicle, it only needs to obtain it directly from the second vehicle-mounted server, without sending data requests to the first vehicle and receiving data returned by the first vehicle, greatly reducing the number of data transmissions and improving the efficiency of data sharing.
[0169] In one alternative embodiment, an electronic device is provided, such as Figure 6 As shown, Figure 6 The illustrated electronic device 4000 includes a processor 4001 and a memory 4003. The processor 4001 and the memory 4003 are connected, for example, via a bus 4002. Optionally, the electronic device 4000 may further include a transceiver 4004, which can be used for data interaction between the electronic device and other electronic devices, such as sending and / or receiving data. It should be noted that in practical applications, the transceiver 4004 is not limited to one type, and the structure of the electronic device 4000 does not constitute a limitation on the embodiments of this application.
[0170] Processor 4001 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. Processor 4001 may also be a combination that implements computational functions, such as including one or more microprocessor combinations, a combination of a DSP and a microprocessor, etc.
[0171] Bus 4002 may include a pathway for transmitting information between the aforementioned components. Bus 4002 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. Bus 4002 can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 6 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0172] The memory 4003 may be ROM (Read Only Memory) or other types of static storage devices capable of storing static information and instructions, RAM (Random Access Memory) or other types of dynamic storage devices capable of storing information and instructions, or EEPROM (Electrically Erasable Programmable Read Only Memory), CD-ROM (Compact Disc Read Only Memory) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media, other magnetic storage devices, or any other medium capable of carrying or storing computer programs and capable of being read by a computer, without limitation herein.
[0173] The memory 4003 stores computer programs that execute embodiments of this application, and its execution is controlled by the processor 4001. The processor 4001 executes the computer programs stored in the memory 4003 to implement the steps shown in the foregoing method embodiments.
[0174] This application provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it can implement the steps and corresponding content of the aforementioned method embodiments.
[0175] The terms "first," "second," "third," "fourth," "1," "2," etc. (if present) in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in a sequence other than that shown in the figures or text.
[0176] It should be understood that although arrows indicate various operation steps in the flowcharts of this application's embodiments, the order in which these steps are implemented is not limited to the order indicated by the arrows. Unless explicitly stated herein, in some implementation scenarios of this application's embodiments, the implementation steps in each flowchart can be executed in other orders as required. Furthermore, some or all steps in each flowchart, based on the actual implementation scenario, may include multiple sub-steps or multiple stages. Some or all of these sub-steps or stages can be executed at the same time, and each sub-step or stage can also be executed at different times. In scenarios where execution times differ, the execution order of these sub-steps or stages can be flexibly configured according to requirements, and this application's embodiments do not limit this.
[0177] The above description is only an optional implementation method for some implementation scenarios of this application. It should be noted that for those skilled in the art, other similar implementation methods based on the technical concept of this application without departing from the technical concept of this application also fall within the protection scope of the embodiments of this application.
Claims
1. A vehicle communication method, applied to a first on-board server, characterized in that, include: Connect to the local area network; The local area network is established based on at least one vehicle-mounted router; Send first broadcast data to any of the vehicle routers, so that the vehicle routers can forward the first broadcast data to the second vehicle server; The first broadcast data is used to enable the second vehicle server to identify the identity of the first vehicle server; Receive second broadcast data forwarded via the vehicle-mounted router; The second broadcast data is sent by the second vehicle server; the second broadcast data is used to enable the first vehicle server to identify the identity of the second vehicle server; The second vehicle server is determined based on the second broadcast data, and information synchronization is established between the second vehicle server and the second vehicle server. The establishment of information synchronization with the second vehicle-mounted server includes: Create the first shared file directory; The file information in the first shared file directory is monitored. When a change in the file information is detected, the changed file information is synchronized to the second shared file directory of the second vehicle server so that the files stored in the first shared file directory and the second shared file directory are consistent. The step of monitoring the file information in the first shared file directory, and when a change in the file information is detected, synchronizing the changed file information to the second shared file directory of the second vehicle server, includes: The system receives a file sent by a first terminal. The file is generated by the first terminal after the first image acquisition device finishes executing the target function by determining a target function file from various function files and calling the function corresponding to the target function file. The various function files are encapsulated using a software development kit (SDK) and preloaded into the first terminal. The file is saved to the first shared file directory. When a new file is detected in the first shared file directory, the new file is sent to the second vehicle server via a point-to-point protocol so that the second vehicle server can store the new file in the second shared file directory.
2. The method according to claim 1, characterized in that, Prior to establishing information synchronization with the second vehicle-mounted server, the process also includes: Send a first file sharing request to the second vehicle-mounted server; Receive the second token returned by the second vehicle server in response to the first file sharing request; Receive the second file sharing request sent by the second vehicle-mounted server; In response to the second file sharing request, a first token is sent to the second vehicle server; When the first vehicle server receives the second token and the second vehicle server receives the first token, it is determined that the file sharing permission authentication between the two vehicle servers is successful.
3. The method according to claim 1, characterized in that, Also includes: Receive account information sent by the first terminal; Based on the account information, determine the account binding status of the account information; If the account binding status is not bound, then a login credential is assigned to the account information, and the account information is bound to the first vehicle server; If the account binding status is "bound", the configuration information of the first vehicle server is returned to the first terminal, and the first terminal is instructed to connect to the second terminal.
4. The method according to claim 3, characterized in that, The first terminal is connected to the second terminal, including: The first terminal configures itself based on the configuration information and sends third broadcast data to any of the vehicle routers, so that the vehicle routers can forward the third broadcast data to the second terminal; the third broadcast data is used to enable the second terminal to identify the identity of the first terminal; The system receives fourth broadcast data forwarded via the vehicle-mounted router; the fourth broadcast data is sent by the second terminal; the fourth broadcast data is used to enable the first terminal to identify the identity of the second terminal. The second terminal is determined based on the fourth broadcast data, and a connection is established between the second terminal and the second terminal.
5. The method according to claim 3, characterized in that, Also includes: Send a live stream address interface to the first terminal so that the first terminal can obtain the corresponding live stream address based on the live stream address interface, and then send the live stream address interface to the second terminal; The live stream address is used to store the video stream obtained by the first terminal by calling the function corresponding to the live stream function file to enable the live stream function of the first image acquisition device. The live stream address interface is used to enable the second terminal to obtain the live stream address and watch the live stream of the first image acquisition device through the live stream address.
6. A vehicle communication device, applied to a first vehicle-mounted server, characterized in that, include: Connection module, used to connect to a local area network; The local area network is established based on at least one vehicle-mounted router; The first broadcast module is used to send first broadcast data to any of the vehicle routers, so that the vehicle routers can forward the first broadcast data to the second vehicle server. The first broadcast data is used to enable the second vehicle server to identify the identity of the first vehicle server; The second broadcast module is used to receive second broadcast data forwarded via the vehicle-mounted router; The second broadcast data is sent by the second vehicle server; the second broadcast data is used to enable the first vehicle server to identify the identity of the second vehicle server; The information synchronization module is used to determine the second vehicle server based on the second broadcast data and establish information synchronization with the second vehicle server; The information synchronization module is specifically used for: Create the first shared file directory; The file information in the first shared file directory is monitored. When a change in the file information is detected, the changed file information is synchronized to the second shared file directory of the second vehicle server so that the files stored in the first shared file directory and the second shared file directory are consistent. When the information synchronization module monitors the file information in the first shared file directory and detects a change in the file information, it synchronizes the changed file information to the second shared file directory of the second vehicle server. This is done for the following purposes: Receive files sent by the first terminal; The file is generated by the first terminal after the first image acquisition device finishes executing the target function by determining the target function file from various function files and calling the function corresponding to the target function file to control the first image acquisition device to execute the corresponding target function; each function file is encapsulated by a software development kit (SDK) and preloaded into the first terminal. The file is saved to the first shared file directory. When a new file is detected in the first shared file directory, the new file is sent to the second vehicle server via a point-to-point protocol so that the second vehicle server can store the new file in the second shared file directory.
7. An electronic device comprising a memory, a processor, and a computer program stored in the memory, characterized in that, The processor executes the computer program to implement the steps of the method according to any one of claims 1 to 5.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Intelligent vehicle-mounted information service system based on Ad Hoc network
CN103888514A