A data transmission method and device, and communication equipment

By introducing the ControlByte field in the TLV format, the control information of the Tag and Value fields is clarified, which solves the problem of low efficiency of the existing TLV format and achieves more efficient data transmission.

CN116615874BActive Publication Date: 2024-08-23GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202080105087.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-01
Publication Date
2024-08-23
Estimated Expiration
2040-12-01

AI Technical Summary

Technical Problem

The existing TLV format lacks control information during the data encoding and decoding process, resulting in low efficiency.

Method used

A new TLV format is introduced, called the first TLV format. This format includes a ControlByte field, a Tag field, a Length field, and a Value field. The ControlByte field describes the control information of other fields, improving encoding and decoding efficiency.

Benefits of technology

By adding the ControlByte field, the control information of the Tag field and Value field is clarified, the encoding and decoding efficiency of data transmission is improved, and a TLV structure that is more in line with application requirements is realized.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116615874B
    Figure CN116615874B
Patent Text Reader

Abstract

An embodiment of the present application provides a data transmission method and apparatus, and a communication device, the method comprising: a first device sends a first signaling to a second device, and the data carried in the first signaling is encoded using a first TLV format; wherein the first TLV format is used to determine a first TLV structure, and the first TLV structure includes a control byte ControlByte field, a tag Tag field, and at least one of the following: a length Length field, and a value Value field.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of mobile communication technology, and specifically to a data transmission method and apparatus, and a communication device. Background Art

[0002] 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 field, a length field, and a value field. A basic data element includes the above three fields, among which 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, and the Value field is used to describe the Value of the data (that is, the attribute value of the tag described by the Tag field). When the above TLV format is used for encoding and decoding, the efficiency of encoding and decoding is low due to the lack of some control information. Summary of the invention

[0003] The embodiments of the present application provide a data transmission method and apparatus, and a communication device.

[0004] The data transmission method provided in the embodiment of the present application includes:

[0005] The first device sends a first signaling to the second device, and the data carried in the first signaling is encoded in a first TLV format; wherein,

[0006] The first TLV format is used to determine a first TLV structure, and 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.

[0007] The data transmission method provided in the embodiment of the present application includes:

[0008] The second device receives the first signaling sent by the first device, where the data carried in the first signaling is encoded in a first TLV format; wherein,

[0009] The first TLV format is used to determine a first TLV structure, and 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.

[0010] The data transmission device provided in the embodiment of the present application is applied to a first device, and the device includes:

[0011] A sending unit, configured to send a first signaling to a second device, wherein the data carried in the first signaling is encoded in a first TLV format; wherein:

[0012] The first TLV format is used to determine a first TLV structure, and 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.

[0013] The data transmission device provided in the embodiment of the present application is applied to a second device, and the device includes:

[0014] A receiving unit, configured to receive a first signaling sent by a first device, wherein the data carried in the first signaling is encoded in a first TLV format; wherein:

[0015] The first TLV format is used to determine a first TLV structure, and 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.

[0016] The communication device provided in the embodiment of the present application includes a processor and a memory. The memory is used to store a computer program, and the processor is used to call and run the computer program stored in the memory to execute the above-mentioned data transmission method.

[0017] The chip provided in the embodiment of the present application is used to implement the above-mentioned data transmission method.

[0018] Specifically, the chip includes: a processor, which is used to call and run a computer program from a memory, so that a device equipped with the chip executes the above-mentioned data transmission method.

[0019] The computer-readable storage medium provided in the embodiment of the present application is used to store a computer program, which enables a computer to execute the above-mentioned data transmission method.

[0020] The computer program product provided in the embodiment of the present application includes computer program instructions, which enable a computer to execute the above-mentioned data transmission method.

[0021] The computer program provided in the embodiment of the present application, when executed on a computer, enables the computer to execute the above-mentioned data transmission method.

[0022] Through the above technical solution, a new TLV format (i.e., the first TLV format) is proposed, and the TLV structure (i.e., the first TLV structure) determined by the new TLV format includes a control byte (ControlByte) field, a Tag field, and at least one of the following: a Length field and a 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, thereby improving the efficiency of encoding and decoding, and realizing a TLV structure that meets the application. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0024] Figure 1 This is an optional communication architecture diagram provided in an embodiment of the present application;

[0025] Figure 2 It is a flowchart of a data transmission method provided in an embodiment of the present application;

[0026] Figure 3 It is a schematic diagram of the interaction between the client and the server provided in the embodiment of the present application;

[0027] Figure 4 The structure of the data transmission device provided in the embodiment of the present application is shown in FIG. Figure 1 ;

[0028] Figure 5 The structure of the data transmission device provided in the embodiment of the present application is shown in FIG. Figure 2 ;

[0029] Figure 6 is a schematic structural diagram of a communication device provided in an embodiment of the present application;

[0030] Figure 7 It is a schematic structural diagram of the chip of an embodiment of the present application. DETAILED DESCRIPTION

[0031] The present application will be described in detail below with reference to the accompanying drawings and in combination with embodiments. It should be noted that the embodiments in the present application and the features in the embodiments can be combined with each other without conflict. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.

[0032] It should be noted that the terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0033] To facilitate understanding of the technical solutions of the embodiments of the present application, the relevant technologies involved in the embodiments of the present application are described below.

[0034] Communication architecture

[0035] The Open Connectivity Foundation (OCF) defines clients and servers. Servers refer to devices that provide resources, and clients refer to devices that access resources.

[0036] OCF adopts the Representational State Transfer (RESTful) architecture, which 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. The client and server defined in OCF are logical functional entities. A device can be a client, a server, or both a client and a server.

[0037] The business interaction between the client and the server is achieved by performing RESTful operations on resources. RESTful operations can be Create-Retrieve-Update-Delete-Notify (CRUDN) operations. Obviously, CRUDN operations can be any one or more of the following operations: Create, Retrieve, Update, Delete, Notify. The client is the initiator of the RESTful operation, and the server is the responder of the RESTful operation. The client sends a resource operation request to the server, requesting to operate the resources on the server. The server performs the resource operation and returns a response to the client, which carries the content and description information of the resource.

[0038] Figure 1This is an optional communication architecture diagram provided by the embodiment of the present application. The description of resources is the resource model layer. Each resource corresponds to a specific Uniform Resource Identifier (URI). The resource can be accessed by accessing the URI of the resource. In addition, each resource has a corresponding interface that supports RESTful operations. The transmission protocol layer transmits resource content and description information. By mapping resource operations to specific transmission protocols, the RESTful operations of each resource are converted into physical messages transmitted between devices, providing a means for interconnection between devices.

[0039] OCF's transport protocol uses the Constrained Application Protocol (CoAP) to carry resource operations. Each CRUDN operation is mapped to a CoAP request message or response message. The client can operate the server's resources through the three methods of GET, POST, and DELETE in CoAP, thereby realizing the conversion of resource status.

[0040] TLV

[0041] The data transmitted between the client and the server is encoded and decoded in TLV format. TLV is a type of Basic Encoding Rule (BER) encoding and complies with the ASN1 standard. The full name of TLV is: Tag-Length-Value. In the field of IS-IS data communication, a basic data element includes a tlv ternary array, namely Tag-Length-Value, which can also be understood as a basic data element including three fields, namely the Tag field, the Length field and the Value field. Among them, 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, and the Value field is used to describe the Value of the data (that is, the attribute value of the tag described by the Tag field).

[0042] The technical solution of the embodiment of the present application proposes 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 formats, such as 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 load (i.e., the data carried in the signaling) in the signaling that interacts with each other.

[0043] Figure 2 is a flow chart of a data transmission method provided in an embodiment of the present application, such as Figure 2As shown, the data transmission method comprises the following steps:

[0044] Step 201: The first device sends a first signaling to the second device, and the second device receives the first signaling sent by the first device, wherein 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, and the first TLV structure includes a ControlByte field, a Tag field, and at least one of the following: a Length field, a Value field.

[0045] In an optional method of the present application, refer to Figure 3 , the first device is a client, and the second device is a server. The first signaling is a resource operation request message, where the resource operation request message may be, for example, a request message to modify the service (Server) status. The data carried in the first signaling is encoded using the first TLV format provided in an embodiment of the present application. After receiving the resource operation request message, the server decodes the first signaling according to the first TLV format provided in an embodiment of the present application, thereby obtaining the data carried in the first signaling, and performing corresponding operations according to the data, such as attribute change operations.

[0046] In another optional embodiment of the present application, reference is made to Figure 3 , the first device is a server, and the second device is a client. The first signaling is a response message. The data carried in the response message is encoded using the first TLV format provided in the embodiment of the present application. After receiving the response message, the client decodes the first signaling according to the first TLV format provided in the embodiment of the present application, thereby obtaining the data carried in the first signaling.

[0047] The first TLV format in the embodiment of the present application is used to determine a first TLV structure, and 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.

[0048] In an optional manner, the first TLV structure includes a ControlByte field and a Tag field.

[0049] In an optional manner, the first TLV structure includes a ControlByte field, a Tag field and a Value field.

[0050] In an optional manner, the first TLV structure includes a ControlByte field, a Tag field, a Length field and a Value field.

[0051] In an embodiment of the present application, the ControlByte field is used to describe the control information of other fields, such as 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, also includes the length of the Length field and / or the length of the Value field.

[0052] In the embodiment of the present application, the Tag field is used to describe the label of the data.

[0053] In this embodiment of the present application, the Length field is used to describe the length of the Value field.

[0054] In the embodiment of the present application, the Value field is used to describe the Value of the data (ie, the attribute value corresponding to the tag).

[0055] In one example, the content of the Tag field is 0X12, which means the tag is temperature. The content of the Value field is 15, which means the value of the temperature is 15 degrees.

[0056] The following is a detailed description of each field in the above scheme.

[0057] (I) ControlByte field

[0058] In the embodiment of the present application, the length of the ControlByte field is N1 bytes, and the value of N1 is a positive integer. In an optional manner, the value of N1 is 1, that is, the length of the ControlByte field is 1 byte.

[0059] In the embodiment of the present application, the ControlByte field includes two parts, namely the first part and the second part, wherein the first part may also be referred to as the tagControl part, and the second part may also be referred to as the elementType part. The first part is used to determine the relevant control information of the Tag field, and the second part is used to determine the relevant control information of the Value field.

[0060] In an optional manner, the first part of bits in the ControlByte field is the upper 3 bits in the ControlByte field. For example, Bit7-bit5 is the first part of bits. The second part of bits in the ControlByte field is the lower 5 bits in the ControlByte field. For example, Bit4-bit0 is the second part of bits.

[0061] In an embodiment of the present application, the first part of the bits in the ControlByte field is used to indicate that the purpose of the data is one of the following: general device access, device control, and general device control. Furthermore, the first part of the bits in the ControlByte field is also used to indicate the description of the Tag. Here, the description of the Tag is used to determine at least one of the following: the length of the Tag field, the type of tag described by the Tag field is an attribute identification tag (iid tag) or an index tag (index tag) or a device identification tag (DeviceID tag) or a transaction identification tag (ID tag) or a service identification tag (siid tag).

[0062] It should be noted that 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).

[0063] In the embodiment of the present application, the second part of the bits in the ControlByte field is used to indicate the data type of the Value described by the Value field. Further, the second part of the bits in the ControlByte field is also used to indicate at least one of the following: the length of the Length field, the length of the Value field. Alternatively, the second part of the bits in the ControlByte field is also used to indicate: the end mark of the container data type.

[0064] In an example, the following Table 1-1 and Table 1-2 give the contents indicated by different values ​​of the first part of the bits (i.e., Bit7-bit5) in the ControlByte field, and the contents indicated by different values ​​of the second part of the bits (i.e., Bit4-bit0).

[0065]

[0066]

[0067] Table 1-1

[0068]

[0069] Table 1-2

[0070] The following is an example of how the first part of the bits (ie, Bit7-bit5) and the second part of the bits (ie, Bit4-bit0) in the ControlByte field indicate information in combination with the above Table 1-1 and Table 1-2.

[0071] In an example, when the value of the second part of the bits in the ControlByte field (i.e., Bit4-bit0) is 00000, the second part of the 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.

[0072] In an example, when the value of the second part of the bits in the ControlByte field (i.e., Bit4-bit0) is 00100, the second part of the bits is used to indicate that the data type of 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.

[0073] In an example, when the value of the second part of the bits in the ControlByte field (i.e., Bit4-bit0) is 01000, the second part of the bits is used to indicate that the data type of Value is Boolean type, and the value of the data is false, and there is no Length field (which can also be understood as the length of the Length field is 0 bytes) and no Value field (which can also be understood as the length of the Value field is 0 bytes).

[0074] In an example, when the value of the second part of the bits in the ControlByte field (i.e., Bit4-bit0) is 01010, the second part of the bits is used to indicate that the data type of Value is a floating point type, 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 4 bytes.

