CN118118127A - Data encoding method and device, storage medium and electronic device - Google Patents

Data encoding method and device, storage medium and electronic device Download PDF

Info

Publication number
CN118118127A
CN118118127A CN202410146949.6A CN202410146949A CN118118127A CN 118118127 A CN118118127 A CN 118118127A CN 202410146949 A CN202410146949 A CN 202410146949A CN 118118127 A CN118118127 A CN 118118127A
Authority
CN
China
Prior art keywords
coding
target
message data
encoding
service type
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202410146949.6A
Other languages
Chinese (zh)
Inventor
何志川
俞亚轩
麻孝强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Centec Communications Co Ltd
Original Assignee
Suzhou Centec Communications Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Centec Communications Co Ltd filed Critical Suzhou Centec Communications Co Ltd
Priority to CN202410146949.6A priority Critical patent/CN118118127A/en
Publication of CN118118127A publication Critical patent/CN118118127A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/0001Systems modifying transmission characteristics according to link quality, e.g. power backoff
    • H04L1/0015Systems modifying transmission characteristics according to link quality, e.g. power backoff characterised by the adaptation strategy
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L12/40006Architecture of a communication node
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Quality & Reliability (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

The application discloses a data coding method and device, a storage medium and an electronic device, wherein a coding node sequence and a coding bus are deployed on a target chip, a plurality of coding nodes included in the coding node sequence are connected with the coding bus, and the data coding method comprises the following steps: identifying the service type to which the reference message data to be transmitted belongs to obtain a target service type; distributing a target coding rule matched with a target service type to the coding node sequence to obtain a target coding node sequence, wherein the target coding rule records the mode that each coding node in the coding node sequence codes message data of the target service type to a encodable bus; the technical scheme is adopted to solve the problems that the compatibility of the data coding mode to the message data of different service types is poor and the like in the related technology.

Description

Data encoding method and device, storage medium and electronic device
Technical Field
The present application relates to the field of communications technologies, and in particular, to a data encoding method and apparatus, a storage medium, and an electronic device.
Background
In the process of transmitting the message through the network chip, the network chip is required to encode and encapsulate the message, and the current network chip can only encode and encapsulate the message of one service type, and each network chip can only support one encoding and encapsulating mode, so that the condition that the message cannot be identified or the message is subjected to error encoding and encapsulating may occur when the message of other services enters.
Aiming at the problems of poor compatibility of the data coding mode to the message data of different service types and the like in the related technology, no effective solution is proposed yet.
Disclosure of Invention
The embodiment of the application provides a data coding method and device, a storage medium and an electronic device, which at least solve the problems of poor compatibility of a data coding mode to message data of different service types and the like in the related technology.
According to an embodiment of the present application, there is provided a data encoding method, in which an encoding node sequence and an encodable bus are deployed on a target chip, and a plurality of encoding nodes included in the encoding node sequence are connected to the encodable bus, the method including:
Identifying the service type to which the reference message data to be transmitted belongs to obtain a target service type;
Distributing a target coding rule matched with the target service type to the coding node sequence to obtain a target coding node sequence, wherein the target coding rule records the mode that each coding node in the coding node sequence codes message data of the target service type to the encodable bus;
and calling the target coding node sequence to code the reference message data to the encodable bus, wherein the encodable bus is used for transmitting the encoded reference message data.
Optionally, the allocating, for the coding node sequence, a target coding rule matched with the target service type includes:
And switching a coding rule currently used by each coding node in the coding node sequence into a target coding sub-rule corresponding to the target service type, wherein the target coding rule comprises a plurality of target coding sub-rules, and each target coding sub-rule is used for indicating a mode of coding the message data of the target service type onto the encodable bus when the corresponding coding node receives the message data of the target service type.
Optionally, the switching the coding rule currently used by each of the plurality of coding nodes included in the coding node sequence to the target coding sub-rule corresponding to the target service type includes:
Determining a target service field corresponding to the target service type from the service types and the service fields with the corresponding relation;
And switching a currently used service field of each coding node in the plurality of coding nodes included in the coding node sequence into the target service field, wherein each coding node is used for matching a target coding sub-rule corresponding to the target service field from the service field and the coding sub-rule with corresponding relations, and switching the currently used coding rule into the target coding sub-rule.
Optionally, the calling the target encoding node sequence to encode the reference message data to the encodable bus includes:
acquiring a target coding sequence corresponding to the target coding node sequence, wherein the target coding sequence records the coding sequence of the reference message data by a plurality of coding nodes in the target coding node sequence;
And performing multiple coding operations on the reference message data according to the target coding sequence through the target coding node sequence to obtain target message data, wherein the encodable bus is used for transmitting the target message data.
Optionally, the performing, by the target coding node sequence, multiple coding operations on the reference packet data according to the target coding order includes:
And under the condition that the target coding node sequence comprises N coding nodes, sequentially calling the N coding nodes according to a target coding sequence to execute coding operation on the reference message data, wherein the ith coding node in the N coding nodes is used for executing the ith coding operation on the reference message data after the ith-1 coding to obtain the ith coded reference message data, under the condition that i takes a value of 1, the ith coding node is used for executing the 1 st coding operation on the reference message data which is not coded, under the condition that i takes a value of N, the ith coding node is used for executing the ith coding operation on the reference message data after the ith-1 coding to obtain the target message data, N is a positive integer which is greater than 1, and i is a positive integer which is greater than or equal to 1 and less than or equal to N.
Optionally, the sequentially calling N coding nodes according to the target coding order performs a coding operation on the reference message data, including:
in the case that the target coding node sequence includes N coding nodes, an ith coding node of the N coding nodes performs an ith coding operation on the i-1 th coded reference message data by:
acquiring the reference message data after the i-1 th coding from the i-1 st coding position of the encodable bus, wherein under the condition that i takes a value of 1, the reference message data is acquired from a message data interface of the target chip, and the message data interface is used for receiving the message data;
executing the ith coding operation on the reference message data after the ith-1 coding according to the target coding rule to obtain the reference message data after the ith coding;
Mapping the reference message data after the ith coding to the ith coding position of the encodable bus until the value of i is N, wherein under the condition of the value of i being N, the reference message data after the ith coding is determined to be the target message data and sent to downstream equipment of the target chip.
Optionally, the identifying the service type to which the reference message data to be transmitted belongs to obtain the target service type includes:
Extracting target data characteristics of the reference message data;
And matching the target service type corresponding to the target data characteristic from the data characteristic and the service type.
According to another embodiment of the present application, there is provided a data encoding apparatus, on which an encoding node sequence and an encodable bus are disposed, the encoding node sequence including a plurality of encoding nodes connected to the encodable bus, the apparatus including:
The identification module is used for identifying the service type to which the reference message data to be transmitted belongs to, and obtaining a target service type;
The distribution module is used for distributing a target coding rule matched with the target service type to the coding node sequence to obtain a target coding node sequence, wherein the target coding rule records the mode that each coding node in the coding node sequence codes the message data of the target service type to the encodable bus;
And the calling module is used for calling the target coding node sequence to code the reference message data to the encodable bus, wherein the encodable bus is used for transmitting the encoded reference message data.
According to a further aspect of embodiments of the present application, there is also provided a computer readable storage medium having a computer program stored therein, wherein the computer program is arranged to perform the above-described method of encoding data when run.
According to still another aspect of the embodiments of the present application, there is further provided an electronic device including a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor executes the method for encoding data described above through the computer program.
In the embodiment of the application, a coding node sequence and a coding bus are deployed on a target chip, a plurality of coding nodes included in the coding node sequence are connected with the coding bus, and the coding method of data comprises the steps of identifying the service type to which the reference message data to be transmitted belongs to, so as to obtain the target service type; distributing a target coding rule matched with a target service type to the coding node sequence to obtain a target coding node sequence, wherein the target coding rule records the mode that each coding node in the coding node sequence codes message data of the target service type to a encodable bus; and calling the target coding node sequence to code the reference message data to a encodable bus, wherein the encodable bus is used for transmitting the encoded reference message data. When receiving the reference message data to be transmitted, the target chip firstly identifies the service type to which the reference message data belongs to obtain a target service type, distributes matched target coding rules for the coding node sequence according to the target service type to obtain a target coding node sequence, finally calls the target coding node sequence to code the reference message data to a encodable bus, and can realize the function of a single target chip for encoding message data of various different service types by the data encoding method. By adopting the technical scheme, the problems of poor compatibility of the data coding mode to the message data of different service types and the like in the related technology are solved, and the technical effect of improving the compatibility of the data coding mode to the message data of different service types is realized.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description, serve to explain the principles of the application.
In order to more clearly illustrate the embodiments of the application or the technical solutions of the prior art, the drawings which are used in the description of the embodiments or the prior art will be briefly described, and it will be obvious to a person skilled in the art that other drawings can be obtained from these drawings without inventive effort.
FIG. 1 is a schematic diagram of a hardware environment of a method of encoding data according to an embodiment of the present application;
FIG. 2 is a flow chart of a method of encoding data according to an embodiment of the application;
FIG. 3 is a schematic diagram of assigning encoding rules to a sequence of encoding nodes according to an embodiment of the present application;
FIG. 4 is a schematic diagram of a coding node switching coding sub-rule according to an embodiment of the present application;
FIG. 5 is a schematic diagram of a target chip encoding message data of different traffic types onto an encodable bus using different encoding schemes according to an embodiment of the present application;
fig. 6 is a block diagram of a data encoding apparatus according to an embodiment of the present application.
Detailed Description
In order that those skilled in the art will better understand the present application, a technical solution in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present application without making any inventive effort, shall fall within the scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the application described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
The method embodiments provided by the embodiments of the present application may be performed in a computer terminal, a device terminal, or a similar computing apparatus. Taking a computer terminal as an example, fig. 1 is a schematic diagram of a hardware environment of a data encoding method according to an embodiment of the present application. As shown in fig. 1, the computer terminal may include one or more (only one is shown in fig. 1) processors 102 (the processor 102 may include, but is not limited to, a microprocessor MCU or a processing device such as a programmable logic device FPGA) and a memory 104 for storing data, and in one exemplary embodiment, may also include a transmission device 106 for communication functions and an input-output device 108. It will be appreciated by those skilled in the art that the configuration shown in fig. 1 is merely illustrative and is not intended to limit the configuration of the computer terminal described above. For example, a computer terminal may also include more or fewer components than shown in FIG. 1, or have a different configuration than the equivalent functions shown in FIG. 1 or more than the functions shown in FIG. 1.
The memory 104 may be used to store a computer program, for example, a software program of application software and a module, such as a computer program corresponding to a method for encoding data in an embodiment of the present invention, and the processor 102 executes the computer program stored in the memory 104 to perform various functional applications and data processing, that is, to implement the above-mentioned method. Memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory remotely located relative to the processor 102, which may be connected to the computer terminal via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 106 is used to receive or transmit data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of a computer terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, simply referred to as a NIC) that can connect to other network devices through a base station to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is configured to communicate with the internet wirelessly.
In this embodiment, a method for encoding data is provided and applied to the computer terminal, fig. 2 is a flowchart of a method for encoding data according to an embodiment of the present application, where a target chip is disposed with an encoding node sequence and an encodable bus, where a plurality of encoding nodes included in the encoding node sequence are connected to the encodable bus, as shown in fig. 2, and the flowchart includes the following steps:
Step S202, identifying the service type to which the reference message data to be transmitted belongs to, and obtaining a target service type;
Step S204, a target coding rule matched with the target service type is distributed to the coding node sequence to obtain a target coding node sequence, wherein the target coding rule records the mode that each coding node in the coding node sequence codes the message data of the target service type onto the encodable bus;
step S206, invoking the target encoding node sequence to encode the reference message data to the encodable bus, where the encodable bus is used to transmit the encoded reference message data.
Through the steps, the coding node sequence and the encodable bus are deployed on the target chip, a plurality of coding nodes included in the coding node sequence are connected with the encodable bus, and the coding method of the data comprises the steps of identifying the service type to which the reference message data to be transmitted belongs, so as to obtain the target service type; distributing a target coding rule matched with a target service type to the coding node sequence to obtain a target coding node sequence, wherein the target coding rule records the mode that each coding node in the coding node sequence codes message data of the target service type to a encodable bus; and calling the target coding node sequence to code the reference message data to a encodable bus, wherein the encodable bus is used for transmitting the encoded reference message data. When receiving the reference message data to be transmitted, the target chip firstly identifies the service type to which the reference message data belongs to obtain a target service type, distributes matched target coding rules for the coding node sequence according to the target service type to obtain a target coding node sequence, finally calls the target coding node sequence to code the reference message data to a encodable bus, and can realize the function of a single target chip for encoding message data of various different service types by the data encoding method. By adopting the technical scheme, the problems of poor compatibility of the data coding mode to the message data of different service types and the like in the related technology are solved, and the technical effect of improving the compatibility of the data coding mode to the message data of different service types is realized.
In the technical solution provided in step S202, the reference message data is any one currently received message data to be transmitted.
Optionally, in this embodiment, the target chip allows to identify the service type of the currently received message data to be transmitted, and of course, the upstream device of the target chip may also send the message information carrying the service type to inform the target chip of the service type of the current message data.
In an exemplary embodiment, the target service type may be obtained by, but not limited to, identifying the service type to which the reference message data to be transmitted belongs in the following manner: extracting target data characteristics of the reference message data; and matching the target service type corresponding to the target data characteristic from the data characteristic and the service type.
Optionally, in this embodiment, the target chip allows identifying the service type of the currently received message data to be transmitted, by identifying the data feature of the reference message data, where the data feature includes the format of the message data, the protocol field of the message data, and so on.
In the technical solution provided in step S204, fig. 3 is a schematic diagram of allocating a coding rule to a coding node sequence according to an embodiment of the present application, as shown in fig. 3, taking currently received reference message data as message data a as an example, after the target chip receives the message data a, identifying that a service type of the message data a is service type a, that is, that a target service type is service type a, and at this time, allocating a target coding rule matched with the target service type to the coding node sequence to obtain a target coding node sequence, where the coding node sequence includes a plurality of coding nodes: encoding node SCL (Service Control List ), encoding node IPUC (Internet Protocol Unicast ), encoding node FDB (Forwarding DateBase, forwarding database), and encoding node ACL (Access Control List ). And the target coding rule matched with the target service type is a coding rule A, wherein the coding rule A comprises a coding rule A1, a coding rule A2, a coding rule A3 and a coding rule A4, and the coding rules A, the coding rule A3, the coding rule A4, the coding rule A3 and the coding rule A4 are sequentially distributed to a coding node SCL, a coding node IPUC, a coding node FDB and a coding node ACL. The target encoding node sequence is obtained after the encoding node sequence is assigned the target encoding rule.
Optionally, in this embodiment, the target encoding rule describes a manner in which each encoding node in the encoding node sequence encodes the message data of the target service type onto the encodable bus, that is, the encoding rule A1 describes a manner in which the encoding node SCL encodes the message data of the service type a onto the encodable bus; the encoding rule A2 describes the manner in which the encoding node IPUC encodes the message data of service type a onto the encodable bus; coding rule A3 describes the way the coding node FDB codes the message data of service type A onto the encodable bus; the encoding rule A4 describes the way the encoding node ACL encodes the message data of traffic type a onto the encodable bus.
In one exemplary embodiment, the encoding node sequence may be assigned a target encoding rule matching the target traffic type by, but not limited to: and switching a coding rule currently used by each coding node in the coding node sequence into a target coding sub-rule corresponding to the target service type, wherein the target coding rule comprises a plurality of target coding sub-rules, and each target coding sub-rule is used for indicating a mode of coding the message data of the target service type onto the encodable bus when the corresponding coding node receives the message data of the target service type.
Optionally, in this embodiment, fig. 4 is a schematic diagram of a coding node switching coding sub-rule according to an embodiment of the present application, and as shown in fig. 4, a coding node sequence includes: encoding node SCL, encoding node IPUC, encoding node FDB and encoding node ACL. Each encoding node corresponds to a Profile entry, wherein the encoding node SCL corresponds to a Profile entry (SCL), the encoding node IPUC corresponds to a Profile entry (IPUC), the encoding node FDB corresponds to a Profile entry (FDB), and the encoding node ACL corresponds to a Profile entry (ACL).
Taking the encoding node ACL as an example, description is given of Profile entry (ACL):
The Profile table entry (ACL) stores 8 coding rules (coding rule A4, coding rule B4, coding rule C4, coding rule D4, coding rule E4, coding rule F4, coding rule G4, and coding rule H4) of the coding node ACL. The 8 coding rules correspond to the 8 service types respectively, and in the scenario shown in fig. 3, the service type of the message data a is the service type a, that is, the target service type is the service type a, so that the target coding rule of the coding node sequence is the coding rule a, and the coding rule a includes a plurality of target coding sub-rules: coding rule A1, coding rule A2, coding rule A3 and coding rule A4. Wherein the encoding rule A4 is stored in a Profile entry (ACL). The remaining coding rules A1, A2, A3 are stored in the corresponding Profile entries.
In an exemplary embodiment, the coding rule currently used by each of the plurality of coding nodes included in the coding node sequence may be switched to the target coding sub-rule corresponding to the target service type by, but not limited to: determining a target service field corresponding to the target service type from the service types and the service fields with the corresponding relation; and switching a currently used service field of each coding node in the plurality of coding nodes included in the coding node sequence into the target service field, wherein each coding node is used for matching a target coding sub-rule corresponding to the target service field from the service field and the coding sub-rule with corresponding relations, and switching the currently used coding rule into the target coding sub-rule.
Optionally, in this embodiment, the above-mentioned coding node sequence includes 4 coding nodes: encoding node SCL, encoding node IPUC, encoding node FDB and encoding node ACL. Each encoding node corresponds to one Profile entry, and 8 encoding rules are stored in the Profile entry ("8" is only an example, and may be fewer or more, not limited to). The target chip can encode the message data sequentially through the 4 encoding nodes each time when receiving the message data, and in the encoding process of the message data, each encoding node in the 4 encoding nodes can use a corresponding target encoding sub-rule, and 4 different target encoding sub-rules of the 4 encoding nodes are matched to encode the message data sequentially. For example, the coding rule A1, the coding rule A2, the coding rule A3 and the coding rule A4 in fig. 3 are 4 different target coding sub-rules.
For one encoding node, 8 encoding rules are stored in the corresponding Profile entry. The Entry in the encoding node specifically uses which set of encoding rules, which is specified by the Profile ID field (corresponding to the service field) in the AD Entry of the Entry, and the unified bit width of the Profile ID field of each programming node is 4bits, so that 8 Profile IDs can be specified, which correspond to the IDs of 8 services respectively.
When the target chip processes the message data of the service type a, the Profile IDs used by all the nodes are the same, the Profile IDs are the service IDs, and the Profile ID field (i.e., the service field) of each programming node is switched to the Profile ID a (i.e., the target service field), and at this time, the encoding node SCL, the encoding node IPUC, the encoding node FDB and the encoding node ACL respectively obtain the encoding sub-rules corresponding to the Profile ID a from the respective Profile table entries: coding rule A1, coding rule A2, coding rule A3 and coding rule A4. And then sequentially executing multiple coding operations on the message data by using respective coding sub-rules. In addition, the target chip can process message data of other service types, and the steps are similar.
In the technical solution provided in step S206, the programmable bus is called XDATA, and is a 128bits data structure, and the target coding node sequence includes a plurality of target coding nodes, and each target coding node uses a corresponding target coding sub-rule to sequentially code the reference message data to the encodable bus.
In one exemplary embodiment, the reference message data may be encoded to the encodable bus by, but not limited to, invoking the target encoding node sequence by: acquiring a target coding sequence corresponding to the target coding node sequence, wherein the target coding sequence records the coding sequence of the reference message data by a plurality of coding nodes in the target coding node sequence; and performing multiple coding operations on the reference message data according to the target coding sequence through the target coding node sequence to obtain target message data, wherein the encodable bus is used for transmitting the target message data.
Optionally, in this embodiment, the target coding order corresponding to the target coding node sequence is sequentially: encoding node SCL, encoding node IPUC, encoding node FDB, encoding node ACL.
Optionally, in this embodiment, the target encoding node sequence performs multiple encoding operations on the reference message data according to the target encoding order to obtain target message data, for example, the encoding node SCL, the encoding node IPUC, the encoding node FDB, and the encoding node ACL sequentially perform 4 encoding operations on the reference message data to obtain target message data, where each encoding operation is performed on the basis of the message data obtained by performing the encoding operation on the previous encoding node. Of course, the first encoding operation may be performed directly on the reference message data.
Optionally, in this embodiment, fig. 5 is a schematic diagram of a target chip encoding packet data of different service types onto an encodable bus by using different encoding modes according to an embodiment of the present application, as shown in fig. 5, for a first service: the service type A adopts a first coding mode as follows: the first 32bits of the encodable bus XDATA are put into data by SCL, 32-64bits are put into data by IPUC, 64-96bits are put into data by FDB, 96-128bits are put into data by ACL, and the first set of encoding rules (corresponding to target encoding rules) are uniformly used: the Profile IDs of the encoding rule a, the encoding node SCL, the encoding node IPUC, the encoding node FDB, and the encoding node ACL are Profile ID a, and the encoding sub-rules (corresponding to the target encoding sub-rules) of the encoding rule a are sequentially used: coding rule A1, coding rule A2, coding rule A3 and coding rule A4. And so on, the second to eighth services, each of which is a different coding mode; all nodes of each service use the same Profile ID and are identical to the service ID. Under the design, the target chip can finish the coding processing of the message data of 8 services.
In one exemplary embodiment, the reference message data may be encoded multiple times in the target encoding order by the target encoding node sequence by, but not limited to: and under the condition that the target coding node sequence comprises N coding nodes, sequentially calling the N coding nodes according to a target coding sequence to execute coding operation on the reference message data, wherein the ith coding node in the N coding nodes is used for executing the ith coding operation on the reference message data after the ith-1 coding to obtain the ith coded reference message data, under the condition that i takes a value of 1, the ith coding node is used for executing the 1 st coding operation on the reference message data which is not coded, under the condition that i takes a value of N, the ith coding node is used for executing the ith coding operation on the reference message data after the ith-1 coding to obtain the target message data, N is a positive integer which is greater than 1, and i is a positive integer which is greater than or equal to 1 and less than or equal to N.
Optionally, in this embodiment, in a case that the target encoding node sequence includes 4 encoding nodes, the 4 encoding nodes are sequentially called to perform an encoding operation on the reference packet data according to a target encoding order (encoding node SCL, encoding node IPUC, encoding node FDB, encoding node ACL).
In one exemplary embodiment, the N encoding nodes may be invoked in order in the target encoding order to perform an encoding operation on the reference message data by, but not limited to: in the case that the target coding node sequence includes N coding nodes, an ith coding node of the N coding nodes performs an ith coding operation on the i-1 th coded reference message data by: acquiring the reference message data after the i-1 th coding from the i-1 st coding position of the encodable bus, wherein under the condition that i takes a value of 1, the reference message data is acquired from a message data interface of the target chip, and the message data interface is used for receiving the message data; executing the ith coding operation on the reference message data after the ith-1 coding according to the target coding rule to obtain the reference message data after the ith coding; mapping the reference message data after the ith coding to the ith coding position of the encodable bus until the value of i is N, wherein under the condition of the value of i being N, the reference message data after the ith coding is determined to be the target message data and sent to downstream equipment of the target chip.
In the case that the target encoding node sequence includes 4 encoding nodes, the encoding operation is sequentially invoked by the 4 encoding nodes according to a target encoding order (encoding node SCL, encoding node IPUC, encoding node FDB, encoding node ACL) to perform the encoding operation on the reference message data, taking the reference message data as the message data A0 as an example:
The 1 st encoding operation: the encoding node SCL obtains the message data A0, executes the 1 st encoding operation to obtain the message data A1, and maps the message data A1 to the position 1 of the encodable bus;
coding operation 2: the encoding node IPUC obtains the message data A1 from the encodable bus, executes the encoding operation for the 2 nd time to obtain the message data A2, and maps the message data A2 to the position 2 of the encodable bus;
3 rd encoding operation: the encoding node IPUC obtains the message data A2 from the encodable bus, executes the encoding operation for the 3 rd time to obtain the message data A3, and maps the message data A3 to the position 3 of the encodable bus;
4 th encoding operation: the encoding node IPUC obtains the message data A3 from the encodable bus, executes the 4 th encoding operation to obtain the message data A4, and maps the message data A4 to the position 4 of the encodable bus;
the encodable bus determines the message data A4 at the position 4 as the target message data and sends the target message data to downstream equipment of the target chip.
The method combines the coding rule ID and the service ID, the coding mode of a programmable bus corresponds to a service type, and the number of the coding rules of each programming node is unified to meet the service requirement.
From the description of the above embodiments, it will be clear to a person skilled in the art that the method according to the above embodiments may be implemented by means of software plus the necessary general hardware platform, but of course also by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising several instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method of the various embodiments of the present application.
Fig. 6 is a block diagram of a data encoding apparatus according to an embodiment of the present application, in which a target chip is disposed with a sequence of encoding nodes and an encodable bus, the encoding nodes included in the sequence of encoding nodes being connected to the encodable bus, as shown in fig. 6, the apparatus comprising:
The identifying module 602 is configured to identify a service type to which reference message data to be transmitted belongs, so as to obtain a target service type;
an allocation module 604, configured to allocate a target coding rule matched with the target service type to the coding node sequence, so as to obtain a target coding node sequence, where the target coding rule records a manner in which each coding node in the coding node sequence encodes message data of the target service type onto the encodable bus;
And a calling module 606, configured to call the target encoding node sequence to encode the reference message data to the encodable bus, where the encodable bus is used to transmit the encoded reference message data.
Through the embodiment, the encoding node sequence and the encodable bus are deployed on the target chip, a plurality of encoding nodes included in the encoding node sequence are connected with the encodable bus, and the encoding method of the data comprises the steps of identifying the service type to which the reference message data to be transmitted belongs, so as to obtain the target service type; distributing a target coding rule matched with a target service type to the coding node sequence to obtain a target coding node sequence, wherein the target coding rule records the mode that each coding node in the coding node sequence codes message data of the target service type to a encodable bus; and calling the target coding node sequence to code the reference message data to a encodable bus, wherein the encodable bus is used for transmitting the encoded reference message data. When receiving the reference message data to be transmitted, the target chip firstly identifies the service type to which the reference message data belongs to obtain a target service type, distributes matched target coding rules for the coding node sequence according to the target service type to obtain a target coding node sequence, finally calls the target coding node sequence to code the reference message data to a encodable bus, and can realize the function of a single target chip for encoding message data of various different service types by the data encoding method. By adopting the technical scheme, the problems of poor compatibility of the data coding mode to the message data of different service types and the like in the related technology are solved, and the technical effect of improving the compatibility of the data coding mode to the message data of different service types is realized.
In one exemplary embodiment, the allocation module includes:
And the switching unit is used for switching the coding rule currently used by each coding node in the coding node sequence into a target coding sub-rule corresponding to the target service type, wherein the target coding rule comprises a plurality of target coding sub-rules, and each target coding sub-rule is used for indicating a mode of coding the message data of the target service type onto the encodable bus when the corresponding coding node receives the message data of the target service type.
In an exemplary embodiment, the switching unit is further configured to:
Determining a target service field corresponding to the target service type from the service types and the service fields with the corresponding relation;
And switching a currently used service field of each coding node in the plurality of coding nodes included in the coding node sequence into the target service field, wherein each coding node is used for matching a target coding sub-rule corresponding to the target service field from the service field and the coding sub-rule with corresponding relations, and switching the currently used coding rule into the target coding sub-rule.
In one exemplary embodiment, the calling module includes:
An obtaining unit, configured to obtain a target coding sequence corresponding to the target coding node sequence, where the target coding sequence records a sequence in which the plurality of coding nodes in the target coding node sequence code the reference message data;
And the execution unit is used for executing multiple coding operations on the reference message data according to the target coding sequence through the target coding node sequence to obtain target message data, wherein the encodable bus is used for transmitting the target message data.
In an exemplary embodiment, the execution unit is further configured to:
And under the condition that the target coding node sequence comprises N coding nodes, sequentially calling the N coding nodes according to a target coding sequence to execute coding operation on the reference message data, wherein the ith coding node in the N coding nodes is used for executing the ith coding operation on the reference message data after the ith-1 coding to obtain the ith coded reference message data, under the condition that i takes a value of 1, the ith coding node is used for executing the 1 st coding operation on the reference message data which is not coded, under the condition that i takes a value of N, the ith coding node is used for executing the ith coding operation on the reference message data after the ith-1 coding to obtain the target message data, N is a positive integer which is greater than 1, and i is a positive integer which is greater than or equal to 1 and less than or equal to N.
In an exemplary embodiment, the execution unit is further configured to:
in the case that the target coding node sequence includes N coding nodes, an ith coding node of the N coding nodes performs an ith coding operation on the i-1 th coded reference message data by:
acquiring the reference message data after the i-1 th coding from the i-1 st coding position of the encodable bus, wherein under the condition that i takes a value of 1, the reference message data is acquired from a message data interface of the target chip, and the message data interface is used for receiving the message data;
executing the ith coding operation on the reference message data after the ith-1 coding according to the target coding rule to obtain the reference message data after the ith coding;
Mapping the reference message data after the ith coding to the ith coding position of the encodable bus until the value of i is N, wherein under the condition of the value of i being N, the reference message data after the ith coding is determined to be the target message data and sent to downstream equipment of the target chip.
In one exemplary embodiment, the identification module includes:
the extraction unit is used for extracting target data characteristics of the reference message data;
And the matching unit is used for matching the target service type corresponding to the target data characteristic from the data characteristic and the service type.
An embodiment of the present application also provides a storage medium including a stored program, wherein the program executes the method of any one of the above.
Alternatively, in the present embodiment, the above-described storage medium may be configured to store program code for performing the steps of:
S1, identifying a service type to which reference message data to be transmitted belongs to obtain a target service type;
S2, distributing a target coding rule matched with the target service type for the coding node sequence to obtain a target coding node sequence, wherein the target coding rule records the mode that each coding node in the coding node sequence codes message data of the target service type to the encodable bus;
s3, calling the target coding node sequence to code the reference message data to the encodable bus, wherein the encodable bus is used for transmitting the encoded reference message data.
An embodiment of the application also provides an electronic device comprising a memory having stored therein a computer program and a processor arranged to run the computer program to perform the steps of any of the method embodiments described above.
Optionally, the electronic apparatus may further include a transmission device and an input/output device, where the transmission device is connected to the processor, and the input/output device is connected to the processor.
Alternatively, in this embodiment, the above-mentioned processor may be configured to execute the following steps by a computer program:
S1, identifying a service type to which reference message data to be transmitted belongs to obtain a target service type;
S2, distributing a target coding rule matched with the target service type for the coding node sequence to obtain a target coding node sequence, wherein the target coding rule records the mode that each coding node in the coding node sequence codes message data of the target service type to the encodable bus;
s3, calling the target coding node sequence to code the reference message data to the encodable bus, wherein the encodable bus is used for transmitting the encoded reference message data.
Alternatively, in the present embodiment, the storage medium may include, but is not limited to: a U-disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory RAM), a removable hard disk, a magnetic disk, or an optical disk, etc., which can store program codes.
Optionally, specific examples in this embodiment may refer to examples described in the foregoing embodiments and optional implementations, and this embodiment is not described herein.
It will be appreciated by those skilled in the art that the modules or steps of the application described above may be implemented in a general purpose computing device, they may be concentrated on a single computing device, or distributed across a network of computing devices, they may alternatively be implemented in program code executable by computing devices, so that they may be stored in a memory device for execution by computing devices, and in some cases, the steps shown or described may be performed in a different order than that shown or described, or they may be separately fabricated into individual integrated circuit modules, or multiple modules or steps within them may be fabricated into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.
The foregoing is merely a preferred embodiment of the present application and it should be noted that modifications and adaptations to those skilled in the art may be made without departing from the principles of the present application, which are intended to be comprehended within the scope of the present application.

Claims (10)

1. A method for encoding data, wherein a target chip is provided with a sequence of encoding nodes and an encodable bus, and a plurality of encoding nodes included in the sequence of encoding nodes are connected with the encodable bus, the method comprising:
Identifying the service type to which the reference message data to be transmitted belongs to obtain a target service type;
Distributing a target coding rule matched with the target service type to the coding node sequence to obtain a target coding node sequence, wherein the target coding rule records the mode that each coding node in the coding node sequence codes message data of the target service type to the encodable bus;
and calling the target coding node sequence to code the reference message data to the encodable bus, wherein the encodable bus is used for transmitting the encoded reference message data.
2. The method of claim 1, wherein assigning the sequence of encoding nodes a target encoding rule that matches the target traffic type comprises:
And switching a coding rule currently used by each coding node in the coding node sequence into a target coding sub-rule corresponding to the target service type, wherein the target coding rule comprises a plurality of target coding sub-rules, and each target coding sub-rule is used for indicating a mode of coding the message data of the target service type onto the encodable bus when the corresponding coding node receives the message data of the target service type.
3. The method according to claim 2, wherein said switching the coding rule currently used by each of the plurality of coding nodes included in the coding node sequence to the target coding sub-rule corresponding to the target service type includes:
Determining a target service field corresponding to the target service type from the service types and the service fields with the corresponding relation;
And switching a currently used service field of each coding node in the plurality of coding nodes included in the coding node sequence into the target service field, wherein each coding node is used for matching a target coding sub-rule corresponding to the target service field from the service field and the coding sub-rule with corresponding relations, and switching the currently used coding rule into the target coding sub-rule.
4. The method of claim 1, wherein said invoking the sequence of target encoding nodes to encode the reference message data to the encodable bus comprises:
acquiring a target coding sequence corresponding to the target coding node sequence, wherein the target coding sequence records the coding sequence of the reference message data by a plurality of coding nodes in the target coding node sequence;
And performing multiple coding operations on the reference message data according to the target coding sequence through the target coding node sequence to obtain target message data, wherein the encodable bus is used for transmitting the target message data.
5. The method of claim 4, wherein performing the encoding operations on the reference message data by the target encoding node sequence in the target encoding order comprises:
And under the condition that the target coding node sequence comprises N coding nodes, sequentially calling the N coding nodes according to a target coding sequence to execute coding operation on the reference message data, wherein the ith coding node in the N coding nodes is used for executing the ith coding operation on the reference message data after the ith-1 coding to obtain the ith coded reference message data, under the condition that i takes a value of 1, the ith coding node is used for executing the 1 st coding operation on the reference message data which is not coded, under the condition that i takes a value of N, the ith coding node is used for executing the ith coding operation on the reference message data after the ith-1 coding to obtain the target message data, N is a positive integer which is greater than 1, and i is a positive integer which is greater than or equal to 1 and less than or equal to N.
6. The method according to claim 5, wherein sequentially invoking N of the encoding nodes in the target encoding order to perform an encoding operation on the reference message data comprises:
in the case that the target coding node sequence includes N coding nodes, an ith coding node of the N coding nodes performs an ith coding operation on the i-1 th coded reference message data by:
acquiring the reference message data after the i-1 th coding from the i-1 st coding position of the encodable bus, wherein under the condition that i takes a value of 1, the reference message data is acquired from a message data interface of the target chip, and the message data interface is used for receiving the message data;
executing the ith coding operation on the reference message data after the ith-1 coding according to the target coding rule to obtain the reference message data after the ith coding;
Mapping the reference message data after the ith coding to the ith coding position of the encodable bus until the value of i is N, wherein under the condition of the value of i being N, the reference message data after the ith coding is determined to be the target message data and sent to downstream equipment of the target chip.
7. The method according to claim 1, wherein the identifying the service type to which the reference message data to be transmitted belongs to obtain the target service type includes:
Extracting target data characteristics of the reference message data;
And matching the target service type corresponding to the target data characteristic from the data characteristic and the service type.
8. A data encoding apparatus, on a target chip, an encoding node sequence and an encodable bus, the encoding node sequence including a plurality of encoding nodes connected to the encodable bus, the apparatus comprising:
The identification module is used for identifying the service type to which the reference message data to be transmitted belongs to, and obtaining a target service type;
The distribution module is used for distributing a target coding rule matched with the target service type to the coding node sequence to obtain a target coding node sequence, wherein the target coding rule records the mode that each coding node in the coding node sequence codes the message data of the target service type to the encodable bus;
And the calling module is used for calling the target coding node sequence to code the reference message data to the encodable bus, wherein the encodable bus is used for transmitting the encoded reference message data.
9. A computer-readable storage medium, characterized in that the computer-readable storage medium comprises a stored program, wherein the program when run performs the method of any one of claims 1 to 7.
10. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to execute the method according to any of claims 1 to 7 by means of the computer program.
CN202410146949.6A 2024-02-01 2024-02-01 Data encoding method and device, storage medium and electronic device Pending CN118118127A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410146949.6A CN118118127A (en) 2024-02-01 2024-02-01 Data encoding method and device, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410146949.6A CN118118127A (en) 2024-02-01 2024-02-01 Data encoding method and device, storage medium and electronic device

Publications (1)

Publication Number Publication Date
CN118118127A true CN118118127A (en) 2024-05-31

Family

ID=91207886

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410146949.6A Pending CN118118127A (en) 2024-02-01 2024-02-01 Data encoding method and device, storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN118118127A (en)

Similar Documents

Publication Publication Date Title
EP3267721B1 (en) Air-interface protocol stack configuration method, and data transmission method and device
US20120140686A1 (en) Method and apparatus for sending, receiving, and transmission of data packets (as amended)
CN112311600A (en) Strategy suggestion generation method and device based on network data analysis
CN111885733B (en) Resource allocation method, device, storage medium and network equipment
CN111092693A (en) Method and communication device for transmitting data
CN112333834B (en) Carrier resource scheduling method and device
CN111698751A (en) Method and device for determining URSP rule priority
CN111182611B (en) Communication method and device
CN107995671A (en) Connect method, apparatus, equipment and the storage medium of wireless access points
CN111901881A (en) Transmission method and device
CN105357694A (en) 4G user data message processing method and system
US20070135124A1 (en) Method and system of multiple wireless HPLMN
CN107005464B (en) Method and device for processing service flow data packet
US20130212301A1 (en) Method for assigning a subscriber identifier to a network subscriber, communication network and network device
CN113812196B (en) Cache multicast downlink data notification method, device, terminal and access point equipment
US6563840B1 (en) Broadcast message transmitting and receiving method in a mobile communication system
CN118118127A (en) Data encoding method and device, storage medium and electronic device
CN112004224B (en) Number addressing method
CN115842781B (en) Rule matching method and device and terminal equipment
CN117676916A (en) Communication resource management method, device, system and storage medium
CN112188562B (en) Multicast scheduling method and device for relay base station, storage medium and electronic device
CN113810907B (en) Signaling control method, apparatus, terminal device and computer readable storage medium
CN107371263B (en) Method and device for scheduling uplink resources
JP2013110550A (en) Radio communication system and session sharing method
CN112153579A (en) Method and device for managing user group

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination