CN105808262B - A kind of name matching process based on json formatted datas - Google Patents

A kind of name matching process based on json formatted datas Download PDF

Info

Publication number
CN105808262B
CN105808262B CN201610139793.4A CN201610139793A CN105808262B CN 105808262 B CN105808262 B CN 105808262B CN 201610139793 A CN201610139793 A CN 201610139793A CN 105808262 B CN105808262 B CN 105808262B
Authority
CN
China
Prior art keywords
json formatted
key assignments
data
formatted datas
str
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
CN201610139793.4A
Other languages
Chinese (zh)
Other versions
CN105808262A (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.)
Zhejiang University of Technology ZJUT
Original Assignee
Zhejiang University of Technology ZJUT
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 Zhejiang University of Technology ZJUT filed Critical Zhejiang University of Technology ZJUT
Priority to CN201610139793.4A priority Critical patent/CN105808262B/en
Publication of CN105808262A publication Critical patent/CN105808262A/en
Application granted granted Critical
Publication of CN105808262B publication Critical patent/CN105808262B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/20Software design
    • G06F8/22Procedural

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

A kind of name matching process based on json formatted datas, includes the following steps:First, data source is established based on the json formatted datas for the n-layer nesting that key assignments initial is capitalization;Then, the setting search key assignments key assignments of layer and key assignments itself where the value to be searched for is spliced successively;Secondly, it is that separator splits search key assignments using capitalization, whether formation key assignments array str [n] is json formatted datas as termination condition using the value searched, searches for successively, searching times k;Finally, judge whether k is equal to n, it is equal, search wanted matched data.The present invention provide it is a kind of can effective protection data, improve data transmission efficiency, promoted user experience the name matching process based on json formatted datas.

Description

A kind of name matching process based on json formatted datas
Technical field
The present invention relates to the application fields such as a kind of communication network information, the network planning and communication protocol, more particularly to A kind of name matching process based on json formatted datas.
Background technology
With information-based industrialized fast ripe development, the level of IT application of enterprise is continuously improved, information exchange it is not smooth Also become a significant bottleneck of informatization therewith.Important composition portion of the data exchange as the various applications of computer network Point, be increasingly becoming solves the problems, such as " information island " phenomenon main means, and current informationization construction must face. With the rapid development of Web technologies, the application based on B/S frameworks is more and more abundant, and client and server end data is exchanged, counted It is also more and more according to the mode of parsing, but people are making every effort to find a kind of data interchange format that data transfer overhead is small, with The efficiency of data transmission is improved, so that application program is efficiently executed, the usage experience of user is more preferable.In traditional work In Cheng Yingyong, between client and server data exchange and data parsing traditional approach, exchange and parsing it is less efficient, Serious system effect and user experience of the influence based on B/S architecture systems, people are making every effort to find a kind of data transfer overhead Small data interchange format, to improve the efficiency of data transmission, so that application program is efficiently executed, the use of user Experience is more preferable.
It is to be based on that json (JavaScript Object Notation), which is a kind of data interchange format of lightweight, The a subset of ECMAScript.Json using being totally independent of the text formatting of language, but also using include C, C++, C#, Java, JavaScript, Perl, Python etc. are similar to the custom of C language family.These characteristics make json become ideal number According to exchange language.It is easy to people to read and write, while is also easy to machine parsing and generating, greatly promotes network transmission speed. The data format of json formatted datas is fairly simple, is easy to read and write, and for format through overcompression, occupied bandwidth is smaller, supports simultaneously Multilingual parses convenient for server end.For most of Web applications, complicated XML is not needed at all to transmit number According to json data interchange formats provide better simplicity and flexibility.
In traditional engineer application, all kinds of basic datas use handwriting shape, also digital data form are applied to remember sometimes Record.Extended-boundary-condition method is the format of the data exchange more early occurred, is a kind of simple data storage language, simple easy In grasping and using, have the advantages that readability, descriptive strong, but XML occupies more spaces than binary data, Client shows the parsing needed by dom tree.For structural data (or relation data), data publication anonymity is protected Shield be realize its secret protection core key technology and basic means, at present still in continue to develop with improve the stage.
Therefore, the parsing matching technique of current data needs us to improve there is many defects.
Invention content
In order to overcome existing name matching process be unable to high efficiency of transmission, data protection be incomplete, user experience not Foot disadvantage, the present invention provide it is a kind of can effective protection data, improve data transmission efficiency, promoted user experience based on The name matching process of json formatted datas.
The technical solution adopted by the present invention to solve the technical problems is:
A kind of name matching process based on json formatted datas, the name matching process include the following steps:
1) parameter initialization:Set the json formatted datas of one group of n-layer nesting WhereinIndicate the key assignments of json formatted datas,Table Show json formatted data key assignmentsCorresponding value, n indicate that the number of plies of json formatted data nestings, m indicate that n-th layer corresponds to Json formatted datas group number, k, p, q, l, λ be used for identify distinguish json formatted datas key and be worth and { k, p, q, l, λ ∈ N + | 0 < k < p < q < l < λ };
2) set wanted matched Data Identification asWherein name is The character string that the key assignments of layer where data is spliced from outside to inside, wherein { l1,lk, l ∈ N+ | 0 < l1< lk< l }, { n1,nk, N ∈ N+ | 0 < n1< nk< n }, { m1,mk, m ∈ N+ | 0 < m1< mk< m };
3) splitting wants matched Data Identification, process as follows:
3.1) it is that segmentation identifies with capitalization, matched Data Identification name is divided into w dimension groups string [w], wherein w indicate array indexing;
3.2) it is sort criteria according to the size of l, from small to large by l, string [w] rearrangements is obtained into new w and are tieed up Array str [w], wherein w indicate array indexing;
4) according to name matched datas, process is as follows:
4.1) w=0, n=n are set1, m=m1, l=l1, with str [0] for matched key assignments starting point, that is, match json formats The key assignments of data str is
4.2) key assignmentsJson formatted data str are matched, obtained data value is
4.3) judge data valueWhether it is json formatted datas;
If 4.4) data valueFor json formatted datas, enters step 4.5), be otherwise transferred to step 4.6);
4.5) w=w+1 is taken, with str [w+1] for new matching key assignments,For new json formatted datas, it is transferred to step It is rapid 4.2);
4.6) judge whether the index of str [k] is equal to the dimension n of array str [n], the condition that meets then obtains newTo match obtained value.
Further, in step 1) json formatted datas str naming method:The key assignments of the json formatted datas of n-layer nesting Initial be capitalization.
The present invention technical concept be:First, using the json formatted datas for the n-layer nesting that key assignments initial is capitalization as base Plinth establishes data source;Then, the setting search key assignments key assignments of layer and key assignments itself where the value to be searched for splice successively and At;Secondly be that separator splits search key assignments using capitalization, formation key assignments array str [n], with the value that searches whether be Json formatted datas are termination condition, are searched for successively, searching times k;Finally, judge whether k is equal to n, it is equal, it searches Want matched data.
Beneficial effects of the present invention are:Can effective protection data, improve data transmission efficiency, promoted user experience.
Description of the drawings
Fig. 1 is a kind of name matching process schematic diagram based on json formatted datas.
Specific implementation mode
The invention will be further described below in conjunction with the accompanying drawings.
Referring to Fig.1, a kind of name matching process based on json formatted datas, includes the following steps:
1) parameter initialization:Set the json formatted datas of one group of n-layer nesting WhereinIndicate the key assignments of json formatted datas,It indicates Json formatted data key assignmentsCorresponding value, n indicate that the number of plies of json formatted data nestings, m indicate that n-th layer is corresponding The group number of json formatted datas, k, p, q, l, λ be used for identify distinguish json formatted datas key and be worth and k, p, q, l, λ ∈ N+ | 0 < k < p < q < l < λ };
2) set wanted matched Data Identification asWherein name is The character string that the key assignments of layer where data is spliced from outside to inside, wherein { l1,lk, l ∈ N+ | 0 < l1< lk< l }, { n1,nk, N ∈ N+ | 0 < n1< nk< n }, { m1,mk, m ∈ N+ | 0 < m1< mk< m };
3) splitting wants matched Data Identification, process as follows:
3.1) it is that segmentation identifies with capitalization, matched Data Identification name is divided into w dimension groups string [w], wherein w indicate array indexing;
3.2) it is sort criteria according to the size of l, from small to large by l, string [w] rearrangements is obtained into new w and are tieed up Array str [w], wherein w indicate that array indexing, step as shown in Figure 1 split matched data and be identified as n dimension character string dimensions str;
4) according to name matched datas, process is as follows:
4.1) w=0, n=n are set1, m=m1, l=l1, with str [0] for matched key assignments starting point, that is, match json formats The key assignments of data str is
4.2) key assignmentsJson formatted data str are matched, obtained data value isStep as shown in Figure 1 Match json formatted datas;
4.3) judge data valueWhether it is json formatted datas;
If 4.4) data valueIt for json formatted datas, enters step 4.5), is otherwise transferred to step 4.6), such as scheme Whether the corresponding value of key assignments that step shown in 1 matches is json formatted datas;
4.5) w=w+1 is taken, with str [w+1] for new matching key assignments,For new json formatted datas, it is transferred to step It is rapid 4.2);
4.6) judge whether the index of str [k] is equal to the dimension n of array str [n], the condition that meets then obtains newTo match obtained value.
Further, in step 1) json formatted datas str naming method:The key assignments of the json formatted datas of n-layer nesting Initial be capitalization.
The present embodiment is with character string For embodiment, a kind of name matching process based on json formatted datas, wherein comprising the steps of:
1) parameter initialization:Set the json formatted datas of one group of n-layer nestingWhereinThe key assignments of expression json formatted datas, " hangzhou ", " shanghai ", " Beijing " indicates json formatted data key assignmentsCorresponding value;
2) setting wants matched data " hangzhou " to be identified as
3) splitting wants matched Data Identification, process as follows:
3.1) it is that segmentation identifies with capitalization, matched Data Identification name is divided into w dimension groups string [w], wherein w indicate array indexing;
3.2) it is sort criteria according to the size of l, from small to large by l, string [w] rearrangements is obtained into new w and are tieed up Array str [w], wherein w indicate array indexing, i.e.,
4) according to name matched datas, process is as follows:
4.1) w=0, n=n are set1, m=m1, l=l1, withFor matched key assignments starting point, that is, match The key assignments of json formatted datas str is
4.2) key assignmentsJson formatted data str are matched, obtained data value is
4.3) judge data valueWhether it is json formatted datas;
If 4.4) data valueFor json formatted datas, enters step 4.5), be otherwise transferred to step 4.6);
4.5) w=w+1 is taken, with str [w+1] for new matching key assignments,For new json formatted datas, it is transferred to step It is rapid 4.2);
4.6) judge whether the index of str [k] is equal to the dimension n of array str [n], the condition that meets then obtains newTo match obtained value.
Described above is the excellent results that one embodiment that the present invention provides shows, it is clear that the present invention not only fits Above-described embodiment is closed, it can under the premise of without departing from essence spirit of the present invention and without departing from content involved by substantive content of the present invention Many variations are done to it to be implemented.

Claims (2)

1. a kind of name matching process based on json formatted datas, it is characterised in that:The name matching process includes following Step:
1) parameter initialization:Set the json formatted datas of one group of n-layer nesting WhereinIndicate the key assignments of json formatted datas,It indicates Json formatted data key assignmentsCorresponding value, n indicate that the number of plies of json formatted data nestings, m indicate that n-th layer is corresponding The group number of json formatted datas, k, p, q, l, λ be used for identify distinguish json formatted datas key and be worth and k, p, q, l, λ ∈ N+ | 0 < k < p < q < l < λ };
2) set wanted matched Data Identification asWherein name is data The character string that the key assignments of place layer is spliced from outside to inside, wherein { l1,lk, l ∈ N+ | 0 < l1< lk< l }, { n1,nk,n∈N + | 0 < n1< nk< n }, { m1,mk, m ∈ N+ | 0 < m1< mk< m };
3) splitting wants matched Data Identification, process as follows:
3.1) it is that segmentation identifies with capitalization, matched Data Identification name is divided into w dimension group string [w], Wherein w indicates array indexing;
3.2) it is sort criteria according to the size of l, from small to large by l, string [w] rearrangements is obtained into new w dimension groups Str [w], wherein w indicate array indexing;
4) according to name matched datas, process is as follows:
4.1) w=0, n=n are set1, m=m1, l=l1, with str [0] for matched key assignments starting point, that is, match json formatted datas The key assignments of str is
4.2) key assignmentsJson formatted data str are matched, obtained data value is
4.3) judge data valueWhether it is json formatted datas;
If 4.4) data valueFor json formatted datas, enters step 4.5), be otherwise transferred to step 4.6);
4.5) w=w+1 is taken, with str [w+1] for new matching key assignments,For new json formatted datas, it is transferred to step 4.2);
4.6) judge whether the index of str [k] is equal to the dimension n of array str [n], the condition that meets then obtains new To match obtained value.
2. a kind of name matching process based on json formatted datas as described in claim 1, it is characterised in that:In step 1) The naming method of json formatted datas str:The initial of the key assignments of the json formatted datas of n-layer nesting is capitalization.
CN201610139793.4A 2016-03-11 2016-03-11 A kind of name matching process based on json formatted datas Active CN105808262B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610139793.4A CN105808262B (en) 2016-03-11 2016-03-11 A kind of name matching process based on json formatted datas

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610139793.4A CN105808262B (en) 2016-03-11 2016-03-11 A kind of name matching process based on json formatted datas

Publications (2)

Publication Number Publication Date
CN105808262A CN105808262A (en) 2016-07-27
CN105808262B true CN105808262B (en) 2018-10-19

Family

ID=56467250

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610139793.4A Active CN105808262B (en) 2016-03-11 2016-03-11 A kind of name matching process based on json formatted datas

Country Status (1)

Country Link
CN (1) CN105808262B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108628737A (en) * 2017-03-23 2018-10-09 北京小唱科技有限公司 A kind of verification method and system of JSON data
CN109684607B (en) * 2017-10-19 2022-04-08 腾讯科技(深圳)有限公司 JSON data analysis method and device, computer equipment and storage medium
US10725660B2 (en) 2017-11-17 2020-07-28 International Business Machines Corporation Policy-based optimization of cloud resources on tiered storage operations
CN108319589B (en) * 2018-03-14 2021-08-10 腾讯科技(深圳)有限公司 Parameter string processing method, device, computer readable storage medium and equipment
CN112182310B (en) * 2020-11-04 2023-11-17 上海德拓信息技术股份有限公司 Method for realizing built-in real-time search general tree-shaped component

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105069116A (en) * 2015-08-11 2015-11-18 北京思特奇信息技术股份有限公司 Method and system for converting json string into array
CN105354020A (en) * 2015-09-30 2016-02-24 武汉钢铁(集团)公司 Json format data analytic method and data receiving end

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7530015B2 (en) * 2003-06-25 2009-05-05 Microsoft Corporation XSD inference
US8260784B2 (en) * 2009-02-13 2012-09-04 International Business Machines Corporation Indexing and searching JSON objects

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105069116A (en) * 2015-08-11 2015-11-18 北京思特奇信息技术股份有限公司 Method and system for converting json string into array
CN105354020A (en) * 2015-09-30 2016-02-24 武汉钢铁(集团)公司 Json format data analytic method and data receiving end

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
Discovering JavaScript Object Notation;Charles Severance et al;《Computer》;20120405(第4期);全文 *
Enabling JSON Document Stores in Relational Systems;Craig Chasseur et al;《Sixteenth International Workshop on the Web and Databases(WebDB 2013) 》;20130623;全文 *
XML与JSON在WEB中对数据封装解析的对比;雷映雪等;《价值工程》;20130328(第9期);全文 *
一种基于JSON的异构数据查询方法;倪睿熙;《无线电通信技术》;20130415;第39卷(第1期);全文 *