[0075] In an example, when the value of the second part of the bits (i.e., Bit4-bit0) in the ControlByte field is 10000, the second part of the bits is used to indicate that the data type of Value is bytes, the length of the Length field is 1 byte, and the Value field is a variable length.

[0076] In an example, when the value of the second part of the bits (i.e., Bit4-bit0) in the ControlByte field is 10100, the second part of the bits is used to indicate that the data type of Value is a string type, the length of the Length field is 1 byte, and the Value field is a variable length.

[0077] In an example, when the value of the second part of bits (ie, Bit4-bit0) in the ControlByte field is 11001, the second part of bits is used to indicate that the data type of Value is a structure type, and the Length field and the Value field are variable lengths.

[0078] In an example, when the value of the second part of bits (ie, Bit4-bit0) in the ControlByte field is 11010, the second part of bits is used to indicate that the data type of Value is an array type, and the Length field and the Value field are variable lengths.

[0079] In an example, when the value of the second part of bits (ie, Bit4-bit0) in the ControlByte field is 11011, the second part of bits is used to indicate the end mark of the struct, and the value of Bit5-bit7 is 000.

[0080] In an example, when the value of the second part of bits (ie, Bit4-bit0) in the ControlByte field is 11100, the second part of bits is used to indicate the end of the array, and the value of Bit5-bit7 is 000.

[0081] It should be noted that the above unsigned integer type, signed integer type, Boolean type, floating point type, and byte type are basic data types. String type is a reference type. Structure type and array type are container data types.

[0082] In an example, when the value of the first part of bits (ie, Bit7-bit5) in the ControlByte field is 001, the second part of bits is used to indicate that the purpose of the data is general device access.

[0083] In one example, when the value of the first part of the bits in the ControlByte field (i.e., Bit7-bit5) is 010, the second part of the bits is used to indicate that the purpose of the data is for device control, and the tag type described by the Tag field is an iid tag, and the length of the Tag field is 1 byte. In this case, the tag value (i.e., the value of the Tag field) is the iid value, and the value value (i.e., the value of the Value field) is the attribute value corresponding to idd. Here, iid is the unique identifier of an attribute, event, or method within a service.

[0084] In one example, when the value of the first part of the bits (i.e., Bit7-bit5) in the ControlByte field is 100, the second part of the bits is used to indicate that the purpose of the data is for device control, and the tag type described by the Tag field is an index tag, and the length of the Tag field is 1 byte. In this case, index is used to mark the sub-element in the struct data type or array data type, the tag value (i.e., the value of the Tag field) is the index value, and the value value (i.e., the value of the Value field) is the value of the sub-element marked by the index.

[0085] In an example, when the value of the first part of bits (ie, Bit7-bit5) in the ControlByte field is 110, the second part of bits is used to indicate that the purpose of the data is general device control.

[0086] In one example, for general device control, referring to Table 1-2, four cases are further subdivided, and the purpose of each case can be called device control. For the first case, the tag value (i.e., the value of the Tag field) is 0x1, representing the DeviceID tag, and the value value (i.e., the value of the Value field) is the deviceID value, where deviceID is the ID that identifies a device. For the second case, the tag value (i.e., the value of the Tag field) is 0x2, representing the transaction ID tag, and the value value (i.e., the value of the Value field) is the transaction ID value, where the transaction ID is the identifier of a group of associated signaling flows. For the third case, the tag value (i.e., the value of the Tag field) is 0x3, representing the siid tag, and the value value (i.e., the value of the Value field) is a 1-byte siid value, where siid is the identifier of a service instance. For the fourth case, the tag value (ie, the value of the Tag field) is 0x4, representing the siid tag, and the value value (ie, the value of the Value field) is a 2-byte siid value, where siid is the identifier of a service instance.

[0087] (II) Tag field

[0088] In the embodiment of the present application, the length of the Tag field is N2 bytes, where N2 is a positive integer. In an optional manner, 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.

[0089] In an example, the structure of the bytes occupied by the Tag field is shown in Table 2-1 below, where the highest bit of the byte (i.e., bit7) is the Tag length identification bit, and the lower 7 bits of the byte (i.e., bit6-bit0) are used to identify the Tag value.

[0090]

[0091] Table 2-1

[0092] In another example, the structure of the bytes occupied by the Tag field is shown in Table 2-2 below, where all bits of the byte (ie, bit7-bit0) are used to identify the Tag value.

[0093]

[0094] Table 2-2

[0095] The Tag field may occupy one or more bytes. In the embodiment of the present application, the length and value of the Tag field may be determined by the following scheme.

[0096] Solution 1) The Tag field occupies the first byte. 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 identifier.

[0097] In an optional manner, 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 (ie, determine the value of the Tag field).

[0098] Solution 2) The Tag field occupies at least the first byte. If the value of the highest bit in the first byte is the second value, it means that the Tag field also occupies the second byte and the third byte after the first byte, and the value of the Tag field is determined by all the bits in the second byte and all the bits in the third byte; wherein the highest bit in the first byte is the Tag length identifier.

[0099] In an optional manner, the second value is 1. Specifically, when the value of the Tag length identifier in a byte (i.e., the first byte) is 1, it means that the two bytes following the byte also belong to the Tag field, and all bits of the following two bytes are used to identify the tag value (i.e., determine the value of the Tag field). It should be noted that bit6-bit0 in the first byte are not used.

[0100] Solution three) The Tag field occupies at least the first byte. If the value of the highest bit in the first byte is the second value, it means that the Tag field also occupies the second byte after the first byte, 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 is the Tag length identifier.

[0101] In an optional manner, the second value is 1. Specifically, when the value of the Tag length identifier of a byte (i.e., the first byte) is 1, it means that the byte immediately following the byte also belongs to the Tag field, and bit6-bit0 of the first byte and bit7-bit0 of the next byte are used to identify the tag value (i.e., determine the value of the Tag field).

[0102] Solution 4) The Tag field occupies at least the first byte. If the value of the highest bit in the first byte is the second value, it means that the Tag field also occupies the second byte after the first byte. If the value of the highest bit in 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, and the Mth byte is taken as the last byte occupied by the Tag field, M is a positive integer; the value of the Tag field is determined by the lower 7 bits of each byte from the first byte to the Mth byte.

