KR102598292B1 - JSON format encoding and decoding methods - Google Patents

JSON format encoding and decoding methods Download PDF

Info

Publication number
KR102598292B1
KR102598292B1 KR1020210097351A KR20210097351A KR102598292B1 KR 102598292 B1 KR102598292 B1 KR 102598292B1 KR 1020210097351 A KR1020210097351 A KR 1020210097351A KR 20210097351 A KR20210097351 A KR 20210097351A KR 102598292 B1 KR102598292 B1 KR 102598292B1
Authority
KR
South Korea
Prior art keywords
format
value
key
json format
json
Prior art date
Application number
KR1020210097351A
Other languages
Korean (ko)
Other versions
KR20230015776A (en
Inventor
김명환
김진모
Original Assignee
주식회사 중앙첨단소재
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 주식회사 중앙첨단소재 filed Critical 주식회사 중앙첨단소재
Priority to KR1020210097351A priority Critical patent/KR102598292B1/en
Publication of KR20230015776A publication Critical patent/KR20230015776A/en
Application granted granted Critical
Publication of KR102598292B1 publication Critical patent/KR102598292B1/en

Links

Classifications

    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03MCODING; DECODING; CODE CONVERSION IN GENERAL
    • H03M7/00Conversion of a code where information is represented by a given sequence or number of digits to a code where the same, similar or subset of information is represented by a different sequence or number of digits
    • H03M7/30Compression; Expansion; Suppression of unnecessary data, e.g. redundancy reduction
    • H03M7/70Type of the data to be coded, other than image and sound
    • H03M7/707Structured documents, e.g. XML
    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03MCODING; DECODING; CODE CONVERSION IN GENERAL
    • H03M7/00Conversion of a code where information is represented by a given sequence or number of digits to a code where the same, similar or subset of information is represented by a different sequence or number of digits
    • H03M7/30Compression; Expansion; Suppression of unnecessary data, e.g. redundancy reduction
    • H03M7/3084Compression; Expansion; Suppression of unnecessary data, e.g. redundancy reduction using adaptive string matching, e.g. the Lempel-Ziv method

Abstract

본 발명은 텍스트 형태를 유지하면서 효과적으로 전송할 수 있는 JSON 포맷 압축 및 복원방법에 관한 것이다. 이를 위하여, 본 발명은, 포맷추출부에 의해 키 및 밸류를 포함하는 JSON 포맷이 추출되는 단계; 포맷서치부에서 상기 JSON 포맷에서 키 또는 밸류를 선택하고, 키 또는 밸류 중 동일한 값이 2개 이상 있는 중복값이 있는지 여부를 판단하는 단계; 상기 포맷서치부에서는 상기 중복값이 2 이상인 경우 키 또는 밸류에 대응하는 대응코드를 생성하는 단계; 포맷압축부에서 상기 JSON 포맷에서 상기 중복값이 2 이상인 키 또는 밸류를 상기 대응코드로 변환하는 단계를 수행하는 JSON 포맷 압축방법을 제공한다.
따라서, 본 발명에 의하면, 데이터베이스에서 대량의 데이터를 전송할 때 구문해석이 가능하며, 압축률이 좋은 JSON 포맷 압축방법을 제공할 수 있는 이점이 있다.
The present invention relates to a JSON format compression and restoration method that can be effectively transmitted while maintaining the text format. To this end, the present invention includes the steps of extracting a JSON format including a key and value by a format extraction unit; Selecting a key or value from the JSON format in a format search unit and determining whether there are duplicate values with two or more identical values among the keys or values; generating, in the format search unit, a corresponding code corresponding to the key or value when the duplicate value is 2 or more; A JSON format compression method is provided in which the format compression unit converts the key or value with the duplicate value of 2 or more in the JSON format into the corresponding code.
Therefore, according to the present invention, there is an advantage in providing a JSON format compression method that enables syntax analysis when transmitting a large amount of data from a database and has a high compression rate.

Description

JSON 포맷 압축 및 복원방법{JSON format encoding and decoding methods}JSON format compression and restoration method {JSON format encoding and decoding methods}

본 발명은 JSON 포맷 압축 및 복원방법에 관한 것이며, 구체적으로 텍스트 형태를 유지하면서 효과적으로 전송할 수 있는 JSON 포맷 압축 및 복원방법에 관한 것이다.The present invention relates to a JSON format compression and restoration method, and specifically to a JSON format compression and restoration method that can be effectively transmitted while maintaining the text format.

초기의 웹은 소수 전문가들인 웹서비스 운영자가 일방적으로 정보를 전달하고, 사용하는 수동적인 형태였다. 사이트에서 검색을 제공하고 하이퍼링크를 통해 다른 공간을 제시하는 방식이다. 시간이 지나면서 웹은 플랫폼으로서의 역할을 가지게 되었으며, 필요한 기능들을 제공하고 전문가뿐 아니라 모두가 참여하여 정보를 만들고 공유하는 것이 가능해 졌다. The early web was a passive form in which a small number of experts, web service operators, unilaterally delivered and used information. This is a method of providing search on the site and presenting other spaces through hyperlinks. Over time, the web took on the role of a platform, providing necessary functions and making it possible for everyone, not just experts, to participate and create and share information.

현재 시멘틱웹 기술이 발달하면서 다양한 통신환경에 따른 네트워크 데이터에 대한 통합적인 제어기술이 요구되고 있다.Currently, as semantic web technology develops, integrated control technology for network data according to various communication environments is required.

종래기술인 등록특허 제10-1066610호에 의하면, 데이터 서버에서 클라이언트로 보내는 응답메세지와 클라이언트에서 서버로 보내는 요청메세지에 대한 바이너리 패킷을 정의하여 압축하고, 압축된 XML과 JSON 데이터의 패킷을 해석하여 클라이언트에 저장하는 구성이 개시되어 있다.According to the prior art, Registered Patent No. 10-1066610, binary packets for the response message sent from the data server to the client and the request message sent from the client to the server are defined and compressed, and the compressed XML and JSON data packets are interpreted and sent to the client. A configuration for storing is disclosed.

이러한 구성은 순수한 XML이나 JSON 패킷 구조에서 구현하기 힘든 압축, 분할전송, 보안 적용 등의 이점을 살리면서 데이터 자체는 XML과 JSON 형태 그대로 유지할 수 있도록 함으로써 대용량 데이터 처리와 보안 데이터 통신이 가능하고, 이기종 시스템 간의 데이터 호환성을 가질 수 있는 이점이 있다.This configuration takes advantage of compression, split transmission, and security application that are difficult to implement in a pure XML or JSON packet structure, while maintaining the data itself in XML and JSON format, enabling large-scale data processing and secure data communication, and heterogeneous data processing. There is an advantage in having data compatibility between systems.

하지만, JSON 포맷을 바이너리 형태로 압축하여 사용함으로써 구문해석이 불가능한 문제점이 있다.However, there is a problem that parsing is impossible because the JSON format is compressed and used in binary form.

본 발명은 상기한 문제를 해결하기 위한 것으로서, 압축되더라도 구문해석이 가능하며, 압축률이 좋은 JSON 포맷 압축방법을 제공하기 위한 것이다.The present invention is intended to solve the above-described problem, and to provide a JSON format compression method that allows syntax analysis even when compressed and has a good compression rate.

또한, 데이터베이스에서 대량의 데이터를 전송할 때 효과적으로 전송할 수 있는 시스템을 제공하기 위한 것이다.Additionally, it is intended to provide a system that can effectively transmit large amounts of data from a database.

상기한 목적을 달성하기 위하여, 본 발명은, 포맷추출부에 의해 키 및 밸류를 포함하는 JSON 포맷이 추출되는 단계; 포맷서치부에서 상기 JSON 포맷에서 키 또는 밸류를 선택하고, 키 또는 밸류 중 동일한 값이 2개 이상 있는 중복값이 있는지 여부를 판단하는 단계; 상기 포맷서치부에서는 상기 중복값이 2 이상인 경우 키 또는 밸류에 대응하는 대응코드를 생성하는 단계; 포맷압축부에서 상기 JSON 포맷에서 상기 중복값이 2 이상인 키 또는 밸류를 상기 대응코드로 변환하는 단계를 수행하는 JSON 포맷 압축방법을 제공한다.In order to achieve the above object, the present invention includes the steps of extracting a JSON format including a key and value by a format extraction unit; Selecting a key or value from the JSON format in a format search unit and determining whether there are duplicate values with two or more identical values among the keys or values; generating, in the format search unit, a corresponding code corresponding to the key or value when the duplicate value is 2 or more; A JSON format compression method is provided in which the format compression unit converts the key or value with the duplicate value of 2 or more in the JSON format into the corresponding code.

상기 포맷압축부에서는 중복값이 2 이상인 경우 상기 JSON 포맷에 새로운 SUB-JSON 포맷을 삽입하고, 상기 SUB-JSON 포맷에는 상기 중복값이 2 이상인 키 또는 밸류가 키로 저장되고, 상기 키 또는 밸류에 대응하는 대응코드가 밸류로 저장되는 것이 바람직하다.In the format compression unit, if the duplicate value is 2 or more, a new SUB-JSON format is inserted into the JSON format, and the key or value with the duplicate value of 2 or more is stored as a key in the SUB-JSON format, and corresponds to the key or value. It is desirable that the corresponding code is stored as a value.

상기 대응코드는 영문자 및 숫자로 이루어지며, 상기 포맷서치부에서는 상기 키 또는 밸류 중 상기 대응코드와 동일한 값이 있는 경우 상기 대응코드의 영문자의 문자코드를 증가시켜 새로운 영문자로 생성하는 것이 바람직하다.The correspondence code consists of English letters and numbers, and if the key or value has the same value as the correspondence code, the format search unit increases the character code of the English letter of the correspondence code to generate a new alphabet.

상기 포맷서치부에서는 반복되는 동일순서의 키세트가 있는 경우 상기 키세트에 대응하는 대응코드를 생성하고, 상기 밸류는 배열형태로 변환시키는 것이 바람직하다.Preferably, the format search unit generates a corresponding code corresponding to the key set when there is a repeated key set in the same order, and converts the value into an array form.

본 발명에 의하면, 데이터베이스에서 대량의 데이터를 전송할 때 구문해석이 가능하며, 압축률이 좋은 JSON 포맷 압축방법을 제공할 수 있는 이점이 있다.According to the present invention, there is an advantage of providing a JSON format compression method that enables parsing when transmitting a large amount of data from a database and has a high compression rate.

도 1은 본 발명에 의한 JSON 포맷 압축방법을 구현하기 위한 JSON 포맷 압축복원모듈의 구성을 나타내는 구성도;
도 2 및 도 3은 본 발명에 의한 포맷서치부의 기능을 설명하기 위한 JSON 포맷 예시도;
도 4는 본 발명에 의한 포맷압축부의 기능을 설명하기 위한 JSON 포맷 예시도;
도 5는 키세트의 구성을 나타내는 JSON 포맷 예시도;
도 6은 본 발명에 의한 JSON 포맷 압축방법을 나타내는 순서도;
도 7은 본 발명에 의한 JSON 포맷 복원방법을 나타내는 순서도.
1 is a configuration diagram showing the configuration of a JSON format compression and restoration module for implementing the JSON format compression method according to the present invention;
Figures 2 and 3 are examples of the JSON format for explaining the function of the format search unit according to the present invention;
Figure 4 is an example JSON format for explaining the function of the format compression unit according to the present invention;
Figure 5 is an example JSON format showing the configuration of a key set;
Figure 6 is a flowchart showing the JSON format compression method according to the present invention;
Figure 7 is a flowchart showing the JSON format restoration method according to the present invention.

본 발명에 의한 구체적인 실시예의 구성 및 작용에 대하여 도면을 참조하여 상세하게 설명한다.The configuration and operation of specific embodiments according to the present invention will be described in detail with reference to the drawings.

도 1을 참조하면, 본 발명에 의한 JSON 포맷 압축을 위한 JSON 포맷 압축복원모듈(100)은 포맷추출부(110), 포맷서치부(130), 포맷압축부(150), 포맷복원부(170)를 포함하여 구성된다.Referring to Figure 1, the JSON format compression and restoration module 100 for JSON format compression according to the present invention includes a format extraction unit 110, a format search unit 130, a format compression unit 150, and a format restoration unit 170. ) and consists of

