CN109542541A - Unserializing method and device - Google Patents
Unserializing method and device Download PDFInfo
- Publication number
- CN109542541A CN109542541A CN201710861263.5A CN201710861263A CN109542541A CN 109542541 A CN109542541 A CN 109542541A CN 201710861263 A CN201710861263 A CN 201710861263A CN 109542541 A CN109542541 A CN 109542541A
- Authority
- CN
- China
- Prior art keywords
- data
- type
- data content
- character string
- json character
- 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.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/54—Interprogram communication
- G06F9/546—Message passing systems or structures, e.g. queues
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2209/00—Indexing scheme relating to G06F9/00
- G06F2209/54—Indexing scheme relating to G06F9/54
- G06F2209/547—Messaging middleware
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Devices For Executing Special Programs (AREA)
- Stored Programmes (AREA)
Abstract
The invention discloses a kind of unserializing method and devices, it is related to technical field of data processing, in order to solve in the prior art, during JSON character string is deserialized as Java object, when carrying out unserializing operation to the data content that all original data types in JSON character string are value type according to the value type of the highest data content of data precision, the problem of data precision of some data contents changes in the Java object that causes unserializing to obtain.The method comprise the steps that receiving JSON character string;JSON character string is parsed, parsing result is obtained;It determines the original data type of the corresponding data content of each field name, and judges whether to contain at least two original data type in data content for the data content of value type;If so, JSON character string is converted to Java object respectively according to the corresponding original data type of each data content.During JSON character string is deserialized as Java object.
Description
Technical field
The present invention relates to technical field of data processing, more particularly to a kind of unserializing method and device.
Background technique
Increasingly developed with Internet technology, the information exchange between different application systems becomes more frequently.Due to
When developing different application systems, used programming language is different, therefore information exchange is carried out between different application systems
When, it needs to be converted to object to be transmitted a kind of general data format, then carries out data transmission again.Due to JSON
(JavaScript Object Notation, JavaScript object representation) structure is that one kind is totally independent of programming language
Lightweight data interchange format, therefore use JSON structure as between different application systems data transmit transport vehicle have
Very big advantage.
Currently, between two different application systems carry out information exchange during, when use JSON structure as biography
When transmission carrier, usually in the API of an application system, (Application Program Interface, application program are connect
Mouthful) in object sequence to be transmitted is turned to the character string of JSON structure, the JSON character string is then sent to another application
In the API of system, and the JSON character string is deserialized as the corresponding object of programming language used in the application system.
During inventor states invention in realization, JSON character string is being deserialized as Java in the prior art by discovery
During object, in multiple fields that JSON character string includes, there is the original of the corresponding data content of at least two fields
When data type is value type, it is thus necessary to determine that the highest data content of data precision in multiple data contents, then according to this
The corresponding value type of a data content is in the data of value type to all original data types in this JSON character string
Hold and carries out unserializing operation, the number of the data content of some value types in the Java object obtained so as to cause unserializing
It changes according to precision, therefore, JSON character string, which is deserialized as Java object, by the prior art will lead to unserializing
The data precision of obtained Java object is often unable to satisfy actual needs.
Summary of the invention
In view of this, unserializing method and device provided by the invention, main purpose is to overcome by JSON character
During string is deserialized as Java object, according to the corresponding value type of the highest data content of data precision to JSON word
All original data types are that the data content of value type carries out unserializing operation in symbol string, and unserializing is caused to obtain
The problem of data precision of some data contents changes in Java object, to improve Java pairs that unserializing obtains
The accuracy rate of elephant.
To solve the above-mentioned problems, present invention generally provides following technical solutions:
In a first aspect, the present invention provides a kind of unserializing methods, this method comprises:
Receive JSON character string;
The JSON character string is parsed, parsing result is obtained, wherein includes multiple fields in the parsing result, each
The field includes: field name and corresponding data content;
Determine the original data type of the corresponding data content of each field name, and judge in the data content whether
Contain at least two the data content that original data type is value type;
If so, the JSON character string is converted to respectively according to the corresponding original data type of each data content
Java object.
Optionally, the original data type for determining the corresponding data content of each field name includes:
The corresponding data content of each field name is identified using parsing code;
Judge whether the data content is numeric type data;
If so, determining the corresponding data precision of the data content, and the data are determined according to the data precision
The corresponding original data type of content.
Optionally, the JSON character string is converted to respectively according to the corresponding original data type of each data content
Java object includes:
The each data content for including in the parsing result is obtained one by one and each data content is corresponding original
Data type;
According to the corresponding original data type of each data content, successively each data content is converted
Operation, generates the Java object.
Optionally, the type of the numeric type data includes: int type, long type, float type, double type.
Optionally, before receiving JSON character string, the method also includes:
Arrangement parses code in data transmission interface, wherein the data transmission interface is for receiving the JSON word
Symbol string, the parsing code include to obtain each field in the JSON character string for parsing the JSON character string
Field name and corresponding data content.
Optionally, the method also includes:
Each field name is cached with the mapping relations of corresponding original data type;
When the data transmission interface receives JSON character string identical with the JSON character string structure, from caching
The middle original data type for obtaining the corresponding data content of each field name that the identical JSON character string of the structure includes,
So that the identical JSON character string of the structure is converted to respectively according to the corresponding original data type of each data content
Java object.
Second aspect, the present invention also provides a kind of unserializing device, which includes:
Receiving unit, for receiving JSON character string;
Resolution unit obtains parsing result for parsing the received JSON character string of the receiving unit, wherein
It include multiple fields in the parsing result, each field includes: field name and corresponding data content;
Determination unit, for determining the original of the corresponding data content of each field name that the resolution unit parses
Beginning data type;
Judging unit, for judging whether to contain at least two original data type in the data content for value type
Data content;
Converting unit, for judging to contain at least two original data type in the data content when the judging unit
For value type data content when, according to the corresponding original data type of each data content respectively by the JSON character string
Be converted to Java object.
Optionally, the determination unit includes:
Identification module, for identifying the corresponding data content of each field name using parsing code;
Judgment module, for judging whether the data content of the identification module identification is numeric type data;
Determining module, for determining the number when the judgment module judges the data content for numeric type data
The corresponding original data type of the data content is determined according to the corresponding data precision of content, and according to the data precision.
Optionally, the converting unit includes:
Module is obtained, for being obtained in each data content for including in the parsing result and each data one by one
Hold corresponding original data type;
Generation module, the corresponding initial data class of each data content for being obtained according to the acquisition module
Type successively carries out conversion operation to each data content, generates the Java object.
Optionally, the type of the numeric type data includes: int type, long type, float type, double type.
Optionally, described device further include:
Unit of deployment, for the arrangement parsing code in data transmission interface, wherein the data transmission interface is for connecing
The JSON character string is received, the parsing code is every in the JSON character string to obtain for parsing the JSON character string
The field name and corresponding data content that a field includes.
Optionally, described device further include:
Cache unit, for delaying each field name with the mapping relations of corresponding original data type
It deposits;
Acquiring unit, for receiving JSON word identical with the JSON character string structure when the data transmission interface
When symbol string, each field name that the identical JSON character string of the structure of the cache unit caching includes is obtained from caching
Claim the original data type of corresponding data content, so as to according to the corresponding original data type of each data content respectively by institute
It states the identical JSON character string of structure and is converted to Java object.
To achieve the goals above, according to the third aspect of the invention we, a kind of storage medium, the storage medium are provided
Program including storage, wherein equipment where controlling the storage medium in described program operation executes described above anti-
Sequencing method.
To achieve the goals above, according to the fourth aspect of the invention, a kind of processor is provided, the processor is used for
Run program, wherein described program executes unserializing method described above when running.
By above-mentioned technical proposal, technical solution provided by the invention is at least had the advantage that
A kind of unserializing method and device provided by the invention, the JSON character string that the present invention can be received in parsing
Later, it is determined in the field name and corresponding data for each field for including in the JSON character string according to parsing result
Hold, and determine the original data type of the corresponding data content of each field name, when by judging to wrap in the JSON character string
When containing at least two the data content that original data type is value type in all data contents contained, according to each data
The corresponding original data type of content carries out unserializing operation to each data content respectively, which is converted to
Java object is right and in the prior art according to the corresponding value type of the highest data content of data precision in JSON character string
All original data types are that the data content of value type carries out unserializing operation in JSON character string, by JSON character string
Java object is converted to compare, present invention can ensure that the value type in the Java object operated by unserializing
The data precision of data content is consistent with the data precision of corresponding data content in JSON character string, to improve antitone sequence
Change the accuracy rate of obtained Java object.
The above description is only an overview of the technical scheme of the present invention, in order to better understand the technical means of the present invention,
And it can be implemented in accordance with the contents of the specification, and in order to allow above and other objects of the present invention, feature and advantage can
It is clearer and more comprehensible, the followings are specific embodiments of the present invention.
Detailed description of the invention
By reading the following detailed description of the preferred embodiment, various other advantages and benefits are common for this field
Technical staff will become clear.The drawings are only for the purpose of illustrating a preferred embodiment, and is not considered as to the present invention
Limitation.And throughout the drawings, the same reference numbers will be used to refer to the same parts.In the accompanying drawings:
Fig. 1 shows a kind of unserializing method flow diagram provided in an embodiment of the present invention;
Fig. 2 shows another unserializing method flow diagrams provided in an embodiment of the present invention;
Fig. 3 shows a kind of composition block diagram of unserializing device provided in an embodiment of the present invention;
Fig. 4 shows the composition block diagram of another unserializing device provided in an embodiment of the present invention.
Specific embodiment
Exemplary embodiments of the present disclosure are described in more detail below with reference to accompanying drawings.Although showing the disclosure in attached drawing
Exemplary embodiment, it being understood, however, that may be realized in various forms the disclosure without should be by embodiments set forth here
It is limited.On the contrary, these embodiments are provided to facilitate a more thoroughly understanding of the present invention, and can be by the scope of the present disclosure
It is fully disclosed to those skilled in the art.
The embodiment of the invention provides a kind of unserializing methods, as shown in Figure 1, the JSON that this method is received in parsing
After character string, the initial data for the corresponding data content of each field for including in JSON character string is determined according to parsing result
Type, and unserializing operation is carried out to each data content according to each data content corresponding original data type, it will
JSON character string is converted to Java object, improves the accuracy rate for the Java object that unserializing obtains, this method comprises:
101, JSON character string is received.
Wherein, between the application system developed at two by different programming languages carry out information exchange when, cannot directly by
Object to be transmitted is sent in another application system from an application system, needs object to be transmitted being converted to one
The general data format of kind, then carries out data transmission again.JSON (JavaScript Object Notation,
JavaScript object representation) character string is with the character string of JSON structure storing data, since JSON structure is one to finish
Entirely independently of the lightweight data interchange format of programming language, therefore the transmission for using JSON character string to transmit as data carries
Body can satisfy and carry out information exchange between two different application systems.Wherein, a JSON character string with " " (left side includes
Number) start, with " " (right parenthesis) terminate, in JSON character string include multiple disorderly arranged fields, each field is by word
Name section and the field name corresponding data content composition are expressed, field name in the form of " name/data content "
Separated between the corresponding data content of the field name with ": ", is separated between multiple fields with ", ", for example, one
JSON character string can be " { name1:value1, name2:value2, name3:value3 } ".Wherein, field name is corresponding
Data can be character string, numerical value, object, Boolean, NULL value or array.
In embodiments of the present invention, information exchange is carried out between the application system developed at two by different programming languages
When, when object to be transmitted is converted to JSON character string by an application system, and the JSON is sent to another application system
When character string, another application system can receive to obtain the JSON character string.
102, JSON character string is parsed, parsing result is obtained.
It wherein, include multiple fields in parsing result, each field includes: field name and corresponding data content.
In embodiments of the present invention, after application system receives the JSON character string of other application system transmission, not
The particular content for including in the JSON can be directly determined, needs to carry out parsing operation to the JSON character string, according to obtained solution
Analysis result determine each field for including in the JSON character string field name and corresponding data content.
For the embodiment of the present invention, concrete application scene can be as follows, but not limited to this include:
Information exchange is carried out between application system A and application system B, first time, application system A sent JSON character string 1
Into application system B, application system B receives to obtain JSON character string 1, and parses JSON character string 1, thus according to parsing result
Determine each field for including in JSON character string 1 field name and corresponding data content.Wherein, JSON character is parsed
1 obtained parsing result of string be Local:hebei, Channel:CCTV-1, allPeopleCount:123001,
AllPlayTime:20023.12 }, it is determined in JSON character string 1 according to parsing result comprising 4 fields, respectively field 1: word
Name section " Local ", corresponding data content " hebei ";Field 2: field name " Channel ", corresponding data content
"CCTV-1";Field 3: field name " allPeopleCount ", corresponding data content " 123001 ";Field 4: field name
" allPlayTime ", corresponding data content " 20023.12 ", the content of physical record is place region in JSON character string 1
Total number of persons for user's viewing CCTV-1 in Hebei is 123001 people, and the total duration of viewing is 20023.12 hours.It answers for the second time
JSON character string 2 is sent in application system B with system A, application system B receives to obtain JSON character string 2, and parses JSON
Character string 2, to determine the field name of each field for including in JSON character string 2 and corresponding according to parsing result
Data content.Wherein, the obtained parsing result of parsing JSON character string 2 be Local:shandong, Channel:CCTV-5,
AllPeopleCount:135002, allPlayTime:19073.52 }, it is determined in JSON character string 2 according to parsing result and includes
4 fields, field 1: field name " Local ", corresponding Data Data " shandong ";Field 2: field name
" Channel ", corresponding data content " CCTV-5 ";Field 3: field name " allPeopleCount ", in corresponding data
Hold " 135002 ";Field 4: field name " allPlayTime ", corresponding data content " 19073.52 ", in JSON character string 2
The content of physical record is that the total number of persons for user's viewing CCTV-5 that place region is Shandong is 135002 people, the total duration of viewing
It is 19073.52 hours.
Need to be illustrated, the quantity for the field for including in the JSON character string that above-described embodiment refers to, each
The field name of field and corresponding data content are only to be convenient for expressing, and in actual application, are wrapped in JSON character string
The field quantity contained can be that any number, the field name of each field and corresponding data content can be in any
Hold.
103, determine the original data type of the corresponding data content of each field name, and judge in data content whether
Contain at least two the data content that original data type is value type.
Wherein, original data type may include value type, character string type, boolean's Value Types, object type, NULL
Value Types and array data type etc..It wherein, is the data precision of the data content of value type according to original data type,
Value type can be specifically divided into: int type, long type, float type, double type etc., data precision refers to when some data
When content is a specific numerical value, the number of significant digit of this numerical value, for the numerical value of integer form, number of significant digit mostly generation
The corresponding data precision of table is higher;For the numerical value of non-integer form, after decimal point number of significant digit represent it is corresponding
Data precision is higher.
In embodiments of the present invention, JSON character string is parsed in step 102, which is determined according to obtained parsing result
After the field name for each field for including in character string and corresponding data content, determine that each field name is corresponding
The original data type of data content, and judge according to determining result all data contents for including in the JSON character string
In whether contain at least two original data type be value type data content.
For example, the JSON character string 1 received in the aforementioned embodiment, after parsing JSON character string 1, is tied according to parsing
Fruit determines in JSON character string 1 comprising 4 fields, respectively field 1: field name " Local ", corresponding data content
"hebei";Field 2: field name " Channel ", corresponding data content " CCTV-1 ";Field 3: field name
" allPeopleCount ", corresponding data content " 123001 ";Field 4: field name " allPlayTime ", corresponding number
According to content " 20023.12 ", the original data type of the corresponding data content of each field name: field name " Local " is determined
The original data type of corresponding data content " hebei " is character string type: string type, field name " Channel " are right
The original data type for the data content " CCTV-1 " answered is character string type: string type, field name
The original data type of " allPeopleCount " corresponding data content " 123001 " is value type: int type, field name
The original data type of " allPlayTime " corresponding data content " 20023.12 " is value type: float type.In determination
After the original data type of the corresponding data content of each field name, judge in all data for including in JSON character string 1
Whether data content that two original data types be value type is included at least in appearance.
104, if so, being respectively converted to JSON character string according to the corresponding original data type of each data content
Java object.
In embodiments of the present invention, include when step 103 determines in all data contents for including in the JSON character string
When at least two original data types are the data content of value type, according to the corresponding original data type of each data content
Unserializing operation is carried out to each data content respectively, which is converted into Java object, so as to avoid pressing
According to the corresponding value type of the highest data content of data precision in JSON character string, to all initial data in JSON character string
Type is that the data content of value type carries out unserializing operation, some data in the Java object for causing unserializing to obtain
The problem of data precision of content changes.Wherein, unserializing operation is that JSON character string is converted to Java object
Process.
Further, it is operated by unserializing, after JSON character string is converted to Java object, get can be passed through
() method obtains the data encapsulated in Java object.
It should be noted that the certain original data types for including in actual application, in JSON character string are number
The data content of Value Types can be expressed with the numerical value of non-integer form, and certain original data types are the number of value type
It is expressed according to the numerical value of content and unavailable non-integer form, for example, number or some objects: computer, mobile phone, cup etc..
If the data content expressed the numerical value of these unavailable non-integer forms comes according to the higher value type of data precision
Unserializing operation is carried out, then the meaning that corresponding data content is referred in the Java object being converted to will change
Become, be number of delegates is 100 for example, the corresponding data content of a certain field is " 100 " in JSON character string, corresponding original
Beginning data type is " int type ", if carrying out unserializing operation to the data according to " float type ", obtained result may be
For " number " and decimal form is not present in " 100.00 ", so result and actual conditions that unserializing obtains exist
Error, therefore during JSON character string is deserialized as Java object, when including multiple original numbers in JSON character string
When according to the data content that type is value type, need according to the corresponding original data type of each data content respectively to each
Data content carries out unserializing operation, to guarantee the data content of the value type in Java object that unserializing obtains
Data precision it is consistent with the data precision of corresponding data content in JSON character string.
For example, in the data that field 3 and field 4 include in the JSON character string 1 passed through in the determining previous embodiment of judgement
The original data type of appearance is value type, now according to the corresponding original number of each data content for including in JSON character string 1
Unserializing operation is carried out to each data content respectively according to type: by data content " hebei " according to corresponding initial data
Type " string type " carries out unserializing operation, data content " CCTV-1 " according to corresponding original data type " string
Type " carries out unserializing operation, data content " 123001 " and carries out unserializing according to corresponding original data type " int type "
Operation, data content " 20023.12 " carry out unserializing operation according to corresponding original data type " float type ", by JSON
Character string 1 is converted to Java object 1, Java object 1 specifically:
class Vod{
private string Local;
private string Channel;
private int allPeopleCount;
private float allPlayTime;}
The data encapsulated in Java object 1 are obtained by get () method, obtaining result is Local=hebei, Channel
=CCTV-1, allPeopleCount=123001, allPlayTime=20023.12.
A kind of unserializing method provided in an embodiment of the present invention, the JSON that the embodiment of the present invention can be received in parsing
After character string, the field name of each field for including in the JSON character string and corresponding is determined according to parsing result
Data content, and determine the original data type of the corresponding data content of each field name, when by judging the JSON character
When containing at least two the data content that original data type is value type in all data contents for including in string, according to every
The corresponding original data type of a data content carries out unserializing operation to each data content respectively, by the JSON character string
Java object is converted to, and in the prior art according to the corresponding numerical value class of the highest data content of data precision in JSON character string
Type carries out unserializing operation to the data content that all original data types in JSON character string are value type, by JSON
Character string is converted to Java object and compares, and the embodiment of the present invention can guarantee in the Java object operated by unserializing
Value type data content data precision it is consistent with the data precision of corresponding data content in JSON character string, thus
Improve the accuracy rate for the Java object that unserializing obtains.
Below in order to be explained in more detail, the embodiment of the invention provides another unserializing methods, especially press
JSON character string is converted to the specific method of Java object respectively according to the corresponding original data type of each data content, specifically
As shown in Fig. 2, this method comprises:
201, arrangement parses code in data transmission interface.
Wherein, data transmission interface is API (the Application Programming in application system
Interface, application programming interface), application system sends and receivees JSON character string by data transmission interface, thus
It realizes and is carried out data transmission between different application systems by JSON character string.Parsing code is for parsing the JSON word received
Symbol string, to determine the field name of each field for including in the JSON character string and right according to obtained parsing result
The data content answered.
In embodiments of the present invention, the arrangement parsing code in data transmission interface in advance is needed, is being received so as to subsequent
To after JSON character string, the JSON character string that can be received by the parsing code analysis of arrangement, and according to obtained parsing
As a result determine each field for including in the JSON character string field name and corresponding data content.
202, JSON character string is received.
Wherein, about step 202, reception JSON character string, the description of Fig. 1 corresponding part can be referred to, the present invention is implemented
Example will not be described in great detail herein.
203, JSON character string is parsed, parsing result is obtained.
Wherein, about step 203, parsing JSON character string, parsing result is obtained, it can retouching with reference to Fig. 1 corresponding part
It states, the embodiment of the present invention will not be described in great detail herein.
204, the original data type of the corresponding data content of each field name is determined.
In the present invention is implemented, each word for including in JSON character string is determined using the parsing code of step 201 arrangement
The original data type of the corresponding data content of name section.It below will be to how use parsing code determines each field name pair
The original data type for the data content answered is described in detail.
(1) the corresponding data content of each field name is identified using parsing code.
JSON character string that parsing code analysis in abovementioned steps through preparatory arrangement receives, and according to obtaining
After parsing result determines field name and the corresponding data content of each field for including in the JSON character string, adopt
The corresponding data content of each field name is identified with the parsing code, to determine according to the particular content of each data content
Corresponding original data type.
(2) judge whether data content is numeric type data.
Wherein, numeric type data specifically refers to a numerical value, can be an integer numerical value, or a non-integer
Numerical value, the type of numeric type data include: int type, long type, float type, double type, int type be integer numerical value type,
Long type is long value type, float type is single-precision floating point type value type, double type is double-precision floating point type number
Value Types.Wherein, the corresponding type of the numeric type data of integer form are as follows: int type and long type are compared to int type, long
The number of significant digit of the numerical value of type storage;The corresponding type of the numeric type data of non-integer form are as follows: float type and double type,
It is compared to float type, it is more that double type can retain the digit after non-integer values decimal point.
After above-mentioned steps (1) is using all data contents for including in parsing code identification JSON character string, divide
Do not judge whether each data content is numeric type data, i.e., judges whether each data content is a specific number respectively
Value.When some data content is character string or is object etc., the corresponding original number of this data content can be directly determined
It is character string type according to type or is object type etc.;But when some data content is numeric type data, in determination
The corresponding original data type of this data content be value type on the basis of, it is subsequent also to need to determine that the data content is corresponding
Original data type is specially any in value type.Therefore, it is necessary to judge whether each data content is numerical value respectively
Type data.
For example, being determined in JSON character string 1 according to parsing result comprising 4 words by aforementioned parsing JSON character string 1
Section, respectively field 1: field name " Local ", corresponding data content " hebei ";Field 2: field name " Channel ",
Corresponding data content " CCTV-1 ";Field 3: field name " allPeopleCount ", corresponding data content " 123001 ";
Field 4: field name " allPlayTime ", corresponding data content " 20023.12 ".JSON character is identified using parsing code
In string 1 after the corresponding data content of each field name, judge whether this 4 data contents are numeric type data respectively, according to
Judging result is learnt: data content " hebei " and data content " CCTV-1 " are character string, so that it is determined that data content
" hebei " and the corresponding original data type of data content " CCTV-1 " are character string type: string type;Data content
" 123001 " and data content " 20023.12 " are numeric type data, so that it is determined that data content " 123001 " and data content
" 20023.12 " corresponding original data type is value type.
(3) if so, determining the corresponding data precision of data content, and determine that data content is corresponding according to data precision
Original data type.
Judged according to above-mentioned steps (2), when determining that some data content is numeric type data, it is determined that the data content pair
The data precision answered, and determine that the corresponding original data type of the data content is specially in value type according to the data precision
It is any.For the numeric type data of integer form can determine corresponding original data type be int type or long type, when
When the number of significant digit of the numeric type data is more, i.e. precision is higher, determine that the corresponding original data type of the numeric type data is
Long type;When the number of significant digit of the numeric type data is less, i.e. precision is lower, the corresponding original number of the numeric type data is determined
It is int type according to type.The corresponding initial data class of the numeric type data can be determined for the numeric type data of non-integer form
Type is float type or double type, when number of significant digit is relatively more, i.e. precision is higher after the numeric type data decimal point, is determined
The corresponding original data type of the numeric type data is double type;Number of significant digit compares after the numeric type data decimal point
Less, when i.e. precision is lower, determine that the corresponding original data type of the numeric type data is float type.
It should be noted that for determining the numeric type when number of significant digit of the numeric type data of integer form is how many
Data determine that the numeric type data is long type when being int type, how many, and for the numeric type data of non-integer form,
It is determined when number of significant digit is how many after decimal point and determines the numeric type data when numeric type data is float type, how many
It can be determined in actual application according to specific requirements for double type, in embodiments of the present invention without limit
It is fixed.
For example, being learnt in JSON character string 1 by judgement in the aforementioned embodiment, in data content " 123001 " and data
Hold " 20023.12 " be numeric type data, corresponding original data type is value type, when determining data content " 123001 "
Data precision after, according to the data precision determine the corresponding original data type of data content " 123001 " be value type:
Int type;After determining the data precision of data content " 20023.12 ", data content is determined according to the data precision
" 20023.12 " corresponding original data type is value type: float type.
205, judge whether to contain at least two original data type in data content for the data content of value type.
Wherein, about step 205, judge whether to contain at least two original data type in data content for value type
Data content, the description of Fig. 1 corresponding part can be referred to, the embodiment of the present invention will not be described in great detail herein.
206, if so, being respectively converted to JSON character string according to the corresponding original data type of each data content
Java object.
In embodiments of the present invention, include when step 204 determines in all data contents for including in the JSON character string
When at least two original data types are the data content of value type, according to the corresponding original data type of each data content
Unserializing operation is carried out to each data content respectively, which is converted into Java object.Below will to how
JSON character string is converted to Java object to be described in detail.
(1) each data content for including in parsing result and the corresponding initial data class of each data content are obtained one by one
Type.
In the aforementioned embodiment, the JSON character string received by the parsing code analysis of preparatory arrangement, and root
It is determined in the field name and corresponding data for each field for including in the JSON character string according to obtained parsing result
Hold, and determines that the original data type of the corresponding data content of each field name obtains one by one in embodiments of the present invention
The each data content and the corresponding original data type of each data content for including in parsing result, i.e., obtain the JSON one by one
The each data content and the corresponding original data type of each data content for including in character string.
(2) according to the corresponding original data type of each data content, conversion operation successively is carried out to each data content,
Generate Java object.
It is acquired in each data content for including in JSON character string and each data one by one when by step (1)
Hold corresponding original data type, according to the corresponding original data type of each data content, successively to each data content into
Row unserializing operation, i.e., according to the corresponding original data type of first data content in the JSON character string to first number
Unserializing operation is carried out according to content, after this, according to the corresponding original data type of second data content to second
Data content carries out unserializing operation and completes the inverted sequence of all data contents in the JSON character string using identical method
Columnization operation, generates corresponding Java object.Further, the number encapsulated in Java object can be obtained by get () method
According to.
For the embodiment of the present invention, concrete application scene can be as follows, but not limited to this include:
In the aforementioned embodiment, it determines in the JSON character string 1 received comprising 4 data contents, is respectively as follows: in data
Hold " hebei ", data content " CCTV-1 ", data content " 123001 ", data content " 20023.12 ", and determines in data
Hold " hebei " and the corresponding original data type of data content " CCTV-1 " is character string type: string type, data content
" 123001 " corresponding original data type is value type: int type, the corresponding initial data class of data content " 20023.12 "
Type is value type: float type.The each data content and each data content for including in JSON character string 1 are now obtained one by one
Corresponding original data type, and according to the corresponding original data type of each data content, successively to each data content into
Row conversion operation, i.e., firstly, carrying out unserializing operation to data content " hebei " according to " string type ";Then, according to
" string type " carries out unserializing operation to data content " CCTV-1 ";Secondly, according to " int type " to data content
" 123001 " carry out unserializing operation;Finally, carrying out unserializing behaviour to data content " 20023.12 " according to " float type "
Make, after completing above-mentioned unserializing operation, generate corresponding Java object 1, Java object 1 specifically:
class Vod{
private string Local;
private string Channel;
private int allPeopleCount;
private float allPlayTime;}
The data encapsulated in Java object 1 are obtained by get () method, obtaining result is Local=hebei, Channel
=CCTV-1, allPeopleCount=123001, allPlayTime=20023.12.
Further, in actual application, the multiple JSON character strings received in the same data transmission interface
Structure be consistent, i.e., the field name of the field number and each field that include in multiple JSON character strings is consistent
, for example, the data transmission interface of application system A receives JSON character string A and JSON character string B, wherein JSON character string A
Comprising 3 fields, corresponding JSON character string B also includes 3 fields;The field name and JSON of field 1 in JSON character string A
The field name of field 1 is consistent in character string B, field 2 in the field name of field 2 and JSON character string B in JSON character string A
Field name is consistent and JSON character string A in the field name of field 3 and the field name of field 3 in JSON character string B
Also consistent.
Therefore, Java is deserialized as in order to improve same data transmission interface for the identical JSON character string of multiple structures
The transfer efficiency of object can also receive in another implementation of the embodiment of the present invention by data transmission interface
The first JSON character string be deserialized as corresponding Java object after, each field that will include in the first JSON character string
Field name data content corresponding with each field name original data type between mapping relations cached, when
When the data transmission interface receives the 2nd JSON character string, determined by the 2nd JSON character string of analytical tool code analysis
2nd JSON character string is identical as the first JSON character string structure, each in the first JSON character string from obtaining in caching at this time
The original data type of the corresponding data content of field name, as the corresponding number of field name each in the 2nd JSON character string
According to the original data type of content, so as to subsequent according to the corresponding original data type of each data content, successively to second
The each data content for including in JSON character string carries out conversion operation, and the 2nd JSON character string is converted to corresponding Java pairs
As.Therefore, same data transmission interface is when receiving the identical JSON character string of multiple structures, when completing first JSON word
After the unserializing operation of symbol string, without determining that each field name for including in other multiple JSON character strings is corresponding again
The original data type of data content, to improve the transfer efficiency that JSON character string is deserialized as to Java object.
For example, information exchange is carried out between application system A and application system B, data transmission interface a points of application system B
JSON character string 1 described in previous embodiment is not had received, completes JSON character string 1 being deserialized as Java object
After 1, by the original number of the field name of 4 fields in JSON character string 1 data content corresponding with each field name
It is cached according to the mapping relations between type: respectively by the initial data of field name " Local " and corresponding data content
The original data type of mapping relations, field name " Channel " and corresponding data content between type " string type "
The initial data class of mapping relations, field name " allPeopleCount " and corresponding data content between " string type "
The initial data class of mapping relations and field name " allPlayTime " and corresponding data content between type " int type "
Mapping relations between type " float type " are cached.It is received in data transmission interface a identical as 1 structure of JSON character string
JSON character string 2 after, obtain the corresponding original data type of each field name in JSON character string 1 in the buffer, as
The original data type of the corresponding data content of each field name in JSON character string 2, so as to subsequent according in each data
Hold corresponding original data type, conversion operation successively is carried out to each data content for including in JSON character string 2, by JSON
Character string 2 is converted to Java object 2.
To achieve the goals above, according to another aspect of the present invention, the embodiment of the invention also provides a kind of storage Jie
Matter, the storage medium include the program of storage, wherein equipment where controlling the storage medium in described program operation is held
Row unserializing method described above.
To achieve the goals above, according to another aspect of the present invention, the embodiment of the invention also provides a kind of processor,
The processor is for running program, wherein described program executes unserializing method described above when running.
Further, as the realization to method shown in above-mentioned Fig. 1 and Fig. 2, another embodiment of the present invention additionally provides one
Kind unserializing device.The Installation practice is corresponding with preceding method embodiment, and to be easy to read, present apparatus embodiment is no longer right
Detail content in preceding method embodiment is repeated one by one, it should be understood that the device in the present embodiment can correspond to reality
Full content in existing preceding method embodiment.The device is applied to improve the accuracy rate for the Java object that unserializing obtains,
Specifically as shown in figure 3, the device includes:
Receiving unit 31, for receiving JSON character string;
Resolution unit 32 obtains parsing result for parsing the received JSON character string of receiving unit 31, wherein
It include multiple fields in the parsing result, each field includes: field name and corresponding data content;
Determination unit 33, for determining that resolution unit 32 parses the original of the obtained corresponding data content of each field name
Beginning data type;
Judging unit 34, for judging whether to contain at least two original data type in the data content for numerical value class
The data content of type;
Converting unit 35, for judging to contain at least two original data type in the data content when judging unit 34
For value type data content when, according to the corresponding original data type of each data content respectively by the JSON character string
Be converted to Java object.
Further, as shown in figure 4, determination unit 33 includes:
Identification module 331, for identifying the corresponding data content of each field name using parsing code;
Judgment module 332, whether the data content for judging that the identification module 331 identifies is numeric type number
According to;
Determining module 333, for determining when the judgment module 332 judges the data content for numeric type data
The corresponding data precision of the data content, and the corresponding initial data class of the data content is determined according to the data precision
Type.
Further, as shown in figure 4, converting unit 35 includes:
Module 351 is obtained, for obtaining each data content for including in the parsing result and every number one by one
According to the corresponding original data type of content;
Generation module 352, the corresponding initial data class of each data content for being obtained according to module 351 is obtained
Type successively carries out conversion operation to each data content, generates the Java object.
Further, as shown in figure 4, the type of the numeric type data include: int type, long type, float type,
Double type.
Further, as shown in figure 4, the device further include:
Unit of deployment 36, for the arrangement parsing code in data transmission interface, wherein the data transmission interface is used for
The JSON character string is received, the parsing code is for parsing the JSON character string, to obtain in the JSON character string
The field name and corresponding data content that each field includes.
Further, as shown in figure 4, the device further include:
Cache unit 37, for delaying each field name with the mapping relations of corresponding original data type
It deposits;
Acquiring unit 38, for receiving JSON identical with the JSON character string structure when the data transmission interface
When character string, each field name that the identical JSON character string of the structure that cache unit 37 caches includes is obtained from caching
Claim the original data type of corresponding data content, so as to according to the corresponding original data type of each data content respectively by institute
It states the identical JSON character string of structure and is converted to Java object.
A kind of unserializing device provided in an embodiment of the present invention, the JSON that the embodiment of the present invention can be received in parsing
After character string, the field name of each field for including in the JSON character string and corresponding is determined according to parsing result
Data content, and determine the original data type of the corresponding data content of each field name, when by judging the JSON character
When containing at least two the data content that original data type is value type in all data contents for including in string, according to every
The corresponding original data type of a data content carries out unserializing operation to each data content respectively, by the JSON character string
Java object is converted to, and in the prior art according to the corresponding numerical value class of the highest data content of data precision in JSON character string
Type carries out unserializing operation to the data content that all original data types in JSON character string are value type, by JSON
Character string is converted to Java object and compares, and the embodiment of the present invention can guarantee in the Java object operated by unserializing
Value type data content data precision it is consistent with the data precision of corresponding data content in JSON character string, thus
Improve the accuracy rate for the Java object that unserializing obtains.Meanwhile the embodiment of the present invention can be converted by JSON character string
After Java object, by the original of each field name data content corresponding with each field name in the JSON character string
Mapping relations between data type are cached, in the identical JSON character string of subsequently received structure, without true again
The original data type for determining the corresponding data content of each field name in the identical JSON character string of structure, to improve
JSON character string is deserialized as to the transfer efficiency of Java object
The unserializing device includes processor and memory, and above-mentioned receiving unit, determination unit, is sentenced resolution unit
Disconnected unit and converting unit etc. store in memory as program unit, are executed on stored in memory by processor
Program unit is stated to realize corresponding function.
Include kernel in processor, is gone in memory to transfer corresponding program unit by kernel.Kernel can be set one
Or more, the accuracy rate for the Java object that unserializing obtains is improved by adjusting kernel parameter.
Memory may include the non-volatile memory in computer-readable medium, random access memory (RAM) and/
Or the forms such as Nonvolatile memory, if read-only memory (ROM) or flash memory (flash RAM), memory include that at least one is deposited
Store up chip.
The embodiment of the invention provides a kind of storage mediums, are stored thereon with program, real when which is executed by processor
Unserializing method described in any one of existing above embodiments.
The embodiment of the invention provides a kind of processor, the processor is for running program, wherein described program operation
Unserializing method described in any one of Shi Zhihang above embodiments.
The embodiment of the invention provides a kind of equipment, equipment include processor, memory and storage on a memory and can
The program run on a processor, processor perform the steps of when executing program
Receive JSON character string;
The JSON character string is parsed, parsing result is obtained, wherein includes multiple fields in the parsing result, each
The field includes: field name and corresponding data content;
Determine the original data type of the corresponding data content of each field name, and judge in the data content whether
Contain at least two the data content that original data type is value type;
If so, the JSON character string is converted to respectively according to the corresponding original data type of each data content
Java object.
Further, the original data type for determining the corresponding data content of each field name includes:
The corresponding data content of each field name is identified using parsing code;
Judge whether the data content is numeric type data;
If so, determining the corresponding data precision of the data content, and the data are determined according to the data precision
The corresponding original data type of content.
Further, the JSON character string is converted to respectively according to the corresponding original data type of each data content
Java object includes:
The each data content for including in the parsing result is obtained one by one and each data content is corresponding original
Data type;
According to the corresponding original data type of each data content, successively each data content is converted
Operation, generates the Java object.
Further, the type of the numeric type data includes: int type, long type, float type, double type.
Further, before receiving JSON character string, the method also includes:
Arrangement parses code in data transmission interface, wherein the data transmission interface is for receiving the JSON word
Symbol string, the parsing code include to obtain each field in the JSON character string for parsing the JSON character string
Field name and corresponding data content.
Further, the method also includes:
Each field name is cached with the mapping relations of corresponding original data type;
When the data transmission interface receives JSON character string identical with the JSON character string structure, from caching
The middle original data type for obtaining the corresponding data content of each field name that the identical JSON character string of the structure includes,
So that the identical JSON character string of the structure is converted to respectively according to the corresponding original data type of each data content
Java object.
Equipment herein can be server, PC, PAD, mobile phone etc..
Present invention also provides a kind of computer program products, when executing on data processing equipment, are adapted for carrying out just
The program code of beginningization there are as below methods step: JSON character string is received;The JSON character string is parsed, parsing result is obtained,
It wherein, include multiple fields in the parsing result, each field includes: field name and corresponding data content;Really
Determine the original data type of the corresponding data content of each field name, and whether judges in the data content comprising at least two
A original data type is the data content of value type;If so, according to the corresponding original data type of each data content
The JSON character string is converted into Java object respectively.
It should be understood by those skilled in the art that, embodiments herein can provide as method, system or computer program
Product.Therefore, complete hardware embodiment, complete software embodiment or reality combining software and hardware aspects can be used in the application
Apply the form of example.Moreover, it wherein includes the computer of computer usable program code that the application, which can be used in one or more,
The computer program implemented in usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) produces
The form of product.
The application is referring to method, the process of equipment (system) and computer program product according to the embodiment of the present application
Figure and/or block diagram describe.It should be understood that every one stream in flowchart and/or the block diagram can be realized by computer program instructions
The combination of process and/or box in journey and/or box and flowchart and/or the block diagram.It can provide these computer programs
Instruct the processor of general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce
A raw machine, so that being generated by the instruction that computer or the processor of other programmable data processing devices execute for real
The device for the function of being specified in present one or more flows of the flowchart and/or one or more blocks of the block diagram.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy
Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates,
Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram or
The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting
Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or
The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one
The step of function of being specified in a box or multiple boxes.
In a typical configuration, calculating equipment includes one or more processors (CPU), input/output interface, net
Network interface and memory.
Memory may include the non-volatile memory in computer-readable medium, random access memory (RAM) and/
Or the forms such as Nonvolatile memory, such as read-only memory (ROM) or flash memory (flash RAM).Memory is computer-readable Jie
The example of matter.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method
Or technology come realize information store.Information can be computer readable instructions, data structure, the module of program or other data.
The example of the storage medium of computer includes, but are not limited to phase change memory (PRAM), static random access memory (SRAM), moves
State random access memory (DRAM), other kinds of random access memory (RAM), read-only memory (ROM), electric erasable
Programmable read only memory (EEPROM), flash memory or other memory techniques, read-only disc read only memory (CD-ROM) (CD-ROM),
Digital versatile disc (DVD) or other optical storage, magnetic cassettes, tape magnetic disk storage or other magnetic storage devices
Or any other non-transmission medium, can be used for storage can be accessed by a computing device information.As defined in this article, it calculates
Machine readable medium does not include temporary computer readable media (transitory media), such as the data-signal and carrier wave of modulation.
It should also be noted that, the terms "include", "comprise" or its any other variant are intended to nonexcludability
It include so that the process, method, commodity or the equipment that include a series of elements not only include those elements, but also to wrap
Include other elements that are not explicitly listed, or further include for this process, method, commodity or equipment intrinsic want
Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including element
There is also other identical elements in process, method, commodity or equipment.
It will be understood by those skilled in the art that embodiments herein can provide as method, system or computer program product.
Therefore, complete hardware embodiment, complete software embodiment or embodiment combining software and hardware aspects can be used in the application
Form.It is deposited moreover, the application can be used to can be used in the computer that one or more wherein includes computer usable program code
The shape for the computer program product implemented on storage media (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.)
Formula.
The above is only embodiments herein, are not intended to limit this application.To those skilled in the art,
Various changes and changes are possible in this application.It is all within the spirit and principles of the present application made by any modification, equivalent replacement,
Improve etc., it should be included within the scope of the claims of this application.
Claims (10)
1. a kind of unserializing method characterized by comprising
Receive JSON character string;
The JSON character string is parsed, parsing result is obtained, wherein it include multiple fields in the parsing result, it is each described
Field includes: field name and corresponding data content;
Determine the original data type of the corresponding data content of each field name, and judge in the data content whether include
At least two original data types are the data content of value type;
If so, the JSON character string is converted to Java pairs respectively according to the corresponding original data type of each data content
As.
2. the method according to claim 1, wherein determining the original of the corresponding data content of each field name
Data type includes:
The corresponding data content of each field name is identified using parsing code;
Judge whether the data content is numeric type data;
If so, determining the corresponding data precision of the data content, and the data content is determined according to the data precision
Corresponding original data type.
3. according to the method described in claim 2, it is characterized in that, according to the corresponding original data type point of each data content
The JSON character string, which is not converted to Java object, includes:
The each data content for including in the parsing result and the corresponding initial data of each data content are obtained one by one
Type;
According to the corresponding original data type of each data content, conversion behaviour successively is carried out to each data content
Make, generates the Java object.
4. according to the method described in claim 3, it is characterized in that, the type of the numeric type data includes: int type, long
Type, float type, double type.
5. according to the method described in claim 4, it is characterized in that, before receiving JSON character string, the method also includes:
Arrangement parses code in data transmission interface, wherein and the data transmission interface is used to receive the JSON character string,
The parsing code is for parsing the JSON character string, to obtain the field name that each field includes in the JSON character string
Title and corresponding data content.
6. according to the method described in claim 5, it is characterized in that, the method also includes:
Each field name is cached with the mapping relations of corresponding original data type;
When the data transmission interface receives JSON character string identical with the JSON character string structure, obtained from caching
The original data type for the corresponding data content of each field name for taking the identical JSON character string of the structure to include, so as to
The identical JSON character string of the structure is converted to Java pairs respectively according to the corresponding original data type of each data content
As.
7. a kind of unserializing device characterized by comprising
Receiving unit, for receiving JSON character string;
Resolution unit obtains parsing result, wherein described for parsing the received JSON character string of the receiving unit
It include multiple fields in parsing result, each field includes: field name and corresponding data content;
Determination unit, for determining the original number of the corresponding data content of each field name that the resolution unit parses
According to type;
Judging unit, for judging whether to contain at least two original data type in the data content for the number of value type
According to content;
Converting unit, for judging to contain at least two original data type in the data content when the judging unit for number
When the data content of Value Types, the JSON character string is converted respectively according to the corresponding original data type of each data content
For Java object.
8. device according to claim 7, which is characterized in that the determination unit includes:
Identification module, for identifying the corresponding data content of each field name using parsing code;
Judgment module, for judging whether the data content of the identification module identification is numeric type data;
Determining module, for determining in the data when the judgment module judges the data content for numeric type data
Hold corresponding data precision, and the corresponding original data type of the data content is determined according to the data precision.
9. a kind of storage medium, which is characterized in that the storage medium includes the program of storage, wherein run in described program
When control the storage medium where equipment perform claim require 1 to the unserializing method described in any one of claim 6.
10. a kind of processor, which is characterized in that the processor is for running program, wherein right of execution when described program is run
Benefit requires 1 to the unserializing method described in any one of claim 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710861263.5A CN109542541A (en) | 2017-09-21 | 2017-09-21 | Unserializing method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710861263.5A CN109542541A (en) | 2017-09-21 | 2017-09-21 | Unserializing method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109542541A true CN109542541A (en) | 2019-03-29 |
Family
ID=65828373
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710861263.5A Pending CN109542541A (en) | 2017-09-21 | 2017-09-21 | Unserializing method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109542541A (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110442848A (en) * | 2019-07-30 | 2019-11-12 | 中国工商银行股份有限公司 | Data Serialization conciliates sequence method and its device, electronic equipment and medium |
CN110472204A (en) * | 2019-08-20 | 2019-11-19 | 珠海迈科智能科技股份有限公司 | A kind of method, apparatus and equipment based on json transmission binary data |
CN110516207A (en) * | 2019-08-02 | 2019-11-29 | 深圳市菲菱科思通信技术股份有限公司 | A kind of JSON file and EXCEL file mutually convert method |
CN112035831A (en) * | 2020-08-14 | 2020-12-04 | 深信服科技股份有限公司 | Data processing method, device, server and storage medium |
CN112433709A (en) * | 2020-12-03 | 2021-03-02 | 深圳前海微众银行股份有限公司 | JSON-based data processing method, device, equipment and medium |
CN113158115A (en) * | 2021-04-09 | 2021-07-23 | 北京房江湖科技有限公司 | Configuration page display method and device, electronic equipment and storage medium |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090052600A1 (en) * | 2007-08-20 | 2009-02-26 | Trendchip Technologies Corp. | Clock and data recovery circuits |
CN102750268A (en) * | 2012-06-19 | 2012-10-24 | 山东中创软件商用中间件股份有限公司 | Object serializing method as well as object de-serializing method, device and system |
CN106326377A (en) * | 2016-08-15 | 2017-01-11 | 东软集团股份有限公司 | Serialization method and device, deserialization method and device, and system |
-
2017
- 2017-09-21 CN CN201710861263.5A patent/CN109542541A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090052600A1 (en) * | 2007-08-20 | 2009-02-26 | Trendchip Technologies Corp. | Clock and data recovery circuits |
CN102750268A (en) * | 2012-06-19 | 2012-10-24 | 山东中创软件商用中间件股份有限公司 | Object serializing method as well as object de-serializing method, device and system |
CN106326377A (en) * | 2016-08-15 | 2017-01-11 | 东软集团股份有限公司 | Serialization method and device, deserialization method and device, and system |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110442848A (en) * | 2019-07-30 | 2019-11-12 | 中国工商银行股份有限公司 | Data Serialization conciliates sequence method and its device, electronic equipment and medium |
CN110442848B (en) * | 2019-07-30 | 2023-08-01 | 中国工商银行股份有限公司 | Data serialization and deserialization method and device, electronic equipment and medium thereof |
CN110516207A (en) * | 2019-08-02 | 2019-11-29 | 深圳市菲菱科思通信技术股份有限公司 | A kind of JSON file and EXCEL file mutually convert method |
CN110516207B (en) * | 2019-08-02 | 2023-09-22 | 深圳市菲菱科思通信技术股份有限公司 | Method for interconverting JSON file and EXCEL file |
CN110472204A (en) * | 2019-08-20 | 2019-11-19 | 珠海迈科智能科技股份有限公司 | A kind of method, apparatus and equipment based on json transmission binary data |
CN112035831A (en) * | 2020-08-14 | 2020-12-04 | 深信服科技股份有限公司 | Data processing method, device, server and storage medium |
CN112433709A (en) * | 2020-12-03 | 2021-03-02 | 深圳前海微众银行股份有限公司 | JSON-based data processing method, device, equipment and medium |
CN113158115A (en) * | 2021-04-09 | 2021-07-23 | 北京房江湖科技有限公司 | Configuration page display method and device, electronic equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109542541A (en) | Unserializing method and device | |
CN110546610B (en) | Enhancing processing performance of artificial intelligence/machine hardware through data sharing and distribution | |
US20210089871A1 (en) | Processing system and method for binary weight convolutional neural network | |
US20220172060A1 (en) | Modifying machine learning models to improve locality | |
TWI796286B (en) | A training method and training system for a machine learning system | |
US20230113271A1 (en) | Methods and apparatus to perform dense prediction using transformer blocks | |
CN106855952B (en) | Neural network-based computing method and device | |
KR20180088895A (en) | Method and apparatus for generating random string | |
US20230026369A1 (en) | Hardware acceleration for interface type conversions | |
CN114610475A (en) | Training method of intelligent resource arrangement model | |
CN109062906A (en) | The interpretation method and device of program language resource | |
CN110209582A (en) | The statistical method and device of code coverage, electronic equipment, storage medium | |
US20230325149A1 (en) | Data processing method and apparatus, computer device, and computer-readable storage medium | |
CN109271180A (en) | A kind of data processing method and device | |
CN108470043A (en) | A kind of acquisition methods and device of business result | |
CN114244912B (en) | Data transmission method, device, computer equipment and storage medium | |
KR20230094696A (en) | Quantization framework apparatus for efficient matrix decomposition in recommender system and learning method thereof | |
CN108196844A (en) | Information processing method, device, electronic equipment and storage medium | |
CN111767980B (en) | Model optimization method, device and equipment | |
CN108694187A (en) | The storage method and device of real-time streaming data | |
CN114298329A (en) | Model training method, device, equipment and storage medium | |
CN106407345A (en) | Method and apparatus for updating dirty data | |
CN109413176A (en) | Report method for down loading and device | |
CN112712167B (en) | Memory access method and system supporting acceleration of various convolutional neural networks | |
CN116360858B (en) | Data processing method, graphic processor, electronic device 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 | ||
CB02 | Change of applicant information | ||
CB02 | Change of applicant information |
Address after: 100083 No. 401, 4th Floor, Haitai Building, 229 North Fourth Ring Road, Haidian District, Beijing Applicant after: BEIJING GRIDSUM TECHNOLOGY Co.,Ltd. Address before: 100086 Beijing city Haidian District Shuangyushu Area No. 76 Zhichun Road cuigongfandian 8 layer A Applicant before: BEIJING GRIDSUM TECHNOLOGY Co.,Ltd. |
|
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190329 |