[0103] In an optional manner, the second value is 1 and the first value is 0. Specifically, when the Tag length identifier of a byte (i.e., the first byte) is 1, it means that the byte immediately following the byte (i.e., the second byte) also belongs to the Tag field; if the Tag length identifier of the second byte is also 1, it means that the byte immediately following the byte (i.e., the third byte) also belongs to the Tag field, and so on, until the Tag length identifier of the Mth byte is 0, then the Mth byte is the last byte occupied by the Tag field. Use bit6-bit0 of each byte to identify the tag value (i.e., determine the value of the Tag field).

[0104] Taking the Tag field occupying two bytes as an example, the following Table 3 shows that the Tag field occupies the first byte and the second byte. Among them, the Tag length identification bit of the first byte is 1, indicating that the byte immediately following the first byte (i.e., the second byte) also belongs to the Tag field, and the Tag length identification bit of the second byte is 0, indicating that the second byte is the last byte occupied by the Tag field. Use bit6-bit0 of the first byte and bit6-bit0 of the second byte to identify the tag value (i.e., determine the value of the Tag field): 00000010000001 (binary) = 129 (decimal). Among them, the first half of the binary data 0000001 corresponds to bit6-bit0 of the first byte, and 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, the same can be applied.

[0105]

[0106] Table 3

[0107] Solution 5) The length of the Tag field is determined based on the first part of the ControlByte field, and the first part of 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 length of the Tag field, and the tag type described by the Tag field is iid tag or index tag or DeviceIDtag or transaction ID tag or siid tag.

[0108] For solution 5), the length of the Tag field can be directly determined according to the first part (ie, the tagControl part) in the ControlByte field. Specifically, the content indicated by the value of the first part in the ControlByte field can be determined by referring to the content shown in Table 1-1 above.

[0109] (III) Length field

[0110] In the embodiment of the present application, the length of the Length field is N3 bytes, where N3 is a positive integer. In an optional manner, 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.

[0111] In an embodiment of the present application, for certain data types (such as basic data types), the length of the Length field is determined based on the second part of the ControlByte field, and the second part of the ControlByte field is used to indicate the length of the Length field.

[0112] It should be noted that the Length field of a container data type (such as a struct type or an array type) is of variable length, so a variable length method can be used to determine its length. In an optional method, the end mark of a struct or array can be used to identify the end position of a struct or array, thereby determining the length of the Length field based on the end position.

[0113] It should be noted that the basic data types are, for example, the unsigned integer type (uint), the signed integer type (nit), the floating point type (float), etc. shown in Table 2-1. The container data types are, for example, the structure type (struct), the array type, etc. shown in Table 2-1.

[0114] (IV) Value field

[0115] In the embodiment of the present application, the length of the Value field is N4 bytes, and the value of N4 is a positive integer.

[0116] In an embodiment of the present application, the length of the Value field is determined based on the second part of the ControlByte field, and 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.

[0117] The above technical solution of the embodiment of the present application provides a new type of TLV structure (i.e., the first TLV structure). In an example, the following Table 4 gives the overall structure of the first TLV structure, wherein the length of the ControlByte field is 1 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 Value field is a variable length depending on the content.

[0118] ControlByte Tags Length Value 1byte 0-8 bytes 0-8 bytes Lengthening

[0119] Table 4

[0120] The client and the server can use the first TLV format in the above solution to encode and decode the content of the load (ie, the data carried in the signaling) in the mutually interacting signaling, thereby improving the encoding and decoding efficiency.

[0121] Figure 4 The structure of the data transmission device provided in the embodiment of the present application is shown in FIG. Figure 1 , applied to the first device, such as Figure 4 As shown, the data transmission device includes:

[0122] The sending unit 401 is configured to send a first signaling to a second device, wherein the data carried in the first signaling is encoded in a first TLV format; wherein:

[0123] The first TLV format is used to determine a first TLV structure, and the first TLV structure includes a control byte ControlByte field, a tag Tag field, and at least one of the following: a length Length field and a value Value field.

[0124] In an optional manner, the length of the ControlByte field is N1 bytes, and the value of N1 is a positive integer.

[0125] In an optional manner, the value of N1 is 1.

[0126] In an optional manner, the first part of the bits in the ControlByte field is used to indicate that the purpose of the data is one of the following: general use for device access, for device control, and general use for device control.

[0127] In an optional manner, the first part of the bits in the ControlByte field is also used to indicate the description of the Tag.

[0128] In an optional manner, the description of the tag is used to determine at least one of the following

[0129] The length of the Tag field;

[0130] The tag type described by the Tag field is iid tag, index tag, DeviceID tag, transaction ID tag, or siid tag.

[0131] In an optional manner, the first part of bits in the ControlByte field is the upper 3 bits in the ControlByte field.

[0132] In an optional manner, the second part of the bits in the ControlByte field is used to indicate the data type of the Value described by the Value field.

[0133] In an optional manner, the second part of the bits in the ControlByte field is also used to indicate at least one of the following: the length of the Length field, the length of the Value field.

[0134] In an optional manner, the second part of bits in the ControlByte field is also used to indicate: the end mark of the container data type.

[0135] In an optional manner, the second part of bits in the ControlByte field is the lower 5 bits in the ControlByte field.

[0136] In an optional manner, the length of the Tag field is N2 bytes, where N2 is a positive integer.

[0137] In an optional manner, the value of N2 is greater than or equal to 0 and less than or equal to 8.

[0138] In an optional manner, the Tag field occupies the first byte. If the value of the highest bit in the first byte is a 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 identifier.

[0139] In an optional manner, the Tag field occupies at least the first byte. If the value of the highest bit in the first byte is the second value, it means that the Tag field also occupies the second byte and the third byte after the first 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 highest bit in the first byte is the Tag length identifier.

[0140] In an optional manner, the Tag field occupies at least the first byte. If the value of the highest bit in the first byte is the second value, it means that the Tag field also occupies the second byte after the first byte, 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 is the Tag length identifier.

[0141] In an optional manner, the Tag field occupies at least the first byte. If the value of the highest bit in the first byte is the second value, it means that the Tag field also occupies the second byte after the first byte. If the value of the highest bit in 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, and the Mth byte is taken as the last byte occupied by the Tag field, M is a positive integer; the value of the Tag field is determined by the lower 7 bits of each byte from the first byte to the Mth byte.

[0142] In an optional manner, the length of the Tag field is determined based on the first part of the ControlByte field, and the first part of 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 length of the Tag field, and the tag type described by the Tag field is iid tag or index tag or DeviceID tag or transaction ID tag or siid tag.

[0143] In an optional manner, the length of the Length field is N3 bytes, where N3 is a positive integer.

[0144] In an optional manner, the value of N3 is greater than or equal to 0 and less than or equal to 8.

