CN114710454A - Message processing method, vehicle-mounted communication device, electronic equipment and storage medium - Google Patents

Message processing method, vehicle-mounted communication device, electronic equipment and storage medium Download PDF

Info

Publication number
CN114710454A
CN114710454A CN202210322308.2A CN202210322308A CN114710454A CN 114710454 A CN114710454 A CN 114710454A CN 202210322308 A CN202210322308 A CN 202210322308A CN 114710454 A CN114710454 A CN 114710454A
Authority
CN
China
Prior art keywords
message
processed
vehicle
queue
communication device
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210322308.2A
Other languages
Chinese (zh)
Inventor
张屹风
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chengdu Thunder Software Technology Co ltd
Original Assignee
Chengdu Thunder Software Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Chengdu Thunder Software Technology Co ltd filed Critical Chengdu Thunder Software Technology Co ltd
Priority to CN202210322308.2A priority Critical patent/CN114710454A/en
Publication of CN114710454A publication Critical patent/CN114710454A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling
    • H04L47/62Queue scheduling characterised by scheduling criteria
    • H04L47/6245Modifications to standard FIFO or LIFO
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/546Message passing systems or structures, e.g. queues
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The invention provides a message processing method, a vehicle-mounted communication device, electronic equipment and a storage medium, wherein the method comprises the following steps: receiving a message to be processed sent by a cloud server, and adding the message to be processed into a message queue; the message queue can store a plurality of messages to be processed according to the adding sequence; the single-core processor sends a message acquisition request to a message queue; the message queue responds to the message acquisition request and releases the message to be processed according to the first-in first-out rule; the single-core processor acquires a message to be processed released by the message queue, processes the message to be processed and obtains a processed message; sending the processed message to at least one of the at least one vehicle-mounted execution device; after the current message to be processed is processed, the single-core processor sends a new message acquisition request to the message queue. The message processing method provided by the invention can shorten the processing period of a single message to be processed, thereby carrying out quick response and improving the real-time property of the message.

Description

Message processing method, vehicle-mounted communication device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of vehicle remote control, and in particular, to a message processing method, a vehicle-mounted communication device, an electronic device, and a storage medium.
Background
The current TBox is a universal vehicle networking terminal for current vehicle factories and is a bridge for connecting a background and a whole vehicle network. The CAN transceiver is directly connected with the gateway to communicate with the whole vehicle network, CAN acquire data of the entertainment CAN and the diagnosis CAN, and CAN control BCM, VCU and the like or issue diagnosis commands. The TBox has a plurality of peripheral devices and built-in resources, such as GPS, GSensor and BLE modules. The BLE module can realize that the cell-phone does not pass through some functions of backstage direct control vehicle. The TBox is connected with the entertainment host through the USB, provides a network for the entertainment host and carries out information transmission.
The TBox serves as the only control unit of the vehicle body which can be networked, and bears the mission of monitoring and controlling the state of the vehicle body, and the TBox has the greatest value in the connectivity with the network. The TBox is mainly used for acquiring vehicle-related information including position information, attitude information, vehicle state information (by connecting to an onboard CAN bus), and the like, and then transmitting the information to a TSP (Telematics Service Provider) platform through wireless communication. Meanwhile, a user can use a mobile phone APP and a Web client to issue an instruction to the TBox terminal through the TSP platform to control and operate the vehicle.
Most of existing TBox and cloud communication adopt a multi-thread processing mode, and when messages are processed in a multi-thread mode, an extra inter-thread synchronization technology and business logic repetition elimination are needed to achieve the effect of correctly and sequentially processing cloud instructions. Meanwhile, for data security, messages from the TSP (cloud) to the TBox need to be processed in an early stage, and after receiving the messages, the TBox needs to perform post-processing on the messages and then sends the messages to the control module for response. The processing time of a single message is usually dozens of milliseconds, most of the existing TBoxs are single-core processors, and the message processing mode adopts a multi-thread parallel processing mode, so that the time of single processing is prolonged, and the real-time performance of the message is reduced.
Disclosure of Invention
Accordingly, the present invention is directed to a system that at least partially solves the problems of the prior art.
According to one aspect of the application, a message processing method is provided and applied to a vehicle-mounted communication device, wherein the vehicle-mounted communication device is used for being in communication connection with a cloud server and at least one vehicle-mounted execution device respectively, and comprises a single-core processor;
the method comprises the following steps:
receiving a message to be processed sent by a cloud server, and adding the message to be processed into a message queue; the message queue can store a plurality of messages to be processed according to the adding sequence;
the single-core processor sends a message acquisition request to the message queue; the message queue responds to the message acquisition request and releases the message to be processed according to a first-in first-out rule;
the single-core processor acquires the message to be processed released by the message queue, and processes the message to be processed to obtain a processed message;
sending the processed message to at least one of at least one vehicle-mounted execution device;
and after the current message to be processed is processed, the single-core processor sends a new message acquisition request to the message queue.
In an exemplary embodiment of the application, the time taken for the single-core processor to process the message to be processed is longer than a first time;
the first time is the minimum time interval for the vehicle-mounted communication device to receive two messages to be processed.
In an exemplary embodiment of the application, the cloud server and the vehicle-mounted communication device perform message transmission by using an MQTT protocol;
the processed message includes: first classification information, second classification information, count information, and action data;
the first classification information and the second classification information have an incidence relation, the classification level corresponding to the first classification information is higher than the classification level corresponding to the second classification information, and the first classification information and the second classification information are used for jointly representing the action type corresponding to the processed message;
the counting information is used for representing the sending sequence of the messages to be processed sent by the cloud server;
and the action data is used for being executed by the vehicle-mounted executing device corresponding to the processed message.
In an exemplary embodiment of the present application, after obtaining the processed message, the method further includes:
determining an action type corresponding to the message to be processed according to the first classification information and the second classification information;
determining a filtering judgment rule corresponding to the message to be processed according to the action type;
and determining a sending strategy of the message to be processed according to the filtering judgment rule.
In an exemplary embodiment of the application, the sending the message to be processed to at least one of a plurality of vehicle-mounted execution devices includes:
determining at least one target vehicle-mounted execution device from the plurality of vehicle-mounted execution devices according to the action type;
and sending the processed message to the target vehicle-mounted execution device.
In an exemplary embodiment of the present application, after adding the pending message to a message queue, the method further includes:
and sending a message received notification to the cloud server.
In an exemplary embodiment of the present application, the message to be processed is a message that is sequentially serialized and encrypted by the cloud server;
the processing the message to be processed to obtain a processed message includes:
sequentially carrying out decryption processing and deserialization processing on the message to be processed to obtain the processed message;
wherein, the encryption processing adopts an asymmetric encryption algorithm.
According to one aspect of the application, a vehicle-mounted communication device is provided and is used for being in communication connection with a cloud server and at least one vehicle-mounted execution device respectively;
the vehicle-mounted communication device comprises:
the receiving module is used for receiving a message to be processed sent by the cloud server and adding the message to be processed into a message queue; the message queue can store a plurality of messages to be processed according to the adding sequence;
the single-core processor is used for sending a message acquisition request to the message queue so that the message queue responds to the message acquisition request and releases the message to be processed according to a first-in first-out rule;
the single-core processor is further used for acquiring the message to be processed released by the message queue, and processing the message to be processed to obtain a processed message;
the sending module is used for sending the processed message to at least one of at least one vehicle-mounted execution device;
and after the current message to be processed is processed, the single-core processor sends a new message acquisition request to the message queue.
According to one aspect of the present application, there is provided an electronic device comprising a processor and a memory;
the processor is configured to perform the steps of any of the above methods by calling a program or instructions stored in the memory.
According to an aspect of the application, there is provided a computer-readable storage medium storing a program or instructions for causing a computer to perform the steps of any of the methods described above.
The message processing method is applied to the vehicle-mounted communication device, the processor adopted by the vehicle-mounted communication device is the single-core processor, the vehicle-mounted communication device can receive the messages to be processed transmitted by the cloud server and add the received messages to be processed into the message queue, and the message queue can store a plurality of messages to be processed and take out the messages according to the first-in first-out rule. That is, the message queue records the entry time or the entry sequence of each message to be processed entering the queue, and when the message to be processed is obtained from the message queue, the message to be processed with the earliest time in the queue can only be taken out first, so as to ensure that the vehicle-mounted communication device can process the messages in sequence according to the receiving sequence of the messages. Meanwhile, when the message to be processed is processed, only after the current message to be processed is processed, the new message to be processed is obtained from the message queue again. Therefore, the processing period of a single message to be processed can be shortened, the quick response is carried out, and the real-time performance of the message is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a flowchart of a message processing method according to this embodiment.
Fig. 2 is a schematic diagram 1 illustrating a transmission flow of a message to be processed in a message processing method according to this embodiment;
fig. 3 is a schematic diagram of a flow of delivering a message to be processed in a message processing method according to this embodiment 2;
fig. 4 is a block diagram of a vehicle-mounted communication device according to this embodiment.
Detailed Description
Embodiments of the present invention are described in detail below with reference to the accompanying drawings.
It should be noted that, in the case of no conflict, the features in the following embodiments and examples may be combined with each other; moreover, all other embodiments that can be derived by one of ordinary skill in the art from the embodiments disclosed herein without making any creative effort fall within the scope of the present disclosure.
It is noted that various aspects of the embodiments are described below within the scope of the appended claims. It should be apparent that the aspects described herein may be embodied in a wide variety of forms and that any specific structure and/or function described herein is merely illustrative. Based on the disclosure, one skilled in the art should appreciate that one aspect described herein may be implemented independently of any other aspects and that two or more of these aspects may be combined in various ways. For example, an apparatus may be implemented and/or a method practiced using any number of the aspects set forth herein. Additionally, such an apparatus may be implemented and/or such a method may be practiced using other structure and/or functionality in addition to one or more of the aspects set forth herein.
In a general vehicle, in order to realize remote control of the vehicle and intercommunication of internal modules, a TBox (i.e., a vehicle-mounted communication device) is used for processing and transmitting messages. In actual operation, the TBox receives messages from multiple parties at a high receiving frequency, so that the TBox receives multiple messages to be processed in a short time. And the TBox on the vehicles adopts a time slice distribution mode to perform multi-thread parallel processing of multiple messages for processing and responding to the messages. While even though the single-core processor used by the TBox supports multi-threaded execution code, it is essentially the CPU that implements this mechanism by assigning a CPU time slice to each thread. The time slice is the time that the CPU allocates to each thread, and because the time slice is very short, the CPU feels that multiple threads are simultaneously executing by constantly switching thread execution. (time slices are typically a few milliseconds to tens of milliseconds). Therefore, the CPU executes the tasks circularly through the time slice allocation algorithm, and the current task is switched to the next task after executing one time slice. However, the state of the last task is saved before switching, so that the state of the task can be reloaded when switching back to the task next time. The process of task from save to load is a context switch. But this aspect can affect the execution speed of multiple threads when the CPU performs context switching. On the other hand, the developer needs to perform much additional programming and development to realize the distribution rule setting of the time slice. Meanwhile, in order to implement multi-thread parallel processing, developers are required to perform a large amount of programming work to implement the inter-thread synchronization technology and the rearrangement in business logic to achieve the effect of correctly and sequentially processing the cloud instructions.
Referring to fig. 1, according to an aspect of the present disclosure, a message processing method is provided, where the message processing method is applied to a vehicle-mounted communication device, the vehicle-mounted communication device is in communication connection with a cloud server and at least one vehicle-mounted execution device, the vehicle-mounted communication device and a plurality of the vehicle-mounted execution devices are disposed on a same vehicle, and the vehicle-mounted communication device employs a single-core processor. In some embodiments, the vehicle-mounted executing device is multiple.
The vehicle-mounted communication device and the cloud server CAN be in communication connection through a remote communication module (such as an LTE module), and the vehicle-mounted communication device and at least one vehicle-mounted execution device on the same vehicle CAN be in communication connection through a CAN bus. At least one vehicle-mounted executing device can be the same or different or partially different vehicle-mounted executing devices commonly used by vehicles, such as a display screen, a loudspeaker, an air conditioner, a vehicle window controller, a brake controller, a reversing controller and the like.
The message processing method provided by the embodiment specifically comprises the following steps:
step S100, receiving a message to be processed sent by a cloud server, and adding the message to be processed into a message queue. The message queue can store a plurality of messages to be processed according to the adding sequence;
and step S200, the single-core processor sends a message acquisition request to the message queue. And the message queue responds to the message acquisition request and releases the message to be processed according to a first-in first-out rule.
And step S300, the single-core processor acquires the message to be processed released by the message queue, and processes the message to be processed to obtain the processed message.
And step S400, sending the processed message to at least one of a plurality of vehicle-mounted execution devices.
The single-core processor sends a new message acquisition request to the message queue only after the current message to be processed is processed, that is, the single-core processor does not send the new message acquisition request to the message queue before the current message to be processed is processed.
Meanwhile, in this embodiment, the time consumed for the single-core processor to process the to-be-processed message is longer than a first time, and the first time is a minimum time interval for the vehicle-mounted communication device to receive the two to-be-processed messages. Wherein the minimum time interval is greater than or equal to zero seconds. That is, when the vehicle-mounted communication device sends a message to the vehicle-mounted communication device in a high-frequency multithreading mode in the operation process of the cloud server or a plurality of cloud servers simultaneously send a message to the vehicle-mounted communication device in a short time at a high frequency, the processing speed/frequency of a single message is smaller than the minimum time interval/frequency of the received message, so that the condition that a plurality of messages to be processed exist in the vehicle-mounted communication device at the same time occurs. According to the message processing method provided by the embodiment, the message queue, the message adding rule and the message taking rule of the message queue are set, so that the vehicle-mounted communication device can also sequentially process the messages to be processed according to the order of receiving the messages to be processed under the condition of simultaneously receiving a plurality of messages to be processed, a complex inter-thread synchronization technology and a complex business logic are not required to be set, the development speed of developers is greatly reduced, and meanwhile, the overall processing efficiency is greatly improved due to the fact that complex logic judgment is not required.
It should be noted that, in some embodiments, the vehicle-mounted communication device may be provided with other processors besides the single-core processor, but these processors are not used for processing the messages to be processed in the message queue. Namely, in the vehicle-mounted communication device, only one single-core processor is used for processing the messages to be processed in the message queue. In this embodiment, the vehicle-mounted communication device is provided with only one single-core processor.
The message processing method provided by the embodiment is applied to the vehicle-mounted communication device, and the vehicle-mounted communication device adds the received message to be processed into the message queue after receiving the message to be processed transmitted by the cloud server. The message queue can store a plurality of messages to be processed, and the messages are taken out according to a first-in first-out rule. That is, the message queue records the entry time or the entry sequence of each to-be-processed message entering the queue, and when the to-be-processed message is obtained from the message queue, only the to-be-processed message with the earliest time in the queue can be taken out first, so as to ensure that the vehicle-mounted communication device can process the to-be-processed messages in sequence according to the receiving sequence of the messages. Meanwhile, when the message to be processed is processed, only after the current message to be processed is processed, the new message to be processed is obtained from the message queue again. Therefore, the message processing method provided by the embodiment can shorten the processing period of a single message to be processed compared with a multithread parallel processing scheme under the condition that the processor adopted by the vehicle-mounted communication device is the single-core processor and the time consumption of the single message to be processed by the single-core processor is less than the minimum time interval of the vehicle-mounted communication device for acquiring the message to be processed, and the single message can be directly sent to the corresponding vehicle-mounted execution device after being processed, so that the quick response is realized, and the real-time performance of the message is improved.
In an exemplary embodiment of the application, the cloud server and the vehicle-mounted communication device perform message transmission by using an MQTT protocol;
the processed message includes: first classification information, second classification information, count information, and action data;
the first classification information and the second classification information have an association relationship, the classification level corresponding to the first classification information is higher than the classification level corresponding to the second classification information, and the first classification information and the second classification information are used for jointly representing the action type corresponding to the processed message.
The counting information is used for representing the sending sequence of the messages to be processed sent by the cloud server;
and the action data is used for being executed by the vehicle-mounted executing device corresponding to the processed message.
Specifically, the first classification information and the second classification information may be understood as first-level classification information and second-level classification information, and the action type corresponding to the message to be processed may be determined by using the classification information of the two levels and by using a logic judgment or query of a configuration file. For example, the first classification information may characterize a query, control, appointment, etc. classification, and the second classification information may characterize a window, door, seat, brake, speaker, etc. classification. The first classification information and the second classification information can jointly represent action types such as "control-window", "reserve-speaker", "query-door", and the like. The first classification information and the second classification information may be generated by a cloud server (TSP), or may be generated by an APP connected to the cloud server.
Referring to fig. 2 and fig. 3, the message processing method provided in this embodiment may be applied to a car control system including a client (APP), a cloud server (TSP) and a car communication device (T-BOX) which are sequentially connected in a communication manner, and is specifically applied to the car communication device. The relevant instruction can be generated by the operation of the APP by the user at the earliest time, and the relevant instruction is transmitted through the flow shown in fig. 2 to enable the vehicle to complete the corresponding action. Fig. 3 is a schematic processing flow diagram illustrating a processing flow of the to-be-processed message in the vehicle-mounted communication device.
The counting information can be directly represented by ID or simple number, and the main purpose is to make the vehicle-mounted executing device distinguish the execution sequence of the received processed information sent by the vehicle-mounted communication device. That is, the vehicle-mounted executing device may perform the corresponding functions in the order of receiving the messages from the vehicle-mounted communication device, but perform the functions in the order of sending the messages from the cloud server. Therefore, even if the receiving sequence of the messages to be processed by the vehicle-mounted communication device is disordered with the sending sequence of the cloud server due to network problems, the vehicle-mounted communication device does not need to compare and rearrange the local receiving sequence and the cloud sending sequence, and the situation that the execution sequence of the vehicle-mounted execution device is wrong can not occur.
The motion data, that is, the data that needs to be used when the vehicle-mounted execution device executes the motion corresponding to the message to be processed, may be a specific execution code, or may also be a parameter or the like that is needed when a related function or algorithm is executed.
In this embodiment, the cloud server and the vehicle-mounted communication device use MQTT protocol for message transmission, so that developers can directly define and modify a data structure of a message to be processed without modifying related configurations of the cloud server or the vehicle-mounted communication device too much. Therefore, the cloud server and the vehicle-mounted communication device can carry out smooth communication and have small workload demand on developers.
In an exemplary embodiment of the present application, after obtaining the processed message, the method further includes:
determining an action type corresponding to the processed message according to the first classification information and the second classification information;
determining a filtering judgment rule corresponding to the processed message according to the action type;
and determining the sending strategy of the processed message according to the filtering judgment rule.
The action types are the action types of "control-window", "reserve-speaker", "query-door", and the like, which are not described herein again.
In this embodiment, after the action type corresponding to the processed message is determined, the corresponding filtering determination rule and the sending policy are determined according to the action type. The sending strategy comprises delayed sending, immediate sending, retransmission request, sending blocking and the like. For example, for a vehicle control instruction which is long in time consumption and is executed by itself, the vehicle control instruction can be directly forwarded to the vehicle control module without determining whether to repeat the request, and the instruction is filtered by a state machine of the vehicle control module; for the instructions with strong sequential requirements of parking, the counting information can be limited to be in an increasing order so as to filter the instructions which are delayed to arrive due to the transmission path.
In an exemplary embodiment of the application, the sending the message to be processed to at least one of a plurality of vehicle-mounted execution devices includes:
determining at least one target vehicle-mounted execution device from the plurality of vehicle-mounted execution devices according to the action type;
and sending the processed message to the target vehicle-mounted execution device.
In this embodiment, after obtaining the processed message, the vehicle-mounted communication device selects a target vehicle-mounted execution device (that is, a vehicle-mounted execution device that actually needs to respond and execute) from the vehicle-mounted execution devices that are connected to the vehicle-mounted communication device or that can implement direct or indirect communication, and then performs targeted transmission of the processed message. The method does not adopt the modes to be processed such as broadcasting and the like, and avoids the problems that network resources occupy a large amount due to large-scale message sending and whether the vehicle-mounted execution device needs to respond to the received message or not.
In an exemplary embodiment of the present application, after adding the pending message to a message queue, the method further includes:
and sending a message received notification to the cloud server.
In practical applications, some operations sent by the cloud server require the cloud server to sequentially send a group of messages composed of a plurality of messages to be processed, and only after callback information (message received notification) of a previous message is received, a subsequent message is sent.
In general, the callback information (notification that the message has been received) of the TBox is sent after the processing of the message is completed. This may cause a long time interval between the reception of the pending message and the transmission of the callback information due to the processing speed, thereby causing the overall transmission period of the message group to be long. In this embodiment, after the to-be-processed message is added to the message queue, a message received notification is directly sent to the cloud server. That is to say, the message received notification is returned to the cloud server before the message to be processed is processed, so that the cloud server can continue to send the message to be processed of the message, thereby shortening the whole sending period, avoiding message blocking and improving the whole efficiency of message processing.
In an exemplary embodiment of the present application, the message to be processed is a message that is sequentially serialized and encrypted by the cloud server;
the processing the message to be processed to obtain a processed message includes:
sequentially carrying out decryption processing and deserialization processing on the message to be processed to obtain the processed message;
wherein, the encryption processing adopts an asymmetric encryption algorithm.
For data security, the messages sent by the cloud server need to be serialized and encrypted in sequence, and then the messages to be processed are formed. And the messages to be processed which reach the vehicle-mounted communication device all need to be decrypted and deserialized through an asymmetric encryption algorithm, so that the processed messages are obtained. Thereby ensuring the security and legitimacy of the message. Further, in this embodiment, after the decryption failure or the deserialization failure of the to-be-processed message occurs, the to-be-processed message may be determined to be sent by an unregistered or illegal server/device, and the to-be-processed message only needs to be discarded without performing excessive operations, so that the computing resources are saved and the overall processing efficiency is improved. Of course, in some cases, a prompt message of decryption failure may also be sent to the cloud server.
Referring to fig. 4, according to an aspect of the present application, an in-vehicle communication device is provided, where the in-vehicle communication device is configured to be respectively in communication connection with a cloud server and at least one in-vehicle execution device;
the vehicle-mounted communication device comprises:
the receiving module is used for receiving a message to be processed sent by the cloud server and adding the message to be processed into a message queue; the message queue can store a plurality of messages to be processed according to the adding sequence;
the single-core processor is used for sending a message acquisition request to the message queue so that the message queue responds to the message acquisition request and releases the message to be processed according to a first-in first-out rule;
the single-core processor is further used for acquiring the message to be processed released by the message queue, and processing the message to be processed to obtain a processed message;
the sending module is used for sending the processed message to at least one of at least one vehicle-mounted execution device;
and after the current message to be processed is processed, the single-core processor sends a new message acquisition request to the message queue.
Moreover, although the steps of the methods of the present disclosure are depicted in the drawings in a particular order, this does not require or imply that the steps must be performed in this particular order, or that all of the depicted steps must be performed, to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step execution, and/or one step broken down into multiple step executions, etc.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which may be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.
In an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above method is also provided.
As will be appreciated by one skilled in the art, aspects of the present invention may be embodied as a system, method or program product. Thus, various aspects of the invention may be embodied in the form of: an entirely hardware embodiment, an entirely software embodiment (including firmware, microcode, etc.) or an embodiment combining hardware and software aspects that may all generally be referred to herein as a "circuit," module "or" system.
An electronic device according to this embodiment of the invention. The electronic device is only an example and should not bring any limitation to the function and the scope of use of the embodiments of the present invention.
The electronic device is in the form of a general purpose computing device. Components of the electronic device may include, but are not limited to: the at least one processor, the at least one memory, and a bus connecting the various system components (including the memory and the processor).
Wherein the storage stores program code executable by the processor to cause the processor to perform steps according to various exemplary embodiments of the present invention as described in the "exemplary methods" section above.
The memory may include readable media in the form of volatile memory, such as Random Access Memory (RAM) and/or cache memory, and may further include Read Only Memory (ROM).
The storage may also include a program/utility having a set (at least one) of program modules including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
The bus may be any representation of one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, or a local bus using any of a variety of bus architectures.
The electronic device may also communicate with one or more external devices (e.g., keyboard, pointing device, bluetooth device, etc.), with one or more devices that enable a user to interact with the electronic device, and/or with any devices (e.g., router, modem, etc.) that enable the electronic device to communicate with one or more other computing devices. Such communication may be through an input/output (I/O) interface. Also, the electronic device may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the internet) via a network adapter. As shown, the network adapter communicates with other modules of the electronic device over a bus. It should be appreciated that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the electronic device, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, to name a few.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which may be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.
In an exemplary embodiment of the present disclosure, there is also provided a computer readable storage medium having stored thereon a program product capable of implementing the above-described method of the present specification. In some possible embodiments, aspects of the invention may also be implemented in the form of a program product comprising program code means for causing a terminal device to carry out the steps according to various exemplary embodiments of the invention described in the above section "exemplary methods" of the present description, when said program product is run on the terminal device.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
A computer readable signal medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable signal medium may be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
Furthermore, the above-described drawings are only schematic illustrations of processes involved in methods according to exemplary embodiments of the invention, and are not intended to be limiting. It will be readily understood that the processes shown in the above figures are not intended to indicate or limit the chronological order of the processes. In addition, it is also readily understood that these processes may be performed, for example, synchronously or asynchronously in multiple modules.
It should be noted that although in the above detailed description several modules or units of the device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit, according to embodiments of the present disclosure. Conversely, the features and functions of one module or unit described above may be further divided into embodiments by a plurality of modules or units.
The above description is only for the specific embodiment of the present invention, but the scope of the present invention is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present invention are included in the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. The message processing method is characterized by being applied to a vehicle-mounted communication device, wherein the vehicle-mounted communication device is used for being in communication connection with a cloud server and at least one vehicle-mounted execution device respectively, and comprises a single-core processor;
the method comprises the following steps:
receiving a message to be processed sent by a cloud server, and adding the message to be processed into a message queue; the message queue can store a plurality of messages to be processed according to the adding sequence;
the single-core processor sends a message acquisition request to the message queue; the message queue responds to the message acquisition request and releases the message to be processed according to a first-in first-out rule;
the single-core processor acquires the message to be processed released by the message queue, and processes the message to be processed to obtain a processed message;
sending the processed message to at least one of at least one vehicle-mounted execution device;
and after the current message to be processed is processed, the single-core processor sends a new message acquisition request to the message queue.
2. Message processing method according to claim 1,
the time consumed for the single-core processor to process the message to be processed is longer than the first time;
the first time is the minimum time interval for the vehicle-mounted communication device to receive two messages to be processed.
3. The message processing method according to claim 1, wherein the cloud server and the vehicle-mounted communication device perform message transmission by using an MQTT protocol;
the processed message includes: first classification information, second classification information, count information, and action data;
the first classification information and the second classification information have an incidence relation, the classification level corresponding to the first classification information is higher than the classification level corresponding to the second classification information, and the first classification information and the second classification information are used for jointly representing the action type corresponding to the processed message;
the counting information is used for representing the sending sequence of the messages to be processed sent by the cloud server;
and the action data is used for being executed by the vehicle-mounted executing device corresponding to the processed message.
4. The message processing method of claim 3, wherein after the obtaining the processed message, the method further comprises:
determining an action type corresponding to the processed message according to the first classification information and the second classification information;
determining a filtering judgment rule corresponding to the processed message according to the action type;
and determining the sending strategy of the processed message according to the filtering judgment rule.
5. The message processing method according to claim 4, wherein the sending the message to be processed to at least one of a plurality of vehicle-mounted execution devices comprises:
determining at least one target vehicle-mounted execution device from the plurality of vehicle-mounted execution devices according to the action type;
and sending the processed message to the target vehicle-mounted execution device.
6. The message processing method of claim 1, wherein after the adding the pending message to a message queue, the method further comprises:
and sending a message received notification to the cloud server.
7. Message processing method according to claim 1,
the message to be processed is a message which is sequentially subjected to serialization processing and encryption processing by the cloud server;
the processing the message to be processed to obtain a processed message includes:
sequentially carrying out decryption processing and deserialization processing on the message to be processed to obtain the processed message;
wherein, the encryption processing adopts an asymmetric encryption algorithm.
8. The vehicle-mounted communication device is characterized by being in communication connection with a cloud server and at least one vehicle-mounted execution device respectively;
the vehicle-mounted communication device comprises:
the receiving module is used for receiving a message to be processed sent by the cloud server and adding the message to be processed into a message queue; the message queue can store a plurality of messages to be processed according to the adding sequence;
the single-core processor is used for sending a message acquisition request to the message queue so that the message queue responds to the message acquisition request and releases the message to be processed according to a first-in first-out rule;
the single-core processor is further used for acquiring the message to be processed released by the message queue, processing the message to be processed and obtaining a processed message;
the sending module is used for sending the processed message to at least one of at least one vehicle-mounted execution device;
and after the current message to be processed is processed, the single-core processor sends a new message acquisition request to the message queue.
9. An electronic device comprising a processor and a memory;
the processor is adapted to perform the steps of the method of any one of claims 1 to 7 by calling a program or instructions stored in the memory.
10. A computer-readable storage medium, characterized in that it stores a program or instructions for causing a computer to carry out the steps of the method according to any one of claims 1 to 7.
CN202210322308.2A 2022-03-29 2022-03-29 Message processing method, vehicle-mounted communication device, electronic equipment and storage medium Pending CN114710454A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210322308.2A CN114710454A (en) 2022-03-29 2022-03-29 Message processing method, vehicle-mounted communication device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210322308.2A CN114710454A (en) 2022-03-29 2022-03-29 Message processing method, vehicle-mounted communication device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114710454A true CN114710454A (en) 2022-07-05

Family

ID=82170700

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210322308.2A Pending CN114710454A (en) 2022-03-29 2022-03-29 Message processing method, vehicle-mounted communication device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114710454A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115048154A (en) * 2022-07-06 2022-09-13 北斗星通智联科技有限责任公司 Vehicle-mounted configuration information management method, device and system and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019037156A1 (en) * 2017-08-23 2019-02-28 华为技术有限公司 Method for creating statistics of traffic and device therefor
CN109889455A (en) * 2019-02-15 2019-06-14 浙江吉利汽车研究院有限公司 A kind of real-time message processing device
CN111464974A (en) * 2020-03-18 2020-07-28 浙江吉利新能源商用车集团有限公司 Internet of vehicles data communication method, device, equipment and medium
CN111917770A (en) * 2020-07-31 2020-11-10 北京骑胜科技有限公司 Device communication method, device and storage medium
CN112529219A (en) * 2020-12-17 2021-03-19 武汉光庭信息技术股份有限公司 Method and system for upgrading ECU of whole vehicle
CN113329042A (en) * 2020-02-12 2021-08-31 斑马智行网络(香港)有限公司 Message processing method and system, Internet of vehicles system, server and electronic equipment
CN113423088A (en) * 2021-06-18 2021-09-21 安徽星云互联科技有限责任公司 Information distribution method, device, equipment, system and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019037156A1 (en) * 2017-08-23 2019-02-28 华为技术有限公司 Method for creating statistics of traffic and device therefor
CN109889455A (en) * 2019-02-15 2019-06-14 浙江吉利汽车研究院有限公司 A kind of real-time message processing device
CN113329042A (en) * 2020-02-12 2021-08-31 斑马智行网络(香港)有限公司 Message processing method and system, Internet of vehicles system, server and electronic equipment
CN111464974A (en) * 2020-03-18 2020-07-28 浙江吉利新能源商用车集团有限公司 Internet of vehicles data communication method, device, equipment and medium
CN111917770A (en) * 2020-07-31 2020-11-10 北京骑胜科技有限公司 Device communication method, device and storage medium
CN112529219A (en) * 2020-12-17 2021-03-19 武汉光庭信息技术股份有限公司 Method and system for upgrading ECU of whole vehicle
CN113423088A (en) * 2021-06-18 2021-09-21 安徽星云互联科技有限责任公司 Information distribution method, device, equipment, system and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115048154A (en) * 2022-07-06 2022-09-13 北斗星通智联科技有限责任公司 Vehicle-mounted configuration information management method, device and system and storage medium
CN115048154B (en) * 2022-07-06 2024-05-03 北斗星通智联科技有限责任公司 Vehicle-mounted configuration information management method, device, system and storage medium

Similar Documents

Publication Publication Date Title
US8949566B2 (en) Locking access to data storage shared by a plurality of compute nodes
CN109840142B (en) Thread control method and device based on cloud monitoring, electronic equipment and storage medium
US9497095B2 (en) Dynamic control over tracing of messages received by a message broker
JP7406010B2 (en) Baseline monitoring methods, devices, readable media, and electronic equipment
CN110381042B (en) Graceful restart service method, device, medium and electronic equipment
CN111625496A (en) Method, device and equipment for deploying distributed file system in virtual machine environment
US20120110581A1 (en) Task cancellation grace periods
EP4361808A1 (en) Resource scheduling method and device and computing node
CN111625497A (en) Deployment method, device, equipment and storage medium of distributed file system
CN113382056A (en) Data reporting method, device, equipment, storage medium and system
CN114710454A (en) Message processing method, vehicle-mounted communication device, electronic equipment and storage medium
CN115328741A (en) Exception handling method, device, equipment and storage medium
US10122602B1 (en) Distributed system infrastructure testing
CN114064091A (en) OTA (over the air) upgrade control method and device, electronic equipment and automatic driving vehicle
CN111694645B (en) Task processing method and related device in distributed task scheduling system
CN110287159B (en) File processing method and device
CN116932168A (en) Heterogeneous core scheduling method and device, storage medium and electronic equipment
CN112596761B (en) Service update release method and device and related equipment
CN110602162B (en) Terminal evidence obtaining method, device, equipment and storage medium
CN116260747A (en) Monitoring method and device of terminal test equipment and electronic equipment
CN106484536B (en) IO scheduling method, device and equipment
US20160014010A1 (en) Performance Monitoring with Reduced Transmission of Information
CN112732979A (en) Information writing method, information writing device, electronic equipment and computer readable medium
CN114710755B (en) Message processing method, vehicle-mounted communication device, electronic equipment and storage medium
US9588924B2 (en) Hybrid request/response and polling messaging model

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination