A non-transitory computer-readable storage medium, storing control instructions configured to be executed by one or more processors of a controller area network (CAN) bus network access unit;
- and
- the control instructions are executed by the one or more processors to cause the CAN bus network access unit to perform operations comprising:
- determining, for a to-be-detected port of the CAN bus network access unit if the to-be-detected port receives, in a first scanning period, a second scanning period, a third scanning period, and a fourth scanning period that are consecutive, a message notifying an identifier of the CAN bus network access unit, a bus number being 1, and a port number being 1, that the to-be-detected port is connected to a straight-line CAN bus network access unit, and recording the identifier of the CAN bus network access unit, wherein the to-be-detected port is connected to a first port of the straight-line CAN bus network access unit, and the first port of the straight-line CAN bus network access unit is a logical entry;
- determining, if the to-be-detected port receives, in the first scanning period, the second scanning period, the third scanning period, and the fourth scanning period that are consecutive, a message notifying a notification of the identifier of the CAN bus network access unit, a bus number being 2, and a port number being 3, that the to-be-detected port is connected to a straight-line CAN bus network access unit, and recording the identifier of the CAN bus network access unit, wherein the to-be-detected port is connected to a third port of the straight-line CAN bus network access unit, and the third port of the straight-line CAN bus network access unit is a logical exit;
- determining, if the to-be-detected port receives, in the first scanning period, a message notifying the identifier of the CAN bus network access unit, a bus number being 1, and a particular flag bit, that the to-be-detected port is connected to a transplanter CAN bus network access unit;
- and recording the identifier of the CAN bus network access unit, wherein the to-be-detected port is connected to a first port of the transplanter CAN bus network access unit, and the first port of the transplanter CAN bus network access unit is a logical entry;
- recording, if the to-be-detected port receives, in the second scanning period, a message notifying the identifier of the CAN bus network access unit, a bus number being 1 or 2, and a particular flag bit, and receives a port number being 2 after sending a port query request, the identifier of the CAN bus network access unit, wherein the to-be-detected port is connected to a second port of the transplanter CAN bus network access unit, and in response to the bus number being 1, the second port of the transplanter CAN bus network access unit is a logical exit;
- and in response to the bus number being 2, the second port of the transplanter CAN bus network access unit is a logical entry;
- recording, if the to-be-detected port receives, in the third scanning period, a message notifying the identifier of the CAN bus network access unit, a bus number being 1 or 2, and a particular flag bit, and receives a port number being 3 after sending a port query request, the identifier of the CAN bus network access unit, wherein the to-be-detected port is connected to a third port of the transplanter CAN bus network access unit, and in response to the bus number being 1, the third port of the transplanter CAN bus network access unit is a logical exit;
- and in response to the bus number being 2, the third port of the transplanter CAN bus network access unit is a logical entry;
- and
- recording, if the to-be-detected port receives, in the fourth scanning period, a message notifying the identifier of the CAN bus network access unit, a bus number being 1 or 2, and a particular flag bit, and receives a port number being 4 after sending a port query request, the identifier of the CAN bus network access unit, wherein the to-be-detected port is connected to a fourth port of the transplanter CAN bus network access unit, and in response to the bus number being 1, the fourth port of the transplanter CAN bus network access unit is a logical exit;
- and in response to the bus number being 2, the fourth port of the transplanter CAN bus network access unit is a logical entry.