[0145] In an optional manner, the length of the Length field is determined based on the second part of the ControlByte field, and the second part of the ControlByte field is used to indicate the length of the Length field.

[0146] In an optional manner, the length of the Value field is N4 bytes, and the value of N4 is a positive integer.

[0147] In an optional manner, the length of the Value field is determined based on the second part of the ControlByte field.

[0148] 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.

[0149] In an optional manner, the Tag field is used to describe a tag 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.

[0150] Those skilled in the art should understand that the relevant description of the above-mentioned data transmission device in the embodiment of the present application can be understood by referring to the relevant description of the data transmission method in the embodiment of the present application.

[0151] Figure 5 The structure of the data transmission device provided in the embodiment of the present application is shown in FIG. Figure 2 , applied to the second device, such as Figure 5 As shown, the data transmission device includes:

[0152] The receiving unit 501 is configured to receive a first signaling sent by a first device, wherein the data carried in the first signaling is encoded in a first TLV format; wherein:

[0153] The first TLV format is used to determine a first TLV structure, and the first TLV structure includes a control byte ControlByte field, a tag Tag field, and at least one of the following: a length Length field and a value Value field.

[0154] In an optional manner, the length of the ControlByte field is N1 bytes, and the value of N1 is a positive integer.

[0155] In an optional manner, the value of N1 is 1.

[0156] In an optional manner, the first portion of bits in the ControlByte field is used to indicate that the purpose of the data is one of the following:

[0157] Universal for device access, device control, and universal for device control.

[0158] In an optional manner, the first part of the bits in the ControlByte field is also used to indicate the description of the Tag.

[0159] In an optional manner, the description of the tag is used to determine at least one of the following:

[0160] The length of the Tag field;

[0161] The tag type described by the Tag field is iid tag, index tag, DeviceID tag, transaction ID tag, or siid tag.

[0162] In an optional manner, the first part of bits in the ControlByte field is the upper 3 bits in the ControlByte field.

[0163] In an optional manner, the second part of the bits in the ControlByte field is used to indicate the data type of the Value described by the Value field.

[0164] In an optional manner, the second part of the bits in the ControlByte field is also used to indicate at least one of the following: the length of the Length field, the length of the Value field.

[0165] In an optional manner, the second part of bits in the ControlByte field is also used to indicate: the end mark of the container data type.

[0166] In an optional manner, the second part of bits in the ControlByte field is the lower 5 bits in the ControlByte field.

[0167] In an optional manner, the length of the Tag field is N2 bytes, where N2 is a positive integer.

[0168] In an optional manner, the value of N2 is greater than or equal to 0 and less than or equal to 8.

[0169] In an optional manner, the Tag field occupies the first byte. If the value of the highest bit in the first byte is a 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 identifier.

[0170] In an optional manner, the Tag field occupies at least the first byte. If the value of the highest bit in the first byte is the second value, it means that the Tag field also occupies the second byte and the third byte after the first 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 highest bit in the first byte is the Tag length identifier.

[0171] In an optional manner, the Tag field occupies at least the first byte. If the value of the highest bit in the first byte is the second value, it means that the Tag field also occupies the second byte after the first byte, 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 is the Tag length identifier.

[0172] In an optional manner, the Tag field occupies at least the first byte. If the value of the highest bit in the first byte is the second value, it means that the Tag field also occupies the second byte after the first byte. If the value of the highest bit in 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, and the Mth byte is taken as the last byte occupied by the Tag field, M is a positive integer; the value of the Tag field is determined by the lower 7 bits of each byte from the first byte to the Mth byte.

[0173] In an optional manner, the length of the Tag field is determined based on the first part of the ControlByte field, and the first part of 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 length of the Tag field, and the tag type described by the Tag field is iid tag or index tag or DeviceID tag or transaction ID tag or siid tag.

[0174] In an optional manner, the length of the Length field is N3 bytes, where N3 is a positive integer.

[0175] In an optional manner, the value of N3 is greater than or equal to 0 and less than or equal to 8.

[0176] In an optional manner, the length of the Length field is determined based on the second part of the ControlByte field, and the second part of the ControlByte field is used to indicate the length of the Length field.

[0177] In an optional manner, the length of the Value field is N4 bytes, and the value of N4 is a positive integer.

[0178] In an optional manner, the length of the Value field is determined based on the second part of the ControlByte field.

[0179] 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.

[0180] In an optional manner, the Tag field is used to describe a tag 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.

[0181] Those skilled in the art should understand that the relevant description of the above-mentioned data transmission device in the embodiment of the present application can be understood by referring to the relevant description of the data transmission method in the embodiment of the present application.

[0182] Figure 6 600 is a schematic structural diagram of a communication device 600 provided in 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. Figure 6The communication device 600 shown includes a processor 610, which can call and run a computer program from a memory to implement the method in the embodiment of the present application.

[0183] Alternatively, if Figure 6 As shown, 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 method in the embodiment of the present application.

[0184] The memory 620 may be a separate device independent of the processor 610 , or may be integrated into the processor 610 .

[0185] Alternatively, if Figure 6 As shown, 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 information or data sent by other devices.

[0186] The transceiver 630 may include a transmitter and a receiver. The transceiver 630 may further include an antenna, and the number of the antennas may be one or more.

[0187] Optionally, the communication device 600 may specifically be a network device of an embodiment of the present application, and the communication device 600 may implement the corresponding processes implemented by the network device in each method of the embodiment of the present application, which will not be described in detail here for the sake of brevity.

[0188] Optionally, the communication device 600 may specifically be a mobile terminal / terminal device of an embodiment 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 embodiment of the present application, which will not be described in detail here for the sake of brevity.

[0189] Figure 7 It is a schematic structural diagram of the chip of an embodiment of the present application. Figure 7 The chip 700 shown includes a processor 710, which can call and run a computer program from a memory to implement the method in the embodiment of the present application.

[0190] Alternatively, if Figure 7 As shown, 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 method in the embodiment of the present application.

[0191] The memory 720 may be a separate device independent of the processor 710 , or may be integrated into the processor 710 .

[0192] Optionally, 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 obtain information or data sent by other devices or chips.

[0193] Optionally, the chip 700 may further include an output interface 740. The processor 710 may control the output interface 740 to communicate with other devices or chips, and specifically, may output information or data to other devices or chips.

[0194] Optionally, the chip can be applied to the network device in the embodiments of the present application, and the chip can implement the corresponding processes implemented by the network device in each method of the embodiments of the present application. For the sake of brevity, they will not be repeated here.

