CN112363693A - Code text processing method, device, equipment and storage medium - Google Patents

Code text processing method, device, equipment and storage medium Download PDF

Info

Publication number
CN112363693A
CN112363693A CN202011240915.1A CN202011240915A CN112363693A CN 112363693 A CN112363693 A CN 112363693A CN 202011240915 A CN202011240915 A CN 202011240915A CN 112363693 A CN112363693 A CN 112363693A
Authority
CN
China
Prior art keywords
character
processing
code
determining
characters
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
Application number
CN202011240915.1A
Other languages
Chinese (zh)
Inventor
杨飞龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Zitiao Network Technology Co Ltd
Original Assignee
Beijing Zitiao Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Zitiao Network Technology Co Ltd filed Critical Beijing Zitiao Network Technology Co Ltd
Priority to CN202011240915.1A priority Critical patent/CN112363693A/en
Publication of CN112363693A publication Critical patent/CN112363693A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/20Software design
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/10Protecting distributed programs or content, e.g. vending or licensing of copyrighted material ; Digital rights management [DRM]
    • G06F21/12Protecting executable software
    • G06F21/14Protecting executable software against software analysis or reverse engineering, e.g. by obfuscation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/44Encoding

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Technology Law (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Document Processing Apparatus (AREA)

Abstract

The embodiment of the disclosure discloses a method, a device, equipment and a storage medium for processing a code text. The method comprises the following steps: traversing and reading codes in the code text, and judging whether the read codes are set characters; if the read code is a set character, determining a processing rule according to the set character; and processing the set characters according to the processing rule. According to the processing method of the code text, when the read code is the set character, the set character is processed according to the determined processing rule, and the problem of low code readability is solved.

Description

Code text processing method, device, equipment and storage medium
Technical Field
The embodiment of the disclosure relates to the technical field of computers, and in particular relates to a method, a device, equipment and a storage medium for processing a code text.
Background
Adding set characters into codes is a means for enhancing the security of computer programs, and can be used for source code texts of computer programs and intermediate code texts compiled by the computer programs. For codes containing set characters, in the reverse decoding process, because the character patterns are too complex and the combination is very similar, the codes are difficult to identify and mark, so that the program has the problems of low readability and high reverse analysis difficulty. Therefore, it is very important to process a code including a set character.
Disclosure of Invention
The embodiment of the disclosure provides a method, a device, equipment and a storage medium for processing a code text, so as to realize the processing of a code containing set characters.
In a first aspect, an embodiment of the present disclosure provides a method for processing a code text, including:
traversing and reading codes in the code text, and judging whether the read codes are set characters;
if the read code is a set character, determining a processing rule according to the set character;
and processing the set characters according to the processing rule.
In a second aspect, an embodiment of the present disclosure further provides a device for processing a code text, including:
the set character judgment module is used for performing traversal reading on codes in the code text and judging whether the read codes are set characters;
the processing rule determining module is used for determining a processing rule according to the set characters when the read codes are the set characters;
and setting character processing rules for processing the setting characters according to the processing rules.
In a third aspect, an embodiment of the present disclosure further provides an electronic device, where the electronic device includes:
one or more processing devices;
storage means for storing one or more programs;
when the one or more programs are executed by the one or more processing devices, the one or more processing devices are caused to implement the method for processing the code text according to the embodiment of the disclosure.
In a fourth aspect, the disclosed embodiments also provide a computer readable medium, on which a computer program is stored, where the computer program, when executed by a processing device, implements a method for processing a code text according to the disclosed embodiments.
The embodiment of the disclosure discloses a method, a device, equipment and a storage medium for processing a code text. Traversing and reading codes in the code text, and judging whether the read codes are set characters; if the read code is a set character, determining a processing rule according to the set character; and processing the set character according to the processing rule. According to the processing method of the code text, when the read code is the set character, the set character is processed according to the determined processing rule, and the problem of low code readability is solved.
Drawings
FIG. 1 is a flow chart of a method for processing code text in an embodiment of the present disclosure;
fig. 2 is a schematic structural diagram of a device for processing code texts in the embodiment of the present disclosure;
fig. 3 is a schematic structural diagram of an electronic device in an embodiment of the present disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but rather are provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the disclosure are for illustration purposes only and are not intended to limit the scope of the disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order, and/or performed in parallel. Moreover, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "include" and variations thereof as used herein are open-ended, i.e., "including but not limited to". The term "based on" is "based, at least in part, on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions for other terms will be given in the following description.
It should be noted that the terms "first", "second", and the like in the present disclosure are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence relationship of the functions performed by the devices, modules or units.
It is noted that references to "a", "an", and "the" modifications in this disclosure are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that "one or more" may be used unless the context clearly dictates otherwise.
The names of messages or information exchanged between devices in the embodiments of the present disclosure are for illustrative purposes only, and are not intended to limit the scope of the messages or information.
Fig. 1 is a flowchart of a method for processing a code text according to an embodiment of the present disclosure, where the present embodiment is applicable to a case of processing a chinese character included in a code, and the method may be executed by a device for processing a code text, where the device may be composed of hardware and/or software, and may be generally integrated in a device having a function of processing a code text, where the device may be an electronic device such as a server, a mobile terminal, or a server cluster. As shown in fig. 1, the method specifically comprises the following steps:
and step 110, performing traversal reading on the codes in the code text, judging whether the read codes are set characters, and if so, executing step 120.
In this embodiment, when the code text is read in a traversal manner, the code content in the code text may be read line by line to identify the set characters included in each line of codes. The set characters may be chinese characters, greek characters, emoji characters, or some special symbols, for example: "@", "#", and "#", etc
The manner of judging whether the read code is the set character may be according to the form of the code or according to the code corresponding to the code. For example, if the form of the read code symbol is pictograph, the code is a chinese character. The process of determining according to the code corresponding to the code may be that if the code information corresponding to the code falls into the set character encoding section, the code is the set character.
Specifically, the manner of determining whether the read code is a set character may be: determining coding information corresponding to the read code; judging whether the coded information falls into a set character coding interval or not; and if the coding information falls into the set character coding interval, the read code is the set character.
In this embodiment, each code has corresponding encoding information. If the set character is a Chinese character, judging whether the coding information falls into a Chinese character coding interval or not; if the set character is a Greek character, judging whether the coding information falls into a Greek character coding interval or not; and if the set character is an expression character, judging whether the coded information falls into an expression character coding interval.
Specifically, if the set character is a chinese character, the manner of determining whether the read code is the set character may be: determining coding information corresponding to the read code; judging whether the coding information falls into a Chinese character coding interval or not; and if the coding information falls into the Chinese character coding interval, the read code is a Chinese character.
Wherein, the Chinese coding interval is 4e00 to 9fa 5. In this embodiment, the chinese characters, the english characters, and the numeric characters are encoded in advance, and there is a one-to-one correspondence between the characters and the codes. The code may be a binary code or a hexadecimal code. In this embodiment, the encoded information is hexadecimal code.
In this embodiment, when reading the current code, first determining the corresponding encoding information according to the character information of the current code, and then determining whether the encoding information falls between 4e00 and 9fa5, if the encoding information falls between 4e00 and 9fa5, the code is a chinese character, otherwise, the code is an english character or a numeric character.
Step 120, determining a processing rule according to the set characters.
The set characters can be comment content, reference content and text content. In the embodiment of the disclosure, mainly the chinese in the text content is processed, but the annotation content and the reference content are also part of the code text, so when the code text is read in a traversal manner, the gazing content and the reference content are also read.
Specifically, the process of determining the processing rule according to the set character may be: if the Chinese character is the annotation content or the reference content, the processing rule is the ignoring processing.
In this embodiment, if a chinese character in the annotation content or the reference content is recognized, the processing is ignored. I.e., no processing of chinese characters in the annotated content or the reference content.
Specifically, the process of determining the processing rule according to the set character may be: if the Chinese character is the text content, determining the character type of the Chinese character; and determining a processing rule according to the character category.
The character category may include a variable name, a class name, or a method name, among others. Variable names, class names, or method names may be understood as categories in the programming rules.
In this embodiment, if the character type is a variable name, a class name, or a method name, the determined processing rule is to convert a chinese character into an english character and/or a numeric character. Specifically, the method may be a method of converting a chinese character into an english character, or a method of converting a chinese character into an english character + a numeric character.
In this embodiment, the correspondence between the character type and the processing rule may be established in advance. For example, if the character type is a variable name, the Chinese character is converted into a form containing only English characters. If the character type is a class name, the Chinese character is converted into a form of English character + numeric character. If the character type is a class name, the Chinese character is converted into a form of English character + numeric character, and the like. Wherein, the english character may be composed of upper case or lower case of the first letter of the pinyin of the chinese character.
Optionally, the process of determining the processing rule according to the set character may further include: if the character type is the set type, the determined processing rule is to delete the Chinese character.
The set category may be a category preset by a developer, such as a sensitive vocabulary in chinese characters, a greek character, an expressive character, or for example: specific symbols such as "@", "#", and "#". Specifically, if the type of the setting character is recognized as the setting type, the setting character is directly deleted.
And step 130, processing the set characters according to the processing rules.
Wherein the processing rules include ignore processing, converting chinese characters to english characters and/or numeric characters, and deleting chinese characters.
Specifically, after the processing rules are determined, the identified chinese characters are processed according to the processing rules. So that the readability of the processed code text is higher. It should be noted that readability in this embodiment refers to reading of the code text by the computer, not reading of the code by the user.
According to the technical scheme of the embodiment, codes in the code text are read in a traversing manner, and whether the read codes are set characters is judged; if the read code is a set character, determining a processing rule according to the set character; and processing the set character according to the processing rule. According to the processing method of the code text, when the read code is the set character, the set character is processed according to the determined processing rule, and the problem of low code readability is solved.
In this embodiment, the code text may be processed in a middleware manner, and a service party may customize the code text processing manner in the middleware according to its own service requirement. For example, assuming that an intermediate processor for detecting chinese characters is added, when it is required to detect whether a phrase of "chinese character" exists in a document, only the intermediate processor needs to be called.
Specifically, when traversing the code text, reading the code text line by line, and sending each line of data to the middleware for identification processing. After traversing the file by the means, each row of data and the corresponding file path are transmitted to the middleware detection layer, so that a pluggable detection model is formed. At present, plug-ins for Chinese character checking are available, more plugins can be developed at the later stage according to business requirements, and the plugins can also be combined according to command line parameters according to the business requirements.
Optionally, the method can be combined with a CI/CD to complete static detection before the code is on-line, and since the script is written by Go and developed according to a plugin mode, a business party can develop a specific middleware detection plug-in according to own specific requirements.
Fig. 2 is a schematic structural diagram of a device for processing a code text disclosed in an embodiment of the present disclosure. As shown in fig. 2, the apparatus includes: a set character determination module 210, a processing rule determination module 220, and set character processing rules 230.
The set character judgment module 210 is configured to perform traversal reading on codes in the code text, and judge whether the read codes are set characters;
a processing rule determining module 220, configured to determine a processing rule according to a set character when the read code is the set character;
character processing rules 230 are set for processing chinese characters according to the processing rules.
Optionally, the set character determining module 210 is further configured to:
determining coding information corresponding to the read code;
judging whether the coding information falls into a set character coding interval or not;
and if the coding information falls into the set character coding interval, the read code is the set character.
Optionally, the set character includes a chinese character; the set character determining module 210 is further configured to:
judging whether the coding information falls into a Chinese character coding interval or not;
optionally, the processing rule determining module 220 is further configured to:
and if the coding information falls into the Chinese character coding interval, the read code is the Chinese character.
Optionally, the processing rule determining module 220 is further configured to:
and if the Chinese characters are annotation content or reference content, determining the processing rule as ignoring processing.
Optionally, the processing rule determining module 220 is further configured to:
if the Chinese character is text content, determining the character type of the Chinese character;
and determining a processing rule according to the character category.
Optionally, the processing rule determining module 220 is further configured to:
if the character type is a variable name, a class name or a method name, the determined processing rule is to convert the Chinese character into an English character and/or a numeric character.
Optionally, the processing rule determining module 220 is further configured to:
and if the type of the setting character is the setting type, deleting the setting character according to the determined processing rule.
The device can execute the methods provided by all the embodiments of the disclosure, and has corresponding functional modules and beneficial effects for executing the methods. For technical details that are not described in detail in this embodiment, reference may be made to the methods provided in all the foregoing embodiments of the disclosure.
Referring now to FIG. 3, a block diagram of an electronic device 300 suitable for use in implementing embodiments of the present disclosure is shown. The electronic device in the embodiments of the present disclosure may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a vehicle terminal (e.g., a car navigation terminal), and the like, and a fixed terminal such as a digital TV, a desktop computer, and the like, or various forms of servers such as a stand-alone server or a server cluster. The electronic device shown in fig. 3 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 3, electronic device 300 may include a processing means (e.g., central processing unit, graphics processor, etc.) 301 that may perform various appropriate actions and processes in accordance with a program stored in a read-only memory device (ROM)302 or a program loaded from a storage device 305 into a random access memory device (RAM) 303. In the RAM 303, various programs and data necessary for the operation of the electronic apparatus 300 are also stored. The processing device 301, the ROM 302, and the RAM 303 are connected to each other via a bus 304. An input/output (I/O) interface 305 is also connected to bus 304.
Generally, the following devices may be connected to the I/O interface 305: input devices 306 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; an output device 307 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage devices 308 including, for example, magnetic tape, hard disk, etc.; and a communication device 309. The communication means 309 may allow the electronic device 300 to communicate wirelessly or by wire with other devices to exchange data. While fig. 3 illustrates an electronic device 300 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer-readable medium, the computer program containing program code for performing a method for recommending words. In such an embodiment, the computer program may be downloaded and installed from a network through the communication means 309, or installed from the storage means 305, or installed from the ROM 302. The computer program, when executed by the processing device 301, performs the above-described functions defined in the methods of the embodiments of the present disclosure.
It should be noted that the computer readable medium in the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
In some embodiments, the clients, servers may communicate using any currently known or future developed network Protocol, such as HTTP (HyperText Transfer Protocol), and may interconnect with any form or medium of digital data communication (e.g., a communications network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: traversing and reading the code text, and judging whether the read code is a Chinese character or not; if the Chinese character is the Chinese character, determining a processing rule according to the content information of the Chinese character; and processing the Chinese character according to the processing rule.
Computer program code for carrying out operations for the present disclosure may be written in any combination of one or more programming languages, including but not limited to an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present disclosure may be implemented by software or hardware. Where the name of an element does not in some cases constitute a limitation on the element itself.
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), systems on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
According to one or more embodiments of the disclosed embodiments, the disclosed embodiments disclose a method for processing a code text, including:
traversing and reading codes in the code text, and judging whether the read codes are set characters;
if the read code is a set character, determining a processing rule according to the set character;
and processing the set characters according to the processing rule.
Further, the step of judging whether the read code is a set character includes:
determining coding information corresponding to the read code;
judging whether the coding information falls into a set character coding interval or not;
and if the coding information falls into a set character coding interval, the read code is a set character.
Further, the set characters include chinese characters; judging whether the coding information falls into a set character coding interval or not, including:
judging whether the coding information falls into a Chinese character coding interval or not;
correspondingly, if the coding information falls into a set character coding interval, the read code is a set character, and the method comprises the following steps:
and if the coding information falls into the Chinese character coding interval, the read code is the Chinese character.
Further, determining a processing rule according to the set character includes:
and if the Chinese characters are annotation content or reference content, the processing rule is neglect processing.
Further, determining a processing rule according to the set character includes:
if the Chinese character is text content, determining the character type of the Chinese character;
and determining a processing rule according to the character category.
Further, determining a processing rule according to the character category includes:
if the character type is a variable name, a class name or a method name, the processing rule is to convert the Chinese character into an English character and/or a numeric character.
Further, determining a processing rule according to the set character includes:
and if the type of the setting character is a setting type, deleting the setting character according to the processing rule.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present disclosure and the technical principles employed. Those skilled in the art will appreciate that the present disclosure is not limited to the particular embodiments described herein, and that various obvious changes, adaptations, and substitutions are possible, without departing from the scope of the present disclosure. Therefore, although the present disclosure has been described in greater detail with reference to the above embodiments, the present disclosure is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present disclosure, the scope of which is determined by the scope of the appended claims.

Claims (10)

1. A method for processing code text is characterized by comprising the following steps:
traversing and reading codes in the code text, and judging whether the read codes are set characters;
if the read code is a set character, determining a processing rule according to the set character;
and processing the set characters according to the processing rule.
2. The method of claim 1, wherein determining whether the read code is a set character comprises:
determining coding information corresponding to the read code;
judging whether the coding information falls into a set character coding interval or not;
and if the coding information falls into a set character coding interval, the read code is a set character.
3. The method of claim 2, wherein the set characters comprise chinese characters; judging whether the coding information falls into a set character coding interval or not, including:
judging whether the coding information falls into a Chinese character coding interval or not;
correspondingly, if the coding information falls into a set character coding interval, the read code is a set character, and the method comprises the following steps:
and if the coding information falls into the Chinese character coding interval, the read code is the Chinese character.
4. The method of claim 3, wherein determining a processing rule based on the set character comprises:
and if the Chinese characters are annotation content or reference content, the processing rule is neglect processing.
5. The method of claim 3, wherein determining a processing rule based on the set character comprises:
if the Chinese character is text content, determining the character type of the Chinese character;
and determining a processing rule according to the character category.
6. The method of claim 5, wherein determining processing rules based on the character categories comprises:
if the character type is a variable name, a class name or a method name, the processing rule is to convert the Chinese character into an English character and/or a numeric character.
7. The method according to claim 1 or 5, wherein determining a processing rule according to the set character comprises:
and if the type of the setting character is a setting type, deleting the setting character according to the processing rule.
8. A device for processing code text, comprising:
the set character judgment module is used for performing traversal reading on codes in the code text and judging whether the read codes are set characters;
the processing rule determining module is used for determining a processing rule according to the set characters when the read codes are the set characters;
and setting character processing rules for processing the setting characters according to the processing rules.
9. An electronic device, characterized in that the electronic device comprises:
one or more processing devices;
storage means for storing one or more programs;
when executed by the one or more processing devices, cause the one or more processing devices to implement a method of processing code text as claimed in any one of claims 1-7.
10. A computer-readable medium, on which a computer program is stored, characterized in that the program, when being executed by processing means, carries out a method of processing code text according to any one of claims 1 to 7.
CN202011240915.1A 2020-11-09 2020-11-09 Code text processing method, device, equipment and storage medium Pending CN112363693A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011240915.1A CN112363693A (en) 2020-11-09 2020-11-09 Code text processing method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011240915.1A CN112363693A (en) 2020-11-09 2020-11-09 Code text processing method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112363693A true CN112363693A (en) 2021-02-12

Family

ID=74509949

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011240915.1A Pending CN112363693A (en) 2020-11-09 2020-11-09 Code text processing method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112363693A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113065164A (en) * 2021-04-30 2021-07-02 中国工商银行股份有限公司 Desensitization method, apparatus and electronic device
CN113836498A (en) * 2021-09-01 2021-12-24 浙江岩华文化科技有限公司 Webpage source code obfuscation method and device, electronic device and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107430650A (en) * 2015-03-02 2017-12-01 因温特奥股份公司 Computer program is protected to resist reverse-engineering
CN108009546A (en) * 2016-10-28 2018-05-08 北京京东尚科信息技术有限公司 information identifying method and device
CN109033764A (en) * 2017-06-09 2018-12-18 腾讯科技(深圳)有限公司 Antialiasing processing method and terminal, computer equipment
CN109408113A (en) * 2018-09-03 2019-03-01 平安普惠企业管理有限公司 A kind of code text processing method, system and terminal device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107430650A (en) * 2015-03-02 2017-12-01 因温特奥股份公司 Computer program is protected to resist reverse-engineering
US20180181729A1 (en) * 2015-03-02 2018-06-28 Inventio Ag Protecting a computer program against reverse engineering
CN108009546A (en) * 2016-10-28 2018-05-08 北京京东尚科信息技术有限公司 information identifying method and device
CN109033764A (en) * 2017-06-09 2018-12-18 腾讯科技(深圳)有限公司 Antialiasing processing method and terminal, computer equipment
CN109408113A (en) * 2018-09-03 2019-03-01 平安普惠企业管理有限公司 A kind of code text processing method, system and terminal device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113065164A (en) * 2021-04-30 2021-07-02 中国工商银行股份有限公司 Desensitization method, apparatus and electronic device
CN113836498A (en) * 2021-09-01 2021-12-24 浙江岩华文化科技有限公司 Webpage source code obfuscation method and device, electronic device and storage medium

Similar Documents

Publication Publication Date Title
CN111274760A (en) Rich text data processing method and device, electronic equipment and computer storage medium
CN111555940B (en) Client test method and device, electronic equipment and computer readable storage medium
CN111898340B (en) File processing method, device and readable storage medium
CN111314388B (en) Method and apparatus for detecting SQL injection
CN113157153A (en) Content sharing method and device, electronic equipment and computer readable storage medium
CN112363693A (en) Code text processing method, device, equipment and storage medium
CN111124541B (en) Configuration file generation method, device, equipment and medium
CN111680761B (en) Information feedback method and device and electronic equipment
CN112328927A (en) Document processing method and device, readable medium and electronic equipment
CN109753644B (en) Rich text editing method and device, mobile terminal and storage medium
CN111708680A (en) Error reporting information analysis method and device, electronic equipment and storage medium
CN114765025A (en) Method for generating and recognizing speech recognition model, device, medium and equipment
CN115017110A (en) Information processing method, device, terminal and storage medium
CN113111648B (en) Information processing method and device, terminal and storage medium
CN113807056B (en) Document name sequence error correction method, device and equipment
CN111027281B (en) Word segmentation method, device, equipment and storage medium
CN114429629A (en) Image processing method and device, readable storage medium and electronic equipment
CN114528509A (en) Page display processing method and device, electronic equipment and storage medium
CN113221554A (en) Text processing method and device, electronic equipment and storage medium
CN109426357B (en) Information input method and device
CN114997115A (en) Document processing method, device, equipment and medium
CN112487416A (en) Business process verification method and device and electronic equipment
CN111626045A (en) Character length calculation method and device and electronic equipment
CN114492413B (en) Text proofreading method and device and electronic equipment
CN111562913B (en) Method, device and equipment for pre-creating view component and computer readable 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