본 실시예에 의한 JSON 포맷은 키(key)와 밸류(value)로 이루어진 데이터 오브젝트를 전달하기 위해 인간이 읽을 수 있는 텍스트를 사용하는 개방형 표준 포맷이며, 상기 JSON 포맷은 데이터베이스 서버에서 클라이언트로 전송될 수도 있고, 클라이언트에서 서버로 전송될 수도 있다.The JSON format according to this embodiment is an open standard format that uses human-readable text to transmit data objects consisting of keys and values, and the JSON format is transmitted from the database server to the client. It may be transmitted from the client to the server.

상기 포맷추출부(110)에서는 데이터 포맷 중 JSON 포맷으로 구성된 데이터를 검출한다. 즉, 상기 포맷추출부(110)는 텍스트 파일 중 키 : 밸류 형식의 데이터 포맷을 파싱하여 JSON 포맷을 추출할 수 있다.The format extraction unit 110 detects data in JSON format among data formats. That is, the format extraction unit 110 can extract the JSON format by parsing the data format of the key:value format among the text files.

상기 포맷서치부(130)에서는 추출된 JSON 포맷에서 키 또는 밸류를 선택하고, 순차적으로 값을 읽어들여 중복된 값이 있는지 검사한다. 이때, 키 또는 밸류의 문자길이가 설정값 이상인 것만 검사하는 것이 바람직하다. 예를 들어, 키 또는 밸류의 문자길이가 4 이상이면 중복값 검사를 시행하고, 4 미만이면 스킵할 수 있다.The format search unit 130 selects a key or value from the extracted JSON format, sequentially reads the values, and checks whether there are duplicate values. At this time, it is desirable to check only those whose key or value character length is greater than or equal to the set value. For example, if the character length of the key or value is 4 or more, a duplicate value check can be performed, and if it is less than 4, it can be skipped.

즉, 포맷서치부(130)에서 키를 검사하는 경우, 위에서부터 차례로 JSON 포맷 중 키값만 추출하여 별도로 저장하며 저장되는 포맷도 역시 JSON 포맷으로 저장될 수 있다. 즉, 포맷서치부에 의해 저장되는 JSON 포맷은 키값 및 중복값으로 이루어지며, 동일한 키값이 존재하는 경우 중복값을 1증가시켜 저장한다.That is, when the format search unit 130 checks the key, only the key value is extracted from the JSON format in order from the top and stored separately, and the stored format can also be stored in the JSON format. That is, the JSON format stored by the format search unit consists of key values and duplicate values, and if the same key value exists, the duplicate value is incremented by 1 and stored.

포맷서치부(130)에서 키의 중복값 검사가 종료된 경우, JSON 포맷의 밸류에 대해서도 마찬가지로 중복값을 검사할 수 있으며, 동일한 밸류값이 존재하는 경우 중복값을 1씩 증가시켜 저장한다.When the format search unit 130 completes the check for duplicate values of the key, the value in the JSON format can be similarly checked for duplicate values, and if the same value exists, the duplicate value is incremented by 1 and stored.

예를 들어, 도 2에서 키의 "val5"는 중복값 검사를 하면 중복값이 6이므로 {"val5", 6}과 같이 저장될 수 있으며, 밸류의 "value_test_a.r[].value5"도 마찬가지로 중복값이 6이므로 {"value_test_a.r[].value5", 6}과 같이 저장될 수 있다.For example, in Figure 2, the key "val5" can be stored as {"val5", 6} because the duplicate value is 6 when checking for duplicate values, and the value "value_test_a.r[].value5" can also be stored as Since the duplicate value is 6, it can be stored as {"value_test_a.r[].value5", 6}.

