Remote flash data processing method, system, electronic device and storage medium

By establishing a communication connection between the terminal and the device terminal on the server, remote write-through of the ECU is realized, solving the problem of on-site operation in the existing technology, and improving work efficiency and convenience.

CN115622882BActive Publication Date: 2025-04-18KUNYI ELECTRONICS TECHNOLOGY (SHANGHAI) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211153185.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-21
Publication Date
2025-04-18
Estimated Expiration
2042-09-21

AI Technical Summary

Technical Problem

The existing ECU flashing technology requires engineers to operate on the spot, and it is impossible to realize remote flashing after vehicle distribution, resulting in low work efficiency and inconvenience.

Method used

The communication connection between the terminal and the device end is established through the server, and the transmission and execution of remote flashing data is realized, allowing the terminal to form a communication link with the device end under the instructions of the server and forward the flashing data to the device end.

Benefits of technology

It realizes the remote flashing and writing operation of the device side at the terminal, avoids inconvenience in on-site operation, improves work efficiency, and reduces time and capital costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115622882B_ABST
    Figure CN115622882B_ABST
Patent Text Reader

Abstract

The present invention provides a data processing method, system, electronic device and storage medium for remote flashing, the method comprising: a service end determines L unprocessed connection requests; each connection request is used to characterize: a pair of terminals and device ends that need to establish a corresponding communication link; based on the connection request, the service end instructs the device end represented by the connection request to form a first communication link with the service end, instructs the terminal represented by the connection request to form a second communication link with the service end, and forms a communication link represented by the connection request as a new available communication link based on the first communication link and the second communication link; the service end forwards the flashing data received from the corresponding terminal to the corresponding device end through the available communication link, so that the corresponding device end performs the corresponding flashing operation for the controller to which it is connected. The present invention can remotely flash the vehicle ECU and improve work efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of automobile software flashing, and in particular to a data processing method, system, electronic device and storage medium for remote flashing. Background Art

[0002] In the automotive field, the importance of electronic control technology is becoming increasingly prominent, and the ECU (Electronic Control Unit) is the core component of electronic control. When a data failure occurs in the ECU, a simple and effective repair method is to flash the ECU.

[0003] Currently, only manufacturers can legally flash ECUs, and the staff will flash them on site with special equipment. However, on-site flashing is very inconvenient and is only applicable to the situation where vehicles are stored in the same place. This local batch update method is not applicable to the situation where vehicles are distributed to owners for self-flash. Therefore, for the current ECU flashing, engineers must go to the site to flash the equipment, which is inconvenient for vehicles that have already been distributed to owners, and each engineer can only handle one vehicle at a time, which is inefficient. Summary of the invention

[0004] In view of this, the embodiments of the present application provide a remote flashing data processing method, system, electronic device and storage medium to achieve the purpose of remote flashing of the vehicle ECU and improving work efficiency.

[0005] The embodiment of the present application provides the following technical solution: a remote flash data processing method, applied to a server, comprising: the server determines L unprocessed connection requests; each connection request is used to represent: a pair of terminal and device end to which a communication link needs to be established; wherein L is a positive integer greater than or equal to 1;

[0006] The server, based on the connection request, instructs the device represented by the connection request to form a first communication link with the server, instructs the terminal represented by the connection request to form a second communication link with the server, and forms a communication link represented by the connection request as a new available communication link based on the first communication link and the second communication link;

[0007] The server side forwards the flashing data received from the corresponding terminal to the corresponding device side through the available communication link, so that the corresponding device side performs the corresponding flashing operation on the controller connected thereto.

[0008] According to a further embodiment of the present invention, the server, based on the connection request, instructs the device represented by the connection request to form a first communication link with the server, instructs the terminal represented by the connection request to form a second communication link with the server, and forms the communication link represented by the connection request as a new available communication link based on the first communication link and the second communication link, including: for any first connection request among the L connection requests, performing the following process:

[0009] The server processes the first connection request, generates a corresponding connection identifier, and sends a connection instruction with the connection identifier to the first device represented by the first connection request; the connection instruction is used to instruct the first device to establish the first communication link with the server based on the connection identifier after determining that the first device is suitable for connection;

[0010] The server receives a target feedback result issued by the first device based on the connection instruction, wherein the target feedback result indicates that the first device is suitable for connection;

[0011] The server returns the target feedback result and the connection identifier to the first terminal represented by the first connection request, so that: the first terminal establishes the second communication link with the server based on the connection identifier;

[0012] After the first communication link and the second communication link corresponding to the first connection request are established, the server receives the data to be verified from the first terminal and the first device respectively;

[0013] The server verifies the data to be verified, and after the verification is passed, a communication link between the first terminal and the first device is formed as the available communication link.

[0014] According to a further embodiment of the present invention, the data processing method further includes:

[0015] After the verification is passed, a target session identifier is stored; the target session identifier is used to identify that the first terminal and the first device end are a pair of terminals and device ends that establish a communication link; when it is monitored that any first communication end of the first terminal and the first device end is disconnected, based on the target session identifier, the first terminal and the second communication end of the first device end are instructed to also disconnect or wait for reconnection;

[0016] If the first communication end is the first terminal, the second communication end is the first device end; if the first communication end is the first device end, the second communication end is the first terminal.

[0017] According to a further embodiment of the present invention, before the server determines the L connection requests to be processed, the method further includes: when the number of the existing available communication links is greater than a preset number threshold, the server determines, for all M connection requests that have been received but not processed, M device ends represented by the M connection requests; wherein M is an integer greater than or equal to 2;

