Control instruction sending method and device

By introducing the sending method of middleware management control instructions in the vehicle network, the problem of high management and maintenance costs caused by changes in the node control instructions sent in the high-performance computer center architecture is solved, and more efficient control instructions sending management and maintenance are achieved.

CN118984329APending Publication Date: 2024-11-19CONTINENTAL AUTOMOTIVE R & D (CHONGQING) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411069751.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-05
Publication Date
2024-11-19

AI Technical Summary

Technical Problem

In the vehicle electronic and electrical architecture of a high-performance computer center, when the node's control instructions are sent to change, all relevant application layer software codes need to be modified, resulting in high management and maintenance costs and low efficiency.

Method used

The middleware is introduced between the application layer and the communication layer of the master node, to configure the transmission method of control instructions, and manage the transmission of control instructions through the delay level and signal type, allowing or prohibiting the transmission of control instructions to adapt to the wake-up time of the node and software operation cycle changes.

Benefits of technology

Through the middleware management of the sending of control instructions, extensive modification of the application layer software code is avoided, maintenance difficulty is reduced and efficiency is improved, and management and maintenance of the sending method of control instructions is simplified.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118984329A_ABST
    Figure CN118984329A_ABST
Patent Text Reader

Abstract

The invention relates to the field of vehicle-mounted communication, in particular to a control instruction sending method and device. The method can be applied to a main node, and the main node sends a control instruction to a target node. The method specifically comprises the following steps: providing middleware between an application layer and a communication layer of a main node, and configuring a sending mode of a control instruction in the middleware. And when the middleware receives the control instruction from the application layer, the middleware manages the sending of the control instruction to the communication layer in a sending mode configured for the control instruction. According to the embodiment, the sending mode of the configuration instruction is managed through the middleware, so that when the sending requirement of the target node for the control instruction changes, the purpose of adjusting the sending mode of the control instruction can be achieved by modifying the middleware, and the mode is easy to maintain and high in efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to vehicle communication technology, and in particular to a method and device for sending a control instruction. Background Art

[0002] The electronic and electrical architecture of automobiles is evolving towards an HPC (High Performance Computer)-centric structure. In an HPC-centric architecture, the HPC is responsible for the implementation of control logic, and each node is responsible for data collection and executing HPC control instructions. However, in this type of architecture, when a node has a change in the way it sends control instructions, it is necessary to modify the code of all related application layer software, which requires a large workload and a wide range of modifications, and does not facilitate management and maintenance. Summary of the invention

[0003] In view of this, the present invention provides a method and device for sending a control instruction, which is easy to manage and maintain the sending mode of the control instruction.

[0004] The method for sending control instructions of an embodiment of the present invention is used for a master node to send a control instruction to a target node. The method includes: providing a middleware between the application layer and the communication layer of the master node, and configuring a sending method of the control instruction in the middleware; and when the middleware receives a control instruction from the application layer, managing the sending of the control instruction to the communication layer in accordance with the sending method configured for the control instruction.

[0005] In some implementations, the sending method includes: a sending delay time of the control instruction when the network is awakened, and / or a sending duration time of the control instruction.

[0006] In some embodiments, multiple delay levels are set in the middleware, each delay level corresponds to a different sending delay time; when the network is awakened, the corresponding delay level is activated based on the sending delay time; when the delay level corresponding to the control instruction is not in an activated state, the continued sending of the control instruction is prohibited; when the delay level corresponding to the control instruction is in an activated state, the continued sending of the control instruction is allowed.

[0007] In some implementations, each delay level corresponds to one or more target nodes having a wake-up time of the same level; the transmission delay time corresponding to each delay level is related to the wake-up time of the target node corresponding to the delay level.

[0008] In some embodiments, under each delay level, multiple sub-delay levels corresponding to different partial network wake-ups are set; when the entire network wakes up, each delay level is activated; when a partial network wakes up, the sub-delay level corresponding to the partial network wake-up under each delay level is activated according to the sending delay time of the delay level; the control instruction is associated with a specific sub-delay level; when the delay level or sub-delay level associated with the control instruction is in an activated state, the sending of the control instruction is allowed.

[0009] In some implementations, when the wake-up time of the target node changes: modify the middleware to associate the target node with other delay levels; or adjust the activation time of the corresponding delay level through the network management module to match the changed wake-up time.

[0010] In some implementations, in the middleware, a signal type is associated with the control instruction, and a sending duration is represented by a value of the signal type; and based on the signal type associated with the control instruction, the sending of the control instruction to the communication layer is managed.

[0011] In some implementations, the method further includes: when the wake-up time or software running cycle of the target node changes, reconfiguring the value of the signal type associated with the control instruction through the diagnostic module, and adjusting the sending duration of the control instruction.

[0012] The method for sending control instructions of an embodiment of the present invention is used for a master node in a vehicle network, and the master node controls a target node through a control instruction, including: setting multiple delay levels and multiple message types, each delay level corresponds to a different sending delay time, and each message type corresponds to a different sending duration; configuring the delay level and message type of the control instruction; when waking up the vehicle network, activating the delay level based on the sending delay time; receiving a control instruction from an application layer; determining whether the delay level of the control instruction is in an activated state; if not in an activated state, suppressing the sending of the control instruction to the communication layer; if in an activated state, sending the control instruction to the communication layer according to the signal type of the control instruction.

[0013] In some embodiments, when the wake-up time of the target node changes: according to the changed wake-up time, the control instruction is associated with other delay levels, and the sending delay time of the other delay levels matches the changed wake-up time; and / or, the sending duration represented by the message type associated with the control instruction is reconfigured.

[0014] The control instruction sending device of the embodiment of the present invention complies with the AUTOSAR architecture, and includes: a software component, which is used to generate a control instruction for controlling a target node; a middleware, which stores a sending mode configured for the control instruction and is used to receive the control instruction from the software component, and manage the transfer of the control instruction to a communication module in the sending mode configured for the control instruction; and a communication module, which is used to send the control instruction to the target node.

[0015] In some implementations, the sending method includes: a sending delay time of the control instruction when the network is awakened, and / or a sending duration time of the control instruction.

[0016] The computer device of the embodiment of the present invention includes: a memory, a processor, and a computer program / instruction stored in the memory, and the processor executes the computer program / instruction to implement the method of the embodiment of the present invention.

[0017] The computer-readable storage medium of the embodiment of the present invention stores a computer program / instruction thereon, and when the computer program / instruction is executed by a processor, the method described in the embodiment of the present invention is implemented.

[0018] The computer program product of the embodiment of the present invention includes a computer program / instruction. When the computer program / instruction is executed by a processor, the method described in the embodiment of the present invention is implemented.

[0019] Beneficial effects of the embodiments of the present invention:

[0020] A middleware is added between the application layer and the communication layer to manage the sending method of the control instructions. When the node's demand for the sending method of the control instructions changes, the middleware can be directly modified without modifying all the application layer software related to the target node, which is convenient for management and maintenance. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Other details and advantages of the present invention will become apparent from the detailed description provided below. It should be understood that the following drawings are merely illustrative and thus cannot be considered as limiting the present invention. The following will be described in detail with reference to the drawings, wherein:

[0022] Figure 1 is a schematic diagram of the architecture of an embodiment of a vehicle network of the present invention;

[0023] Figure 2 is a schematic diagram of the software architecture of a master node (eg, HPC) according to an embodiment of the present invention;

[0024] Figure 3 is a flow chart of an embodiment of a method for sending a control instruction of the present invention;

[0025] Figure 4 is a schematic diagram of the software architecture of a master node (eg, HPC) according to another embodiment of the present invention;

[0026] Figure 5 is a schematic diagram of the software architecture of a master node (eg, HPC) according to an embodiment of the present invention;

[0027] Figure 6 is a flowchart of a method for activating a delay level according to an embodiment of the present invention;

[0028] Figure 7 It is a flow chart of a method for controlling the sending of control instructions based on delay level of the present invention;

[0029] Figure 8 It is a flow chart of a method for controlling the sending of control instructions based on signal type of the present invention;

[0030] Fig. 9 Schematic diagram of a flow chart of an embodiment of a computer device of the present invention. DETAILED DESCRIPTION

[0031] In order to make the technical problems, technical solutions and beneficial effects to be solved by the present invention clearer and more understandable, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only for explaining the present invention and are not intended to limit the present invention.

[0032] In the description of the present invention, it is to be understood that the terms "first" and "second" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. Moreover, the terms "first", "second", etc. are applicable to distinguishing similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the terms used in this way are interchangeable where appropriate so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein.

[0033] like Figure 1 1 is a schematic diagram of the architecture of an embodiment of a vehicle network 10 of the present invention, and the vehicle network 10 is a network architecture centered on an HPC (high performance computer) 101. It includes: HPC 101, ZCU (Zone Control Unit, zone controller) 102-104, LIN nodes 105 and 106 and other nodes. In the vehicle network, the number, type and connection relationship of the nodes are only examples and not limitations of the present invention. For example, the number of ZCUs can be 5, and the number of LIN nodes may be more or less.

[0034] exist Figure 1 In the network, HPC101 is the center of the network, which can also be called the master node or central computing unit, etc., and is mainly responsible for the implementation of the control logic. ZCU102-104, LIN nodes 105 and 106 are the target nodes in the network, which can be responsible for data collection and execution of the control instructions of HPC101. For example, taking the window closing function as an example, assuming that ZCU104 is the regional controller that controls the vehicle body, and LIN node 106 is the actuator for opening or closing the window, when HPC101 detects that the preset condition is met (for example, receiving the user's window closing instruction), it generates a control instruction for closing the window and sends it to ZCU104, and ZCU104 controls LIN node 106 to close the window according to the received control instruction. In addition, some architectures are ZCU-centric architectures, and for such architectures, the method of the embodiment of the present invention can also be used in ZCU. In addition, even in an HPC-centric architecture, for some functions, ZCU or other control nodes have functions and effects similar to HPC101 in the area they are responsible for, and it is not excluded that the method of the embodiment of the present invention can also be applied to ZCU or other control nodes.

[0035] In a vehicle network, nodes can be connected to each other through vehicle buses such as CAN, CANFD, LIN, and Ethernet to exchange data. Figure 1 For example, ZCU102~104 are connected to HPC101 using CAN bus, LIN node 105 is a slave node of HPC101, and is directly connected to HPC101 using LIN bus, LIN node 106 is a slave node of ZCU104, and is directly connected to ZCU104 using LIN bus, and is indirectly connected to HPC101 based on ZCU104.

[0036] Each of the above nodes can be implemented by an ECU (Electronic Control Unit). However, since the functions and performance requirements of the nodes may be different, the ECUs used in the nodes may have great differences in structure and performance.

[0037] In a vehicle network, the network can have multiple modes such as sleep, wake-up, and low power consumption, and can switch between these modes to achieve the purpose of saving power, etc. When waking up, it is generally dominated by HPC101. For example, when there is a valid wake-up source, HPC101 will wake up first, and then wake up the network, such as sending a wake-up command to the network to wake up other nodes in the network. Among them, wake-up can be divided into whole network wake-up and partial network wake-up. The so-called whole network wake-up is to wake up the entire network of the vehicle, such as when the vehicle starts. The so-called partial network wake-up means that only part of the vehicle network is woken up. Taking the function of automatically closing the windows when it rains as an example, this function only involves Figure 1 HPC101, ZCU104 and LIN node 106 in the system, so when executing this function, only these nodes need to be woken up, and there is no need to wake up ZCU102, 103 and LIN node 105. For example, for the charging function, only the charging-related nodes need to be woken up. The awakened objects can be managed by PNC (Partial Network Cluster). PNC is a concept in AUTOSAR (AUTomotive Open System Architecture, an open and standardized software architecture developed for the automotive industry). It focuses on the network signal level. It groups the nodes in the vehicle according to their functions to realize the wake-up and sleep of necessary nodes, so as to achieve the purpose of reducing power consumption. For more details, please refer to the relevant content in AUTOSAR.

[0038] When waking up a node, there is a concept of wake-up time. For example, it takes a certain amount of time from the HPC executing the wake-up operation to the node actually waking up. In addition, the wake-up time of the node is related to factors such as the node's position in the network, the node's connection method, and the node's own performance. Therefore, the wake-up time of the nodes in the network is not completely consistent, but there are differences. Nodes can be classified based on their wake-up time, and nodes with the same level of wake-up time can be classified into one category. Taking the vehicle network 10 as an example, ZCU102~104 is connected to HPC101 via the CAN bus. Its wake-up time is faster and the wake-up time is usually the same or at least at the same level. Therefore, they can be classified as the same type of node, usually referred to as a first-level node. LIN node 105 is directly connected to HPC101 via the LIN bus. Its wake-up speed will be slower than ZCU102~104, and it is usually called a second-level node. LIN node 106 is connected to ZCU104 via the LIN bus and indirectly connected to HPC101 via ZCU104. It has the slowest wake-up speed and is usually called a third-level node.

[0039] Because of the wake-up time issue, when the HPC sends a wake-up command to the network, if it immediately sends a control command to the target node (some functions require the vehicle network to be triggered in real time when it wakes up), the target node may not actually wake up at this time and may miss the control command, which will cause the relevant control to fail and functional errors to occur.

[0040] Therefore, in some embodiments, the control instruction may be delayed for a certain period of time before being sent, and the amount of the delay time is related to the wake-up time of the target node. In other embodiments, the sending duration of the control instruction may be increased so that the control instruction is still sent after the target node wakes up, thereby ensuring that the target node can correctly receive the control instruction. The control of the sending delay time and the sending duration is implemented in the application layer software. When developing application software that implements the function, the sending delay time and / or the sending duration of the control instruction are set in the application software code to manage the sending of the control instruction.

[0041] by Figure 2 For example, this is a schematic diagram of the software architecture of HPC101 that complies with the AUTOSAR specification, which includes: application layer, RTE (Run-Time Environment) layer and basic software (Basic Software, BSW) layer. The application layer is developed by the user, and it includes multiple SWCs (Software Components) that implement different functions. The RTE layer provides communication services for communication between the application and the BSW layer. The BSW layer provides the underlying basic software functions, such as diagnostic functions, communication functions, network management functions, etc., to provide support for the upper-level application to implement functions. The BSW layer may include, for example: diagnostic module (Diag), communication module (COM), network management module and communication management module (COMM), etc.

[0042] exist Figure 2 In the example, the control instructions CMD1~n generated by SWC1~n are sent to the communication module in the BSW layer through the RTE layer, and then sent to the target node in the network by the communication module. Figure 1 The ZCU104 in the control unit is used to control the ZCU104 to perform the window closing operation. When developing the SWC, the developer will set the sending delay time and the sending duration of the control instruction in the SWC, that is, manage the sending method of the control instruction.

[0043] Generally speaking, there is nothing wrong with this management method. However, in some scenarios, in order to reduce development costs, new network development may be based on the previous version, and the new version and the old version have no substantial difference in the architecture and functions of the vehicle network. The difference may be in the node wake-up time. For example, in the initial version of a certain car model, it used Figure 1 The new model still uses the Figure 1 However, due to cost reasons, the ZCU104 was replaced with a similar product, which resulted in a longer wake-up time for the ZCU104. Based on this change, developers generally modify the software code in the application layer to increase the delay time and duration of the control instructions sent to the ZCU104 to meet the new wake-up time requirements, and then port the software to the new car. However, there may be a lot of control instructions involving the ZCU104, and they are scattered in different SWCs. It is obviously not an easy task to find and modify all these control instructions.

[0044] Based on this, an embodiment of the present invention provides a control instruction sending solution, which can easily reconfigure the control instruction sending method and facilitate management and maintenance of the control instruction sending method. The solution of the embodiment of the present invention is described in detail below in conjunction with the accompanying drawings.

[0045] like Figure 3 FIG. 1 is a flow chart of an embodiment of a method for sending a control instruction of the present invention. The method can be used for Figure 1 The HPC101 includes:

[0046] Step S30: providing a middleware between the application layer and the communication layer, and configuring the sending method of the control instruction in the middleware.

[0047] Step S32: When the middleware receives the control instruction from the application layer, it manages the sending of the control instruction to the communication layer in the sending mode configured for the control instruction.

[0048] Because the sending method of control instructions is managed in the middleware, when a node changes the sending method of control instructions, it is only necessary to modify the sending method of control instructions in the middleware without modifying the code of the application layer software (SWC).

[0049] By modifying the sending method of the control instructions in the middleware, it is more efficient than by modifying the code of the application layer software. For example, all the control instructions involved in a certain point may be scattered in different application layer software. When a certain node is replaced, the sending method of all the control instructions involved in the node needs to be changed. Then, it is necessary to find out the code of all the related application layer software and make corresponding modifications, but this has a high maintenance difficulty and low efficiency. In this embodiment, it is only necessary to reconfigure the sending method of the control instructions involved in the middleware, which can reduce the difficulty of maintenance and improve the efficiency of maintenance.

[0050] Furthermore, in the middleware, when the sending method of control instructions is configured on a node basis, if the demand for the sending method of control instructions of a certain node changes, the configuration of the sending method of the node is directly modified to make all control instructions of the node effective, thereby significantly reducing the difficulty of maintenance and improving the efficiency of maintenance.

[0051] In some implementations, the middleware may be located specifically between the software component (SWC) and the communication module (COM), and the middleware may be arranged in the application layer.

[0052] In some implementations, the control instruction sending method includes: sending delay time, and / or sending duration.

[0053] Among them, the sending delay time is usually applied to the wake-up stage, which means that the HPC sends the control instruction to the execution end after a certain delay, so as to avoid the execution end missing the control instruction due to failure to wake up.

[0054] Because the wake-up time involves the entire node, the sending delay time can be managed in units of nodes or in units of nodes with the same wake-up time. When the wake-up time of a node increases, the middleware is modified to reconfigure the sending delay time of the node so that all control instructions sent to the node take effect, thereby greatly improving efficiency.

[0055] Below Figures 4 to 7 Taking the example, a sending scheme of a control instruction based on a sending delay time is described.

[0056] like Figure 4 In the example, the middleware includes: multiple delay levels for managing the delay time of sending control instructions. Each delay level can correspond to a node, or each delay level can correspond to one or more nodes with the same level of wake-up time. For example, in Figure 4 3 delay levels are set in Figure 1The first-level nodes (ZCU102~104), second-level nodes (LIN node 105) and third-level nodes (LIN node 106) in it.

[0057] In some embodiments, multiple delay levels with fixed delay times can be preset, for example, three delay levels are set, and the delay times of the three delay levels are 100ms, 200ms, and 400ms, respectively. Then, based on the wake-up time of each node, the node is assigned to a specific delay level. For example, if the wake-up time of node 1 is 100ms, it is assigned to the delay level with a delay time of 100ms. For another example, if the wake-up time of node 2 is 180ms, it is assigned to the delay level with a delay time of 200ms.

[0058] like Figure 5 As shown, in the network wake-up phase, the delay levels can be activated in sequence after a certain delay (related to the sending delay time of the delay level or the wake-up time of the node). Only when the delay level is activated, the corresponding control instruction (connected or bound to the delay level) can be sent. For example, when the middleware receives a control instruction, if the delay level corresponding to the control instruction is not activated, the middleware caches the control instruction, and continues to send the control instruction when the corresponding delay level is in an activated state. Among them, the activation of the delay level can be implemented by the network management module.

[0059] like Figure 6 As shown in FIG. 1 , it is a flow chart of activating the delay level by the network management module. In step S601, when the network needs to be awakened, if there is an effective awakening source, the network management module is responsible for awakening the network. The network awakening can be the whole network awakening or partial awakening. Figure 6 The whole network wake-up is taken as an example for explanation. In step S602, the network management module detects whether the network enters the full communication mode. In step S603, when it is detected that the full communication mode has been entered, the timer is started and the timing begins. When time t1 arrives (step S604), delay level 1 is activated (step S605). When time t2 arrives (step S606), delay level 1 is activated (step S607). When time tn arrives (step S608), delay level n is activated (step S609), and then the timer is turned off.

[0060] In the above, the time t1, t2 and tn are related to the transmission delay time of each delay level. In some embodiments, t1, t2 and tn may be equal to the wake-up time of the node in each delay level.

[0061] The delay level can be an interface or a flag maintained by the network management module, and the activation and inactivation states of the delay level can be distinguished by the state of the interface or the value of the flag. Figure 5 and 6 For example, after time t1 to tn, the network management module sets the first to nth flags to be valid, such as "1", to indicate that the first to nth delay levels are activated. In this way, in the middleware, the control instruction is associated with the delay level (delay flag). When the middleware receives a control instruction (such as CMD1), if it is determined that the preset flag (such as the first flag) of the corresponding delay level (such as delay level 1) is set, the control instruction is allowed to be sent.

[0062] When the wake-up time of a node changes, the delay level associated with the node can be adjusted to adapt to the new wake-up time. Figure 1 For example, LIN node 105 in Figure 3 and 4 When the wake-up time of the LIN node 105 is reduced from t2 to t1, the LIN node 105 is associated with the delay level 1 to adapt to the new wake-up time. Specifically, all control instructions involved in the LIN node 105 can be associated with the first flag bit, that is, when a control instruction sent to the LIN node 105 is received, the state of the first flag bit is queried to determine whether to send the control instruction, instead of querying the state of the second flag bit.

[0063] It should be noted that the above method is to adjust the sending delay time of the control instruction by modifying the middleware. In some embodiments, the network management module can be modified to achieve a similar effect. For example, assuming that the LIN node 105 corresponds to delay level 2, and no other node corresponds to delay level 2, when the wake-up time of the LIN node changes from t2 to t21, the network management module can be modified so that the network management module activates delay level 2 after time t21. Therefore, in some embodiments, a delay level can be set for each node, and the corresponding delay level can be activated based on the wake-up time of each node. However, as the number of nodes in the network changes, the network management module may have to maintain a large number of delay levels. The complexity can be reduced by appropriately merging some nodes, or only using this method for some nodes.

[0064] For partial network wake-up, it is not necessary to activate all delay levels, only the delay level corresponding to the awakened node needs to be activated. For example, if the window is automatically closed when it rains, Figure 1 The activated nodes only involve HPC101, ZCU104 and LIN node 106. At this time, only delay levels 1 and 3 need to be activated, and delay level 2 does not need to be activated.

[0065] In some implementations, a sub-delay level corresponding to partial network wakeup is added to handle the partial network wakeup situation. Figure 1 For example, assume that there are two PNCs in the network, namely PNC=1 (wake up the whole network) and PNC=2 (wake up HPC101, ZCU104 and LIN node 106). Figure 4 In each delay level, a sub-delay level A1, A2 and A3 corresponding to PNC=2 is added. At the beginning, based on the wake-up time of ZCU104, ZCU104 is associated with delay level 1 and sub-delay level A1 under delay level 1. When the network management module receives PNC=1, it will activate delay levels 1 to 3 in sequence according to t1~t3. When the network management module receives PNC=2, it will activate sub-delay levels A1, A2 and A3 within delay levels 1 to 3 according to t1~t3. The middleware can send control instructions when it determines that delay level 1 or sub-delay level A1 is activated. When the wake-up time of ZCU104 changes, ZCU104 is associated with delay level 2 and sub-delay level A2 under delay level 2 based on the changed wake-up time, that is, it can adapt to the new wake-up time.

[0066] like Figure 7 As shown, it is a flow chart of the method for sending control instructions based on the delay level. In step S701, the middleware receives the control instruction from the application layer and caches the control instruction. In step S702, the middleware determines whether the delay level corresponding to the control instruction is activated, such as whether the relevant flag is set. When activated, in step S703, the control instruction is sent to the communication module. When not activated, in step S704, the control instruction is prohibited from being sent.

[0067] Below Figure 4 , 5 8 as an example, the sending scheme of the control instruction based on the sending duration is illustrated.

[0068] The sending duration can change due to the change of the wake-up time of the target node, and can also change due to the change of the running cycle of the software in the target node. For example, in the wake-up phase of the network, increasing the sending duration helps to solve the problem of the longer wake-up time of the target node. When there is a difference between the wake-up time of the node and the sending delay time of the delay level, for example, the node is associated with delay level 1, but the wake-up time of the node is t12 instead of t1 (t12>t1), that is, when delay level 1 is activated, the node has not really woken up, so this difference can be solved by controlling the sending duration. In addition, when the running cycle of the software becomes longer, the sending duration of the control instruction can also be lengthened accordingly to prevent the target node from being unable to collect the control instruction. In addition, the sending duration can be measured by the number of frames, for example, changing the control instruction from sending 3 frames to sending 6 frames to increase the sending duration.

[0069] exist Figure 4 In the middleware, there are: multiple signal types, each signal type corresponds to a different sending duration. Specifically, multiple signal types can be set in each delay level to manage the control instructions under the delay level. For example, the following signal types can be set: 0x0 = periodic type, 0x1 = 100ms, 0x2 = 200ms, 0x3 = 300ms, 0x4 = 400ms, 0x5 = 500ms, 0x6 = 600ms, 0x7 = 700ms. Among them, by associating the control instruction with the above-mentioned signal type, the sending duration of the control instruction is controlled. For example, for a periodic control instruction, it can be associated with the signal type 0x0, so that after receiving the control instruction, the middleware will continue to send the control instruction to the communication module, and the communication module will send the control instruction periodically. For another example, for an event-type control instruction, it can be associated with one of 0x1 to 0x7. For example, CMD2 can be associated with 0x1=100ms. In this way, when the middleware sends CMD2 to the communication module, it will last for 100ms. Among them, the values ​​corresponding to 0x1 to 0x7 can be adjusted, for example Figure 5 As shown in Figure 1, the diagnostic module can be used to configure the value of the signal type in the middleware, or to configure the association between the control instruction and the signal type. For example, CMD2 is sent to Figure 1 In the control instruction of LIN node 105, when the operation cycle of the software in the LIN node is prolonged, the signal type of CMD2 can be configured as 0x2 to increase the sending duration of CMD2. Figure 1In the control instruction of the LIN node 105, when the wake-up time of the LIN node 105 becomes longer, the middleware can be modified to reassociate the delay level of the LIN node 105 and modify the value of the signal type 0x1 of CMD2, for example, from 100ms to 150ms, to meet the new wake-up time requirement of the LIN node.

[0070] like Figure 8 As shown, it is a flow chart of an embodiment of a method for sending a control instruction based on the duration of sending. In step S801, it is first determined whether the control instruction is allowed to be sent, that is, the control instruction is allowed to be sent only when the corresponding delay level is activated. In step S802, when the control instruction is allowed to be sent, it is determined whether there is a control instruction in the cache, that is, there is a demand for sending the control instruction. In step S803, when there is a cached control instruction, a timer is started based on the signal type of the control instruction, the value of the timer is the value of the signal type, and the control instruction is sent to the communication module at the same time, and the cache is cleared. In step S804, it is determined whether the timer has timed out. When the timer has not timed out, the control instruction is continuously sent (step S805). When the timer times out, the control instruction is stopped from being sent (step S806). In this way, the control of the duration of sending the control instruction is realized.

[0071] As can be seen from the above, in the control instruction sending scheme provided in the embodiment of the present invention. By setting multiple delay levels and multiple message types, each delay level has a different sending delay time, and each message type has a different sending duration. By associating the control instruction with a specific delay level and / or message type, the sending method of the control instruction is controlled. In this way, when the node's demand for the sending method of the control instruction changes, by controlling the delay level and / or message type, the sending method of the control instruction can be matched with the node's new demand.

[0072] In addition, the present invention also provides a computer device, the structural diagram of which is shown in FIG. Fig. 9 As shown, it includes: a memory 90, a processor 92 and a computer program / instruction stored in the memory 90, and the processor 92 executes the computer program / instruction in the memory 90 to implement the method of the embodiment of the present invention.

[0073] In addition, an embodiment of the present invention further provides a computer-readable storage medium on which a computer program / instruction is stored. When the computer program / instruction is executed by a processor, it is the method of the embodiment of the present invention.

[0074] In addition, an embodiment of the present invention further provides a computer program product, including a computer program / instruction, which implements the method of the embodiment of the present invention when executed by a processor.

[0075] The description of the above device, storage medium and program product embodiments is similar to the description of the above method embodiment, and has similar beneficial effects as the method embodiment. For technical details not disclosed in the device, storage medium and program product embodiments of this application, please refer to the description of the method embodiment of this application for understanding.

[0076] The processor may be at least one of an application specific integrated circuit (ASIC), a digital signal processor (DSP), a digital signal processing device (DSPD), a programmable logic device (PLD), a field programmable gate array (FPGA), a central processing unit (CPU), a controller, a microcontroller, a microprocessor, etc. It is understandable that the electronic device that implements the function of the processor may also be other, and the embodiments of the present application are not specifically limited.

[0077] The above-mentioned computer storage medium / memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic random access memory (FRAM), a flash memory (Flash Memory), a magnetic surface memory, an optical disk, or a compact disc read-only memory (CD-ROM) and the like; it can also be various terminals including one or any combination of the above-mentioned memories, such as mobile phones, computers, tablet devices, personal digital assistants, etc.

[0078] It should be noted that the above description is only for example and not for limitation of the present invention. In other embodiments of the present invention, the method may have more, fewer or different steps, and the order, inclusion and function of each step may be different from that described and illustrated. For example, generally multiple steps can be combined into a single step, and a single step can also be divided into multiple steps. For those of ordinary skill in the art, without paying creative work, the sequential changes of each step are also within the scope of protection of the present invention.

[0079] The technical solution of the present invention, in essence or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor or a microcontroller to perform all or part of the steps of the method described in each embodiment of the present invention.

[0080] Those skilled in the art will appreciate that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware associated with program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed.

[0081] Although the present invention has been disclosed as above with preferred embodiments, the present invention is not limited thereto. Any changes and modifications made by any person skilled in the art without departing from the spirit and scope of the present invention should be included in the protection scope of the present invention, and therefore the protection scope of the present invention should be subject to the scope defined by the claims.

Claims

1. A method for sending a control instruction, used for a master node to send a control instruction to a target node, It is characterized in that The method comprises: Providing a middleware between the application layer and the communication layer of the master node, and configuring a sending method of the control instruction in the middleware; and When the middleware receives the control instruction from the application layer, it manages the sending of the control instruction to the communication layer in the sending mode configured for the control instruction.

2. The method for sending a control instruction according to claim 1, It is characterized in that The sending method includes: a sending delay time of the control instruction when the network is awakened, and / or a sending duration time of the control instruction.

3. The method for sending a control instruction according to claim 2, It is characterized in that A plurality of delay levels are set in the middleware, each delay level corresponding to a different sending delay time; When the network is awakened, the corresponding delay level is activated based on the sending delay time; When the delay level corresponding to the control instruction is not in an activated state, prohibiting the control instruction from being sent further; When the delay level corresponding to the control instruction is in an activated state, the control instruction is allowed to continue to be sent.

4. The method for sending a control instruction according to claim 3, It is characterized in that Each latency level corresponds to one or more target nodes with wake-up times of the same level; The sending delay time corresponding to each delay level is related to the wake-up time of the target node corresponding to the delay level.

5. The method for sending a control instruction according to claim 3 or 4, It is characterized in that The method further comprises: When the target node's wake-up time changes: Modify the middleware so that the target node is associated with other delay levels; or, The activation time of the corresponding delay level is adjusted through the network management module to match the changed wake-up time.

6. The method for sending a control instruction according to claim 3 or 4, It is characterized in that Under each latency level, set multiple sub-latency levels corresponding to different parts of the network wake-up; When the entire network wakes up, each delay level is activated; When part of the network is awakened, activating the sub-delay level corresponding to the awakening of the part of the network under each delay level according to the sending delay time of the delay level; associating the control instruction with a specific sub-delay level; When the delay level or sub-delay level associated with the control instruction is in an activated state, sending of the control instruction is allowed.

7. The method for sending a control instruction according to claim 2 or 3, It is characterized in that In the middleware, a signal type is associated with the control instruction, and a sending duration is represented by a value of the signal type; Based on the signal type associated with the control instruction, the sending of the control instruction to the communication layer is managed.

8. The method for sending a control instruction according to claim 7, It is characterized in that The method further comprises: When the wake-up time or software running cycle of the target node changes, the value of the signal type associated with the control instruction is reconfigured through the diagnosis module to adjust the sending duration of the control instruction.

9. A method for sending a control instruction, used for a master node in a vehicle network, wherein the master node controls a target node through a control instruction. It is characterized in that include: Set multiple delay levels and multiple message types. Each delay level corresponds to a different sending delay time, and each message type corresponds to a different sending duration. Configure the delay level and message type of control instructions; When waking up the vehicle network, based on the sending delay time, the activation delay level; Receive control instructions from the application layer; Determining whether the delay level of the control instruction is in an activated state; If it is not in the activated state, suppressing the sending of the control instruction to the communication layer; If it is in the activated state, the control instruction is sent to the communication layer according to the signal type of the control instruction.

10. The method for sending a control instruction according to claim 9, It is characterized in that The method further comprises: When the target node's wake-up time changes: According to the changed wake-up time, the control instruction is associated with other delay levels, and the sending delay time of the other delay levels matches the changed wake-up time; and / or, Reconfigure the sending duration indicated by the message type associated with the control instruction.

11. A control instruction sending device, compliant with the AUTOSAR architecture, It is characterized in that include: A software component for generating control instructions for controlling a target node; a middleware storing the sending mode configured for the control instruction, and used for receiving the control instruction from the software component, and managing the delivery of the control instruction to the communication module in the sending mode configured for the control instruction; as well as A communication module is used to send the control instruction to the target node.

12. The control instruction sending device according to claim 11, It is characterized in that The sending method includes: a sending delay time of the control instruction when the network is awakened, and / or a sending duration time of the control instruction.

13. A computer device, include: A memory, a processor, and a computer program / instruction stored on the memory, wherein the processor executes the computer program / instruction to implement the method according to any one of claims 1 to 10.

14. A computer-readable storage medium having a computer program / instructions stored thereon, It is characterized in that When the computer program / instructions are executed by a processor, the method according to any one of claims 1 to 10 is implemented.

15. A computer program product comprising a computer program / instructions, It is characterized in that When the computer program / instructions are executed by a processor, the method according to any one of claims 1 to 10 is implemented.