CN112491857B - Method, device and equipment for transmitting set type data - Google Patents

Method, device and equipment for transmitting set type data Download PDF

Info

Publication number
CN112491857B
CN112491857B CN202011309773.XA CN202011309773A CN112491857B CN 112491857 B CN112491857 B CN 112491857B CN 202011309773 A CN202011309773 A CN 202011309773A CN 112491857 B CN112491857 B CN 112491857B
Authority
CN
China
Prior art keywords
data
key
value
elements
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.)
Active
Application number
CN202011309773.XA
Other languages
Chinese (zh)
Other versions
CN112491857A (en
Inventor
杨朝琦
黎鑫
杜胜
冯玉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Kingbase Information Technologies Co Ltd
Original Assignee
Beijing Kingbase Information Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Kingbase Information Technologies Co Ltd filed Critical Beijing Kingbase Information Technologies Co Ltd
Priority to CN202011309773.XA priority Critical patent/CN112491857B/en
Publication of CN112491857A publication Critical patent/CN112491857A/en
Application granted granted Critical
Publication of CN112491857B publication Critical patent/CN112491857B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/06Notations for structuring of protocol data, e.g. abstract syntax notation one [ASN.1]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor

Abstract

The disclosure provides a transmission method, device and equipment for collection type data. The method comprises the following steps: obtaining original data stored in a first data structure, wherein the original data comprises N elements, the N elements correspond to N first key value pairs, and each first key value pair comprises: the value of the first key and the value of the first data generate N second key value pairs corresponding to the N first key value pairs, each second key value pair including: the length of the first key, the value of the first key, the length of the first data, and the value of the first data are stored in a second data structure, the transmission data comprising two parts, one part being a first set of attributes, the first set of attributes comprising: the first set identifier is used for indicating the nesting level of the value of the first data, and the transmission data stored in the second data structure is sent to the second device, so that the transmission of the data of the set type is completed.

Description

Method, device and equipment for transmitting set type data
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method, an apparatus, and a device for transmitting aggregate type data.
Background
With the rapid development of computer technology, the application of databases is more and more complex and diverse. Being able to meet the needs of different scenarios is a very important indicator of the overall functionality of the database. The database needs to send data to clients connected to the database server or other nodes in other clustered databases under different scenarios.
For some data with simple data structure, the existing database can be sent.
However, in some scenarios, complex data types, e.g., aggregate type data, need to be transmitted, and existing transmission methods cannot transmit aggregate type data.
Disclosure of Invention
In order to solve the technical problems described above or at least partially solve the technical problems described above, the present disclosure provides a method, an apparatus, and a device for transmitting aggregate type data.
In a first aspect, the present disclosure provides a method for transmitting set type data, including:
obtaining original data stored in a first data structure, wherein the original data comprises N elements, the N elements correspond to N first key value pairs, and each first key value pair comprises: a value of a key and a value of data, wherein N is an integer greater than or equal to 1;
Generating N second key value pairs corresponding to the N first key value pairs, wherein each second key value pair includes: a first key attribute and a first data attribute, the first key attribute comprising: a length of a first key and a value of the first key, the first data attribute comprising: a length of the first data and a value of the first data;
storing transmission data in a second data structure, the transmission data comprising two parts, wherein one part is a first set of attributes, the first set of attributes comprising: a first set identifier and the number of elements of the original data, and the other part is the N second key value pairs which are sequentially stored, wherein the first set identifier is used for indicating the nesting level of the value of the first data;
and sending the transmission data stored in the second data structure to a second device.
Optionally, the elements are sets, the elements include M sub-elements, and M is an integer greater than or equal to 1;
the method further comprises the steps of:
generating M sub-elements corresponding to M third key-value pairs, wherein each third key-value pair comprises: a second key attribute and a second data attribute, the second key attribute comprising: a length of a second key and a value of the second key, the second data attribute comprising: a length of the second data and a value of the second data;
Accordingly, the value of the first data includes: a second set of attributes and M third key-value pairs stored in sequence, wherein the second set of attributes comprises: a second set identification and a number of sub-elements of the element, the second set identification indicating a nesting level of values of the second data.
Optionally, the original data is a set, and the set includes an associated array, a nested table and a variable array; the first set identifier is further used for indicating a set type of the original data.
In a second aspect, the present disclosure provides a method for transmitting set type data, including:
receiving transmission data stored in a second data structure and sent by first equipment;
acquiring a first set of attributes according to the transmission data stored in the second data structure, wherein the first set of attributes comprises: the first set identifier and the number N of elements contained in the original data corresponding to the transmission data;
determining the set type and the nesting level of the original data according to the first set identifier;
continuously and sequentially acquiring N second key value pairs corresponding to N elements according to the transmission data stored in the second data structure;
Acquiring the length of a first key of each of the N second key value pairs; acquiring a value of the first key according to the length of the first key; continuously acquiring the length of the first data; acquiring a value of the first data according to the length of the first data; obtaining a value of a key in a first key value pair according to a value of a first key, and obtaining a value of data in the first key value pair according to a value of the first data, wherein the first key value pair comprises the value of the key and the value of the data; obtaining corresponding elements according to the first key value pairs;
the method comprises the steps of storing original data in a first data structure, wherein the original data comprises N elements.
Optionally, the nesting level of the transmission data indicates that the element of the original data corresponding to the transmission data is a set;
the obtaining the value of the data in the first key value pair according to the value of the first data comprises the following steps:
acquiring a second set of attributes according to the value of the first data, wherein the second set of attributes comprises: a second set identification and a number M of sub-elements contained in the element;
determining the set type and the nesting level of the elements according to the second set identifier;
Continuously and sequentially acquiring M third key value pairs corresponding to M subelements according to the value of the first data;
obtaining, for each of the M third key value pairs, a length of a second key of the third key value pair; acquiring a value of the second key according to the length of the second key; continuously acquiring the length of the second data; acquiring a value of the second data according to the length of the second data; obtaining a key value of a sub-element according to a second key value, obtaining a data value of the sub-element according to the second data value, and obtaining the sub-element according to the key value of the sub-element and the data value of the sub-element;
the value of the data in the first key-value pair is the element stored in the first data structure, and the element comprises M sub-elements.
Optionally, the nesting level of the transmission data indicates that the element of the original data corresponding to the transmission data is a set. And S805, obtaining the value of the data in the first key value pair according to the value of the first data, wherein the method comprises the following steps:
acquiring a second set of attributes according to the value of the first data, wherein the second set of attributes comprises: a second set identification and a number M of sub-elements contained in the element;
Determining the set type and the nesting level of the elements according to the second set identifier;
and continuously and sequentially acquiring M third key value pairs corresponding to the M subelements respectively according to the value of the first data.
Obtaining, for each of the M third key value pairs, a length of a second key of the third key value pair; acquiring a value of the second key according to the length of the second key; continuously acquiring the length of the second data; acquiring a value of the second data according to the length of the second data; and obtaining the key value of the sub-element according to the second key value, obtaining the data value of the sub-element according to the second data value, and obtaining the sub-element according to the key value of the sub-element and the data value of the sub-element.
The value of the data in the first key-value pair is the element stored in the first data structure, and the element comprises M sub-elements.
Optionally, the original data is a set, and the set includes an associated array, a nested table and a variable array; the first set identifier is further used for indicating a set type of the original data.
In a third aspect, a transmission apparatus for aggregate type data includes:
The device comprises an acquisition module, a storage module and a storage module, wherein the acquisition module is used for acquiring original data stored in a first data structure, the original data comprises N elements, the N elements correspond to N first key value pairs, and each first key value pair comprises: a value of a key and a value of data, wherein N is an integer greater than or equal to 1;
the generating module is configured to generate N second key value pairs corresponding to the N first key value pairs, where each second key value pair includes: a first key attribute and a first data attribute, the first key attribute comprising: a length of a first key and a value of the first key, the first data attribute comprising: a length of the first data and a value of the first data;
the storage module is used for storing transmission data in a second data structure, the transmission data comprises two parts, wherein one part is a first set attribute, and the first set attribute comprises: a first set identifier and the number of elements of the original data, and the other part is the N second key value pairs which are sequentially stored, wherein the first set identifier is used for indicating the nesting level of the value of the first data;
and the sending module is used for sending the transmission data stored in the second data structure to the second equipment.
Optionally, the elements are sets, the elements include M sub-elements, and M is an integer greater than or equal to 1;
the generating module 12 is further configured to: generating M sub-elements corresponding to M third key-value pairs, wherein each third key-value pair comprises: a second key attribute and a second data attribute, the second key attribute comprising: a length of a second key and a value of the second key, the second data attribute comprising: a length of the second data and a value of the second data;
accordingly, the value of the first data includes: a second set of attributes and M third key-value pairs stored in sequence, wherein the second set of attributes comprises: a second set identification and a number of sub-elements of the element, the second set identification indicating a nesting level of values of the second data.
Optionally, the original data is a set, and the set includes an associated array, a nested table and a variable array; the first set identifier is further used for indicating a set type of the original data.
Optionally, the original data is a set, and the set includes an associated array, a nested table and a variable array; the first set identifier is further used for indicating a set type of the original data.
In a fourth aspect, the present disclosure provides a transmission apparatus for aggregate type data, including:
the receiving module is used for receiving transmission data stored in a second data structure and sent by the first equipment;
the acquisition module is configured to acquire a first set of attributes according to the transmission data stored in the second data structure, where the first set of attributes includes: the first set identifier and the number N of elements contained in the original data corresponding to the transmission data;
the determining module is used for determining the set type and the nesting level of the original data according to the first set identifier;
the acquisition module is also used for: continuously and sequentially acquiring N second key value pairs corresponding to N elements according to the transmission data stored in the second data structure;
the obtaining module is used for obtaining the length of the first key of each second key value pair of the N second key value pairs; acquiring a value of the first key according to the length of the first key; continuously acquiring the length of the first data; acquiring a value of the first data according to the length of the first data; obtaining a value of a key in a first key value pair according to a value of a first key, and obtaining a value of data in the first key value pair according to a value of the first data, wherein the first key value pair comprises the value of the key and the value of the data; obtaining corresponding elements according to the first key value pairs;
And the storage module is used for storing original data in a first data structure, wherein the original data comprises N elements.
Optionally, the nesting level of the transmission data indicates that the element of the original data corresponding to the transmission data is a set;
the obtaining the value of the data in the first key value pair according to the value of the first data comprises the following steps:
acquiring a second set of attributes according to the value of the first data, wherein the second set of attributes comprises: a second set identification and a number M of sub-elements contained in the element;
determining the set type and the nesting level of the elements according to the second set identifier;
continuously and sequentially acquiring M third key value pairs corresponding to M subelements according to the value of the first data;
obtaining, for each of the M third key value pairs, a length of a second key of the third key value pair; acquiring a value of the second key according to the length of the second key; continuously acquiring the length of the second data; acquiring a value of the second data according to the length of the second data; obtaining a key value of a sub-element according to a second key value, obtaining a data value of the sub-element according to the second data value, and obtaining the sub-element according to the key value of the sub-element and the data value of the sub-element;
The value of the data in the first key-value pair is the element stored in the first data structure, and the element comprises M sub-elements.
Optionally, the original data is a set, and the set includes an associated array, a nested table and a variable array; the first set identifier is further used for indicating a set type of the original data.
In a fifth aspect, the present disclosure provides a transmission apparatus for aggregate type data, including:
a memory for storing processor-executable instructions;
a processor for implementing the method as described in the first aspect above when the computer program is executed.
In a sixth aspect, the present disclosure provides a transmission apparatus for aggregate type data, including:
a memory for storing processor-executable instructions;
a processor for implementing the method according to the second aspect as described above when the computer program is executed.
In a seventh aspect, the present disclosure provides a computer-readable storage medium, where computer-executable instructions are stored, where the computer-executable instructions are executed by a processor to implement a method for transmitting set-type data according to the first aspect.
In an eighth aspect, the present disclosure provides a computer readable storage medium, where computer executable instructions are stored, where the computer executable instructions are executed by a processor to implement a method for transmitting set type data according to the second aspect.
Compared with the prior art, the technical scheme provided by the embodiment of the disclosure has the following advantages:
by acquiring the original data stored in the first data structure, wherein the original data comprises N elements, the N elements correspond to N first key value pairs, and each first key value pair comprises: the method comprises the steps that the value of a first key and the value of first data are N, wherein N is an integer greater than or equal to 1, original data are collected, the first data structure is unfavorable for transmission, the original data need to be converted into a second data structure capable of being transmitted, N second key value pairs corresponding to N first key value pairs are generated, and each second key value pair comprises: a first key attribute and a first data attribute, the first key attribute comprising: the length of the first key and the value of the first key, the first data attribute comprising: the length of the first data and the value of the first data, and storing transmission data in a second data structure, wherein the transmission data comprises two parts, one part is a first set attribute, and the first set attribute comprises: the first set identifier is used for indicating a nesting level of a value of the first data, so that the original data of a complex set type is converted into transmission data of a second data structure capable of being transmitted, and then the transmission data stored in the second data structure is sent to the second device, so that the transmission of the data of the set type is completed.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description, serve to explain the principles of the disclosure.
In order to more clearly illustrate the embodiments of the present disclosure or the solutions in the prior art, the drawings that are required for the description of the embodiments or the prior art will be briefly described below, and it will be obvious to those skilled in the art that other drawings can be obtained from these drawings without inventive effort.
FIG. 1 is a schematic diagram of a database system architecture provided in the present disclosure;
fig. 2 is a flow chart of a method for transmitting set type data according to an embodiment of the disclosure;
FIG. 3 is a schematic diagram of the structure of the original data provided in the present disclosure;
FIG. 4A is a schematic diagram of a second key pair provided in the present disclosure;
FIG. 4B is a schematic diagram of a second data structure provided by the present disclosure;
FIG. 5 is a schematic diagram of another original data structure provided in the present disclosure;
fig. 6 is a flowchart of another method for transmitting set type data according to an embodiment of the present disclosure;
FIG. 7 is a schematic diagram of another second data structure provided by the present disclosure;
fig. 8 is a flowchart of another method for transmitting set type data according to an embodiment of the present disclosure;
fig. 9 is an interaction schematic diagram of a transmission method of collection type data according to an embodiment of the disclosure;
fig. 10 is a schematic structural diagram of a transmission device for aggregate type data according to an embodiment of the present disclosure;
fig. 11 is a schematic structural diagram of another transmission device for aggregate type data according to an embodiment of the present disclosure;
fig. 12 is a schematic structural diagram of a transmission device for aggregation type data according to an embodiment of the present disclosure;
fig. 13 is a schematic structural diagram of another transmission device for aggregation type data according to an embodiment of the present disclosure.
Detailed Description
In order that the above objects, features and advantages of the present disclosure may be more clearly understood, a further description of aspects of the present disclosure will be provided below. It should be noted that, without conflict, the embodiments of the present disclosure and features in the embodiments may be combined with each other.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present disclosure, but the present disclosure may be practiced otherwise than as described herein; it will be apparent that the embodiments in the specification are only some, but not all, embodiments of the disclosure.
First, the terms involved in the present invention will be explained:
a collection refers to a data structure that contains one or more internal components (also called elements), where the data structure of each element is a Key-Value pair (Key-Value) that includes a Key Value (Key) and a data Value (Value), where each Key is a unique index that identifies the Value of the unique data through which the corresponding data can be accessed. The data type of the value of the data may be a normal type or a collective type, wherein the normal type may be an integer type, or a character type or other user-defined type.
The set type data includes an association array, a nested table, and a variable array.
An associative array (also called an index table) refers to a set of elements whose data structure is key-value pairs, where the data type of a key may be an integer type or a character type.
A nested table refers to a set of elements of varying numbers and no particular order between the elements, where the data type of the key is a numeric type, the value of the key is an ordered sequence (which may be discontinuous) starting at 1, and there is no fixed upper bound.
A variable array refers to a set of data containing the same element type, where the number of elements may be 0, and if the number of elements is greater than 0, the key is a continuous sequence starting from 1.
Fig. 1 is a schematic architecture diagram of a database system provided in the present disclosure, and a specific application scenario of the present disclosure is described below with reference to the system architecture shown in fig. 1. As shown in fig. 1, the database system includes: the first device 101 is connected to the second device 102, where the first device 101 is a server of a database, and the database may include one server or multiple servers, and the second device 102 may be other servers in the database, servers of other databases, or clients, which is not limited in this disclosure.
Alternatively, the first device 101 and the second device 102 may be connected with an open database connection (Open Database Connectivity, ODBC) interface, a Java database connection (Java Database Connectivity, JDBC) interface, or the like.
In the database system, the first device 101 needs to send data in the database to the second device 102, which involves transmission of the data in the database, where the transmission of the data in the database needs to convert the data in the database into a serialized structure capable of being transmitted, for some data with a simple data structure, the existing database can transmit, however, in some scenarios, the data with a complex data structure needs to be transmitted, for example, the data with an aggregation type, and the existing transmission method cannot transmit the data with an aggregation type.
Aiming at the technical problems, the present disclosure provides a method, an apparatus and a device for transmitting aggregate data, where a first device sequences the aggregate data to obtain data with a data structure that can be transmitted, so as to accurately send the aggregate data to a second device, thereby realizing the transmission of the aggregate data.
Correspondingly, after receiving the data of the data structure which can be transmitted, the second device analyzes the data to obtain the data of the accurate aggregate data type.
The following describes the technical solutions of the present disclosure and how the technical solutions of the present disclosure solve the above technical problems with specific embodiments.
Fig. 2 is a flow chart of a method for transmitting set type data according to an embodiment of the present disclosure, as shown in fig. 2, where the method of the present embodiment is executed by the first device shown in fig. 1, and the method of the present embodiment is as follows:
s201, acquiring original data stored in a first data structure.
The original data comprises N elements, the N elements correspond to N first key value pairs, and each first key value pair comprises: the key value and the data value, and N is an integer greater than or equal to 1.
The first data structure is a collection type data structure, the first data structure comprises an associated array, a nested table or a variable array, and when the original data needs to be sent to the second device, the original data stored in the first data structure is obtained.
Fig. 3 is a schematic structural diagram of an original data provided in the present disclosure, as shown in fig. 3, the original data 300 includes N elements, where each element is a first key-value pair, for example, the first key-value pair 301 includes a value 1 of a key and a value 1 of data.
Optionally, the original data is stored in a memory of the first device, and the original data may be obtained from the memory.
S202, N second key value pairs corresponding to the N first key value pairs are generated.
Wherein each second key-value pair comprises: a first key attribute and a first data attribute, the first key attribute comprising: the length of the first key and the value of the first key, the first data attribute comprising: the length of the first data and the value of the first data.
For each first key value pair of the N first key value pairs, determining that the length of the key value is the length of the first key according to the key value contained in the first key value pair, and determining that the key value is the value of the first key, thereby obtaining the first key attribute stored according to the length of the first key and the sequence of the values of the first key.
For each of the N first key value pairs, the value of the data included in the first key value pair may be the value of the data of the normal type, for example, the data of the numeric type or the data of the character type, or may be the value of the data of the collection type (that is, the value of the data is one collection), and if the value of the data included in the first key value pair is the value of the data of the collection type, the value of the N data included in the first key value pair is respectively nested into the value of the original data, the nested collection includes M subelements, and M is an integer greater than or equal to 1. If the original data is in the form of a nested set, the elements are all sets, and it should be noted that the number of sub-elements included in each element is not limited in the disclosure. If the original data is not in the form of a nested set, then none of its elements is a set.
Further, if the original data is in the form of a nested set, the set types of all elements in the original data may be the same.
If the value of the data contained in the first key value pair is the value of the data of the common type, determining that the length of the value of the data is the length of the first data according to the value of the data contained in the first key value pair, and the value of the data is the value of the first data, thereby obtaining the first data attribute stored according to the length of the first data and the sequence of the values of the first data. And storing the first key attribute and the first data attribute in sequence to obtain a second key value pair.
If the value of the data included in the first key pair is a set, the value of the data included in the first key pair needs to be converted into data in a transmittable form, wherein the length of the data in the transmittable form is the length of the first data, and the value of the data in the transmittable form is the value of the first data. Further, if the value of the data included in the first key value pair is a set (the element in the original data is a set), the value of the data of the sub-element may be a common type of data, or may be a set type of data, and so on, the original data may be nested into one or more layers of sets.
Fig. 4A is a schematic structural diagram of a second key-value pair provided in the present disclosure, and as shown in fig. 4A, the second key-value pair 41 includes a first key attribute and a first data attribute, the first key attribute includes a length of a first key and a value of the first key that are sequentially arranged, and the first data attribute includes a length of first data and a value 411 of first data that are sequentially arranged. Thus, when the second device analyzes the second key value pair, the length of the first key or the length of the first data can be acquired first, so that a corresponding value is acquired according to the length, namely, when the second device analyzes the second key value pair, the length of the first key can be acquired first, and then the data of the length of the first key is acquired according to the acquired length of the first key, namely, the value of the first key.
S203, storing the transmission data in a second data structure.
The transmission data comprises two parts, wherein one part is a first set attribute, and the first set attribute comprises: the first set identifies the number of elements of the original data and the other part is N second key value pairs stored in sequence, wherein the first set identifies a nesting level for indicating the value of the first data.
The elements are sets, wherein the set types comprise an associated array, a nested table or a variable array, and the set types of the elements should be included in the transmission data, and the first set identifier is used for indicating the type of the first data structure of the original data, i.e. the first set identifier can be used for identifying the set type of the original data. The level of nesting of the values of the first data may be used to represent whether the values of the first data are nested together or not, and may also be used to represent the total number of layers of nested together in the values of the first data.
The number of the elements of the original data is obtained, and the number of the elements of the original data is N.
The first set identifier and the number of elements of the original data are sequentially combined into a first set attribute.
After the N second key value pairs are obtained, N second key value pairs that are consecutive in sequence can be obtained. And splicing N consecutive second key value pairs in sequence after the first set attribute to obtain the transmission data stored in the second data structure.
Fig. 4B is a schematic diagram of a second data structure provided in the present disclosure, and fig. 4B is a diagram of transmission data stored in the second data structure based on fig. 4A, as shown in fig. 4B, including: the first set identifier 42, the number of elements 43, and the N second key-value pairs 41 stored in sequence, one second key-value pair 41 being exemplarily shown in fig. 4B, are not limiting of the present disclosure.
Alternatively, the transmission data stored in the second data structure may be a binary coded sequence, so that it can be transmitted.
S204, transmitting the transmission data stored in the second data structure to the second device.
Wherein the transmission data stored in the second data structure may be sent to the second device in a different data transmission protocol, for example, an internet protocol (Internet Protocol, IP for short), a transmission control protocol (Transmission Control Protocol, TCP for short).
Further, the second device receives the transmission data stored in the second data structure, parses the transmission data, determines a set type and a nesting level of the current data according to the first set identifier, and sequentially parses the second key value pairs of the number of the elements of the first set according to the attribute information of the first set, thereby obtaining the original data stored in the first data structure.
In this embodiment, by acquiring the original data stored in the first data structure, where the original data includes N elements, the N elements correspond to N first key-value pairs, and each first key-value pair includes: the method comprises the steps that the value of a first key and the value of first data are N, wherein N is an integer greater than or equal to 1, original data are collected, the first data structure is unfavorable for transmission, the original data need to be converted into a second data structure capable of being transmitted, N second key value pairs corresponding to N first key value pairs are generated, and each second key value pair comprises: a first key attribute and a first data attribute, the first key attribute comprising: the length of the first key and the value of the first key, the first data attribute comprising: the length of the first data and the value of the first data, and storing transmission data in a second data structure, wherein the transmission data comprises two parts, one part is a first set attribute, and the first set attribute comprises: the first set identifier is used for indicating a nesting level of a value of the first data, so that the original data of a complex set type is converted into transmission data of a second data structure capable of being transmitted, and then the transmission data stored in the second data structure is sent to the second device, so that the transmission of the data of the set type is completed.
On the basis of the above embodiment, further, if the value of the first data is nested and set, that is, the element in the original data is a set, the element includes M sub-elements, and M is an integer greater than or equal to 1.
Fig. 5 is a schematic structural diagram of another original data provided in the present disclosure, where, as shown in fig. 5, the original data 5 includes N elements, each element corresponds to one first key value pair, for example, the first key value pair 51 corresponding to the first element includes a value 1 of the first key and a value 1 of the first data, where the value 1 (511) of the first data includes one or more sub-elements, each sub-element corresponds to one third key value pair, and the number of the third key value pairs is not limited in this disclosure. Similarly, the value 2 of the first data also contains one or more third key value pairs, and the value N of the first data also contains one or more third key value pairs.
In the following, a specific embodiment is described how a nested set of values of the first data may be processed so that the nested set may be transmitted.
Fig. 6 is a flow chart of another method for transmitting set type data according to an embodiment of the present disclosure, and fig. 6 is a flowchart of another method for transmitting set type data according to an embodiment of the present disclosure, further, on the basis of the embodiment shown in fig. 2, the elements are sets, and M sub-elements are included in the elements, where M is an integer greater than or equal to 1, and as shown in fig. 6, the method provided in this embodiment further includes S205:
S205, M third key value pairs corresponding to the M sub-elements are generated.
Wherein each third key value pair comprises: a second key attribute and a second data attribute, the second key attribute comprising: the length of the second key and the value of the second key, the second data attribute comprising: the length of the second data and the value of the second data.
For each of the M sub-elements, determining that the length of the key of the sub-element is the length of the second key according to the value of the key of the sub-element contained in the sub-element, and determining that the value of the key of the sub-element is the value of the second key, thereby obtaining the second key attribute stored in the order of the length of the second key and the value of the second key.
For each of the M sub-elements, the value of the data of the sub-element included in the sub-element may be the value of the data of the normal type, for example, the data of the numeric type or the data of the character type, or may be the value of the data of the collection type (i.e., the value of the data is a collection), and if the value of the data of the sub-element is the value of the data of the collection type, the M sub-elements included in the element are respectively nested into the collection, and each sub-element is a collection. If the elements are in the form of nested sets, then the sub-elements are all sets. If the element is not in the form of a nested set, none of its sub-elements is a set.
If the value of the data of the sub-element is the value of the data of the common type, determining that the length of the value of the data of the sub-element is the length of the second data according to the value of the data of the sub-element, and the value of the data of the sub-element is the value of the second data, thereby obtaining the second data attribute stored according to the sequence of the length of the second data and the value of the second data. And storing the second key attribute and the second data attribute in sequence to obtain a third key value pair.
If the value of the data of the sub-element is the value of the data of the collection type, the value of the data of the sub-element needs to be converted into data in a transmittable form, the length of the data in the transmittable form is the length of the second data, and the value of the data in the transmittable form is the value of the second data. Further, if the value of the data of the sub-element is a set, the sub-element in the value of the data of the sub-element may be a common type of data or a set type of data, and so on, the element may nest one or more layers of sets. The structure of the third key-value pair is similar to that of the second key-value pair shown in fig. 4A.
Accordingly, the value of the first data includes: the second set of attributes and M fourth key value pairs stored in sequence, wherein the second set of attributes comprises: the second set identifies a nesting level for indicating a value of the second data and a number of sub-elements of the element.
For each value of the first data, the first data structure is a data structure of a set type, wherein the set type comprises an associated array, a nested table or a variable array, and the transmission data should comprise information of which set type the first data is, and the second set identifies the type of the first data structure used for indicating the value of the first data, namely the second set identifies the set type which can be used for identifying the value of the first data. In addition, the value of the second data included in the third key value pair may be the value of the data of the general type, for example, the data of the numeric type or the data of the character type, the value of the second data may also be the data of the collection type (i.e., the value of the second data is a collection), the value of the M subelements included in the first data is respectively nested into the collection, and so on, the original data may be nested into the collection. The level of nesting of the values of the second data may be used to represent whether the values of the second data are nested or not, and may also be used to represent the total number of layers of nested sets in the values of the second data.
Optionally, if the sets are nested in the values of the second data, the sets are nested in the values of each second data, and the types of the nested sets are the same, for example, the types of the nested sets are associated arrays, and the types of the nested sets in the values of the second data are associated arrays. It should be noted that the present disclosure is not limited to the number of sub-elements contained in a nested collection.
The number of the sub-elements contained in the element is obtained, and the number of the sub-elements is M.
And sequentially forming the second set identifier and the number of the sub-elements into a second set attribute.
After the M fourth key value pairs are obtained, M consecutive fourth key value pairs stored in sequence can be obtained. And splicing the M fourth key value pairs stored in sequence after the second set attribute to obtain the value of the first data stored in the second data structure.
Fig. 7 is a schematic diagram of another second data structure provided in the present disclosure, and fig. 7 is a diagram illustrating that, based on the second data structure shown in fig. 4B, further, if the value of the first data is a set, as shown in fig. 7, the value 411 of the first data stored in the second data structure includes: the second set identifier 4111, the number of sub-elements 4112, and the third key value pair 4113 stored in sequence, the number of third key value pairs 4113 being one or more, one third key value pair 4113 being exemplarily shown in fig. 7, which does not constitute a limitation of the present disclosure.
If the elements in the original data are sets, that is, nested sets in the values of the first data, S205 is performed before S202, so as to obtain the values of the first data stored in the second data structure, and if the values of the second data are nested sets, the values of the second data may be processed in a similar manner to the steps in S205 to obtain the values of the second data stored in the second data structure.
In this embodiment, if the element is a set, the element includes M sub-elements, where M is an integer greater than or equal to 1, and M third key value pairs corresponding to the M sub-elements are generated, where each third key value pair includes: a second key attribute and a second data attribute, the second key attribute comprising: the length of the second key and the value of the second key, the second data attribute comprising: the length of the second data and the value of the second data, respectively, the value of the first data comprises: a second set of attributes and M third key-value pairs stored in sequence, wherein the second set of attributes comprises: the second set identifies a nesting level for indicating a value of the second data and a number of sub-elements of the element. In the case that the element is a set, the set is converted, so that the transmission data stored in the second data structure can be transmitted.
Fig. 8 is a flowchart of another method for transmitting set type data according to an embodiment of the present disclosure, as shown in fig. 8, where the method provided in the embodiment includes:
s801, receiving transmission data stored in a second data structure and sent by a first device.
S802, acquiring a first set attribute according to transmission data stored in a second data structure.
Wherein the first set of attributes includes: the first set identifies and transmits the number N of elements of the data.
S803, determining the set type and the nesting level of the transmission data according to the first set identification.
S804, according to the transmission data stored in the second data structure, N second key value pairs corresponding to the N elements are continuously and respectively acquired in sequence.
The second device receives the transmission data stored in the second data structure, and performs parsing operation according to the structure of the transmission data stored in the second data structure known in advance, so as to obtain the original data, and the structure of the transmission data stored in the second data structure is shown in fig. 4B. It will be appreciated that the transmission data stored in the second data structure is a binary coded sequence. According to the transmission data stored in the second data structure, a first set attribute is obtained, for example, it is preset how many bits of the transmission data are used for representing the first set attribute of the transmission data by the first set attribute, for example, the first four bytes of the transmission data are used for representing the first set attribute, wherein the first two bytes in the first four bytes represent a first set identifier, the last two bytes identify the number of elements of the transmission data, then the second device firstly obtains the first two bytes of the transmission data, analyzes the first set identifier to obtain a set type and a nesting level of the transmission data, obtains the last two bytes, analyzes the last two bytes to obtain the number of elements, and continuously analyzes the second key value pair according to the number of the elements.
S805, for each of the N second key value pairs, acquiring the length of the first key of the second key value pair; acquiring a value of a first key according to the length of the first key; continuously acquiring the length of the first data; acquiring a value of the first data according to the length of the first data; and obtaining the value of the key in the first key value pair according to the value of the first key, and obtaining the value of the data in the first key value pair according to the value of the first data.
Wherein the first key-value pair includes a value of a key and a value of data; and obtaining the corresponding element according to the first key value pair.
For each of the N second key-value pairs, the stored structure is the structure as shown in fig. 4A, according to the structure, the length of the first key is first obtained, and according to the length of the first key, the value of the first key is obtained, where the sequence of the length of the first key is stored in a preset length, for example, the preset length of the first key occupies 2 bytes in the transmission data, the first 2 bytes in the second key-value pair are first obtained, and are analyzed to obtain the length of the first key, and if the length of the first key is 1 byte, the sequence data of the length of 1 byte after the length of the first key is obtained, and are analyzed to obtain the value of the first key.
And then continuing to acquire the length of the first data in the sequence after the value of the first key, and acquiring the value of the first data according to the length of the first data. The acquisition is similar to the acquisition of the length of the first key and the value of the first key described above.
The elements in the original data may be general type data or aggregate type data, and the corresponding value of the converted first data may be an actual value or an actual value (the value 411 of the first data shown in fig. 7) that has been converted into a sequence from an aggregate. The data type of the value of the first data is already known when the first set identifier is parsed, and therefore, after the sequence of values of the first data is acquired, the parsing is performed according to the data type.
S806, storing the original data in the first data structure.
Wherein the raw data includes N elements.
The meaning of the related nouns in this embodiment is the same as that of the nouns with the same names in the above embodiment, and will not be repeated here.
In this embodiment, the transmission data stored in the second data structure and sent by the first device is received, and according to the transmission data stored in the second data structure, a first set of attributes is obtained, where the first set of attributes includes: determining the set type and the nesting level of the original data according to the first set identifier and the number N of elements contained in the original data corresponding to the transmission data, continuously and respectively acquiring N second key value pairs corresponding to the N elements according to the transmission data stored in the second data structure, and acquiring the length of a first key of the second key value pair aiming at each second key value pair of the N second key value pairs; acquiring a value of a first key according to the length of the first key; continuously acquiring the length of the first data; acquiring a value of the first data according to the length of the first data; obtaining a value of a key in a first key value pair according to a value of a first key, and obtaining a value of data in the first key value pair according to a value of first data, wherein the first key value pair comprises the value of the key and the value of the data; and obtaining corresponding elements according to the first key value pairs, and storing original data in a first data structure, wherein the original data comprises N elements. Therefore, the transmission data stored in the second data structure can be correctly analyzed to obtain the original data, and the transmission of the set type data is realized.
Further, the nesting level of the transmission data indicates that the elements of the original data corresponding to the transmission data are the set. In S805, according to the value of the first data, the value of the data in the first key value pair is obtained, which includes the following steps:
acquiring a second set of attributes according to the value of the first data, wherein the second set of attributes comprises: the second set identification and the number M of sub-elements contained in the element;
determining the set type and the nesting level of the elements according to the second set identifier;
and continuously and sequentially acquiring M third key value pairs corresponding to the M subelements respectively according to the value of the first data.
Obtaining, for each of the M third key value pairs, a length of a second key of the third key value pair; acquiring a value of the second key according to the length of the second key; continuously acquiring the length of the second data; acquiring a value of the second data according to the length of the second data; and obtaining the value of the key of the sub-element according to the value of the second key, obtaining the value of the data of the sub-element according to the value of the key of the sub-element and the value of the data of the sub-element, and obtaining the sub-element.
The value of the data in the first key-value pair is an element stored in the first data structure, the element comprising M subelements.
Optionally, the original data is a set, and the set comprises an associated array, a nested table and a variable array; the first set identification is also used to indicate the set type of the original data.
Fig. 9 is an interaction schematic diagram of a transmission method of set type data according to an embodiment of the present disclosure, where, as shown in fig. 9, the method provided in this embodiment includes:
s901, the first device acquires original data stored in the first data structure.
The original data comprises N elements, the N elements correspond to N first key value pairs, and each first key value pair comprises: the key value and the data value, and N is an integer greater than or equal to 1.
S902, the first device generates N second key value pairs corresponding to the N first key value pairs.
Wherein each second key-value pair comprises: a first key attribute and a first data attribute, the first key attribute comprising: the length of the first key and the value of the first key, the first data attribute comprising: the length of the first data and the value of the first data.
S903, the first device stores the transmission data in the second data structure.
The transmission data comprises two parts, wherein one part is a first set attribute, and the first set attribute comprises: the first set identifies the number of elements of the original data and the other part is N second key value pairs stored in sequence, wherein the first set identifies a nesting level for indicating the value of the first data.
S904, the first device sends the transmission data stored in the second data structure to the second device.
S905, the second device obtains, according to the transmission data stored in the second data structure, a first set of attributes, where the first set of attributes includes: the first set identifies and transmits the number N of elements of the data.
S906, the second device determines the set type and the nesting level of the transmission data according to the first set identifier.
And S907, the second equipment continues to sequentially and respectively acquire N second key value pairs corresponding to the N elements according to the transmission data stored in the second data structure.
S908, the second device acquires the length of the first key of the second key value pair aiming at each second key value pair of the N second key value pairs; acquiring a value of a first key according to the length of the first key; continuously acquiring the length of the first data; acquiring a value of the first data according to the length of the first data; and obtaining the value of the key in the first key value pair according to the value of the first key, and obtaining the value of the data in the first key value pair according to the value of the first data.
Wherein the first key-value pair includes a value of a key and a value of data; and obtaining the corresponding element according to the first key value pair.
S909, the second device stores the original data in the first data structure.
Wherein the raw data includes N elements.
The implementation principle and technical effects of the method of the above embodiment are similar to those of the technical solution of the above method embodiment, and are not repeated here.
Fig. 10 is a schematic structural diagram of a transmission device for aggregate type data according to an embodiment of the present disclosure, where, as shown in fig. 10, the device in this embodiment includes:
the obtaining module 11 is configured to obtain the original data stored in the first data structure, where the original data includes N elements, and the N elements correspond to N first key value pairs, and each first key value pair includes: the value of the key and the value of the data, N is an integer greater than or equal to 1;
the generating module 12 is configured to generate N second key-value pairs corresponding to the N first key-value pairs, where each second key-value pair includes: a first key attribute and a first data attribute, the first key attribute comprising: the length of the first key and the value of the first key, the first data attribute comprising: a length of the first data and a value of the first data;
a storage module 13, configured to store transmission data in a second data structure, where the transmission data includes two parts, and one part is a first set of attributes, and the first set of attributes includes: the first set identifier and the number of elements of the original data, and the other part is N second key value pairs which are sequentially stored, wherein the first set identifier is used for indicating the nesting level of the value of the first data;
A transmitting module 14 for transmitting the transmission data stored in the second data structure to the second device.
Optionally, the elements are a set, the elements contain M sub-elements, and M is an integer greater than or equal to 1;
the generating module 12 is further configured to: generating M subelements corresponding to M tertiary key value pairs, wherein each tertiary key value pair comprises: a second key attribute and a second data attribute, the second key attribute comprising: the length of the second key and the value of the second key, the second data attribute comprising: a length of the second data and a value of the second data;
accordingly, the value of the first data includes: a second set of attributes and M third key-value pairs stored in sequence, wherein the second set of attributes comprises: the second set identifies a nesting level for indicating a value of the second data and a number of sub-elements of the element.
Optionally, the original data is a set, and the set comprises an associated array, a nested table and a variable array; the first set identification is also used to indicate the set type of the original data.
Fig. 11 is a schematic structural diagram of another transmission device for aggregate type data according to an embodiment of the present disclosure, where, as shown in fig. 11, the device in this embodiment includes:
a receiving module 21, configured to receive transmission data stored in a second data structure sent by the first device;
An obtaining module 22, configured to obtain a first set of attributes according to the transmission data stored in the second data structure, where the first set of attributes includes: the first set identifies the number N of elements contained in the original data corresponding to the transmission data;
a determining module 23, configured to determine a set type and a nesting level of the original data according to the first set identifier;
the acquisition module 22 is also configured to: continuously and sequentially acquiring N second key value pairs corresponding to N elements according to the transmission data stored in the second data structure;
an obtaining module 24, configured to obtain, for each of the N second key value pairs, a length of the first key of the second key value pair; acquiring a value of a first key according to the length of the first key; continuously acquiring the length of the first data; acquiring a value of the first data according to the length of the first data; obtaining a value of a key in a first key value pair according to a value of a first key, and obtaining a value of data in the first key value pair according to a value of first data, wherein the first key value pair comprises the value of the key and the value of the data; obtaining corresponding elements according to the first key value pairs;
the storage module 25 is configured to store original data in a first data structure, where the original data includes N elements.
Optionally, the nesting level of the transmission data indicates that the element of the original data corresponding to the transmission data is a set;
obtaining the value of the data in the first key value pair according to the value of the first data, wherein the method comprises the following steps:
acquiring a second set of attributes according to the value of the first data, wherein the second set of attributes comprises: the second set identification and the number M of sub-elements contained in the element;
determining the set type and the nesting level of the elements according to the second set identifier;
continuously and sequentially acquiring M third key value pairs corresponding to the M subelements according to the value of the first data;
obtaining, for each of the M third key value pairs, a length of a second key of the third key value pair; acquiring a value of the second key according to the length of the second key; continuously acquiring the length of the second data; acquiring a value of the second data according to the length of the second data; obtaining the value of the key of the sub-element according to the value of the second key, obtaining the value of the data of the sub-element according to the value of the key of the sub-element and the value of the data of the sub-element, and obtaining the sub-element;
the value of the data in the first key-value pair is an element stored in the first data structure, the element comprising M subelements.
Optionally, the original data is a set, and the set comprises an associated array, a nested table and a variable array; the first set identification is also used to indicate the set type of the original data.
The device of the above embodiment may be used to implement the technical solution of the above method embodiment, and its implementation principle and technical effects are similar, and are not repeated here.
Fig. 12 is a schematic structural diagram of a transmission device for aggregate type data according to an embodiment of the present disclosure, where, as shown in fig. 12, the device in this embodiment includes:
a memory 31 for storing processor-executable instructions;
a processor 32 for implementing the method of fig. 2 or 6 as described above when the computer program is executed.
Fig. 13 is a schematic structural diagram of another transmission device for aggregate type data according to an embodiment of the present disclosure, where, as shown in fig. 13, the device in this embodiment includes:
a memory 41 for storing processor-executable instructions;
a processor 42 for implementing the method of fig. 8 as described above when the computer program is executed.
The apparatus of the foregoing embodiment may be used to execute the technical solutions of the foregoing method embodiments, and implementation principles and technical effects are similar, and are not repeated herein.
Embodiments of the present disclosure provide a computer-readable storage medium having stored therein computer-executable instructions that, when executed by a processor, are configured to implement a method of transmitting collection type data as in fig. 2 or 6.
The disclosed embodiments provide another computer-readable storage medium having stored therein computer-executable instructions that, when executed by a processor, are configured to implement a method of transmitting collection-type data as in fig. 8.
The computer readable storage medium of the above embodiment may be used to implement the technical solution of the above method embodiment, and its implementation principle and technical effects are similar, and are not repeated here.
It should be noted that in this document, relational terms such as "first" and "second" and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises an element.
The above is merely a specific embodiment of the disclosure to enable one skilled in the art to understand or practice the disclosure. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the disclosure. Thus, the present disclosure is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A method for transmitting aggregate type data, comprising:
obtaining original data stored in a first data structure, wherein the original data comprises N elements, the N elements correspond to N first key value pairs, and each first key value pair comprises: a value of a key and a value of data, wherein N is an integer greater than or equal to 1; the value of the data contained in each first key value pair is the value of the data of the common type;
generating N second key value pairs corresponding to the N first key value pairs, wherein each second key value pair includes: a first key attribute and a first data attribute, the first key attribute comprising: a length of a first key and a value of the first key, the first data attribute comprising: a length of the first data and a value of the first data;
Storing transmission data in a second data structure, the transmission data comprising two parts, wherein one part is a first set of attributes, the first set of attributes comprising: a first set identifier and the number of elements of the original data, and the other part is the N second key value pairs which are sequentially stored, wherein the first set identifier is used for indicating the type of a first data structure of the original data and the nesting level of the value of the first data; the nesting level of the values of the first data is used to indicate whether the values of the first data are nested in a set;
and sending the transmission data stored in the second data structure to a second device.
2. The method according to claim 1, wherein the elements are a set, the elements include M sub-elements, and M is an integer greater than or equal to 1;
the method further comprises the steps of:
generating M sub-elements corresponding to M third key-value pairs, wherein each third key-value pair comprises: a second key attribute and a second data attribute, the second key attribute comprising: a length of a second key and a value of the second key, the second data attribute comprising: a length of the second data and a value of the second data;
Accordingly, the value of the first data includes: a second set of attributes and M third key-value pairs stored in sequence, wherein the second set of attributes comprises: a second set identifies a type of a first data structure for the original data and a nesting level for a value of the second data for indicating a total number of layers of the nesting level in the value of the second data, and a number of sub-elements of the element.
3. The method of claim 1 or 2, wherein the raw data is a set comprising an associative array, a nested table, a variable array; the first set identifier is further used for indicating a set type of the original data.
4. A method for transmitting aggregate type data, comprising:
receiving transmission data stored in a second data structure and sent by first equipment;
acquiring a first set of attributes according to the transmission data stored in the second data structure, wherein the first set of attributes comprises: the first set identifier and the number N of elements contained in the original data corresponding to the transmission data;
determining the set type and the nesting level of the original data according to the first set identifier;
Continuously and sequentially acquiring N second key value pairs corresponding to N elements according to the transmission data stored in the second data structure;
acquiring the length of a first key of each of the N second key value pairs; acquiring a value of the first key according to the length of the first key; continuously acquiring the length of the first data; acquiring a value of the first data according to the length of the first data; obtaining a value of a key in a first key value pair according to a value of a first key, and obtaining a value of data in the first key value pair according to a value of the first data, wherein the first key value pair comprises the value of the key and the value of the data; obtaining corresponding elements according to the first key value pairs;
the method comprises the steps of storing original data in a first data structure, wherein the original data comprises N elements.
5. A transmission apparatus for aggregate type data, comprising:
the device comprises an acquisition module, a storage module and a storage module, wherein the acquisition module is used for acquiring original data stored in a first data structure, the original data comprises N elements, the N elements correspond to N first key value pairs, and each first key value pair comprises: a value of a key and a value of data, wherein N is an integer greater than or equal to 1; the value of the data contained in each first key value pair is the value of the data of the common type;
The generating module is configured to generate N second key value pairs corresponding to the N first key value pairs, where each second key value pair includes: a first key attribute and a first data attribute, the first key attribute comprising: a length of a first key and a value of the first key, the first data attribute comprising: a length of the first data and a value of the first data;
the storage module is used for storing transmission data in a second data structure, the transmission data comprises two parts, wherein one part is a first set attribute, and the first set attribute comprises: a first set identifier and the number of elements of the original data, and the other part is the N second key value pairs which are sequentially stored, wherein the first set identifier is used for indicating the type of a first data structure of the original data and the nesting level of the value of the first data; the nesting level of the values of the first data is used to indicate whether the values of the first data are nested in a set;
and the sending module is used for sending the transmission data stored in the second data structure to the second equipment.
6. A transmission apparatus for aggregate type data, comprising:
the receiving module is used for receiving transmission data stored in a second data structure and sent by the first equipment;
The acquisition module is configured to acquire a first set of attributes according to the transmission data stored in the second data structure, where the first set of attributes includes: the first set identifier and the number N of elements contained in the original data corresponding to the transmission data;
the determining module is used for determining the set type and the nesting level of the original data according to the first set identifier;
the acquisition module is also used for: continuously and sequentially acquiring N second key value pairs corresponding to N elements according to the transmission data stored in the second data structure;
the obtaining module is used for obtaining the length of the first key of each second key value pair of the N second key value pairs; acquiring a value of the first key according to the length of the first key; continuously acquiring the length of the first data; acquiring a value of the first data according to the length of the first data; obtaining a value of a key in a first key value pair according to a value of a first key, and obtaining a value of data in the first key value pair according to a value of the first data, wherein the first key value pair comprises the value of the key and the value of the data; obtaining corresponding elements according to the first key value pairs;
And the storage module is used for storing original data in a first data structure, wherein the original data comprises N elements.
7. A transmission apparatus for aggregate type data, comprising:
a memory for storing processor-executable instructions;
a processor for implementing the method of any of the preceding claims 1 to 3 when the computer program is executed.
8. A transmission apparatus for aggregate type data, comprising:
a memory for storing processor-executable instructions;
a processor for implementing the method as claimed in claim 4 when the computer program is executed.
9. A computer-readable storage medium, wherein computer-executable instructions are stored in the computer-readable storage medium, which when executed by a processor, are adapted to implement the method for transmitting set-type data according to any one of claims 1 to 3.
10. A computer-readable storage medium, wherein computer-executable instructions are stored in the computer-readable storage medium, which when executed by a processor, are configured to implement the method of transmitting set-type data as claimed in claim 4.
CN202011309773.XA 2020-11-20 2020-11-20 Method, device and equipment for transmitting set type data Active CN112491857B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011309773.XA CN112491857B (en) 2020-11-20 2020-11-20 Method, device and equipment for transmitting set type data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011309773.XA CN112491857B (en) 2020-11-20 2020-11-20 Method, device and equipment for transmitting set type data

Publications (2)

Publication Number Publication Date
CN112491857A CN112491857A (en) 2021-03-12
CN112491857B true CN112491857B (en) 2023-05-02

Family

ID=74932692

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011309773.XA Active CN112491857B (en) 2020-11-20 2020-11-20 Method, device and equipment for transmitting set type data

Country Status (1)

Country Link
CN (1) CN112491857B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108431770A (en) * 2015-12-23 2018-08-21 英特尔公司 Hardware aspects associated data structures for accelerating set operation
CN108491283A (en) * 2018-03-30 2018-09-04 武汉斗鱼网络科技有限公司 A kind of data transmission method, device, computer and storage medium

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104407991A (en) * 2014-12-10 2015-03-11 成都科来软件有限公司 Data storage method and device
CN105608103A (en) * 2015-10-16 2016-05-25 北京奇虎科技有限公司 Transforming method and device of data storing structure
US11249970B2 (en) * 2016-05-05 2022-02-15 Mastercard International Incorporated Method and system for distributed data storage with eternal integrity guarantees
CN109981651A (en) * 2019-03-27 2019-07-05 努比亚技术有限公司 Data transmission method, device, mobile terminal and readable storage medium storing program for executing
CN109947709B (en) * 2019-04-02 2021-10-08 北京百度网讯科技有限公司 Data storage method and device
US11294875B2 (en) * 2019-05-31 2022-04-05 Advanced New Technologies Co., Ltd. Data storage on tree nodes
CN111241108B (en) * 2020-01-16 2023-12-26 北京百度网讯科技有限公司 Key value based indexing method and device for KV system, electronic equipment and medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108431770A (en) * 2015-12-23 2018-08-21 英特尔公司 Hardware aspects associated data structures for accelerating set operation
CN108491283A (en) * 2018-03-30 2018-09-04 武汉斗鱼网络科技有限公司 A kind of data transmission method, device, computer and storage medium

Also Published As

Publication number Publication date
CN112491857A (en) 2021-03-12

Similar Documents

Publication Publication Date Title
US20220035600A1 (en) API Specification Generation
US10250526B2 (en) Method and apparatus for increasing subresource loading speed
US8838550B1 (en) Readable text-based compression of resource identifiers
KR20180041200A (en) Information processing method and apparatus
US10382387B2 (en) OID configuration, resolution method, client, node, database and storage medium
CN110309334A (en) Querying method, system, computer equipment and the readable storage medium storing program for executing of chart database
CN109104405B (en) Binary protocol encoding and decoding method and device
CN109743346B (en) Session flow configuration method, device and computer-readable storage medium
CN111090417A (en) Binary file analysis method, device, equipment and medium
CA3017523C (en) Technologies for auto discover and connect to a rest interface
US20100281053A1 (en) Method, apparatus, and computer-readable medium for distributing a query
CN111064716B (en) Message conversion method, device, storage medium and server
CN111752542A (en) Database query interface engine based on XML template
CN112491857B (en) Method, device and equipment for transmitting set type data
CN114490889A (en) Configuration information processing method, device, equipment, medium and program product
CN102456070B (en) Indexing unit and search method
CN110120918B (en) Identification analysis method and device
CN112699183A (en) Data processing method, system, readable storage medium and computer equipment
KR101720316B1 (en) Method and apparatus for providing information for sensor network
CN109101595A (en) A kind of information query method, device, equipment and computer readable storage medium
CN109643306B (en) Semiconductor element searching method using algorithm for removing last letter
CN114764406B (en) Database query method and related device
CN114006954B (en) GOOSE message receiving and sending method and device
JP6291435B2 (en) Program and cluster system
Lhez et al. PatBinQL: a compact, inference-enabled query language for RDF stream processing

Legal Events

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