WO2022116009A1 - 一种数据传输方法及装置、通信设备 - Google Patents
一种数据传输方法及装置、通信设备 Download PDFInfo
- Publication number
- WO2022116009A1 WO2022116009A1 PCT/CN2020/133158 CN2020133158W WO2022116009A1 WO 2022116009 A1 WO2022116009 A1 WO 2022116009A1 CN 2020133158 W CN2020133158 W CN 2020133158W WO 2022116009 A1 WO2022116009 A1 WO 2022116009A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- field
- tag
- byte
- value
- length
- 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.)
- Ceased
Links
Images
Classifications
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D30/00—Reducing energy consumption in communication networks
- Y02D30/70—Reducing energy consumption in communication networks in wireless communication networks
Definitions
- the embodiments of the present application relate to the field of mobile communication technologies, and in particular, to a data transmission method and apparatus, and a communication device.
- the data transmitted between the client and the server is encoded and decoded in TLV format.
- the current TLV format indicates that the TLV structure includes a tag (Tag) field, a length (Length) field and a value (Value) field.
- a basic data element includes the above three fields, among which, the Tag field is used to describe the label of the data, the Length field is used to describe the length of the Value field, and the Value field is used to describe the Value of the data (that is, the attribute of the tag described by the Tag field. value).
- the efficiency of encoding and decoding is low due to the lack of some control information.
- Embodiments of the present application provide a data transmission method and apparatus, and a communication device.
- the first device sends the first signaling to the second device, and the data carried in the first signaling is encoded in the first TLV format; wherein,
- the first TLV format is used to determine a first TLV structure, where the first TLV structure includes a control byte (ControlByte) field, a Tag field, and at least one of the following: a Length field and a Value field.
- ControlByte ControlByte
- Tag Tag
- Value Value
- the second device receives the first signaling sent by the first device, and the data carried in the first signaling is encoded in the first TLV format; wherein,
- the first TLV format is used to determine a first TLV structure, where the first TLV structure includes a ControlByte field, a Tag field, and at least one of the following: a Length field and a Value field.
- the data transmission device provided by the embodiment of the present application is applied to the first device, and the device includes:
- a sending unit configured to send a first signaling to the second device, where the data carried in the first signaling is encoded in a first TLV format;
- the first TLV format is used to determine a first TLV structure, where the first TLV structure includes a ControlByte field, a Tag field, and at least one of the following: a Length field and a Value field.
- the data transmission device provided by the embodiment of the present application is applied to the second device, and the device includes:
- a receiving unit configured to receive the first signaling sent by the first device, where the data carried in the first signaling is encoded in the first TLV format;
- the first TLV format is used to determine a first TLV structure, where the first TLV structure includes a ControlByte field, a Tag field, and at least one of the following: a Length field and a Value field.
- the communication device includes a processor and a memory.
- the memory is used to store a computer program
- the processor is used to call and run the computer program stored in the memory to execute the above-mentioned data transmission method.
- the chip provided by the embodiment of the present application is used to implement the above-mentioned data transmission method.
- the chip includes: a processor for invoking and running a computer program from the memory, so that the device on which the chip is installed executes the above-mentioned data transmission method.
- the computer-readable storage medium provided by the embodiment of the present application is used to store a computer program, and the computer program enables a computer to execute the above-mentioned data transmission method.
- the computer program product provided by the embodiments of the present application includes computer program instructions, and the computer program instructions cause a computer to execute the above-mentioned data transmission method.
- the computer program provided by the embodiment of the present application when it runs on the computer, causes the computer to execute the above-mentioned data transmission method.
- the TLV structure (ie the first TLV structure) determined by the new type of TLV format includes a control byte (ControlByte) field, a Tag field , and at least one of the following: Length field, Value field. Since the first TLV structure has a ControlByte field, some control information related to other fields can be described through the ControlByte field, the efficiency of encoding and decoding is improved, and a TLV structure conforming to the application is realized.
- FIG. 1 is an optional communication architecture diagram provided by an embodiment of the present application
- FIG. 2 is a schematic flowchart of a data transmission method provided by an embodiment of the present application.
- FIG. 3 is a schematic diagram of interaction between a client and a server provided by an embodiment of the present application.
- FIG. 4 is a schematic diagram 1 of the structure and composition of a data transmission device provided by an embodiment of the present application.
- FIG. 5 is a second schematic diagram of the structure and composition of a data transmission device provided by an embodiment of the present application.
- FIG. 6 is a schematic structural diagram of a communication device provided by an embodiment of the present application.
- FIG. 7 is a schematic structural diagram of a chip according to an embodiment of the present application.
- the Open Connectivity Foundation defines a client and a server.
- the server refers to the device that provides resources
- the client refers to the device that accesses resources.
- OCF adopts the Representational State Transfer (RESTful) architecture, and uses resources to represent IoT physical devices, as well as the functional services provided by the devices and the status of the devices.
- the device that provides resources is the server, and the device that accesses resources is the client. end.
- the client and server defined in OCF are logical functional entities, and a device can be a client, a server, or both a client and a server.
- the business interaction between the client and the server is realized by performing RESTful operations on resources.
- the RESTful operations can be Create-Retrieve-Update-Delete-Notify (CRUDN) operations.
- CRUDN CRUDN
- the operation can be any one or more of the following operations: Create (Create), Read (Retrieve), Update (Update), Delete (Delete), and Notify (Notify).
- the client is the initiator of the RESTful operation
- the server is the responder of the RESTful operation.
- the client sends a resource operation request to the server, and requests to operate the resources on the server.
- the server performs the resource operation and returns a response to the client. , the content and description information of the resource are carried in the response.
- FIG. 1 is an optional communication architecture diagram provided by an embodiment of the present application.
- the resource is described as a resource model layer, and each resource corresponds to a specific uniform resource identifier (Uniform Resource Identifier, URI), which can be accessed by accessing the resource.
- URI Uniform Resource Identifier
- It is the transport protocol layer that transmits resource content and description information. By mapping resource operations to specific transport protocols, the Restful operation of each resource is transformed into an entity message that is transmitted between devices, providing a means for interconnection between devices.
- the transmission protocol of OCF adopts Constrained Application Protocol (CoAP) to carry resource operations.
- CoAP Constrained Application Protocol
- Each CRUDN operation is mapped to a CoAP request message or response message.
- the method operates on the resources of the server, thereby realizing the transition of the resource state.
- TLV is a type of Basic Encoding Rule (BER) encoding and complies with the ASN1 standard.
- the full name of TLV is: Tag (tag)-Length (length)-Value (value).
- BER Basic Encoding Rule
- a basic data element includes a tlv triplet, namely Tag-Length-Value.
- a basic data element includes three fields, namely Tag field, Length field and Value field.
- the Tag field is used to describe the tag of the data
- the Length field is used to describe the length of the Value field
- the Value field is used to describe the Value of the data (ie, the attribute value of the tag described by the Tag field).
- the technical solutions of the embodiments of the present application propose a TLV format that matches a specific transmission protocol, which is called the first TLV format. It should be noted that the description of the first TLV format can also be replaced by other methods, such as the TLV format , or CTLV format, etc.
- the client and the server can use the first TLV format to encode and decode the content of the payload (that is, the data carried in the signaling) in the mutual signaling.
- FIG. 2 is a schematic flowchart of a data transmission method provided by an embodiment of the present application. As shown in FIG. 2 , the data transmission method includes the following steps:
- Step 201 The first device sends the first signaling to the second device, the second device receives the first signaling sent by the first device, and the data carried in the first signaling is encoded in the first TLV format; wherein, The first TLV format is used to determine a first TLV structure, where the first TLV structure includes a ControlByte field, a Tag field, and at least one of the following: a Length field and a Value field.
- the first device is a client
- the second device is a server.
- the first signaling is a resource operation request message.
- the resource operation request message may be, for example, a request message for modifying a service (Server) state.
- the data carried in the first signaling is encoded in the first TLV format provided by the embodiment of the present application.
- the server After receiving the resource operation request message, the server decodes the first signaling according to the first TLV format provided in the embodiment of the present application, thereby obtaining data carried in the first signaling, and performs corresponding operations, such as attributes, according to the data Change operation.
- the first device is a server
- the second device is a client.
- the first signaling is a response message.
- the data carried in the response message is encoded in the first TLV format provided by the embodiment of the present application.
- the client terminal decodes the first signaling according to the first TLV format provided by the embodiment of the present application, so as to obtain the data carried in the first signaling.
- the first TLV format in this embodiment of the present application is used to determine a first TLV structure, where the first TLV structure includes a ControlByte field, a Tag field, and at least one of the following: a Length field and a Value field.
- the first TLV structure includes a ControlByte field and a Tag field.
- the first TLV structure includes a ControlByte field, a Tag field and a Value field.
- the first TLV structure includes a ControlByte field, a Tag field, a Length field and a Value field.
- the ControlByte field is used to describe the control information of other fields, for example, the control information of the Tag field and/or the control information of the Value field.
- the control information of the Tag field includes the description of the Tag.
- the control information of the Value field includes the data type of the Value, and optionally, the length of the Length field and/or the length of the Value field.
- the Tag field is used to describe the tag of the data.
- the Length field is used to describe the length of the Value field.
- the Value field is used to describe the Value of the data (that is, the attribute value corresponding to the tag).
- the content of the Tag field is 0X12, which means that the tag is temperature.
- the content of the Value field is 15, which represents the value of the temperature of 15 degrees.
- the length of the ControlByte field is N1 bytes, and the value of N1 is a positive integer.
- the value of N1 is 1, that is, the length of the ControlByte field is 1 byte.
- the ControlByte field includes two parts, namely a first part and a second part, wherein the first part may also be called a tagControl part, and the second part may also be called an elementType part.
- the first part is used to determine the related control information of the Tag field
- the second part is used to determine the related control information of the Value field.
- the first part of the bits in the ControlByte field are the upper 3 bits in the ControlByte field.
- Bit7-bit5 are the first part of bits.
- the second part of bits in the ControlByte field is the lower 5 bits in the ControlByte field.
- Bit4-bit0 is the second part of bits.
- the first part of the bit in the ControlByte field is used to indicate that the purpose of the data is one of the following: general for device access, general for device control, and general for device control. Further, the first part of bits in the ControlByte field is also used to indicate the description of the Tag.
- the description of the Tag is used to determine at least one of the following: the length of the Tag field, the tag type described in the Tag field is an attribute identification tag (iid tag) or an index tag (index tag) or a device identification tag (DeviceID tag) Either the transaction identification tag (ID tag) or the service identification tag (siid tag).
- the tag type described by the Tag field is, for example: the tag type described by the Tag field is an attribute identification tag (iid tag) or an index tag (index tag).
- the second part of bits in the ControlByte field is used to indicate the data type of the Value described in the Value field. Further, the second part of bits in the ControlByte field is also used to indicate at least one of the following: the length of the Length field and the length of the Value field. Alternatively, the second part of bits in the ControlByte field is also used to indicate: the terminator of the container data type.
- Tables 1-1 and 1-2 show the contents indicated by the different values of the first part of the bits (ie Bit7-bit5) in the ControlByte field, and the second part of the bits (ie Bit4) -bit0) indicates the content in the case of different values.
- the second part of bits is used to indicate that the data type of Value is an 8-bit unsigned integer (uint8) , and there is no Length field (it can also be understood that the length of the Length field is 0 bytes), and the length of the Value field is 1 byte.
- the second part of the bits is used to indicate that the data type of the Value is an 8-bit signed integer (int8) , and there is no Length field (it can also be understood that the length of the Length field is 0 bytes), and the length of the Value field is 1 byte.
- the second part of the bits is used to indicate that the data type of Value is a boolean (boolean) type, and the data The value of is false (false), and there is no Length field (it can also be understood that the length of the Length field is 0 bytes) and there is no Value field (it can also be understood that the length of the Value field is 0 bytes).
- the second part of the bits is used to indicate that the data type of Value is a floating point (float) type, and no The Length field (it can also be understood that the length of the Length field is 0 bytes), and the length of the Value field is 4 bytes.
- the second part of the bits is used to indicate that the data type of Value is bytes, and the Length The length of the field is 1 byte, and the Value field is variable length.
- the second part of the bits is used to indicate that the data type of Value is a string (string) type, and the Length
- the length of the field is 1 byte, and the Value field is variable length.
- the second part of the bits are used to indicate that the data type of Value is a struct type, and the Length Field and Value fields are variable length.
- the second part of the bits are used to indicate that the data type of Value is an array type, and the Length field and Value fields are variable length.
- the second part of the bits (ie Bit4-bit0) in the ControlByte field is 11011
- the second part of the bit is used to indicate the terminator of the struct
- the value of Bit5-bit7 is 000 .
- the second part of the bit is used to indicate the terminator of the array, and the value of Bit5-bit7 is 000 .
- unsigned integer type signed integer type
- Boolean type floating point type
- byte type 0 .
- String types are reference types.
- Structure types and array types are container data types.
- the second part of the bits is used to indicate that the purpose of the data is universal for device access.
- the second part of the bits is used to indicate that the purpose of the data is for device control, and the tag described in the Tag field
- the type is iid tag
- the length of the Tag field is 1 byte.
- the tag value (that is, the value of the Tag field) is the iid value
- the value value (that is, the value of the Value field) is the attribute value corresponding to idd.
- iid is the unique identifier of the attribute, or event, or method within the service.
- the second part of the bits is used to indicate that the purpose of the data is for device control, and the tag described in the Tag field
- the type is index tag, and the length of the Tag field is 1 byte.
- index is used to mark the child element in the struct data type or array data type
- the tag value ie the value of the Tag field
- the value value ie the value of the Value field
- the second part of the bits is used to indicate that the purpose of the data is common for device control.
- the tag value (that is, the value of the Tag field) is 0x1, which represents the DeviceID tag, and the value value (that is, the value of the Value field) is the deviceID value, where deviceID is an ID that identifies a device.
- the tag value (that is, the value of the Tag field) is 0x2, which represents the transaction ID tag, and the value value (that is, the value of the Value field) is the transaction ID value.
- the transaction ID is a group of associated The identifier of the signaling flow.
- the tag value (that is, the value of the Tag field) is 0x3, which represents the siid tag, and the value value (that is, the value of the Value field) is a siid value with a length of 1 byte.
- siid is a The ID of the service instance.
- the tag value (that is, the value of the Tag field) is 0x4, which represents the siid tag, and the value value (that is, the value of the Value field) is the siid value with a length of 2 bytes.
- siid is a The ID of the service instance.
- the length of the Tag field is N2 bytes, and N2 is a positive integer.
- the value of N2 is greater than or equal to 0 and less than or equal to 8, that is, the length of the Tag field is 0-8 bytes.
- the structure of the byte occupied by the Tag field is shown in Table 2-1 below, where the highest bit (ie bit7) of the byte is the Tag length identification bit, and the lower 7 bits of the byte (ie bit6- bit0) is used to identify the Tag value.
- the structure of the byte occupied by the Tag field is shown in Table 2-2 below, where all bits (ie, bit7-bit0) of the byte are used to identify the Tag value.
- the Tag field can occupy one or more bytes.
- the length and value of the Tag field may be determined through the following scheme.
- the Tag field occupies the first byte, and if the value of the highest bit in the first byte is the first value, it means that the Tag field only occupies the first byte, and the The value of the Tag field is determined by the lower 7 bits in the first byte; wherein, the highest bit in the first byte is the Tag length identification bit.
- the first value is 0. Specifically, when the value of the Tag length identification bit in a byte is 0, Bit6-bit0 is used to identify the tag value (that is, the value of the Tag field is determined).
- the Tag field occupies at least the first byte, and if the value of the highest bit in the first byte is the second value, it means that the Tag field also occupies the first byte after the first byte.
- Two bytes and a third byte, and the value of the Tag field is determined by all bits in the second byte and all bits in the third byte; wherein, the first word The highest bit in the section is the Tag length identification bit.
- the second value is 1.
- the value of the Tag length identification bit in a byte ie, the first byte
- the Tag field occupies at least the first byte, and if the value of the highest bit in the first byte is the second value, it means that the Tag field also occupies the first byte after the first byte.
- Two bytes, and the value of the Tag field is determined by the lower 7 bits in the first byte and all the bits in the second byte; wherein, the highest bit in the first byte It is the Tag length identification bit.
- the second value is 1.
- the value of the Tag length identification bit of a byte ie, the first byte
- the Tag field occupies at least the first byte, and if the value of the highest bit in the first byte is the second value, it means that the Tag field also occupies the first byte after the first byte. Two bytes, if the value of the highest bit of the second byte is the second value, it means that the Tag field also occupies the third byte after the second byte, and so on until the The value of the highest bit in the Mth byte occupied by the Tag field is the first value, the Mth byte is taken as the last byte occupied by the Tag field, and M is a positive integer; the value of the Tag field Determined by the lower 7 bits of each of the first byte to the Mth byte.
- the second value is 1 and the first value is 0.
- the Tag length identification bit of a byte that is, the first byte
- Use bit6-bit0 of each byte to identify the tag value (that is, to determine the value of the Tag field).
- the Tag field occupies the first byte and the second byte.
- the Tag length identification bit of the first byte is 1, which means that the first byte followed by a byte (ie, the second byte) also belongs to the Tag field
- the Tag length identification bit of the second byte is 0, representing The second byte is the last byte occupied by the Tag field.
- the first half of the binary data, 0000001 corresponds to bit6-bit0 of the first byte
- the second half, 0000001 corresponds to bit6-bit0 of the second byte.
- the two parts are combined to identify a tag value of "129". It should be noted that if there are three bytes or more bytes, it can be deduced by analogy.
- the length of the Tag field is determined based on the first part in the ControlByte field, and the first part in the ControlByte field is used to indicate the description of the Tag, and the description of the Tag is used to determine at least one of the following: the Tag field
- the length of the tag field, the tag type described by the Tag field is iid tag or index tag or DeviceID tag or transaction ID tag or siid tag.
- the length of the Tag field can be determined directly according to the first part (ie, the tagControl part) in the ControlByte field.
- the indication content corresponding to the value of the first part in the ControlByte field may be determined with reference to the content shown in Table 1-1 above.
- the length of the Length field is N3 bytes, and N3 is a positive integer.
- the value of N3 is greater than or equal to 0 and less than or equal to 8, that is, the length of the Length field is 0-8 bytes.
- the length of the Length field is determined based on the second part in the ControlByte field, and the second part in the ControlByte field is used to indicate the Length field length.
- the Length field of container data types (such as struct type and array type) is of variable length, so the length can be determined in a variable-length manner.
- the terminator of a struct or an array may be used to identify the end position of a struct or a struct, so that the length of the Length field is determined according to the end position.
- the basic data types are, for example, the unsigned integer type (uint), the signed integer type (nit), and the floating point type (float) as shown in Table 2-1.
- the container data type is, for example, the structure (struct) type shown in Table 2-1, the array (array) type, and the like.
- the length of the Value field is N4 bytes, and the value of N4 is a positive integer.
- the length of the Value field is determined based on the second part in the ControlByte field, and the second part in the ControlByte field is used to indicate the length of the Value field of the basic data type; or, the ControlByte The second part of the field is used to indicate the terminator of the container data type.
- the above technical solutions of the embodiments of the present application provide a novel TLV structure (that is, the first TLV structure).
- the following Table 4 provides the overall structure of the first TLV structure, where the length of the ControlByte field is It is 1 byte (byte), the length of the Tag field is 0 to 8 bytes, the length of the Length field is 0 to 8 bytes, and the length of the Value field is variable according to the content.
- ControlByte Tag Length Value 1byte 0-8bytes 0-8bytes lengthen
- the client and the server can use the first TLV format in the above solution to encode and decode the content of the payload (that is, the data carried in the signaling) in the mutual signaling, thereby improving the encoding and decoding efficiency.
- FIG. 4 is a schematic structural diagram 1 of a data transmission apparatus provided by an embodiment of the present application, which is applied to a first device. As shown in FIG. 4 , the data transmission apparatus includes:
- the sending unit 401 is configured to send a first signaling to a second device, where the data carried in the first signaling is encoded in a first TLV format; wherein,
- the first TLV format is used to determine a first TLV structure, where the first TLV structure includes a control byte ControlByte field, a tag Tag field, and at least one of the following: a Length field and a Value field.
- the length of the ControlByte field is N1 bytes, and the value of N1 is a positive integer.
- the value of N1 is 1.
- the first part of the bit in the ControlByte field is used to indicate that the purpose of the data is one of the following: general for device access, general for device control, and general for device control.
- the first part of bits in the ControlByte field is also used to indicate the description of the Tag.
- the description of the Tag is used to determine at least one of the following
- the tag type described by the Tag field is iid tag or index tag or DeviceID tag or transaction ID tag or siid tag.
- the first part of the bits in the ControlByte field are the upper 3 bits in the ControlByte field.
- the second part of bits in the ControlByte field is used to indicate the data type of the Value described in the Value field.
- the second part of bits in the ControlByte field is further used to indicate at least one of the following: the length of the Length field and the length of the Value field.
- the second part of bits in the ControlByte field is also used to indicate: the terminator of the container data type.
- the second part of bits in the ControlByte field is the lower 5 bits in the ControlByte field.
- the length of the Tag field is N2 bytes, and N2 is a positive integer.
- the value of N2 is greater than or equal to 0 and less than or equal to 8.
- the Tag field occupies the first byte, and if the value of the highest bit in the first byte is the first value, it means that the Tag field only occupies the first byte. , and the value of the Tag field is determined by the lower 7 bits in the first byte; wherein, the highest bit in the first byte is the Tag length identification bit.
- the Tag field occupies at least the first byte, and if the value of the highest bit in the first byte is the second value, it means that the Tag field also occupies the first word.
- the second byte and the third byte after the section, and the value of the Tag field is determined by all bits in the second byte and all bits in the third byte; wherein, all The highest bit in the first byte is the Tag length identification bit.
- the Tag field occupies at least the first byte, and if the value of the highest bit in the first byte is the second value, it means that the Tag field also occupies the first word.
- the second byte after the section, and the value of the Tag field is determined by the lower 7 bits in the first byte and all the bits in the second byte; wherein, the first byte The highest bit is the Tag length identification bit.
- the Tag field occupies at least the first byte, and if the value of the highest bit in the first byte is the second value, it means that the Tag field also occupies the first word.
- the second byte after the section if the value of the highest bit of the second byte is the second value, it means that the Tag field also occupies the third byte after the second byte, and so on , until the value of the highest bit in the Mth byte occupied by the Tag field is the first value, the Mth byte is taken as the last byte occupied by the Tag field, and M is a positive integer;
- the value of the field is determined by the lower 7 bits of each of the first byte to the Mth byte.
- the length of the Tag field is determined based on the first part in the ControlByte field, and the first part in the ControlByte field is used to indicate the description of the Tag, and the description of the Tag is used to determine at least one of the following: One: The length of the Tag field, the tag type described by the Tag field is iid tag or index tag or DeviceID tag or transaction ID tag or siid tag.
- the length of the Length field is N3 bytes, and N3 is a positive integer.
- the value of N3 is greater than or equal to 0 and less than or equal to 8.
- the length of the Length field is determined based on the second part in the ControlByte field, and the second part in the ControlByte field is used to indicate the length of the Length field.
- the length of the Value field is N4 bytes, and the value of N4 is a positive integer.
- the length of the Value field is determined based on the second part in the ControlByte field
- the second part of the ControlByte field is used to indicate the length of the Value field of the basic data type; or, the second part of the ControlByte field is used to indicate the terminator of the container data type.
- the Tag field is used to describe the tag of the data
- the Length field is used to describe the length of the Value field
- the Value field is used to describe the Value of the data.
- FIG. 5 is a second schematic structural diagram of a data transmission apparatus provided by an embodiment of the present application, which is applied to a second device. As shown in FIG. 5 , the data transmission apparatus includes:
- a receiving unit 501 configured to receive a first signaling sent by a first device, where the data carried in the first signaling is encoded in a first TLV format;
- the first TLV format is used to determine a first TLV structure, where the first TLV structure includes a control byte ControlByte field, a tag Tag field, and at least one of the following: a Length field and a Value field.
- the length of the ControlByte field is N1 bytes, and the value of N1 is a positive integer.
- the value of N1 is 1.
- the first part of the bit in the ControlByte field is used to indicate that the purpose of the data is one of the following: general for device access, general for device control, and general for device control.
- the first part of bits in the ControlByte field is also used to indicate the description of the Tag.
- the description of the Tag is used to determine at least one of the following:
- the tag type described by the Tag field is iid tag or index tag or DeviceID tag or transaction ID tag or siid tag.
- the first part of the bits in the ControlByte field are the upper 3 bits in the ControlByte field.
- the second part of bits in the ControlByte field is used to indicate the data type of the Value described in the Value field.
- the second part of bits in the ControlByte field is further used to indicate at least one of the following: the length of the Length field and the length of the Value field.
- the second part of bits in the ControlByte field is also used to indicate: the terminator of the container data type.
- the second part of bits in the ControlByte field is the lower 5 bits in the ControlByte field.
- the length of the Tag field is N2 bytes, and N2 is a positive integer.
- the value of N2 is greater than or equal to 0 and less than or equal to 8.
- the Tag field occupies the first byte, and if the value of the highest bit in the first byte is the first value, it means that the Tag field only occupies the first byte. , and the value of the Tag field is determined by the lower 7 bits in the first byte; wherein, the highest bit in the first byte is the Tag length identification bit.
- the Tag field occupies at least the first byte, and if the value of the highest bit in the first byte is the second value, it means that the Tag field also occupies the first word.
- the second byte and the third byte after the section, and the value of the Tag field is determined by all bits in the second byte and all bits in the third byte; wherein, all The highest bit in the first byte is the Tag length identification bit.
- the Tag field occupies at least the first byte, and if the value of the highest bit in the first byte is the second value, it means that the Tag field also occupies the first word.
- the second byte after the section, and the value of the Tag field is determined by the lower 7 bits in the first byte and all the bits in the second byte; wherein, the first byte The highest bit is the Tag length identification bit.
- the Tag field occupies at least the first byte, and if the value of the highest bit in the first byte is the second value, it means that the Tag field also occupies the first word.
- the second byte after the section if the value of the highest bit of the second byte is the second value, it means that the Tag field also occupies the third byte after the second byte, and so on , until the value of the highest bit in the Mth byte occupied by the Tag field is the first value, the Mth byte is taken as the last byte occupied by the Tag field, and M is a positive integer;
- the value of the field is determined by the lower 7 bits of each of the first byte to the Mth byte.
- the length of the Tag field is determined based on the first part in the ControlByte field, and the first part in the ControlByte field is used to indicate the description of the Tag, and the description of the Tag is used to determine at least one of the following: One: The length of the Tag field, the tag type described by the Tag field is iid tag or index tag or DeviceID tag or transaction ID tag or siid tag.
- the length of the Length field is N3 bytes, and N3 is a positive integer.
- the value of N3 is greater than or equal to 0 and less than or equal to 8.
- the length of the Length field is determined based on the second part in the ControlByte field, and the second part in the ControlByte field is used to indicate the length of the Length field.
- the length of the Value field is N4 bytes, and the value of N4 is a positive integer.
- the length of the Value field is determined based on the second part in the ControlByte field
- the second part of the ControlByte field is used to indicate the length of the Value field of the basic data type; or, the second part of the ControlByte field is used to indicate the terminator of the container data type.
- the Tag field is used to describe the tag of the data
- the Length field is used to describe the length of the Value field
- the Value field is used to describe the Value of the data.
- FIG. 6 is a schematic structural diagram of a communication device 600 provided by an embodiment of the present application.
- the communication device may be a first device or a second device, wherein the first device may be a client or a server, and the second device may be a server or a client.
- the communication device 600 shown in FIG. 6 includes processing The processor 610, the processor 610 may call and run a computer program from the memory to implement the method in the embodiments of the present application.
- the communication device 600 may further include a memory 620 .
- the processor 610 may call and run a computer program from the memory 620 to implement the methods in the embodiments of the present application.
- the memory 620 may be a separate device independent of the processor 610 , or may be integrated in the processor 610 .
- the communication device 600 may further include a transceiver 630, and the processor 610 may control the transceiver 630 to communicate with other devices, specifically, may send information or data to other devices, or receive other devices Information or data sent by a device.
- the transceiver 630 may include a transmitter and a receiver.
- the transceiver 630 may further include antennas, and the number of the antennas may be one or more.
- the communication device 600 may specifically be the network device in this embodiment of the present application, and the communication device 600 may implement the corresponding processes implemented by the network device in each method in the embodiment of the present application. For the sake of brevity, details are not repeated here. .
- the communication device 600 may specifically be the mobile terminal/terminal device of the embodiments of the present application, and the communication device 600 may implement the corresponding processes implemented by the mobile terminal/terminal device in each method of the embodiments of the present application, for the sake of brevity. , and will not be repeated here.
- FIG. 7 is a schematic structural diagram of a chip according to an embodiment of the present application.
- the chip 700 shown in FIG. 7 includes a processor 710, and the processor 710 can call and run a computer program from a memory, so as to implement the method in this embodiment of the present application.
- the chip 700 may further include a memory 720 .
- the processor 710 may call and run a computer program from the memory 720 to implement the methods in the embodiments of the present application.
- the memory 720 may be a separate device independent of the processor 710 , or may be integrated in the processor 710 .
- the chip 700 may further include an input interface 730 .
- the processor 710 may control the input interface 730 to communicate with other devices or chips, and specifically, may acquire information or data sent by other devices or chips.
- the chip 700 may further include an output interface 740 .
- the processor 710 can control the output interface 740 to communicate with other devices or chips, and specifically, can output information or data to other devices or chips.
- the chip can be applied to the network device in the embodiment of the present application, and the chip can implement the corresponding processes implemented by the network device in each method of the embodiment of the present application, which is not repeated here for brevity.
- the chip can be applied to the mobile terminal/terminal device in the embodiments of the present application, and the chip can implement the corresponding processes implemented by the mobile terminal/terminal device in each method of the embodiments of the present application.
- the chip can implement the corresponding processes implemented by the mobile terminal/terminal device in each method of the embodiments of the present application.
- the chip can implement the corresponding processes implemented by the mobile terminal/terminal device in each method of the embodiments of the present application.
- the chip mentioned in the embodiments of the present application may also be referred to as a system-on-chip, a system-on-chip, a system-on-chip, or a system-on-a-chip, or the like.
- the processor in this embodiment of the present application may be an integrated circuit chip, which has a signal processing capability.
- each step of the above method embodiments may be completed by a hardware integrated logic circuit in a processor or an instruction in the form of software.
- the above-mentioned processor can be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), an off-the-shelf programmable gate array (Field Programmable Gate Array, FPGA) or other available Programming logic devices, discrete gate or transistor logic devices, discrete hardware components.
- DSP Digital Signal Processor
- ASIC Application Specific Integrated Circuit
- FPGA Field Programmable Gate Array
- a general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
- the steps of the method disclosed in conjunction with the embodiments of the present application may be directly embodied as executed by a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor.
- the software modules may be located in random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, registers and other storage media mature in the art.
- the storage medium is located in the memory, and the processor reads the information in the memory, and completes the steps of the above method in combination with its hardware.
- the memory in this embodiment of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memory.
- the non-volatile memory may be a read-only memory (Read-Only Memory, ROM), a programmable read-only memory (Programmable ROM, PROM), an erasable programmable read-only memory (Erasable PROM, EPROM), an electrically programmable read-only memory (Erasable PROM, EPROM). Erase programmable read-only memory (Electrically EPROM, EEPROM) or flash memory.
- Volatile memory may be Random Access Memory (RAM), which acts as an external cache.
- RAM Static RAM
- DRAM Dynamic RAM
- SDRAM Synchronous DRAM
- SDRAM double data rate synchronous dynamic random access memory
- Double Data Rate SDRAM DDR SDRAM
- enhanced SDRAM ESDRAM
- synchronous link dynamic random access memory Synchlink DRAM, SLDRAM
- Direct Rambus RAM Direct Rambus RAM
- the memory in the embodiment of the present application may also be a static random access memory (static RAM, SRAM), a dynamic random access memory (dynamic RAM, DRAM), Synchronous dynamic random access memory (synchronous DRAM, SDRAM), double data rate synchronous dynamic random access memory (double data rate SDRAM, DDR SDRAM), enhanced synchronous dynamic random access memory (enhanced SDRAM, ESDRAM), synchronous connection Dynamic random access memory (synch link DRAM, SLDRAM) and direct memory bus random access memory (Direct Rambus RAM, DR RAM) and so on. That is, the memory in the embodiments of the present application is intended to include but not limited to these and any other suitable types of memory.
- Embodiments of the present application further provide a computer-readable storage medium for storing a computer program.
- the computer-readable storage medium can be applied to the network device in the embodiments of the present application, and the computer program enables the computer to execute the corresponding processes implemented by the network device in each method of the embodiments of the present application.
- the computer program enables the computer to execute the corresponding processes implemented by the network device in each method of the embodiments of the present application.
- the computer-readable storage medium can be applied to the mobile terminal/terminal device in the embodiments of the present application, and the computer program enables the computer to execute the corresponding processes implemented by the mobile terminal/terminal device in each method of the embodiments of the present application. , and are not repeated here for brevity.
- Embodiments of the present application also provide a computer program product, including computer program instructions.
- the computer program product can be applied to the network device in the embodiments of the present application, and the computer program instructions cause the computer to execute the corresponding processes implemented by the network device in each method of the embodiments of the present application. Repeat.
- the computer program product can be applied to the mobile terminal/terminal device in the embodiments of the present application, and the computer program instructions cause the computer to execute the corresponding processes implemented by the mobile terminal/terminal device in each method of the embodiments of the present application, For brevity, details are not repeated here.
- the embodiments of the present application also provide a computer program.
- the computer program can be applied to the network device in the embodiments of the present application, and when the computer program runs on the computer, the computer executes the corresponding processes implemented by the network device in the various methods of the embodiments of the present application, for the sake of brevity. , and will not be repeated here.
- the computer program may be applied to the mobile terminal/terminal device in the embodiments of the present application, and when the computer program is run on the computer, the mobile terminal/terminal device implements the various methods of the computer program in the embodiments of the present application.
- the corresponding process for the sake of brevity, will not be repeated here.
- the disclosed system, apparatus and method may be implemented in other manners.
- the apparatus embodiments described above are only illustrative.
- the division of the units is only a logical function division. In actual implementation, there may be other division methods.
- multiple units or components may be combined or Can be integrated into another system, or some features can be ignored, or not implemented.
- the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
- the units described as separate components may or may not be physically separated, and components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
- each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
- the functions, if implemented in the form of software functional units and sold or used as independent products, may be stored in a computer-readable storage medium.
- the technical solution of the present application can be embodied in the form of a software product in essence, or the part that contributes to the prior art or the part of the technical solution, and the computer software product is stored in a storage medium, including Several instructions are used to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application.
- the aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory,) ROM, random access memory (Random Access Memory, RAM), magnetic disk or optical disk and other media that can store program codes .
Landscapes
- Communication Control (AREA)
Abstract
本申请实施例提供一种数据传输方法及装置、通信设备,该方法包括:第一设备向第二设备发送第一信令,所述第一信令中承载的数据采用第一TLV格式进行编码;其中,所述第一TLV格式用于确定第一TLV结构,所述第一TLV结构包括控制字节ControlByte字段、标签Tag字段、以及以下至少之一:长度Length字段、取值Value字段。
Description
本申请实施例涉及移动通信技术领域,具体涉及一种数据传输方法及装置、通信设备。
客户端与服务端之间传输的数据采用TLV格式进行编码和解码。目前的TLV格式指出TLV结构包括标签(Tag)字段、长度(Length)字段和取值(Value)字段。一个基本的数据元就包括以上三个字段,其中,Tag字段用于描述数据的标签,Length字段用于描述Value字段的长度,Value字段用于描述数据的Value(即Tag字段描述的标签的属性值)。采用上述TLV格式进行编码和解码时,由于缺少一些控制信息,导致编码和解码的效率较低。
发明内容
本申请实施例提供一种数据传输方法及装置、通信设备。
本申请实施例提供的数据传输方法,包括:
第一设备向第二设备发送第一信令,所述第一信令中承载的数据采用第一TLV格式进行编码;其中,
所述第一TLV格式用于确定第一TLV结构,所述第一TLV结构包括控制字节(ControlByte)字段、Tag字段、以及以下至少之一:Length字段、Value字段。
本申请实施例提供的数据传输方法,包括:
第二设备接收第一设备发送的第一信令,所述第一信令中承载的数据采用第一TLV格式进行编码;其中,
所述第一TLV格式用于确定第一TLV结构,所述第一TLV结构包括ControlByte字段、Tag字段、以及以下至少之一:Length字段、Value字段。
本申请实施例提供的数据传输装置,应用于第一设备,所述装置包括:
发送单元,用于向第二设备发送第一信令,所述第一信令中承载的数据采用第一TLV格式进行编码;其中,
所述第一TLV格式用于确定第一TLV结构,所述第一TLV结构包括ControlByte字段、Tag字段、以及以下至少之一:Length字段、Value字段。
本申请实施例提供的数据传输装置,应用于第二设备,所述装置包括:
接收单元,用于接收第一设备发送的第一信令,所述第一信令中承载的数据采用第一TLV格式进行编码;其中,
所述第一TLV格式用于确定第一TLV结构,所述第一TLV结构包括ControlByte字段、Tag字段、以及以下至少之一:Length字段、Value字段。
本申请实施例提供的通信设备,包括处理器和存储器。该存储器用于存储计算机程序,该处理器用于调用并运行该存储器中存储的计算机程序,执行上述的数据传输方法。
本申请实施例提供的芯片,用于实现上述的数据传输方法。
具体地,该芯片包括:处理器,用于从存储器中调用并运行计算机程序,使得安装有该芯片的设备执行上述的数据传输方法。
本申请实施例提供的计算机可读存储介质,用于存储计算机程序,该计算机程序使得计算机执行上述的数据传输方法。
本申请实施例提供的计算机程序产品,包括计算机程序指令,该计算机程序指令使得计算机执行上述的数据传输方法。
本申请实施例提供的计算机程序,当其在计算机上运行时,使得计算机执行上述的数据传输 方法。
通过上述技术方案,提出了一种新型的TLV格式(即第一TLV格式),通过该新型的TLV格式确定出的TLV结构(即第一TLV结构)包括控制字节(ControlByte)字段、Tag字段、以及以下至少之一:Length字段、Value字段。由于第一TLV结构具有ControlByte字段,因而可以通过该ControlByte字段描述一些其他字段相关的控制信息,提高了编码和解码的效率,实现了一种符合应用的TLV结构。
此处所说明的附图用来提供对本申请的进一步理解,构成本申请的一部分,本申请的示意性实施例及其说明用于解释本申请,并不构成对本申请的不当限定。在附图中:
图1是本申请实施例提供的一种可选的通信架构图;
图2是本申请实施例提供的数据传输方法的流程示意图;
图3是本申请实施例提供的客户端与服务端交互的示意图;
图4是本申请实施例提供的数据传输装置的结构组成示意图一;
图5是本申请实施例提供的数据传输装置的结构组成示意图二;
图6是本申请实施例提供的一种通信设备示意性结构图;
图7是本申请实施例的芯片的示意性结构图。
下文中将参考附图并结合实施例来详细说明本申请。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
需要说明的是,本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。
为便于理解本申请实施例的技术方案,以下对本申请实施例涉及到的相关技术进行说明。
开放互联基金会(Open Connectivity Foundation,OCF)定义了客户端和服务端,服务端是指提供资源的设备,客户端是指访问资源的设备。
OCF采用表述状态转移(Representational State Transfer,RESTful)架构,通过资源来表述物联网实体设备,以及设备提供的功能服务和设备的状态等信息,提供资源的设备是服务端,访问资源的设备是客户端。OCF中定义的客户端和服务端是逻辑功能实体,一个设备可以是客户端、或服务端、或既是客户端又是服务端。
客户端和服务端的业务交互是通过对资源进行RESTful操作来实现的,RESTful操作可以是创建-读取-更新-删除-通知(Create-Retrieve-Update-Delete-Notify,CRUDN)操作,显然,CRUDN操作可以是以下任意一种或多种操作:创建(Create)、读取(Retrieve)、更新(Update)、删除(Delete)、通知(Notify)。客户端是RESTful操作的发起方,服务端是RESTful操作的响应方,客户端向服务端发送资源操作请求,请求对服务端上的资源进行操作,服务端执行资源操作,并向客户端返回响应,响应中携带资源的内容及描述信息。
图1是本申请实施例提供的一种可选的通信架构图,对资源的描述为资源模型层,每个资源对应一个特定的统一资源标识符(Uniform Resource Identifier,URI),可通过访问资源的URI来访问这个资源,另外每个资源具有支持Restful操作的相应接口。传输资源内容及描述信息的是传输协议层,通过把资源操作映射到具体的传输协议中,使每个资源的Restful操作转变为实体消息在设备间传递,为设备间的互联互通提供手段。
OCF的传输协议采用受限应用协议(Constrained Application Protocol,CoAP)承载资源操作,每个CRUDN操作都映射为CoAP的请求消息或响应消息,客户端可以通过CoAP中的GET、POST、DELETE这三种方法对服务端的资源进行操作,从而实现资源状态的转换。
客户端与服务端之间传输的数据采用TLV格式进行编码和解码。TLV属于基本编码规则(Basic Encoding Rule,BER)编码的一种,遵从ASN1标准。TLV的全称为:Tag(标签)-Length(长度)-Value(值)。在IS-IS数据通信领域中,一个基本的数据元包括tlv三元数组,即Tag-Length-Value,也可以理解为,一个基本的数据元包括三个字段,即Tag字段、Length字段和Value字段。其中,Tag字段用于描述数据的标签,Length字段用于描述Value字段的长度,Value字段用于描述数据的Value(即Tag字段描述的标签的属性值)。
本申请实施例的技术方案提出一种与特定传输协议相匹配的TLV格式,称之为第一TLV格式,需要说明的是,第一TLV格式的描述也可以被替换成其他方式,例如TLV格式,或者CTLV格式等。客户端和服务端可以在相互交互的信令中使用该第一TLV格式对负载的内容(即信令中承载的数据)进行编解码。
图2是本申请实施例提供的数据传输方法的流程示意图,如图2所示,所述数据传输方法包括以下步骤:
步骤201:第一设备向第二设备发送第一信令,第二设备接收第一设备发送的第一信令,所述第一信令中承载的数据采用第一TLV格式进行编码;其中,所述第一TLV格式用于确定第一TLV结构,所述第一TLV结构包括ControlByte字段、Tag字段、以及以下至少之一:Length字段、Value字段。
在本申请一可选方式中,参照图3,所述第一设备为客户端,所述第二设备为服务端。所述第一信令为资源操作请求消息,这里,资源操作请求消息例如可以是修改服务(Server)状态请求消息。第一信令中承载的数据采用本申请实施例提供的第一TLV格式进行编码。服务端收到资源操作请求消息后,根据本申请实施例提供的第一TLV格式对第一信令进行解码,从而获得第一信令中承载的数据,根据该数据执行相应的操作,例如属性变更操作。
在本申请另一可选方式中,参照图3,所述第一设备为服务端,所述第二设备为客户端。所述第一信令为应答消息。应答消息中承载的数据采用本申请实施例提供的第一TLV格式进行编码。客户端收到应答消息后,根据本申请实施例提供的第一TLV格式对第一信令进行解码,从而获得第一信令中承载的数据。
本申请实施例中的第一TLV格式用于确定第一TLV结构,所述第一TLV结构包括ControlByte字段、Tag字段、以及以下至少之一:Length字段、Value字段。
在一可选方式中,所述第一TLV结构包括ControlByte字段和Tag字段。
在一可选方式中,所述第一TLV结构包括ControlByte字段、Tag字段和Value字段。
在一可选方式中,所述第一TLV结构包括ControlByte字段、Tag字段、Length字段和Value字段。
本申请实施例中,所述ControlByte字段用于描述其他字段的控制信息,例如Tag字段的控制信息和/或Value字段的控制信息。其中,Tag字段的控制信息包括Tag的说明。Value字段的控制信息包括Value的数据类型,可选地,还包括Length字段的长度和/或Value字段的长度。
本申请实施例中,所述Tag字段用于描述数据的标签。
本申请实施例中,所述Length字段用于描述Value字段的长度。
本申请实施例中,所述Value字段用于描述数据的Value(即标签对应的属性值)。
在一个示例中,Tag字段的内容为0X12,代表标签为温度(temperature)。Value字段的内容为15,代表温度的取值为15度(15degree)。
以下对上述方案中的各个字段进行详细描述。
(一)ControlByte字段
本申请实施例中,所述ControlByte字段的长度为N1个字节,所述N1的取值为正整数。在一可选方式中,所述N1的取值为1,即所述ControlByte字段的长度为1个字节。
本申请实施例中,所述ControlByte字段包括两个部分,即第一部分和第二部分,其中,第一部分也可以称为tagControl部分,第二部分也可以称为elementType部分。其中,第一部分用于确定Tag字段的相关控制信息,第二部分用于确定Value字段的相关控制信息。
在一可选方式中,所述ControlByte字段中的第一部分比特为所述ControlByte字段中的高3位比特。例如:Bit7-bit5为第一部分比特。所述ControlByte字段中的第二部分比特为所述ControlByte字段中的低5位比特。例如Bit4-bit0为第二部分比特。
本申请实施例中,所述ControlByte字段中的第一部分比特用于指示所述数据的用途为以下之一:设备接入通用、设备控制用、设备控制通用。进一步,所述ControlByte字段中的第一部分比特还用于指示Tag的说明。这里,所述Tag的说明用于确定以下至少之一:Tag字段的长度、 Tag字段所描述的标签类型为属性标识标签(iid tag)或者索引标签(index tag)或者设备标识标签(DeviceID tag)或者事务标识标签(ID tag)或者服务标识标签(siid tag)。
需要说明的是,Tag字段所描述的标签类型例如是:Tag字段描述的标签类型为属性标识标签(iid tag)或者索引标签(index tag)。
本申请实施例中,所述ControlByte字段中的第二部分比特用于指示Value字段所描述的Value的数据类型。进一步,所述ControlByte字段中的第二部分比特还用于指示以下至少之一:Length字段的长度、Value字段的长度。或者,所述ControlByte字段中的第二部分比特还用于指示:容器数据类型的结束符。
在一个示例中,以下表1-1和表1-2给出了ControlByte字段中的第一部分比特(即Bit7-bit5)的不同取值情况下所指示的内容,以及第二部分比特(即Bit4-bit0)的不同取值情况下所指示的内容。
表1-1
表1-2
以下结合上述表1-1和表1-2对ControlByte字段中的第一部分比特(即Bit7-bit5)和第二部分比特(即Bit4-bit0)如何进行信息指示进行举例说明。
在一个示例中,ControlByte字段中的第二部分比特(即Bit4-bit0)的取值为00000的情况下,该第二部分比特用于指示Value的数据类型为8位无符号整型(uint8),且无Length字段(也可以理解为Length字段的长度为0个字节),Value字段的长度为1个字节。
在一个示例中,ControlByte字段中的第二部分比特(即Bit4-bit0)的取值为00100的情况下,该第二部分比特用于指示Value的数据类型为8位有符号整型(int8),且无Length字段(也可以理解为Length字段的长度为0个字节),Value字段的长度为1个字节。
在一个示例中,ControlByte字段中的第二部分比特(即Bit4-bit0)的取值为01000的情况下,该第二部分比特用于指示Value的数据类型为布尔(boolean)类型,且该数据的取值为假(false),且无Length字段(也可以理解为Length字段的长度为0个字节)以及无Value字段(也可以理解为Value字段的长度为0个字节)。
在一个示例中,ControlByte字段中的第二部分比特(即Bit4-bit0)的取值为01010的情况下,该第二部分比特用于指示Value的数据类型为浮点(float)型,且无Length字段(也可以理解为Length字段的长度为0个字节),Value字段的长度为4个字节。
在一个示例中,ControlByte字段中的第二部分比特(即Bit4-bit0)的取值为10000的情况下,该第二部分比特用于指示Value的数据类型为字节(bytes)型,且Length字段的长度为1个字节,Value字段为可变长度。
在一个示例中,ControlByte字段中的第二部分比特(即Bit4-bit0)的取值为10100的情况下,该第二部分比特用于指示Value的数据类型为字符串(string)类型,且Length字段的长度为1个字节,Value字段为可变长度。
在一个示例中,ControlByte字段中的第二部分比特(即Bit4-bit0)的取值为11001的情况下,该第二部分比特用于指示Value的数据类型为结构体(struct)类型,且Length字段和Value字段为可变长度。
在一个示例中,ControlByte字段中的第二部分比特(即Bit4-bit0)的取值为11010的情况下,该第二部分比特用于指示Value的数据类型为数组(array)类型,且Length字段和Value字段为可变长度。
在一个示例中,ControlByte字段中的第二部分比特(即Bit4-bit0)的取值为11011的情况下,该第二部分比特用于指示struct的结束符,且Bit5-bit7的取值为000。
在一个示例中,ControlByte字段中的第二部分比特(即Bit4-bit0)的取值为11100的情况下,该第二部分比特用于指示array的结束符,且Bit5-bit7的取值为000。
需要说明的是,上述无符号整型、有符号整型、布尔类型、浮点型、字节型属于基本数据类型。字符串类型属于引用类型。结构体类型和数组类型属于容器数据类型。
在一个示例中,ControlByte字段中的第一部分比特(即Bit7-bit5)的取值为001的情况下,该第二部分比特用于指示数据的用途为设备接入通用。
在一个示例中,ControlByte字段中的第一部分比特(即Bit7-bit5)的取值为010的情况下,该第二部分比特用于指示数据的用途为设备控制用,且Tag字段所描述的标签类型为iid tag,Tag字段的长度为1个字节。对于这种情况,tag值(即Tag字段的取值)为iid值,value值(即Value字段的取值)为idd对应的属性值。这里,iid为服务内属性、或者事件、或者方法的唯一标识。
在一个示例中,ControlByte字段中的第一部分比特(即Bit7-bit5)的取值为100的情况下,该第二部分比特用于指示数据的用途为设备控制用,且Tag字段所描述的标签类型为index tag,Tag字段的长度为1个字节。对于这种情况,index使用于struct数据类型或者array数据类型中子元素的标记,tag值(即Tag字段的取值)为index值,value值(即Value字段的取值)为index标记的子元素的值。
在一个示例中,ControlByte字段中的第一部分比特(即Bit7-bit5)的取值为110的情况下,该第二部分比特用于指示数据的用途为设备控制通用。
在一个示例中,对于设备控制通用来说,参照表1-2,又细分了四种情况,每种情况的用途均可以称为设备控制用。对于第一种情况来说,tag值(即Tag字段的取值)为0x1,代表DeviceID标签,value值(即Value字段的取值)为deviceID值,这里,deviceID为标识一个设备的ID。对于第二种情况来说,tag值(即Tag字段的取值)为0x2,代表事务ID标签,value值(即Value字段的取值)为事务ID值,这里,事务ID为一组相关联的信令流的标识。对于第三种情况来说,tag值(即Tag字段的取值)为0x3,代表siid标签,value值(即Value字段的取值)为1个字节长度的siid值,这里,siid为一个服务实例的标识。对于第四种情况来说,tag值(即Tag字段的取值)为0x4,代表siid标签,value值(即Value字段的取值)为2个字节长度的siid值,这里,siid为一个服务实例的标识。
(二)Tag字段
本申请实施例中,所述Tag字段的长度为N2个字节,N2为正整数。在一可选方式中,所述N2的取值大于等于0且小于等于8,即所述Tag字段的长度为0-8个字节。
在一个示例中,Tag字段占据的字节的结构如下表2-1所示,其中,该字节的最高位(即bit7)为Tag长度标识位,该字节的低7位(即bit6-bit0)用于标识Tag值。
表2-1
在另一个示例中,Tag字段占据的字节的结构如下表2-2所示,其中,该字节的全部比特位(即bit7-bit0)用于标识Tag值。
表2-2
Tag字段可以占据一个或者多个字节。本申请实施例中,Tag字段的长度和取值,可以通过以下方案来确定。
方案一)所述Tag字段占据第一字节,若所述第一字节中的最高位的取值为第一值,则表示所述Tag字段仅占据所述第一字节,且所述Tag字段的取值通过所述第一字节中的低7位确定;其中,所述第一字节中的最高位为Tag长度标识位。
在一可选方式中,所述第一值为0。具体地,当一个字节中的Tag长度标识位的取值为0,则使用Bit6-bit0来标识tag值(即确定Tag字段的取值)。
方案二)所述Tag字段至少占据第一字节,若所述第一字节中的最高位的取值为第二值,则表示所述Tag字段还占据所述第一字节之后的第二字节和第三字节,且所述Tag字段的取值通过所述第二字节中的全部比特位和所述第三字节中的全部比特位确定;其中,所述第一字节中的最高位为Tag长度标识位。
在一可选方式中,所述第二值为1。具体地,当一个字节(即第一字节)中的Tag长度标识位的取值为1,则表示紧跟该字节后的两个字节也属于Tag字段,且使用后面两个字节的全部比特位来标识tag值(即确定Tag字段的取值)。需要说明的是,第一字节中的bit6-bit0不使用。
方案三)所述Tag字段至少占据第一字节,若所述第一字节中的最高位的取值为第二值,则表示所述Tag字段还占据所述第一字节之后的第二字节,且所述Tag字段的取值通过所述第一字节中的低7位和所述第二字节中的全部比特位确定;其中,所述第一字节中的最高位为Tag长度标识位。
在一可选方式中,所述第二值为1。具体地,当一个字节(即第一字节)的Tag长度标识位的 取值为1,则表示使用紧跟该字节后的一个字节也属于Tag字段,且使用第一字节的bit6-bit0和后一个字节的bit7-bit0来标识tag值(即确定Tag字段的取值)。
方案四)所述Tag字段至少占据第一字节,若所述第一字节中的最高位的取值为第二值,则表示所述Tag字段还占据所述第一字节之后的第二字节,若所述第二字节的最高位的取值为第二值,则表示所述Tag字段还占据所述第二字节之后的第三字节,以此类推,直到所述Tag字段占据的第M字节中的最高位的取值为第一值,将该第M字节作为所述Tag字段占据的最后一个字节,M为正整数;所述Tag字段的取值通过所述第一字节至所述第M字节中的每个字节中的低7位确定。
在一可选方式中,所述第二值为1,所述第一值为0。具体地,当一个字节(即第一字节)的Tag长度标识位为1,则表示紧跟该字节后的一个字节(即第二字节)也属于Tag字段;如果第二字节的Tag长度标识位也为1,则表示紧跟该字节后的一个字节(即第三字节)也属于Tag字段,以此类推,直到第M字节的Tag长度标识位为0,则该第M字节为Tag字段占据的最后一个字节。使用每一个字节的bit6-bit0来标识tag值(即确定Tag字段的取值)。
以Tag字段占两个字节为例,以下表3给出了Tag字段占据第一字节和第二字节。其中,第一字节的Tag长度标识位为1,代表第一字节后紧跟一个字节(即第二字节)也属于Tag字段,第二字节的Tag长度标识位为0,代表第二字节为Tag字段占据的最后一个字节。使用第一字节的bit6-bit0和第二字节的bit6-bit0来标识tag值(即确定Tag字段的取值)为:00000010000001(二进制)=129(十进制)。其中,二进制数据中的前半部分0000001对应于第一字节的bit6-bit0,后半部分0000001对应于第二字节的bit6-bit0,两部分组合一起后标识一个tag值为“129”。需要说明的是,如果有三个字节或者更多数目的字节可以以此类推。
表3
方案五)所述Tag字段的长度基于所述ControlByte字段中的第一部分确定,所述ControlByte字段中的第一部分用于指示Tag的说明,所述Tag的说明用于确定以下至少之一:Tag字段的长度、Tag字段所描述的标签类型为iid tag或者index tag或者DeviceID tag或者事务ID tag或者siid tag。
对于方案五)来说,可以直接根据ControlByte字段中的第一部分(即tagControl部分)来确定Tag字段的长度。具体可以参照以上表1-1所示的内容来确定ControlByte字段中的第一部分的取值所对应的指示内容。
(三)Length字段
本申请实施例中,所述Length字段的长度为N3个字节,N3为正整数。在一可选方式中,所述N3的取值大于等于0且小于等于8,即所述Length字段的长度为0-8个字节。
本申请实施例中,对于某些数据类型(例如基本数据类型)来说,Length字段的长度基于所述ControlByte字段中的第二部分确定,所述ControlByte字段中的第二部分用于指示Length字段的长度。
需要说明的是,容器数据类型(如struct类型、array类型)的Length字段是可变长度,因此可以使用变长的方式来确定其长度。在一可选方式中,可以使用struct或者array的结束符来标识一个struct或者struct的结束位置,从而根据该结束位置确定Length字段的长度。
需要说明的是,基本数据类型例如是表2-1所示的无符号整型(uint),有符号整型(nit),浮点型(float)等。容器数据类型例如是表2-1所示的结构体(struct)类型,数组(array)类型等。
(四)Value字段
本申请实施例中,所述Value字段的长度为N4个字节,N4的取值为正整数。
本申请实施例中,所述Value字段的长度基于所述ControlByte字段中的第二部分确定,所述ControlByte字段中的第二部分用于指示基本数据类型的Value字段的长度;或者,所述ControlByte字段中的第二部分用于指示容器数据类型的结束符。
本申请实施例的上述技术方案,提供了一种新型的TLV结构(即第一TLV结构),在一个示例中,以下表4给出了第一TLV结构的总体结构,其中,ControlByte字段的长度为1个字节(byte),Tag字段的长度为0至8个字节,Length字段的长度为0至8个字节,Value字段根据内容为可变长度。
| ControlByte | Tag | Length | Value |
| 1byte | 0-8bytes | 0-8bytes | 变长 |
表4
客户端和服务端可以在相互交互的信令中使用上述方案中的第一TLV格式对负载的内容(即信令中承载的数据)进行编解码,从而提高编解码效率。
图4是本申请实施例提供的数据传输装置的结构组成示意图一,应用于第一设备,如图4所示,所述数据传输装置包括:
发送单元401,用于向第二设备发送第一信令,所述第一信令中承载的数据采用第一TLV格式进行编码;其中,
所述第一TLV格式用于确定第一TLV结构,所述第一TLV结构包括控制字节ControlByte字段、标签Tag字段、以及以下至少之一:长度Length字段、取值Value字段。
在一可选方式中,所述ControlByte字段的长度为N1个字节,所述N1的取值为正整数。
在一可选方式中,所述N1的取值为1。
在一可选方式中,所述ControlByte字段中的第一部分比特用于指示所述数据的用途为以下之一:设备接入通用、设备控制用、设备控制通用。
在一可选方式中,所述ControlByte字段中的第一部分比特还用于指示Tag的说明。
在一可选方式中,所述Tag的说明用于确定以下至少之一
Tag字段的长度;
Tag字段所描述的标签类型为iid tag或者index tag或者DeviceID tag或者事务ID tag或者siid tag。
在一可选方式中,所述ControlByte字段中的第一部分比特为所述ControlByte字段中的高3位比特。
在一可选方式中,所述ControlByte字段中的第二部分比特用于指示Value字段所描述的Value的数据类型。
在一可选方式中,所述ControlByte字段中的第二部分比特还用于指示以下至少之一:Length字段的长度、Value字段的长度。
在一可选方式中,所述ControlByte字段中的第二部分比特还用于指示:容器数据类型的结束符。
在一可选方式中,所述ControlByte字段中的第二部分比特为所述ControlByte字段中的低5位比特。
在一可选方式中,所述Tag字段的长度为N2个字节,N2为正整数。
在一可选方式中,所述N2的取值大于等于0且小于等于8。
在一可选方式中,所述Tag字段占据第一字节,若所述第一字节中的最高位的取值为第一值,则表示所述Tag字段仅占据所述第一字节,且所述Tag字段的取值通过所述第一字节中的低7位确定;其中,所述第一字节中的最高位为Tag长度标识位。
在一可选方式中,所述Tag字段至少占据第一字节,若所述第一字节中的最高位的取值为第二值,则表示所述Tag字段还占据所述第一字节之后的第二字节和第三字节,且所述Tag字段的取值通过所述第二字节中的全部比特位和所述第三字节中的全部比特位确定;其中,所述第一字节中的最高位为Tag长度标识位。
在一可选方式中,所述Tag字段至少占据第一字节,若所述第一字节中的最高位的取值为第二值,则表示所述Tag字段还占据所述第一字节之后的第二字节,且所述Tag字段的取值通过所述第一字节中的低7位和所述第二字节中的全部比特位确定;其中,所述第一字节中的最高位为Tag长度标识位。
在一可选方式中,所述Tag字段至少占据第一字节,若所述第一字节中的最高位的取值为第二值,则表示所述Tag字段还占据所述第一字节之后的第二字节,若所述第二字节的最高位的取值为第二值,则表示所述Tag字段还占据所述第二字节之后的第三字节,以此类推,直到所述Tag字段占据的第M字节中的最高位的取值为第一值,将该第M字节作为所述Tag字段占据的最后一个字节,M为正整数;所述Tag字段的取值通过所述第一字节至所述第M字节中的每个字节中的低7位确定。
在一可选方式中,所述Tag字段的长度基于所述ControlByte字段中的第一部分确定,所述ControlByte字段中的第一部分用于指示Tag的说明,所述Tag的说明用于确定以下至少之一:Tag 字段的长度、Tag字段所描述的标签类型为iid tag或者index tag或者DeviceID tag或者事务ID tag或者siid tag。
在一可选方式中,所述Length字段的长度为N3个字节,N3为正整数。
在一可选方式中,所述N3的取值大于等于0且小于等于8。
在一可选方式中,所述Length字段的长度基于所述ControlByte字段中的第二部分确定,所述ControlByte字段中的第二部分用于指示Length字段的长度。
在一可选方式中,所述Value字段的长度为N4个字节,N4的取值为正整数。
在一可选方式中,所述Value字段的长度基于所述ControlByte字段中的第二部分确定,
所述ControlByte字段中的第二部分用于指示基本数据类型的Value字段的长度;或者,所述ControlByte字段中的第二部分用于指示容器数据类型的结束符。
在一可选方式中,所述Tag字段用于描述数据的标签,所述Length字段用于描述Value字段的长度,所述Value字段用于描述数据的Value。
本领域技术人员应当理解,本申请实施例的上述数据传输装置的相关描述可以参照本申请实施例的数据传输方法的相关描述进行理解。
图5是本申请实施例提供的数据传输装置的结构组成示意图二,应用于第二设备,如图5所示,所述数据传输装置包括:
接收单元501,用于接收第一设备发送的第一信令,所述第一信令中承载的数据采用第一TLV格式进行编码;其中,
所述第一TLV格式用于确定第一TLV结构,所述第一TLV结构包括控制字节ControlByte字段、标签Tag字段、以及以下至少之一:长度Length字段、取值Value字段。
在一可选方式中,所述ControlByte字段的长度为N1个字节,所述N1的取值为正整数。
在一可选方式中,所述N1的取值为1。
在一可选方式中,所述ControlByte字段中的第一部分比特用于指示所述数据的用途为以下之一:设备接入通用、设备控制用、设备控制通用。
在一可选方式中,所述ControlByte字段中的第一部分比特还用于指示Tag的说明。
在一可选方式中,所述Tag的说明用于确定以下至少之一:
Tag字段的长度;
Tag字段所描述的标签类型为iid tag或者index tag或者DeviceID tag或者事务ID tag或者siid tag。
在一可选方式中,所述ControlByte字段中的第一部分比特为所述ControlByte字段中的高3位比特。
在一可选方式中,所述ControlByte字段中的第二部分比特用于指示Value字段所描述的Value的数据类型。
在一可选方式中,所述ControlByte字段中的第二部分比特还用于指示以下至少之一:Length字段的长度、Value字段的长度。
在一可选方式中,所述ControlByte字段中的第二部分比特还用于指示:容器数据类型的结束符。
在一可选方式中,所述ControlByte字段中的第二部分比特为所述ControlByte字段中的低5位比特。
在一可选方式中,所述Tag字段的长度为N2个字节,N2为正整数。
在一可选方式中,所述N2的取值大于等于0且小于等于8。
在一可选方式中,所述Tag字段占据第一字节,若所述第一字节中的最高位的取值为第一值,则表示所述Tag字段仅占据所述第一字节,且所述Tag字段的取值通过所述第一字节中的低7位确定;其中,所述第一字节中的最高位为Tag长度标识位。
在一可选方式中,所述Tag字段至少占据第一字节,若所述第一字节中的最高位的取值为第二值,则表示所述Tag字段还占据所述第一字节之后的第二字节和第三字节,且所述Tag字段的取值通过所述第二字节中的全部比特位和所述第三字节中的全部比特位确定;其中,所述第一字节中的最高位为Tag长度标识位。
在一可选方式中,所述Tag字段至少占据第一字节,若所述第一字节中的最高位的取值为第二值,则表示所述Tag字段还占据所述第一字节之后的第二字节,且所述Tag字段的取值通过所述第一字节中的低7位和所述第二字节中的全部比特位确定;其中,所述第一字节中的最高位为 Tag长度标识位。
在一可选方式中,所述Tag字段至少占据第一字节,若所述第一字节中的最高位的取值为第二值,则表示所述Tag字段还占据所述第一字节之后的第二字节,若所述第二字节的最高位的取值为第二值,则表示所述Tag字段还占据所述第二字节之后的第三字节,以此类推,直到所述Tag字段占据的第M字节中的最高位的取值为第一值,将该第M字节作为所述Tag字段占据的最后一个字节,M为正整数;所述Tag字段的取值通过所述第一字节至所述第M字节中的每个字节中的低7位确定。
在一可选方式中,所述Tag字段的长度基于所述ControlByte字段中的第一部分确定,所述ControlByte字段中的第一部分用于指示Tag的说明,所述Tag的说明用于确定以下至少之一:Tag字段的长度、Tag字段所描述的标签类型为iid tag或者index tag或者DeviceID tag或者事务ID tag或者siid tag。
在一可选方式中,所述Length字段的长度为N3个字节,N3为正整数。
在一可选方式中,所述N3的取值大于等于0且小于等于8。
在一可选方式中,所述Length字段的长度基于所述ControlByte字段中的第二部分确定,所述ControlByte字段中的第二部分用于指示Length字段的长度。
在一可选方式中,所述Value字段的长度为N4个字节,N4的取值为正整数。
在一可选方式中,所述Value字段的长度基于所述ControlByte字段中的第二部分确定,
所述ControlByte字段中的第二部分用于指示基本数据类型的Value字段的长度;或者,所述ControlByte字段中的第二部分用于指示容器数据类型的结束符。
在一可选方式中,所述Tag字段用于描述数据的标签,所述Length字段用于描述Value字段的长度,所述Value字段用于描述数据的Value。
本领域技术人员应当理解,本申请实施例的上述数据传输装置的相关描述可以参照本申请实施例的数据传输方法的相关描述进行理解。
图6是本申请实施例提供的一种通信设备600示意性结构图。该通信设备可以是第一设备,也可以是第二设备,其中,第一设备可以是客户端或者服务端,第二设备可以是服务端或者客户端,图6所示的通信设备600包括处理器610,处理器610可以从存储器中调用并运行计算机程序,以实现本申请实施例中的方法。
可选地,如图6所示,通信设备600还可以包括存储器620。其中,处理器610可以从存储器620中调用并运行计算机程序,以实现本申请实施例中的方法。
其中,存储器620可以是独立于处理器610的一个单独的器件,也可以集成在处理器610中。
可选地,如图6所示,通信设备600还可以包括收发器630,处理器610可以控制该收发器630与其他设备进行通信,具体地,可以向其他设备发送信息或数据,或接收其他设备发送的信息或数据。
其中,收发器630可以包括发射机和接收机。收发器630还可以进一步包括天线,天线的数量可以为一个或多个。
可选地,该通信设备600具体可为本申请实施例的网络设备,并且该通信设备600可以实现本申请实施例的各个方法中由网络设备实现的相应流程,为了简洁,在此不再赘述。
可选地,该通信设备600具体可为本申请实施例的移动终端/终端设备,并且该通信设备600可以实现本申请实施例的各个方法中由移动终端/终端设备实现的相应流程,为了简洁,在此不再赘述。
图7是本申请实施例的芯片的示意性结构图。图7所示的芯片700包括处理器710,处理器710可以从存储器中调用并运行计算机程序,以实现本申请实施例中的方法。
可选地,如图7所示,芯片700还可以包括存储器720。其中,处理器710可以从存储器720中调用并运行计算机程序,以实现本申请实施例中的方法。
其中,存储器720可以是独立于处理器710的一个单独的器件,也可以集成在处理器710中。
可选地,该芯片700还可以包括输入接口730。其中,处理器710可以控制该输入接口730与其他设备或芯片进行通信,具体地,可以获取其他设备或芯片发送的信息或数据。
可选地,该芯片700还可以包括输出接口740。其中,处理器710可以控制该输出接口740与其他设备或芯片进行通信,具体地,可以向其他设备或芯片输出信息或数据。
可选地,该芯片可应用于本申请实施例中的网络设备,并且该芯片可以实现本申请实施例的各个方法中由网络设备实现的相应流程,为了简洁,在此不再赘述。
可选地,该芯片可应用于本申请实施例中的移动终端/终端设备,并且该芯片可以实现本申请实 施例的各个方法中由移动终端/终端设备实现的相应流程,为了简洁,在此不再赘述。
应理解,本申请实施例提到的芯片还可以称为系统级芯片,系统芯片,芯片系统或片上系统芯片等。
应理解,本申请实施例的处理器可能是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法实施例的各步骤可以通过处理器中的硬件的集成逻辑电路或者软件形式的指令完成。上述的处理器可以是通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。可以实现或者执行本申请实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本申请实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器,处理器读取存储器中的信息,结合其硬件完成上述方法的步骤。
可以理解,本申请实施例中的存储器可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(Read-Only Memory,ROM)、可编程只读存储器(Programmable ROM,PROM)、可擦除可编程只读存储器(Erasable PROM,EPROM)、电可擦除可编程只读存储器(Electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(Random Access Memory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(Static RAM,SRAM)、动态随机存取存储器(Dynamic RAM,DRAM)、同步动态随机存取存储器(Synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(Double Data Rate SDRAM,DDR SDRAM)、增强型同步动态随机存取存储器(Enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(Synchlink DRAM,SLDRAM)和直接内存总线随机存取存储器(Direct Rambus RAM,DR RAM)。应注意,本文描述的系统和方法的存储器旨在包括但不限于这些和任意其它适合类型的存储器。
应理解,上述存储器为示例性但不是限制性说明,例如,本申请实施例中的存储器还可以是静态随机存取存储器(static RAM,SRAM)、动态随机存取存储器(dynamic RAM,DRAM)、同步动态随机存取存储器(synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(double data rate SDRAM,DDR SDRAM)、增强型同步动态随机存取存储器(enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(synch link DRAM,SLDRAM)以及直接内存总线随机存取存储器(Direct Rambus RAM,DR RAM)等等。也就是说,本申请实施例中的存储器旨在包括但不限于这些和任意其它适合类型的存储器。
本申请实施例还提供了一种计算机可读存储介质,用于存储计算机程序。
可选的,该计算机可读存储介质可应用于本申请实施例中的网络设备,并且该计算机程序使得计算机执行本申请实施例的各个方法中由网络设备实现的相应流程,为了简洁,在此不再赘述。
可选地,该计算机可读存储介质可应用于本申请实施例中的移动终端/终端设备,并且该计算机程序使得计算机执行本申请实施例的各个方法中由移动终端/终端设备实现的相应流程,为了简洁,在此不再赘述。
本申请实施例还提供了一种计算机程序产品,包括计算机程序指令。
可选的,该计算机程序产品可应用于本申请实施例中的网络设备,并且该计算机程序指令使得计算机执行本申请实施例的各个方法中由网络设备实现的相应流程,为了简洁,在此不再赘述。
可选地,该计算机程序产品可应用于本申请实施例中的移动终端/终端设备,并且该计算机程序指令使得计算机执行本申请实施例的各个方法中由移动终端/终端设备实现的相应流程,为了简洁,在此不再赘述。
本申请实施例还提供了一种计算机程序。
可选的,该计算机程序可应用于本申请实施例中的网络设备,当该计算机程序在计算机上运行时,使得计算机执行本申请实施例的各个方法中由网络设备实现的相应流程,为了简洁,在此不再赘述。
可选地,该计算机程序可应用于本申请实施例中的移动终端/终端设备,当该计算机程序在计算机上运行时,使得计算机执行本申请实施例的各个方法中由移动终端/终端设备实现的相应流程,为了简洁,在此不再赘述。
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤, 能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,)ROM、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应所述以权利要求的保护范围为准。
Claims (101)
- 一种数据传输方法,所述方法包括:第一设备向第二设备发送第一信令,所述第一信令中承载的数据采用第一TLV格式进行编码;其中,所述第一TLV格式用于确定第一TLV结构,所述第一TLV结构包括控制字节ControlByte字段、标签Tag字段、以及以下至少之一:长度Length字段、取值Value字段。
- 根据权利要求1所述的方法,其中,所述ControlByte字段的长度为N1个字节,所述N1的取值为正整数。
- 根据权利要求2所述的方法,其中,所述N1的取值为1。
- 根据权利要求3所述的方法,其中,所述ControlByte字段中的第一部分比特用于指示所述数据的用途为以下之一:设备接入通用、设备控制用、设备控制通用。
- 根据权利要求4所述的方法,其中,所述ControlByte字段中的第一部分比特还用于指示Tag的说明。
- 根据权利要求5所述的方法,其中,所述Tag的说明用于确定以下至少之一:Tag字段的长度;Tag字段所描述的标签类型为属性标识标签iid tag或者索引标签index tag或者设备标识标签DeviceID tag或者事务标识标签ID tag或者服务标识标签siid tag。
- 根据权利要求4至6中任一项所述的方法,其中,所述ControlByte字段中的第一部分比特为所述ControlByte字段中的高3位比特。
- 根据权利要求3至7中任一项所述的方法,其中,所述ControlByte字段中的第二部分比特用于指示Value字段所描述的Value的数据类型。
- 根据权利要求8所述的方法,其中,所述ControlByte字段中的第二部分比特还用于指示以下至少之一:Length字段的长度、Value字段的长度。
- 根据权利要求8所述的方法,其中,所述ControlByte字段中的第二部分比特还用于指示:容器数据类型的结束符。
- 根据权利要求8至10中任一项所述的方法,其中,所述ControlByte字段中的第二部分比特为所述ControlByte字段中的低5位比特。
- 根据权利要求1至11中任一项所述的方法,其中,所述Tag字段的长度为N2个字节,N2为正整数。
- 根据权利要求12所述的方法,其中,所述N2的取值大于等于0且小于等于8。
- 根据权利要求12或13所述的方法,其中,所述Tag字段占据第一字节,若所述第一字节中的最高位的取值为第一值,则表示所述Tag字段仅占据所述第一字节,且所述Tag字段的取值通过所述第一字节中的低7位确定;其中,所述第一字节中的最高位为Tag长度标识位。
- 根据权利要求12或13所述的方法,其中,所述Tag字段至少占据第一字节,若所述第一字节中的最高位的取值为第二值,则表示所述Tag字段还占据所述第一字节之后的第二字节和第三字节,且所述Tag字段的取值通过所述第二字节中的全部比特位和所述第三字节中的全部比特位确定;其中,所述第一字节中的最高位为Tag长度标识位。
- 根据权利要求12或13所述的方法,其中,所述Tag字段至少占据第一字节,若所述第一字节中的最高位的取值为第二值,则表示所述Tag字段还占据所述第一字节之后的第二字节,且所述Tag字段的取值通过所述第一字节中的低7位和所述第二字节中的全部比特位确定;其中,所述第一字节中的最高位为Tag长度标识位。
- 根据权利要求12或13所述的方法,其中,所述Tag字段至少占据第一字节,若所述第一字节中的最高位的取值为第二值,则表示所述Tag字段还占据所述第一字节之后的第二字节,若所述第二字节的最高位的取值为第二值,则表示所述Tag字段还占据所述第二字节之后的第三字节,以此类推,直到所述Tag字段占据的第M字节中的最高位的取值为第一值,将该第M字节作为所述Tag字段占据的最后一个字节,M为正整数;所述Tag字段的取值通过所述第一字节至所述第M字节中的每个字节中的低7位确定。
- 根据权利要求12或13所述的方法,其中,所述Tag字段的长度基于所述ControlByte 字段中的第一部分确定,所述ControlByte字段中的第一部分用于指示Tag的说明,所述Tag的说明用于确定以下至少之一:Tag字段的长度、Tag字段所描述的标签类型为属性标识标签iid tag或者索引标签index tag或者设备标识标签DeviceID tag或者事务标识标签ID tag或者服务标识标签siid tag。
- 根据权利要求1至18中任一项所述的方法,其中,所述Length字段的长度为N3个字节,N3为正整数。
- 根据权利要求19所述的方法,其中,所述N3的取值大于等于0且小于等于8。
- 根据权利要求19或20所述的方法,其中,所述Length字段的长度基于所述ControlByte字段中的第二部分确定,所述ControlByte字段中的第二部分用于指示Length字段的长度。
- 根据权利要求1至21中任一项所述的方法,其中,所述Value字段的长度为N4个字节,N4的取值为正整数。
- 根据权利要求22所述的方法,其中,所述Value字段的长度基于所述ControlByte字段中的第二部分确定,所述ControlByte字段中的第二部分用于指示基本数据类型的Value字段的长度;或者,所述ControlByte字段中的第二部分用于指示容器数据类型的结束符。
- 根据权利要求1至23中任一项所述的方法,其中,所述Tag字段用于描述数据的标签,所述Length字段用于描述Value字段的长度,所述Value字段用于描述数据的Value。
- 一种数据传输方法,所述方法包括:第二设备接收第一设备发送的第一信令,所述第一信令中承载的数据采用第一TLV格式进行编码;其中,所述第一TLV格式用于确定第一TLV结构,所述第一TLV结构包括控制字节ControlByte字段、标签Tag字段、以及以下至少之一:长度Length字段、取值Value字段。
- 根据权利要求25所述的方法,其中,所述ControlByte字段的长度为N1个字节,所述N1的取值为正整数。
- 根据权利要求26所述的方法,其中,所述N1的取值为1。
- 根据权利要求27所述的方法,其中,所述ControlByte字段中的第一部分比特用于指示所述数据的用途为以下之一:设备接入通用、设备控制用、设备控制通用。
- 根据权利要求28所述的方法,其中,所述ControlByte字段中的第一部分比特还用于指示Tag的说明。
- 根据权利要求29所述的方法,其中,所述Tag的说明用于确定以下至少之一:Tag字段的长度;Tag字段所描述的标签类型为属性标识标签iid tag或者索引标签index tag或者设备标识标签DeviceID tag或者事务标识标签ID tag或者服务标识标签siid tag。
- 根据权利要求28至30中任一项所述的方法,其中,所述ControlByte字段中的第一部分比特为所述ControlByte字段中的高3位比特。
- 根据权利要求27至31中任一项所述的方法,其中,所述ControlByte字段中的第二部分比特用于指示Value字段所描述的Value的数据类型。
- 根据权利要求32所述的方法,其中,所述ControlByte字段中的第二部分比特还用于指示以下至少之一:Length字段的长度、Value字段的长度。
- 根据权利要求32所述的方法,其中,所述ControlByte字段中的第二部分比特还用于指示:容器数据类型的结束符。
- 根据权利要求32至34中任一项所述的方法,其中,所述ControlByte字段中的第二部分比特为所述ControlByte字段中的低5位比特。
- 根据权利要求25至35中任一项所述的方法,其中,所述Tag字段的长度为N2个字节,N2为正整数。
- 根据权利要求36所述的方法,其中,所述N2的取值大于等于0且小于等于8。
- 根据权利要求36或37所述的方法,其中,所述Tag字段占据第一字节,若所述第一字节中的最高位的取值为第一值,则表示所述Tag字段仅占据所述第一字节,且所述Tag字段的取值通过所述第一字节中的低7位确定;其中,所述第一字节中的最高位为Tag长度标识位。
- 根据权利要求36或37所述的方法,其中,所述Tag字段至少占据第一字节,若所述第一字节中的最高位的取值为第二值,则表示所述Tag字段还占据所述第一字节之后的第二字节和 第三字节,且所述Tag字段的取值通过所述第二字节中的全部比特位和所述第三字节中的全部比特位确定;其中,所述第一字节中的最高位为Tag长度标识位。
- 根据权利要求36或37所述的方法,其中,所述Tag字段至少占据第一字节,若所述第一字节中的最高位的取值为第二值,则表示所述Tag字段还占据所述第一字节之后的第二字节,且所述Tag字段的取值通过所述第一字节中的低7位和所述第二字节中的全部比特位确定;其中,所述第一字节中的最高位为Tag长度标识位。
- 根据权利要求36或37所述的方法,其中,所述Tag字段至少占据第一字节,若所述第一字节中的最高位的取值为第二值,则表示所述Tag字段还占据所述第一字节之后的第二字节,若所述第二字节的最高位的取值为第二值,则表示所述Tag字段还占据所述第二字节之后的第三字节,以此类推,直到所述Tag字段占据的第M字节中的最高位的取值为第一值,将该第M字节作为所述Tag字段占据的最后一个字节,M为正整数;所述Tag字段的取值通过所述第一字节至所述第M字节中的每个字节中的低7位确定。
- 根据权利要求36或37所述的方法,其中,所述Tag字段的长度基于所述ControlByte字段中的第一部分确定,所述ControlByte字段中的第一部分用于指示Tag的说明,所述Tag的说明用于确定以下至少之一:Tag字段的长度、Tag字段所描述的标签类型为属性标识标签iid tag或者索引标签index tag或者设备标识标签DeviceID tag或者事务标识标签ID tag或者服务标识标签siid tag。
- 根据权利要求25至42中任一项所述的方法,其中,所述Length字段的长度为N3个字节,N3为正整数。
- 根据权利要求43所述的方法,其中,所述N3的取值大于等于0且小于等于8。
- 根据权利要求43或44所述的方法,其中,所述Length字段的长度基于所述ControlByte字段中的第二部分确定,所述ControlByte字段中的第二部分用于指示Length字段的长度。
- 根据权利要求25至45中任一项所述的方法,其中,所述Value字段的长度为N4个字节,N4的取值为正整数。
- 根据权利要求46所述的方法,其中,所述Value字段的长度基于所述ControlByte字段中的第二部分确定,所述ControlByte字段中的第二部分用于指示基本数据类型的Value字段的长度;或者,所述ControlByte字段中的第二部分用于指示容器数据类型的结束符。
- 根据权利要求25至47中任一项所述的方法,其中,所述Tag字段用于描述数据的标签,所述Length字段用于描述Value字段的长度,所述Value字段用于描述数据的Value。
- 一种数据传输装置,应用于第一设备,所述装置包括:发送单元,用于向第二设备发送第一信令,所述第一信令中承载的数据采用第一TLV格式进行编码;其中,所述第一TLV格式用于确定第一TLV结构,所述第一TLV结构包括控制字节ControlByte字段、标签Tag字段、以及以下至少之一:长度Length字段、取值Value字段。
- 根据权利要求49所述的装置,其中,所述ControlByte字段的长度为N1个字节,所述N1的取值为正整数。
- 根据权利要求50所述的装置,其中,所述N1的取值为1。
- 根据权利要求51所述的装置,其中,所述ControlByte字段中的第一部分比特用于指示所述数据的用途为以下之一:设备接入通用、设备控制用、设备控制通用。
- 根据权利要求52所述的装置,其中,所述ControlByte字段中的第一部分比特还用于指示Tag的说明。
- 根据权利要求53所述的装置,其中,所述Tag的说明用于确定以下至少之一:Tag字段的长度;Tag字段所描述的标签类型为属性标识标签iid tag或者索引标签index tag或者设备标识标签DeviceID tag或者事务标识标签ID tag或者服务标识标签siid tag。
- 根据权利要求52至54中任一项所述的装置,其中,所述ControlByte字段中的第一部分比特为所述ControlByte字段中的高3位比特。
- 根据权利要求51至55中任一项所述的装置,其中,所述ControlByte字段中的第二部分比特用于指示Value字段所描述的Value的数据类型。
- 根据权利要求56所述的装置,其中,所述ControlByte字段中的第二部分比特还用于指 示以下至少之一:Length字段的长度、Value字段的长度。
- 根据权利要求56所述的装置,其中,所述ControlByte字段中的第二部分比特还用于指示:容器数据类型的结束符。
- 根据权利要求56至58中任一项所述的装置,其中,所述ControlByte字段中的第二部分比特为所述ControlByte字段中的低5位比特。
- 根据权利要求49至59中任一项所述的装置,其中,所述Tag字段的长度为N2个字节,N2为正整数。
- 根据权利要求60所述的装置,其中,所述N2的取值大于等于0且小于等于8。
- 根据权利要求60或61所述的装置,其中,所述Tag字段占据第一字节,若所述第一字节中的最高位的取值为第一值,则表示所述Tag字段仅占据所述第一字节,且所述Tag字段的取值通过所述第一字节中的低7位确定;其中,所述第一字节中的最高位为Tag长度标识位。
- 根据权利要求60或61所述的装置,其中,所述Tag字段至少占据第一字节,若所述第一字节中的最高位的取值为第二值,则表示所述Tag字段还占据所述第一字节之后的第二字节和第三字节,且所述Tag字段的取值通过所述第二字节中的全部比特位和所述第三字节中的全部比特位确定;其中,所述第一字节中的最高位为Tag长度标识位。
- 根据权利要求60或61所述的装置,其中,所述Tag字段至少占据第一字节,若所述第一字节中的最高位的取值为第二值,则表示所述Tag字段还占据所述第一字节之后的第二字节,且所述Tag字段的取值通过所述第一字节中的低7位和所述第二字节中的全部比特位确定;其中,所述第一字节中的最高位为Tag长度标识位。
- 根据权利要求60或61所述的装置,其中,所述Tag字段至少占据第一字节,若所述第一字节中的最高位的取值为第二值,则表示所述Tag字段还占据所述第一字节之后的第二字节,若所述第二字节的最高位的取值为第二值,则表示所述Tag字段还占据所述第二字节之后的第三字节,以此类推,直到所述Tag字段占据的第M字节中的最高位的取值为第一值,将该第M字节作为所述Tag字段占据的最后一个字节,M为正整数;所述Tag字段的取值通过所述第一字节至所述第M字节中的每个字节中的低7位确定。
- 根据权利要求60或61所述的装置,其中,所述Tag字段的长度基于所述ControlByte字段中的第一部分确定,所述ControlByte字段中的第一部分用于指示Tag的说明,所述Tag的说明用于确定以下至少之一:Tag字段的长度、Tag字段所描述的标签类型为属性标识标签iid tag或者索引标签index tag或者设备标识标签DeviceID tag或者事务标识标签ID tag或者服务标识标签siid tag。
- 根据权利要求49至66中任一项所述的装置,其中,所述Length字段的长度为N3个字节,N3为正整数。
- 根据权利要求67所述的装置,其中,所述N3的取值大于等于0且小于等于8。
- 根据权利要求67或68所述的装置,其中,所述Length字段的长度基于所述ControlByte字段中的第二部分确定,所述ControlByte字段中的第二部分用于指示Length字段的长度。
- 根据权利要求49至69中任一项所述的装置,其中,所述Value字段的长度为N4个字节,N4的取值为正整数。
- 根据权利要求70所述的装置,其中,所述Value字段的长度基于所述ControlByte字段中的第二部分确定,所述ControlByte字段中的第二部分用于指示基本数据类型的Value字段的长度;或者,所述ControlByte字段中的第二部分用于指示容器数据类型的结束符。
- 根据权利要求49至71中任一项所述的装置,其中,所述Tag字段用于描述数据的标签,所述Length字段用于描述Value字段的长度,所述Value字段用于描述数据的Value。
- 一种数据传输装置,应用于第二设备,所述装置包括:接收单元,用于接收第一设备发送的第一信令,所述第一信令中承载的数据采用第一TLV格式进行编码;其中,所述第一TLV格式用于确定第一TLV结构,所述第一TLV结构包括控制字节ControlByte字段、标签Tag字段、以及以下至少之一:长度Length字段、取值Value字段。
- 根据权利要求73所述的装置,其中,所述ControlByte字段的长度为N1个字节,所述N1的取值为正整数。
- 根据权利要求74所述的装置,其中,所述N1的取值为1。
- 根据权利要求75所述的装置,其中,所述ControlByte字段中的第一部分比特用于指示所述数据的用途为以下之一:设备接入通用、设备控制用、设备控制通用。
- 根据权利要求76所述的装置,其中,所述ControlByte字段中的第一部分比特还用于指示Tag的说明。
- 根据权利要求77所述的装置,其中,所述Tag的说明用于确定以下至少之一:Tag字段的长度;Tag字段所描述的标签类型为属性标识标签iid tag或者索引标签index tag或者设备标识标签DeviceID tag或者事务标识标签ID tag或者服务标识标签siid tag。
- 根据权利要求76至78中任一项所述的装置,其中,所述ControlByte字段中的第一部分比特为所述ControlByte字段中的高3位比特。
- 根据权利要求75至79中任一项所述的装置,其中,所述ControlByte字段中的第二部分比特用于指示Value字段所描述的Value的数据类型。
- 根据权利要求80所述的装置,其中,所述ControlByte字段中的第二部分比特还用于指示以下至少之一:Length字段的长度、Value字段的长度。
- 根据权利要求80所述的装置,其中,所述ControlByte字段中的第二部分比特还用于指示:容器数据类型的结束符。
- 根据权利要求80至82中任一项所述的装置,其中,所述ControlByte字段中的第二部分比特为所述ControlByte字段中的低5位比特。
- 根据权利要求73至83中任一项所述的装置,其中,所述Tag字段的长度为N2个字节,N2为正整数。
- 根据权利要求84所述的装置,其中,所述N2的取值大于等于0且小于等于8。
- 根据权利要求84或85所述的装置,其中,所述Tag字段占据第一字节,若所述第一字节中的最高位的取值为第一值,则表示所述Tag字段仅占据所述第一字节,且所述Tag字段的取值通过所述第一字节中的低7位确定;其中,所述第一字节中的最高位为Tag长度标识位。
- 根据权利要求84或85所述的装置,其中,所述Tag字段至少占据第一字节,若所述第一字节中的最高位的取值为第二值,则表示所述Tag字段还占据所述第一字节之后的第二字节和第三字节,且所述Tag字段的取值通过所述第二字节中的全部比特位和所述第三字节中的全部比特位确定;其中,所述第一字节中的最高位为Tag长度标识位。
- 根据权利要求84或85所述的装置,其中,所述Tag字段至少占据第一字节,若所述第一字节中的最高位的取值为第二值,则表示所述Tag字段还占据所述第一字节之后的第二字节,且所述Tag字段的取值通过所述第一字节中的低7位和所述第二字节中的全部比特位确定;其中,所述第一字节中的最高位为Tag长度标识位。
- 根据权利要求84或85所述的装置,其中,所述Tag字段至少占据第一字节,若所述第一字节中的最高位的取值为第二值,则表示所述Tag字段还占据所述第一字节之后的第二字节,若所述第二字节的最高位的取值为第二值,则表示所述Tag字段还占据所述第二字节之后的第三字节,以此类推,直到所述Tag字段占据的第M字节中的最高位的取值为第一值,将该第M字节作为所述Tag字段占据的最后一个字节,M为正整数;所述Tag字段的取值通过所述第一字节至所述第M字节中的每个字节中的低7位确定。
- 根据权利要求84或85所述的装置,其中,所述Tag字段的长度基于所述ControlByte字段中的第一部分确定,所述ControlByte字段中的第一部分用于指示Tag的说明,所述Tag的说明用于确定以下至少之一:Tag字段的长度、Tag字段所描述的标签类型为属性标识标签iid tag或者索引标签index tag或者设备标识标签DeviceID tag或者事务标识标签ID tag或者服务标识标签siid tag。
- 根据权利要求73至90中任一项所述的装置,其中,所述Length字段的长度为N3个字节,N3为正整数。
- 根据权利要求91所述的装置,其中,所述N3的取值大于等于0且小于等于8。
- 根据权利要求91或92所述的装置,其中,所述Length字段的长度基于所述ControlByte字段中的第二部分确定,所述ControlByte字段中的第二部分用于指示Length字段的长度。
- 根据权利要求73至93中任一项所述的装置,其中,所述Value字段的长度为N4个字节,N4的取值为正整数。
- 根据权利要求94所述的装置,其中,所述Value字段的长度基于所述ControlByte字段 中的第二部分确定,所述ControlByte字段中的第二部分用于指示基本数据类型的Value字段的长度;或者,所述ControlByte字段中的第二部分用于指示容器数据类型的结束符。
- 根据权利要求73至95中任一项所述的装置,其中,所述Tag字段用于描述数据的标签,所述Length字段用于描述Value字段的长度,所述Value字段用于描述数据的Value。
- 一种通信设备,包括:处理器和存储器,该存储器用于存储计算机程序,所述处理器用于调用并运行所述存储器中存储的计算机程序,执行如权利要求1至24中任一项所述的方法,或者权利要求25至48中任一项所述的方法。
- 一种芯片,包括:处理器,用于从存储器中调用并运行计算机程序,使得安装有所述芯片的设备执行如权利要求1至24中任一项所述的方法,或者权利要求25至48中任一项所述的方法。
- 一种计算机可读存储介质,用于存储计算机程序,所述计算机程序使得计算机执行如权利要求1至24中任一项所述的方法,或者权利要求25至48中任一项所述的方法。
- 一种计算机程序产品,包括计算机程序指令,该计算机程序指令使得计算机执行如权利要求1至24中任一项所述的方法,或者权利要求25至48中任一项所述的方法。
- 一种计算机程序,所述计算机程序使得计算机执行如权利要求1至24中任一项所述的方法,或者权利要求25至48中任一项所述的方法。
Priority Applications (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202080105087.2A CN116615874B (zh) | 2020-12-01 | 2020-12-01 | 一种数据传输方法及装置、通信设备 |
| PCT/CN2020/133158 WO2022116009A1 (zh) | 2020-12-01 | 2020-12-01 | 一种数据传输方法及装置、通信设备 |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| PCT/CN2020/133158 WO2022116009A1 (zh) | 2020-12-01 | 2020-12-01 | 一种数据传输方法及装置、通信设备 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2022116009A1 true WO2022116009A1 (zh) | 2022-06-09 |
Family
ID=81852864
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2020/133158 Ceased WO2022116009A1 (zh) | 2020-12-01 | 2020-12-01 | 一种数据传输方法及装置、通信设备 |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN116615874B (zh) |
| WO (1) | WO2022116009A1 (zh) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN117873539A (zh) * | 2023-12-28 | 2024-04-12 | 四川赛狄信息技术股份公司 | 基于MicroBlaze的FPGA在线升级方法、系统及介质 |
| CN119212056A (zh) * | 2024-11-25 | 2024-12-27 | 上海铌锣智能科技有限公司 | 一种温度检测方法、装置、设备及存储介质 |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101179580A (zh) * | 2007-12-12 | 2008-05-14 | 北京北方烽火科技有限公司 | 一种用于实现WiMAX系统消息编解码的方法 |
| CN102090001A (zh) * | 2008-10-30 | 2011-06-08 | 华为技术有限公司 | 基于以太网的光网络终端管理和控制接口 |
| CN102739505A (zh) * | 2011-04-06 | 2012-10-17 | 中兴通讯股份有限公司 | 数据中心网络中对虚拟通道的流量控制方法及系统 |
| US20130077626A1 (en) * | 2011-09-23 | 2013-03-28 | Avaya Inc. | Separation of edge and routing/control information for multicast over shortest path bridging |
| CN110086763A (zh) * | 2013-06-25 | 2019-08-02 | 谷歌有限责任公司 | 结构网络 |
Family Cites Families (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102333288B (zh) * | 2011-05-31 | 2014-02-19 | 华为软件技术有限公司 | 控制终端应用程序运行的方法和终端 |
| US9553843B1 (en) * | 2014-10-08 | 2017-01-24 | Google Inc. | Service directory profile for a fabric network |
| CN111447243B (zh) * | 2014-11-04 | 2022-07-15 | 三星电子株式会社 | 发送装置和接收装置及其信号处理方法 |
-
2020
- 2020-12-01 WO PCT/CN2020/133158 patent/WO2022116009A1/zh not_active Ceased
- 2020-12-01 CN CN202080105087.2A patent/CN116615874B/zh active Active
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101179580A (zh) * | 2007-12-12 | 2008-05-14 | 北京北方烽火科技有限公司 | 一种用于实现WiMAX系统消息编解码的方法 |
| CN102090001A (zh) * | 2008-10-30 | 2011-06-08 | 华为技术有限公司 | 基于以太网的光网络终端管理和控制接口 |
| CN102739505A (zh) * | 2011-04-06 | 2012-10-17 | 中兴通讯股份有限公司 | 数据中心网络中对虚拟通道的流量控制方法及系统 |
| US20130077626A1 (en) * | 2011-09-23 | 2013-03-28 | Avaya Inc. | Separation of edge and routing/control information for multicast over shortest path bridging |
| CN110086763A (zh) * | 2013-06-25 | 2019-08-02 | 谷歌有限责任公司 | 结构网络 |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN117873539A (zh) * | 2023-12-28 | 2024-04-12 | 四川赛狄信息技术股份公司 | 基于MicroBlaze的FPGA在线升级方法、系统及介质 |
| CN119212056A (zh) * | 2024-11-25 | 2024-12-27 | 上海铌锣智能科技有限公司 | 一种温度检测方法、装置、设备及存储介质 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN116615874B (zh) | 2024-08-23 |
| CN116615874A (zh) | 2023-08-18 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN111352889B (zh) | 一种基于mctp协议的设备管理方法、设备、装置和介质 | |
| CN110740481B (zh) | 基于服务质量的数据处理方法、设备和计算机存储介质 | |
| WO2021013046A1 (zh) | 通信方法和网卡 | |
| US20220358070A1 (en) | Pcie-based data transmission method and apparatus | |
| WO2021057326A1 (zh) | 数据编码方法、解码方法、编解码方法、设备及存储介质 | |
| WO2022042235A1 (zh) | 数据报文发送方法、处理方法、装置、设备及数据报文 | |
| CN116204487A (zh) | 远程数据访问方法及装置 | |
| WO2022116009A1 (zh) | 一种数据传输方法及装置、通信设备 | |
| CN107944461B (zh) | 一种数据处理方法、装置和设备 | |
| WO2020038443A1 (zh) | 桥接通信的方法和设备 | |
| WO2019174191A1 (zh) | 报表数据初始化方法、装置、计算机设备及存储介质 | |
| WO2018202151A1 (zh) | 通信方法和通信装置 | |
| TWI645698B (zh) | 資料發送裝置、資料接收裝置及其方法 | |
| CN106790201B (zh) | 一种传输数据的方法和装置 | |
| CN109428861A (zh) | 网络通信方法及设备 | |
| WO2024197874A1 (zh) | 感知测量建立方法、电子设备及存储介质 | |
| WO2019144619A1 (zh) | 一种rpc通讯方法、系统及装置 | |
| CN110190985A (zh) | 管理设备对远端存储设备进行管理的方法 | |
| US20220365895A1 (en) | Pcie-based data transmission method and apparatus | |
| WO2023050045A1 (zh) | 数据传输方法、装置以及系统 | |
| WO2024187385A1 (zh) | 通信方法、电子设备及存储介质 | |
| CN115968543B (zh) | 资源映射方法、装置、设备及存储介质 | |
| WO2024207483A1 (zh) | 通信方法、电子设备及存储介质 | |
| CN110727391A (zh) | 交易数据存储方法及装置、区块链系统、介质和电子设备 | |
| WO2022257533A1 (zh) | 一种数据传输方法、装置、存储介质及电子装置 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| WWE | Wipo information: entry into national phase |
Ref document number: 202080105087.2 Country of ref document: CN |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 20963857 Country of ref document: EP Kind code of ref document: A1 |