상기 포맷서치부(130)에서는 키 또는 밸류의 중복값을 검사하여 중복값이 2이상인 경우 상기 키 또는 밸류에 대응하는 대응코드를 생성한다.The format search unit 130 checks for duplicate values of keys or values, and if the duplicate values are 2 or more, generates a corresponding code corresponding to the key or value.

상기 대응코드는 "c1"과 같이 영문자 1자 및 숫자의 조합으로 이루어질 수 있으며, 키와 밸류의 대응코드를 각각 구분하여 각각 "k1", "v1"과 같이 대응코드가 생성되어질 수 있다.The corresponding code may be composed of a combination of an English letter and a number, such as "c1", and the corresponding codes such as "k1" and "v1" may be generated by distinguishing the corresponding key and value codes, respectively.

상기 포맷서치부에서는 읽어들인 키 또는 밸류를 다시 검출하여 상기 키 또는 밸류 중 생성된 대응코드와 동일한 값이 있는 경우 상기 대응코드의 영문자의 문자코드를 1 증가시켜 새로운 영문자로 생성할 수 있다. 상기 문자코드는 환경에 따라 아스키코드, 유니코드 등이 될 수 있다.The format search unit detects the read key or value again, and if there is a value that is the same as the generated corresponding code among the key or value, the character code of the English letter of the corresponding code can be increased by 1 to generate a new English letter. The character code may be ASCII code or Unicode depending on the environment.

