Scheduling method and device of LIN bus, computer equipment, readable storage medium and program product

By obtaining the initial state of the slave node in the wake-up state and controlling the start and stop of the master node scheduling, the problem of unnecessary power consumption in the prior art is solved, and efficient utilization and stability improvement of system resources are achieved.

CN119094270AActive Publication Date: 2024-12-06CHINA FAW CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411345108.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-25
Publication Date
2024-12-06
Estimated Expiration
2044-09-25

AI Technical Summary

Technical Problem

The existing LIN bus scheduling mechanism starts scheduling after the master node wakes up, resulting in unnecessary power consumption and system complexity, and data transmission does not meet the needs of the application scenario.

Method used

When the master node is in a wake-up state, obtain the initial state of the slave node, and control the master node to stop scheduling and enter a silent state without obtaining slave node data; start scheduling when it is necessary to obtain data, and accurately control it through a timer Data acquisition process ensures efficient utilization of system resources.

Benefits of technology

It reduces unnecessary power consumption and system complexity, improves system stability and reliability, and ensures the efficiency of data exchange and scheduling processes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119094270A_ABST
    Figure CN119094270A_ABST
Patent Text Reader

Abstract

The invention relates to an LIN bus scheduling method and device, computer equipment, a readable storage medium and a program product. The method comprises the steps of obtaining an initial state of a slave node when a master node is in a wake-up state and node data of the slave node needs to be obtained, obtaining the node data of the slave node through the master node when the initial state of the slave node is a normal response state, and controlling the master node to start scheduling, in the process that the master node starts scheduling, under the condition that the master node does not need to obtain node data of the slave node, the master node is controlled to stop the scheduling process, and the LIN bus network structure is controlled to enter a silent state. By adopting the method, the data exchange and scheduling process between the master node and the slave node can be accurately controlled, efficient utilization of system resources can be ensured, and unnecessary waiting and idle time is reduced, so that the stability and reliability of the system are enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of automobile distributed electronic systems, and in particular to a scheduling method, device, computer equipment, readable storage medium and program product of a LIN bus. Background Art

[0002] The LIN bus network structure consists of a master node and multiple slave nodes. The master node is responsible for the scheduling and management of the entire network. In a typical LIN communication process, the master node divides the LIN message into two parts: the frame header and the data field. The frame header contains key information such as the message ID, which is used to identify different communication tasks; the data field carries specific transmission data and verification information. The master node sends the frame header in the order of the preset scheduling table, and then the corresponding slave node fills the data field according to the task type (master task or slave task). This mechanism ensures the orderly transmission and efficient processing of data.

[0003] However, the current scheduling mechanism for the LIN bus usually adopts the "master node wake-up and scheduling" approach. In this mode, once the master node is powered on or awakened, the scheduling process is immediately started, requiring the slave node to quickly complete initialization and prepare for data transmission, regardless of whether the data is really needed in the current application scenario. This mechanical communication behavior not only increases the complexity of the system, but also leads to unnecessary energy consumption. Summary of the invention

[0004] Based on this, it is necessary to provide a scheduling method, device, computer equipment, readable storage medium and program product for a LIN bus that can reduce power consumption in order to solve the above technical problems.

[0005] In a first aspect, the present application provides a scheduling method for a LIN bus, comprising:

[0006] When the master node is in the awake state and needs to obtain node data of the slave node, obtain the initial state of the slave node;

[0007] When the initial state of the slave node is a normal response state, the node data of the slave node is obtained through the master node, and the master node is controlled to start scheduling;

[0008] When the master node starts scheduling and does not need to obtain node data of the slave node, the master node is controlled to stop scheduling and the LIN bus network structure is controlled to enter a silent state.

[0009] In one of the embodiments, the master node is configured to simultaneously obtain node data of all slave nodes.

[0010] In one embodiment, the method further comprises:

[0011] When the initial state of the slave node is the initialization state, the master node is controlled to enter a low level state;

[0012] When the duration of the master node being in the low level state reaches a preset duration, a timer is started;

[0013] When the timer reaches the initialization time, the master node obtains the node data of the slave node and controls the master node to start scheduling.

[0014] In one embodiment, the method further comprises:

[0015] When the master node is in the awake state and does not need to obtain the node data of the slave node, the LIN bus network structure is controlled to enter the silent state.

[0016] In one embodiment, the method further comprises:

[0017] When the LIN bus network structure is in a silent state and the master node needs to obtain the node data of the slave node, the node data of the slave node is obtained through the master node, and the master node is controlled to start scheduling.

[0018] In one embodiment, the method further comprises:

[0019] When the master node meets the local sleep condition, the master node is controlled to enter the sleep state until the master node is awakened again;

[0020] When the master node does not meet the local sleep condition, the LIN bus network structure is controlled to maintain a silent state until the master node meets the local sleep condition.

[0021] In a second aspect, the present application also provides a scheduling device for a LIN bus, comprising:

[0022] The node awakening module is used to obtain the initial state of the slave node when the master node is in the awakened state and needs to obtain the node data of the slave node;

[0023] The scheduling startup module is used to obtain the node data of the slave node through the master node when the initial state of the slave node is a normal response state, and control the master node to start scheduling;

[0024] The scheduling control module is used to control the process of stopping the scheduling of the master node when the master node starts scheduling and does not need to obtain the node data of the slave node, and control the LIN bus network structure to enter a silent state.

[0025] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the method steps of any one of the first aspects are implemented.

[0026] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, which implements any one of the method steps in the first aspect when the computer program is executed by a processor.

[0027] In a fifth aspect, the present application further provides a computer program product, comprising a computer program, which implements any one of the method steps in the first aspect when executed by a processor.

[0028] The above-mentioned LIN bus scheduling method, device, computer equipment, readable storage medium and program product can accurately control the data exchange and scheduling process between the master node and the slave node, ensure that system resources are efficiently utilized, reduce unnecessary waiting and idle time, and enhance the stability and reliability of the system. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0030] FIG1 is an application environment diagram of a scheduling method for a LIN bus in one embodiment;

[0031] FIG2 is a schematic flow chart of a scheduling method for a LIN bus in one embodiment;

[0032] FIG3 is a schematic flow chart of a scheduling method for a LIN bus in another embodiment;

[0033] FIG4 is a block diagram of a scheduling device for a LIN bus in one embodiment;

[0034] FIG. 5 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0035] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application 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 used to explain the present application and are not used to limit the present application.

[0036] The scheduling method of the LIN bus provided in the embodiment of the present application can be applied to the application environment shown in Figure 1. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. Among them, the terminal 102 is used to receive the wake-up signal of the server 104, and when the master node is in the wake-up state and needs to obtain the node data of the slave node, the initial state of the slave node is obtained, and when the initial state of the slave node is a normal response state, the node data of the slave node is obtained through the master node, and the master node is controlled to start scheduling. In the process of starting the scheduling of the master node, the master node does not need to obtain the node data of the slave node, and the master node stops the scheduling process, and controls the LIN bus network structure to enter a silent state. Among them, the terminal 102 can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, Internet of Things devices and portable wearable devices, and the Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, projection devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The head mounted device may be a virtual reality (VR) device, an augmented reality (AR) device, smart glasses, etc. The server 104 may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services.

[0037] In an exemplary embodiment, as shown in FIG2 , a scheduling method for a LIN bus is provided, which is described by taking the method applied to the terminal 102 in FIG1 as an example, and includes the following steps 202 to 206. Among them:

[0038] S202: When the master node is in the awake state and needs to obtain node data of the slave node, obtain the initial state of the slave node.

[0039] The LIN (Local Interconnect Network) bus network structure usually includes a master node and at least one slave node. The master node is used to control the communication on the network. The master node is also used to send a message header, which contains the address of the slave node and the length of the message, so that the slave node can identify which messages are sent to them. Slave nodes are passive in the LIN network. They monitor the communication on the bus and determine whether to respond based on the address information in the message header. When the slave node recognizes that the message is sent to it, it will perform corresponding operations based on the content of the message and may send response data through the bus. Slave nodes usually do not communicate directly with each other, but only with the master node.