[0018] The server obtains network quality information and idle status information of each of the M devices;

[0019] The server determines, based on the network quality information and the idle status information, a latest sorting result of the M connection requests, wherein the latest sorting result represents: a priority order in which the M connection requests are processed;

[0020] The process of the server determining L connection requests to be processed specifically includes:

[0021] The server determines the L connection requests from the M connection requests based on the latest sorting result.

[0022] According to a further embodiment of the present invention, before the server determines the L connection requests to be processed, the server further includes:

[0023] The server obtains pre-selected information of any second terminal among the multiple terminals, the pre-selected information including: flash quantity information, flash object information, and flash data information; the flash quantity information represents: the number of communication links required to be formed by the second terminal; the flash object information represents: the second device end that needs to form a communication link with the second terminal; the flash data information is used to describe the specified flash data that needs to be flashed to the second device end;

[0024] The server determines an estimated flashing duration based on the number of available communication links, the flashing quantity information, the flashing object information, and the flashing data information;

[0025] The estimated flashing duration represents the estimated total duration of the following process: the second terminal forms communication links with all second device terminals respectively, the designated flashing data is transmitted to all second device terminals respectively via the formed communication links, and: all second device terminals complete the flashing operation of the designated flashing data;

[0026] The server feeds back the estimated flashing time to the second terminal, so that the second terminal feeds back the estimated flashing time as a basis for adjusting or determining the pre-selected information;

[0027] The server receives a second connection request sent by the second terminal, where the second connection request is obtained by the second terminal based on the pre-selected information that is finally determined;

[0028] The process of the server determining the unprocessed L connection requests includes:

[0029] The second connection request is used as part or all of the L connection requests.

[0030] According to another aspect of the present invention, a remote flash data processing method is provided, which is applied to any first terminal among a plurality of terminals, and includes:

[0031] The first terminal sends a first connection request to the server; the first connection request is used to indicate that: the first terminal and the first device end need to establish a communication link; the first connection request is also used to enable the server end to instruct the first device end to form a first communication link between it and the server end;

[0032] The first terminal forms a second communication link with the server under the instruction of the server;

[0033] Sending flash data to the server end so that the server end forwards the flash data received from the first terminal to the first device end through a corresponding available communication link, so that the first device end performs a corresponding flash operation on the controller to which it is connected, and the corresponding available communication link is formed by the server end based on the first communication link and the second communication link.

[0034] According to another aspect of the present invention, a remote flash data processing method is provided, which is applied to any first device end among multiple device ends, and includes:

[0035] The first device end forms a first communication link between the first device end and the server end under the instruction of the server end, wherein the instruction of the server end to the first device end is performed based on a first connection request not processed by the server end, and the first connection request is used to indicate: a first terminal and the first device end that need to establish a communication link; the first connection request is also used to enable the server end to instruct the first terminal to form a second communication link between it and the server end;

[0036] The first device receives flash data from the server, the flash data is forwarded by the server through a corresponding available communication link, the flash data originates from the first terminal, and the corresponding available communication link is formed by the server based on the first communication link and the second communication link;

[0037] The first device end executes a flash operation corresponding to the flash data for the controller to which it is connected.

[0038] According to another aspect of the present invention, there is provided a remote flashing data processing system, comprising a communication-connected server, a terminal, and a device;

[0039] The server is used to execute the above-mentioned data processing method applied to the server, the terminal is used to execute the above-mentioned data processing method applied to the terminal, and the device is used to execute the above-mentioned data processing method applied to the device.

[0040] According to another aspect of the present invention, an electronic device is provided, including a processor and a memory, wherein the memory stores instructions executable by the processor, and the processor can execute the instructions to implement the above-mentioned data processing method.

[0041] According to another aspect of the present invention, there is provided a storage medium storing a program, which implements the above-mentioned data processing method when executed by a processor.

[0042] Compared with the prior art, in the present invention, by establishing a communication connection (i.e., a communication link) between the terminal and the device, the terminal can remotely flash the device, avoiding the inconvenience of technicians having to go to the site to flash the device, and reducing the waste of time and money. For example, the user can send flash data to the server at the terminal according to the needs, and the server sends the flash data to the device, so that the device performs the flash operation according to the flash data.

[0043] In addition, in the optional scheme of the present invention, compared with the traditional flashing method, in the remote flashing process of the present invention, the terminal can choose to remotely flash multiple device ends at the same time. This remote flashing also improves work efficiency and reduces time cost. In addition, the optional scheme of the present invention provides a reliable and sufficient reference basis for the selection of multiple device ends by estimating the flashing time, which helps to help users select the most suitable device end and the number of device ends. In addition, through the service end, the flashing process of the device end can be transmitted back to the terminal, and the terminal can remotely grasp the flashing process and the final result. Moreover, in the optional scheme of the present invention, its application is not limited to flashing. When the device end and the terminal successfully establish a communication link, more operations can be performed, such as remote flashing, remote monitoring, remote calibration, remote diagnosis, fault reporting, etc. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0045] Figure 1 It is a flowchart of a data processing method for remote flashing according to an embodiment of the present invention;

[0046] Figure 2 Schematic diagram of the execution process of the remote flashing data processing method according to an embodiment of the present invention;

[0047] Figure 3 2 is a schematic diagram of the structure of a data processing system for remote flashing according to an embodiment of the present invention;

[0048] Figure 4 It is a schematic diagram of the structure of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0049] The embodiments of the present application are described in detail below with reference to the accompanying drawings.

[0050] It should be noted that, in the absence of conflict, the embodiments in this application and the features in the embodiments can be combined with each other. The present invention will be described in detail below with reference to the accompanying drawings and in combination with the embodiments, and the technical scheme of the present invention will be clearly and completely described. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0051] Some professional terms in this embodiment are explained as follows:

[0052] 1. ECU flashing is to export and rewrite the data of the original ECU through some technical means to achieve the purpose of increasing horsepower or torque.

[0053] 2. Socket: A socket is an abstraction of an endpoint for two-way communication between application processes on different hosts in a network. A socket is one end of process communication on a network, providing a mechanism for application layer processes to exchange data using network protocols.

[0054] MQTT: MQTT (Message Queue Telemetry Transport) is a message protocol based on the client-server message publish / subscribe paradigm under the ISO standard (ISO / IEC PRF 20922). It works on the TCP / IP protocol family and is a publish / subscribe message protocol designed for remote devices with low hardware performance and poor network conditions.

[0055] like Figure 1 As shown, an embodiment of the present invention provides a remote flash data processing method, which is applied to a server, and includes:

[0056] S11: The server determines L unprocessed connection requests;

[0057] S12: The server instructs the device represented by the connection request to form a first communication link with the server based on the connection request, instructs the terminal represented by the connection request to form a second communication link with the server, and forms a communication link represented by the connection request as a new available communication link based on the first communication link and the second communication link;

[0058] S13: The server side forwards the flashing data received from the corresponding terminal to the corresponding device side through the available communication link, so that the corresponding device side performs a corresponding flashing operation on the controller to which it is connected.

[0059] Each connection request is used to characterize: a pair of terminals and device ends that need to establish a communication link; L is a positive integer greater than or equal to 1; the connection request can be generated based on the user's operation on the terminal. No matter what kind of interactive operation is used to generate the connection request, it does not deviate from the scope of the embodiment of the present invention. The connection request may include at least one of the following: an identifier of the corresponding device end, an identifier of the corresponding terminal, an identifier of the communication link, etc. In an example, in the terminal, the user can select the flashing device and the related information of the flashing data (for example, select the flashing file, data file, etc.) in the interface for configuring the flashing. After the selection, the pre-selected information can be formed and fed back to the server, or the pre-selected information may not be formed. After the final confirmation, it can be understood that the user has initiated the flashing at the terminal, and the terminal can generate a connection request because of the need to implement the flashing. It can be seen that the user can initiate the flashing at the terminal, so that the terminal sends a connection request, which causes the corresponding processing of the subsequent steps S11 to S13.

[0060] The flash data may include any data related to flashing, and each flash data may be sent to the device end all at once, or may be sent gradually according to the flashing requirements and operation mode. For example, the flash data may include at least one of the following: flashing instructions, flashing data files, key files, flashing files, etc. It may be sent to the device end gradually through multiple round trips between the terminal and the device end in accordance with the requirements of the flashing operation, or it may be sent to the device end at one time, wherein the round trips and the one-time sending are both forwarded by the server end and the established available communication link.

[0061] In some examples, the flashing data may include a flashing file, and then the flashing file is forwarded from the terminal to the server and finally transmitted to the device. In other examples, the flashing data may not include data such as the flashing file, but may include information indicating the network address of the flashing file, and this information may be written into the flashing instruction. Then, as long as the flashing instruction is obtained, the device can download the flashing file from the network without obtaining it from the terminal.

[0062] The first communication link can be understood as a connection between the server and the terminal. Based on this connection, data transmission between the server and the terminal can be realized. This connection can be a Socket connection, which can be recorded as the first Socket connection. In a specific example, the establishment of the first communication link can be understood as determining which port (or address) the corresponding terminal should communicate with which port (or address) of the server, and further, the specific implementation logic and specifications of this communication can be further determined.

[0063] The second communication link can be understood as a connection between the server and the device. Based on this connection, data transmission between the server and the device can be realized. This connection can be a Socket connection, which can be recorded as a second Socket connection. In a specific example, the establishment of the second communication link can be understood as determining which port (or address) the corresponding device should communicate with which port (or address) of the server, and further, the specific implementation logic and specifications of this communication can be further determined.

[0064] The communication link between the terminal and the device end can be understood as any communication link used to realize data forwarding between the terminal and the device end.

[0065] In one example, when the corresponding first communication link and the second communication link have been determined, the process of forming a communication link can be understood as: determining that a port a (or address a) of the service end should communicate with another port b (or address b) of the service end, and the port a (or address a) is the port (or address) of the service end in the corresponding first communication link, and the port b (or address b) is the port (or address) of the service end in the corresponding second communication link. Furthermore, the specific implementation logic and specifications of this communication can be further determined. In other words, the process of forming a communication link can be, for example, forming an internal link of the service end between the port a (or address a) and the port b (or address b). On this basis, the internal link can be regarded as a communication link between the terminal and the device end (i.e., an available communication link), or the internal link, the first communication link, and the second communication link can be described as a communication link between the terminal and the device end (i.e., an available communication link).

[0066] The above is just a simple explanation of forming a communication link. The specific implementation method can be arbitrarily designed according to the environment, protocol, programming language used by the formed link (i.e., the formed connection), the security requirements that need to be met, the efficient processing requirements, etc.

