CN109412919A - A kind of communication control method, device and storage medium - Google Patents

A kind of communication control method, device and storage medium Download PDF

Info

Publication number
CN109412919A
CN109412919A CN201811275712.9A CN201811275712A CN109412919A CN 109412919 A CN109412919 A CN 109412919A CN 201811275712 A CN201811275712 A CN 201811275712A CN 109412919 A CN109412919 A CN 109412919A
Authority
CN
China
Prior art keywords
communication
request
communication request
attributes
channel
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.)
Granted
Application number
CN201811275712.9A
Other languages
Chinese (zh)
Other versions
CN109412919B (en
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.)
Beijing Jingwei Hirain Tech Co Ltd
Original Assignee
Beijing Jingwei Hirain Tech 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 Beijing Jingwei Hirain Tech Co Ltd filed Critical Beijing Jingwei Hirain Tech Co Ltd
Priority to CN201811275712.9A priority Critical patent/CN109412919B/en
Publication of CN109412919A publication Critical patent/CN109412919A/en
Application granted granted Critical
Publication of CN109412919B publication Critical patent/CN109412919B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/54Presence management, e.g. monitoring or registration for receipt of user log-on information, or the connection status of the users
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L12/40006Architecture of a communication node
    • H04L12/40013Details regarding a bus controller
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L2012/40208Bus networks characterized by the use of a particular bus standard
    • H04L2012/40215Controller Area Network CAN

Abstract

The present invention provides a kind of communication control methods, device and storage medium, this method comprises: after listening to the communication request of communication request object, determine the object type and communication attributes of each communication request object, to obtain the processing mode of the communication request to each communication request object, and which communication channel request communication is, in this way, when corresponding to the same communication channel there is currently multiple communication requests, it can be according to preset object priority weighing mechanism, the communication request of each communication channel is responded, meet real work demand, when avoiding the multiple communication request objects of current time that there is communication requirement to same communication channel, use conflict to the communication channel.

Description

A kind of communication control method, device and storage medium
Technical field
The present invention relates to field of automobile control, are situated between more particularly to a kind of communication control method, device and storage Matter.
Background technique
With the continuous development of automotive engineering, wanted to meet user to energy-saving and emission-reduction, safety and comfort etc. It asks, automobile on the market usually can all install a large amount of ECU (Electronic Control Unit, electronic control list at present Member), and communication channel is constructed using CAN (Controller Area Network, controller LAN) bus, realize message The information such as data receive or send.
In practical applications, existing communication control system as shown in Figure 1 there is communication to need in electronic control unit The coupling between each communication request module asked is larger, causes code portability poor;When certain time, there are multiple communications Request module, SW (Software) 1, SW2, SW3 as shown in figure 1 have communication requirement to same communication channel, it is easy to occur Use conflict to the communication channel.
Summary of the invention
In view of the above problems, the present invention provides a kind of communication control method, device and storage mediums, reduce each communication Coupling between request module avoids multiple communication request modules and generates when having communication request to same communication channel Use conflict situations.
In order to solve the above-mentioned technical problems, the present invention provides following technical schemes:
The embodiment of the invention provides a kind of communication control methods, which comprises
Listen to the communication request of communication request object;
The communication request is parsed, the object ID of respective communication request object is obtained;
From the information configuration table prestored, the one-to-one object type of the object ID for obtaining and obtaining and communication attributes;
Based on the object type and communication attributes of the communication request object, according to object priority weighing mechanism, response The communication request of the communication request object.
Optionally, the object type and communication attributes based on the communication request object, is weighed according to object priority Weighing apparatus mechanism responds the communication request of the communication request object, comprising:
Determine the requested communication channel of communication request object;
Whether detection includes the first object for the communication request object of the communication channel;
If comprising first object, according to the communication attributes of first object prestored, to the communication channel into Row processing;
If not including first object, whether detection includes second pair for the communication request object of the communication channel As;
If comprising second object, according to the communication attributes of second object prestored, to the communication channel into Row processing;
If not including second object, whether detection includes third pair for the communication request object of the communication channel As;
If comprising the third object, according to the communication attributes of the third object prestored, to the communication channel into Row processing;
If not including the third object, and inquire the last communication request pair listened to for the communication channel As requesting the communication channel to close local communication mode comprising second object;
Wherein, first object, second object and the third object are the communication requests of different object types Object.
Optionally, the object type and communication attributes based on the communication request object, is weighed according to object priority Weighing apparatus mechanism responds the communication request of the communication request object, further includes:
Whether in the open state detect the requested communication channel of communication request object;
If in the open state, whether detection includes the 4th object, institute for the communication request object of the communication channel Stating the 4th object is the communication request for being different from the object type of first object, second object and the third object Object;
If comprising the 4th object, and inquiring the last communication request object listened to for the communication channel It does not include the 4th object, according to the communication attributes of the 4th object prestored, the communication channel message is closed in request Transmission-receiving function;
If not including the 4th object, and inquire the last communication request pair listened to for the communication channel As comprising the 4th object, according to the communication attributes of the 4th object prestored, the communication channel message is opened in request Transmission-receiving function.
Optionally, the communication attributes for first object that the foundation prestores, handle the communication channel, packet It includes:
According to the communication attributes of first object prestored, the communication channel is closed in request;
The communication attributes for second object that the foundation prestores, carrying out processing to the communication channel includes:
According to the communication attributes of second object prestored, the local communication mode of the communication channel is opened in request;
The communication attributes for the third object that the foundation prestores, carrying out processing to the communication channel includes:
According to the communication attributes of the third object prestored, the remote communication mode of the communication channel is opened in request.
Optionally, if comprising first object, the method also includes:
The inquiry last time listens to whether the communication request object for the communication channel includes first object;
If not, executing the communication attributes described in step according to first object prestored, which is carried out Processing;
If comprising second object, the method also includes:
The inquiry last time listens to whether the communication request object for the communication channel includes second object;
If not, executing the communication attributes described in step according to second object prestored, which is carried out Processing;
If comprising the third object, the method also includes:
The inquiry last time listens to whether the communication request object for the communication channel includes the third object;
If not, executing the communication attributes described in step according to the third object prestored, which is carried out Processing.
Optionally, the method also includes:
Obtain each communication request object under operating status with communication requirement;
One-to-one object ID is distributed for each communication request object;
According to the communication feature of each communication request object, the object type and communication of respective communication request object are determined Attribute;
Using the respective object ID of the communication request object, object type and the communication attributes of acquisition, generates information and match Set table.
Optionally, the communication attributes include channel attributes and message attribute;
The channel attributes are used to show the communication channel of the communication request object requests control of corresponding object type;
The message attribute is used to show the communication channel report of the communication request object requests control of corresponding object type Text sends or receives.
Optionally, the object ID of each communication request object with communication requirement is serial number;
The channel attributes are 32 hexadecimal integers, and the message attribute is 8 hexadecimal integers.The present invention is real It applies example and additionally provides a kind of communication control unit, described device includes:
Module is monitored, for listening to the communication request of communication request object;
Parsing module obtains the object ID of respective communication request object for parsing the communication request;
Obtain module, for from the information configuration table prestored, the one-to-one object class of the object ID for obtaining and obtaining Type and communication attributes;
Respond module, for object type and communication attributes based on the communication request object, according to object priority Weighing mechanism responds the communication request of the communication request object.
The embodiment of the invention also provides a kind of storage mediums, are stored thereon with program, and described program is executed by processor Shi Shixian communication control method as described above.
It can be seen that compared with prior art, the present invention provides a kind of communication control method, device and storage medium, prison After the communication request for hearing communication request object, by the object type and communication attributes of each communication request object of determination, with true Each communication request object is determined to the processing mode of its communication request, and which communication channel request communication is, in this way, if working as Before there are multiple communication requests to correspond to the same communication channel, can be responded each according to preset object priority weighing mechanism Communication request meets real work demand, and multiple communication request objects is avoided to have communicating requirement to same communication channel simultaneously When, the use conflict to the communication channel.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this The embodiment of invention for those of ordinary skill in the art without creative efforts, can also basis The attached drawing of offer obtains other attached drawings.
Fig. 1 shows a kind of network architecture schematic diagram of existing communication control system;
Fig. 2 shows a kind of network architecture schematic diagrams of communication control system provided in an embodiment of the present invention;
Fig. 3 shows a kind of flow diagram of communication control method provided in an embodiment of the present invention;
Fig. 4 shows a kind of schematic diagram of a scenario of existing communication control system;
Fig. 5 shows the flow diagram of another communication control method provided in an embodiment of the present invention;
Fig. 6 shows the flow diagram of another communication control method provided in an embodiment of the present invention;
Fig. 7 a shows the flow diagram of another communication control method provided in an embodiment of the present invention;
Fig. 7 b shows the flow diagram of another communication control method provided in an embodiment of the present invention;
Fig. 7 c shows the flow diagram of another communication control method provided in an embodiment of the present invention;
Fig. 8 shows the flow diagram of another communication control method provided in an embodiment of the present invention;
Fig. 9 shows a kind of structural schematic diagram of communication control unit provided in an embodiment of the present invention;
Figure 10 shows the structural schematic diagram of another communication control unit provided in an embodiment of the present invention;
Figure 11 shows the structural schematic diagram of another communication control unit provided in an embodiment of the present invention;
Figure 12 shows the structural schematic diagram of another communication control unit provided in an embodiment of the present invention.
Specific embodiment
For existing communication control system as shown in Figure 1, it was found by the inventors of the present invention that 1 mould of SW (Software) These three communication request modules with communication requirement of block, SW2 module and SW3 module, to NM (Network Management, network management) 1 module and Com (Communication, communication) module has control to require;SW2 module and SW3 The two communication request modules of module have control to require NM2 module;SW3 module and NM2 module are to CAN2 (Control Area Network, controller LAN) module have control require;SW1 module, SW2 module, SW3 module, NM1 module and NM2 Module has control to require Com module.In this way, when SW1 module, SW2 module and SW3 module these three communication request modules State changes, and variation sequence is different, it will cause to generate conflict to the use of same communication channel simultaneously, that is, It says, the coupling between each communication request module in the existing this network architecture is larger, when causing to do code migrating, work Amount is big, and difficulty is high.
Wherein, NM1 module and NM2 module can be network management module, for managing SW1 module, SW2 module and SW3 Transmission/reception of the unlatching/closing and the communication channel of communication channel needed for module executes to message;This communication of Com module Module can be management message and send/received module, and the present embodiment can be denoted as message management module, CAN1 module and CAN2 module can be driving network message transmission/received module, be properly termed as CAN drive module, in practical applications, can To connect different communication channels.
In order to improve the above problem, the present inventor proposes to adjust the network architecture as shown in Figure 1, and reduction respectively has Coupling between the communication request module of communication requirement, finds by continuously attempting to, and a communication management module can be set ComM (Communication Manager), to be managed collectively the communication requirement and message management mould of each communication request module SW Reception/transmission of the block Com to message data, and a network management integration module NmIn (Network management is set Integrate), the communication requirement of each communication request module SW is uniformly responded, controls multiple network management module NM, triggers phase The CAN drive module answered, at least one corresponding communication channel of unlatching/closing, to terminate each communication request module SW to network Management module NM's and message management module Com directly controls requirement and each network management module NM to message management module Com's directly controls requirement, to reduce the dependence between each communication request module SW, that is, reduces each communication request mould Coupling between block SW, and then improve code portability.
It is to be appreciated that the present invention does not do the network architecture of the new communication control system obtained based on above-mentioned core idea It limits.
In order to keep the above objects, features and advantages of the present invention more obvious and easy to understand, below in conjunction with of the invention real The attached drawing in example is applied, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described implementation Example is only a part of the embodiment of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, this field is common Technical staff's every other embodiment obtained without making creative work belongs to the model that the present invention protects It encloses.
Referring to Fig. 2, the communication control system provided in an embodiment of the present invention for being used to realize communication control method is shown Network architecture diagram, the core idea based on the above described for constructing the System Network Architecture, as shown in Fig. 2, the system can wrap It includes but is not limited to following functions module:
Multiple communication request module SW are (as SW1, SW2 and SW3 in Fig. 2 have communication requirement under operation Software function module), multiple network management module NM (NM1 and NM2 in such as Fig. 2), with multiple network management module NM mono- One be correspondingly connected with multiple CAN drive modules (CAN1 and CAN2 in such as Fig. 2), message management module Com, and connect respectively The communication management module ComM of multiple communication request module SW (SW1, SW2, SW3 in such as Fig. 2), message management module Com is met, It is separately connected the network management integration module NmIn of communication management module ComM and multiple network management module NM.From system structure From the point of view of, relative to the network architecture shown in figure 1 above, the present embodiment will be multiple communication request modules by communication management module ComM SW provides unified telecommunication management interface, as shown in Fig. 2, multiple communication request module SW are by original network structure, directly with The connection of network management module NM, message management module Com or CAN drive module, be changed to only with the communication management module ComM connection, then other modules are connected by communication management module ComM, it is then by network pipe for network management module NM Reason integration module NmIn is connect with communication management module ComM, and the CAN drive module that connects one to one, so that network management Module NM, CAN drive module and message management module Com are no longer directly controlled by communication request module SW, and message pipe Reason module Com is also no longer directly controlled by each network management module NM, communication request module SW.
As it can be seen that the communication control system for the network structure as shown in Figure 2 that the present embodiment proposes, greatly reduces each communication Request module SW, network management module NM, the correlation degree between message management module Com and CAN drive module, that is, reduce Coupling between communication request module SW, improves code portability.
The network architecture of communication control system provided in this embodiment based on the above described, will be by communication management module ComM is according to the request content of the communication request of the multiple communication request objects currently listened to, such as communication channel of request communication And communicating requirement etc. is opened or closed to the communication channel, according to object priority weighing mechanism, decide whether to request network It manages integration module NmIn and responds communication request, be specifically in response to the communication request of which communication request object, response communication is asked Asking may include opening or closing the corresponding network communicating function of network management module NM, enable/forbidden energy message management module Com Whether send/receive message.
It, will be according to as it can be seen that the present embodiment is listening to there is currently in the case where the communication request of multiple communication request objects According to the processing priority of each communication request object, determines and the response for responding corresponding multiple communication requests is handled, rather than press According to the generation sequence of each communication request, communication request is successively responded, ECU work at present requirement is met, avoids different communication Request the communicating requirement to same communication channel on the contrary, causing to use collision problem to the communication channel.
Such as, SW1 module is power management software, and when preset high-pressure forbids communicating;SW2 module is that ignition switch acquisition is soft Part enables communication when default ignition switch is in effective status.According to the network architecture shown in FIG. 1, if high pressure first occurs for ECU Failure, then ignition switch is in effective status, and system can enable to communicate, forbid communicating when this is with preset high pressure and violate;If ECU ignition switch is first in effective status, then occurs high voltage fault, and system can control communication in disabled state, this with it is pre- If ignition switch when being in effective status enabled communication disagree.
System is built according to the network architecture as shown in Figure 2 at this time, the same time listens to power management software module High voltage fault occurs, ignition switch is in effective status, and the present invention will be according to the two communication request object priority height, first The communication request of the higher communication request object of processing priority, if the preferential of this communication request object of high voltage fault occurs Grade is higher, even if there is the communication request to same communication channel before this, also can first respond this communication request object Communication request forbids communicating, the communication function in communication close channel, and transmission/reception of forbidden energy message, solves above-mentioned existing The technical issues of with the presence of communication control scheme.
The network architecture of the communication control system in conjunction with shown in figure 2 above, it is real that the invention proposes a kind of communication control methods Apply the flow diagram of example, this method can be applied to the equipment such as Vehicle Controller, as shown in figure 3, this method may include but It is not limited to following steps:
Step S11 listens to the communication request of communication request object;
In the present embodiment, can will control communication channel open or close, enabled/forbidden energy message send/it is received Object can cause communication interface state to change, or the object that triggering communication channel opens or closes, and be denoted as communication request Object.The communication request of communication request object can refer to that request opens or closes the communication function requirement of communication channel, and make Energy/forbidden energy message transmission/reception, this can be determined according to the communication feature for being directed to each communication request object existing for ECU in advance, The present embodiment to the communication request content of each communication request object without limitation.
Referring to Automobile Network System framework shown in Fig. 4, entire Automobile Network System is segmented into several networks, if this A dry network can connect into vehicle network by gateway Gateway, as shown in figure 4, whole network can by CAN interface or LIN (Local Interconnect Network, local interconnect network) interface, realizes the communication between each sub-network, these Sub-network may include the Powertrain (power drive system) connected by different CAN interfaces, Diagnostics (diagnosis System), Comfort (comfort mode, i.e. running car mode) and Infotainment (vehicle multimedia system) etc., this four The functional module that sub-network specifically includes is as follows, but is not limited to functional module enumerated herein:
It may include ESP (ElectronicStabilityProgram, electronic stability control system in Powertrain system System), TCU (Transmission Control Unit, automatic gear-box control unit), EMS (Engine Manegement System, engine management system) and AFS (Adaptive Frontlighting System, adaptive lighting system), and The AFS control system can connect Lamp Motor (lampshade motor) by LIN interface;Diagnostics system may include Diag Tool (system diagnostic tools);Comfort system may include BCM (body control module, car body control module), The BCM can also include the Rain Sensor (precipitation rain fall sensor) connected by LIN interface;Infotainment system can be with Including NAV (Navigation, navigation).
In conjunction with auto communication control field common sense, each network as shown in Figure 4 can include several I/O equipment, lead to Believe interface (such as above-mentioned CAN interface or LIN interface), the control opened or closed for communication interface depends not only on I/O and sets Standby state might also depend on the network state of each network, and therefore, the communication request object that the present embodiment listens to can wrap The various events with communication requirement are included, the condition with communication requirement is also possible to.
The communication request object of the Automobile Network System as shown in figure 4 above, the present embodiment can be unlatching ignition switch (an I/O equipment i.e. in power drive system) event, the condition determined by network state, such as certain network in CAN bus Node sends network management message etc..
Optionally, communication request object can determine that the requirement description file can be with based on the requirement description file of client Description comprising opening or closing condition or event to communication channel, therefore, the present embodiment can will be in the requirement description file Description, there are the condition of communication requirement and event to be denoted as communication request object, and extract these communication request objects, supervises accordingly Listen whether telecommunication management interface receives the communication request for these communication request objects.
It can be before project starts it is to be appreciated that the demand describes file, client controls automobile according to itself Demand determine, the present embodiment to it includes particular content be not construed as limiting, for different types of client, determine The content of requirement description file may be different, the content of thus obtained communication request object may also difference, the present invention This is not described further.
And above-mentioned telecommunication management interface can be the data of the communication management module ComM in the network architecture shown in Fig. 2 Interface, the present embodiment to the type of the telecommunication management interface and to its monitor method without limitation.
Step S12 parses each communication request listened to, obtains the object ID of respective communication request object;
The present embodiment can predefine each communication request object present in network system with communication requirement, be every One unique object ID of communication request object distribution, the number such as since 0, i.e., 0,1,2 ... etc..In this way, in the present embodiment, Respective object ID request communication management module ComM can be used in each communication request object, by monitoring the communication management module The communication request of the telecommunication management interface of ComM, each communication request object listened to can carry object ID, parse the communication Request, the object ID of the available each communication request object listened to.
Step S13, from the information configuration table prestored, it is right correspondingly with the object ID of each communication request object to obtain As type and communication attributes;
It, can be based on the specific communicating requirement of communication request object, to multiple communication requests pair in ECU in the present embodiment As classifying, obtain multiple object types, can be denoted as respectively Lock (locking) object (or being denoted as the first object), Local (local) object (the second object can also be denoted as), Remote (long-range) object (or being denoted as third object) and Disable (disability) object (the 4th object can also be denoted as).
Wherein, the communicating requirement of Lock object, which can be, closes certain communication channel;The communicating requirement of Local object can be The local communication of some communication channel is opened, i.e., carries out local communication using certain communication channel;The communicating requirement of Remote object It can be the telecommunications functions for opening some communication channel, i.e., carried out telecommunication using some communication channel;Disable pairs The communicating requirement of elephant can be the message transmission/reception for closing some communication channel, that is, forbid certain communication channel transmitting message number According to.
As it can be seen that the communicating requirement of different types of communication request object is often different, in the present embodiment practical application, The object type that can first determine the communication request object listened to is rung according still further to the communicating requirement of the preset object type Should communication request object communication request.
It may include channel attributes and message attribute for the communication attributes for the communication request object that the present embodiment proposes. Wherein, the channel attributes of communication request object can characterize which communication channel of the communication request object control, and message attribute can Message/network management message is applied to characterize communication channel reception/transmission.
Under normal conditions, communication channel (i.e. network channel) quantity of ECU is greater than 1, controls each communication channel for convenience, Can for each communication channel distribute a unique logic channel number, such as 0,1,2,3 ..., due to ECU communication channel quantity often No more than 32, therefore, the present embodiment can indicate channel attributes with one 32 hexadecimal integers, by be converted into two Each bit value in system number indicates whether communication request object allows to control unlatching/closing of corresponding communication channel, such as Numerical value 1 on certain can indicate that communication request object has the control of corresponding communication channel.
Such as, the channel attributes of communication request object are 0x000C, and after being converted into binary number due to it, each indicates one A communication channel, 0 expression logical communication channel 0 of ascending the throne, position 1 indicate logical communication channel 1, and position 2 indicates logical communication channel 2, Position 3 indicates logical communication channel 3 ... ... etc., can learn that position 2 and position 3 are set to 1 by the binary number of the channel attributes, so It says, the communication request of communication request object affects the communication of logical communication channel 2 and logical communication channel 3, realizes to communication The method of the communication control in channel is without limitation.
Optionally, it for the message attribute of communication request object, can be indicated with one 8 hexadecimal integers, position 0 (i.e. least significant bit) indicates to apply the transmission of message, and position 1 indicates to apply the reception of message, and position 2 indicates network management message It sends, position 3 indicates the reception of network management message.
For example, if the message attribute of communication request object is 0x05 (corresponding binary number be 0101), Bit0 and Bit2 set 1 indicate the communication request object initiate communication request when, forbid answering for which channel specified by its channel attributes With the transmission of message and network management message.
In conjunction with the analysis above to channel attributes and message attribute, above-mentioned communication attributes can be used to refer to communication request pair Any type sent/receive as which or the multiple communication channels unlatching/closing that can be controlled, and using the communication channel Message multiple numbers, the meaning is specifically indicated by numerical value on different positions, be specifically referred to above to channel attributes and The analysis of message attribute, the meaning that the present embodiment no longer indicates the numerical value on each position in the communication attributes are illustrated.
In the present embodiment practical application, multiple communication request objects with communication requirement that may be present for ECU, The object type and communication attributes of each communication request object can be predefined, and sets object ID for it, is stored to information In allocation list, therefore, in the communication request for listening to communication request object, and the object ID of each communication request object is determined Afterwards, can be searched directly from information configuration table with the object type and communication attributes of one an object of object ID, as currently The object type and communication attributes of the respective communication request object listened to.
As it can be seen that information configuration table may include the communication request object of different object types, communication control specifically how is realized System includes how opening or closing for each communication channel of control ECU, and how to realize transmission/reception of message.The present embodiment It without limitation to the generation method of the information configuration table, specifically can be using the generation side of the hereafter description of corresponding embodiment Method.
Step S14 weighs machine according to object priority based on the object type and communication attributes of each communication request object System, responds the communication request of each communication request object.
In the present embodiment practical application, if listening to current time there are the communication request of multiple communication request objects, And the communication attributes of each communication request object by obtaining, determine the communication request that there is communication requirement to same communication channel The quantity of object be it is multiple, the present embodiment, can be according to different right after the object type for obtaining this multiple communication request object As the communication attributes of the communication request object of type, the excellent of the communication request for handling the communication request object of each object type is determined First grade, i.e. generation object priority weighing mechanism, the present embodiment does not limit for specific generation method.
Optionally, there is the preferential of multiple communication request objects of communication requirement to same communication channel in the present embodiment Grade, can be set according to communication request object type, as the sequence of priority from high to low successively may is that Lock object, Local object, Remote object, Disable object.Therefore, when there are the communication request objects of multiple object types by ECU, and It, can be according to setting in the case that current time has communication requirement to the same communication channel there are multiple communication request objects Each object type communication request object processing priority, to the communication requests of the multiple communication request objects listened into Row processing.
Wherein, current time has multiple communication request objects of communication requirement to the same communication channel, can be simultaneously Communication request is initiated, communication request can also be initiated in different moments, but because the communication request of initiation does not discharge, so that currently There are multiple communication requests for the communication channel in the moment, in order to avoid the use conflict to the communication channel, the present embodiment Multiple communication requests existing for current time will be handled according to object priority weighing mechanism.It is to be appreciated that in the object priority It is as follows to the processing requirement of the communication request of the communication request object of different object types in grade weighing mechanism:
For Lock object, usually communication management module ComM is requested to close some or multiple communication channels, when to this The communication request object for having the object type that communication channel has control to require, regardless of the communication request object of other object types There is He Yaoqiu to the communication channel, communication management module ComM can request closing to network management integration module NmIn, and this is logical Believe the communication function in channel.When there is no Lock object, communication tubes for the communication request object for having control to require the communication channel Reason module ComM can the communication request of communication request object to other object types handle.
For Local object, the local communication for opening some or multiple communication channels is usually required that.Due to its priority It is only below Lock object, in the communication request object for thering is control to require the communication channel, as long as Lock object is not present, so that it may To execute the communicating requirement of the Local object, i.e., in the case where not hearing Lock object, determination has control to the communication channel The communication request object that system requires includes Local object, and communication management module ComM can be to network management integration module The local communication function of the communication channel is opened in NmIn request;If it is determined that the communication request pair for thering is control to require the communication channel As comprising Lock object and Local object, communication management module ComM can not respond the communication request pair of other object types The communication request of elephant.
For Remote object, the telecommunications functions for opening some or multiple communication channels are usually required that, due to this The processing priority of object type is lower than Lock object and Local object, when the communication request for having control to require communication channel Lock object and Local object is not present in object, and there are at least one Remote object, communication management module ComM is ok The telecommunications functions of the unlatching communication channel are requested to network management integration module NmIn.Wherein, when Remote object is full The condition of sufficient telecommunications functions, it may not be necessary to which the request of communication management module ComM, the inside network management module NM are automatic It closes, realizes the telecommunication of communication channel.
For Disable object, usually require that closing some or multiple communication channels send/receive message.Specifically exist In the case that the local/remote communication function of communication channel is opened, i.e., after execution Local/Remote object, to the communication channel The communication request object for having control to require includes at least one Disable object, and communication management module ComM manages mould to message Transmission/reception of the communication channel to message is closed in block Com request;When the communication request pair for thering is control to require the communication channel As there is no after Disable object, communication management module ComM can just request to open the communication channel to message management module Com Transmission/reception to message.
It can be seen that only do not hear the communication request of Lock object, can just respond the communication request of Local object with And the release to Local object, wherein the communication request for not hearing Lock object illustrates currently to have discharged the Lock object Communication request.And the communication request of Remote object does not need to discharge, and is determined by automotive networking administrative mechanism.
Processing priority analysis based on the communication request object above to each object type, the present embodiment are currently supervised After the object type for hearing multiple communication request objects, it can determine how communication management module ComM responds to multiple logical The communication request of letter request object, i.e., according to the processing priority of the communication request object of each object type from high to low suitable Sequence, the communication request of response respective communication request object.
Optionally, for the information configuration table in foregoing embodiments, communication request object can be generated in the following way Information configuration table, but be not limited to the present embodiment description this generating mode, as shown in figure 5, this method may include:
Step S21 obtains each communication request object under operating status with communication requirement;
Such as above-mentioned analysis, the object that the present embodiment can will cause communication channel to open or close is denoted as communication request Object specifically can be event caused by I/O equipment in Vehicle Control Network system, such as open ignition switch, or by network The condition that state determines, such as certain network node send network management message.
Optionally, the present embodiment can be analyzed by the requirement description file to client, be obtained existing for current ECU All communication request objects with communication requirement, concrete methods of realizing is without limitation.Under normal conditions, acquisition has communication The quantity of the communication request object of demand is multiple.
Step S22 distributes one-to-one object ID for each communication request object;
In practical applications, a communication request object can control multiple communication channels, and many communication requests simultaneously It is independent from each other between object, will appear some time interior one communication channel of multiple communication request object controls, just for area Divide each communication request object, the present embodiment can distribute unique object ID for each communication request object.
It is to be appreciated that the present embodiment to the content of above-mentioned object ID without limitation, can be continuously numbered for or character etc. Deng being illustrated so that object ID is number since 0 as an example herein, i.e., 0,1,2 ... are sequentially allocated to multiple communications of acquisition Request object.
Step S23, according to the communication feature of each communication request object, determine the communication request object object type and Communication attributes;
In the present embodiment, the communication feature of each communication request object can be predefined, specifically can be according to current scene Lower real work demand determines, such as power supply high pressure or low voltage failure, it is desirable that communication close;Bus error failure, it is desirable that forbid reporting Text sends and executes fault recovery;Ignition switch is opened, it is desirable that opens local communication etc., the present embodiment no longer arranges one by one herein It lifts.
Wherein, above-mentioned high voltage fault, bus error failure, ignition switch unlatching may be considered event or condition, as above Text analysis, is also possible to a certain state of communication request object.Therefore, the present embodiment can according to actual needs, in advance really Specific communicating requirement under fixed each communication request object different conditions, and it is denoted as the communication feature of the communication request object.
As it can be seen that the communication feature of each communication request object can be preset in ECU, the present embodiment is to each communication request pair The determination method of the communication feature of elephant and it includes content without limitation, it is not limited to content exemplified above.
In addition, what the present embodiment can be described based on foregoing embodiments corresponding portion, all kinds of communication request objects leads to Letter require and preset communication feature, determine obtain multiple communication request objects what type object belonged to, specifically can will The communication feature of the multiple communication request objects obtained, is compared with the communicating requirement of preset all types of object, obtains The object type of each communication request object.
It is to be appreciated that each communication request object can only belong to an object type, and same target type is each logical The communication request content of letter request object is identical, and the priority in preset object priority weighing mechanism is also identical.
Step S24 is raw using the determining respective object ID of multiple communication request objects, object type and communication attributes At information configuration table.
As it can be seen that the information configuration table that the present embodiment generates can indicate that different object IDs are corresponding, respective communication request pair The object type and communication attributes of elephant can inquire the object of present communications request object in practical applications based on object ID Type and communication attributes, to realize communication control.
It is to be appreciated that the present embodiment to the data storage format of information configuration table without limitation, i.e., for indicating above-mentioned right As the corresponding relationship between ID, object type and communication attributes mode without limitation, can be form, be also possible to pair Answer relational graph form etc..The present embodiment is only described by taking a tabular form as an example herein, information configuration table as shown in Table 1:
Table 1: information configuration table
Object ID Object type Communication attributes 1 (channel attributes) Communication attributes 2 (message attribute)
0 Lock object 0x000C 0x05
1 Local object 0x000A 0x03
2 Remote object …… ……
…… …… …… ……
n Disable object 0x0009 0x06
To sum up, the present embodiment can generate information configuration table as shown in Table 1, and deposit to it in the manner described above Storage, in this way, the communication control method as described in the corresponding embodiment of figure 3 above listens to multiple communications and ask in practical applications After the communication request for seeking object, can based on determining object ID, searched from the information configuration table corresponding object type and Communication attributes determine the communication channel of each communication request object requests communication, if the communication request for same communication channel has It is multiple, this multiple communication request will be handled according to above-mentioned object priority weighing mechanism.
It as an alternate embodiment of the present invention, is referred to mode shown in fig. 6 and realizes above-mentioned steps S14, such as Fig. 6 institute Show, can specifically include but be not limited to following steps:
Step S31 determines the requested communication channel of communication request object;
Such as above-mentioned analysis, the communication channel in ECU has multiple, and different communication requests object can be according to respective communication special Point, for corresponding communication channel initiate communication request, and each communication request object initiate communication request can be it is independent, because This may receive the communication request of multiple communication request objects for each communication channel whithin a period of time, For this communication channel, the present embodiment can be handled according to preset object priority weighing mechanism, specific processing side The rapid description content of formula following steps, however, it is not limited to this.
Step S32 detects whether that there are the communication requests of Lock object, if so, entering step S33;If not, executing Step S34;
In conjunction with the description content above for object priority weighing mechanism, the present embodiment is according to all types of communication requests The sequence of the processing priority of object from high to low, communication of the response for multiple communication request objects of the same communication channel Request.Therefore, the present embodiment can first detect whether have Lock object in the communication request object for the communication channel, i.e., The highest object type of processing priority such as exists, by the communication request of priority processing Lock object;It if it does not exist, will be according to The sequence of processing priority from high to low, is successively detected.
Specifically, as above-described embodiment analysis, the present invention can by query information allocation list, obtain listen to it is each The object type of communication request object, later, directly at least one object type corresponding to different communication channel of acquisition It is detected, to determine the communication request object that whether there is this object type of Lock object for each communication channel.
Step S33, the communication attributes according to Lock object handle the communication channel;
In the present embodiment, which is the above-described process content to Lock object, that is, closes the communication Channel, specifically according to the communication attributes content of preset Lock object, to close the communication channel, i.e., according to the Lock object Communication attributes content inputs corresponding high/low signal to each communication channel, to close the communication channel.
Optionally, in the present embodiment practical application, determine that the communication request for the communication channel includes Lock object Communication request, i.e., to the communication channel have communication requirement communication request object include Lock object, as shown in Figure 7a, this Embodiment can first detect whether the last communication request object for the communication channel includes Lock object, if comprising, The so last communication request for necessarily having responded to the Lock object, that is, be turned off the communication channel, do not need at this time again Secondary closing can directly terminate process;Conversely, executing step S33 again, that is, close the communication channel.It specifically can be by communication tube It manages module ComM and is based on the testing result, request network management integration module NmIn closes the communication channel.
It can be seen that determining to include Lock pairs in the communication request object for the communication channel in above-mentioned steps S32 As rear, as shown in Figure 7a, the present embodiment can first detect the last communication request object for the communication channel whether include Lock object, if so, terminating this process flow;If not, the communication is closed in request according to the communication attributes of Lock object Channel.
Step S34 detects whether that there are the communication requests of Local object, if so, entering step S35;If not, holding Row step S36;
Determine that the communication channel there is no in the case where Lock object, further detects at least one obtained communication request Whether the object type of object is Local type, if so, system asks the communication that first response belongs to the Local object type Seek the communication request of object;Conversely, in the presence of further detecting whether a priority object type communication request object.
Step S35, the communication attributes according to Local object handle the communication channel;
Similar with the processing of above-mentioned steps S33, the present embodiment is determining that there are Local objects (Lock object is not present In the case where), by according to the communication attributes of the Local object prestored, belong at least one communication request pair of the object type The communication request of elephant is handled, specifically, input meets the control signal of the communication attributes, will open the sheet of the communication channel Ground communication function.
Optionally, the trigger condition and executive mode of step S35, trigger condition and the side of execution with above step S33 Formula is similar, is specifically referred to flow diagram shown in Fig. 7 b, determines the communication request for the communication channel by step S34 Lock object is not present in object, but there are Local object, and the present embodiment can detecte the last communication for being directed to the communication channel Request whether object includes Local object, if so, it is considered that the local communication function of the current communication channel has been opened It opens, can directly terminate the process, if not, can request to open the communication channel according to the communication attributes of Local object Local communication mode.
Step S36 detects whether that there are the communication requests of Remote object, if so, entering step S37;If not, holding Row step S38;
The present embodiment is determining that currently there is no Lock object and Local pairs for the communication request object of the communication channel As in the case where, system can just control the communication request of the communication request object of communication channel response Remote type;Conversely, The present embodiment will be handled according to above-described object priority authority mechanism.
Step S37, the communication attributes according to Remote object handle the communication channel;
Referring to the description to step S33 and step S35 above, the present embodiment determines the communication request for being directed to the communication channel Lock object and Local object is not present in object, but there are Remote object, the communication request for executing the Remote object it Before, as shown in Figure 7 c, can first detect the last communication request object for the communication channel whether there is Remote object, If it does, process can be terminated, if it does not, the communication is opened in request according still further to the communication attributes of the Remote object The remote communication mode in channel.
Step S38 is inquired in the last communication request object for the communication channel listened to the presence or absence of Local Object, if it does not, terminating process, if it does, entering step S39.
The communication channel local communication mode is closed in step S39, request.
Wherein, step S39 is identical as the realization of above-mentioned steps S35, is referred to retouching for above-mentioned steps S35 corresponding portion It states.
In the present embodiment practical application, determine this for there is no Lock in the communication request object of the communication channel Object, Local object and Remote object, can be by inquiring the last communication request for the communication channel listened to The object type of object, response are directed at least one communication request of the communication channel, and the specific last time listens to logical for this Believe the Local object in channel, the present embodiment can request to close the local communication mode of the communication channel, so as to Lock The release of object and Local object, concrete methods of realizing is without limitation.
Wherein, it is to be appreciated that in various embodiments of the present invention, if for not wrapped in the communication request object of certain communication channel Containing a certain object type, illustrate that the communication request object of the object type is discharged for the communication channel.But for For Remote object, it is that the automotive networking administrative mechanism used by network management module NM determines, does not need to discharge, it can To be closed by corresponding network management module NM, the present embodiment does not limit for concrete methods of realizing.
In conclusion the communication management module ComM in communication control system communicates it in the present embodiment practical application Management interface is monitored, and currently listens to the communication request of multiple communication request objects, and there are two the above communication requests Object is a communication channel, and the present embodiment can detecte the object type of the communication request object of this multiple communication request, and According to the sequence of object priority from high to low, determine which communication request responded, rather than according to listen to this is multiple logical The monitoring sequence for believing request, meets real work demand.
It can be seen that network management module NM and the CAN drive module in communication control system provided by the invention, it can Object priority weighing mechanism is executed, enough to meet different operating communication requirement.Solve existing automobile industry, network management mould Although block NM follows the CanNm of AUTOSAR specification, or permit the OsekNm of OSEK specification, but it all cannot with CAN drive module Telecommunication management interface is provided, priority weighing mechanism will not be realized, lead to not the problem of meeting real work communication requirement.
And realized since the communication control method of the present embodiment is based on the network architecture shown in figure 2 above, reduce each communication Correlation degree between request module SW, in this way, the demand as multiple network management module NM in communication control system occurs Variation, since each communication request module SW will not call directly the interface of network management module NM, would not also lead to each communication The change of request module SW.
Such as, Osek network management mechanism is used for network management module NM, the A project of communication control system, B project makes With Autosar network management mechanism, C project uses customized network management mechanism, i.e., in disparity items, the network management The network management mechanism that module NM is used can be different, but the as above network architecture shown in Fig. 2, and each network management module NM is by net Network manages integration module NmIn management, and realizes the connection with each communication request module SW by communication management module ComM, respectively Network management module NM is no longer directly connect with communication request module SW, even if in this way, communication control system execute disparity items, Change communication request module SW is not needed, that is to say, that each communication request module SW is suitable for using heterogeneous networks supervisor yet Multiple projects of system, improve code portability, reduce workload.
Further, on the basis of above-described embodiment, the present invention can respond Disable pairs according to method as shown in Figure 8 The communication request of elephant, specifically, since the communication request of the Disable object is that request opens or closes communication channel to message Reception/transmission, i.e. communication management module ComM to message management module Com request, open or close the communication channel message Transmission/reception, the network architecture shown in Fig. 2 as above, this is different from the control route of network management module NM, so, this reality Example is applied in the object type and communication attributes for determining each communication request object listened to, and determination listens to communication request object After the communication channel for requesting communication, as shown in figure 8, can also include but is not limited to following methods step:
Step S41, whether the detection requested communication channel of communication request object is in the open state, if so, into Step S42, if not, terminating process;
In the present embodiment practical application, can detecte for the communication channel communication request object whether include Local object or Remote object, that is, detect whether the current communication channel is in local communication mode or remote communication mode, If so, illustrating that the communication channel is in the open state, can further execute following detection step, conversely, be not carried out with Lower detecting step.
It is to be appreciated that the present embodiment step S41 can determine that communication request object is requested in above-mentioned alternative embodiment Communication channel after execute, it is not limited to which detecting step of above-mentioned alternative embodiment, that is to say, that detecting whether exist While other object types, detection content provided in this embodiment, the present embodiment and above-mentioned alternative embodiment can also be performed The embodiment obtained after combination, the present invention are no longer described in detail one by one herein.
Step S42, whether it includes Disable object that detection is directed in the communication request object of the communication channel, if so, Enter step S43;If not, executing step S45;
Such as analysis above, for the communication request object listened to, the present embodiment will be based on object ID, learn each communication The object type of object is requested, and in the case where listening to multiple communication request objects, it is identical often to there is object type Communication request object, it is identical for the priority of the communication request object of same target type, and the content phase of communication request Together, therefore, it when responding the communication request of communication request object of certain object type, is often in response to belong to the object type All communication request objects.
In addition, one-to-one label can be arranged in the present embodiment for different object types, such as number or title are (as above Lock, Local, Remote, Disable of text) etc., therefore, at least one communication request pair that can be arrived by Anti-Sniffer The object type of elephant, to determine whether the communication request object comprising this object type of Disable, the present invention is to step S43 Specific detection mode without limitation.
Step S43, whether it includes Disable object that the detection last time is directed in the communication request object of the communication channel, If so, terminating process;If not, executing step S44;
When the present invention is to communication close channel or its certain communication function, it can first detect whether the communication channel has closed It closes, can specifically determine the last time according to detection mode provided in this embodiment, if once to detect for the communication channel Disable object can directly terminate process if so, illustrating that the communication channel or its certain communication function have been switched off, if No, this executes the communication request of the Disable object again.
Step S44, according to the communication attributes of the Disable object, the transmission-receiving function of the communication channel message is closed in request;
Step S45, whether it includes Disable object that the detection last time is directed in the communication request object of the communication channel, If not, terminating process;If so, executing step S46;
Wherein, step S45 is similar with the realization process of above-mentioned steps S43, and this embodiment is not repeated.
Step S46, according to the communication attributes of the Disable object, the transmission-receiving function of the communication channel message is opened in request.
In conclusion needing the channel to be in what local/remote communication was opened the communication request of Disable object In the case of can just respond, in conjunction with alternative embodiment above describe other communication requests to the communication channel processing mode, Meet real work demand.
It should be noted that the present invention is not construed as limiting the object type division mode of communication request object each in ECU, i.e., simultaneously It is not limited to object type and its division mode provided in this embodiment, and is directed to the communication request object of different object types, It can preset according to actual needs, so as in the communication request object for actually listening to the type, and respond its communication and ask When asking, preset communication attributes can be called directly and handled.
Communication attributes content about the pre-set each object type of the present invention, it is not limited to various embodiments of the present invention The content of description, technical staff according to the core idea that inventor proposes, can be adaptively adjusted according to actual needs, This is no longer described in detail in the present invention one by one.
As shown in figure 9, being a kind of structural schematic diagram of communication control unit provided in an embodiment of the present invention, which can be with Applied to Vehicle Controller, it can specifically include but be not limited to flowering structure:
Module 91 is monitored, for listening to the communication request of communication request object;
Parsing module 92 obtains the object ID of respective communication request object for parsing communication request;
Obtain module 93, for from the information configuration table prestored, the one-to-one object of the object ID for obtaining and obtaining Type and communication attributes;
Respond module 94 executes object priority for object type and communication attributes based on the communication request object Weighing mechanism responds the communication request of the communication request object.
Optionally, as shown in Figure 10, which may include:
Communication channel determination unit 941, for determining the requested communication channel of communication request object;
First detection unit 942 is directed to whether the communication request object of the communication channel includes the first object for detecting;
First processing units 943, for be in the testing result of first detection unit 942 it is yes, according to prestore first pair The communication attributes of elephant handle the communication channel;
In the present embodiment practical application, first processing units 943 specifically can be used for according to the first object prestored The communication channel is closed in communication attributes, request.
Optionally, device provided in this embodiment can also include:
First query unit, for inquire it is last listen to for the communication channel communication request object whether include First object, when query result be it is no, trigger the first processing units 943 execute above-mentioned steps.
Second detection unit 944, for be in the testing result of first detection unit 942 it is no, detection is logical for the communication Whether the communication request object in road includes the second object;
The second processing unit 945, for be in the testing result of second detection unit 944 it is yes, according to prestore second pair The communication attributes of elephant handle the communication channel;
Similarly, which specifically can be used for the communication attributes according to the second object prestored, and request is opened Open the local communication mode of the communication channel;
Optionally, on the basis of the above embodiments, which can also include:
Second query unit, for inquire it is last listen to for the communication channel communication request object whether include Second object, when query result be it is no, trigger the second processing unit 945 execute above-mentioned steps.
Third detection unit 946, for be in the testing result of second detection unit 944 it is no, detection is logical for the communication Whether the communication request object in road includes third object;
Third processing unit 947, for being third pair yes, that foundation prestores in the testing result of third detection unit 946 The communication attributes of elephant handle the communication channel;
Similarly, which specifically can be used for the communication attributes according to the third object prestored, and request is opened Open the remote communication mode of the communication channel;
Optionally, on the basis of the above embodiments, which can also include:
Third query unit, for inquire it is last listen to for the communication channel communication request object whether include Third object, when query result be it is no, trigger the third processing unit 947 execute above-mentioned steps.
First query processing unit 948, for being no, the last prison of inquiry in the testing result of third detection unit 946 It hears that the communication request object for the communication channel includes the second object, the communication channel is requested to close local communication mode.
It should be noted that first object of the present embodiment, the second object and third object are the logical of different object types Letter request object, specifically, the first object can be the Lock object in above method embodiment, the second object be can be Local object, third object can be Remote object, and Disable object is denoted as the 4th object.
As another alternative embodiment, as shown in figure 11, on the basis of the above embodiments, respond module 94 can also be wrapped It includes:
4th detection unit 949, it is whether in the open state for detecting the requested communication channel of communication request object;
5th detection unit 9410, for be in the testing result of the 4th detection unit 949 it is yes, detection is logical for the communication Whether the communication request object in road includes the 4th object;
Wherein, the 4th object is the communication request for being different from the object type of the first object, the second object and third object Object;
Second query processing unit 9411 is yes for the testing result in the 5th detection unit 9410, and inquires The communication request object once listened to for the communication channel does not include the 4th object, the communication according to the 4th object prestored The transmission-receiving function of the communication channel message is closed in attribute, request;
Third query processing unit 9412 is no for the testing result in the 5th detection unit 9410, and inquires The communication request object once listened to for the communication channel includes the 4th object, the communication category according to the 4th object prestored Property, the transmission-receiving function of the communication channel message is opened in request.
In conclusion the present embodiment is in the case where listening to the communication request of multiple communication request objects, it can first really Current time is determined for the object type of multiple communication request objects of same communication channel, according still further to preset object priority Weighing mechanism, according to the priority processing sequence and processing method of the communication request object of each object type, response is for each logical The communication request for believing channel, meets real work demand.
As the another alternative embodiment of the present invention, as shown in figure 12, on the basis of the above embodiments, which can be with Include:
Communication request object acquisition module 95, for obtaining each communication request pair under operating status with communication requirement As;
Object ID distribution module 96, for distributing one-to-one object ID for each communication request object;
Determining module 97 determines that respective communication requests object for the communication feature according to each communication request object Object type and communication attributes;
Generation module 98, it is raw for object ID, object type and the communication attributes using each communication request object obtained At information configuration table.
The generating process of the present embodiment information configuration table is referred to the description of above method embodiment corresponding portion.
As it can be seen that the present embodiment can use above-mentioned functional module, the pre-generated communication that can show that different object types Can directly the information be matched after actually listening to communication request object by requesting the information configuration table of the processing method of object It sets table to be inquired, determines the object type and its processing method of each communication request object, thus according to the excellent of each object type First grade processing sequence realizes the control to communication channel, meets work at present demand.
The embodiment of the invention also provides a kind of storage mediums, are stored thereon with program, when which is executed by processor Realize such as above-mentioned communication control method.
Optionally, which can be memory, such as the non-volatile memory in computer-readable medium, at random The access forms such as memory (RAM) and/or Nonvolatile memory are deposited such as read-only memory (ROM) or flash memory (flash RAM) Reservoir includes at least one storage chip.
The embodiment of the invention also provides a kind of processor, which can be with for running program, when which runs Execute above-mentioned communication control method, the realization step of the communication control method can embodiment according to the method described above description.
In practical applications, which can be Vehicle Controller etc., and the present embodiment is to structure and its place Product form is without limitation.
Finally, it should be noted that about in the various embodiments described above, such as first, second or the like relational terms are only Only it is used to distinguish an operation or unit with another operation or unit, without necessarily requiring or implying these units Or there are any actual relationship or orders between operation.
Each embodiment in this specification is described in a progressive manner, the highlights of each of the examples are with other The difference of embodiment, the same or similar parts in each embodiment may refer to each other.For device disclosed in embodiment, For storage medium, since it is corresponding with method disclosed in embodiment, so being described relatively simple, related place is referring to method Part illustrates.
The foregoing description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, as defined herein General Principle can be realized in other embodiments without departing from the spirit or scope of the present invention.Therefore, of the invention It is not intended to be limited to the embodiments shown herein, and is to fit to and the principles and novel features disclosed herein phase one The widest scope of cause.

Claims (10)

1. a kind of communication control method, which is characterized in that the described method includes:
Listen to the communication request of communication request object;
The communication request is parsed, the object ID of respective communication request object is obtained;
From the information configuration table prestored, the one-to-one object type of the object ID for obtaining and obtaining and communication attributes;
Based on the object type and communication attributes of the communication request object, according to object priority weighing mechanism, described in response The communication request of communication request object.
2. the method according to claim 1, wherein the object type based on the communication request object and Communication attributes respond the communication request of the communication request object according to object priority weighing mechanism, comprising:
Determine the requested communication channel of communication request object;
Whether detection includes the first object for the communication request object of the communication channel;
If comprising first object, according to the communication attributes of first object prestored, at the communication channel Reason;
If not including first object, whether detection includes the second object for the communication request object of the communication channel;
If comprising second object, according to the communication attributes of second object prestored, at the communication channel Reason;
If not including second object, whether detection includes third object for the communication request object of the communication channel;
If comprising the third object, according to the communication attributes of the third object prestored, at the communication channel Reason;
If not including the third object, and inquire the last communication request object packet listened to for the communication channel Containing second object, the communication channel is requested to close local communication mode;
Wherein, first object, second object and the third object are the communication request objects of different object types.
3. according to the method described in claim 2, it is characterized in that, the object type based on the communication request object and Communication attributes respond the communication request of the communication request object according to object priority weighing mechanism, further includes:
Whether in the open state detect the requested communication channel of communication request object;
If in the open state, whether detection includes the 4th object for the communication request object of the communication channel, described the Four objects are the communication requests pair for being different from the object type of first object, second object and the third object As;
If comprising the 4th object, and inquiring the last communication request object listened to for the communication channel and not wrapping Containing the 4th object, according to the communication attributes of the 4th object prestored, the transmitting-receiving of the communication channel message is closed in request Function;
If not including the 4th object, and inquire the last communication request object packet listened to for the communication channel Containing the 4th object, according to the communication attributes of the 4th object prestored, the transmitting-receiving of the communication channel message is opened in request Function.
4. according to the method described in claim 2, it is characterized in that, the communication category for first object that the foundation prestores Property, which is handled, comprising:
According to the communication attributes of first object prestored, the communication channel is closed in request;
The communication attributes for second object that the foundation prestores, carrying out processing to the communication channel includes:
According to the communication attributes of second object prestored, the local communication mode of the communication channel is opened in request;
The communication attributes for the third object that the foundation prestores, carrying out processing to the communication channel includes:
According to the communication attributes of the third object prestored, the remote communication mode of the communication channel is opened in request.
5. according to the method described in claim 2, it is characterized in that, if comprising first object, the method also includes:
The inquiry last time listens to whether the communication request object for the communication channel includes first object;
If not, executing the communication attributes described in step according to first object prestored, which is handled;
If comprising second object, the method also includes:
The inquiry last time listens to whether the communication request object for the communication channel includes second object;
If not, executing the communication attributes described in step according to second object prestored, which is handled;
If comprising the third object, the method also includes:
The inquiry last time listens to whether the communication request object for the communication channel includes the third object;
If not, executing the communication attributes described in step according to the third object prestored, which is handled.
6. method described in any one, spy are according to claim 1~5, the method also includes:
Obtain each communication request object under operating status with communication requirement;
One-to-one object ID is distributed for each communication request object;
According to the communication feature of each communication request object, determine that the object type of respective communication request object and communication belong to Property;
Using the respective object ID of the communication request object, object type and the communication attributes of acquisition, information configuration table is generated.
7. according to the method described in claim 6, it is characterized in that, the communication attributes include channel attributes and message attribute;
The channel attributes are used to show the communication channel of the communication request object requests control of corresponding object type;
The message attribute is used to show the communication channel message of the communication request object requests control of corresponding object type It sends or receives.
8. the method according to the description of claim 7 is characterized in that pair of each communication request object with communication requirement As ID is serial number;
The channel attributes are 32 hexadecimal integers, and the message attribute is 8 hexadecimal integers.
9. a kind of communication control unit, which is characterized in that described device includes:
Module is monitored, for listening to the communication request of communication request object;
Parsing module obtains the object ID of respective communication request object for parsing the communication request;
Obtain module, for from the information configuration table prestored, the one-to-one object type of the object ID for obtaining and obtaining and Communication attributes;
Respond module executes object priority tradeoff for object type and communication attributes based on the communication request object Mechanism responds the communication request of the communication request object.
10. a kind of storage medium, which is characterized in that be stored thereon with program, realize when described program is executed by processor as weighed Benefit require 1 described in communication control method.
CN201811275712.9A 2018-10-30 2018-10-30 Communication control method, device and storage medium Active CN109412919B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811275712.9A CN109412919B (en) 2018-10-30 2018-10-30 Communication control method, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811275712.9A CN109412919B (en) 2018-10-30 2018-10-30 Communication control method, device and storage medium

Publications (2)

Publication Number Publication Date
CN109412919A true CN109412919A (en) 2019-03-01
CN109412919B CN109412919B (en) 2022-03-25

Family

ID=65469776

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811275712.9A Active CN109412919B (en) 2018-10-30 2018-10-30 Communication control method, device and storage medium

Country Status (1)

Country Link
CN (1) CN109412919B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101217444A (en) * 2008-01-21 2008-07-09 浙江大学 Network control method based on CAN bus
CN102882731A (en) * 2012-10-22 2013-01-16 南京依维柯汽车有限公司 CAN (controller area network) management method for commercial vehicles
CN102874190A (en) * 2012-10-17 2013-01-16 厦门汉纳森汽车电子有限公司 Intelligent management system and method of automobile power supply
CN103684963A (en) * 2013-11-18 2014-03-26 重庆邮电大学 Framework system and implementation method of middleware applied to car networking
CN104717598A (en) * 2013-12-13 2015-06-17 香港优克网络技术有限公司 Service sharing system and device
CN104991530A (en) * 2015-05-19 2015-10-21 航天科工深圳(集团)有限公司 Communication method based on CAN bus, and power distribution terminal
US20160372915A1 (en) * 2014-10-07 2016-12-22 Micropac Industries, Inc. Voltage Bus Protection and Isolation Device
CN106443146A (en) * 2016-09-12 2017-02-22 浙江中控技术股份有限公司 Master-slave system fault detection and processing system

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101217444A (en) * 2008-01-21 2008-07-09 浙江大学 Network control method based on CAN bus
CN102874190A (en) * 2012-10-17 2013-01-16 厦门汉纳森汽车电子有限公司 Intelligent management system and method of automobile power supply
CN102882731A (en) * 2012-10-22 2013-01-16 南京依维柯汽车有限公司 CAN (controller area network) management method for commercial vehicles
CN103684963A (en) * 2013-11-18 2014-03-26 重庆邮电大学 Framework system and implementation method of middleware applied to car networking
CN104717598A (en) * 2013-12-13 2015-06-17 香港优克网络技术有限公司 Service sharing system and device
US20160372915A1 (en) * 2014-10-07 2016-12-22 Micropac Industries, Inc. Voltage Bus Protection and Isolation Device
CN104991530A (en) * 2015-05-19 2015-10-21 航天科工深圳(集团)有限公司 Communication method based on CAN bus, and power distribution terminal
CN106443146A (en) * 2016-09-12 2017-02-22 浙江中控技术股份有限公司 Master-slave system fault detection and processing system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
PRANJAL VYAS,SWAROOP A. HANGAL,LEENA VACHHANI: "Methods for equitable distribution of bus access among nodes of Controller Area Network", 《2012 IEEE 7TH INTERNATIONAL CONFERENCE ON INDUSTRIAL AND INFORMATION SYSTEMS (ICIIS)》 *
黄胜龙: "汽车发动机ECU的自动化HIL仿真测试平台的研究与实现", 《中国优秀硕士学位论文全文数据库》 *

Also Published As

Publication number Publication date
CN109412919B (en) 2022-03-25

Similar Documents

Publication Publication Date Title
DE102012211930A1 (en) Detection of contact by paired vehicle devices with Bluetooth Low Energy
CN102281333B (en) Method and system for avoiding IP address conflict, DHCP server and DHCP client
EP0609178B1 (en) Method and apparatus for bidirectional transmission of information (protocol)
DE102017121073A1 (en) DIAGNOSTIC METHODS AND APPARATUSES IN VEHICLE NETWORK
KR20040104326A (en) Packet transferring method for data link layer
CN101751033A (en) Vehicular remote monitoring and diagnosing system and method
CN101883090A (en) Client access method, equipment and system
CN103281337A (en) Method, server and system for equipment centralized management
EP2847929A1 (en) Method for activating de-activated control units of a vehicle and vehicle network and node of said vehicle network
US20210126973A1 (en) Communication method and apparatus, and related device
DE102017107863A1 (en) Method and apparatus for dynamic vehicle communication response
DE10329871A1 (en) Vehicle electronic unit telemetric diagnosis procedure sends fault data from vehicle process over mobile phone and internet link external diagnosis unit
CN109412919A (en) A kind of communication control method, device and storage medium
CN106532960A (en) Adaptive SCADA monitoring method applicable to power supply and power distribution field
CN112187960B (en) Vehicle ECU address allocation method and device and vehicle
CN111625282B (en) Multi-subnet cooperative sleep method and system based on CAN bus
CN105404271B (en) A kind of centralized body control system and its identity method for early warning
CN102299975B (en) Method and system for regulating NAT (Network Address Translation) equipment self-adapting to multilayer NAT environment
CN115002160B (en) Vehicle cloud service implementation method and system
CN102394824B (en) Method and device for sending message in dual-machine annular stacking system
CN110071846A (en) Electronic control unit, monitoring method and non-transitory computer-readable medium
KR101899967B1 (en) Method for monitoring device of network on vehicle
CN101159749B (en) Method for automatic login EC on ISC and corresponding device
CN116634531A (en) Dormancy awakening method, system and device
KR101899968B1 (en) Apparatus for monitoring device of network on vehicle

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
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 4 / F, building 1, No.14 Jiuxianqiao Road, Chaoyang District, Beijing 100020

Applicant after: Beijing Jingwei Hengrun Technology Co., Ltd

Address before: 8 / F, block B, No. 11, Anxiang Beili, Chaoyang District, Beijing 100101

Applicant before: Beijing Jingwei HiRain Technologies Co.,Ltd.

GR01 Patent grant
GR01 Patent grant