Message generation method and apparatus, and electronic device and storage medium

Through a message generation method, the data format of the data source to be reorganized is converted into target messages using preset lookup tables and rules, which solves the problem of low packet reorganization efficiency in the base station processing chip, and realizes flexible configuration of protocol message formats, reduces system power consumption and improves CPU efficiency.

WO2025102516A1PCT designated stage expired Publication Date: 2025-05-22SHANGHAI SMARTLOGIC TECHNOLOGY LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/071319
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-11-17
Filing Date
2024-01-09
Publication Date
2025-05-22

AI Technical Summary

Technical Problem

During the data interaction of the base station processing chip, due to the limitations of the communication protocol, it is necessary to splice the transmitted original data to generate message data, which causes the central processor (CPU) to spend a lot of time performing message restructuring tasks, reducing the efficiency of the CPU and the overall system performance.

Method used

Through a message generation method, it includes determining the message header field and data payload according to the data format of the data source to be reorganized, using preset lookup tables and rules to splice the message header fields to generate message header sequence fragments, and adjusting the initial message according to the preset message format to generate target messages.

Benefits of technology

It realizes the software's flexible configuration of required protocol packet formats, improves the convenience of message reorganization, reduces dependence on traditional central processors, reduces system power consumption, and improves CPU efficiency and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024071319_22052025_PF_FP_ABST
    Figure CN2024071319_22052025_PF_FP_ABST
Patent Text Reader

Abstract

A message generation method and apparatus, and an electronic device and a storage medium. The message generation method comprises: on the basis of a data format of a data source to be reassembled, determining message header fields and a data payload of the data source to be reassembled (S110); on the basis of attribute information in a preset lookup table, splicing the message header fields to generate a message header sequence fragment (S120); on the basis of a preset rule, splicing the message header sequence fragment and the data payload to generate an initial message (S130); and on the basis of a preset message format, adjusting the initial message to generate a target message (S140).
Need to check novelty before this filing date? Find Prior Art

Description

Message generation method, device, electronic device and storage medium

[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on November 17, 2023, with application number 202311541439.0, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the technical field of data packet reassembly, for example, to a message generation method, device, electronic device and storage medium. Background Art

[0003] During data exchange between base station processing chips, due to limitations of the communication protocol, the transmitted raw data needs to be spliced ​​to generate message data. The receiving end can receive the message data from the sending end to achieve data exchange.

[0004] The function of generating messages is typically implemented by software. This requires frequent memory access and various operations based on the data source to be reassembled. These operations include starting new message splicing, handling exceptions, and sorting messages. Consequently, the central processing unit (CPU) spends a significant amount of time performing message reassembly tasks, reducing CPU efficiency and overall system performance. Therefore, improving CPU efficiency and reducing system power consumption during message generation has become a pressing issue.

[0005] Summary of the Invention

[0006] The present application provides a message generation method, device, electronic device and storage medium to enable software to flexibly configure messages in the required protocol message format and improve the convenience of message reassembly.

[0007] According to one aspect of the present application, a message generation method is provided, the method comprising:

[0008] Determining the message header field and data payload of the data source to be reassembled according to the data format of the data source to be reassembled;

[0009] Concatenate the message header fields to generate a message header sequence fragment according to the attribute information in the preset lookup table;

[0010] Generate an initial message by splicing the message header sequence fragment and the data payload according to preset rules;

[0011] The target message is generated by adjusting the initial message according to the preset message format.

[0012] According to another aspect of the present application, a message generating device is provided, the device comprising:

[0013] A field information determination module, configured to determine the message header fields and data payload of the data source to be reassembled according to the data format of the data source to be reassembled;

[0014] A sequence segment determination module is configured to concatenate message header fields to generate message header sequence segments according to attribute information in a preset lookup table;

[0015] An initial message generation module, configured to generate an initial message by splicing a message header sequence segment and a data payload according to a preset rule;

[0016] The target message generation module is configured to adjust the initial message according to a preset message format to generate a target message.

[0017] According to another aspect of the present application, an electronic device is provided, the electronic device including:

[0018] at least one processor;

[0019] and a memory communicatively coupled to the at least one processor;

[0020] The memory stores a computer program that can be executed by at least one processor, and the computer program is executed by at least one processor so that the at least one processor can execute the message generation method of any embodiment of the present application.

[0021] According to another aspect of the present application, a computer-readable storage medium is provided, which stores computer instructions, and the computer instructions are used to enable a processor to implement the message generation method of any embodiment of the present application when executed. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] FIG1 is a flow chart of a message generation method provided according to Embodiment 1 of the present application;

[0023] FIG2 is a flow chart of a message generation method provided according to Embodiment 2 of the present application;

[0024] FIG3 is a schematic structural diagram of a message generation system provided according to Embodiment 3 of the present application;

[0025] FIG4 is a diagram illustrating an example of a target message provided according to Embodiment 3 of the present application;

[0026] FIG5 is a diagram illustrating an example of a target message according to Embodiment 3 of the present application;

[0027] FIG6 is a schematic structural diagram of a message generating device provided according to Embodiment 4 of the present application;

[0028] FIG7 is a schematic structural diagram of an electronic device for implementing a message generation method according to an embodiment of the present application. DETAILED DESCRIPTION

[0029] The technical solutions in the embodiments of the present application will be described below with reference to the accompanying drawings in the embodiments of the present application.

[0030] The terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in a sequence other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0031] Example 1

[0032] FIG1 is a flow chart of a message generation method according to the first embodiment of the present application. This embodiment is applicable to the case of generating messages. The method can be executed by a message generation device, which can be implemented in the form of hardware and / or software and can be configured in an electronic device. As shown in FIG1 , the method includes:

[0033] S110 : Determine the message header field and data payload of the data source to be reassembled according to the data format of the data source to be reassembled.

[0034] The data source to be reassembled may refer to data used to generate a message. The data source to be reassembled may be data provided internally by the chip, or data generated by different modules within the chip. Exemplarily, the data source to be reassembled may include, but is not limited to, data transmitted via Direct Memory Access (DMA) or data transmitted via a parallel bus. The data format refers to the format of the data source to be reassembled. In one embodiment, the data format of the data source to be reassembled may include message header fields and data payload.

[0035] The message header field may be used to indicate information such as the source port, destination port, message length, and checksum of the message. Different types of messages have different message header fields. In one embodiment, when the source of the data to be reassembled means the original data of the enhanced Common Public Radio Interface (eCPRI) protocol, the message header field may include the eCPRI header field and the header field of the Open-Radio Access Network (O-RAN) protocol. The data payload may be a field in the transmitted data excluding the message header field, and is the original binary encoded data that records the payload information.

[0036] In embodiments of the present application, the data format of the data source to be reassembled can be determined and, based on the data format, the data source can be split into message header fields and data payload. In actual operation, the required data formats may vary for data sources from different sources. The system can determine the meaning of multiple fields in the data source to be reassembled and treat messages where the fields are defined as header fields as message header fields; and treat messages where the fields are defined as data fields as data payloads.

[0037] In one embodiment, the data formats of multiple data sources to be reassembled can be determined in parallel or individually. Messages with fields that represent header fields can be prioritized as message header fields, with the remaining messages as data payloads. In one embodiment, the parallel determination of the formats of the data sources to be reassembled and the independent determination of the format of a single data source to be reassembled can be accomplished through different pathways. The pathway for determining the formats of the data sources to be reassembled in parallel can be a pathway that only determines the message header fields.

[0038] S120: splicing the message header fields according to the attribute information in the preset lookup table to generate a message header sequence segment.

[0039] The preset lookup table can be a preset display lookup table (LUT), which is essentially a random access memory (RAM). After the preset lookup table writes the data into the RAM in advance, it will look up the table every time an address is input to find the content corresponding to the address and then output it. The number of preset lookup tables can be at least one. In actual operation, one preset lookup table can correspond to one message header sequence fragment. The message header sequence fragment can be a sequence fragment generated by splicing message header fields, which is spliced ​​and generated based on the attribute information of the preset lookup table as the splicing order of the message header fields. The number of message header fields in the message header sequence fragment can be at least one, and there is no limit to this.

[0040] In one embodiment, the attribute information of the preset lookup table includes at least one of the following: a message header field width, a message header field source, and a message header field position.

[0041] The message header field width may refer to the actual width of the message header field, or may refer to the number of bits in the message header field; the message header field source may refer to the data source to be reassembled from which the message header field comes, and different message header fields may come from different data sources to be reassembled; the message header field position may refer to the position of the message header field in the data source to be reassembled, or may be an index number in the data source to be reassembled.

[0042] In an embodiment of the present application, attribute information from a preset lookup table can be extracted, and the message header fields can be spliced ​​into message header sequence segments according to the attribute information in the preset lookup table. In actual operation, the attribute information of the corresponding message header fields in the preset lookup table can be extracted, and the order of the attribute information of different message header fields in the preset lookup table can be used as the splicing order of the message header sequence segments. Alternatively, the position of each message header field in the preset lookup table can be determined in the preset lookup table, and the message header sequence segments can be spliced ​​according to the order of the corresponding positions of the multiple message header fields as the splicing order of the message header sequence segments, thereby splicing the message header fields into the message header sequence segments.

[0043] In one embodiment, after the splicing order is determined, the corresponding message header fields can be extracted according to the message header field bit width, message header field source and message header field position in the preset lookup table, and the extracted message header fields can be spliced ​​to generate message header sequence fragments.

[0044] S130 , splicing the message header sequence fragments and the data payload according to a preset rule to generate an initial message.

[0045] The preset splicing rule may be a preset rule for splicing the message header sequence segments and the data payload. The preset splicing rule may be to use the order of the preset lookup table as the order of arrangement of the message header sequence segments corresponding to the preset lookup table, and to arrange the data payload after the corresponding message header sequence segment. The initial message may refer to a message that is spliced ​​with the message header sequence segment and the data payload but does not conform to the complete protocol.

[0046] In an embodiment of the present application, a sequence of pre-set lookup tables can be obtained, and the message header sequence segments corresponding to the pre-set lookup tables can be spliced ​​according to the sequence of the pre-set lookup tables, and the data payload can be spliced ​​after the corresponding message header sequence segments to generate an initial message. In actual operation, the message header sequence segments can be spliced ​​to generate a message header, and the message header and data payload can be spliced ​​to generate an initial message.

[0047] S140: Adjust the initial message according to a preset message format to generate a target message.

[0048] The preset message format may refer to a pre-set target message format. Exemplarily, the preset message format may be a custom message format; alternatively, it may be a message format of an existing protocol. In actual operation, the preset message format may include, but is not limited to, the eCPRI communication protocol. The target message is a message in the preset message format generated according to the data source to be reassembled. Exemplarily, the target message may be a message using a fixed communication protocol or an Ethernet protocol for communication outside the chip.

[0049] In an embodiment of the present application, a preset message format can be extracted, and the initial message can be adjusted according to the preset message format to generate a target message. In actual operation, the specifications corresponding to the preset message format can be determined, such as alignment, specified byte order, checksum, encryption and decryption methods, etc. The initial message is adjusted according to the specifications corresponding to the preset message format to generate a target message.

[0050] In an embodiment of the present application, the message header fields and data payload of the data source to be reassembled are determined according to the data format of the data source to be reassembled, the message header fields are spliced ​​to generate message header sequence fragments according to the attribute information of a preset lookup table, the message header sequence fragments and the data payload are spliced ​​according to preset rules to generate an initial message, and the initial message is adjusted according to the preset message format to generate a target message, thereby achieving flexible configuration of the required protocol messages through software, reducing the problem of excessive system power consumption caused by pure software generation of messages relying on a traditional central processing unit, and at the same time, improving the convenience of message reassembly and enhancing the user experience.

[0051] In one embodiment, after the message header fields are concatenated to generate message header sequence segments according to the attribute information in the preset lookup table, the method further includes:

[0052] The number of message header sequence segments is determined, and when the number of message header sequence segments is the same as a preset number, it is determined to start splicing to generate an initial message.

[0053] The number of message header sequence segments can be the same as the number of preset lookup tables, and each preset lookup table can generate a corresponding message header sequence segment. The preset number can refer to a preset number of message header sequences to be generated. The preset number is not limited and can be set according to the requirements of the target message.

[0054] In an embodiment of the present application, after generating message header sequence segments, the number of message header sequence segments can be determined, and a preset number can be extracted. If the number of message header sequence segments is the same as the preset number, it is determined to start splicing the message header sequence segments to generate an initial message; if the number of message header sequence segments is less than the preset number, the splicing of the message header sequence segments continues; if the number of message header sequence segments is greater than the preset number, it is checked whether the generated message header sequence segments are normal, and the message header sequence segments can be re-spliced. In one embodiment, if the number of message header sequence segments is different from the preset number, a normal initial message cannot be generated, and there is a possibility that an erroneous message may be generated.

[0055] Example 2

[0056] FIG2 is a flow chart of a message generation method according to the second embodiment of the present application. This embodiment is an explanation of a message generation method based on the above embodiment. As shown in FIG2, the method includes:

[0057] S2010: Perform format analysis on the data source to be reorganized to determine the meanings of multiple fields of the data source to be reorganized.

[0058] The field meaning may refer to the message field meaning, which is the meaning and purpose of multiple fields in the data source to be reassembled. The field meaning may include header fields and data fields. The message header fields and data payload can be determined based on the field meaning.

[0059] In the embodiment of the present application, the data source to be reorganized can be format analyzed to determine the meanings of multiple fields of the data source to be reorganized, and then the data formats of the multiple fields can be determined. In actual operation, the data source to be reorganized can be format analyzed to split the data belonging to the same field and determine the meanings of the multiple fields.

[0060] S2020. Determine the message whose field meaning is the header field as the message header field.

[0061] In the embodiment of the present application, after the meanings of multiple fields of the data source to be reassembled are determined, the message whose field meaning is the header field can be extracted as the message header field.

[0062] S2030: Determine a message whose field meaning is a data field as a data payload.

[0063] In the embodiment of the present application, after the meanings of multiple fields of the data source to be reassembled are determined, the message whose field meaning is the data field can be extracted as the data payload.

[0064] S2040: Search for attribute information corresponding to the message header field in a preset lookup table.

[0065] In an embodiment of the present application, a preset lookup table may store attribute information corresponding to a message header field, and the corresponding attribute information may be searched in the preset lookup table according to the message header field. In actual operation, the corresponding attribute information may be searched in the preset lookup table according to the message header field. The attribute information may include the message header field width, the message header field source, and the message header field position.

[0066] S2050: Using the sequence of attribute information of different message header fields in the preset lookup table as the splicing sequence of message header sequence segments.

[0067] The splicing order of the message header sequence fragments may refer to the order of the message header fields within the message header sequence fragments. Multiple message header fields may be spliced ​​together according to the splicing order to generate the message header sequence fragments.

[0068] In an embodiment of the present application, the attribute information of different message header fields has corresponding positions in the preset lookup table. After determining the attribute information corresponding to the message header field, the order of the attribute information of different message header fields in the preset lookup table can be determined, and the order of the attribute information of different message header fields in the preset lookup table can be used as the splicing order of the message header sequence fragments.

[0069] S2060: Splice multiple message header fields in a splicing order to generate a message header sequence segment.

[0070] In the embodiment of the present application, after the splicing order of the message header sequence fragments is determined, multiple message header fields can be arranged in the splicing order and spliced ​​to generate the message header sequence fragments.

[0071] S2070: Using the preset order of the multiple preset lookup tables as the arrangement order of the message header sequence segments corresponding to the preset lookup tables.

[0072] The preset order may be an arrangement order of a preset lookup table. In actual operation, the preset order may be stored in the lookup table; or, it may be stored in a preset table or configuration file, which is not limited.

[0073] In an embodiment of the present application, each preset lookup table may be pre-set with a preset order. Since the preset lookup tables and the message header sequence segments may correspond one-to-one, the preset order of the multiple preset lookup tables may be used as the arrangement order of the message header sequence segments corresponding to the preset lookup tables. In actual operation, the preset order of the multiple preset lookup tables may be extracted and determined as the arrangement order of the message header sequence segments corresponding to the preset lookup tables.

[0074] In one embodiment, when the packet header sequence segments corresponding to the preset lookup tables originate from different pathways, the preset lookup tables corresponding to the multiple pathways may each have a corresponding order. In this case, the preset lookup tables may be extracted sequentially according to the order of the lookup tables corresponding to each pathway, and the preset order of the multiple preset lookup tables may be used as the order of arrangement of the packet header sequence segments corresponding to the preset lookup tables.

[0075] S2080: Generate a message header from the message header sequence fragments according to the arrangement order.

[0076] In the embodiment of the present application, after determining the arrangement order of the message header sequence fragments, the message header sequence fragments can be arranged according to the arrangement order and spliced ​​to generate the message header.

[0077] S2090: Concatenate the message header and the data payload to generate an initial message.

[0078] In an embodiment of the present application, the data payload may be spliced ​​onto the back of the message header to generate an initial message.

[0079] S2100: Align the initial message according to a preset message format and adjust the byte sequence and / or check value of the initial message, and use the initial message in the preset message format as the target message.

[0080] In an embodiment of the present application, a preset message format can be extracted, an alignment method of the preset message format can be determined, and the initial message can be aligned according to the alignment method. At the same time, the byte order of the preset message format can be determined, the initial message can be adjusted according to the byte order of the preset message format, the check value of the initial message can be determined, and the initial message can be adjusted to the target message. In the actual operation process, the process of adjusting the initial message to the target message can include but is not limited to adjusting the byte order and the check value, and this is not limited. In one embodiment, the adjustment of the byte order and the check value can be performed simultaneously or separately.

[0081] In one embodiment, the bit-level granularity can be achieved by concatenating the initial and final messages according to the preset message format to complete the number of message bytes required by the preset message format. At the same time, a check value is generated, the byte order of the message is adjusted, the message length is calculated, and the initial message is adjusted to the target message.

[0082] In an embodiment of the present application, by performing format analysis on a data source to be reorganized, the meanings of multiple fields of the data source to be reorganized are determined, a message whose field meaning is a header field is determined as a message header field, and a message whose field meaning is a data field is determined as a data payload, attribute information corresponding to the message header field is searched in a preset lookup table, the order of attribute information of different message header fields in the preset lookup table is used as the splicing order of message header sequence fragments, multiple message header fields are spliced ​​together according to the splicing order to generate message header sequence fragments, the preset order of multiple preset lookup tables is used as the arrangement order of message header sequence fragments corresponding to the preset lookup table, the message header sequence fragments are generated according to the arrangement order, the message header and the data payload are spliced ​​together to generate an initial message, the initial message is aligned according to the preset message format and the byte order and / or check value of the initial message is adjusted, and the initial message in the preset message format is generated as the target message, thereby realizing flexible configuration of the target message in the preset format and improving the convenience of message generation.

[0083] Example 3

[0084] FIG3 is a schematic diagram of the structure of a message generation system provided according to Example 3 of the present application. As shown in FIG3 , the message generation system includes: a message header field source selection module 31, a message header field splicing module 32, a message header sequence segment generation module 33, a message data stream format parsing module 34, a message header and data payload separation module 35, a header field sequence segment generation module 36, a data payload generation module 37, an interleaving order arbitration module 38, and a target message generation module 39.

[0085] The message header field source selection module 31 can obtain multiple branches of to-be-reassembled data sources and extract several message header fields from the to-be-reassembled data sources.

[0086] The message header field splicing module 32 can splice and combine the input message header fields according to the corresponding arrangement order in the preset lookup table and generate a message header field sequence.

[0087] The message header sequence fragment generating module 33 may store / process the inputted message header field sequences and output them as a plurality of message header sequence fragments.

[0088] The message data stream format analysis module 34 can perform format analysis on the input data source to be reassembled and identify several possible message header fields.

[0089] The message header and data payload splitting module 35 can split the input data source to be reassembled and unify the format.

[0090] The header field sequence segment generating module 36 may splice a plurality of message header fields according to the definition of a preset lookup table and generate message header sequence segments and temporarily store them.

[0091] The data payload generation module 37 may mark the input data stream as a payload and temporarily store it.

[0092] The interleaving order arbitration module 38 can sort and splice the message header sequence segments and the data payload according to a preset arrangement order and output an initial message.

[0093] The target message generation module 39 can perform post-processing such as alignment, byte order adjustment, verification, encryption and decryption on the initial message according to a preset message format and output the target message.

[0094] FIG4 is a diagram of a target message instance provided according to the third embodiment of the present application. As shown in FIG4 , the target message is an example diagram of an eCPRI data message and only includes data messages of the eCPRI protocol.

[0095] The “parameters” in Figures 4 and 5 refer to the message header fields.

[0096] The above-mentioned eCPRI message can be regarded as consisting of two parts: an eCPRI header field (eCPRI Header) and an eCPRI data payload (eCPRI payload).

[0097] First, the fields constituting the eCPRI Header selected by the message header field source selection module 31 can be defined in the form of a preset lookup table (LUT) as shown in Table 1.

[0098] Table 1

[0099] In the system, the message header field source selection module 31, the message header field splicing module 32 and the message header sequence segment generation module 33 can realize the splicing combination of similar message header fields for several fields from different sources by configuring LUT.

[0100] Secondly, the fields constituting the eCPRI Header selected by the message data stream format parsing module 34 can be defined in the form of the LUT shown in Table 2.

[0101] Table 2

[0102] The message data stream format parsing module 34, the message header and data payload splitting module 35, the header field sequence fragment generation module 36 and the data payload generation module 37 in the system can configure the LUT to sequentially extract the data of the specified bit width in the data stream and identify it as the message header field, and the remaining part will be identified as the data payload.

[0103] Finally, the working mode of the interleaving order arbitration module 38 can be defined in the form of the LUT in Table 3.

[0104] Table 3

[0105] Figure 5 is an example diagram of a target message provided according to Example 3 of the present application. As shown in Figure 5, it is an example diagram of a target message containing two data payloads, wherein the target message is a data message of the O-RAN protocol carried within an eCPRI data message.

[0106] The above-mentioned eCPRI message can be regarded as consisting of three parts: an eCPRI header field (eCPRI Header), an O-RAN header field (O-RAN header) and an O-RAN data payload (O-RAN payload).

[0107] Correspondingly, the extraction and splicing methods of the eCPRI header field and the O-RAN header field are the same as the extraction and splicing methods of the above-mentioned eCPRI Header, and the method of generating the target message is also the same, which will not be repeated here.

[0108] Example 4

[0109] FIG6 is a schematic diagram of the structure of a message generating device according to Embodiment 4 of the present application. As shown in FIG6 , the device includes: a field information determining module 41 , a sequence segment determining module 42 , an initial message generating module 43 and a target message generating module 44 .

[0110] The field information determination module 41 is configured to determine the message header fields and data payload of the data source to be reassembled according to the data format of the data source to be reassembled.

[0111] The sequence segment determination module 42 is configured to concatenate message header fields according to attribute information in a preset lookup table to generate message header sequence segments.

[0112] The initial message generation module 43 is configured to generate an initial message by splicing the message header sequence segments and the data payload according to a preset rule.

[0113] The target message generating module 44 is configured to adjust the initial message according to a preset message format to generate a target message.

[0114] In an embodiment of the present application, a field information determination module determines the message header fields and data payload of the data source to be reassembled according to the data format of the data source to be reassembled, a sequence fragment determination module splices the message header fields to generate message header sequence fragments according to the attribute information of a preset lookup table, an initial message generation module splices the message header sequence fragments and the data payload according to preset rules to generate an initial message, and a target message generation module adjusts the initial message according to the preset message format to generate a target message, thereby realizing flexible configuration of the required protocol messages through software and improving the user experience.

[0115] In one embodiment, the attribute information of the preset lookup table in the field information determination module 41 includes at least one of the following: message header field width, message header field source, and message header field position.

[0116] In one embodiment, the field information determination module 41 includes:

[0117] The format analysis unit is configured to perform format analysis on the data source to be reorganized, and determine meanings of multiple fields of the data source to be reorganized.

[0118] The first field determination unit is configured to determine a message whose field meaning is a header field as a message header field.

[0119] The second field determination unit is configured to determine a message whose field meaning is a data field as a data payload.

[0120] In one embodiment, the sequence segment determination module 42 includes:

[0121] The attribute information query unit is configured to search for attribute information corresponding to a message header field in a preset search table.

[0122] The splicing order determining unit is configured to use the sequence of attribute information of different message header fields in a preset lookup table as the splicing order of the message header sequence segments.

[0123] The field splicing unit is configured to splice multiple message header fields in a splicing order to generate a message header sequence fragment.

[0124] In one embodiment, the message generating apparatus further includes:

[0125] The splicing determination module is configured to determine the number of message header sequence segments, and when the number of message header sequence segments is the same as a preset number, determine to start splicing to generate an initial message.

[0126] In one embodiment, the initial message generation module 43 includes:

[0127] The arrangement sequence determining unit is configured to use the preset order of the plurality of preset lookup tables as the arrangement order of the message header sequence segments corresponding to the preset lookup tables.

[0128] The header field generating unit is configured to generate a message header from the message header sequence fragments according to an arrangement order.

[0129] The initial message generating unit is configured to concatenate the message header and the data payload to generate an initial message.

[0130] In one embodiment, the target message generation module 44 includes:

[0131] The target message generating unit is configured to align the initial message according to a preset message format and adjust the byte sequence and / or check value of the initial message, and use the initial message in the preset message format as the target message.

[0132] The message generation device provided in the embodiment of the present application can execute the message generation method provided in any embodiment of the present application, and has the corresponding functional modules and effects of the execution method.

[0133] Example 5

[0134] FIG7 is a block diagram of an electronic device 10 that implements a message generation method according to an embodiment of the present application. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present application described and / or required herein.

[0135] As shown in FIG7 , the electronic device 10 includes at least one processor 11 and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12 and a random access memory (RAM) 13. The memory stores a computer program that can be executed by the at least one processor, and the processor 11 can perform a variety of appropriate actions and processes according to the computer program stored in the ROM 12 or the computer program loaded from the storage unit 18 into the RAM 13. In the RAM 13, a variety of programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, ROM 12, and RAM 13 are connected to each other via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0136] Multiple components in the electronic device 10 are connected to the I / O interface 15, including an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a magnetic disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.

[0137] The processor 11 can be a variety of general-purpose and / or specialized processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors that run machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The processor 11 executes the methods and processes described above, such as the message generation method.

[0138] In some embodiments, the message generation method can be implemented as a computer program that is tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the message generation method described above can be performed. Alternatively, in other embodiments, processor 11 can be configured to perform the message generation method in any other appropriate manner (e.g., by means of firmware).

[0139] Various embodiments of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard parts (ASSPs), system on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0140] Computer programs for implementing the methods of the present application may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when the computer program is executed by the processor, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The computer program may be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

[0141] In the context of the present application, computer-readable storage medium can be a tangible medium that can contain or store a computer program for use by an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. Computer-readable storage medium can include but is not limited to electronic, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, computer-readable storage medium can be a machine-readable signal medium. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory RAM, a read-only memory ROM, an erasable programmable read-only memory (EPROM) or a flash memory, an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device or any suitable combination of the foregoing.

[0142] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a cathode ray tube (CRT) or a liquid crystal display (LCD) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0143] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with embodiments of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0144] A computing system may include a client and a server. The client and server are generally remote from each other and typically interact via a communication network. The client-server relationship arises through computer programs running on the respective computers and establishing a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, a host product within a cloud computing service ecosystem that addresses the management difficulties and limited scalability of traditional physical hosts and virtual private server (VPS) services.

[0145] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the multiple steps described in this application can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of this application can be achieved. This is not limited herein.

[0146] The above specific implementation methods do not constitute a limitation on the scope of protection of this application.

Claims

1. A message generation method, comprising: Determine the message header field and data load of the data source to be reassembled according to the data format of the data source to be reassembled; splicing the message header fields to generate a message header sequence fragment according to the attribute information of the preset lookup table; Splicing the message header sequence fragment and the data payload to generate an initial message according to a preset rule; The initial message is adjusted according to a preset message format to generate a target message.

2. The method according to claim 1, wherein: The attribute information of the preset lookup table includes at least one of the following: a message header field bit width, a message header field source, and a message header field position.

3. The method according to claim 1, wherein: The step of determining the message header field and data load of the data source to be reassembled according to the data format of the data source to be reassembled comprises: Performing format analysis on the data source to be reorganized to determine meanings of multiple fields of the data source to be reorganized; Determine the message whose meaning of the field is a header field as a message header field; The message whose field meaning is a data field is determined as a data payload.

4. The method according to claim 1, wherein: The step of splicing the message header fields to generate a message header sequence fragment according to the attribute information of the preset lookup table includes: Searching the preset lookup table for the attribute information corresponding to the message header field; The sequence of the attribute information of different message header fields in the preset lookup table is used as the splicing sequence of the message header sequence fragments; A plurality of the message header fields are spliced ​​in the splicing order to generate a message header sequence fragment.

5. The method according to claim 1, after splicing the message header fields to generate message header sequence segments according to the attribute information of the preset lookup table, further comprises: The number of the message header sequence fragments is determined, and when the number of the message header sequence fragments is the same as a preset number, it is determined to start splicing to generate the initial message.

6. The method according to claim 1, wherein: The step of splicing the message header sequence fragment and the data payload according to a preset rule to generate an initial message includes: Using the preset order of the plurality of preset lookup tables as the arrangement order of the message header sequence fragments corresponding to the preset lookup tables; Generating a message header from the message header sequence fragments according to the arrangement order; The message header and the data payload are concatenated to generate an initial message.

7. The method according to claim 1, wherein: The step of adjusting the initial message according to a preset message format to generate a target message includes: The initial message is aligned according to the preset message format and at least one of the byte sequence and the check value of the initial message is adjusted, and the initial message in the preset message format is used as the target message.

8. A message generating device, comprising: A field information determination module, configured to determine a message header field and a data load of the data source to be reassembled according to a data format of the data source to be reassembled; A sequence segment determination module, configured to concatenate the message header fields to generate a message header sequence segment according to the attribute information of a preset lookup table; An initial message generation module, configured to generate an initial message by splicing the message header sequence fragment and the data payload according to a preset rule; The target message generation module is configured to adjust the initial message according to a preset message format to generate a target message.

9. An electronic device, comprising: at least one processor; and a memory communicatively coupled to the at least one processor; The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the message generation method according to any one of claims 1 to 7.

10. A computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable a processor to implement the message generation method according to any one of claims 1 to 7 when executed.

Citation Information

Patent Citations

  • Network interface interconnection design and control system for CPU (Central Processing Unit) interconnection expansion systems

    CN104598430A

  • Message combination method and device, equipment and storage medium

    CN115766628A

  • Message generation method and apparatus, electronic device, and computer-readable storage medium

    WO2021189826A1

  • Message processing method, cable clip, device, and storage medium

    WO2023061061A1