예를 들어, JSON 포맷의 키에 "c1"이 있는 경우 대응코드는 "c"에서 아스키코드를 1 증가시켜 "d1"을 대응코드로 생성한다.For example, if the key in JSON format contains "c1", the corresponding code increases the ASCII code in "c" by 1 to create "d1" as the corresponding code.

상기 포맷서치부(130)에서는 반복되는 동일순서의 키세트가 있는 경우, 상기 키세트에 대응하는 대응코드를 생성한다. 예를 들어, 도 5와 같이 키에 "name", "age", "secretIdentity", "powers"가 동일순서로 반복되어 있는 경우 포맷서치부에서는 "name", "age", "secretIdentity", "powers"를 하나의 키세트로 정의하고, 키세트에 대응하는 대응코드를 "s1"과 같이 생성한다. 이때, 키세트에 대응하는 대응코드는 특별한 문자, 예를 들어 "s"로 시작하도록 하여 키세트에 대응하는 대응코드임을 알 수 있도록 하는 것이 바람직하다.If there is a repeated key set in the same order, the format search unit 130 generates a corresponding code corresponding to the key set. For example, as shown in Figure 5, if "name", "age", "secretIdentity", and "powers" are repeated in the same order in the key, the format search unit searches for "name", "age", "secretIdentity", " Define “powers” as one key set, and create a corresponding code corresponding to the key set, such as “s1”. At this time, it is desirable that the corresponding code corresponding to the key set begins with a special letter, for example, "s", so that it can be recognized that it is a corresponding code corresponding to the key set.

포맷서치부에서 키 또는 밸류의 중복값을 검사하여 중복값이 2 이상인 경우 포맷압축부(150)에서는 JSON 포맷에 새로운 SUB-JSON 포맷을 생성하여 삽입한다.The format search unit checks for duplicate values of the key or value, and if the duplicate value is 2 or more, the format compression unit 150 creates and inserts a new SUB-JSON format into the JSON format.

상기 SUB-JSON 포맷은 도 3과 같이, JSON 포맷에서 중복값이 2 이상인 키 또는 밸류가 SUB-JSON 포맷의 키에 들어가고, 각각의 대응코드가 밸류에 들어간다.In the SUB-JSON format, as shown in Figure 3, a key or value with a duplicate value of 2 or more in the JSON format is entered into the key of the SUB-JSON format, and each corresponding code is entered into the value.

