Protocol conversion-based device communication method and device
By establishing address translation and protocol header information translation relationships between devices, the problem of low communication efficiency between heterogeneous devices is solved, achieving efficient data transmission between devices and improving the compatibility and communication performance of heterogeneous devices.
Patent Information
- Application Number
- CN202511755940.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-26
- Publication Date
- 2026-02-13
- Estimated Expiration
- 2045-11-26
AI Technical Summary
In the existing technology, the communication efficiency between heterogeneous devices is low, mainly due to the large conversion delay caused by deploying independent protocol conversion chips, which hinders the large-scale application of the CXL protocol.
By acquiring the historical communication characteristics of the device, address translation relationships and protocol header information translation relationships are constructed to enable data transmission between different versions of the device, avoiding the need to deploy additional protocol conversion chips.
It improves the communication efficiency between devices, avoids the conversion delay caused by protocol conversion chips, and enhances the compatibility and communication performance between heterogeneous devices.
Smart Images

Figure CN121217841B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of servers, and particularly relates to a device communication method and device based on protocol conversion. BACKGROUND
[0002] With the rapid development of cloud computing, artificial intelligence and other technologies, the demand for communication efficiency between heterogeneous devices in a server data center is increasingly high. Among them, the CXL (Compute Express Link) protocol, as a new generation of high-speed interconnection standard, is mainly used to solve the efficient communication problem between heterogeneous devices such as CPU, GPU, memory expansion card and the like.
[0003] At present, mixed deployment of heterogeneous devices supporting different versions leads to more and more prominent compatibility problems of heterogeneous devices, which seriously hinders the large-scale application of the CXL protocol. In related technologies, independent protocol conversion chips are deployed to realize the interconnection of devices of different versions. However, when realizing the interconnection of devices of different versions through the protocol conversion chip, the conversion delay is large, and therefore the communication efficiency between devices is reduced. SUMMARY
[0004] The present application provides a device communication method and device based on protocol conversion, to at least solve the problem of low communication efficiency between devices in related technologies.
[0005] In one aspect, the present application provides a device communication method based on protocol conversion, comprising:
[0006] In response to a communication request sent by a first device deployed on a server to a second device, obtaining a first protocol version corresponding to the first device, historical communication characteristics of transmitted data, and a second protocol version corresponding to the second device;
[0007] According to the business scenario and historical address mapping information in the historical communication characteristics, an address conversion relationship between the first device and a target memory block in the second device for processing the communication request is constructed;
[0008] According to the business scenario in the historical communication characteristics, the first protocol header information corresponding to the first protocol version is converted into the second protocol header information corresponding to the second protocol version, and a protocol header information conversion relationship between the first device and the target memory block is constructed;
[0009] According to the address conversion relationship and the protocol header information conversion relationship between the first device and the target memory block, the communication between the first device and the second device is realized.
[0010] In another aspect, the present application provides a device communication apparatus based on protocol conversion, comprising:
[0011] The acquisition unit is configured to acquire, in response to a communication request sent by a first device deployed on a server to a second device, a first protocol version corresponding to the first device, historical communication characteristics of transmitted data, and a second protocol version corresponding to the second device.
[0012] The first construction unit is configured to construct, according to a service scenario and historical address mapping information in the historical communication characteristics, an address conversion relationship between the first device and a target memory block in the second device for processing the communication request.
[0013] The second construction unit is configured to convert, according to a service scenario in the historical communication characteristics, first protocol header information corresponding to the first protocol version into second protocol header information corresponding to the second protocol version, and construct a protocol header information conversion relationship between the first device and the target memory block.
[0014] The communication unit is configured to realize communication between the first device and the second device according to the address conversion relationship and the protocol header information conversion relationship between the first device and the target memory block.
[0015] The application further provides an electronic device, including a memory configured to store a computer program, and a processor configured to execute the computer program to implement the steps of any of the device communication methods based on protocol conversion.
[0016] The application further provides a computer readable storage medium, and the computer readable storage medium stores a computer program, wherein the computer program is executed by a processor to implement the steps of any of the device communication methods based on protocol conversion.
[0017] The application further provides a computer program product, including a computer program, and the computer program is executed by a processor to implement the steps of any of the device communication methods based on protocol conversion.
[0018] The application provides a device communication method and device based on protocol conversion, and the method comprises the following steps: in response to a communication request sent by a first device deployed on a server to a second device, obtaining a first protocol version corresponding to the first device, historical communication characteristics of transmitted data, and a second protocol version corresponding to the second device; constructing an address conversion relationship between the first device and a target memory block in the second device for processing the communication request according to a business scenario and historical address mapping information in the historical communication characteristics; converting first protocol header information corresponding to the first protocol version into second protocol header information corresponding to the second protocol version according to the business scenario in the historical communication characteristics, and constructing a protocol header information conversion relationship between the first device and the target memory block; and realizing communication between the first device and the second device according to the address conversion relationship and the protocol header information conversion relationship between the first device and the target memory block. In the embodiment of the application, the address conversion relationship and the protocol header information conversion relationship between devices of different versions are constructed according to the business scenario and the historical address mapping information in the historical communication characteristics, and then the data transmission between devices of different versions is realized through the address conversion relationship and the protocol header information conversion relationship, so that an additional protocol conversion chip is not needed, conversion delay caused by the protocol conversion chip is avoided, and therefore the communication efficiency between devices is improved. BRIEF DESCRIPTION OF DRAWINGS
[0019] In order to more clearly illustrate the embodiments of the application, the drawings needed in the embodiments will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the application, and other drawings can be obtained by those skilled in the art without creative effort on the basis of these drawings.
[0020] Figure 1 The flow of the device communication method based on protocol conversion provided by the embodiments of the application Figure 1 ;
[0021] Figure 2 The schematic diagram of the device communication method based on protocol conversion provided by the embodiments of the application Figure 1 ;
[0022] Figure 3 The structural schematic of the device communication apparatus based on protocol conversion provided by the embodiments of the application Figure 1 ;
[0023] Figure 4 The structural schematic of the electronic device provided by the application. DETAILED DESCRIPTION
[0024] With reference to the drawings of the embodiments of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described. Obviously, the described embodiments are only a part of the embodiments of the present application, but not all embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by a person of ordinary skill in the art without creative work fall within the protection scope of the present application.
[0025] It should be noted that, in the description of the present application, the terms "comprise", "contain" or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device comprising a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method, article or device. The terms "first", "second" and the like in the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence.
[0026] With the rapid development of technologies such as cloud computing and artificial intelligence, the demand for communication efficiency between heterogeneous devices in server data centers is increasing. Among them, the CXL (Compute Express Link) protocol, as a new generation of high-speed interconnection standard, is mainly used to solve the efficient communication problem between heterogeneous devices such as CPU, GPU, memory expansion card, etc. The mixed deployment of heterogeneous devices supporting different versions leads to more and more prominent compatibility problems of heterogeneous devices, which seriously hinders the large-scale application of the CXL protocol.
[0027] In the related art, the interconnection of devices of different versions is realized by deploying independent protocol conversion chips. Among them, the protocol conversion chip is responsible for protocol format conversion, address mapping and cache consistency maintenance. However, when the interconnection of devices of different versions is realized through the protocol conversion chip, the conversion delay is large, thus reducing the communication efficiency between devices.
[0028] Therefore, how to fully utilize the bandwidth of multiple memory channels to improve the memory access speed of the server is a technical problem to be solved at present.
[0029] In view of the above technical problems, the present application provides a device communication method based on protocol conversion. If a device sends a communication request to other devices, the historical communication data characteristics of the device are obtained, the address conversion relationship and the protocol header information conversion relationship between the device and other devices are constructed through the historical communication data characteristics, and then the communication between the device and other devices is realized.
[0030] Optionally, the specific steps include: first, in response to a communication request sent by a first device deployed on a server to a second device, obtaining a first protocol version corresponding to the first device, historical communication characteristics of transmitted data, and a second protocol version corresponding to the second device. Then, according to the service scenario and historical address mapping information in the historical communication characteristics, an address conversion relationship between the first device and a target memory block in the second device for processing the communication request is constructed; according to the service scenario in the historical communication characteristics, first protocol header information corresponding to the first protocol version is converted into second protocol header information corresponding to the second protocol version, and a protocol header information conversion relationship between the first device and the target memory block is constructed. Finally, according to the address conversion relationship and the protocol header information conversion relationship between the first device and the target memory block, communication between the first device and the second device is realized.
[0031] In the embodiments of the present application, since the address conversion relationship and the protocol header information conversion relationship between devices of different versions are constructed through the service scenario and the historical address mapping information in the historical communication characteristics, and then the data transmission between devices of different versions is realized through the address conversion relationship and the protocol header information conversion relationship, an additional protocol conversion chip does not need to be deployed, and conversion delay caused by the protocol conversion chip is avoided, so that the communication efficiency between devices is improved.
[0032] In order for those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the drawings and specific embodiments.
[0033] In combination with the specific application environment architecture or the specific hardware architecture on which the execution of the device communication method based on protocol conversion depends, the specific application environment architecture or the specific hardware architecture is described herein.
[0034] In some embodiments, the protocol between devices of different versions is converted by a cross-version device interaction system on a server to realize data transmission between devices of different versions. Optionally, the cross-version device interaction system can include a three-layer architecture of a hardware layer, a protocol adaptation layer, and a software management layer. The hardware layer architecture includes: heterogeneous devices (such as CPUs, GPUs, memory expansion cards) installed on the server, a switch, a protocol conversion engine, a compression engine, and a self-learning module. The protocol adaptation layer includes: a version adaptation sub-layer, a protocol header processing module, and a dynamic intelligent compression controller. The software management layer includes: a global memory manager, a dynamic routing controller, an application interface layer, and a strategy optimizer.
[0035] The background art and some terms involved in the present application are explained as follows:
[0036] CXL (Compute Express Link): A high-speed interconnect protocol for CPU, GPU, memory, and other devices.
[0037] CXL.io: An input / output sub-protocol in CXL, based on PCIe 5.0 / 6.0 extension, supporting device enumeration and link management.
[0038] CXL.cache: A cache sub-protocol in CXL, supporting device access to host memory.
[0039] CXL.mem: A memory sub-protocol in CXL, supporting device direct access to host memory.
[0040] PTE (Protocol Translation Engine): Protocol translation engine, a hardware module for CXL cross-version protocol format conversion.
[0041] VAS (Version Adaptation Sub-Layer): Version adaptation sub-layer, a layered architecture component for compatibility with multiple versions of protocols.
[0042] GMM (Global Memory Manager): Global memory manager, used to uniformly schedule memory resources of multiple versions of CXL devices.
[0043] ATT (Address Translation Table): Address translation table, used for address space mapping of CXL 1.x devices and global memory pool.
[0044] VCA (Version Capability Advertisement): Version capability advertisement, a message format for exchanging protocol version information between CXL devices.
[0045] SLM (Self-Learning Module): Self-learning module, capable of optimizing protocol conversion and compression strategies through analysis of historical data.
[0046] DIC (Dynamic Intelligent Compression): Dynamic intelligent compression, a technology that automatically adjusts compression methods according to different scenarios.
[0047] Figure 1 The flow of the device communication method based on protocol conversion provided by the embodiments of the present application Figure 1 , the execution subject of the device communication method based on protocol conversion can be a server. As Figure 2 shown, the method comprises:
[0048] S101, in response to a communication request sent by a first device deployed on a server to a second device, obtaining a first protocol version corresponding to the first device, historical communication characteristics of transmitted data, and a second protocol version corresponding to the second device.
[0049] In the embodiments of the present disclosure, the first device and the second device can be any type of device installed on the server. For example, CPU, GPU, memory expansion card, etc. Alternatively, the first device and the second device are heterogeneous devices installed on the server through a PCIe (Peripheral Component Interconnect Express) slot.
[0050] For example, in the link initialization phase, the host device (for example, a CXL switch deployed on the server) sends a more intelligent version detection frame through the enumeration process of the extended CXL.io protocol. This detection frame not only obtains the version information of the slave device (for example, a memory expansion card), but also collects the historical communication data characteristics of the device, such as commonly used protocol fields, data transmission frequency, etc.
[0051] Alternatively, after the slave device (for example, a memory expansion card) receives the version detection frame, it returns its own version information (such as 1.1) and related historical data characteristics. The self-learning module (SLM) of the host device analyzes the historical data characteristics and determines the conversion strategy in combination with the historical conversion record. The specific method is explained in steps S102 and S103.
[0052] S102, according to the business scenario and the historical address mapping information in the historical communication characteristics, constructing an address conversion relationship between the target memory block in the first device and the second device for processing the communication request.
[0053] In the embodiments of the present disclosure, the business scenario is used to indicate the application scenario of the transmitted data. For example, model training, database query, etc. Among them, the historical address mapping information is used to indicate the address conversion relationship of the transmitted data.
[0054] In some embodiments, according to the business scenario and the historical address mapping information in the historical communication characteristics, the address conversion relationship between the target memory block in the first device and the second device for processing the communication request can include the following steps (1) to (2):
[0055] (1) According to the business scenario in the historical communication characteristics, determining the target memory block in the second device for processing the communication request and the first memory address corresponding to the target memory block.
[0056] In the embodiments of the present disclosure, the plurality of memory blocks in the second device can be dynamically classified and adjusted according to the usage frequency and access mode of the plurality of memory blocks. For the memory blocks frequently accessed, the memory blocks can be allocated to a storage area with a faster speed.
[0057] In some embodiments, the present step can include: determining a target memory access mode corresponding to a service scenario according to the service scenario in the historical communication feature, the memory access mode being used to represent an access rule of the memory; determining a target storage area corresponding to the target memory access mode from a correspondence between the memory access mode and the storage area according to the target memory access mode, wherein the data transmission speeds of different storage areas are different; and determining a target memory block in the second device for processing the communication request and a first memory address corresponding to the target memory block from the target storage area.
[0058] Optionally, the storage area includes a high-speed storage area, a medium-speed storage area and a low-speed storage area. The data transmission speed of the high-speed storage area is greater than or equal to the first data transmission speed, the data transmission speed of the low-speed storage area is less than or equal to the second data transmission speed, and the data transmission speed of the medium-speed storage area is greater than the second data transmission speed and less than the first data transmission speed. In the embodiments of the present disclosure, the values of the first data transmission speed and the second data transmission speed are not specifically limited and can be set and modified as needed.
[0059] Optionally, the memory access mode includes one or more of a continuous address access mode, a random address access mode and a periodic address access mode. For example, the memory access mode corresponding to the model training data is the continuous address access mode, and the storage area corresponding to the continuous address access mode is the high-speed storage area.
[0060] In the embodiments of the present disclosure, the plurality of memory blocks in the second device can be dynamically classified and adjusted according to the usage frequency and access mode of the plurality of memory blocks. For the memory blocks frequently accessed, the memory blocks can be allocated to a storage area with a faster speed, and the data transmission demand of various address access modes can be met, thereby improving the user experience.
[0061] (2) According to the historical address mapping information in the historical communication feature, the second memory address corresponding to the first device is converted into the first memory address, and an address conversion relationship between the first device and the target memory block is constructed.
[0062] In the embodiments of the present disclosure, the protocol conversion engine can quickly convert the second memory address corresponding to the first device into the first memory address according to the historical address mapping rule analyzed by the self-learning module.
[0063] For example, the first device is a GPU device of CXL 1.x version, and the second device is a memory pool of CXL 3.0 version. Correspondingly, the second memory address is a local address corresponding to the GPU device, and the second memory address is a global address corresponding to the memory pool.
[0064] In some embodiments, the historical address mapping information includes a plurality of historical address mappings with a mapping frequency greater than a preset mapping frequency; optionally, the memory address is converted according to the pre-stored mapping information; accordingly, the step can include: selecting a target historical address mapping corresponding to the second memory address from the plurality of historical address mappings according to the historical address mapping information in the historical communication feature; and converting the second memory address corresponding to the first device into the first memory address according to the target historical address mapping.
[0065] In the embodiments of the present disclosure, when some address mappings frequently appear, the pre-conversion can be performed in advance and stored in the historical address mapping information according to the frequency and regularity of the recorded address mapping, and then the memory address can be converted according to the pre-stored mapping information, thereby improving the conversion speed of the memory address.
[0066] Optionally, the generation process of the historical address mapping information includes: obtaining a mapping frequency of an address mapping of the data transmitted by the first device, the mapping frequency being determined according to a ratio of a mapping number in a preset time period to the preset time period; and if the mapping frequency is greater than or equal to a preset frequency, the address mapping is stored in the historical address mapping information. In the embodiments of the present disclosure, the value of the preset frequency is not specifically limited and can be set and modified as needed.
[0067] S103, according to the service scenario in the historical communication feature, the first protocol header information corresponding to the first protocol version is converted into the second protocol header information corresponding to the second protocol version, and a protocol header information conversion relationship between the first device and the target memory block is constructed.
[0068] In the embodiments of the present disclosure, a scene identification bit can be added to identify the application scenario to which the data transmission belongs. Accordingly, according to the service scenario in the historical communication feature, the first protocol header information corresponding to the first protocol version is converted into the second protocol header information corresponding to the second protocol version, including: according to the service scenario in the historical communication feature, determining a service scenario identification field corresponding to the service scenario and identification information corresponding to the service scenario identification field; and according to the protocol identification field corresponding to the service scenario and the identification information corresponding to the protocol identification field, performing protocol header extension on the first protocol header information corresponding to the first protocol version to obtain the second protocol header information corresponding to the second protocol version.
[0069] It should be noted that in addition to the original protocol header extension, the self-learning module analyzes the use of the newly added field in different scenarios. For example, in some low-priority applications, the priority identifier field changes less frequently, and the system can use a more efficient encoding method to process it.
[0070] In some embodiments, the method further comprises: obtaining the use of each of the plurality of identification fields in the second protocol header information in the historical communication features; and if the use of the identification field meets a preset compression condition, performing compression processing on the identification field.
[0071] Optionally, the use includes a repetition rate of identification information corresponding to the identification field, and the preset compression condition includes that the repetition rate of the identification information corresponding to the identification field is greater than a preset repetition rate; and / or, the use includes a change number of the identification information corresponding to the identification field, and the preset compression condition includes that the change number of the identification information corresponding to the identification field is less than a preset change number.
[0072] It should be noted that the application can also use an LSTM (Long Short-Term Memory, Long Short-Term Memory Network) model to predict the routing label and address offset in combination with the historical data provided by the self-learning module, and adjust the parameters of the prediction model according to different application scenarios. For example, for periodic data transmission, the LSTM model will pay more attention to the rules in the historical period.
[0073] In some embodiments, for a text type protocol header, a compression algorithm with a higher compression rate can be selected; for a high real-time requirement scenario, a compression algorithm with faster speed can be selected. Accordingly, the compression processing on the identification field includes: obtaining the data type and the transmission scenario corresponding to the identification field; if the data type is a text type, performing compression processing on the identification field through a first compression algorithm, and if the transmission scenario is a real-time transmission scenario, performing compression processing on the identification field through a second compression algorithm; wherein the first compression algorithm is a compression algorithm with a compression rate greater than a preset compression rate, and the second compression algorithm is a compression algorithm with a compression speed greater than a preset compression speed.
[0074] In the embodiments of the present disclosure, since the appropriate compression algorithm can be selected according to the data type and the transmission scenario corresponding to the identification field to perform compression processing on the identification field, the compression efficiency of the identification field is improved, and thus the user experience is improved.
[0075] It should be noted that in order to further improve the protocol conversion efficiency, the conversion parameters in the conversion process can be recorded in real time, and the conversion strategy can be automatically adjusted according to the conversion parameters.
[0076] In some embodiments, the conversion parameter comprises a conversion time consumption and / or a conversion error rate. Optionally, the conversion parameter comprises the conversion error rate. Accordingly, automatically adjusting the conversion strategy according to the conversion parameter can comprise: if the conversion error rate corresponding to the current conversion strategy is greater than a preset value, switching to a backup conversion strategy.
[0077] In some other embodiments, the conversion parameter comprises a data transmission speed. Optionally, automatically adjusting the monitoring window size according to the volatility of data transmission. When the data transmission is unstable, the window size is reduced, so that the compression strategy can respond to changes more quickly. Accordingly, if the change amount of the data transmission speed is greater than a preset change amount, the time of the current monitoring window is reduced by a preset time. At this time, by reducing the window size, the monitoring frequency can be improved, so that the compression strategy can respond to changes more quickly.
[0078] The monitoring window is used to detect data related to the compression strategy, for example, a data repetition rate. Optionally, when the data repetition rate is greater than a preset repetition rate threshold, the compression strategy is automatically enabled, so as to improve the conversion efficiency of the compression and improvement protocol in a timely manner.
[0079] In the embodiments of the present disclosure, the numerical values of the preset change amount, the preset time, and the preset repetition rate threshold are not specifically limited and can be set and modified according to different scene requirements.
[0080] It should be noted that in the embodiments of the present disclosure, the self-learning module SLM can also learn the ability of different devices to process compressed frames. For old devices with weak processing ability, the proportion of sending compressed frames can be reduced to ensure the stability of communication.
[0081] S104, according to the address conversion relationship between the first device and the target memory block and the protocol header information conversion relationship, realizing the communication between the first device and the second device.
[0082] In the embodiments of the present disclosure, the first protocol conversion module corresponding to the first device can be loaded according to the first protocol version, and the second protocol conversion module corresponding to the second device can be loaded according to the second protocol version through the version adaptation sublayer. When the first device transmits data to the second device, the first protocol header information of the data is converted into second protocol header information that can be received by the second device through the first protocol conversion module, so as to realize the communication between the first device and the second device. When the second device transmits data to the first device, the second protocol header information of the data is converted into first protocol header information that can be received by the first device through the second protocol conversion module, so as to realize the communication between the first device and the second device.
[0083] Optionally, the protocol conversion module includes a CXL 1.x module, a CXL 2.0 module, and a CXL 3.0 module. The CXL 1.x module dynamically adjusts the processing priority of the DMA request according to the usage of the local memory, to avoid memory access conflicts. The CXL 2.0 module adjusts the generation strategy of the routing tag according to the load of the cross-server memory pool, to balance the load between servers. The CXL 3.0 module optimizes the timing of the protocol header compression / decompression according to the cascading of the multi-level switch, to reduce the processing pressure of the intermediate nodes.
[0084] In some embodiments, the performance parameters of the device can also be acquired, and the operating parameters of the protocol conversion module are adjusted according to the performance parameters of the device. Optionally, the performance parameters of the device include the processing speed and / or the memory size. If the processing speed of the device is less than the preset processing speed and / or the memory size is less than the preset memory size, the proportion of the compressed frames sent by the protocol conversion module is reduced, to ensure the stability of the communication.
[0085] The application can also construct the network topology information corresponding to the device version information of multiple devices, and select a suitable data transmission path in combination with the current load and historical fault conditions of the devices.
[0086] Optionally, when the single-source shortest path algorithm is used to select the data transmission path, the path with the largest stability parameter can be preferentially selected in combination with the stability parameters of different paths. The stability parameter is used to indicate the stability of the data transmission path. The larger the stability parameter is, the higher the stability of the data transmission path is. Optionally, the stability parameter is negatively correlated with the device load and the historical failure rate of the device.
[0087] The following takes the CXL 1.x GPU accessing the CXL 3.0 memory pool as an example for illustration, as shown in FIG. 1, and the specific process is as follows: Figure 3
[0088] Step 1: Device access and version negotiation: After the GPU accesses the CXL switch, the switch sends an intelligent version detection frame, which not only identifies that the GPU is CXL 1.x and the memory pool is CXL 3.0, but also collects the historical communication characteristics of the GPU, such as being commonly used in AI training scenarios and having periodic data transmission.
[0089] Step 2: Load the conversion protocol module: The version adaptation sublayer VAS automatically loads the CXL 1.x and 3.0 modules, and adjusts the module operating parameters according to the performance parameters of the GPU and the memory pool, to initialize the protocol conversion engine PTE, the compression engine, and the self-learning module SLM.
[0090] Step 3: Memory access request generation: The GPU requests memory through a unified API, and the global memory manager (GMM) combines the requirements of the business scenario (for example, an AI training scenario) and the current state of the memory pool to allocate appropriate CXL 3.0 memory blocks and return a global address.
[0091] Step 4: Protocol conversion and compression: The protocol conversion engine (PTE) quickly converts the local address of the GPU into a global address according to the historical address mapping rules analyzed by the self-learning module (SLM), and inserts a 3.0 protocol header with a scenario identifier. The compression engine selects an appropriate compression algorithm according to the data characteristics of the AI training scenario, detects that the protocol header repetition rate reaches 85%, and enables compression (8 bytes → 3 bytes).
[0092] Step 5: Dynamic routing and forwarding: The switch selects the optimal path that supports compression according to the VCA information, path stability, and compression efficiency, and forwards the request to the target memory.
[0093] Step 6: Data response processing: When the memory returns data, the switch decompresses the protocol header and converts it to 1.x format, and the SLM records the conversion and compression effect for subsequent optimization, and finally returns the data to the GPU.
[0094] The present application proposes a device communication method based on protocol conversion: first, in response to a communication request sent by a first device deployed on a server to a second device, the first protocol version corresponding to the first device, the historical communication characteristics of the transmitted data, and the second protocol version corresponding to the second device are obtained. Then, according to the business scenario and historical address mapping information in the historical communication characteristics, an address conversion relationship between the target memory block for processing the communication request in the first device and the second device is constructed; according to the business scenario in the historical communication characteristics, the first protocol header information corresponding to the first protocol version is converted into the second protocol header information corresponding to the second protocol version, and a protocol header information conversion relationship between the first device and the target memory block is constructed. Finally, according to the address conversion relationship and the protocol header information conversion relationship between the first device and the target memory block, the communication between the first device and the second device is realized. In the embodiments of the present application, by constructing the address conversion relationship and the protocol header information conversion relationship between devices of different versions through the business scenario and the historical address mapping information in the historical communication characteristics, and then realizing data transmission between devices of different versions through the address conversion relationship and the protocol header information conversion relationship, it is not necessary to deploy an additional protocol conversion chip, and the conversion delay caused by the protocol conversion chip is avoided, thereby improving the communication efficiency between devices.
[0095] Figure 3 The structure diagram of the device communication apparatus based on protocol conversion provided in the embodiments of the present application is shown in FIG. 1. Figure 4 As shown in FIG. 1, the apparatus includes:
[0096] The acquisition unit 301 is configured to acquire, in response to a communication request sent by a first device deployed on a server to a second device, a first protocol version corresponding to the first device, historical communication characteristics of transmitted data, and a second protocol version corresponding to the second device.
[0097] The first construction unit 302 is configured to construct, according to a service scenario and historical address mapping information in the historical communication characteristics, an address conversion relationship between the first device and a target memory block in the second device for processing the communication request.
[0098] The second construction unit 303 is configured to convert, according to a service scenario in the historical communication characteristics, first protocol header information corresponding to the first protocol version into second protocol header information corresponding to the second protocol version, and construct a protocol header information conversion relationship between the first device and the target memory block.
[0099] The communication unit 304 is configured to realize communication between the first device and the second device according to the address conversion relationship and the protocol header information conversion relationship between the first device and the target memory block.
[0100] In some embodiments, the first construction unit 302 constructs, according to a service scenario and historical address mapping information in the historical communication characteristics, an address conversion relationship between the first device and a target memory block in the second device for processing the communication request, including: determining, according to a service scenario in the historical communication characteristics, a target memory block in the second device for processing the communication request and a first memory address corresponding to the target memory block; and converting, according to historical address mapping information in the historical communication characteristics, a second memory address corresponding to the first device into the first memory address, to construct an address conversion relationship between the first device and the target memory block.
[0101] In some embodiments, the historical address mapping information includes a plurality of historical address mappings with a mapping frequency greater than a preset mapping frequency; accordingly, the first construction unit 302 converts, according to historical address mapping information in the historical communication characteristics, a second memory address corresponding to the first device into a first memory address, including: selecting, according to historical address mapping information in the historical communication characteristics, a target historical address mapping corresponding to the second memory address from the plurality of historical address mappings; and converting, according to the target historical address mapping, the second memory address corresponding to the first device into the first memory address.
[0102] In some embodiments, the generation process of the historical address mapping information includes: acquiring a mapping frequency of an address mapping of transmitted data of the first device, the mapping frequency being determined according to a ratio of a mapping number in a preset time length to the preset time length; and if the mapping frequency is greater than or equal to a preset frequency, storing the address mapping into the historical address mapping information.
[0103] In some embodiments, the first construction unit 302 determines, according to the service scenario in the historical communication feature, a target memory block in the second device for processing the communication request and a first memory address corresponding to the target memory block, including: determining, according to the service scenario in the historical communication feature, a target memory access mode corresponding to the service scenario, the memory access mode being used to represent an access rule of the memory; determining, according to the target memory access mode, a target storage area corresponding to the target memory access mode from a correspondence between the memory access mode and the storage area, wherein the data transmission speed of different storage areas is different; and determining, from the target storage area, the target memory block in the second device for processing the communication request and the first memory address corresponding to the target memory block.
[0104] In some embodiments, the second construction unit 303 converts the first protocol header information corresponding to the first protocol version into second protocol header information corresponding to the second protocol version according to the service scenario in the historical communication feature, including: determining, according to the service scenario in the historical communication feature, a service scenario identification field corresponding to the service scenario and identification information corresponding to the service scenario identification field; and performing protocol header extension on the first protocol header information corresponding to the first protocol version according to the protocol identification field corresponding to the service scenario and the identification information corresponding to the protocol identification field, to obtain the second protocol header information corresponding to the second protocol version.
[0105] In some embodiments, the apparatus further includes a protocol compression module, configured to obtain usage of each identification field in the second protocol header information in the historical communication feature; and if the usage of the identification field meets a preset compression condition, perform compression processing on the identification field.
[0106] In some embodiments, the usage includes a repetition rate of the identification information corresponding to the identification field, and the preset compression condition includes that the repetition rate of the identification information corresponding to the identification field is greater than a preset repetition rate; and / or, the usage includes a change number of the identification information corresponding to the identification field, and the preset compression condition includes that the change number of the identification information corresponding to the identification field is less than a preset change number.
[0107] In some embodiments, the protocol compression module performs compression processing on the identification field, including: obtaining a data type and a transmission scenario corresponding to the identification field; if the data type is a text type, performing compression processing on the identification field through a first compression algorithm, and if the transmission scenario is a real-time transmission scenario, performing compression processing on the identification field through a second compression algorithm; wherein the first compression algorithm is a compression algorithm with a compression rate greater than a preset compression rate, and the second compression algorithm is a compression algorithm with a compression speed greater than a preset compression speed.
[0108] The application provides a device communication device based on protocol conversion, address conversion relationship and protocol header information conversion relationship between devices of different versions are constructed through service scenarios and historical address mapping information in historical communication features, and then data transmission between devices of different versions is realized through the address conversion relationship and the protocol header information conversion relationship, without deploying an additional protocol conversion chip, conversion delay caused by the protocol conversion chip is avoided, and therefore communication efficiency between devices is improved.
[0109] The features of the embodiments of the device communication device based on protocol conversion provided by the application can be referred to the related descriptions of the embodiments of the device communication method based on protocol conversion, which will not be repeated here.
[0110] Figure 4 The application provides a structural schematic diagram of an electronic device. As shown in the figure, The electronic device 40 provided by the embodiment includes at least one processor 401 and a memory 402. Optionally, the electronic device 40 further includes a communication component 403. The processor 401, the memory 402 and the communication component 403 are connected through a bus.
[0111] In the specific implementation process, the at least one processor 401 executes the computer execution instructions stored in the memory 402, so that the at least one processor 401 executes the device communication method based on protocol conversion described above.
[0112] The specific implementation process of the processor 401 can be referred to the method embodiments described above, which has similar implementation principles and technical effects, and will not be repeated here.
[0113] In the above embodiments, it should be understood that the processor can be a central processing unit (CPU), and can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC) and the like. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor and the like. The steps of the method disclosed in the application can be directly embodied as execution completed by a hardware processor, or executed by a combination of hardware and software modules in the processor.
[0114] The memory can include a random access memory (RAM), and can also include a non-volatile memory (NVM), for example, at least one disk memory.
[0115] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of the present application does not limit to only one bus or one type of bus.
[0116] Embodiments of the present application also provide a computer readable storage medium, which stores a computer program, wherein the computer program is configured to execute the steps in any of the above protocol conversion based device communication method embodiments when running.
[0117] In an example embodiment, the above computer readable storage medium can include, but is not limited to, a U disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and various media that can store computer programs.
[0118] Embodiments of the present application also provide a computer program product, which includes a computer program, and the computer program is executed by a processor to implement the steps in any of the above protocol conversion based device communication method embodiments.
[0119] Embodiments of the present application also provide another computer program product, which includes a non-volatile computer readable storage medium, and the non-volatile computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the steps in any of the above protocol conversion based device communication method embodiments.
[0120] The skilled person can further realize that the units and algorithm steps of the examples described in conjunction with the embodiments disclosed herein can be realized in electronic hardware, computer software or a combination of both. In order to clearly illustrate the interchangeability of hardware and software, the components and steps of the examples have been described in the above description in general terms. Whether the functions are realized in hardware or software depends on the specific application and design constraints of the technical solution. The skilled person can use different methods to realize the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.
[0121] The above describes in detail the device communication method and device based on protocol conversion provided by the present application. The principles and implementation manners of the present application are described by using specific examples, and the above description of the embodiments is only used to help understand the method of the present application and its core idea. It should be pointed out that, for those skilled in the art, some improvements and modifications can be made to the present application without departing from the principles of the present application, and these improvements and modifications also fall within the protection scope of the claims of the present application.
Claims
1. A device communication method based on protocol conversion, characterized in that, include: In response to a communication request sent from a first device deployed on the server to a second device, the system obtains the first protocol version corresponding to the first device, historical communication characteristics of the transmitted data, and the second protocol version corresponding to the second device. Based on the service scenario in the historical communication characteristics, the target memory block used to process the communication request and the first memory address corresponding to the target memory block are determined in the second device; Based on the historical address mapping information in the historical communication features, the second memory address corresponding to the first device is converted into the first memory address, and an address translation relationship between the first device and the target memory block is constructed. Based on the business scenarios in the historical communication features, determine the business scenario identifier field corresponding to the business scenario and the identifier information corresponding to the business scenario identifier field; Based on the protocol identifier field corresponding to the business scenario and the identifier information corresponding to the protocol identifier field, the first protocol header information corresponding to the first protocol version is extended to obtain the second protocol header information corresponding to the second protocol version. Based on the address translation relationship and protocol header information translation relationship between the first device and the target memory block, communication between the first device and the second device is realized.
2. The device communication method according to claim 1, characterized in that, The historical address mapping information includes multiple historical address mappings with mapping frequencies greater than a preset mapping frequency; Accordingly, the step of converting the second memory address corresponding to the first device into the first memory address based on the historical address mapping information in the historical communication features includes: The step involves selecting the target historical address mapping corresponding to the second memory address from multiple historical address mappings based on the historical address mapping information in the historical communication features. Based on the target historical address mapping, the second memory address corresponding to the first device is converted to the first memory address.
3. The device communication method according to claim 2, characterized in that, The process of generating the historical address mapping information includes: Obtain the mapping frequency corresponding to the address mapping of the data transmitted by the first device, wherein the mapping frequency is determined based on the ratio of the number of mappings over a preset duration to the preset duration; If the mapping frequency is greater than or equal to the preset frequency, the address mapping is stored in the historical address mapping information.
4. The device communication method according to claim 1, characterized in that, The step of determining the target memory block for processing the communication request in the second device and the first memory address corresponding to the target memory block based on the service scenario in the historical communication characteristics includes: Based on the business scenarios in the historical communication characteristics, the target memory access pattern corresponding to the business scenario is determined, and the memory access pattern is used to represent the memory access rules; Based on the target memory access mode, the target storage region corresponding to the target memory access mode is determined from the correspondence between memory access modes and storage regions, wherein different storage regions correspond to different data transfer speeds; Determine the target memory block in the second device used to process the communication request and the first memory address corresponding to the target memory block from the target storage area.
5. The device communication method according to claim 1, characterized in that, The method further includes: Obtain the usage status of each of the multiple identifier fields in the second protocol header information of the historical communication features; If the usage of the identifier field meets the preset compression conditions, then the identifier field is compressed.
6. The device communication method according to claim 5, characterized in that, The usage scenario includes the repetition rate of the identification information corresponding to the identification field, and the preset compression condition includes the repetition rate of the identification information corresponding to the identification field being greater than a preset repetition rate; and / or, The usage scenario includes the number of times the identification information corresponding to the identification field changes, and the preset compression condition includes the number of times the identification information corresponding to the identification field changes being less than a preset number of changes.
7. The device communication method according to claim 5, characterized in that, The compression process for the identifier field includes: Obtain the data type and transmission scenario corresponding to the identification field; If the data type is text, the identifier field is compressed using a first compression algorithm; if the transmission scenario is a real-time transmission scenario, the identifier field is compressed using a second compression algorithm. The first compression algorithm is a compression algorithm with a compression ratio greater than a preset compression ratio, and the second compression algorithm is a compression algorithm with a compression speed greater than a preset compression speed.
8. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor, configured to implement the steps of the device communication method based on protocol conversion as described in any one of claims 1 to 7 when executing the computer program.
Citation Information
Patent Citations
Address mapping acquisition method and device, electronic equipment and readable storage medium
CN116340200A
Protocol conversion adaptation method and device, industrial fusion gateway and data transmission method
CN119743539A