[0195] Optionally, 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 the various methods of the embodiments of the present application. For the sake of brevity, they will not be repeated here.

[0196] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.

[0197] It should be understood that the processor of the embodiment of the present application may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method embodiment can be completed by the hardware integrated logic circuit or software instructions in the processor. The above processor can be a general processor, a digital signal processor (Digital Signal Processor, DSP), an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware decoding processor to perform, or the hardware and software modules in the decoding processor are combined and performed. The software module can be located in a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, and other mature storage media 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.

[0198] It can be understood that the memory in the embodiments of the present application can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct RAM bus random access memory (DR RAM). It should be noted that the memory of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0199] It should be understood that the above-mentioned memory is exemplary but not restrictive. For example, the memory in the embodiments of the present application may also be static random access memory (static RAM, SRAM), 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 link dynamic random access memory (synch link DRAM, SLDRAM) and direct memory bus random access memory (Direct Rambus RAM, DR RAM), etc. That is to say, 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.

[0200] An embodiment of the present application also provides a computer-readable storage medium for storing a computer program.

[0201] Optionally, 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 the various methods of the embodiments of the present application. For the sake of brevity, they are not repeated here.

[0202] Optionally, 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 the various methods of the embodiments of the present application. For the sake of brevity, they are not repeated here.

[0203] An embodiment of the present application also provides a computer program product, including computer program instructions.

[0204] Optionally, the computer program product can be applied to the network device in the embodiments of the present application, and the computer program instructions enable the computer to execute the corresponding processes implemented by the network device in the various methods of the embodiments of the present application. For the sake of brevity, they are not repeated here.

[0205] Optionally, 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 enable the computer to execute the corresponding processes implemented by the mobile terminal / terminal device in the various methods of the embodiments of the present application. For the sake of brevity, they are not repeated here.

[0206] The embodiment of the present application also provides a computer program.

[0207] Optionally, the computer program can be applied to the network device in the embodiments of the present application. When the computer program runs on a computer, the computer executes the corresponding processes implemented by the network device in the various methods in the embodiments of the present application. For the sake of brevity, they are not described here.

[0208] Optionally, the computer program can be applied to the mobile terminal / terminal device in the embodiments of the present application. When the computer program runs on the computer, the computer executes the corresponding processes implemented by the mobile terminal / terminal device in the various methods of the embodiments of the present application. For the sake of brevity, they are not repeated here.

[0209] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0210] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0211] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0212] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0213] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0214] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0215] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A data transmission method, the method comprising: The first device sends a first signaling to the second device, and 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, and the first TLV structure includes a control byte ControlByte field, a tag Tag field, and at least one of the following: a length Length field and a value Value field; If the first device is a client and the second device is a server, the first signaling is a request message to modify the service status; the second device is used to receive the first signaling sent by the first device, decode the first signaling according to the first TLV format, obtain the data carried in the first signaling, and perform attribute change operations on the data.

2. The method according to claim 1, wherein: The length of the ControlByte field is N1 bytes, and the value of N1 is a positive integer.

3. The method according to claim 2, wherein: The value of N1 is 1.

4. The method according to claim 3, wherein: The first part of the bits in the ControlByte field is used to indicate that the purpose of the data is one of the following: general purpose for device access, general purpose for device control, and general purpose for device control.

5. The method according to claim 4, wherein: The first part of bits in the ControlByte field is also used to indicate the description of the Tag.

6. The method according to claim 5, wherein: 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 by the Tag field is an attribute identification tag iid tag, an index tag, a device identification tag DeviceID tag, a transaction identification tag ID tag, or a service identification tag siid tag.

7. The method according to any one of claims 4 to 6, wherein: The first part of bits in the ControlByte field are the upper 3 bits in the ControlByte field.

8. The method according to any one of claims 3 to 6, wherein: The second part of the bits in the ControlByte field is used to indicate the data type of the Value described by the Value field.

9. The method according to claim 8, wherein: 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.

10. The method according to claim 8, wherein: The second part of bits in the ControlByte field is also used to indicate: the end mark of the container data type.

11. The method according to claim 9 or 10, wherein: The second part of bits in the ControlByte field is the lower 5 bits in the ControlByte field.

12. The method according to any one of claims 1 to 6, wherein: The length of the Tag field is N2 bytes, where N2 is a positive integer.

13. The method according to claim 12, wherein: The value of N2 is greater than or equal to 0 and less than or equal to 8.

14. The method according to claim 12, wherein: The Tag field occupies the first byte. 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 identifier.

15. The method according to claim 12, wherein: The Tag field occupies at least the first byte. If the value of the highest bit in the first byte is the second value, it means that the Tag field also occupies the second byte and the third byte after the first byte, and the value of the Tag field is determined by all the bits in the second byte and all the bits in the third byte; wherein the highest bit in the first byte is the Tag length identifier.

16. The method according to claim 12, wherein: The Tag field occupies at least the first byte. If the value of the highest bit in the first byte is the second value, it means that the Tag field also occupies the second byte after the first byte, 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 is the Tag length identifier.

17. The method according to claim 12, wherein: The Tag field occupies at least the first byte. If the value of the highest bit in the first byte is the second value, it means that the Tag field also occupies the second byte after the first byte. If the value of the highest bit in 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, and the Mth byte is taken as the last byte occupied by the Tag field, M is a positive integer; the value of the Tag field is determined by the lower 7 bits of each byte from the first byte to the Mth byte.

18. The method according to claim 12, wherein: The length of the Tag field is determined based on the first part of the ControlByte field, and the first part of 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 length of the Tag field, and the tag type described by the Tag field is the attribute identification tag iidtag or the index tag index tag or the device identification tag DeviceID tag or the transaction identification tag ID tag or the service identification tag siid tag.

19. The method according to any one of claims 1 to 6, wherein: The length of the Length field is N3 bytes, where N3 is a positive integer.

20. The method according to claim 19, wherein: The value of N3 is greater than or equal to 0 and less than or equal to 8.

21. The method according to claim 19, wherein: The length of the Length field is determined based on the second part of the ControlByte field, and the second part of the ControlByte field is used to indicate the length of the Length field.

22. The method according to any one of claims 1 to 6, wherein: The length of the Value field is N4 bytes, and the value of N4 is a positive integer.

23. The method according to claim 22, wherein: The length of the Value field is determined based on the second part of 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.

24. The method according to any one of claims 1 to 6, wherein: 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, and the Value field is used to describe the Value of the data.

25. A data transmission method, the method comprising: The second device receives the first signaling sent by the first 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, and the first TLV structure includes a control byte ControlByte field, a tag Tag field, and at least one of the following: a length Length field and a value Value field; If the second device is a server and the first device is a client, the first signaling is a service status modification request message; After receiving the first signaling sent by the first device, the second device decodes the first signaling according to the first TLV format, obtains the data carried in the first signaling, and performs an attribute change operation on the data.

26. The method according to claim 25, wherein: The length of the ControlByte field is N1 bytes, and the value of N1 is a positive integer.

27. The method according to claim 26, wherein: The value of N1 is 1.

28. The method according to claim 27, wherein: The first part of the bits in the ControlByte field is used to indicate that the purpose of the data is one of the following: general purpose for device access, general purpose for device control, and general purpose for device control.

29. The method according to claim 28, wherein: The first part of bits in the ControlByte field is also used to indicate the description of the Tag.

30. The method of claim 29, wherein: 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 by the Tag field is an attribute identification tag iid tag, an index tag, a device identification tag DeviceID tag, a transaction identification tag ID tag, or a service identification tag siid tag.

31. The method according to any one of claims 28 to 30, wherein: The first part of bits in the ControlByte field are the upper 3 bits in the ControlByte field.

32. The method according to any one of claims 27 to 30, wherein: The second part of the bits in the ControlByte field is used to indicate the data type of the Value described by the Value field.

33. The method according to claim 32, wherein: 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.

34. The method of claim 32, wherein: The second part of bits in the ControlByte field is also used to indicate: the end mark of the container data type.

35. The method according to claim 33 or 34, wherein: The second part of bits in the ControlByte field is the lower 5 bits in the ControlByte field.

36. The method according to any one of claims 25 to 30, wherein: The length of the Tag field is N2 bytes, where N2 is a positive integer.

37. The method of claim 36, wherein: The value of N2 is greater than or equal to 0 and less than or equal to 8.

38. The method of claim 36, wherein: The Tag field occupies the first byte. 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 identifier.

39. The method of claim 36, wherein: The Tag field occupies at least the first byte. If the value of the highest bit in the first byte is the second value, it means that the Tag field also occupies the second byte and the third byte after the first byte, and the value of the Tag field is determined by all the bits in the second byte and all the bits in the third byte; wherein the highest bit in the first byte is the Tag length identifier.

40. The method of claim 36, wherein: The Tag field occupies at least the first byte. If the value of the highest bit in the first byte is the second value, it means that the Tag field also occupies the second byte after the first byte, 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 is the Tag length identifier.

41. The method of claim 36, wherein: The Tag field occupies at least the first byte. If the value of the highest bit in the first byte is the second value, it means that the Tag field also occupies the second byte after the first byte. If the value of the highest bit in 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, and the Mth byte is taken as the last byte occupied by the Tag field, M is a positive integer; the value of the Tag field is determined by the lower 7 bits of each byte from the first byte to the Mth byte.

42. The method of claim 36, wherein: The length of the Tag field is determined based on the first part of the ControlByte field, and the first part of 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 length of the Tag field, and the tag type described by the Tag field is the attribute identification tag iidtag or the index tag index tag or the device identification tag DeviceID tag or the transaction identification tag ID tag or the service identification tag siid tag.

43. The method according to any one of claims 25 to 30, wherein: The length of the Length field is N3 bytes, where N3 is a positive integer.

44. The method of claim 43, wherein: The value of N3 is greater than or equal to 0 and less than or equal to 8.

45. The method of claim 43, wherein: The length of the Length field is determined based on the second part of the ControlByte field, and the second part of the ControlByte field is used to indicate the length of the Length field.

46. ​​The method according to any one of claims 25 to 30, wherein: The length of the Value field is N4 bytes, and the value of N4 is a positive integer.

47. The method of claim 46, wherein: The length of the Value field is determined based on the second part of 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.

48. The method according to any one of claims 25 to 30, wherein: 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, and the Value field is used to describe the Value of the data.

49. A data transmission device, applied to a first device, the first device being a client, the device comprising: A sending unit, configured to send a first signaling to a second device, wherein data carried in the first signaling is encoded in a first TLV format; The second device is a server; the second device is used to receive the first signaling sent by the first device, decode the first signaling according to the first TLV format, obtain the data carried in the first signaling, and perform an attribute change operation on the data; the first signaling is a service status modification request message; wherein, The first TLV format is used to determine a first TLV structure, and the first TLV structure includes a control byte ControlByte field, a tag Tag field, and at least one of the following: a length Length field and a value Value field.

50. The apparatus of claim 49, wherein: The length of the ControlByte field is N1 bytes, and the value of N1 is a positive integer.

51. The apparatus of claim 50, wherein: The value of N1 is 1.

52. The apparatus of claim 51, wherein: The first part of the bits in the ControlByte field is used to indicate that the purpose of the data is one of the following: general purpose for device access, general purpose for device control, and general purpose for device control.

53. The apparatus of claim 52, wherein: The first part of bits in the ControlByte field is also used to indicate the description of the Tag.

54. The apparatus of claim 53, wherein: 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 by the Tag field is an attribute identification tag iid tag, an index tag, a device identification tag DeviceID tag, a transaction identification tag ID tag, or a service identification tag siid tag.

55. The device according to any one of claims 52 to 54, wherein: The first part of bits in the ControlByte field are the upper 3 bits in the ControlByte field.

56. The device according to any one of claims 51 to 54, wherein: The second part of the bits in the ControlByte field is used to indicate the data type of the Value described by the Value field.

57. The apparatus of claim 56, wherein: 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.

58. The apparatus of claim 56, wherein: The second part of bits in the ControlByte field is also used to indicate: the end mark of the container data type.

59. The device according to claim 57 or 58, wherein The second part of bits in the ControlByte field is the lower 5 bits in the ControlByte field.

60. The device according to any one of claims 49 to 54, wherein: The length of the Tag field is N2 bytes, where N2 is a positive integer.

61. The apparatus of claim 60, wherein: The value of N2 is greater than or equal to 0 and less than or equal to 8.

62. The apparatus of claim 60, wherein: The Tag field occupies the first byte. 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 identifier.

63. The apparatus of claim 60, wherein: The Tag field occupies at least the first byte. If the value of the highest bit in the first byte is the second value, it means that the Tag field also occupies the second byte and the third byte after the first byte, and the value of the Tag field is determined by all the bits in the second byte and all the bits in the third byte; wherein the highest bit in the first byte is the Tag length identifier.

