Method and system for converting Chinese into codes

By building a Chinese code conversion system, the problems of cumbersome operation and poor security in the existing technology are solved, fast and secure Chinese code conversion is achieved, and the security and simplicity of the source code are ensured.

CN120653228APending Publication Date: 2025-09-16黄瀚萩
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510764855.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-10
Publication Date
2025-09-16

AI Technical Summary

Technical Problem

The existing Chinese conversion code is cumbersome to operate and has poor security performance. The source code is easily leaked and cannot meet user needs.

Method used

A Chinese code conversion system was designed, which included a code database, a code unit detection module, a source code input module, a source code encryption module and a Chinese code conversion module. The system encrypted the source code and only allowed authorized personnel to access it. The system combined a compiler and an interpreter for code conversion and supported Chinese speech processing to simplify the operation.

Benefits of technology

It achieves fast and convenient Chinese code conversion, ensures source code security, prevents leakage, and improves the simplicity and security of operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120653228A_ABST
    Figure CN120653228A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of Chinese code programming, in particular to a method and system for converting Chinese into codes, and the system comprises a code database, a code unit detection module, a source code input module, a source code encryption module and a Chinese-to-code module. The source code input module is connected with the source code encryption module, and the source code input module is connected with the Chinese transcoding module. The Chinese conversion code has an encryption effect on the source code, it is ensured that the source code stored in the version control system is encrypted by achieving encrypted storage of the source code, it is ensured that only authorized development and maintenance personnel can have the authority to access a source code library, and serious consequences caused by source code leakage can be effectively prevented; the set Chinese conversion code operation is fast and rapid, code conversion can be achieved by directly inputting corresponding Chinese, tedious steps are omitted, and operation is easy and convenient.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of Chinese code programming, and in particular to a method and system for converting Chinese codes. Background Art

[0002] Common computer programming languages ​​are based on English, which differs significantly from the Chinese language environment. If programming could be done using Chinese characters, users with no prior programming experience would be able to easily develop their own code, while also freeing them from dependence on existing English programming languages. Over the past decade, the development of programming has shown that the readability and modularity of Chinese programming are attracting increasing attention from researchers. With the continued development of my country's internet industry, Chinese programming will become an indispensable piece of the global programming puzzle.

[0003] Most of the existing Chinese conversion codes are cumbersome to operate and inconvenient to use, and the source code is easily leaked and has poor security performance. A method and system for Chinese conversion code are needed to solve this problem. Summary of the Invention

[0004] The object of the present invention is to provide a method and system for Chinese language conversion code to solve the problems raised in the above background technology.

[0005] To achieve the above object, the present invention provides the following technical solutions: a system for converting Chinese code, comprising establishing a code database, a code unit detection module, a source code input module, a source code encryption module and a Chinese code conversion module; The code database is connected to the code unit detection module, the code unit detection module is connected to the source code input module, the source code input module is connected to the source code encryption module, and the source code input module is connected to the Chinese code conversion module.

[0006] As a preferred technical solution of the present invention, the source code encryption module is divided into a code library encryption module and an identity authentication encryption module. By implementing encrypted storage of source code, it is ensured that the source code stored in the version control system is encrypted and that only authorized developers and maintenance personnel have access to the source code library.

[0007] As the preferred technical solution of the present invention, the Chinese code conversion module is divided into a compiler and an interpreter. The compiler converts a complete high-level language into independently executable target code through static analysis, and is suitable for languages ​​that emphasize execution efficiency. The interpreter dynamically interprets and executes the code line by line. The program execution depends on the interpreter environment and is suitable for rapid iteration.

[0008] As the preferred technical solution of the present invention, the Chinese code conversion module is connected to the Chinese speech processing module, wherein the Chinese speech processing module converts Chinese into specific programming language code by parsing it. This process includes word segmentation, recognition of keywords and sentence structure, and finally converting these instructions into programming code.

[0009] As a preferred technical solution of the present invention, the code database is connected to a data backup module, wherein the data backup module can store and back up all converted Chinese and converted codes for easy retrieval.

