CN108008936B - Data processing method and device and electronic equipment - Google Patents

Data processing method and device and electronic equipment Download PDF

Info

Publication number
CN108008936B
CN108008936B CN201711262677.2A CN201711262677A CN108008936B CN 108008936 B CN108008936 B CN 108008936B CN 201711262677 A CN201711262677 A CN 201711262677A CN 108008936 B CN108008936 B CN 108008936B
Authority
CN
China
Prior art keywords
node
json
identifier
josn
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
CN201711262677.2A
Other languages
Chinese (zh)
Other versions
CN108008936A (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 QIYI Century Science and Technology Co Ltd
Original Assignee
Beijing QIYI Century Science and 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 Beijing QIYI Century Science and Technology Co Ltd filed Critical Beijing QIYI Century Science and Technology Co Ltd
Priority to CN201711262677.2A priority Critical patent/CN108008936B/en
Publication of CN108008936A publication Critical patent/CN108008936A/en
Application granted granted Critical
Publication of CN108008936B publication Critical patent/CN108008936B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/20Software design
    • G06F8/24Object-oriented

Abstract

The embodiment of the invention provides a data processing method, a data processing device and electronic equipment, wherein the method comprises the following steps: acquiring a JSON node marked by a script language object; determining a characteristic value of the JSON node, judging the type of the JOSN node according to the characteristic value, when the JOSN node is of different types, adopting an analysis method corresponding to the different types to analyze the JOSN node into a first identifier and first data corresponding to the first identifier, wherein the first identifier is the name of the JOSN node and a child node thereof, and the first data is concrete data of the JOSN node or the child node of the JOSN node.

Description

Data processing method and device and electronic equipment
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a data processing method and apparatus, and an electronic device.
Background
With the rapid development of computer technology, a large amount of data is generated in various computer systems or intelligent devices at any time, and various processing needs to be performed on the data to realize specific data applications such as data interaction and storage. Particularly in the field of data interaction, data interaction among various systems or devices can directly affect the overall operation efficiency. Therefore, the interaction of data among various systems or devices is a direction of intensive research.
The JSON (JavaScript Object Notation) is a lightweight data exchange language, is text-based, and easy to read, and facilitates the analysis and generation of a machine, and when data is interacted between various systems or devices in the form of JSON, the efficiency of data interaction or transmission can be effectively improved. The JSON can form a multi-layer data structure through structures such as key value pairs, objects, arrays and the like and through mutual nesting of the objects and the arrays, so that various complex data structures can be expressed. Each layer can be used as a JSON node, the previous layer can be a parent node, and the next layer of the parent node can be a child node. By analyzing each node in the JSON data, specific data in the JSON data, such as data of a character string or a numerical value, can be obtained.
In the prior art, when JSON data is analyzed, a technician needs to process each node in the JSON data one by one through a corresponding analysis tool or call a corresponding analysis function to obtain specific data of each node, so that a large amount of labor cost is consumed, and the data processing efficiency is low.
Disclosure of Invention
The embodiment of the invention aims to provide a data processing method, a data processing device and electronic equipment so as to realize automatic processing of JSON data. The specific technical scheme is as follows:
the embodiment of the invention discloses a data processing method, which comprises the following steps:
acquiring a JSON node marked by a script language object;
determining a characteristic value of the JSON node, and judging the type of the JOSN node according to the characteristic value, wherein the node type comprises a key value pair, an object and an array, and the characteristic value is the number of parallel elements in the JSON node;
when the JSON node type is a key value pair, taking the name of a key in the key value pair as a first identifier, and taking the value in the key value pair as a first data value, wherein the first identifier corresponds to the first data value;
or, when the JSON node type is an object, taking the name of the object as the first identifier, traversing a first child node of the JSON node, adding the name of the first child node to the first identifier, and taking the value of the first child node as the first data value;
or, when the type of the JSON node is an array and the JSON node has a plurality of second child nodes, taking the name of the array as the first identifier, traversing each second child node of the JSON node one by one, adding the name and the serial number of each second child node into the first identifier respectively to form a plurality of mutually independent first identifiers, taking the value of each second child node as a plurality of mutually independent first data values, wherein the serial number is the position serial number of the second child node in the array;
and obtaining a first data value corresponding to the first identifier by calling the first identifier.
Optionally, the determining the feature value of the JSON node includes:
and determining the characteristic value of the JSON node through a size function.
Optionally, the determining the type of the JOSN node according to the feature value includes:
judging whether the characteristic value of the JOSN node is larger than a preset threshold value or not, wherein when the characteristic value of the JOSN node is larger than the preset threshold value, the type of the JOSN node is an array or an object;
or when the characteristic value of the JOSN node is not greater than the preset threshold value, the type of the JOSN node is a key value pair.
Optionally, the determining the type of the JOSN node according to the feature value includes:
judging whether the characteristic value of the JOSN node is larger than the preset threshold value or not, and determining the type of the JOSN node according to the syntactic structure of the JOSN node;
when the characteristic value of the JOSN node is larger than the preset threshold value, the grammatical structure of the JOSN node is in a brace format, and the type of the JOSN node is an object;
or when the characteristic value of the JOSN node is greater than the preset threshold value, the syntax structure of the JOSN node is in a middle bracket format, and the type of the JOSN node is an array.
Optionally, when the JSON node type is an object, taking the name of the object as the first identifier, traversing a first child node of the JSON node, adding the name of the first child node to the first identifier, and taking the value of the first child node as the first data value includes:
and when the JSON node type is an object and the JSON node is provided with a plurality of first child nodes, traversing each first child node of the JSON node one by one, adding the name of each first child node into the first identifier respectively to form a plurality of independent first identifiers, and taking the value of each first child node as a plurality of independent first data values.
Optionally, after determining the feature value of the JSON node and determining the type of the JSON node according to the feature value, the method further includes:
when the JSON node type is an array, taking the name of the array as a second identifier, taking the characteristic value as the second data value, and taking the second identifier corresponding to the second data value;
correspondingly, the obtaining a first data value corresponding to the first identifier by calling the first identifier includes:
when the JSON node type is an array, determining the number of a plurality of first identifications aiming at the JSON node according to the second data value;
and calling the plurality of first identifications according to the number to obtain a plurality of first data values corresponding to the plurality of first identifications.
Optionally, when the JSON node type is an object, taking the name of the object as the first identifier, and traversing the first child node of the JSON node, where the method includes:
when the JSON node type is an object, taking the name of the object as the first identifier, and traversing a first child node of the JSON node in a recursive mode;
when the type of the JSON node is an array and the JSON node has a plurality of second child nodes, taking the name of the array as the first identifier, and traversing each of the second child nodes of the JSON node one by one, including:
and when the JSON node type is an array and the JSON node is provided with a plurality of second child nodes, taking the name of the array as the first identifier, and traversing each second child node of the JSON node in a recursive mode.
The embodiment of the invention also discloses a data processing device, which comprises:
the acquisition module is used for acquiring a JSON node marked by a script language object;
the judging module is used for determining a characteristic value of the JSON node and judging the type of the JOSN node according to the characteristic value, wherein the node type comprises a key value pair, an object and an array, and the characteristic value is the number of parallel elements in the JSON node;
a first parsing module, configured to, when the JSON node type is a key value pair, use a name of a key in the key value pair as a first identifier, and use a value in the key value pair as a first data value, where the first identifier corresponds to the first data value;
a second parsing module, configured to, when the JSON node type is an object, use a name of the object as the first identifier, traverse a first child node of the JSON node, add the name of the first child node to the first identifier, and use a value of the first child node as the first data value;
a third parsing module, configured to, when the JSON node type is an array and the JSON node has a plurality of second child nodes, use a name of the array as the first identifier, traverse each of the second child nodes of the JSON node one by one, add the name and sequence number of each of the second child nodes to the first identifier, respectively, form a plurality of mutually independent first identifiers, use a value of each of the second child nodes as a plurality of mutually independent first data values, where the sequence number is a position sequence number of the second child node in the array;
and the calling module is used for obtaining a first data value corresponding to the first identifier by calling the first identifier.
Optionally, the determining module is specifically configured to:
and determining the characteristic value of the JSON node through a size function.
Optionally, the determining module is specifically configured to:
judging whether the characteristic value of the JOSN node is larger than a preset threshold value or not, wherein when the characteristic value of the JOSN node is larger than the preset threshold value, the type of the JOSN node is an array or an object; or when the characteristic value of the JOSN node is not greater than the preset threshold value, the type of the JOSN node is a key value pair.
Optionally, the determining module is specifically configured to:
judging whether the characteristic value of the JOSN node is larger than the preset threshold value or not, and determining the type of the JOSN node according to the syntactic structure of the JOSN node; when the characteristic value of the JOSN node is larger than the preset threshold value, the grammatical structure of the JOSN node is in a brace format, and the type of the JOSN node is an object; or when the characteristic value of the JOSN node is greater than the preset threshold value, the syntax structure of the JOSN node is in a middle bracket format, and the type of the JOSN node is an array.
Optionally, the second parsing module is specifically configured to:
and when the JSON node type is an object and the JSON node is provided with a plurality of first child nodes, traversing each first child node of the JSON node one by one, adding the name of each first child node into the first identifier respectively to form a plurality of independent first identifiers, and taking the value of each first child node as a plurality of independent first data values.
Optionally, the apparatus further comprises:
an adding module, configured to, when the JSON node type is an array, use a name of the array as a second identifier, use the feature value as the second data value, and use the second identifier corresponding to the second data value;
correspondingly, the calling module is specifically configured to:
when the JSON node type is an array, determining the number of a plurality of first identifications aiming at the JSON node according to the second data value; and calling the plurality of first identifications according to the number to obtain a plurality of first data values corresponding to the plurality of first identifications.
Optionally, the second parsing module is specifically configured to:
when the JSON node type is an object, taking the name of the object as the first identifier, and traversing a first child node of the JSON node in a recursive mode;
the third parsing module is specifically configured to:
and when the JSON node type is an array and the JSON node is provided with a plurality of second child nodes, taking the name of the array as the first identifier, and traversing each second child node of the JSON node in a recursive mode.
The embodiment of the invention also discloses electronic equipment which comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory finish mutual communication through the communication bus;
a memory for storing a computer program;
and a processor for implementing any of the above data processing methods when executing the program stored in the memory.
The embodiment of the invention also discloses a computer-readable storage medium, wherein the computer-readable storage medium is stored with instructions, and when the computer-readable storage medium runs on a computer, the computer is enabled to execute any one of the data processing methods.
The embodiment of the invention also discloses a computer program product containing instructions, which when run on a computer causes the computer to execute any one of the data processing methods.
According to the data processing method, the data processing device and the electronic equipment, the JOSN node characteristic value is determined by obtaining the JOSN node, the JOSN node type is judged according to the characteristic value, when the JOSN nodes are different types, the JOSN nodes are analyzed into the first identification and the first data corresponding to the first identification by adopting the analysis method corresponding to the different types, the first identification is the name of the JOSN node and the child nodes of the JOSN node, the first data is the specific data of the JOSN node or the child nodes of the JOSN node, therefore, the first identification can be directly called to obtain the corresponding first data, the JOSN data processing is completed, technical personnel interference is not needed in the whole processing process, the labor cost can be reduced, and the data processing efficiency is improved. Of course, it is not necessary for any product or method of practicing the invention to achieve all of the above-described advantages at the same time.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below.
FIG. 1 is a flow chart of a data processing method according to an embodiment of the present invention;
FIG. 2 is another flow chart of a data processing method according to an embodiment of the present invention;
FIG. 3 is a block diagram of a data processing apparatus according to an embodiment of the present invention;
fig. 4 is a structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be described below with reference to the drawings in the embodiments of the present invention.
Each JSON node in the JSON data structure may be a single-layer node or a multi-layer node, and the type of the JSON node includes a key-value pair, an object, and an array, where the key-value pair is the most basic constituent unit, for example, "firstName": "Brett" is a most basic key-value pair, firstName is the name of the key in the key-value pair, Brett is the value in the key-value pair.
An object may be an unordered set of "key-value pairs," such as:
Figure BDA0001493980510000071
wherein, the "personal information" is the name of the object, and the "name": "Zhang three" and "age": 24, which are children of the object's two key-value pair types, respectively.
An array, which may be an ordered set of values, for example:
Figure BDA0001493980510000072
wherein, the "student" is the name of the array, { "name": "Xiaoming", "age": 23} and { "name": "Zhang III" and "age": 24, which are child nodes of the two object types of the array, respectively.
In the JSON data structure, objects, arrays and the like can be nested with one another, so that a complex multi-layer data structure is formed. By the data processing method provided by the embodiment of the invention, the JSON nodes can be automatically analyzed and processed without manual intervention aiming at different types of JSON nodes, and the node path corresponding to each specific data value in the JSON data structure is obtained, so that the data in the JSON data structure can be more conveniently obtained.
The data processing method provided by the embodiment of the invention is described in detail below with reference to the accompanying drawings.
Referring to fig. 1, fig. 1 is a flowchart of a data processing method according to an embodiment of the present invention, including:
step 101, acquiring a JSON node marked by a script language object.
The embodiment of the invention can be applied to various electronic devices, such as personal computers, servers, mobile phones and other devices with data processing capability. Moreover, the data processing method provided by the embodiment of the invention can be realized by software, hardware or a combination of software and hardware.
The electronic equipment can obtain the JSON nodes to be processed one by one, and after one JSON node is processed, the next JSON node can be obtained.
Since a JSON node may have a multi-level data structure, nesting of objects or arrays, for example, in arrays, is performed. When the JSON nodes of the multiple layers are processed, each child node in each layer needs to be traversed. Therefore, the steps of the data processing method provided by the embodiment of the invention are also executed when each child node is processed.
In practical application, the data processing method provided by the embodiment of the invention can be executed layer by layer for the multi-layer JSON nodes in a recursive manner. For example, when the data processing method provided by the embodiment of the present invention is implemented by software, the data processing method may be called and executed in a form of a recursive function, so as to obtain child nodes one by one layer and execute subsequent steps.
And 102, determining a characteristic value of the JSON node, and judging the type of the JOSN node according to the characteristic value, wherein the node type comprises a key value pair, an object and an array, and the characteristic value is the number of parallel elements in the JSON node.
After the electronic device obtains the JSON node to be processed, the feature value of the JSON node can be determined first, and the type of the JSON node can be determined through the feature value. The characteristic value is the quantity characteristic value of parallel elements in the JSON node and can be used for representing the quantity of child nodes of the JSON node.
Specifically, the type of the JSON node can be determined by judging whether the characteristic value of the JOSN node is greater than a preset threshold.
And when the characteristic value of the JOSN node is greater than a preset threshold value, the type of the JOSN node is an array or an object.
And when the characteristic value of the JOSN node is not greater than the preset threshold value, the type of the JOSN node is a key value pair.
The preset threshold may be 0, that is, when the characteristic value of the JOSN node is greater than 0, it indicates that there is at least one child node in the JOSN node, so the type of the JOSN node is definitely not a key-value pair, and may be an array or an object.
When the characteristic value of the JOSN node is not greater than 0, it indicates that there is no child node in the JOSN node, so the type of the JOSN node is a key-value pair.
When it is determined that the type of the JOSN node may be an array or an object, the JOSN node may be determined to be an array or an object according to a syntactic structure of the JOSN node.
Specifically, when the characteristic value of the JOSN node is greater than the preset threshold, the syntax structure of the JOSN node is in a brace format, and the type of the JOSN node is an object. That is, when the outermost bracket of the numerical part of the JOSN node is the brace "{ }", it means that the JOSN node type is the object.
When the characteristic value of the JOSN node is larger than a preset threshold value, the syntax structure of the JOSN node is in a middle bracket format, and the type of the JOSN node is an array. That is, when the outermost parentheses of the numerical part of the JOSN node are middle parentheses "[ ]", it means that the JOSN node type is an array.
And 103, when the JSON node type is a key value pair, taking the name of a key in the key value pair as a first identifier, and taking the value in the key value pair as a first data value, wherein the first identifier corresponds to the first data value.
For example, in the above example, the JSON node is:
{"firstName":"Brett"}
the firstName may be used as the first identifier and Brett as the first data value. The first identification and the first data value correspond to each other.
In one implementation of the embodiment of the present invention, the first identifier and the first data value may be implemented by a map object. The map object may establish a mapping relationship between the identifier and the value, the first identifier is a primary key in the map object, the first data value is a value corresponding to the primary key in the map object, for example, a mapping relationship between a firstName and a Brett may be established for a map (firstName, Brett), and when the "firstName" in the map object is called, the corresponding value "Brett" may be obtained.
In another implementation manner of the embodiment of the present invention, the mapping relationship between the first identifier and the first data value may be established in the form of a data list. A row in the data list may hold a first identifier and a corresponding first data value.
And step 104, when the JSON node type is an object, taking the name of the object as a first identifier, traversing a first child node of the JSON node, adding the name of the first child node into the first identifier, and taking the value of the first child node as a first data value.
When the JSON node type is determined to be an object, the name of the object can be used as a first identifier, traversal of a first child node of the JSON node is started, and the first child node is a node of a next-layer data structure of the JSON node of the object. For example, the JSON node is:
Figure BDA0001493980510000101
taking the name ' personal information ' of the object as a first identifier, starting to traverse a first child node of the JSON node, wherein the first child node is a key-value pair, and adding the name ' of the first child node into the first identifier, so that the first identifier is ' personal information name '. The value "zhang san" of the first child node is taken as a first data value.
In addition, in the embodiment of the present invention, when there are multiple layers of nested relationships, each first child node may also have a child node, so that when traversing the first child node, each child node of the first child node needs to be traversed.
Similarly, after the first identifier and the first data value are obtained, the first identifier and the first data value may be used as a map object or a data list, and the method is the same as that in step 103, and is not described herein again.
And 105, when the JSON node type is an array and the JSON node is provided with a plurality of second child nodes, taking the name of the array as a first identifier, traversing each second child node of the JSON node one by one, adding the name and the serial number of each second child node into the first identifier respectively to form a plurality of mutually independent first identifiers, and taking the value of each second child node as a plurality of mutually independent first data values, wherein the serial number is the position serial number of the second child node in the array.
When determining that the JSON node type is an array, the name of the array can be taken as a first identifier, and because elements in the array are at least multiple, when the JSON node type is the array, the JSON node is provided with multiple second child nodes, and the second child nodes are nodes of a next-layer data structure of the array JSON node. Every second child node of the JSON node needs to be traversed,
for example, the JSON node may be:
Figure BDA0001493980510000111
then first take the name of the array "student" as the first identifier and begin traversing each of the second child nodes of the JSON node, for the second child nodes { "name": "Mingming", the name of the second child node is "name" and the serial number of the second child node may be 0, the name and the serial number of the second child node are added to the first identifier, the first identifier is "student name 0", and the first data value corresponding to the first identifier is "Mingming";
for the second child node { "name": "three leaves", the name of the second child node is "name" and the serial number of the second child node may be 1, the name and the serial number of the second child node are added to the first identifier, the first identifier is "student name 1", and the first data value corresponding to the first identifier is "three leaves".
By traversing the JSON node, two independent first identifiers and two independent first data respectively corresponding to the two independent first identifiers can be obtained. Therefore, the two corresponding first identifications and first data can be used as two independent lines of data in two independent map objects or data lists.
Similarly, in the embodiment of the present invention, when there are multiple layers of nested relationships, each second child node may also have a child node, so that when traversing to the second child node, each child node of the second child node needs to be traversed.
It is to be understood that, in the embodiment of the present invention, after completing processing of one JSON node, another JSON node may be processed, and a new mapping relationship between another first identifier and the first data value may be established, for example, a new map object is saved, or a new row is added to the data list.
And 106, acquiring a first data value corresponding to the first identifier by calling the first identifier.
Through the steps, one or more first identifiers and corresponding first data values of the first identifiers can be obtained. The mapping relationship between each first identifier and the first data corresponding to the first identifier can be established through a map object or a data list.
Therefore, the first data value corresponding to the first identifier can be conveniently obtained by calling the first identifier. For example, when the first identifier and the first data value are stored through the map object, the first identifier in the map object is called, and the first data value corresponding to the first identifier can be directly obtained. When the first identifier and the first data value are stored through the data list, the first identifier is retrieved from the table, so that the corresponding first data value can be obtained.
In addition, the obtained first identifier includes name information of each layer of node, so that the first identifier can be used as path information for indicating the position of the first data value corresponding to the first identifier in the JSON data structure. Therefore, the first data value corresponding to the first identifier can also be directly obtained from the original JSON data structure through the first identifier.
In the embodiment of the invention, the JOSN node is obtained, the characteristic value of the JOSN node is determined, the type of the JOSN node is judged according to the characteristic value, when the JOSN node is of different types, the JOSN node is analyzed into the first identifier and the first data corresponding to the first identifier by adopting an analysis method corresponding to the different types, wherein the first identifier is the name of the JOSN node and the child node thereof, and the first data is the JOSN node or the concrete data of the child node of the JOSN node, so that the first data corresponding to the JOSN node can be obtained by directly calling the first identifier, the JOSN data is processed, technical personnel intervention is not needed in the whole processing process, the labor cost can be reduced, and the data processing efficiency can be improved.
With reference to the foregoing embodiment, in another implementation manner of the embodiment of the present invention, in step 102, when determining the feature value of the JSON node, the feature value of the JSON node may be specifically determined through a size function.
The size function is a function that can be used to return the size of the array. The size of an array is the number of elements in the array. When the size function is applied to the embodiment of the invention, the size function is called for the JOSN node, and when the type of the JOSN node is an object or an array, the number of parallel elements in the JOSN node can be returned. If the type of the JOSN node is a key-value pair, the JOSN node is considered to contain no parallel elements, and the value 0 is directly returned.
The characteristic value of the JOSN node can be obtained more conveniently through the size function, and the size function is a general standard function, so that the compatibility of the data processing method provided by the embodiment of the invention can be improved, and the method can be suitable for a larger range.
With reference to the foregoing embodiment, in another embodiment provided by the embodiment of the present invention, in step 104, when the JSON node type is an object, taking a name of the object as a first identifier, traversing a first child node of the JSON node, adding the name of the first child node into the first identifier, and taking a value of the first child node as a first data value, includes:
when the JSON node type is an object and the JSON node is provided with a plurality of first child nodes, traversing each first child node of the JSON node one by one, adding the name of each first child node into the first identifier respectively to form a plurality of independent first identifiers, and taking the value of each first child node as a plurality of independent first data values.
When the JSON node type is determined to be an object and the JSON node has a plurality of first child nodes, the name of the object in the JSON node may be used as the first identifier, and each first child node of the JSON node may be traversed one by one.
For example, the JSON node may be:
Figure BDA0001493980510000131
the type of the JSON node is object, and the JSON node has three first child nodes, respectively "name": "Zhang III" and "age": 24 and "blood type": B.
firstly, the name 'personal information' of an object can be used as a first identifier, then, each first child node of the JSON node starts to be traversed, then, the name of each first child node is added into the first identifier respectively to form a plurality of independent first identifiers, and the value of each first child node is used as a plurality of independent first data values. Thus, three mutually independent first marks can be obtained, which are respectively: the "personal information name", "personal information age", and "personal information blood type", and the three mutually independent first identifications respectively correspond to three mutually independent first data values, which are respectively: "Zhang three", 24 and B.
Through traversing the JSON node, three independent first identifications and three corresponding independent first data can be obtained. Then, the three corresponding first identifications and first data can be regarded as three independent lines of data in the three independent map objects or data lists. In the embodiment of the invention, when the JSON node type is an object and the JSON node has a plurality of first child nodes, each first child node of the JSON node can be traversed, all data of the JSON node can be ensured to be processed, and data omission is avoided.
With reference to fig. 2 in conjunction with the above embodiment, after determining the feature value of the JSON node in step 102, and determining the type of the JOSN node according to the feature value, the method may further include:
and step 100, when the JSON node type is an array, taking the name of the array as a second identifier, taking the characteristic value as a second data value, and enabling the second identifier to correspond to the second data value.
When the JSON node type is an array, the name and the feature value of the array may be stored or recorded in a packet by using a second identifier and a second data value corresponding to the second identifier, where the feature value is the number of elements included in the array, that is, the number of second child nodes.
The second identifier and the second data value corresponding to the second identifier may also be implemented by a map object or a data list. The structure form is the same as the first identification and the first data value corresponding to the first identification. However, the second identifier and the second data value may indicate the number of second child nodes in the array of the JSON node, and are not directly used for storing the specific data of the JSON node.
Correspondingly, step 106, obtaining a first data value corresponding to the first identifier by calling the first identifier, includes:
and when the JSON node type is an array, determining the number of the first identifications aiming at the JSON node according to the second data value. And calling the plurality of first identifications according to the number to obtain a plurality of first data values corresponding to the plurality of first identifications.
If the JSON node type is an array, since more than 1 element must exist in the array, that is, there are a plurality of second child nodes, the JSON node forms a plurality of first data values corresponding to the plurality of first identifiers and the plurality of first identifiers, respectively.
When a first data value corresponding to a first identifier needs to be obtained by calling the first identifier, the number of second child nodes of the JSON node can be obtained by first using the second identifier of the JSON node and a second data value corresponding to the second identifier, and the number of the second child nodes is the number of the first identifiers corresponding to the JSON node, so that specific data of individual second child nodes in the selected array type of the JSON node can be selectively obtained according to the number of the first identifiers and the sequence number included in the first identifiers. Or, the specific data of all the second child nodes in the array-type JSON node can be obtained according to the number of the first identifiers, so that the data in the JSON node can be prevented from being omitted.
With reference to the foregoing embodiment, in the data processing method provided in the embodiment of the present invention, when the JSON node type is an object, taking a name of the object as a first identifier, and traversing a first child node of the JSON node, may include:
and when the JSON node type is an object, taking the name of the object as a first identifier, and traversing the first child node of the JSON node in a recursive mode.
Similarly, when the JSON node type is an array and the JSON node has a plurality of second child nodes, taking the name of the array as the first identifier, and traversing each second child node of the JSON node one by one, including:
and when the JSON node type is an array and the JSON node is provided with a plurality of second child nodes, taking the name of the array as a first identifier, and traversing each second child node of the JSON node in a recursive mode.
When the JSON node is an object or an array node, the JSON node may include a plurality of first child nodes or second child nodes, and the first child node and the second child node may also have a plurality of child nodes, respectively. Thereby a complex multi-level node structure can be constructed.
Through a recursion mode, recursion can be carried out from the node at the bottommost layer, so that the names of the nodes of each layer can be respectively added into the first identifications to form a plurality of mutually independent first identifications, and the values of the nodes of each layer are used as a plurality of mutually independent first data values.
Specifically, the first identifier may be used as a parameter of the recursive function by adopting a form of the recursive function, so that the parameter may add the names of the nodes of each layer to the first identifier by means of recursive accumulation layer by layer.
Through a recursive mode, all the multi-layer child nodes of the JSON node can be ensured to be traversed, and node omission is avoided. The data processing of the JSON nodes can be more accurate.
The data processing method provided by the embodiment of the invention is further described by a specific example.
There is a JSON data structure as follows:
Figure BDA0001493980510000161
Figure BDA0001493980510000171
aiming at the JSON data structure, the data processing method provided by the embodiment of the invention is executed through electronic equipment,
acquiring JSON nodes one by one, and firstly acquiring the JSON nodes: "msg": ", determining the characteristic value of the JSON node to be 0 through the size function, thereby determining the JSON node to be a key value pair, taking ' msg ' as a first identifier, taking ' msg ' as a first data value corresponding to the first identifier, and storing the msg ' as a first line of a map object or a data list.
After acquiring the next JSON node "code": and similarly, judging that the JSON node is a key value pair, using "code" as a first identifier, using "sting" as a first data value corresponding to the first identifier, and storing the "sting" as a second row of another map object or a data list.
After the next JSON node is acquired,
Figure BDA0001493980510000172
determining that the characteristic value of the JSON node is 2 through a size function, determining that the JSON node is an object through a syntactic structure, wherein the JSON node is provided with 2 first child nodes, taking 'data' as a first identifier, and traversing each first child node.
And acquiring a first child node, judging that the type of the first child node is an object, adding the name '0' of the first child node into the first identifier, and continuously traversing the child nodes of the first child node. Similarly, the first identifier is added to the "nick _ name" again, that is, the first identifier is: "data0nick _ name", taking "microhal" as the first data value corresponding to the first identifier. In the same way, another first identifier can be obtained as: "data0age", and 16 is taken as the first data value corresponding to the first identifier.
Then obtaining the next first child node, and obtaining a first identifier: "data0mrt" takes-1 as the first data value corresponding to the first identifier.
Through the processing of the JSON node, the obtained three first identifiers and the first data values corresponding to the three first identifiers can be saved as three map objects, or saved in the third, fourth and fifth lines of the data list.
After the next JSON node is acquired,
Figure BDA0001493980510000181
determining that the characteristic value of the JSON node is 3 through a size function, determining that the JSON node is an array through a syntactic structure, wherein the JSON node has 3 second child nodes, taking 'arr' as a first identifier, taking 'arr' as a second identifier, and taking the characteristic value 3 of the JSON node as a second data value corresponding to the second identifier. Similarly, the second identifier and the second data value corresponding to the second identifier may be stored as a map object or in the sixth line of the data list. And then traverse the second child nodes.
And acquiring a first second child node, adding the name '0' of the second child node into the first identifier, and adding the serial number 0 of the second child node into the first identifier, wherein the first identifier is 'arr 00', and the value 0 of the second child node is used as a first data value corresponding to the first identifier.
By the same method, traversing the following second child node to obtain a first identifier 'arr 11' and a first data value 1 corresponding to the first identifier; a first identifier "arr22" is obtained, and the first data value 2 corresponding to the first identifier is obtained.
The resulting three first identifiers and their corresponding first data values are then saved as three map objects or in the seventh, eighth, and ninth rows of the data list.
Thus, the data processing of the JSON data structure is completed, and a plurality of map objects can be obtained, such as: [1] ("msg,")
[2]("code","stirng")
[3]("data0nick_name","michael")
[4]("data0age","16")
[5]("datamrt","-1")
[6]("arr","3")
[7]("arr00","0")
[8]("arr11","1")
[9]("arr22","2")
Alternatively, a data list as shown in table 1 may be obtained.
TABLE 1
0 "msg ""
0 "code" "stirng"
0 "data0nick_name" "michael"
0 "data0age" "16"
0 "datamrt" "-1"
1 "arr" "3"
0 "arr00" "0"
0 "arr11" "1"
0 arr22" "2"
In table 1, the first column may be a distinguishing identifier for distinguishing the first identifier from the second identifier, for example, 0 may be used to indicate that the row records the first identifier and the corresponding first data value, and 1 may be used to indicate that the row records the second identifier and the corresponding second data value.
The second column is the first identifier or the second identifier, and the third column is the first data value or the second data value.
When specific data in the JSON data structure needs to be obtained, the first identifier can be called, so that the first data value corresponding to the first identifier can be conveniently and quickly obtained.
Referring to fig. 3, fig. 3 is a structural diagram of a data processing apparatus according to an embodiment of the present invention, including:
an obtaining module 301, configured to obtain a scripting language object tag JSON node;
a judging module 302, configured to determine a feature value of the JSON node, and according to the feature value, judge a type of the JSON node, where the node type includes a key value pair, an object, and an array, and the feature value is the number of parallel elements in the JSON node;
a first parsing module 303, configured to, when the JSON node type is a key value pair, use a name of a key in the key value pair as a first identifier, and use a value in the key value pair as a first data value, where the first identifier corresponds to the first data value;
a second parsing module 304, configured to, when the JSON node type is an object, use a name of the object as the first identifier, traverse a first child node of the JSON node, add the name of the first child node to the first identifier, and use a value of the first child node as the first data value;
a third parsing module 305, configured to, when the JSON node type is an array and the JSON node has a plurality of second child nodes, use a name of the array as the first identifier, traverse each of the second child nodes of the JSON node one by one, add the name and sequence number of each of the second child nodes to the first identifier, respectively, form a plurality of mutually independent first identifiers, and use a value of each of the second child nodes as a plurality of mutually independent first data values, where the sequence number is a position sequence number of the second child node in the array;
the calling module 306 is configured to obtain a first data value corresponding to the first identifier by calling the first identifier.
In the embodiment of the invention, the JOSN node is obtained, the characteristic value of the JOSN node is determined, the type of the JOSN node is judged according to the characteristic value, when the JOSN node is of different types, the JOSN node is analyzed into the first identifier and the first data corresponding to the first identifier by adopting an analysis method corresponding to the different types, wherein the first identifier is the name of the JOSN node and the child node thereof, and the first data is the JOSN node or the concrete data of the child node of the JOSN node, so that the first data corresponding to the JOSN node can be obtained by directly calling the first identifier, the JOSN data is processed, technical personnel intervention is not needed in the whole processing process, the labor cost can be reduced, and the data processing efficiency can be improved.
Optionally, in the data processing apparatus provided in the embodiment of the present invention, the determining module 302 is specifically configured to:
and determining the characteristic value of the JSON node through a size function.
Optionally, in the data processing apparatus provided in the embodiment of the present invention, the determining module 302 is specifically configured to:
judging whether the characteristic value of the JOSN node is larger than a preset threshold value or not, wherein when the characteristic value of the JOSN node is larger than the preset threshold value, the type of the JOSN node is an array or an object; or when the characteristic value of the JOSN node is not greater than a preset threshold value, the type of the JOSN node is a key value pair.
Optionally, in the data processing apparatus provided in the embodiment of the present invention, the determining module 302 is specifically configured to:
judging whether the characteristic value of the JOSN node is larger than the preset threshold value or not, and determining the type of the JOSN node according to the syntactic structure of the JOSN node; when the characteristic value of the JOSN node is larger than a preset threshold value, the grammatical structure of the JOSN node is in a brace format, and the type of the JOSN node is an object; or when the characteristic value of the JOSN node is greater than a preset threshold value, the syntax structure of the JOSN node is in a middle bracket format, and the type of the JOSN node is an array.
Optionally, in the data processing apparatus provided in the embodiment of the present invention, the second parsing module 304 is specifically configured to:
and when the JSON node type is an object and the JSON node is provided with a plurality of first child nodes, traversing each first child node of the JSON node one by one, adding the name of each first child node into the first identifier respectively to form a plurality of independent first identifiers, and taking the value of each first child node as a plurality of independent first data values.
Optionally, in the data processing apparatus provided in the embodiment of the present invention, the apparatus further includes:
an adding module, configured to, when the JSON node type is an array, use a name of the array as a second identifier, use the feature value as the second data value, and use the second identifier corresponding to the second data value;
correspondingly, the invoking module 306 is specifically configured to:
when the JSON node type is an array, determining the number of a plurality of first identifications aiming at the JSON node according to the second data value; and calling the plurality of first identifications according to the number to obtain a plurality of first data values corresponding to the plurality of first identifications.
Optionally, in the data processing apparatus provided in the embodiment of the present invention, the second parsing module 304 is specifically configured to:
when the JSON node type is an object, taking the name of the object as the first identifier, and traversing a first child node of the JSON node in a recursive mode;
the third parsing module 305 is specifically configured to:
and when the JSON node type is an array and the JSON node is provided with a plurality of second child nodes, taking the name of the array as the first identifier, and traversing each second child node of the JSON node in a recursive mode.
For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
An embodiment of the present invention further provides an electronic device, as shown in fig. 4, including a processor 401, a communication interface 402, a memory 403, and a communication bus 404, where the processor 401, the communication interface 402, and the memory 403 complete mutual communication through the communication bus 404,
a memory 403 for storing a computer program;
the processor 401, when executing the program stored in the memory 403, implements the following steps:
acquiring a JSON node marked by a script language object;
determining a characteristic value of the JSON node, and judging the type of the JOSN node according to the characteristic value, wherein the node type comprises a key value pair, an object and an array, and the characteristic value is the number of parallel elements in the JSON node;
when the JSON node type is a key value pair, taking the name of a key in the key value pair as a first identifier, and taking the value in the key value pair as a first data value, wherein the first identifier corresponds to the first data value;
or, when the JSON node type is an object, taking the name of the object as the first identifier, traversing a first child node of the JSON node, adding the name of the first child node to the first identifier, and taking the value of the first child node as the first data value;
or, when the type of the JSON node is an array and the JSON node has a plurality of second child nodes, taking the name of the array as the first identifier, traversing each second child node of the JSON node one by one, adding the name and the serial number of each second child node into the first identifier respectively to form a plurality of mutually independent first identifiers, taking the value of each second child node as a plurality of mutually independent first data values, wherein the serial number is the position serial number of the second child node in the array;
and obtaining a first data value corresponding to the first identifier by calling the first identifier.
The communication bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
The Memory may include a Random Access Memory (RAM) or a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a network Processor (Ne word Processor, NP), and the like; the Integrated Circuit may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component.
In yet another embodiment of the present invention, a computer-readable storage medium is further provided, which has instructions stored therein, and when the instructions are executed on a computer, the computer is caused to execute the data processing method described in any one of the above embodiments.
In a further embodiment of the present invention, there is also provided a computer program product containing instructions which, when run on a computer, cause the computer to perform the data processing method of any of the above embodiments.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be 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. Also, 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 an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (13)

1. A data processing method, comprising:
acquiring a JSON node marked by a script language object;
determining a characteristic value of the JSON node, and judging the type of the JOSN node according to the characteristic value, wherein the node type comprises a key value pair, an object and an array, and the characteristic value is the number of parallel elements in the JSON node;
when the JSON node type is a key value pair, taking the name of a key in the key value pair as a first identifier, and taking the value in the key value pair as a first data value, wherein the first identifier corresponds to the first data value;
or, when the JSON node type is an object, taking the name of the object as the first identifier, traversing a first child node of the JSON node, adding the name of the first child node to the first identifier, and taking the value of the first child node as the first data value;
or, when the type of the JSON node is an array and the JSON node has a plurality of second child nodes, taking the name of the array as the first identifier, traversing each second child node of the JSON node one by one, adding the name and the serial number of each second child node into the first identifier respectively to form a plurality of mutually independent first identifiers, taking the value of each second child node as a plurality of mutually independent first data values, wherein the serial number is the position serial number of the second child node in the array;
obtaining a first data value corresponding to the first identifier by calling the first identifier;
when the JSON node type is an object, taking the name of the object as the first identifier, traversing a first child node of the JSON node, adding the name of the first child node to the first identifier, and taking the value of the first child node as the first data value, where the method includes:
and when the JSON node type is an object and the JSON node is provided with a plurality of first child nodes, traversing each first child node of the JSON node one by one, adding the name of each first child node into the first identifier respectively to form a plurality of independent first identifiers, and taking the value of each first child node as a plurality of independent first data values.
2. The method of claim 1, wherein the determining the eigenvalues of the JSON node comprises:
and determining the characteristic value of the JSON node through a size function.
3. The method of claim 1, wherein the determining the type of the JOSN node according to the eigenvalue comprises:
judging whether the characteristic value of the JOSN node is larger than a preset threshold value or not;
when the characteristic value of the JOSN node is larger than the preset threshold value, the type of the JOSN node is an array or an object;
or when the characteristic value of the JOSN node is not greater than the preset threshold value, the type of the JOSN node is a key value pair.
4. The method of claim 3, wherein the determining the type of the JOSN node according to the eigenvalue comprises:
judging whether the characteristic value of the JOSN node is larger than the preset threshold value or not, and determining the type of the JOSN node according to the syntactic structure of the JOSN node;
when the characteristic value of the JOSN node is larger than the preset threshold value, the grammatical structure of the JOSN node is in a brace format, and the type of the JOSN node is an object;
or when the characteristic value of the JOSN node is greater than the preset threshold value, the syntax structure of the JOSN node is in a middle bracket format, and the type of the JOSN node is an array.
5. The method as claimed in claim 1, wherein after determining the eigenvalue of the JSON node and determining the type of the JOSN node according to the eigenvalue, the method further comprises:
when the JSON node type is an array, taking the name of the array as a second identifier, and taking the characteristic value as a second data value, wherein the second identifier corresponds to the second data value;
correspondingly, the obtaining a first data value corresponding to the first identifier by calling the first identifier includes:
when the JSON node type is an array, determining the number of a plurality of first identifications aiming at the JSON node according to the second data value;
and calling the plurality of first identifications according to the number to obtain a plurality of first data values corresponding to the plurality of first identifications.
6. The method of claim 1, wherein the taking the name of the object as the first identifier and traversing the first child node of the JSON node when the JSON node type is an object comprises:
when the JSON node type is an object, taking the name of the object as the first identifier, and traversing a first child node of the JSON node in a recursive mode;
when the type of the JSON node is an array and the JSON node has a plurality of second child nodes, taking the name of the array as the first identifier, and traversing each of the second child nodes of the JSON node one by one, including:
and when the JSON node type is an array and the JSON node is provided with a plurality of second child nodes, taking the name of the array as the first identifier, and traversing each second child node of the JSON node in a recursive mode.
7. A data processing apparatus, comprising:
the acquisition module is used for acquiring a JSON node marked by a script language object;
the judging module is used for determining a characteristic value of the JSON node and judging the type of the JOSN node according to the characteristic value, wherein the node type comprises a key value pair, an object and an array, and the characteristic value is the number of parallel elements in the JSON node;
a first parsing module, configured to, when the JSON node type is a key value pair, use a name of a key in the key value pair as a first identifier, and use a value in the key value pair as a first data value, where the first identifier corresponds to the first data value;
a second parsing module, configured to, when the JSON node type is an object, use a name of the object as the first identifier, traverse a first child node of the JSON node, add the name of the first child node to the first identifier, and use a value of the first child node as the first data value;
a third parsing module, configured to, when the JSON node type is an array and the JSON node has a plurality of second child nodes, use a name of the array as the first identifier, traverse each of the second child nodes of the JSON node one by one, add the name and sequence number of each of the second child nodes to the first identifier, respectively, form a plurality of mutually independent first identifiers, use a value of each of the second child nodes as a plurality of mutually independent first data values, where the sequence number is a position sequence number of the second child node in the array;
the calling module is used for obtaining a first data value corresponding to the first identifier by calling the first identifier;
the second parsing module is specifically configured to:
and when the JSON node type is an object and the JSON node is provided with a plurality of first child nodes, traversing each first child node of the JSON node one by one, adding the name of each first child node into the first identifier respectively to form a plurality of independent first identifiers, and taking the value of each first child node as a plurality of independent first data values.
8. The apparatus of claim 7, wherein the determining module is specifically configured to:
and determining the characteristic value of the JSON node through a size function.
9. The apparatus of claim 7, wherein the determining module is specifically configured to:
judging whether the characteristic value of the JOSN node is larger than a preset threshold value or not, wherein when the characteristic value of the JOSN node is larger than the preset threshold value, the type of the JOSN node is an array or an object; or when the characteristic value of the JOSN node is not greater than the preset threshold value, the type of the JOSN node is a key value pair.
10. The apparatus of claim 9, wherein the determining module is specifically configured to:
judging whether the characteristic value of the JOSN node is larger than the preset threshold value or not, and determining the type of the JOSN node according to the syntactic structure of the JOSN node; when the characteristic value of the JOSN node is larger than the preset threshold value, the grammatical structure of the JOSN node is in a brace format, and the type of the JOSN node is an object; or when the characteristic value of the JOSN node is greater than the preset threshold value, the syntax structure of the JOSN node is in a middle bracket format, and the type of the JOSN node is an array.
11. The apparatus of claim 7, further comprising:
the adding module is used for taking the name of the array as a second identifier and taking the characteristic value as a second data value when the JSON node type is the array, and the second identifier corresponds to the second data value;
correspondingly, the calling module is specifically configured to:
when the JSON node type is an array, determining the number of a plurality of first identifications aiming at the JSON node according to the second data value; and calling the plurality of first identifications according to the number to obtain a plurality of first data values corresponding to the plurality of first identifications.
12. The apparatus of claim 7, wherein the second parsing module is specifically configured to:
when the JSON node type is an object, taking the name of the object as the first identifier, and traversing a first child node of the JSON node in a recursive mode;
the third parsing module is specifically configured to:
and when the JSON node type is an array and the JSON node is provided with a plurality of second child nodes, taking the name of the array as the first identifier, and traversing each second child node of the JSON node in a recursive mode.
13. An electronic device is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing mutual communication by the memory through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any of claims 1-6 when executing a program stored in the memory.
CN201711262677.2A 2017-12-04 2017-12-04 Data processing method and device and electronic equipment Active CN108008936B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711262677.2A CN108008936B (en) 2017-12-04 2017-12-04 Data processing method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711262677.2A CN108008936B (en) 2017-12-04 2017-12-04 Data processing method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN108008936A CN108008936A (en) 2018-05-08
CN108008936B true CN108008936B (en) 2021-03-19

Family

ID=62056715

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711262677.2A Active CN108008936B (en) 2017-12-04 2017-12-04 Data processing method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN108008936B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110764768A (en) * 2018-07-26 2020-02-07 北京京东金融科技控股有限公司 Method and device for mutual conversion between model object and JSON object
CN109241164A (en) * 2018-08-24 2019-01-18 北京智能管家科技有限公司 A kind of data processing method, device, server and storage medium
CN111061927B (en) * 2018-10-16 2023-06-20 阿里巴巴集团控股有限公司 Data processing method and device and electronic equipment
CN109508409A (en) * 2018-10-23 2019-03-22 魔秀科技(北京)股份有限公司 A kind of semi-structured json data freely parse adaptation method
CN109766100A (en) * 2018-12-11 2019-05-17 新华三技术有限公司合肥分公司 Data processing method and device
CN112612563A (en) * 2020-12-16 2021-04-06 上海哔哩哔哩科技有限公司 Page test data generation method and device and computer equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104331315A (en) * 2014-10-31 2015-02-04 北京思特奇信息技术股份有限公司 Analysis and generation method and system of json object of any level
CN105354020A (en) * 2015-09-30 2016-02-24 武汉钢铁(集团)公司 Json format data analytic method and data receiving end
CN107220096A (en) * 2017-04-20 2017-09-29 北京小度信息科技有限公司 A kind of json data analysis methods and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9928060B2 (en) * 2015-11-30 2018-03-27 International Business Machines Corporation Tracking changes within Javascript object notation

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104331315A (en) * 2014-10-31 2015-02-04 北京思特奇信息技术股份有限公司 Analysis and generation method and system of json object of any level
CN105354020A (en) * 2015-09-30 2016-02-24 武汉钢铁(集团)公司 Json format data analytic method and data receiving end
CN107220096A (en) * 2017-04-20 2017-09-29 北京小度信息科技有限公司 A kind of json data analysis methods and device

Also Published As

Publication number Publication date
CN108008936A (en) 2018-05-08

Similar Documents

Publication Publication Date Title
CN108008936B (en) Data processing method and device and electronic equipment
CN111062013B (en) Account filtering method and device, electronic equipment and machine-readable storage medium
CN107992738B (en) Account login abnormity detection method and device and electronic equipment
CN110572409B (en) Industrial Internet security risk prediction method, device, equipment and storage medium
CN109474640B (en) Malicious crawler detection method and device, electronic equipment and storage medium
CN108763274A (en) Recognition methods, device, electronic equipment and the storage medium of access request
CN105760395A (en) Data processing method, device and system
US20180052939A1 (en) Systems and methods for categorizing webpage bookmarks
CN109474691B (en) Method and device for identifying equipment of Internet of things
CN110928874A (en) Information processing method, device and system, electronic equipment and storage medium
CN111078773B (en) Data processing method and device
CN113158627A (en) Code complexity detection method and device, storage medium and electronic equipment
CN111008873B (en) User determination method, device, electronic equipment and storage medium
CN108154024A (en) A kind of data retrieval method, device and electronic equipment
CN111698256A (en) Method and device for detecting illegal link
CN110020166B (en) Data analysis method and related equipment
CN108038233B (en) Method and device for collecting articles, electronic equipment and storage medium
CN110727895A (en) Sensitive word sending method and device, electronic equipment and storage medium
CN111444392B (en) Vulnerability library access method, device and equipment
CN111736848B (en) Packet conflict positioning method, device, electronic equipment and readable storage medium
CN110059272B (en) Page feature recognition method and device
CN113849482A (en) Data migration method and device and electronic equipment
CN113779029A (en) Data query method and device
CN111258899A (en) Use case generation method and device, electronic equipment and computer readable storage medium
CN112347324A (en) Document query method and device, electronic equipment and storage medium

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