[0067] like Figure 2 As shown, the data processing method of the embodiment of the present invention includes at least two processes:

[0068] (1) The process of establishing a communication link, corresponding to steps S11 to S12 above;

[0069] (2) Flashing process; corresponding to step S13 above.

[0070] Regarding the process of (1) establishing a communication link, in a specific embodiment, the process includes:

[0071] Establishing a communication link is divided into a first communication link (e.g., a first Socket connection) established between the device and the server, and a second communication link (e.g., a second Socket connection) established between the terminal and the server; in this design, both the terminal and the device are clients, and to establish communication between the two, a server needs to be set up as a medium to forward the communication messages between the two, so as to achieve communication between the terminal and the device. Next, the process of establishing a connection between the terminal and the device is specifically described.

[0072] In one embodiment, the server instructs the device represented by the connection request to form a first communication link with the server, instructs the terminal represented by the connection request to form a second communication link with the server, and forms a communication link represented by the connection request as a new available communication link based on the first communication link and the second communication link, including:

[0073] For any first connection request among the L connection requests, the following process is performed:

[0074] The server processes the first connection request, generates a corresponding connection identifier, and sends a connection instruction with the connection identifier to the first device represented by the first connection request; the connection instruction is used to instruct the first device to establish the first communication link with the server based on the connection identifier after determining that the first device is suitable for connection;

[0075] The server receives a target feedback result issued by the first device based on the connection instruction, wherein the target feedback result indicates that the first device is suitable for connection;

[0076] The server returns the target feedback result and the connection identifier to the first terminal represented by any one of the connection requests, so that: the first terminal establishes the second communication link with the server based on the connection identifier;

[0077] After the first communication link and the second communication link corresponding to the first connection request are established, the server receives the data to be verified from the first terminal and the first device respectively;

[0078] The server verifies the data to be verified, and after the verification is passed, a communication link between the first terminal and the first device is formed as the available communication link.

[0079] The server processes the first connection request, generates a corresponding connection identifier, and sends a connection instruction with the first connection identifier to the first device.

[0080] After receiving the connection instruction, the first device side parses the content in the connection instruction and determines whether a connection can be made at present, for example, whether the network status of the device side meets the requirements and whether it is idle (i.e., whether the idle degree meets the requirements). If both the idle degree and the network status meet the requirements, it can be determined that the device side can currently be connected (i.e., the device side is suitable for connection), wherein the idle degree can be described by the idle status information of the device side, but is not limited to this, and the network status can be described by the network quality information of the device side, but is not limited to this; when it is determined that the current connection can be made (i.e., suitable for connection), a first communication link (e.g., a first Socket connection) is established between the first device side and the server side.

[0081] The above connection identifier may be a character string generated by a random algorithm to ensure the uniqueness of each connection between the terminal and the device; the above connection instruction may be an RPC (Remote Procedure Call) command remote procedure call.

[0082] The first device side feeds back the current target feedback result that is suitable for connection as the current target feedback result to the server side, and the server side returns the current target feedback result that the device side can connect to and the corresponding connection identifier to the first terminal, so that the first terminal establishes a second communication link with the server side through the connection identifier.

[0083] When the first communication link between the first device and the server, and the second communication link between the first terminal and the server are established, the first device and the first terminal send data to be verified to the server respectively; the data to be verified may include:

[0084] A user identifier, such as a user token, which can be used to identify a user who uses the corresponding communication link, or a user who initiates a connection request to establish a corresponding communication link);

[0085] The client identifier may include an identifier of a corresponding device and / or an identifier of a corresponding terminal, for example, an mqtt client identifier;

[0086] A transmission flag, which can be used to represent any information of the corresponding communication link; it can be the same as the communication link identifier mentioned above, or it can be different;