[0010] As a preferred technical solution of the present invention, the following steps are described: S1. First, create the JSBin-CollaborativeJavaScript Debugging code library and enter the corresponding code into the code library; S2. Search and unit test the input code to ensure the accuracy of the input code and prevent code errors; S3. Implement encrypted storage of source code at the code repository level for input code, ensuring that the source code stored in the version control system is encrypted and that only authorized developers and maintainers can access the source code repository; S4. After entering the code, enter the Chinese characters you want to convert in the output box on the Output, and generate the required code with one click. The encoding format of the file can be changed through CSS. S5. Data backup and storage of generated code.

[0011] Compared with the prior art, the present invention has the following beneficial effects: (1) The present invention is a method and system for Chinese code conversion. The Chinese code conversion provided by the present invention has an encryption effect on the source code. By realizing the encrypted storage of the source code, it is ensured that the source code stored in the version control system is encrypted, and it is ensured that only authorized development and maintenance personnel have the right to access the source code library, which can effectively prevent the leakage of source code from causing serious consequences.

[0012] (2) The present invention is a method and system for converting Chinese codes. The Chinese code conversion provided by the present invention is quick and swift to operate. Code conversion can be achieved by directly inputting the corresponding Chinese characters, eliminating tedious steps and making the operation simple and convenient. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0014] Figure 1 is a flow chart of a method for converting Chinese codes according to an embodiment of the present invention; Figure 2 The present invention is a schematic structural diagram of a method and system for converting Chinese codes according to an embodiment of the present invention. DETAILED DESCRIPTION

[0015] Below, the invention is further described with reference to the accompanying drawings and specific embodiments: Example 1 refer to Figure 2 Example 1 is described, including establishing a code database, a code unit detection module, a source code input module, a source code encryption module and a Chinese code conversion module; Establish a code database connected to the code unit detection module, the code unit detection module connected to the source code input module, the code unit detection module connected to the source code input module. The source code input module is connected to the source code encryption module, and the source code input module is connected to the Chinese code conversion module; In this embodiment, the source code encryption module is divided into a code library encryption module and an identity authentication encryption module. By implementing encrypted storage of the source code, it is ensured that the source code stored in the version control system is encrypted, and that only authorized developers and maintenance personnel have access to the source code library. The Chinese code conversion module is divided into a compiler and an interpreter. The compiler converts a complete high-level language into independently executable target code through static analysis, and is suitable for languages ​​that emphasize execution efficiency. The interpreter dynamically interprets and executes the code line by line. Program execution depends on the interpreter environment and is suitable for rapid iteration. The Chinese code conversion module is connected to the Chinese speech processing module, where the Chinese speech processing module converts Chinese into specific programming language code by parsing it. This process includes word segmentation processing, recognition of keywords and sentence structure, and finally converting these instructions into programming code. A code database is established and connected to the data backup module, where the data backup module can store and back up all converted Chinese and converted codes for easy retrieval.

[0016] Example 2 refer to Figure 1 Example 2 is described. This embodiment further illustrates Example 1 and includes the following steps: S1. First, create a JSBin - Collaborative JavaScript Debugging code library and input the corresponding code into the code library; S2. Retrieve and conduct unit tests on the input code to ensure the accuracy of the input code and prevent code errors; S3. Implement encrypted storage of the source code at the code library level for the input code, ensure that the source code stored in the version control system is encrypted, and implement a source code library that can only be accessed by authorized development and maintenance personnel; S4. After inputting the code, input the required Chinese to be converted in the output box on the Output, and generate the required code at one key. The encoding format of the file can be changed through CSS; S5. Make a data backup and save the generated code; The specific code is as follows: <!DOCTYPE html> <meta charset="UTF-8"> <title> Hagi Converter-Stable Version< / title> <style>body { padding: 20px;font-family: -apple-system, sans-serif;background: #f8f9fa;}#input { width: 100%;height: 150px;padding: 15px;border: 2px solid #007AFF;border-radius: 12px;font-size: 18px;margin-bottom: 20px;}#output { padding: 15px;background: white;border-radius: 12px;box-shadow: 0 2px 4px rgba(0,0,0,0.1);word-break: break-all;min-height: 60px;}.status { color: #666;font-size: 14px;text-align: center;margin: 10px0;}< / style> <textarea id="input" placeholder="输入中文...">< / textarea> Ready! Start typing Chinese... <!-- Introduce pinyin - pro through CDN --> <script src="https: / / unpkg.com / pinyin-pro">< / script> <script>const { pinyin} = pinyinPro; / / 声母表(用于分割拼音)const initials = ["b", "p", "m", "f", "d", "t", "n", "l", "g", "k", "h","j", "q", "x", "zh", "ch", "sh", "r", "z", "c", "s", "y", "w"];function convertToQiu(text) {let pinyinArray = pinyin(text, {toneType: 'num', / / 使用数字标注声调type: 'array', / / 返回数组multiple: false / / 只使用标准拼音});let converted = pinyinArray.map(syllable =>{if (syllable.length === 1) return syllable; / / 单个字母(如"a")直接返回 / / 找到该拼音的声母Letinitial=initials.find(pre =>syllable.startsWith(pre));if (initial) {let final = syllable.slice(initial.length, -1); / / 韵母部分(去掉最后的声调)let tone = syllable.slice(-1); / / 声调return `${final}${tone}${initial}`;} else {return syllable; / / 没有声母,直接返回}});return converted.join('.') + '.';}document.getElementById('input').addEventListener('input', function(e){document.getElementById('output').textContent=convertToQiu(e.target.value);});< / script> In the description of the present invention, it should be noted that the terms "top", "bottom", "one side", "the other side", "front", "back", "middle", "inside", "top", "bottom", etc., indicating orientations or positional relationships, are based on the orientations or positional relationships shown in the accompanying drawings and are only for the convenience of describing the present invention and simplifying the description. They do not indicate or imply that the devices or components referred to must have a specific orientation, be constructed and operate in a specific orientation, and therefore should not be understood as limiting the present invention. The terms "first", "second", and "third" are used for descriptive purposes only and should not be understood as indicating or implying relative importance. In addition, unless otherwise expressly specified or limited, the terms "mounted", "connected", and "connected" should be understood in a broad sense, for example, they can be fixedly connected, detachably connected, or integrally connected; they can be mechanically connected or electrically connected; they can be directly connected or indirectly connected through an intermediate medium, or they can be internal communication between two components. For those skilled in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0017] Finally, it should be noted that the above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art will be able to modify the technical solutions described in the aforementioned embodiments or substitute equivalents for some of the technical features. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention shall be included within the scope of protection of the present invention.

Claims

1. A system for converting Chinese characters into codes, characterized in that: Including the establishment of code database, code unit detection module, source code input module, source code encryption module and Chinese code conversion module; The code database is connected to the code unit detection module, the code unit detection module is connected to the source code input module, the source code input module is connected to the source code encryption module, and the source code input module is connected to the Chinese code conversion module.

2. A Chinese code conversion system according to claim 1, characterized in that: The source code encryption module is divided into a code base encryption module and an identity authentication encryption module. By implementing encrypted storage of source code, it ensures that the source code stored in the version control system is encrypted and ensures that only authorized developers and maintenance personnel have access to the source code library.

3. The system for converting Chinese characters into Chinese characters according to claim 1, wherein: The Chinese code conversion module is divided into a compiler and an interpreter. The compiler converts a complete high-level language into independently executable target code through static analysis. It is suitable for languages ​​that emphasize execution efficiency. The interpreter dynamically interprets and executes the code line by line. Program execution depends on the interpreter environment and is suitable for rapid iteration.

4. The system for converting Chinese characters into Chinese characters according to claim 1, wherein: The Chinese code conversion module is connected to the Chinese speech processing module, which converts Chinese into specific programming language codes by parsing Chinese. This process includes word segmentation, recognition of keywords and sentence structure, and finally converting these instructions into programming codes.

5. The system for converting Chinese characters into Chinese characters according to claim 1, wherein: The code database is connected to a data backup module, wherein the data backup module can store and back up all converted Chinese and converted codes for easy retrieval.

6. The method for converting Chinese characters into Chinese characters according to claim 1, wherein: The following steps are described: S1. First, create the JSBin-CollaborativeJavaScript Debugging code library and enter the corresponding code into the code library; S2. Search and unit test the input code to ensure the accuracy of the input code and prevent code errors; S3. Implement encrypted storage of source code at the code repository level for input code, ensuring that the source code stored in the version control system is encrypted and that only authorized developers and maintainers can access the source code repository; S4. After entering the code, enter the Chinese characters you want to convert in the output box on the Output, and generate the required code with one click. The encoding format of the file can be changed through CSS. S5. Data backup and storage of generated code.