Also Published As

Publication number Publication date
CN105808262A (en) 2016-07-27

Similar Documents

Publication Publication Date Title
CN105808262B (en) A kind of name matching process based on json formatted datas
US11681944B2 (en) System and method to generate a labeled dataset for training an entity detection system
CN111339382B (en) Character string data retrieval method, device, computer equipment and storage medium
CN104735468B (en) A kind of method and system that image is synthesized to new video based on semantic analysis
US7689527B2 (en) Attribute extraction using limited training data
CN103365992B (en) Method for realizing dictionary search of Trie tree based on one-dimensional linear space
CN105159949A (en) Chinese address word segmentation method and system
CN111008321A (en) Recommendation method and device based on logistic regression, computing equipment and readable storage medium
CN103491089B (en) Code-transferring method and system in a kind of data convert based on HTTP
CN101150489A (en) Resource share method based on distributed hash table
CN102651002A (en) Webpage information extracting method and system
CN102420842A (en) Method and system for sending webpage in mobile network
CN103324622A (en) Method and device for automatic generating of front page abstract
CN102867049A (en) Chinese PINYIN quick word segmentation method based on word search tree
JP2007206945A (en) Structured document retrieval system and structured document retrieval method
CN105354020A (en) Json format data analytic method and data receiving end
CN106383814A (en) Word segmentation method of English social media short text
CN113190687A (en) Knowledge graph determining method and device, computer equipment and storage medium
CN109885641A (en) A kind of method and system of database Chinese Full Text Retrieval
CN109145009A (en) A method of ElasticSearch is retrieved based on SQL
CN109271560A (en) A kind of link data critical word querying method based on tree template
CN107222583A (en) A kind of data transmission method of fusion structure data and unstructured data
CN105868167B (en) A kind of Naming resolution method of the json formatted datas of multilayer nest
CN103116607B (en) A kind of text retrieval system based on the Chinese phonetic alphabet newly
CN107491524B (en) Method and device for calculating Chinese word relevance based on Wikipedia concept vector

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
EE01 Entry into force of recordation of patent licensing contract

Application publication date: 20160727

Assignee: Huzhou Bodian Network Technology Co.,Ltd.

Assignor: JIANG University OF TECHNOLOGY

Contract record no.: X2023980041703

Denomination of invention: A Naming Matching Method Based on JSON Format Data

Granted publication date: 20181019

License type: Common License

Record date: 20230914

EE01 Entry into force of recordation of patent licensing contract
EE01 Entry into force of recordation of patent licensing contract

Application publication date: 20160727

Assignee: ZHEJIANG DUYAN INFORMATION TECHNOLOGY CO.,LTD.

Assignor: JIANG University OF TECHNOLOGY

Contract record no.: X2023980045556

Denomination of invention: A Naming Matching Method Based on JSON Format Data

Granted publication date: 20181019

License type: Common License

Record date: 20231102

EE01 Entry into force of recordation of patent licensing contract
EE01 Entry into force of recordation of patent licensing contract

Application publication date: 20160727

Assignee: Huzhou Duxin Technology Co.,Ltd.

Assignor: JIANG University OF TECHNOLOGY

Contract record no.: X2023980049423

Denomination of invention: A Naming Matching Method Based on JSON Format Data

Granted publication date: 20181019

License type: Common License

Record date: 20231201

EE01 Entry into force of recordation of patent licensing contract