또한, 도 4를 참조하면, 포맷압축부(150)에서는 SUB-JSON 포맷이 아닌 원래의 데이터 JSON 포맷에서 중복값이 2 이상인 키 또는 밸류를 각각의 대응코드로 변환시킨다. Additionally, referring to FIG. 4, the format compression unit 150 converts keys or values with a duplicate value of 2 or more in the original data JSON format, not the SUB-JSON format, into respective corresponding codes.

이때, 키가 특정 키세트에 속하는 경우에는 키세트 단위로 변환될 수 있으며, 키세트에 속하는 각각의 키에 대응하는 밸류는 배열형태로 변환될 수 있다. At this time, if the key belongs to a specific key set, it can be converted in key set units, and the value corresponding to each key belonging to the key set can be converted in an array form.

예를 들어, 도 5의 경우, 키세트에 속하는 "name", "age", "secretIdentity", "powers"는 대응코드 's1'으로 변환되고, "Molecule Man", 29, "Dan Jukes", ["Radiation resistance", "Turning tiny", "Radiation blast"]는 원소의 개수가 4개인 하나의 배열 ["Molecule Man", 29, "Dan Jukes", ["Radiation resistance", "Turning tiny", "Radiation blast"]]로 변환될 수 있다.For example, in the case of Figure 5, "name", "age", "secretIdentity", and "powers" belonging to the key set are converted to the corresponding code 's1', and "Molecule Man", 29, "Dan Jukes", ["Radiation resistance", "Turning tiny", "Radiation blast"] is an array with 4 elements ["Molecule Man", 29, "Dan Jukes", ["Radiation resistance", "Turning tiny", Can be converted to "Radiation blast"]].

그러면, 상기 JSON 포맷은 아래와 같이 변환된다.Then, the JSON format is converted as follows.

{"s1" : ["Molecule Man", 29, "Dan Jukes", ["Radiation resistance", "Turning tiny", "Radiation blast"]]}{"s1" : ["Molecule Man", 29, "Dan Jukes", ["Radiation resistance", "Turning tiny", "Radiation blast"]]}

한편, 포맷복원부(170)는 압축된 JSON 포맷을 원래대로 복원하는 역할을 한다. Meanwhile, the format restoration unit 170 serves to restore the compressed JSON format to its original state.

먼저, 포맷복원부에서는 JSON 포맷이 압축되었는지 여부를 검사한다. 상기 압축여부는 JSON 포맷에 SUB-JSON 포맷이 있는지 없는지 여부로 결정할 수 있다.First, the format restoration department checks whether the JSON format has been compressed. The compression can be determined by whether or not the JSON format includes the SUB-JSON format.

즉, 포맷복원부(170)에서는 압축이 되어 있다고 판단되면, SUB-JSON 포맷을 이용하여 대응코드를 읽은 다음, 데이터 JSON 포맷에서 대응코드를 SUB-JSON의 키값으로 변환시킨다. 또한, 데이터 JSON 포맷의 변환이 완료되면 SUB-JSON 포맷을 삭제한다.That is, if it is determined that the format restoration unit 170 is compressed, it reads the corresponding code using the SUB-JSON format and then converts the corresponding code into a key value of SUB-JSON in the data JSON format. Additionally, when the conversion of the data JSON format is completed, the SUB-JSON format is deleted.

도 6 및 도 7을 참고하여, 본 발명에 의한 JSON 포맷 압축방법 및 복원방법에 대하여 설명한다.With reference to FIGS. 6 and 7, the JSON format compression method and restoration method according to the present invention will be described.

