CN116055559B - Data exchange format processing method and device - Google Patents

Data exchange format processing method and device Download PDF

Info

Publication number
CN116055559B
CN116055559B CN202310312657.0A CN202310312657A CN116055559B CN 116055559 B CN116055559 B CN 116055559B CN 202310312657 A CN202310312657 A CN 202310312657A CN 116055559 B CN116055559 B CN 116055559B
Authority
CN
China
Prior art keywords
key
group information
information
target
value
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
CN202310312657.0A
Other languages
Chinese (zh)
Other versions
CN116055559A (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.)
Guangzhou Jiuwei Intelligent Technology Co ltd
Original Assignee
Guangzhou Jiuwei Intelligent Technology 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 Guangzhou Jiuwei Intelligent Technology Co ltd filed Critical Guangzhou Jiuwei Intelligent Technology Co ltd
Priority to CN202310312657.0A priority Critical patent/CN116055559B/en
Publication of CN116055559A publication Critical patent/CN116055559A/en
Application granted granted Critical
Publication of CN116055559B publication Critical patent/CN116055559B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The application relates to a processing method and a device of a data exchange format, and relates to the technical field of computers, wherein the method comprises the following steps: the method comprises the steps of obtaining data to be processed, carrying out key value pair analysis and duplication elimination processing on the data to be processed to obtain target key group information and target value group information corresponding to the target key group information, carrying out sequencing and combination processing on the target key group information and the target value group information according to a sequencing hierarchy corresponding to the target key group information and combining preset constraint symbol information to obtain target format data, reducing the size of network transmission exchange data by using duplication elimination processing, improving the efficiency of network transmission, and then carrying out sequencing and combination by using the sequencing hierarchy and the constraint symbol, so that the target key can reasonably correspond to the target value, reading or analysis ambiguity cannot be generated, the key value pair storage form of the existing lightweight data exchange format is changed, and the problems of the existing lightweight data exchange format are solved.

Description

Data exchange format processing method and device
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method and an apparatus for processing a data exchange format.
Background
The lightweight data exchange format is a format which is easy to read and write by a person, can exchange data among a plurality of programming languages, and is easy to analyze and generate by a machine. The existing lightweight data exchange format mainly comprises an extensible markup language (Extensible Markup Language, XML) format, a JS object numbered musical notation (JavaScript Object Notation, JSON) format and the like. However, data in JSON format all use key-value pair storage forms such as "key: in the value "form, more symbols, such as colon, are inevitably needed in the key value pair form, so that the data size of JSON format data is larger, and more transmission bandwidth is occupied when data exchange is performed in a front-end and back-end data exchange scene, so that the network transmission bandwidth is increased.
Disclosure of Invention
The application provides a processing method and a device for a data exchange format, which are used for reducing the size of network transmission exchange data and the occupation of network transmission bandwidth so as to improve the efficiency of network transmission, and changing the key value pair storage form of a lightweight data exchange format by formulating a new data standard format, thereby solving the problems of the existing lightweight data exchange format.
In a first aspect, the present application provides a method for processing a data exchange format, including:
acquiring data to be processed;
performing key value pair analysis and duplication removal processing on the data to be processed to obtain target key group information and target value group information corresponding to the target key group information;
and according to the ordering level corresponding to the target key group information, carrying out ordering combination processing on the target key group information and the target value group information by combining preset constraint symbol information to obtain target format data.
Optionally, the performing the key value pair analysis and duplication removal on the data to be processed to obtain target key set information and target value set information corresponding to the target key set information includes:
carrying out key value pair analysis on the data to be processed to obtain first-level key group information and first-level value group information;
determining a data type of the first hierarchical value group information;
performing cyclic nesting analysis on the first hierarchical value group information under the condition that the data type is an object type to obtain nesting hierarchical key group information and nesting hierarchical value group information corresponding to the nesting hierarchical key group information;
and performing de-duplication processing based on the first hierarchical key set information and the nested hierarchical key set information to obtain target key set information, and generating target value set information based on the first hierarchical value set information and the nested hierarchical value set information.
Optionally, the sorting and combining processing is performed on the target key set information and the target value set information according to the sorting hierarchy corresponding to the target key set information and in combination with preset constraint symbol information, so as to obtain target format data, including:
determining a sorting level corresponding to the target key group information;
sorting and combining the target key group information and the target value group information based on the sorting hierarchy to obtain key value sorting information;
and carrying out constraint processing on the key value ordering information according to preset constraint symbol information to obtain target format data.
Optionally, the sorting and combining processing is performed on the target key set information and the target value set information according to the sorting hierarchy corresponding to the target key set information and in combination with preset constraint symbol information, so as to obtain target format data, including:
acquiring preset constraint symbol information;
performing constraint processing on the target key group information and the target value group information based on the constraint symbol information to obtain constraint key value pair information;
and ordering and combining the constraint key value pair information according to the ordering hierarchy corresponding to the target key group information to obtain the target format data.
Optionally, the determining the ranking level corresponding to the target key set information includes:
performing level judgment on the target key group information to obtain level order information;
the ranking hierarchy is generated based on the hierarchy order information.
Optionally, the constraint symbol information includes a key constraint symbol and a value constraint symbol, and the constraining the target key set information and the target value set information based on the constraint symbol information to obtain constraint key value pair information includes:
performing symbol constraint on the target key group information based on the key constraint symbol to obtain constraint key group information;
performing symbol constraint on the target value group information based on the value constraint symbol to obtain constraint value group information;
and generating constraint key value pair information based on the constraint key set information and the constraint value set information.
Optionally, the performing deduplication processing based on the first hierarchical key set information and the nested hierarchical key set information to obtain target key set information includes:
performing deduplication based on the first hierarchical key set information and the nested hierarchical key set information to obtain initial key set information;
performing cyclic traversal processing on the symbols in the initial key group information to obtain symbols to be processed;
Judging whether the symbol to be processed is a preset noise symbol or not;
and if the symbol to be processed is a preset noise symbol, removing the noise symbol from the initial key group information to obtain the target key group information.
Optionally, the method further comprises:
and generating target key group information based on the first-level key group information and generating target value group information based on the first-level value group information when the data type is an array type.
Optionally, the performing key value pair analysis on the data to be processed to obtain first-level key set information and first-level value set information includes:
determining a data format of the data to be processed;
and extracting key value pair group information from the data to be processed under the condition that the data format is a JSON format, wherein the key value pair group information comprises the first-level key group information and the first-level value group information.
In a second aspect, the present application provides a processing apparatus of a data exchange format, including:
the data acquisition module to be processed is used for acquiring the data to be processed;
the key value pair analysis and duplication removal processing module is used for carrying out key value pair analysis and duplication removal processing on the data to be processed to obtain target key group information and target value group information corresponding to the target key group information;
And the sequencing combination processing module is used for sequencing and combining the target key group information and the target value group information according to a sequencing level corresponding to the target key group information and combining preset constraint symbol information to obtain target format data.
In a third aspect, the present application provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete communication with each other through the communication bus;
a memory for storing a computer program;
a processor, configured to implement the steps of the method for processing a data exchange format according to any one of the embodiments of the first aspect when executing a program stored in a memory.
In a fourth aspect, the present application provides a computer-readable storage medium, on which a computer program is stored, which computer program, when being executed by a processor, implements the steps of a method for processing a data exchange format according to any one of the embodiments of the first aspect.
In summary, according to the embodiment of the application, key value pair analysis and duplication removal are performed on data to be processed to obtain target key group information and target value group information corresponding to the target key group information, sorting and combination processing is performed on the target key group information and the target value group information according to a sorting hierarchy corresponding to the target key group information and combined with preset constraint symbol information to obtain target format data, key value pair analysis and duplication removal are performed on the data to be processed to obtain the target key group and the target value group, so that the size of network transmission exchange data is reduced, occupation of network transmission bandwidth is reduced, network transmission efficiency is improved, sorting and combination are performed on the key value pair by using the sorting hierarchy and the constraint symbol to obtain target format data, the target key after analysis and duplication removal can reasonably correspond to the target value, reading or analysis is not generated, optimization is performed on the basis of an original data exchange protocol, a new data exchange protocol standard is formulated, and then the key value pair storage form of an existing lightweight data exchange format is changed, and the problems of the existing data exchange format such as JSON format are solved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description, serve to explain the principles of the application.
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required to be used in 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 flow chart of a processing method of a data exchange format according to an embodiment of the present application;
FIG. 2 is a flow chart illustrating steps of a method for processing a data exchange format according to an alternative embodiment of the present application;
FIG. 3 is a data structure diagram of a network data exchange in a target format provided in an alternative embodiment of the present application;
FIG. 4 is a data structure diagram of another network data exchange in a target format provided in an alternative embodiment of the present application;
fig. 5 is a block diagram of a processing device in a data exchange format according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the embodiments of the present application more clear, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present application based on the embodiments herein.
For the purpose of facilitating an understanding of the embodiments of the present application, reference will now be made to the drawings and specific examples, which are not intended to limit the embodiments of the present application.
Fig. 1 is a flow chart of a processing method of a data exchange format according to an embodiment of the present application. As shown in fig. 1, the processing method of the data exchange format provided in the embodiment of the present application may specifically include the following steps:
step 110, obtain the data to be processed.
Specifically, the data to be processed may be JSON format data, and of course, the data to be processed may also be other data format data in the form of key value pairs, and the data to be processed may be a piece of pure data, for example, may be a piece of pure data, or may be a JSON format data file.
In this embodiment, lightweight data format data, such as JSON format data, may be data in the form of Key-value pairs, for example, the data to be processed is JSON format data, and the data form of the JSON format data may be keys (keys): value (Value), which is not limited by the embodiments of the present application. Step 120 is performed by using JSON format data as the data to be processed so that key pair information can be parsed from the data to be processed.
And 120, performing key value pair analysis and duplication removal processing on the data to be processed to obtain target key group information and target value group information corresponding to the target key group information.
Specifically, the target Key set information may include at least one target Key, that is, a target Key, and the target Value set information may include a target Value corresponding to the target Key, that is, a target Value corresponding to the target Key, which is not limited in this embodiment of the present application.
Specifically, the embodiment of the application may preset a corresponding Key Value pair analysis algorithm for the data to be processed in advance, for example, may preset a corresponding Key Value pair analysis algorithm for JSON format data, after the data to be processed is obtained, the corresponding Key Value pair analysis algorithm may be determined according to the data format of the data to be processed, and then the Key Value pair analysis algorithm may be used to analyze the data to be processed, so as to analyze all keys (i.e., keys) and values corresponding to the keys (i.e., values corresponding to keys) from the data to be processed. And then, the same keys belonging to the same hierarchy can be de-duplicated, only one same key is reserved, all the parsed keys are combined together to form target key group information, and all the parsed values are combined together to form target value group information corresponding to the target key group information. The same keys at the same level are de-duplicated to reduce the data information quantity, so that the occupation of storage space can be effectively reduced when the data are stored, and the network transmission exchange data can be effectively reduced when the data are transmitted in a network, thereby reducing the occupation of network transmission bandwidth and improving the network transmission efficiency.
In a specific implementation, taking JSON format data as an example, the JSON format data generally adopts a Key: in the data format of the Key Value form, when JSON format data is transmitted and exchanged, both Key and Value additionally carry a pair of double quotation marks for distinguishing, for example, "form desc": the "type" and "formDesc" are keys, and the "type" is a Value corresponding to "formDesc", and it can be seen that each key Value pair in the JSON format data carries at least two pairs of double-quotes and a colon. In the process of program development and online use, the related data is often massive, and at the moment, massive double quotation marks and colon marks exist in one JSON format data. Thus, the size of JSON formatted data can be reduced by eliminating the double quote of the Key and the colon of the Key-value pair. Specifically, when the Key value pair analysis processing is performed on the data to be processed, double-quotation removal can be performed on the analyzed Key, namely, the double quotation of the Key is removed, for example, the form Desc is the form Desc after the double quotation is removed, and a colon carried by the Key value pair can be removed: the method can effectively reduce the information such as useless symbols and the like, achieve the aim of reducing the data volume, and reduce the data size when data transmission is carried out on the data, thereby effectively saving the network bandwidth and improving the network transmission efficiency.
In practical processing, JSON format data may have a plurality of keys and values nested, and/or a plurality of values corresponding to keys in the same hierarchy, for example { Key1: value1, while Value1 contains [ { Key2: value2, { Key2 }: value3 }) and the like, that is, a nested Key Value pair exists, and/or a plurality of values corresponding to the same Key exist in the Key Value pair of the same hierarchy, for example, key2 simultaneously corresponds to two values of Value2 and Value3. The key value pairs of the outermost layer or the innermost layer can be analyzed in a nested loop, then the key value pairs of other layers are sequentially analyzed, for example, the key value pairs of the outermost layer can be analyzed first, then the key value pairs of the secondary outer layer are analyzed until all the key value pairs of the innermost layer are analyzed completely, and then all the key value pairs in the data to be processed are obtained. Then, the colon of all Key Value pairs can be removed, and double-quotation removal can be performed on all parsed keys, and the same keys corresponding to a plurality of values in the same hierarchy are deduplicated, so that only one same Key is reserved, for example, for Key2: value2 and Key2: only one Key2 is reserved for the two Key Value pairs of Value3, and the Key with double quotation marks removed are combined into target Key group information, for example, keys contained in the target Key group information can be Key1 and Key2, all the analyzed values are combined into target Value group information, for example, values contained in the target Value group information can be Value1, value2 and Value3. The method achieves the aim of removing useless symbols by circularly nesting, analyzing and de-duplicating Key value pairs in JSON format data or XML format data, and achieves the aim of de-duplicating the same Key of the same level, and compared with the traditional Key value pair storage form, the method can greatly reduce the data information quantity by reducing useless symbols and the same Key.
And 130, according to the ordering level corresponding to the target key group information, carrying out ordering combination processing on the target key group information and the target value group information by combining preset constraint symbol information to obtain target format data.
Specifically, the ranking hierarchy may be used to reorder and combine the target key set information and the target value set information, which is not limited in the embodiments of the present application; the constraint symbol information may be used to perform symbol constraint on the target key set information and the target value set information, where the constraint symbol information may include a constraint symbol corresponding to the target key set information and a constraint symbol corresponding to the target value set information, and the embodiment of the present application is not limited thereto. It should be noted that, the constraint symbol corresponding to the target key set information and the constraint symbol corresponding to the target value set information may be different, so as to distinguish the keys and the values after the sorting and combination.
Specifically, after the target key set information and the target value set information are analyzed, the target key set information and the target value set information can be subjected to sorting and combination processing according to a sorting level corresponding to the target key set information and in combination with preset constraint symbol information, for example, the target key set information and the target value set information can be rearranged according to the sorting level corresponding to the target key set information, and rearranged target key set information and target value set information are obtained. And then, the reordered target Key group information can be subjected to symbol constraint by using constraint symbols corresponding to the target Key group information, and the reordered target Key group information can be subjected to symbol constraint by using constraint symbols corresponding to the target Key group information, so that target format data containing reordered and symbol-constrained Key values can be obtained. In the scene that data exchange transmission is needed, such as front-end and back-end network request data transmission, the data transmission can be performed instead of the existing JSON format data, and compared with the JSON protocol standard data, the data transmission can occupy less bandwidth, so that the problems of the existing lightweight data exchange format are solved.
It should be noted that in the embodiment of the present application, the target key group information and the target value group information may be reordered and combined by using the ordering hierarchy, and then symbol constraint is performed by using constraint symbol information; of course, symbol constraint may be performed on the target key set information and the target value set information by using constraint symbol information, and then the target key set information and the target value set information are reordered and combined by using the ordering hierarchy.
In a specific implementation, the embodiment of the application can determine the hierarchy of each Key when the Key value pair analysis is performed on the data to be processed, for example, when the Key value pair analysis is performed on the JSON format data, the Key of the outermost layer can be analyzed first, the ordering sequence of all keys of the outermost layer is determined, then the Key of the inner layer is analyzed sequentially, and the ordering sequence of all keys of the inner layer is obtained, so that the ordering hierarchy and the analysis sequence from the Key of the outermost layer to the Key of the innermost layer are determined according to the ordering sequence, as an ordering hierarchy, and then the ordering hierarchy and the preset constraint symbol information can be utilized to perform ordering and combining processing on the target Key group information and the target value group information, so as to obtain the target format data.
As can be seen, in the embodiment of the present application, by performing Key value pair analysis and duplication removal processing on acquired data to be processed to obtain target Key set information and target value set information corresponding to the target Key set information, according to a sorting hierarchy corresponding to the target Key set information, performing sorting and combination processing on the target Key set information and the target value set information in combination with preset constraint symbol information to obtain target format data, performing Key value pair analysis and duplication removal processing on the data to be processed to obtain corresponding target keys and target values, thereby eliminating useless symbols, performing duplication removal on repeated keys of the same hierarchy, and reducing the amount of useless data information, in a scene where data storage is required, greatly reducing the storage space of data, and in a scene where network data exchange is required, reducing the occupation of transmission bandwidth and improving network transmission efficiency. The Key Value pairs are ordered and combined by using the ordering level and the constraint symbol to obtain target format data, so that the Key after de-duplication can reasonably correspond to the original Value without reading or resolving ambiguity, thereby changing the standard data structure of the existing JSON format data and changing the storage form of the Key Value pairs of the lightweight data exchange format. The JSON format is used as a data structure of industry standardized data transmission and exchange, and the standard data structure of the JSON is modified again to optimize on the basis of a JSON network transmission protocol, so that a new protocol scheme is obtained, variables (such as double quotation marks, colon marks, repeated keys and the like) in the transmitted data are not repeated, the data are lighter than those of the JSON protocol, and in a scene of network transmission and exchange of data, the data transmission and the exchange can be realized only by occupying less bandwidth, so that the purposes of saving bandwidth and improving network transmission efficiency are realized.
Further, the JSON format data is modified on the data structure level, the industry standardized JSON format is subverted, and a new lightweight data exchange format standard is redefined, namely, a new standard and a new protocol of the lightweight data exchange format are formulated, so that the problems of the existing data exchange formats such as the JSON format are effectively solved.
Referring to fig. 2, a schematic flow chart of steps of a method for processing a data exchange format according to an alternative embodiment of the present application is shown. The processing method of the data exchange format specifically comprises the following steps:
step 210, obtain data to be processed.
And 220, carrying out key value pair analysis on the data to be processed to obtain first-level key set information and first-level value set information.
Specifically, the first-level Key group information may include the outermost keys of the data to be processed, that is, all keys of the outermost layer, which is not limited in the embodiment of the present application; the first hierarchical Value group information may include an outermost Value corresponding to an outermost Key of the data to be processed, that is, a Value corresponding to an outermost Key, which is not limited in this embodiment of the present application.
In this embodiment, the data to be processed may only include a single-layer key pair, i.e. the data to be processed has only one key pair at the outermost layer, and of course, the data to be processed may also include more than one key pair, where the key pair at the outermost layer includes an inner key pair, i.e. a nested key pair. Therefore, when the Key Value pair analysis is performed on the data to be processed, whether the data to be processed contains nested Key Value pairs or not can be considered first, the Key Value pair of the outermost layer of the data to be processed can be directly analyzed to obtain all keys of the outermost layer and values corresponding to the keys, all keys of the outermost layer form first-level Key group information, and all values of the outermost layer form first-level Value group information.
As an example, taking JSON format data to be processed as an example, assume that there is a multi-layer nested JSON format data, such as the data name JSON1, whose key-value pair may be: { "formDesc": { "key_1" { "type": radio "," label ": single selection", "options" { "text": choice 1"," Value ": 1}, {" text ": choice 2", "Value": 2}, { "text": choice 3"," Value ": 3}," order ": [" key_5"," key_8"," key_1"] }, at this time, all keys of the outermost layer including" formDesc "and" order "can be obtained, and all values of the outermost layer including { key_1" { "type": radio "," label ": choice", "single selection", "choice" [ { "text": 1"," Value ": 1}, {" Value ": text": 1}, { text ": 2", "Value": 3}, { key_1 }, and "Value }, value" { 5 }, value }.3 }.5 }.6 }.and }.
In an optional embodiment, the performing key value pair analysis on the data to be processed to obtain first level key set information and first level value set information may specifically include: determining a data format of the data to be processed; and extracting key value pair group information from the data to be processed under the condition that the data format is a JSON format, wherein the key value pair group information comprises the first-level key group information and the first-level value group information.
Step 230, determining the data type of the first hierarchical value set information.
Specifically, the first level value group information may have a corresponding data type, where the data type may be classified into an object type and an array type, which is not limited in this embodiment of the present application. Object types may refer to the types to which data combinations, which are formed in the form of key-value pairs, typically appear as key-value pairs; the array type may be a type corresponding to a data combination composed of a plurality of variable elements, and is generally represented as an array, which is not limited by the embodiment of the present application.
Specifically, in the embodiment of the present application, the first hierarchical value group information may be classified into an object type and a data type, if the first hierarchical value group information includes a key value pair, the data type of the first hierarchical value group information may be the object type, and if the first hierarchical value group information includes an array composed of non-key value data, the data type of the first hierarchical value group information may be the array type.
In a specific implementation, for data to be processed, which only contains a single-layer key value pair, all values in the parsed key value pair can be of a array type; for the data to be processed including the nested key value pairs, the partial values in the parsed key value pairs may be of a group type, and the partial values may be of an object type. In order to analyze all key value pairs, after all values are obtained, data type judgment can be performed on all analyzed outermost layer values, namely whether the outermost layer values are of object types or not is judged, and when the outermost layer values are of object types, key value pair analysis is performed on the outermost layer values to obtain a second layer key value pair group.
Further, for the nested key value pairs of multiple levels, data type judgment can be performed on the value analyzed by each level, and whether to perform key value pair analysis is determined according to the data type judgment result, so that multi-level key value pair analysis is realized.
And step 240, performing cyclic nesting analysis on the first hierarchical value group information under the condition that the data type is the object type to obtain nesting hierarchical key group information and nesting hierarchical value group information corresponding to the nesting hierarchical key group information.
Specifically, the nested hierarchical key set information may include all keys except the first-level key set information, and the nested hierarchical value set information may include all values except the first-level value set information, which is not limited in this embodiment of the present application.
In a specific implementation, for the first hierarchical Value group information with the data type being the object type, cyclic nesting analysis can be performed, all keys and values in the first hierarchical Value group information are analyzed through the cyclic nesting analysis until the data type of the analyzed Value is not the object type, that is, the Value does not contain a Key Value pair at this time, all keys analyzed by the cyclic nesting are combined into nested hierarchical Key group information, and all values analyzed by the cyclic nesting are combined into nested hierarchical Value group information.
As an example, for data JSON1, the outermost Key group contains "formDesc" and "order", the outermost Value group contains { "key_1" { "type": "radio", "label": "single choice", "options": [ { "text": "Option 1", "Value": 1}, { "text": option 2"," Value ": 2}, {" text ": option 3", "Value": 3} ] }, and [ "key_5", "key_8", "key_1" ], at this time the outermost Value group obviously contains Value of the object type, so that a second layer Key Value pair parsing can be performed thereon to obtain a second layer all Key Value pair group, wherein the second layer Key group may contain "y_1", "second layer Value" { "type", "single", "Value" }, "Value": 1}, { Value ":" Value "{ Value": 1}, and } "Value": option 1 }. At this time, the second layer Value group obviously includes Value whose data type is the object type, so that the third layer key Value pair parsing can be performed on the second layer Value group to obtain all key Value pair groups of the third layer, where the third layer key group may include "type", "label" and "options", the third layer Value group may include "radio", "single selection" and [ { "text": option 1"," Value ": 1}, {" text ": option 2", "Value": 2}, { text ": option 3", "Value": 3}, and at this time, the third layer Value group also obviously includes Value whose data type is the object type, so that the fourth layer key Value pair parsing can be performed on the third layer Value group to obtain all key Value pair groups of the fourth layer, where the fourth layer key group may include three "text", three "Value" and three "Value", and the fourth layer Value group may include "1", "2", "3" and "Value" corresponding to three Value "corresponding to" Value "2", "3" and "Value", respectively.
And 250, performing de-duplication processing based on the first hierarchical key set information and the nested hierarchical key set information to obtain target key set information, and generating target value set information based on the first hierarchical value set information and the nested hierarchical value set information.
In a specific implementation, the embodiment of the application may perform deduplication processing on the first-level Key group information and the nested-level Key group information, for example, double-index filtering may be performed on all keys in the first-level Key group information and all keys in the nested-level Key group information, so as to remove double-index numbers of all keys, thereby obtaining keys without double-index numbers, then it may be determined whether identical keys which belong to the same level and have different corresponding values exist in the first-level Key group information and the nested-level Key group information, that is, whether a Key exists in the same level and corresponds to a plurality of different values is determined, if it is determined that identical keys which belong to the same level and have different corresponding values exist in the first-level Key group information and the nested-level Key group information, the identical keys may be deduplicated, only one identical Key may be reserved, and all reserved Key target Key group information may be obtained. Such as [ { key1: value1, { key1 }: value2 }), key1 obviously corresponds to two different values, only one key1 may be reserved at this time. For the first hierarchical value group information and the nested hierarchical value group information, data filtering can be performed according to the data types of the values contained in each hierarchical value group information, for example, values with all data types being object types in the first hierarchical value group information and the nested hierarchical value group information can be filtered, values with data types being array types are reserved, and all reserved values are summarized to be used as target value group information. The Key value pair analysis is carried out on the data to be processed to obtain all keys and values, then all keys are utilized to generate a target Key group, all values are utilized to generate a target value group, and the original Key is removed: the colon in the Key Value form of Value, unnecessary symbols such as double quotation marks are removed for all keys, the purpose of preliminarily reducing the data information quantity is achieved, repeated keys at the same level are used for removing the duplication, the increase of the data information quantity caused by a plurality of identical keys is avoided, the purpose of further reducing the data information quantity is achieved, the data information quantity is reduced from a plurality of dimensions such as symbol dimension, data dimension and the like, and when data are exchanged in network transmission, the occupation of network bandwidth can be effectively reduced, and the network transmission efficiency is further improved.
In an optional embodiment, the performing deduplication processing according to the embodiment of the present application based on the first hierarchical key set information and the nested hierarchical key set information to obtain target key set information may specifically include: performing deduplication based on the first hierarchical key set information and the nested hierarchical key set information to obtain initial key set information; performing cyclic traversal processing on the symbols in the initial key group information to obtain symbols to be processed; judging whether the symbol to be processed is a preset noise symbol or not; and if the symbol to be processed is a preset noise symbol, removing the noise symbol from the initial key group information to obtain the target key group information. The preset noise symbol may be a double-quotation mark, and of course, for different key value pairs, the noise symbol may be a single quotation mark according to the symbol contained in the key, for example, when the key contains a single quotation mark, which is not limited in the embodiment of the present application.
As an example, for the first layer Key group, the second layer Key group, the third layer Key group and the fourth layer Key group, double-index removal may be performed on all keys in each Key group, so as to obtain a Key group with double-index removed, for example, after all keys in the first layer Key group are double-index removed, the obtained Key group includes formDesc and order, after all keys in the second layer Key group are double-index removed, the obtained Key group includes key_1, after all keys in the third layer Key group are double-index removed, the obtained Key group includes type, label and options, and after all keys in the fourth layer Key group are double-index removed, the obtained Key group includes three text and three value. And then, de-duplication can be carried out on the key group after the symbol removal, for example, only one key is reserved for three text and three value, and all keys after the symbol removal and de-duplication are summarized to obtain the target key group information.
For the first layer value group, the second layer value group, the third layer value group and the fourth layer value group, the data types of all values in each value group can be determined, the values with the data types being object types can be removed, the values with all the data types being data types are reserved, and the target value group information is formed.
In an alternative embodiment, the embodiment of the present application may further include: and generating target key group information based on the first-level key group information and generating target value group information based on the first-level value group information when the data type is an array type.
Specifically, for the first-level key group information with the data type of the array type, it can be determined that no nested key value pair exists in key value pairs included in the data to be processed, so that symbol removal and duplicate removal processing can be directly performed on all keys in the first-level key group to obtain target key group information, and all values in the first-level key group information can be utilized to form target value group information.
Step 260, determining the ordering level corresponding to the target key set information.
In a specific implementation, the embodiment of the present application may determine, according to the analysis order of the key value pairs, a ranking level of all keys in the target key group information, for example, for an outermost key, the ranking level may be highest, and for an innermost key, the ranking level may be lowest, which is not limited in the embodiment of the present application.
Optionally, the determining the ranking level corresponding to the target key set information may specifically include the following substeps:
and step 2601, performing level judgment on the target key group information to obtain level order information.
Specifically, the hierarchical order information may include hierarchical information and parsing order information of each key in the target key set information, which is not limited in the embodiment of the present application.
In a specific implementation, for the data to be processed with only one layer of key value pairs and no nested key value pairs, each key belongs to the outermost key, so that the hierarchy of each key is the same, that is, the hierarchy information of each key is the same, and the analysis sequence information can be determined according to the analysis sequence of the keys to serve as the hierarchy sequence information. If a certain JSON format data is: [ { key1: value1, { key2 }: value2 ], only one layer of key value pairs, so that the levels of key1 and key2 are the same, and the parsing order of key1 precedes key2, so that the level order information is key1-key2. For the data to be processed containing nested key value pairs, the level of the key at the outermost layer is highest, and the level of the key at the innermost layer is lowest, so that the level information of each key can be obtained, and for all keys at the same level, like a plurality of keys belonging to the outermost layer, the analysis order can be used as analysis order information, and then the level order information is determined by combining the level information according to the analysis order information. If certain JSON format data is { { key1: { key1-1: value1-1}, { key2 }: value2}, with both key1 and key2 belonging to the outermost hierarchy, and with key1-1 hierarchy lower than either key1 or key2.
A substep 2602 generates the ranking hierarchy based on the hierarchy order information.
Specifically, the embodiment of the application may generate the ranking hierarchy according to the hierarchy order information.
And step 270, sorting and combining the target key group information and the target value group information based on the sorting hierarchy to obtain key value sorting information.
Specifically, the key value ordering information may include the keys and the values after the ordering combination, which is not limited in the embodiment of the present application.
Specifically, according to the embodiment of the application, the target key group information can be ordered according to the ordering hierarchy, the keys belonging to the same hierarchy are combined together, and the keys of different hierarchies can be ordered according to the hierarchy of the keys of the same hierarchy, so that the keys after ordered combination are obtained. And then, for each value in the target value group information, combining the values belonging to the same level according to the level of the key to which the value corresponds, and sorting the values of different levels according to the level of the key to obtain the sorted combined value. Key value ordering information is then generated based on the ordered combined keys and the ordered combined values. By sequencing and combining the keys contained in the target Key group and the values contained in the target Value group, the Key subjected to duplication removal and sign removal can reasonably correspond to the original Value, and the readability and the resolvability of the target format data generated later are ensured.
And 280, performing constraint processing on the key value ordering information according to preset constraint symbol information to obtain target format data.
Specifically, the constraint symbol information may include a key constraint symbol and a value constraint symbol, which is not limited by the embodiment of the present application. The method and the device can utilize key constraint symbols to constrain the keys after sequencing combination, such as the keys of the same hierarchy can be subjected to symbol constraint, and can utilize value constraint symbols to constrain the values after sequencing combination, such as the values of the same hierarchy can be subjected to symbol constraint, so as to obtain target format data. The front-end interface requests the back-end server to log in, register and the like to acquire data or submit data and other data exchange transmission scenes, and the target format data can be used for replacing the existing JSON format as a data transmission format to perform data transmission interaction, so that the purpose of reducing network bandwidth is achieved, the network transmission efficiency is improved, and the problems existing in the existing data exchange format are solved.
As an example, assume that a certain JSON format data occupies 171 bytes, specifically: { "formDesc" { "type": "radio", "label": "single selection", "options" [ { "text": "option 1", "value":1}, { "text": "option 2", "value":2}, { "text": "option 3", "value":3}, "order": [ "key_5", "key_8", "key_1" ] }, then by parsing and de-duplicating the JSON format data, a plurality of levels of key sets and value sets can be obtained, each level of key sets and value sets can be obtained by sorting combinations, such as the first level of key sets can contain formDesc and order, the second level of key sets can contain type, label and options, the third level of key sets can contain text and value, and the corresponding value of keys of each level can be determined. Assuming that the key constraint symbol is a bracket (i.e., "< >"), the value constraint symbol of the object type is a bracket (i.e., "{ }"), and the value constraint symbol of the array type is a bracket (i.e., "[") then the key group of the same hierarchy of the bracket can be utilized to perform symbol constraint, and the bracket or bracket can be utilized to constrain the value, thereby obtaining the target format data (assuming that the format corresponding to the target format data is named as YAO format): { < form Desc, order > { < type, label, options > { "radio", < text, value > [ { "option 1",1}, { "option 2",2}, { "option 3",3} ] }, [ (key_5 "," key_8"," key_1"] are 137 in bytes, and the space is saved by about (171-137)/171=20% compared with the existing JSON format data, and the space is saved more and more with the increase of the data volume of the JSON format data.
As an example, for JSON format data without complex nested key-value pairs, after parsing, de-duplication and ordering combination, the data structure of the obtained YAO data may be as shown in fig. 3; for JSON format data with complex nested key-value pairs, after parsing, de-duplication and sorting combination, the data structure of the obtained YAO data may be as shown in fig. 4, which is not limited in this example. And the double quotation marks of the colon and the Key of the Key value pair can be removed, the same Key of the same level is de-duplicated, characters are reduced, and the keys and the values after analysis de-duplication and sequencing combination are in one-to-one correspondence according to the sequence in the group.
In an optional embodiment, according to the ranking hierarchy corresponding to the target key set information in the embodiment of the present application, the ranking combination processing is performed on the target key set information and the target value set information in combination with preset constraint symbol information, so as to obtain target format data, which may specifically include: acquiring preset constraint symbol information; performing constraint processing on the target key group information and the target value group information based on the constraint symbol information to obtain constraint key value pair information; and ordering and combining the constraint key value pair information according to the ordering hierarchy corresponding to the target key group information to obtain the target format data.
In an optional embodiment, in a case where constraint symbol information includes a key constraint symbol and a value constraint symbol, the constraint symbol information is used to constrain the target key set information and the target value set information to obtain constraint key value pair information, which may specifically include: performing symbol constraint on the target key group information based on the key constraint symbol to obtain constraint key group information; performing symbol constraint on the target value group information based on the value constraint symbol to obtain constraint value group information; and generating constraint key value pair information based on the constraint key set information and the constraint value set information.
In a specific implementation, the processing in the embodiment of the application may firstly perform sorting and combining on the target key set information and the target value set information by using a sorting hierarchy, and then perform symbol constraint on the target key set information and the target value set information by using constraint symbol information to obtain the target format data, or may first perform symbol constraint on the target key set information and the target value set information by using constraint symbol information to obtain constraint key value pair information, and then sort keys and values in the constraint key value pair information by using the sorting hierarchy to obtain the target format data.
In summary, the embodiment of the application analyzes the key value pair of the acquired data to be processed to obtain first level key group information and first level value group information, then determines the data type of the first level value group information, circularly nests and analyzes the first level value group information to obtain nested level key group information corresponding to the nested level key group information and nested level key group information under the condition that the data type is the object type, performs de-duplication processing based on the first level key group information and the nested level key group information to obtain target key group information, generates target value group information based on the first level key group information and the nested level value group information, then determines a sorting level corresponding to the target key group information, sorts and combines the target key group information and the target value group information based on the sorting level to obtain key value sorting information, and performs constraint processing on the key value sorting information according to preset constraint symbol information to obtain target format data. The Key Value pair analysis and duplication removal processing is carried out on the data to be processed to obtain a corresponding target Key and a target Value, useless symbols are removed, the size of the data is preliminarily reduced, duplication is removed aiming at repeated keys of the same hierarchy, the size of the data is further reduced, the purpose of reducing the size of the data in multiple dimensions is achieved, then the Key Value pairs are sequenced and combined by using a sequencing hierarchy and constraint symbols to obtain target format data, the Key after removal of the symbols and duplication can reasonably correspond to the original Value, the readability and resolvability of the target format data are improved, reading ambiguity or analysis ambiguity cannot be generated, the purpose of formulating new lightweight data exchange format standard is achieved, the industry standardized JSON format is subverted, the standard data structure of the existing JSON format data is changed, namely, the Key Value pair storage form of the lightweight data exchange format is changed, compared with the existing JSON format data, the target format data in the embodiment of the application is a new protocol based on JSON network transmission protocol optimization, the JSON scene can be replaced, the JSON text is used after JSON optimization is used, the purpose of using the JSON format is achieved, the conventional data exchange format is used as the data exchange format, the conventional data exchange format has the efficiency is improved, and the data exchange format is convenient, and the data transmission format is convenient, and the data format has the transmission format has the problem has been improved.
It should be noted that, for simplicity of description, the method embodiments are shown as a series of acts, but it should be understood by those skilled in the art that the embodiments are not limited by the order of acts described, as some steps may occur in other orders or concurrently in accordance with the embodiments.
As shown in fig. 5, the embodiment of the present application further provides a processing apparatus 500 of a data exchange format, including:
a data to be processed obtaining module 510, configured to obtain data to be processed;
the key value pair analysis and duplication removal processing module 520 is configured to perform key value pair analysis and duplication removal processing on the data to be processed to obtain target key set information and target value set information corresponding to the target key set information;
the sorting and combining processing module 530 is configured to perform sorting and combining processing on the target key set information and the target value set information according to a sorting hierarchy corresponding to the target key set information and in combination with preset constraint symbol information, so as to obtain target format data.
Optionally, the key-value pair parsing and deduplication processing module 520 includes:
the key value pair analysis submodule is used for carrying out key value pair analysis on the data to be processed to obtain first-level key group information and first-level value group information;
A data type determining sub-module for determining a data type of the first hierarchical value group information;
the cyclic nesting analysis submodule is used for carrying out cyclic nesting analysis on the first hierarchical value group information under the condition that the data type is an object type to obtain nested hierarchical key group information and nested hierarchical value group information corresponding to the nested hierarchical key group information;
the target key group information generation sub-module is used for carrying out de-duplication processing based on the first-level key group information and the nested level key group information to obtain target key group information;
and the target value group information generation sub-module is used for generating target value group information based on the first hierarchy value group information and the nested hierarchy value group information.
Optionally, the key value pair parsing sub-module includes:
a data format determining unit for determining a data format of the data to be processed;
and the key value pair group information extraction unit is used for extracting key value pair group information from the data to be processed under the condition that the data format is a JSON format, wherein the key value pair group information comprises the first-level key group information and the first-level value group information.
Optionally, the target key group information generating sub-module includes:
The duplicate removal unit is used for removing duplicate based on the first-level key group information and the nested-level key group information to obtain initial key group information;
the cyclic traversal processing unit is used for carrying out cyclic traversal processing on the symbols in the initial key group information to obtain the symbols to be processed;
the judging unit is used for judging whether the symbol to be processed is a preset noise symbol or not;
and the target key group information determining unit is used for removing the noise symbol from the initial key group information when the symbol to be processed is a preset noise symbol to obtain the target key group information.
Optionally, the processing device 500 of the data exchange format further includes:
and the target value group information generation module is used for generating target key group information based on the first-level key group information and generating target value group information based on the first-level value group information when the data type is an array type.
Optionally, the sorting combination processing module 530 includes:
a sorting level determining sub-module, configured to determine a sorting level corresponding to the target key group information;
the key value ordering information determining submodule is used for ordering and combining the target key group information and the target value group information based on the ordering hierarchy to obtain key value ordering information;
And the constraint processing sub-module is used for carrying out constraint processing on the key value ordering information according to preset constraint symbol information to obtain target format data.
Optionally, the ranking level determining submodule includes:
the hierarchical order information determining unit is used for performing hierarchical judgment on the target key group information to obtain hierarchical order information;
and the ordering level generating unit is used for generating the ordering level based on the level order information.
Optionally, the sorting combination processing module 530 includes:
the constraint symbol information acquisition sub-module is used for acquiring preset constraint symbol information;
the constraint key value pair information determining submodule is used for carrying out constraint processing on the target key group information and the target value group information based on the constraint symbol information to obtain constraint key value pair information;
and the sorting and combining sub-module is used for sorting and combining the constraint key value pair information according to the sorting level corresponding to the target key group information to obtain the target format data.
Optionally, the constraint key value pair information determining submodule includes:
a constraint key group information determining unit, configured to perform symbol constraint on the target key group information based on the key constraint symbol, to obtain constraint key group information;
A constraint value group information determining unit, configured to perform symbol constraint on the target value group information based on the value constraint symbol, to obtain constraint value group information;
and the constraint key value pair information generation unit is used for generating constraint key value pair information based on the constraint key group information and the constraint value group information.
Optionally, the processing device 500 of the data exchange format further includes:
it should be noted that, the processing device for a data exchange format provided in the embodiments of the present application may execute the processing method for a data exchange format provided in any embodiment of the present application, and has the corresponding functions and beneficial effects of executing the processing method for a data exchange format.
In a specific implementation, the processing device of the data exchange format can be integrated in equipment, so that the equipment can analyze key value pairs aiming at acquired data to be processed to obtain target key value pairs, then sequence and combine the target key value pairs according to sequence levels and constraint symbol information to obtain target format data, and the target format data is used as electronic equipment, so that the problem of the existing data exchange format is solved by changing the key value pair storage form of the lightweight data exchange format, and the data exchange transmission can be realized by occupying less bandwidth while the data size is reduced. The electronic device may be formed by two or more physical entities or may be formed by one physical entity, for example, the electronic device may be a personal computer (Personal Computer, PC), a computer, a server, or the like, which is not particularly limited in the embodiment of the present application.
As shown in fig. 6, an embodiment of the present application provides an electronic device, including a processor 111, a communication interface 112, a memory 113, and a communication bus 114, where the processor 111, the communication interface 112, and the memory 113 perform communication with each other through the communication bus 114; a memory 113 for storing a computer program; the processor 111 is configured to implement the steps of the processing method of the data exchange format provided in any one of the foregoing method embodiments when executing the program stored in the memory 113. Illustratively, the steps of the data exchange format processing method may include the steps of: acquiring data to be processed; performing key value pair analysis and duplication removal processing on the data to be processed to obtain target key group information and target value group information corresponding to the target key group information; and according to the ordering level corresponding to the target key group information, carrying out ordering combination processing on the target key group information and the target value group information by combining preset constraint symbol information to obtain target format data.
The present application also provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the data exchange format processing method provided by any one of the method embodiments described above.
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 the element.
The foregoing is merely a specific embodiment of the application to enable one skilled in the art to understand or practice the application. 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 application. Thus, the present application 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 (9)

1. A method for processing a data exchange format, comprising:
acquiring data to be processed;
performing key value pair analysis and duplication removal processing on the data to be processed to obtain target key group information and target value group information corresponding to the target key group information, wherein the method comprises the following steps: carrying out key value pair analysis on the data to be processed to obtain first-level key group information and first-level value group information; determining a data type of the first hierarchical value group information; performing cyclic nesting analysis on the first hierarchical value group information under the condition that the data type is an object type to obtain nesting hierarchical key group information and nesting hierarchical value group information corresponding to the nesting hierarchical key group information; performing de-duplication processing based on the first hierarchical key set information and the nested hierarchical key set information to obtain target key set information, and generating target value set information based on the first hierarchical value set information and the nested hierarchical value set information;
and according to the ordering level corresponding to the target key group information, carrying out ordering combination processing on the target key group information and the target value group information by combining preset constraint symbol information to obtain target format data.
2. The method according to claim 1, wherein the sorting and combining the target key group information and the target value group information according to the sorting hierarchy corresponding to the target key group information in combination with preset constraint symbol information to obtain target format data includes:
determining a sorting level corresponding to the target key group information;
sorting and combining the target key group information and the target value group information based on the sorting hierarchy to obtain key value sorting information;
and carrying out constraint processing on the key value ordering information according to preset constraint symbol information to obtain target format data.
3. The method according to claim 1, wherein the sorting and combining the target key group information and the target value group information according to the sorting hierarchy corresponding to the target key group information in combination with preset constraint symbol information to obtain target format data includes:
acquiring preset constraint symbol information;
performing constraint processing on the target key group information and the target value group information based on the constraint symbol information to obtain constraint key value pair information;
and ordering and combining the constraint key value pair information according to the ordering hierarchy corresponding to the target key group information to obtain the target format data.
4. The method of claim 2, wherein determining the ordering hierarchy to which the target key set information corresponds comprises:
performing level judgment on the target key group information to obtain level order information;
the ranking hierarchy is generated based on the hierarchy order information.
5. A method according to claim 3, wherein the constraint symbol information comprises a key constraint symbol and a value constraint symbol, and wherein constraining the target key set information and the target value set information based on the constraint symbol information to obtain constraint key value pair information comprises:
performing symbol constraint on the target key group information based on the key constraint symbol to obtain constraint key group information;
performing symbol constraint on the target value group information based on the value constraint symbol to obtain constraint value group information;
and generating constraint key value pair information based on the constraint key set information and the constraint value set information.
6. The method of claim 1, wherein performing deduplication processing based on the first-level key set information and the nested-level key set information to obtain target key set information comprises:
performing deduplication based on the first hierarchical key set information and the nested hierarchical key set information to obtain initial key set information;
Performing cyclic traversal processing on the symbols in the initial key group information to obtain symbols to be processed;
judging whether the symbol to be processed is a preset noise symbol or not;
and if the symbol to be processed is a preset noise symbol, removing the noise symbol from the initial key group information to obtain the target key group information.
7. The method as recited in claim 1, further comprising:
and generating target key group information based on the first-level key group information and generating target value group information based on the first-level value group information when the data type is an array type.
8. The method of claim 1, wherein the performing key-value pair analysis on the data to be processed to obtain first-level key-set information and first-level value-set information includes:
determining a data format of the data to be processed;
and extracting key value pair group information from the data to be processed under the condition that the data format is a JSON format, wherein the key value pair group information comprises the first-level key group information and the first-level value group information.
9. A processing apparatus for a data exchange format, comprising:
The data acquisition module to be processed is used for acquiring the data to be processed;
the key value pair analysis and duplication removal processing module is used for performing key value pair analysis and duplication removal processing on the data to be processed to obtain target key group information and target value group information corresponding to the target key group information, and comprises the following steps: the key value pair analysis module is used for carrying out key value pair analysis on the data to be processed to obtain first-level key group information and first-level value group information; a data type for determining the first hierarchical set of values information; the method comprises the steps of performing cyclic nesting analysis on first hierarchical value group information under the condition that the data type is an object type to obtain nesting hierarchical key group information and nesting hierarchical value group information corresponding to the nesting hierarchical key group information; the target key group information is obtained by performing de-duplication processing based on the first hierarchical key group information and the nested hierarchical key group information, and target value group information is generated based on the first hierarchical value group information and the nested hierarchical value group information;
and the sequencing combination processing module is used for sequencing and combining the target key group information and the target value group information according to a sequencing level corresponding to the target key group information and combining preset constraint symbol information to obtain target format data.
CN202310312657.0A 2023-03-28 2023-03-28 Data exchange format processing method and device Active CN116055559B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310312657.0A CN116055559B (en) 2023-03-28 2023-03-28 Data exchange format processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310312657.0A CN116055559B (en) 2023-03-28 2023-03-28 Data exchange format processing method and device

Publications (2)

Publication Number Publication Date
CN116055559A CN116055559A (en) 2023-05-02
CN116055559B true CN116055559B (en) 2023-12-22

Family

ID=86114919

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310312657.0A Active CN116055559B (en) 2023-03-28 2023-03-28 Data exchange format processing method and device

Country Status (1)

Country Link
CN (1) CN116055559B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116738252B (en) * 2023-07-12 2024-01-05 上海中汇亿达金融信息技术有限公司 Configuration loading method, device and application based on fuzzy matching

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106973332A (en) * 2017-03-10 2017-07-21 武汉斗鱼网络科技有限公司 A kind of barrage message treatment method, analytic method and system
CN107465738A (en) * 2017-08-01 2017-12-12 深圳市金立通信设备有限公司 A kind of communication means, server and computer-readable recording medium
CN109005469A (en) * 2018-07-03 2018-12-14 武汉斗鱼网络科技有限公司 A kind of conversion method of message format, device, storage medium and android terminal
CN112817602A (en) * 2021-02-26 2021-05-18 青岛海信网络科技股份有限公司 JSON format data sending and receiving method, device and medium
CN113220281A (en) * 2021-04-30 2021-08-06 北京字跳网络技术有限公司 Information generation method and device, terminal equipment and storage medium
CN115567589A (en) * 2022-09-29 2023-01-03 上海顺舟智能科技股份有限公司 Compression transmission method, device, equipment and storage medium of JSON data

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106973332A (en) * 2017-03-10 2017-07-21 武汉斗鱼网络科技有限公司 A kind of barrage message treatment method, analytic method and system
CN107465738A (en) * 2017-08-01 2017-12-12 深圳市金立通信设备有限公司 A kind of communication means, server and computer-readable recording medium
CN109005469A (en) * 2018-07-03 2018-12-14 武汉斗鱼网络科技有限公司 A kind of conversion method of message format, device, storage medium and android terminal
CN112817602A (en) * 2021-02-26 2021-05-18 青岛海信网络科技股份有限公司 JSON format data sending and receiving method, device and medium
CN113220281A (en) * 2021-04-30 2021-08-06 北京字跳网络技术有限公司 Information generation method and device, terminal equipment and storage medium
CN115567589A (en) * 2022-09-29 2023-01-03 上海顺舟智能科技股份有限公司 Compression transmission method, device, equipment and storage medium of JSON data

Also Published As

Publication number Publication date
CN116055559A (en) 2023-05-02

Similar Documents

Publication Publication Date Title
JP6187478B2 (en) Index key generation device, index key generation method, and search method
US11416473B2 (en) Using path encoding method and relational set operations for search and comparison of hierarchial structures
CN112579155B (en) Code similarity detection method and device and storage medium
CN108334609B (en) Method, device, equipment and storage medium for realizing JSON format data access in Oracle
CN116055559B (en) Data exchange format processing method and device
CN110659282B (en) Data route construction method, device, computer equipment and storage medium
CN108363558B (en) Machine number data comparison method for big data processing
CN112597345B (en) Automatic acquisition and matching method for laboratory data
CN109753517A (en) A kind of method, apparatus, computer storage medium and the terminal of information inquiry
CN116468010A (en) Report generation method, device, terminal and storage medium
CN114328981B (en) Knowledge graph establishing and data acquiring method and device based on mode mapping
CN110083731B (en) Image retrieval method, device, computer equipment and storage medium
CN114372174A (en) XML document distributed query method and system
CN106484815A (en) A kind of automatic identification optimization method for retrieving scene based on mass data class SQL
CN111984673B (en) Fuzzy retrieval method and device for tree structure of power grid electric energy metering system
CN109726292A (en) Text analyzing method and apparatus towards extensive multilingual data
CN111190896B (en) Data processing method, device, storage medium and computer equipment
CN116469500A (en) Data quality control method and system based on post-structuring of medical document
CN114207598A (en) Electronic form conversion
CN112560416B (en) Page chart generation method and device, electronic equipment and storage medium
CN112214494B (en) Retrieval method and device
CN112380445A (en) Data query method, device, equipment and storage medium
CN109977269B (en) Data self-adaptive fusion method for XML file
CN117892725B (en) Mapping construction method and device and electronic equipment
CN110569243B (en) Data query method, data query plug-in and data query server

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
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20231127

Address after: Units 904 and 906, No. 26 Qinglan Street, Xiaoguwei Street, Panyu District, Guangzhou City, Guangdong Province, 510006

Applicant after: Guangzhou Jiuwei Intelligent Technology Co.,Ltd.

Address before: Unit 1301, No. 26, Qinglan Street, Xiaoguwei Street, Panyu District, Guangzhou City, Guangdong Province, 510006

Applicant before: GUANGZHOU JOIWAY INFORMATION TECHNOLOGY CO.,LTD.

GR01 Patent grant
GR01 Patent grant