[0040] Optionally, the master node will first check its own status (make sure it is awake or activated) when needed (such as starting a new task, checking system status, etc.), and then try to establish communication with the slave node (the node being controlled or managed) to obtain the initial status information of the slave node.

[0041] S204: When the initial state of the slave node is a normal response state, the node data of the slave node is obtained through the master node, and the master node is controlled to start scheduling.

[0042] Optionally, after the slave node responds normally to the master node's request, the master node will further request detailed data (such as status parameters, configuration information, etc.) from the slave node. After obtaining these data, the master node will start the corresponding scheduling process according to the preset algorithm or rules to optimize system performance, resource allocation or task execution.

[0043] S206: When the master node starts scheduling and does not need to obtain node data of the slave node, the master node is controlled to stop scheduling and the LIN bus network structure is controlled to enter a silent state.

[0044] Optionally, during the scheduling process, the master node may decide whether to continue scheduling based on real-time conditions (such as task completion, error occurrence, insufficient resources, etc.). If it is determined that it is no longer necessary to obtain data from the slave node, the master node will stop scheduling. At the same time, in order to save energy, reduce interference or meet other network management requirements, the master node will also control the LIN bus network structure to enter a silent state, that is, suspend or reduce communication activities on the network.

[0045] In the above-mentioned scheduling method of the LIN bus, when the master node is in the awake state and needs to obtain the node data of the slave node, the initial state of the slave node is obtained; when the initial state of the slave node is the normal response state, the node data of the slave node is obtained through the master node, and the master node is controlled to start scheduling; when the master node starts scheduling and the master node does not need to obtain the node data of the slave node, the master node is controlled to stop scheduling, and the LIN bus network structure is controlled to enter a silent state. The data exchange and scheduling process between the master node and the slave node can be accurately controlled, which can ensure that system resources are efficiently utilized, reduce unnecessary waiting and idle time, and thus enhance the stability and reliability of the system.

[0046] In an exemplary embodiment, the master node is configured to simultaneously obtain node data of all slave nodes.

[0047] Optionally, in a LIN network structure, the master node establishes a connection with all slave nodes through a LIN bus or other communication protocols, and the master node sends a broadcast message or a specific request message to all slave nodes, requiring them to send their respective node data. After receiving the request from the master node, the slave node will prepare and send a response message containing its node status, data, configuration information, etc. to the master node. The master node receives response messages from all slave nodes and parses these data to obtain the node data of the slave nodes. It should be noted that in order to ensure the uniformity of scheduling, the master node is configured to simultaneously obtain the node data of all slave nodes, that is, the master node needs to obtain the node data of all slave nodes at the same time, or does not need to obtain any slave node data, so that when the master node controls the LIN bus network structure to enter a silent state, all slave nodes can be silent at the same time.

[0048] In this embodiment, by configuring the master node to simultaneously obtain the node data of all slave nodes, it is possible to ensure that the master node schedules all slave nodes simultaneously, ensure that the slave node states are consistent, and thus improve scheduling efficiency.

[0049] In an exemplary embodiment, the method also includes: when the initial state of the slave node is an initialization state, controlling the master node to enter a low-level state; when the duration of the master node in the low-level state reaches a preset duration, starting a timer; when the timer reaches the initialization duration, obtaining the node data of the slave node through the master node, and controlling the master node to start scheduling.

[0050] Optionally, when the slave node is powered on, reset, or awakened from sleep mode, it will enter the initialization state. At this stage, the slave node will perform necessary initialization operations to prepare for subsequent LIN communication. The master node controls the bus to enter a low level state by sending specific signals (such as wake-up signals or synchronization signals). In the LIN bus, the low level usually represents a dominant level, which is used to send data or control signals.

[0051] Furthermore, when the duration of the master node being in a low-level state reaches a preset duration, this indicates that the slave node has completed the initialization operation or is ready to receive data. At this point, the master node will start a timer to accurately control the subsequent operation time to ensure that the master node starts to obtain the data of the slave node at the appropriate time. When the timer reaches the initialization duration, this indicates that the slave node is fully ready and the master node can safely start to obtain the node data of the slave node. The master node requests the slave node to send its node data by sending a request message or a broadcast message. After receiving the request, the slave node will send a response message containing its status, configuration, data and other information to the master node. After obtaining the node data of all slave nodes, the master node will start the scheduling operation based on these data.

[0052] In this embodiment, by acquiring data only after the slave node initialization is completed, it can be ensured that the acquired data is the latest and consistent, thereby avoiding errors or conflicts caused by inconsistent data. By accurately controlling the time point and data acquisition process, the stability and reliability of the entire LIN bus network can be improved.

[0053] In an exemplary embodiment, the method further includes: when the master node is in an awake state and does not need to obtain node data of the slave node, controlling the LIN bus network structure to enter a silent state.

[0054] Optionally, the master node continuously monitors its own status and the activity in the network. When the master node is awake but determines that it does not need to communicate with the slave node at present, it will evaluate whether the network should be put into a silent state according to preset conditions or policies. Once it is decided to put the network into a silent state, the master node will stop sending any non-essential communication signals and may notify the slave node to enter the silent mode by sending a specific silent command or control signal. In the silent state, all nodes on the LIN bus network will reduce or stop their communication activities, thereby entering a low-power mode.

[0055] In this embodiment, by controlling the LIN bus network structure to enter a silent state when the master node is in an awake state and does not need to obtain node data from the slave node, unnecessary communication activities can be reduced and the power consumption of hardware components can be reduced, thereby optimizing the utilization of system resources to ensure that the system can flexibly adapt to different application scenarios and needs.

[0056] In an exemplary embodiment, the method further includes: when the LIN bus network structure is in a silent state and the master node needs to obtain node data of the slave node, obtaining the node data of the slave node through the master node and controlling the master node to start scheduling.

[0057] Optionally, when the LIN bus network is in a silent state, the communication activities between the master node and the slave node are reduced or stopped to save energy and reduce electromagnetic interference. The master node monitors its own state and the activities in the network to determine whether it needs to recover from the silent state to obtain the data of the slave node. When the master node determines that it needs to obtain the node data of the slave node, it will send a wake-up signal to the LIN bus. After receiving the wake-up signal, the slave node will wake up from the silent state and prepare to receive the communication request from the master node. After sending the wake-up signal, the master node will then send a data request message to the slave node. After receiving the request, the slave node will prepare the corresponding data and send it to the master node through the LIN bus. The master node receives the data sent by the slave node and processes it. After obtaining all the required data, the master node will start the scheduling operation based on this data.

[0058] In this embodiment, when the LIN bus network structure is in a silent state and the master node needs to obtain the node data of the slave node, the master node obtains the node data of the slave node and controls the master node to start scheduling. This enables the LIN bus network to flexibly switch between a silent state and an active state to meet different communication needs. When the master node needs data, it can quickly wake up the network and obtain the required information without always maintaining an active state of network communication, thereby reducing the overall power consumption of the system.

[0059] In an exemplary embodiment, the method also includes: when the master node meets the local sleep condition, controlling the master node to enter a sleep state until the master node is awake again; when the master node does not meet the local sleep condition, controlling the LIN bus network structure to maintain a silent state until the master node meets the local sleep condition.

[0060] Optionally, a series of local sleep conditions are set inside the master node. When the master node detects that the local sleep conditions are met, it will perform a series of operations to prepare to enter the sleep state, such as shutting down unnecessary hardware components, saving current status information, sending sleep commands to slave nodes (if applicable), etc. Then, the master node will enter a low-power sleep mode. If the master node does not meet the local sleep conditions, but there is no current data transmission requirement, it will control the LIN bus network structure to enter a silent state. In the silent state, the communication activity between the master node and the slave node is reduced or stopped, but the master node remains awake to monitor whether the sleep conditions are met or whether there is a new data transmission requirement. When the master node needs to re-transmit data or meet other wake-up conditions, it will be awakened. After waking up, the master node will re-evaluate the local sleep conditions and resume communication with the slave node as needed.

[0061] In this embodiment, the power consumption of the system can be significantly reduced by allowing the master node to enter a sleep state or maintain a silent state when data transmission is not required. When the master node is in an awake state, it can quickly respond to new data transmission requirements or system events. By intelligently controlling the sleep and wake-up states of the master node and the silent state of the LIN bus network structure, the utilization of system resources can be optimized and the system stability can be enhanced.

[0062] In an exemplary embodiment, as shown in FIG3 , a scheduling method for a LIN bus is provided, the method comprising the following steps:

[0063] S302: When the master node is in the awake state and needs to obtain the node data of the slave node, obtain the initial state of the slave node; when the initial state of the slave node is the normal response state, obtain the node data of the slave node through the master node, and control the master node to start scheduling; when the master node starts scheduling and the master node does not need to obtain the node data of the slave node, control the master node to stop scheduling and control the LIN bus network structure to enter a silent state.

[0064] The master node is configured to simultaneously obtain node data of all slave nodes.

[0065] S304: When the initial state of the slave node is the initialization state, control the master node to enter a low-level state; when the duration of the master node in the low-level state reaches a preset duration, start the timer; when the timer reaches the initialization duration, obtain the node data of the slave node through the master node, and control the master node to start scheduling.

[0066] S306: When the master node is in the awake state and does not need to obtain the node data of the slave node, the LIN bus network structure is controlled to enter the silent state.

[0067] S308: When the LIN bus network structure is in a silent state and the master node needs to obtain the node data of the slave node, the node data of the slave node is obtained through the master node, and the master node is controlled to start scheduling.

[0068] S310: When the master node meets the local sleep condition, control the master node to enter the sleep state until the master node is awake again; when the master node does not meet the local sleep condition, control the LIN bus network structure to maintain a silent state until the master node meets the local sleep condition.

[0069] In this embodiment, when the master node is in an awake state and needs to obtain the node data of the slave node, the initial state of the slave node is obtained; when the initial state of the slave node is a normal response state, the node data of the slave node is obtained through the master node, and the master node is controlled to start scheduling; when the master node starts scheduling and does not need to obtain the node data of the slave node, the master node is controlled to stop scheduling and the LIN bus network structure is controlled to enter a silent state. This can accurately control the data exchange and scheduling process between the master node and the slave node, ensure that system resources are efficiently utilized, reduce unnecessary waiting and idle time, and thus enhance the stability and reliability of the system.

[0070] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0071] Based on the same inventive concept, the embodiment of the present application also provides a LIN bus scheduling device for implementing the above-mentioned LIN bus scheduling method. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above-mentioned method, so the specific limitations in the one or more LIN bus scheduling device embodiments provided below can refer to the above-mentioned limitations on the LIN bus scheduling method, which will not be repeated here.

[0072] In an exemplary embodiment, as shown in FIG4 , a scheduling device for a LIN bus is provided, comprising: a node wake-up module 10, a scheduling start module 20 and a scheduling control module 30, wherein:

[0073] The node awakening module 10 is used to obtain the initial state of the slave node when the master node is in the awakened state and needs to obtain the node data of the slave node.

[0074] The scheduling start module 20 is used to obtain the node data of the slave node through the master node when the initial state of the slave node is a normal response state, and control the master node to start scheduling.

[0075] The scheduling control module 30 is used to control the master node to stop scheduling and control the LIN bus network structure to enter a silent state when the master node starts scheduling and the master node does not need to obtain node data of the slave node.

[0076] In an exemplary embodiment, the master node involved in the node wake-up module 10 is configured to simultaneously obtain node data of all slave nodes.

[0077] In an exemplary embodiment, the scheduling control module 30 is also used to control the master node to enter a low-level state when the initial state of the slave node is an initialization state; start the timer when the duration of the master node in the low-level state reaches a preset duration; when the timer duration reaches the initialization duration, obtain the node data of the slave node through the master node, and control the master node to start scheduling.

[0078] In an exemplary embodiment, the scheduling control module 30 is also used to control the LIN bus network structure to enter a silent state when the master node is in an awake state and does not need to obtain node data of the slave node.

[0079] In an exemplary embodiment, the scheduling control module 30 is also used to obtain the node data of the slave node through the master node and control the master node to start scheduling when the LIN bus network structure is in a silent state and the master node needs to obtain the node data of the slave node.

[0080] In an exemplary embodiment, the scheduling control module 30 is also used to control the master node to enter a sleep state when the master node meets the local sleep condition until the master node is awake again; when the master node does not meet the local sleep condition, control the LIN bus network structure to maintain a silent state until the master node meets the local sleep condition.

[0081] Each module in the above-mentioned LIN bus scheduling device can be implemented in whole or in part by software, hardware or a combination thereof. Each of the above-mentioned modules can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.

[0082] In an exemplary embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be shown in FIG5. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit, and an input device. The processor, the memory, and the input / output interface are connected via a system bus, and the communication interface, the display unit, and the input device are connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner may be implemented through WIFI, a mobile cellular network, near field communication (NFC) or other technologies. When the computer program is executed by the processor, a scheduling method of a LIN bus is implemented. The display unit of the computer device is used to form a visually visible picture, which may be a display screen, a projection device, or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.

[0083] Those skilled in the art will understand that the structure shown in FIG. 5 is merely a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.

[0084] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the following steps when executing the computer program: when the master node is in an awake state and needs to obtain node data of the slave node, the initial state of the slave node is obtained; when the initial state of the slave node is a normal response state, the node data of the slave node is obtained through the master node, and the master node is controlled to start scheduling; when the master node starts scheduling and the master node does not need to obtain node data of the slave node, the master node is controlled to stop scheduling and the LIN bus network structure is controlled to enter a silent state.

[0085] In one embodiment, the master node involved in the execution of the computer program by the processor is configured to simultaneously obtain the node data of all the slave nodes.

[0086] In one embodiment, the processor also implements the following steps when executing the computer program: when the initial state of the slave node is the initialization state, the master node is controlled to enter a low level state; when the duration of the master node in the low level state reaches a preset duration, the timer is started; when the timer reaches the initialization duration, the node data of the slave node is obtained through the master node, and the master node is controlled to start scheduling.

[0087] In one embodiment, when the processor executes the computer program, the following steps are also implemented: when the master node is in the awake state and does not need to obtain the node data of the slave node, the LIN bus network structure is controlled to enter the silent state.

[0088] In one embodiment, when the processor executes the computer program, the following steps are also implemented: when the LIN bus network structure is in a silent state and the master node needs to obtain the node data of the slave node, the node data of the slave node is obtained through the master node, and the master node is controlled to start scheduling.

[0089] In one embodiment, when the processor executes the computer program, the following steps are also implemented: when the master node meets the local sleep condition, the master node is controlled to enter a sleep state until the master node is awake again; when the master node does not meet the local sleep condition, the LIN bus network structure is controlled to maintain a silent state until the master node meets the local sleep condition.

[0090] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented: when the master node is in an awake state and needs to obtain node data of the slave node, the initial state of the slave node is obtained; when the initial state of the slave node is a normal response state, the node data of the slave node is obtained through the master node, and the master node is controlled to start scheduling; when the master node starts scheduling and does not need to obtain node data of the slave node, the master node is controlled to stop scheduling, and the LIN bus network structure is controlled to enter a silent state.

[0091] In one embodiment, the master node involved in the execution of the computer program by the processor is configured to simultaneously obtain the node data of all slave nodes.

[0092] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: when the initial state of the slave node is the initialization state, the master node is controlled to enter a low level state; when the duration of the master node in the low level state reaches a preset duration, the timer is started; when the timer reaches the initialization duration, the node data of the slave node is obtained through the master node, and the master node is controlled to start scheduling.

[0093] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: when the master node is in the awake state and does not need to obtain the node data of the slave node, the LIN bus network structure is controlled to enter the silent state.

[0094] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: when the LIN bus network structure is in a silent state and the master node needs to obtain the node data of the slave node, the node data of the slave node is obtained through the master node, and the master node is controlled to start scheduling.

[0095] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: when the master node meets the local sleep condition, the master node is controlled to enter a sleep state until the master node is awake again; when the master node does not meet the local sleep condition, the LIN bus network structure is controlled to maintain a silent state until the master node meets the local sleep condition.

[0096] In one embodiment, a computer program product is provided, including a computer program, which implements the following steps when executed by a processor: when the master node is in an awake state and needs to obtain node data of the slave node, obtain the initial state of the slave node; when the initial state of the slave node is a normal response state, obtain the node data of the slave node through the master node, and control the master node to start scheduling; when the master node starts scheduling and the master node does not need to obtain the node data of the slave node, control the master node to stop scheduling, and control the LIN bus network structure to enter a silent state.

[0097] In one embodiment, the master node involved in the execution of the computer program by the processor is configured to simultaneously obtain the node data of all slave nodes.

[0098] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: when the initial state of the slave node is the initialization state, the master node is controlled to enter a low level state; when the duration of the master node in the low level state reaches a preset duration, the timer is started; when the timer reaches the initialization duration, the node data of the slave node is obtained through the master node, and the master node is controlled to start scheduling.

[0099] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: when the master node is in the awake state and does not need to obtain the node data of the slave node, the LIN bus network structure is controlled to enter the silent state.

[0100] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: when the LIN bus network structure is in a silent state and the master node needs to obtain the node data of the slave node, the node data of the slave node is obtained through the master node, and the master node is controlled to start scheduling.

[0101] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: when the master node meets the local sleep condition, the master node is controlled to enter a sleep state until the master node is awake again; when the master node does not meet the local sleep condition, the LIN bus network structure is controlled to maintain a silent state until the master node meets the local sleep condition.

[0102] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.

[0103] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0104] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A scheduling method for a LIN bus, characterized in that: Applied to a LIN bus network structure; the LIN bus network structure includes a master node and at least one slave node; the method includes: When the master node is in an awake state and needs to obtain node data of the slave node, obtaining an initial state of the slave node; When the initial state of the slave node is a normal response state, obtaining the node data of the slave node through the master node, and controlling the master node to start scheduling; When the master node starts scheduling and does not need to obtain node data of the slave node, the master node is controlled to stop scheduling and the LIN bus network structure is controlled to enter a silent state.

2. The method according to claim 1, characterized in that The master node is configured to simultaneously obtain node data of all slave nodes.

3. The method according to claim 1, characterized in that The method further comprises: When the initial state of the slave node is an initialization state, controlling the master node to enter a low level state; When the duration of the master node being in the low level state reaches a preset duration, starting a timer; When the duration of the timer reaches the initialization duration, the node data of the slave node is obtained through the master node, and the master node is controlled to start scheduling.

4. The method according to claim 1, characterized in that: The method further comprises: When the master node is in the awake state and does not need to obtain the node data of the slave node, the LIN bus network structure is controlled to enter a silent state.

5. The method according to claim 1, characterized in that The method further comprises: When the LIN bus network structure is in a silent state and the master node needs to obtain the node data of the slave node, the node data of the slave node is obtained through the master node, and the master node is controlled to start scheduling.

6. The method according to claim 1, characterized in that The method further comprises: When the master node meets the local sleep condition, control the master node to enter the sleep state until the master node is in the awake state again; When the master node does not meet the local sleep condition, the LIN bus network structure is controlled to maintain a silent state until the master node meets the local sleep condition.

7. A scheduling device for a LIN bus, characterized in that: The device comprises: A node awakening module, used for acquiring the initial state of the slave node when the master node is in the awakened state and the node data of the slave node needs to be acquired; A scheduling startup module, used to obtain the node data of the slave node through the master node when the initial state of the slave node is a normal response state, and control the master node to start scheduling; The scheduling control module is used to control the process of stopping the scheduling of the master node when the master node starts scheduling and the master node does not need to obtain the node data of the slave node, and control the LIN bus network structure to enter a silent state.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

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

Citation Information

Patent Citations

  • Vehicle-mounted electronic control unit LIN bus communication automatic testing device and system

    CN104267715A

  • Flexible Scheduling Method And Apparatus In LIN Communication

    CN105591853A

  • LIN bus automatic addressing method and system, master node and slave node

    CN118118462A

  • LIN Communication Circuit and a Method of Communicating Between LIN Busses

    US20230004512A1