[0087] The server verifies the data to be verified (such as the user's token, MQTT client identifier and transmission flag). After the verification is passed, a communication link between the first terminal and the first device is formed as the available communication link. The server sends a message to the terminal through MQTT to inform the terminal that it can start sending the flash data through the available communication link. At this point, the communication link between the first terminal and the first device is established.

[0088] In one embodiment, after the verification is passed, the server stores a target session identifier; the target session identifier is used to identify that the first terminal and the first device are a pair of terminals and devices that establish a communication link;

[0089] Based on the target session identifier, it can be used to achieve various functions.

[0090] In one example, when the server detects that any first communication end between the first terminal and the first device end is disconnected, based on the target session identifier, it instructs the first terminal and the second communication end between the first device end to also disconnect or wait for reconnection; wherein, if the first communication end is the first terminal, then the second communication end is the first device end; if the first communication end is the first device end, then the second communication end is the first terminal.

[0091] Regarding the flashing process (2), a specific embodiment includes:

[0092] When the first terminal and the first device end successfully establish a connection, the user can send flash data to the first device end through the first terminal, that is, the user can select the data files, key files and flash files that need to be flashed to perform remote flash operations. When the first device end receives the flash instruction, it will parse the contents of the flash instruction file and perform corresponding flash operations.

[0093] The data processing method for remote flashing of the embodiment of the present invention, in the flashing system for implementing the remote flashing method, firstly needs to establish a connection between the terminal and the device end through the service end, and then perform the flashing operation. The device end is a recorder directly or indirectly connected to the ECU. In the specific operation, it is only necessary to install a flashing software on the terminal. After the user logs in to the flashing software platform with a username and password, he can see the list of devices that he can operate (which lists some or all of the device ends). The user can check the device end and the flashing file that need to be flashed, that is, initiate a connection request for the device that needs to be flashed to the service end through the terminal, establish a communication link with the device, and by checking the flashing file, part or all of the flashing data can be determined, and then the communication link between the terminal software and the device end will give the flashing data to the device end. After the device end obtains the flashing data, it performs the flashing operation according to the specific logic. The present invention establishes a communication connection between the terminal and the device end through the service end, which can realize the remote operation of the device end at the terminal, and does not need to flash the device end on site, which reduces working time, reduces costs, and improves the convenience of device flashing operations.

[0094] In one embodiment of the present invention, during the flashing process, the device side will simultaneously feed back some flashing processes (such as the results of downloading files, the results of verification, the results of flashing success or failure, the files generated by flashing, etc.) to the terminal in real time. The feedback is also forwarded via the server and the corresponding available communication links therein, thereby achieving a real-time monitoring refresh effect, real-time tracking of the flashing results, facilitating operation, and improving efficiency.

[0095] In one embodiment of the present invention, when a user logs in to a terminal, the terminal will verify the user's authority to determine whether the user has permission to use the flash function (or at least one of the functions such as monitoring, calibration, diagnosis, and fault reporting). Only if the user has permission to use the function can the corresponding page be accessed. After the operation of the corresponding page, a flash (or calibration, diagnosis, etc.) requirement is initiated, which can cause the terminal to initiate a connection request to ensure the security of terminal access.

[0096] In one embodiment of the present invention, before the server determines the L connection requests to be processed, the process further includes:

[0097] In the case that the number of the available communication links is greater than a preset number threshold, the server determines, for all M connection requests that have been received but not processed, M device ends represented by the M connection requests; wherein M is an integer greater than or equal to 2;

[0098] The server obtains network quality information and idle status information of each of the M devices;

[0099] The server determines, based on the network quality information and the idle status information, a latest sorting result of the M connection requests, wherein the latest sorting result represents: a priority order in which the M connection requests are processed;

[0100] The process of the server determining the L connection requests to be processed specifically includes: the server determining the L connection requests from the M connection requests based on the latest sorting result.

[0101] It can be seen that when the terminal initiates a connection request, if the server has established a large number of undisconnected connections (i.e., available communication links) (for example, greater than a certain set threshold), the server will establish new connections with the devices to be newly connected in order of priority.

[0102] In a specific implementation, the priority sorting rule can be that the server can retrieve the network quality information and idle status information of the M device ends that need to establish new connections, sort the device ends according to the network quality information and idle status information, and establish new connections for one or more device ends with the highest sorting, that is, determine the L connection requests, and then give priority to establishing new connections for the L connection requests.

[0103] The network quality information may be any information that describes the network quality of the network used by the device to connect to the server. For example, the network may be a 4G or 5G mobile network, or a Wifi network, etc. The network quality information may include at least one of signal strength, measured network speed, etc., or any other information obtained based on this.

[0104] The idle status information may be any information describing whether the device is idle and / or the idle degree. For example, the idle status information may include: the occupancy rate of the device's memory, processor, etc., the amount of tasks being processed by the device, the number of available communication links established by the device, etc., or at least one of the above or any other information obtained based on this.

[0105] In a specific example, the process of determining the latest sorting result of the M connection requests based on the network quality information and the idle status information may include:

[0106] Determine the network speed of the device as the first information;

[0107] Determine occupancy information of the device end (such as processor occupancy, memory occupancy, and an average value or weighted sum of the processor occupancy and the memory occupancy) as second information;

[0108] Among them, the device side is usually installed in the vehicle, so the network quality depends on the location of the vehicle, and the vehicle may change. At the same time, the network quality will also be affected by the environment. Therefore, for the device side, the network quality information is uncontrollable.

[0109] The idle status information is controllable to a certain extent. For example, the device side can be designed to release the occupancy rate according to certain rules (such as pausing or stopping some tasks) after an available communication link is formed. That is, the device side can actually allocate sufficient resources for flashing by reasonably allocating resources, but this allocation may affect the execution of other tasks. Therefore, if this allocation can be avoided, it is better to avoid it as much as possible, or to perform allocation with less impact.

[0110] In summary, when sorting, the uncontrollable first information can be given priority, and the controllable second information can be considered only when the gap between the first information is not large;

[0111] For example: when sorting, for any two device ends, if the difference in the first information is greater than the first difference threshold, the device end with the larger first information can be placed before the device end with the smaller first information; if the difference in the first information is not greater than the specified difference threshold, the size of the second information can be compared, and the device end with the smaller second information can be placed before the device end with the larger second information.

[0112] To achieve similar sorting results, the device ends can also be sorted according to the size of the first information, and then different device end groups are divided according to the difference in the first information. The difference between the first information of the first device end of each device end group and the first information of the first device end of the next device end group is greater than the specified difference threshold. In each device end group, each device end is sorted according to the size of the second information.

[0113] Therefore, no matter which method is used, in the latest sorting results, the following conditions are satisfied:

[0114] For any two of the M device ends, for example, device end x and device end y;

[0115] If the first information of device end x is greater than the first information of device end y, and the difference is greater than the specified difference threshold, then device end x is ranked before device end y;

[0116] If the difference between the first information of device end x and the first information of device end y is less than or equal to the specified difference threshold, then: when the second information of device end x is less than the second information of device end y, the ranking of device end x is determined to be before device end y; otherwise, the ranking of device end x is determined to be after device end y.

[0117] The first information may also be replaced by signal strength, or calculated based on signal strength and network speed;

[0118] The second information may also be calculated by further considering the task volume (which refers to the number of tasks being executed by the device itself, which may be tasks configured by the device itself, such as data collection, packaging, storage and reporting of vehicle ECUs, and monitoring of specific events, etc., and may also include tasks that each terminal has instructed it to execute) and / or the number of available communication links established by the device;

[0119] At the same time, the method of using a trained neural network to determine the first information and the second information is not ruled out. For example, the signal strength and network speed are input into a neural network, and the first information is calculated using the neural network. For example, various occupancy rates, task volumes, and the number of available communication links established on the device side are input into a neural network, and the second information is calculated using the neural network.

[0120] In each of the above schemes, by giving priority to the M connection requests, it is possible to avoid the flashing process being loaded with too many connection requests at the same time, thereby causing low flashing efficiency or flashing failure, or reduce the possibility of such a situation occurring.

[0121] In one embodiment of the present invention, before the server determines the L connection requests to be processed, the process further includes:

[0122] The server obtains pre-selected information of any second terminal among the multiple terminals;

[0123] The pre-selected information includes: flash quantity information, flash object information, and flash data information; the flash quantity information represents: the number of communication links required to be formed by the second terminal; the flash object information represents: the second device end that needs to form a communication link with the second terminal; the flash data information is used to describe the specified flash data that needs to be flashed to the second device end; the server determines the estimated flash duration based on the number of available communication links, the flash quantity information, the flash object information, and the flash data information;

[0124] The estimated flashing duration represents the estimated total duration of the following process: the second terminal forms communication links with all second device ends respectively, the designated flashing data is transmitted to all second device ends respectively via the formed communication links, and: all second device ends complete the flashing operation of the designated flashing data; the server feeds back the estimated flashing duration to the second terminal, so that the second terminal feeds back the estimated flashing duration externally as a basis for adjusting or determining the pre-selected information; the server receives a second connection request sent by the second terminal, and the second connection request is obtained by the second terminal based on the pre-selected information that is finally determined;

[0125] The process of the server determining the unprocessed L connection requests includes: taking the second connection request as part or all of the L connection requests.

[0126] The user can select multiple devices to flash at the same time on the terminal; when the user selects L devices to flash at the same time, before the final confirmation, the server can estimate the time it takes for the L devices to complete the flash operation of the specified flash data, and display the estimated flash time on the terminal interface. If the estimated flash time is greater than the set threshold, a warning will be given on the terminal interface.

[0127] During the remote flashing process of this embodiment, when L is greater than or equal to 2, the terminal can choose to remotely flash multiple device ends simultaneously, which also improves work efficiency and reduces time cost.

[0128] At the same time, the above scheme fully utilizes the platform advantages of the server. When estimating the flashing time, the number of available communication links is creatively introduced as the basis for evaluating the flashing time. Among them, since the processing power and communication capabilities of the server are limited by its software and hardware configuration, when there are a lot of available communication links, it will inevitably affect the speed of establishing new communication links and the speed of transmitting data after establishment. That is: the available communication links are related to the efficiency of transmission, which will affect the evaluation of the flashing time. When the number of available communication links is fully considered, the accuracy of the estimated flashing time will be effectively improved.

[0129] Moreover, in the above scheme, through the evaluation and feedback of the estimated flashing time, guidance can be provided to the user to help the user choose the most appropriate flashing strategy (for example, selecting a few devices for flashing).

[0130] During specific implementation, at the terminal, the user can select multiple device ends for simultaneous flashing. However, if the number of device ends being flashed at the same time is too large, it may lead to low flashing efficiency, and may also cause crashes due to excessive resource usage. A preferred solution is: the estimated flashing time corresponding to different numbers of device ends can be calculated. For example, if the user selects two device ends, the estimated flashing time required to complete the flashing of two device ends will be displayed on the terminal interface. If the user selects three device ends, the estimated flashing time required to complete the flashing of three device ends will be displayed on the terminal interface for the user's reference. At the same time, if the estimated flashing time is relatively long (for example, greater than a preset threshold, this threshold can be calculated based on the estimated flashing time to complete the flashing of one device end, such as n times), it can be displayed in red font as a warning. If the estimated flashing time is short, it will be displayed in black font.

[0131] In a preferred embodiment, the process of calculating the estimated flashing time may be, for example:

[0132] During normal operation, the server can request the terminal and the device to report some custom parameters. Then, every time a terminal initiates and completes a flash, the relationship between the actual flash time a, the number of devices selected by the terminal b, and other custom parameters can be counted.

[0133] The custom parameters include (but are not limited to): the amount of data c required for flashing (i.e., flashing data information), the CPU occupancy rate d of the terminal before flashing, the network quality information e of the device (e.g., signal strength, or network speed information, i.e., a type of flashing object information), the idle status information f (i.e., another type of flashing object information), the total number of connections g established by the current server, etc.; in a specific example, the relationship between a and bcdefg, etc., can be, for example, a is equal to the weighted sum of bcdefg, then, the following relationship is obtained:

[0134] a=k1b+k2c+k3d+k4e+k5f+k6g;

[0135] According to the statistics of parameters such as the actual flashing time, a data set is obtained. After iteratively substituting the data set into the above formula, the specific values ​​of coefficients such as k1, k2, k3, k4, k5, and k6 are calibrated through a sufficient number of samples.

[0136] After calibration, the coefficients k1, k2, k3, k4, k5, and k6 are known values ​​that have been calibrated. When estimating the flashing time, the actually measured bcdefg can be substituted into the above formula, and the calculated a can be used as the estimated flashing time. In addition, the weighted values ​​can be calibrated and updated through the data generated during the actual working process.

[0137] In another example, a machine learning neural network can also be used for estimation, and the neural network can be continuously trained with data generated during the actual work process.

[0138] The embodiment of the present invention further provides a remote flash data processing method, which is applied to any first terminal among multiple terminals, and includes:

[0139] The first terminal sends a first connection request to the server; the first connection request is used to indicate that: the first terminal and the first device end need to establish a communication link; the first connection request is also used to enable the server end to instruct the first device end to form a first communication link between it and the server end;

[0140] The first terminal forms a second communication link with the server under the instruction of the server;

[0141] Sending flash data to the server end so that the server end forwards the flash data received from the first terminal to the first device end through a corresponding available communication link, so that the first device end performs a corresponding flash operation on the controller to which it is connected, and the corresponding available communication link is formed by the server end based on the first communication link and the second communication link.

[0142] The implementation method of each step can be understood by referring to the relevant description of the previous embodiment, and will not be repeated here.

[0143] The embodiment of the present invention further provides a remote flash data processing method, which is applied to any first device end among multiple device ends, and includes:

[0144] The first device end forms a first communication link between the first device end and the server end under the instruction of the server end, wherein the instruction of the server end to the first device end is performed based on a first connection request not processed by the server end, and the first connection request is used to indicate: a first terminal and the first device end that need to establish a communication link; the first connection request is also used to enable the server end to instruct the first terminal to form a second communication link between it and the server end;

[0145] The first device receives flash data from the server, the flash data is forwarded by the server through a corresponding available communication link, the flash data originates from the first terminal, and the corresponding available communication link is formed by the server based on the first communication link and the second communication link;

[0146] The first device end executes a flash operation corresponding to the flash data for the controller to which it is connected.

[0147] The implementation method of each step can be understood by referring to the relevant description of the previous embodiment, and will not be repeated here.

[0148] Figure 3 The structure diagram of the remote flashing data processing system 100 of the embodiment of the present invention includes a communication-connected terminal 101, a server 102 and a device 103; the terminal 101, the server 102 and the device 103 respectively execute the above methods of their respective terminals.

[0149] Figure 4 The electronic device of this embodiment can be a server. The electronic device of this embodiment can execute the processing flow provided by the remote flash data processing method embodiment, such as Figure 4 As shown, the electronic device 200 includes: a memory 202, a processor 201, a computer program and a communication interface 203; wherein the processor 201 of the electronic device 200 is used to provide computing and control capabilities. The memory 202 of the electronic device 200 includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface 203 of the electronic device 200 is used to connect to an external terminal through a network. The computer program is configured so that the processor 201 executes the technical solution of the above remote flashing data processing method embodiment.

[0150] Those skilled in the art will understand that Figure 4The structure shown in the figure is only a block diagram of a partial structure related to the scheme of the present invention, and does not constitute a limitation on the electronic device to which the scheme of the present application is applied. The specific electronic device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0151] In addition, an embodiment of the present invention further provides a machine-readable storage medium on which a computer program is stored. The computer program is executed by a processor to implement the data collection and processing method described in the above embodiment.

[0152] If the data acquisition and processing method is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0153] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.

Claims

1. A remote flash data processing method, applied to a server, characterized in that: include: The server determines L unprocessed connection requests; each connection request is used to represent: a pair of terminal and device end that need to establish a communication link; Wherein L is a positive integer greater than or equal to 1; The server instructs the device represented by the connection request to form a first communication link with the server based on the connection request, instructs the terminal represented by the connection request to form a second communication link with the server, and forms a communication link represented by the connection request as a new available communication link based on the first communication link and the second communication link, wherein the process includes: for any first connection request among the L connection requests, the following process is performed: The server processes the first connection request, generates a corresponding connection identifier, and issues a connection instruction with the connection identifier to the first device represented by the first connection request; the connection instruction is used to instruct the first device to establish the first communication link with the server based on the connection identifier after determining that it is suitable for connection; the server receives the target feedback result issued by the first device based on the connection instruction, and the target feedback result indicates that the first device is suitable for connection; the server returns the target feedback result and the connection identifier to the first terminal represented by the first connection request, so that: the first terminal establishes the second communication link with the server based on the connection identifier; after the first communication link and the second communication link corresponding to the first connection request are established, the server receives the data to be verified from the first terminal and the first device respectively; the server verifies the data to be verified, and after the verification is passed, a communication link between the first terminal and the first device is formed as the available communication link; The server side forwards the flashing data received from the corresponding terminal to the corresponding device side through the available communication link, so that the corresponding device side performs the corresponding flashing operation on the controller connected thereto.

2. The data processing method according to claim 1, characterized in that: The data processing method further includes: After the verification is passed, a target session identifier is stored; the target session identifier is used to identify that the first terminal and the first device end are a pair of terminals and devices that establish a communication link; When it is detected that any first communication end between the first terminal and the first device end is disconnected, instructing the first terminal and the second communication end between the first device end to also disconnect or wait for reconnection based on the target session identifier; If the first communication end is the first terminal, the second communication end is the first device end; if the first communication end is the first device end, the second communication end is the first terminal.

3. The data processing method according to any one of claims 1 to 2, characterized in that: Before the server determines the L connection requests to be processed, the process further includes: In the case that the number of the available communication links is greater than a preset number threshold, the server determines, for all M connection requests that have been received but not processed, M device ends represented by the M connection requests; wherein M is an integer greater than or equal to 2; The server obtains network quality information and idle status information of each of the M devices; The server determines, based on the network quality information and the idle status information, a latest sorting result of the M connection requests, wherein the latest sorting result represents: a priority order in which the M connection requests are processed; The process of the server determining L connection requests to be processed specifically includes: The server determines the L connection requests from the M connection requests based on the latest sorting result.

4. The data processing method according to any one of claims 1 to 2, characterized in that: Before the server determines the L connection requests to be processed, the process further includes: The server obtains pre-selected information of any second terminal among the multiple terminals, the pre-selected information including: flash quantity information, flash object information, and flash data information; the flash quantity information represents: the number of communication links required to be formed by the second terminal; the flash object information represents: the second device end that needs to form a communication link with the second terminal; the flash data information is used to describe the specified flash data that needs to be flashed to the second device end; The server determines an estimated flashing duration based on the number of available communication links, the flashing quantity information, the flashing object information, and the flashing data information; The estimated flashing duration represents the estimated total duration of the following process: the second terminal forms communication links with all second device terminals respectively, the designated flashing data is transmitted to all second device terminals respectively via the formed communication links, and: all second device terminals complete the flashing operation of the designated flashing data; The server feeds back the estimated flashing time to the second terminal, so that the second terminal feeds back the estimated flashing time as a basis for adjusting or determining the pre-selected information; The server receives a second connection request sent by the second terminal, where the second connection request is obtained by the second terminal based on the pre-selected information that is finally determined; The process of the server determining the unprocessed L connection requests includes: The second connection request is used as part or all of the L connection requests.