64. The apparatus of claim 60, wherein: The Tag field occupies at least the first byte. If the value of the highest bit in the first byte is the second value, it means that the Tag field also occupies the second byte after the first byte, 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 is the Tag length identifier.

65. The apparatus of claim 60, wherein: The Tag field occupies at least the first byte. If the value of the highest bit in the first byte is the second value, it means that the Tag field also occupies the second byte after the first byte. If the value of the highest bit in 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, and the Mth byte is taken as the last byte occupied by the Tag field, M is a positive integer; the value of the Tag field is determined by the lower 7 bits of each byte from the first byte to the Mth byte.

66. The apparatus of claim 60, wherein: The length of the Tag field is determined based on the first part of the ControlByte field, and the first part of 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 length of the Tag field, and the tag type described by the Tag field is the attribute identification tag iidtag or the index tag index tag or the device identification tag DeviceID tag or the transaction identification tag ID tag or the service identification tag siid tag.

67. The device according to any one of claims 49 to 54, wherein: The length of the Length field is N3 bytes, where N3 is a positive integer.

68. The apparatus of claim 67, wherein: The value of N3 is greater than or equal to 0 and less than or equal to 8.

69. The apparatus of claim 67, wherein: The length of the Length field is determined based on the second part of the ControlByte field, and the second part of the ControlByte field is used to indicate the length of the Length field.

70. The device according to any one of claims 49 to 54, wherein: The length of the Value field is N4 bytes, and the value of N4 is a positive integer.

71. The device according to claim 70, wherein The length of the Value field is determined based on the second part of 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.

72. The device according to any one of claims 49 to 54, wherein: 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, and the Value field is used to describe the Value of the data.

73. A data transmission device, applied to a second device, the second device being a server, the device comprising: A receiving unit, configured to receive a first signaling sent by a first device, wherein data carried in the first signaling is encoded in a first TLV format; The first device is a client; wherein, The first TLV format is used to determine a first TLV structure, and the first TLV structure includes a control byte ControlByte field, a tag Tag field, and at least one of the following: a length Length field and a value Value field; The receiving unit is specifically used to receive the first signaling sent by the first receiving device, decode the first signaling according to the first TLV format, obtain the data carried in the first signaling, and perform an attribute change operation on the data; the first signaling is a service status modification request message.

74. The apparatus of claim 73, wherein: The length of the ControlByte field is N1 bytes, and the value of N1 is a positive integer.

75. The apparatus of claim 74, wherein: The value of N1 is 1.

76. The apparatus of claim 75, wherein: The first part of the bits in the ControlByte field is used to indicate that the purpose of the data is one of the following: general purpose for device access, general purpose for device control, and general purpose for device control.

77. The apparatus of claim 76, wherein: The first part of bits in the ControlByte field is also used to indicate the description of the Tag.

78. The apparatus of claim 77, wherein: 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 by the Tag field is an attribute identification tag iid tag, an index tag, a device identification tag DeviceID tag, a transaction identification tag ID tag, or a service identification tag siid tag.

79. The device according to any one of claims 76 to 78, wherein The first part of bits in the ControlByte field are the upper 3 bits in the ControlByte field.

80. The device according to any one of claims 75 to 78, wherein The second part of the bits in the ControlByte field is used to indicate the data type of the Value described by the Value field.

81. The apparatus of claim 80, wherein: 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.

82. The apparatus of claim 80, wherein: The second part of bits in the ControlByte field is also used to indicate: the end mark of the container data type.

83. The device according to claim 81 or 82, wherein: The second part of bits in the ControlByte field is the lower 5 bits in the ControlByte field.

84. The device according to any one of claims 73 to 78, wherein The length of the Tag field is N2 bytes, where N2 is a positive integer.

85. The apparatus of claim 84, wherein: The value of N2 is greater than or equal to 0 and less than or equal to 8.

86. The apparatus of claim 84, wherein: The Tag field occupies the first byte. 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 identifier.

87. The apparatus of claim 84, wherein: The Tag field occupies at least the first byte. If the value of the highest bit in the first byte is the second value, it means that the Tag field also occupies the second byte and the third byte after the first byte, and the value of the Tag field is determined by all the bits in the second byte and all the bits in the third byte; wherein the highest bit in the first byte is the Tag length identifier.

88. The apparatus of claim 84, wherein: The Tag field occupies at least the first byte. If the value of the highest bit in the first byte is the second value, it means that the Tag field also occupies the second byte after the first byte, 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 is the Tag length identifier.

89. The apparatus of claim 84, wherein: The Tag field occupies at least the first byte. If the value of the highest bit in the first byte is the second value, it means that the Tag field also occupies the second byte after the first byte. If the value of the highest bit in 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, and the Mth byte is taken as the last byte occupied by the Tag field, M is a positive integer; the value of the Tag field is determined by the lower 7 bits of each byte from the first byte to the Mth byte.

90. The apparatus of claim 84, wherein: The length of the Tag field is determined based on the first part of the ControlByte field, and the first part of 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 length of the Tag field, and the tag type described by the Tag field is the attribute identification tag iidtag or the index tag index tag or the device identification tag DeviceID tag or the transaction identification tag ID tag or the service identification tag siid tag.

91. The device according to any one of claims 73 to 78, wherein: The length of the Length field is N3 bytes, where N3 is a positive integer.

92. The apparatus of claim 91, wherein: The value of N3 is greater than or equal to 0 and less than or equal to 8.

93. The apparatus of claim 91, wherein: The length of the Length field is determined based on the second part of the ControlByte field, and the second part of the ControlByte field is used to indicate the length of the Length field.

94. The device according to any one of claims 73 to 78, wherein: The length of the Value field is N4 bytes, and the value of N4 is a positive integer.

95. The apparatus of claim 94, wherein: The length of the Value field is determined based on the second part of 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.

96. The device according to any one of claims 73 to 78, wherein: 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, and the Value field is used to describe the Value of the data.

97. A communication device comprising: A processor and a memory, the memory being used to store a computer program, the processor being used to call and run the computer program stored in the memory to execute the method as claimed in any one of claims 1 to 24, or the method as claimed in any one of claims 25 to 48.

98. A chip, comprising: A processor, configured to call and run a computer program from a memory, so that a device equipped with the chip executes a method as claimed in any one of claims 1 to 24, or a method as claimed in any one of claims 25 to 48.

99. A computer-readable storage medium for storing a computer program, wherein the computer program causes a computer to execute the method of any one of claims 1 to 24, or the method of any one of claims 25 to 48.