Star flash SLE and Ethernet protocol matching conversion method and system
By directly extracting the SLE payload to generate IP packets during the SLE-to-Ethernet protocol conversion, automatically allocating virtual IPs and mapping MAC addresses, efficient, low-latency, and secure protocol conversion is achieved, solving the problems of protocol heterogeneity and address conflicts, while maintaining ultra-low power consumption.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-28
- Publication Date
- 2026-03-10
AI Technical Summary
StarSpark SLE cannot communicate directly with the Ethernet protocol, and the lack of an IP address for SLE devices makes them prone to IP conflicts with local area networks. Existing protocol conversion is complex and has security vulnerabilities.
By receiving SLE data frames, the SLE header is stripped to retain the MAC address, UDP/IP packets are generated, and the target device IP is queried based on the source MAC, a virtual IP is automatically assigned, and UDP/IP packets are encapsulated. On the Ethernet side, the IP header is stripped and an SLE header is added to achieve protocol conversion.
It achieves efficient, low-latency, and secure routing conversion between StarSpark SLE and Ethernet, retains StarSpark's ultra-low power consumption characteristics, and avoids address conflicts and security vulnerabilities.
Smart Images

Figure CN121644693A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of vehicles, in particular to a matching conversion method and system for star flash SLE and Ethernet protocol. BACKGROUND
[0002] Star flash is a new generation of wireless short-range communication technology, and SLE (Sparkle Low Energy) is one of its two core air interface standards, designed for low-power and wide-connection scenarios. Today, in the field of vehicles, star flash communication has become a commonly used communication technology.
[0003] In the prior art, due to protocol heterogeneity, star flash SLE (non-IP protocol) and Ethernet (IP protocol) cannot communicate directly and require complex protocol conversion. Moreover, SLE devices do not have IP addresses and require manual allocation of virtual IP, which is prone to conflict with local area network IP. SUMMARY
[0004] The main purpose of the embodiments of the present application is to propose a matching conversion method and system for star flash SLE and Ethernet protocol, to realize efficient, low-latency, and secure routing conversion of star flash SLE and Ethernet, and to preserve the ultra-low power consumption characteristics of star flash.
[0005] To achieve the above purpose, one aspect of the embodiments of the present application proposes a matching conversion method for star flash SLE and Ethernet protocol, which comprises: The star flash device receives an SLE data frame, which includes a target MAC, a source MAC, a priority label, a payload, and a check code; According to the check code, data verification is performed, and when the data verification is passed, the SLE header in the SLE data frame is stripped, the source MAC and the target MAC are retained, and the payload is taken as the payload of a UDP / IP data packet; According to the source MAC, it is determined whether there is a corresponding target device IP, and when it is determined that there is a corresponding target device IP, a UDP / IP header is added according to the corresponding target device IP, and a UDP / IP data packet is obtained by encapsulating according to the UDP / IP header; According to the priority label, the UDP / IP data packet is stored in an Ethernet sending queue.
[0006] In some embodiments, the adding of the UDP / IP header comprises: The physical IP of the star flash gateway is taken as the source IP in the UDP / IP header, and the corresponding target device IP is taken as the destination IP in the UDP / IP header; The source port in the UDP / IP header is a random port, and the destination port in the UDP / IP header is a fixed service port.
[0007] In some embodiments, the querying whether there is a corresponding target device IP according to the source MAC includes: When there is no IP corresponding to the source MAC, a linear probing algorithm is used to sequentially traverse the set virtual IP pool from the current position in the record to determine an unoccupied address until the end of the set virtual IP pool is reached. The unoccupied address is taken as a target device virtual IP, the destination IP in the UDP / IP header is determined according to the target device virtual IP, and the mapping relationship between the source MAC and the target device virtual IP is recorded.
[0008] In some embodiments, the storing the UDP / IP data packet into an Ethernet sending queue according to the priority label includes: The sending priority is set according to the priority label, and the sending position in the Ethernet sending queue is determined according to the sending priority, and the sending position is positively correlated with the sending priority.
[0009] In some embodiments, the method further includes: When the star flash device is in a sleep state, a wake-up command is sent to the star flash device. The star flash device receives the wake-up command, returns a response signal, and enters an active state, in which the star flash device receives the SLE data frame to send the UDP / IP data packet. When the UDP / IP data packet is sent successfully, the device active timestamp is updated, and when there is no SLE data frame transmission within a set time period, the star flash device returns to the sleep state.
[0010] To achieve the above object, another aspect of the embodiment of the present application proposes a star flash SLE and Ethernet protocol matching conversion method, which includes: An Ethernet receives a UDP / IP data packet, and judges whether the destination IP in the UDP / IP data packet is in a set virtual IP pool. When it is determined that the set virtual IP pool has the destination IP, the corresponding star flash device MAC address is determined according to the destination IP. The IP header and the UDP header in the UDP / IP data packet are stripped, the payload in the UDP / IP data packet is taken out, the SLE header is added according to the corresponding star flash device MAC address, and the SLE data frame is encapsulated according to the SLE header. According to a differentiated services code point in the UDP / IP data packet, the SLE data frame is stored in a StarFlash sending queue.
[0011] In some embodiments, the SLE header is added, including: An Ethernet current gateway MAC address is taken as a source MAC in the SLE header, and a StarFlash device MAC address is taken as a target MAC in the SLE header.
[0012] In some embodiments, according to the differentiated services code point in the UDP / IP data packet, the SLE data frame is stored in a StarFlash sending queue, including: According to a differentiated services code point in the UDP / IP data packet, the SLE data frame is stored in a StarFlash sending queue.
[0013] In some embodiments, according to the destination IP, the corresponding StarFlash device MAC address is determined, including: According to the destination IP, when there is no StarFlash device MAC address corresponding to the destination IP, the current UDP / IP data packet is discarded.
[0014] To achieve the above object, another aspect of the embodiment of the present application proposes a StarFlash SLE and Ethernet protocol matching conversion system, which comprises: A first receiving module is configured to receive an SLE data frame, the SLE data frame comprising a target MAC, a source MAC, a priority label, a payload and a check code; A first StarFlash conversion module is configured to perform data check according to the check code, when the data check is passed, to strip the SLE header in the SLE data frame, to reserve the source MAC and the target MAC, and to take the payload as a payload of a UDP / IP data packet; A second StarFlash conversion module is configured to query whether there is a corresponding target device IP according to the source MAC, when it is determined that there is a corresponding target device IP, to add a UDP / IP header according to the corresponding target device IP, and to encapsulate the UDP / IP data packet according to the UDP / IP header; A third StarFlash conversion module is configured to store the UDP / IP data packet in an Ethernet sending queue according to the priority label; A second receiving module is configured to receive an UDP / IP data packet in Ethernet, to judge whether a destination IP in the UDP / IP data packet is in a set virtual IP pool; A first Ethernet conversion module is configured to determine a corresponding StarFlash device MAC address according to the destination IP when it is determined that the set virtual IP pool has the destination IP; a second Ethernet conversion module, configured to strip the IP header and the UDP header in the UDP / IP data packet, to take out the payload in the UDP / IP data packet, to add an SLE header according to the corresponding star flash device MAC address, and to encapsulate an SLE data frame according to the SLE header; a third Ethernet conversion module, configured to put the SLE data frame into a star flash sending queue according to a differentiated services code point in the UDP / IP data packet.
[0015] The application provides a matching conversion method and system for star flash SLE and Ethernet protocol, which directly extracts SLE payload to generate an IP packet by taking the payload as the payload of the UDP / IP data packet, skips redundant protocol layers, and performs a protocol stripping-reconstruction mechanism; according to the source MAC, whether there is a corresponding target device IP is queried, a virtual IP is automatically allocated and the SLE device MAC is mapped, address conflict is avoided; according to the priority label, the UDP / IP data packet is stored into an Ethernet sending queue, the Ethernet queue is scheduled according to the SLE header priority label, the star flash original encryption mechanism is inherited, the star flash SLE is extended to the IP network, the security vulnerability of the protocol conversion layer is prevented, and the star flash SLE and Ethernet are efficiently, low-latency and securely routed and converted, and the ultra-low power consumption characteristic of the star flash is reserved. BRIEF DESCRIPTION OF DRAWINGS
[0016] Figure 1 is a flowchart of a matching conversion method for star flash SLE and Ethernet protocol provided by an embodiment of the application; Figure 2 is a flowchart of a matching conversion method for star flash SLE and Ethernet protocol provided by another embodiment of the application; Figure 3 is a schematic diagram of a hardware structure framework of a vehicle control device provided by an embodiment of the application. DETAILED DESCRIPTION
[0017] In order to make the objects, technical solutions and advantages of the application clearer, the application will be further described in detail below with reference to the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the application and do not limit the application. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementation described in the following exemplary embodiments does not represent all the implementations consistent with the embodiments of the application, but is only an example of devices and methods consistent with some aspects of the embodiments of the application as described in the appended claims.
[0018] It is understood that the terms "first," "second," etc., used in this application may be used to describe various concepts herein, but unless otherwise specified, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another. For example, without departing from the scope of embodiments of this application, Ethernet signaling information may also be referred to as interface signaling information, and similarly, interface signaling information may also be referred to as Ethernet signaling information. Depending on the context, the words "if" or "when" as used herein may be interpreted as "when," "in response to a determination," or "in the event of a determination."
[0019] As used in this application, the terms "at least one", "multiple", "each", "any", etc., "at least one" includes one, two or more, "multiple" includes two or more, "each" refers to each of the corresponding multiples, and "any" refers to any one of the multiples.
[0020] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.
[0021] Before providing a detailed description of the embodiments of this application, some of the nouns and terms involved in the embodiments of this application will be explained first. The nouns and terms involved in the embodiments of this application are subject to the following interpretations.
[0022] DSCP, or Differentiated Services Code Point, is a numerical value used in IP networks to mark and identify the priority of data packets.
[0023] In some embodiments of one aspect of the present invention Figure 1 This is an optional flowchart of the matching and conversion method between StarSpark SLE and Ethernet protocol provided in the embodiments of this application. Figure 1 The method may include, but is not limited to, steps S100 to S400.
[0024] In step S100, the StarScan device receives an SLE data frame, which includes a target MAC, source MAC, priority tag, payload, and checksum.
[0025] Step S200: Perform data verification based on the checksum. After the data verification passes, strip the SLE header from the SLE data frame, retain the source MAC and destination MAC, and use the payload as the effective payload of the UDP / IP data packet.
[0026] Step S300: Based on the source MAC address, query whether there is a corresponding target device IP address. When it is determined that there is a corresponding target device IP address, add a UDP / IP header based on the corresponding target device IP address, and encapsulate the UDP / IP data packet based on the UDP / IP header.
[0027] Step S400: Store the UDP / IP packets into the Ethernet transmit queue according to the priority label.
[0028] Steps S100 to S400 as illustrated in this embodiment of the application involve directly extracting the SLE payload to generate IP packets by using the payload as the effective payload of UDP / IP data packets, skipping redundant protocol layers, and executing a protocol stripping-reconstruction mechanism; querying whether there is a corresponding target device IP based on the source MAC, automatically allocating a virtual IP and mapping it to the SLE device MAC to avoid address conflicts; storing UDP / IP data packets in the Ethernet transmission queue based on priority tags, scheduling the Ethernet queue according to the SLE header priority tags, inheriting the StarShine native encryption mechanism, extending it to the IP network, preventing security vulnerabilities in the protocol conversion layer, and performing extremely low latency conversion to achieve efficient, low-latency, and secure routing conversion between StarShine SLE and Ethernet, while retaining StarShine's ultra-low power consumption characteristics.
[0029] In some embodiments of S100, the star-flash module receives complete SLE data frames via the serial peripheral interface SPI.
[0030] The format of an SLE data frame is Destination MAC (6B) + Source MAC (6B) + QoS label (2B) + Payload + Checksum (2B). That is, an SLE data frame includes: Destination MAC, Source MAC, Priority label, Payload and Checksum.
[0031] SLE data frames can be sent from the target device to the StarScan device.
[0032] In some embodiments of S200, a checksum is used to perform CRC data verification to determine the validity of the current SLE data frame.
[0033] If the data verification passes, the current SLE data frame is considered valid; if the data verification fails, the current SLE data frame is discarded.
[0034] The SLE header is stripped from the SLE data frame, the source MAC and destination MAC are retained, and the payload is used as the payload of the UDP / IP packet.
[0035] In some embodiments of S300, the mapping table is queried based on the source MAC address to check if there is a corresponding target device IP.
[0036] If a target device IP corresponding to the source MAC address exists, the UDP / IP header of the UDP / IP packet is encapsulated using the gateway physical IP of the StarSpark device and the corresponding target device IP.
[0037] The gateway physical IP of the StarFlash device is used as the source IP of the UDP / IP data packet, and the corresponding target device IP is used as the destination IP of the UDP / IP data packet. The source port is a random port, and the destination port is a fixed service port.
[0038] The UDP / IP data packet is encapsulated based on the UDP / IP header, priority label, and payload.
[0039] In some embodiments of S400, a transmission priority is set based on the current SLE data frame priority label, and high-priority frames are inserted into the head of the Ethernet transmission queue and processed by the Ethernet transmission thread.
[0040] In other words, the transmission priority is set according to the QoS label of the SLE data frame, and high-priority frames are inserted at the head of the queue. The transmission priority is divided into 0 to 3 levels, with 0 being the highest transmission priority.
[0041] In some embodiments of this invention, step S300, querying whether there is a corresponding target device IP, further includes: S301. When there is no IP corresponding to the source MAC, a linear probing algorithm is used to sequentially traverse the set virtual IP pool starting from the current recorded position to determine the unoccupied address until the end of the set virtual IP pool is reached. S302: Use the unused address as the target device's virtual IP, determine the destination IP in the UDP / IP header based on the target device's virtual IP, and record the mapping relationship between the source MAC and the target device's virtual IP.
[0042] In this embodiment, if the source MAC address is queried in the mapping table and no corresponding target device IP is found, a virtual IP is allocated to the source MAC address from the virtual IP pool, and the mapping relationship between the two is recorded.
[0043] The dynamic allocation mechanism is based on MAC address and IPv4 address allocation, used to manage the virtual IP allocation of StarSpark devices. A linear probing algorithm is employed, starting from the current recorded position, sequentially traversing the set virtual IP pool to find an unoccupied address, and using that address as the target device's virtual IP. When the end of the set virtual IP pool is reached, it automatically loops back to the beginning of the set virtual IP pool, achieving cyclic allocation.
[0044] The mapping relationship between the MAC address of the StarFlash device and the assigned virtual IP is stored in a hash table. When the virtual IP pool is exhausted or the number of devices exceeds the limit, it returns 0, indicating that the allocation failed.
[0045] Virtual IPs are automatically assigned and SLE device MAC addresses are mapped via S301 to S302 to avoid address conflicts.
[0046] In some embodiments of this invention, the process of adding the UDP / IP header in S300 specifically includes the following steps: S310 uses the physical IP of the StarSpark gateway as the source IP in the UDP / IP header and the corresponding target device IP as the destination IP in the UDP / IP header.
[0047] In S320, the source port in the UDP / IP header is a random port, and the destination port in the UDP / IP header is a fixed service port.
[0048] In this embodiment, the gateway physical IP of the StarFlash device is used as the source IP of the UDP / IP data packet, and the corresponding target device IP is used as the destination IP of the UDP / IP data packet. The source port is a random port, and the destination port is a fixed service port.
[0049] If the target MAC address is the gateway, enter the gateway IP address; otherwise, send a broadcast.
[0050] In this embodiment, the random port is greater than 1024, and the fixed service port is 5023.
[0051] In some embodiments of this invention, S400, the process of storing UDP / IP packets into the Ethernet transmission queue specifically includes: The S410 sets the transmission priority based on the priority tag, and determines the transmission position in the Ethernet transmission queue based on the transmission priority. The transmission position is positively correlated with the transmission priority.
[0052] In this embodiment, the transmission priority is set according to the priority label of the SLE data frame, and the transmission position of the current UDP / IP data in the Ethernet transmission queue is determined based on the transmission priority.
[0053] The sending position is positively correlated with the sending priority; the higher the sending priority, the closer the sending position is to the head of the Ethernet sending queue.
[0054] Specifically, the transmission priority is set according to the QoS label of the SLE data frame, and high-priority frames are inserted at the head of the queue. The transmission priority is divided into 0 to 3 levels, with 0 being the highest transmission priority.
[0055] In some embodiments of this invention, the conversion matching conversion method on the star flash side further includes: S500: When the StarShock device is in sleep mode, a wake-up command is sent to the StarShock device.
[0056] S510: When the StarScan device receives a wake-up command, it returns a response signal and enters the active state. In the active state, the StarScan device receives SLE data frames to send UDP / IP packets.
[0057] S520: After a UDP / IP packet is successfully sent, the device's active timestamp is updated. If no SLE data frame is transmitted within the set time period, the StarFlash device returns to sleep mode.
[0058] In this embodiment, when the StarScan device is in sleep mode, when the StarScan gateway receives an SLE data frame, it first queries the status of the StarScan device to determine whether the StarScan device is in sleep mode.
[0059] Once it is determined that the Starflash device is in sleep mode, a wake-up command is broadcast and a timeout timer is started.
[0060] When the StarShock device receives the wake-up command, it enters the active state and sends back an ACK response signal. When the target device receives the ACK response signal, it immediately sends an SLE data frame to the StarShock device. If the StarShock device does not send back a response signal within the set feedback time period, it stores the data in the cache storage area and starts the retry mechanism to send the wake-up command again until the set number of wake-up commands is reached.
[0061] When it is determined that the StarShutter device is already active, an SLE data frame is sent directly. After each successful communication, the device's active timestamp is updated. If no SLE data frame is transmitted within the set time period, the StarShutter device returns to sleep mode, forming a complete low-power control closed loop.
[0062] The feedback time period and the time period itself can be set according to actual needs, and this application does not impose specific restrictions.
[0063] In another embodiment, when the StarScan device is in sleep mode, the gateway temporarily stores the data in a circular buffer (an independent buffer for each device), and sends it in batches after the StarScan device is woken up. The buffer size is configurable, and when it overflows, the oldest data is discarded based on the storage time.
[0064] Through S500 to S520, the gateway asynchronously caches data, reducing the number of SLE device wake-ups, optimizing the power consumption of StarFlash devices, and retaining StarFlash's ultra-low power consumption characteristics.
[0065] In another embodiment of the invention, Figure 2This is an optional flowchart of the matching and conversion method between StarSpark SLE and Ethernet protocol provided in the embodiments of this application. Figure 2 The method may include, but is not limited to, steps S600 to S900.
[0066] Step S600: Ethernet receives UDP / IP packets and determines whether the destination IP in the UDP / IP packets is in the configured virtual IP pool.
[0067] Step S700: When it is determined that the virtual IP pool has a destination IP, the corresponding StarSpark device MAC address is determined based on the destination IP.
[0068] Step S800: Strip the IP header and UDP header from the UDP / IP data packet, extract the payload from the UDP / IP data packet, add an SLE header according to the corresponding StarScan device MAC address, and encapsulate the data into an SLE data frame according to the SLE header.
[0069] Step S900: Based on the distinguishing service code points in the UDP / IP data packets, store the SLE data frames into the Star Flash transmission queue.
[0070] In some embodiments of S600, the Ethernet interrupt service routine receives UDP / IP packets output by an external device. The UDP / IP packets include: source IP, destination IP, payload, and differentiated service code point.
[0071] Based on the destination IP, check whether the destination IP is in the configured virtual IP pool to determine whether Ethernet transmission is required.
[0072] If yes, then parse the UDP / IP header; otherwise, forward it to another network.
[0073] In some embodiments of S700, when it is determined that a destination IP exists in the virtual IP pool, the corresponding Star Flash device MAC address is obtained by querying the mapping table based on the destination IP.
[0074] In some embodiments of S800, the IP header and UDP header are stripped, the payload is extracted, and an SLE header is added based on the corresponding StarScan device MAC address obtained from the query. The SLE data frame is then encapsulated using the payload, SLE header, and Differentiated Services Code Point (DSC).
[0075] Specifically, the MAC address obtained from the query is used as the target MAC address, and the gateway MAC address is used as the source MAC address. The QoS label is converted according to the DSCP value in the data packet. For example, DSCP EF corresponds to QoS=0, the highest priority.
[0076] In some embodiments of S900, the encapsulated SLE data frame is placed into the Star Flash transmission queue and processed by the Star Flash transmission thread.
[0077] In another embodiment of the present invention, in S700, determining the corresponding StarScan device MAC address further includes the following steps: S710, based on the destination IP, discards the current UDP / IP packet if there is no corresponding StarSpark device MAC address for the destination IP.
[0078] In this embodiment, the virtual IP pool is queried using the destination IP. If no MAC address of the StarSpark device corresponding to the destination IP is found, the current UDP / IP data packet is discarded.
[0079] In another embodiment of the present invention, in S800, the process of adding the SLE header specifically includes the following steps: S810 uses the current Ethernet gateway MAC address as the source MAC address in the SLE header and the StarScan device MAC address as the destination MAC address in the SLE header.
[0080] In this embodiment, the MAC address obtained from the query is used as the target MAC address, and the gateway MAC address is used as the source MAC address. The QoS label is converted according to the DSCP value in the data packet. For example, DSCP EF corresponds to QoS=0, the highest priority.
[0081] In another embodiment of the present invention, in S900, the SLE data frame is stored in the star flash transmission queue, including: The S910 uses weighted fair queue scheduling, mapping the differentiated service code points in UDP / IP packets to four queues.
[0082] In this embodiment, on the Ethernet side, IP packets are mapped to four queues based on their DSCP values (0-63), and weighted fair queues (WFQ) are used for scheduling.
[0083] In another embodiment of the present invention, a matching and conversion system for StarSpeed SLE and Ethernet protocols includes: The first receiving module is used to receive SLE data frames, which include the destination MAC, source MAC, priority tag, payload, and checksum.
[0084] The first star-flash conversion module is used to verify data based on the checksum. When the data verification is successful, the SLE header in the SLE data frame is stripped off, the source MAC and destination MAC are retained, and the payload is used as the payload of the UDP / IP data packet.
[0085] The second StarFlash conversion module is used to query whether there is a corresponding target device IP based on the source MAC. When a corresponding target device IP is found, a UDP / IP header is added based on the corresponding target device IP, and a UDP / IP data packet is encapsulated based on the UDP / IP header.
[0086] The third star-flash conversion module is used to store UDP / IP packets into the Ethernet transmission queue according to priority tags.
[0087] The second receiving module is used to receive UDP / IP packets over Ethernet and determine whether the destination IP in the UDP / IP packet is in the set virtual IP pool.
[0088] The first Ethernet conversion module is used to determine the corresponding StarSpark device MAC address based on the destination IP when it is determined that the virtual IP pool exists.
[0089] The second Ethernet conversion module is used to strip the IP header and UDP header from the UDP / IP data packet, extract the payload from the UDP / IP data packet, add an SLE header according to the corresponding StarScan device MAC address, and encapsulate the data into an SLE data frame based on the SLE header.
[0090] The third Ethernet conversion module is used to distinguish the service code points in the UDP / IP packets and put the SLE data frames into the Star Flash transmission queue.
[0091] It is understood that the content of the above method embodiments is applicable to this system embodiment. The specific functions implemented in this system embodiment are the same as those in the above method embodiments, and the beneficial effects achieved are also the same as those achieved in the above method embodiments.
[0092] The following is a detailed description and explanation of the solutions in the embodiments of the present invention, in conjunction with specific scenarios: Scenario: Vehicle interior light controller with Starlight feature. Starlight interior lights (MAC: 00:11:22:33:44:55), gateway (virtual IP pool: 192.168.100.0 / 24) The interior light controller actively registers: After the vehicle is powered off for the first time, the interior light controller sends a broadcast frame. When the on-board StarSignal SLE gateway, which is in an active state, receives the broadcast, it queries and determines that there is no corresponding target device IP. Then, it assigns a virtual IP = 192.168.100.1 and records the mapping relationship between the interior light controller and the virtual IP.
[0093] The vehicle-mounted unit sends an Ethernet UDP control command (UDP packet: destination IP=192.168.100.1, port=5023, payload="ON").
[0094] The vehicle-mounted StarSignal SLE gateway parses the received Ethernet UDP packets, queries the mapping table to obtain the MAC address, and extracts the payload.
[0095] The vehicle-mounted StarSignal SLE gateway re-encapsulates the extracted payload into an SLE frame (target MAC=00:11:22:33:44:55, QoS=0).
[0096] The vehicle-mounted SLE gateway sends SLE data frames to the interior lighting controller, which then parses the SLE data frames and responds with relevant control commands.
[0097] Another embodiment of this application provides a vehicle control device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the above-described matching and conversion method between the StarFlash SLE and Ethernet protocols. This vehicle control device can be any smart terminal, including a tablet computer, an in-vehicle computer, or similar device.
[0098] It is understood that the content of the above method embodiments is applicable to this device embodiment. The specific functions implemented by this device embodiment are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0099] Please see Figure 3 , Figure 3 The hardware structure of a vehicle control device according to another embodiment is illustrated. The vehicle control device includes: The processor can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to achieve the technical solutions provided in the embodiments of this application. The memory can be implemented in the form of read-only memory (ROM), static storage device, dynamic storage device, or random access memory (RAM). The memory can store the operating system and other applications. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory and called by the processor to execute the matching and conversion method between StarScan SLE and Ethernet protocols in the embodiments of this application. Input / output interfaces are used to implement information input and output; The communication interface is used to enable communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.). A bus is used to transfer information between various components of a device, such as processors, memory, input / output interfaces, and communication interfaces. The processor, memory, input / output interfaces, and communication interfaces communicate with each other within the device via a bus.
[0100] This invention also provides a vehicle that includes the matching and conversion method between StarFlash SLE and Ethernet protocol described in the above embodiments.
[0101] The vehicle can be a private car, such as a sedan, SUV, MPV, or pickup truck. It can also be a commercial vehicle, such as a van, bus, small truck, or large semi-trailer. The vehicle must have an electric motor capable of outputting power or acting as a generator to store mechanical energy. When the vehicle is a new energy vehicle, it can be a hybrid or a pure electric vehicle.
[0102] Since the vehicle applies all the technical solutions of the above-described vehicle control device, it has at least all the beneficial effects brought about by the technical solutions of the above embodiments, which will not be repeated here.
[0103] Another embodiment of the present invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described matching and conversion method between StarSpark SLE and Ethernet protocols.
[0104] It is understood that the content of the above method embodiments is applicable to this storage medium embodiment. The specific functions implemented in this storage medium embodiment are the same as those in the above method embodiments, and the beneficial effects achieved are also the same as those achieved in the above method embodiments.
[0105] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0106] The embodiments described in this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided by the embodiments of this application. As those skilled in the art will know, with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.
[0107] Those skilled in the art will understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of this application, and may include more or fewer steps than shown, or combine certain steps, or different steps.
[0108] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0109] Those skilled in the art will understand that all or some of the steps in the methods disclosed above, as well as the functional modules / units in the systems and devices, can be implemented as software, firmware, hardware, or suitable combinations thereof.
[0110] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0111] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.
[0112] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0113] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0114] The preferred embodiments of the present application have been described above with reference to the accompanying drawings, but this does not limit the scope of the claims of the present application. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and substance of the embodiments of the present application shall be within the scope of the claims of the present application.
Claims
1. A method for matching conversion of Star Flash SLE and Ethernet protocol, characterized in that, The method comprises: The star flash device receives an SLE data frame, the SLE data frame comprising a target MAC, a source MAC, a priority label, a payload and a check code; According to the check code, data is checked, when the data check is passed, the SLE header in the SLE data frame is stripped, the source MAC and the target MAC are reserved, and the payload is taken as the payload of a UDP / IP data packet; According to the source MAC, it is inquired whether there is a corresponding target device IP, when it is determined that there is a corresponding target device IP, a UDP / IP header is added according to the corresponding target device IP, and the UDP / IP data packet is obtained by encapsulating according to the UDP / IP header; According to the priority label, the UDP / IP data packet is stored into an Ethernet sending queue.
2. The matching conversion method of star flash SLE and Ethernet protocol according to claim 1, characterized in that, The addition of the UDP / IP header comprises: The star flash gateway physical IP is taken as the source IP in the UDP / IP header, and the corresponding target device IP is taken as the destination IP in the UDP / IP header; The source port in the UDP / IP header is a random port, and the destination port in the UDP / IP header is a set fixed service port.
3. The matching conversion method of StarFlash SLE and Ethernet protocol according to claim 1, characterized in that, According to the source MAC, it is inquired whether there is a corresponding target device IP, which comprises: When there is no IP corresponding to the source MAC, a linear detection algorithm is used to sequentially traverse a set virtual IP pool from a current recorded position to determine an unoccupied address until a pool tail of the set virtual IP pool is reached; The unoccupied address is taken as a target device virtual IP, the destination IP in the UDP / IP header is determined according to the target device virtual IP, and the mapping relationship between the source MAC and the target device virtual IP is recorded.
4. The method of claim 1, wherein the star flash SLE and Ethernet protocol matching conversion method is characterized by, According to the priority label, the UDP / IP data packet is stored into an Ethernet sending queue, which comprises: According to the priority label, a sending priority is set, a sending position in the Ethernet sending queue is determined according to the sending priority, and the sending position is positively correlated with the sending priority.
5. The method of claim 1, wherein the star flash SLE and Ethernet protocol matching conversion method is characterized by, The method further comprises: When the star flash device is in a dormant state, a wake-up command is sent to the star flash device; The star flash device receives the wake-up command, returns a response signal, enters an active state, and in the active state, the star flash device receives the SLE data frame to send the UDP / IP data packet; When the UDP / IP data packet is sent successfully, a device active timestamp is updated, and when there is no SLE data frame transmission in a set time period, the star flash device returns to the dormant state.
6. A method for matching conversion of StarFlash SLE and Ethernet protocol, characterized in that, The method comprises: An Ethernet receives a UDP / IP data packet, and judges whether the destination IP in the UDP / IP data packet is in a set virtual IP pool; When it is determined that the set virtual IP pool has the destination IP, a corresponding star flash device MAC address is determined according to the destination IP; stripping the IP header and the UDP header in the UDP / IP data packet, taking out the payload in the UDP / IP data packet, adding an SLE header according to the corresponding star flash device MAC address, and encapsulating an SLE data frame according to the SLE header; storing the SLE data frame into a star flash sending queue according to a differentiated services code point in the UDP / IP data packet.
7. The matching conversion method of star flash SLE and Ethernet protocol according to claim 6, characterized in that, The adding of the SLE header comprises: taking an Ethernet current gateway MAC address as a source MAC in the SLE header, and taking the star flash device MAC address as a target MAC in the SLE header.
8. The matching conversion method of star flash SLE and Ethernet protocol according to claim 6, characterized in that, The storing of the SLE data frame into the star flash sending queue according to the differentiated services code point in the UDP / IP data packet comprises: mapping the differentiated services code point in the UDP / IP data packet to four queues, and using a weighted fair queue scheduling.
9. The matching conversion method of star flash SLE and Ethernet protocol according to claim 6, characterized in that, The determining of the corresponding star flash device MAC address according to the destination IP comprises: when there is no star flash device MAC address corresponding to the destination IP, discarding the current UDP / IP data packet.
10. A system for matching and converting Starburst SLE and Ethernet protocols, comprising: The system comprises: a first receiving module configured to receive an SLE data frame, the SLE data frame comprising a target MAC, a source MAC, a priority label, a payload and a check code; a first star flash conversion module configured to perform data check according to the check code, and when the data check passes, to strip an SLE header in the SLE data frame, to retain the source MAC and the target MAC, and to take the payload as a payload of a UDP / IP data packet; a second star flash conversion module configured to query whether there is a corresponding target device IP according to the source MAC, and when it is determined that there is a corresponding target device IP, to add a UDP / IP header according to the corresponding target device IP, and to encapsulate the UDP / IP data packet according to the UDP / IP header; a third star flash conversion module configured to store the UDP / IP data packet into an Ethernet sending queue according to the priority label; a second receiving module configured to receive a UDP / IP data packet via Ethernet, and to judge whether a destination IP in the UDP / IP data packet is in a set virtual IP pool; a first Ethernet conversion module configured to, when it is determined that the set virtual IP pool has the destination IP, determine a corresponding star flash device MAC address according to the destination IP; a second Ethernet conversion module configured to strip an IP header and a UDP header in the UDP / IP data packet, to take out a payload in the UDP / IP data packet, to add an SLE header according to the corresponding star flash device MAC address, and to encapsulate an SLE data frame according to the SLE header; a third Ethernet conversion module configured to store the SLE data frame into a star flash sending queue according to a differentiated services code point in the UDP / IP data packet.