포맷추출부에 의해 데이터 중 JSON 포맷이 추출되면, 포맷서치부에서는 JSON 포맷에서 키 또는 밸류에 대해 중복값이 2개 이상 있는지 여부를 검사한다. 검사 결과, 중복값이 2 이상 있는 키 또느 밸류가 있으면 그에 대응하는 대응코드를 생성하고, 상기 대응코드를 이용하여 SUB-JSON 포맷을 생성한 후, 상기 SUB-JSON 포맷을 원래의 JSON 포맷에 삽입한다. When the JSON format is extracted from the data by the format extraction unit, the format search unit checks whether there are two or more duplicate values for the key or value in the JSON format. As a result of the inspection, if there is a key or value with two or more duplicate values, a corresponding code is generated, a SUB-JSON format is created using the corresponding code, and the SUB-JSON format is inserted into the original JSON format. do.

그리고, 포맷압축부에서는 상기 SUB-JSON 포맷을 이용하여 원래의 JSON 포맷에 있던 데이터 JSON 포맷에서 키 또는 밸류를 대응하는 대응코드로 변환시킨다.And, the format compression unit uses the SUB-JSON format to convert the key or value from the data JSON format in the original JSON format into the corresponding code.

한편, JSON 포맷 복원방법은, 포맷복원부에서 추출된 JSON 포맷에서 SUB-JSON 포맷이 있는지 여부를 검사하여 압축여부를 검사한다. SUB-JSON 포맷이 있는 경우 대응코드를 독출하고, 상기 대응코드를 이용하여 SUB-JSON 포맷을 제외한 데이터 JSON 포맷에서 대응코드를 원래의 키 또는 밸류로 변환시키고, 변환이 완료되면 SUB-JSON 포맷을 삭제한다.Meanwhile, the JSON format restoration method checks whether the JSON format extracted from the format restoration unit is compressed by checking whether the SUB-JSON format exists. If there is a SUB-JSON format, read the corresponding code, use the corresponding code to convert the corresponding code to the original key or value in the data JSON format excluding the SUB-JSON format, and when the conversion is completed, change the corresponding code to the SUB-JSON format. Delete.

상기에서는 본 발명의 실시예들을 참조하여 설명하였지만, 해당 기술 분야에서 통상의 지식을 가진 자라면 하기의 특허 청구범위에 기재된 본 발명의 사상 및 영역으로부터 벗어나지 않는 범위 내에서 본 발명을 다양하게 수정 및 변경시킬 수 있음을 이해할 수 있을 것이다.Although the present invention has been described above with reference to embodiments, those skilled in the art can make various modifications and modifications to the present invention without departing from the spirit and scope of the present invention as set forth in the following patent claims. You will understand that you can change it.

100 : JSON 포맷 압축복원모듈 110 : 포맷추출부
130 : 포맷서치부 150 : 포맷압축부
170 : 포맷복원부
100: JSON format compression restoration module 110: Format extraction unit
130: Format search unit 150: Format compression unit
170: Format restoration unit

Claims (4)

포맷추출부에 의해 키 및 밸류를 포함하는 JSON 포맷이 추출되는 단계;
포맷서치부에서 상기 JSON 포맷에서 키 또는 밸류를 선택하고, 키 또는 밸류 중 동일한 값이 2개 이상 있는 중복값이 있는지 여부를 판단하는 단계;
상기 포맷서치부에서는 상기 중복값이 2 이상인 경우 키 또는 밸류에 대응하는 대응코드를 생성하는 단계;
포맷압축부에서 상기 JSON 포맷에서 상기 중복값이 2 이상인 키 또는 밸류를 상기 대응코드로 변환하는 단계를 수행하며,
상기 포맷압축부에서는 중복값이 2 이상인 경우 상기 JSON 포맷에 새로운 SUB-JSON 포맷을 삽입하고, 상기 SUB-JSON 포맷에는 상기 중복값이 2 이상인 키 또는 밸류가 키로 저장되고, 상기 키 또는 밸류에 대응하는 대응코드가 밸류로 저장되는 JSON 포맷 압축방법.
Extracting a JSON format including a key and value by a format extraction unit;
Selecting a key or value from the JSON format in a format search unit and determining whether there are duplicate values with two or more identical values among the keys or values;
generating, in the format search unit, a corresponding code corresponding to the key or value when the duplicate value is 2 or more;
The format compression unit performs a step of converting the key or value with the duplicate value of 2 or more in the JSON format into the corresponding code,
In the format compression unit, if the duplicate value is 2 or more, a new SUB-JSON format is inserted into the JSON format, and the key or value with the duplicate value of 2 or more is stored as a key in the SUB-JSON format, and corresponds to the key or value. A JSON format compression method in which the corresponding code is stored as a value.
삭제delete 삭제delete 삭제delete
KR1020210097351A 2021-07-23 2021-07-23 JSON format encoding and decoding methods KR102598292B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020210097351A KR102598292B1 (en) 2021-07-23 2021-07-23 JSON format encoding and decoding methods

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020210097351A KR102598292B1 (en) 2021-07-23 2021-07-23 JSON format encoding and decoding methods

Publications (2)

Publication Number Publication Date
KR20230015776A KR20230015776A (en) 2023-01-31
KR102598292B1 true KR102598292B1 (en) 2023-11-06

Family

ID=85109152

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020210097351A KR102598292B1 (en) 2021-07-23 2021-07-23 JSON format encoding and decoding methods

Country Status (1)

Country Link
KR (1) KR102598292B1 (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101949154B1 (en) * 2018-09-17 2019-02-18 (주)투비소프트 Electronic device for transforming structure of dataset using javascript object notation and operating method thereof

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20080026772A (en) * 2006-09-21 2008-03-26 인하대학교 산학협력단 Method for a compression compensating restoration rate of a lempel-ziv compression method
US7769729B2 (en) * 2007-05-21 2010-08-03 Sap Ag Block compression of tables with repeated values

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101949154B1 (en) * 2018-09-17 2019-02-18 (주)투비소프트 Electronic device for transforming structure of dataset using javascript object notation and operating method thereof

Also Published As

Publication number Publication date
KR20230015776A (en) 2023-01-31

Similar Documents

Publication Publication Date Title
KR100424130B1 (en) Data compression apparatus, database system, data communication system, data compression method, storage medium and program transmission apparatus
US20110283183A1 (en) Method for compressing/decompressing structured documents
KR100271861B1 (en) Data compression, expansion method and apparatus and data processing unit and network
CN100586109C (en) Communication method and system for universal service data based on self-defined template
US8819287B2 (en) System and method for compressing URL request parameters
US20160055213A1 (en) System and method for performing longest common prefix strings searches
CN109818930B (en) Communication text data transmission method based on TCP protocol
US20070112810A1 (en) Method for compressing markup languages files, by replacing a long word with a shorter word
CN111666575B (en) Text carrier-free information hiding method based on word element coding
CN107124396B (en) Method for structuring processing of IEC61850 GOOSE message machine data
KR102598292B1 (en) JSON format encoding and decoding methods
US8954400B2 (en) Method, system and program product for managing structured data
KR101114229B1 (en) Method for analyzing Korean or Janpanese web contents in HTTP packets
JP4821287B2 (en) Structured document encoding method, encoding apparatus, encoding program, decoding apparatus, and encoded structured document data structure
CN108243172B (en) Method and system for sending verification information
CN112417843A (en) IDcode identification analysis system and implementation method thereof
CN117076757B (en) Knowledge service retrieval and management system based on large model
CN112000970B (en) Text carrier-free steganography method and system based on component association diagram
CN113254262B (en) Database disaster recovery method and device and electronic equipment
CN111049813A (en) Message assembling method, message analyzing method, message assembling device, message analyzing device and storage medium
CN111914513A (en) RDP window title character recognition method and device
Moussa et al. XML Schema-Based Minification for Communication of Security Information and Event Management (SIEM) Systems in Cloud Environments
CN109361629A (en) One kind being based on the big message method for reliable transmission of Kafka and system
Ramanathan Unishox: A hybrid encoder for short unicode strings
CN109802883B (en) Mail transmission method and system thereof

Legal Events

Date Code Title Description
E701 Decision to grant or registration of patent right
GRNT Written decision to grant