5. A remote flash data processing method, applied to any first terminal among multiple terminals, characterized in that: include: The first terminal sends a first connection request to the server, the server processes the first connection request, generates a corresponding connection identifier, and sends a connection instruction with the connection identifier to the first device represented by the first connection request; the connection instruction is used to instruct the first device to establish a first communication link with the server based on the connection identifier after determining that the first device is suitable for connection; The server receives a target feedback result issued by the first device based on the connection instruction, wherein the target feedback result indicates that the first device is suitable for connection; The server returns the target feedback result and the connection identifier to the first terminal represented by the first connection request, so that: the first terminal establishes a second communication link with the server based on the connection identifier; after the first communication link and the second communication link corresponding to the first connection request are established, the server receives the data to be verified from the first terminal and the first device respectively; The server verifies the data to be verified, and after the verification is passed, a communication link between the first terminal and the first device is formed as an available communication link; the first connection request is used to indicate: the first terminal and the first device need to establish a communication link; the first connection request is also used to enable the server to instruct the first device to form a first communication link between it and the server; The first terminal forms a second communication link with the server under the instruction of the server; Sending flash data to the server end so that the server end forwards the flash data received from the first terminal to the first device end through a corresponding available communication link, so that the first device end performs a corresponding flash operation on the controller to which it is connected, and the corresponding available communication link is formed by the server end based on the first communication link and the second communication link.

6. A remote flash data processing method, applied to any first device end among multiple device ends, characterized in that: include: The first device end, under the instruction of the server end, forms a first communication link between the first device end and the server end, wherein the instruction of the server end to the first device end is executed based on the first connection request that has not been processed by the server end, the server end processes the first connection request, generates a corresponding connection identifier, and sends a connection instruction with the connection identifier to the first device end represented by the first connection request; the connection instruction is used to instruct the first device end to establish the first communication link with the server end based on the connection identifier after determining that it is suitable for connection; the server end receives a target feedback result issued by the first device end based on the connection instruction, and the target feedback result indicates that the first device end is suitable for connection; the server end sends the target feedback result to the server end; The result and the connection identifier are returned to the first terminal represented by the first connection request, so that: the first terminal establishes a second communication link with the server based on the connection identifier; after the first communication link and the second communication link corresponding to the first connection request are established, the server receives the data to be verified from the first terminal and the first device end respectively; the server verifies the data to be verified, and after the verification is passed, a communication link between the first terminal and the first device end is formed as an available communication link, and the first connection request is used to represent: the first terminal and the first device end to which a communication link needs to be established; the first connection request is also used to enable the server to instruct the first terminal to form a second communication link with the server end; The first device receives flash data from the server, the flash data is forwarded by the server through a corresponding available communication link, the flash data originates from the first terminal, and the corresponding available communication link is formed by the server based on the first communication link and the second communication link; The first device end executes a flash operation corresponding to the flash data for the controller to which it is connected.

7. A remote flash data processing system, characterized in that: Including the server, terminal and device ends of the communication connection; The server is used to execute the data processing method described in any one of claims 1 to 4, the terminal is used to execute the data processing method described in claim 5, and the device is used to execute the data processing method described in claim 6.

8. An electronic device, characterized in that: The invention comprises a processor and a memory, wherein the memory stores instructions executable by the processor, and the processor can execute the instructions to implement the data processing method according to any one of claims 1 to 6.

9. A storage medium storing a program, wherein when the program is executed by a processor, the data processing method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Equipment upgrading method, network equipment, server, electronic equipment and storage medium

    CN112003717A

  • Vehicle-mounted system upgrading method, vehicle and readable storage medium

    CN113596755A