CN109840110B - Method, apparatus, device and readable storage medium for processing code message - Google Patents

Method, apparatus, device and readable storage medium for processing code message Download PDF

Info

Publication number
CN109840110B
CN109840110B CN201910087244.0A CN201910087244A CN109840110B CN 109840110 B CN109840110 B CN 109840110B CN 201910087244 A CN201910087244 A CN 201910087244A CN 109840110 B CN109840110 B CN 109840110B
Authority
CN
China
Prior art keywords
code
message
programming
character sequence
sequence
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
CN201910087244.0A
Other languages
Chinese (zh)
Other versions
CN109840110A (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201910087244.0A priority Critical patent/CN109840110B/en
Publication of CN109840110A publication Critical patent/CN109840110A/en
Application granted granted Critical
Publication of CN109840110B publication Critical patent/CN109840110B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • User Interface Of Digital Computer (AREA)

Abstract

The present disclosure provides a method, apparatus, device, and readable storage medium for processing a code message. A method for processing code messages according to the present disclosure, comprising: receiving a code message comprising a sequence of code characters; determining a code meaning of at least a portion of a sequence of code characters; determining a display format of the at least a portion of the sequence of code characters according to the code meaning; and displaying the at least a portion of the sequence of code characters in accordance with the display format.

Description

Method, apparatus, device and readable storage medium for processing code message
Technical Field
The present disclosure relates to the field of message processing, and in particular, to a method, an apparatus, a device, and a readable storage medium for processing a code message.
Background
The user may share the code message in a communication device, such as a cell phone or a computer, for discussion, research. Currently, the code message is usually transmitted in a text message format, for example, a user may send a code message from one user terminal to another user terminal, and the received code message also only has the text message format, and lacks the processing of typesetting, formatting and the like, so that the displayed code message and the code in the programming software have a difference in the displayed visual effect, which is not beneficial for the user to view and look up, and affects the user experience.
Disclosure of Invention
To this end, the present disclosure provides a method, apparatus, device and readable storage medium for processing a code message.
According to an aspect of the present disclosure, there is provided a method for processing a code message, including: receiving a code message comprising a sequence of code characters; determining a code meaning of at least a portion of a sequence of code characters; determining a display format of the at least a portion of the sequence of code characters according to the code meaning; and displaying the at least a portion of the sequence of code characters in accordance with the display format.
According to an embodiment of the present disclosure, the receiving a code message including a sequence of code characters comprises: the code message is received from an input device, and the method further includes retrieving a programming language for the code message.
According to an embodiment of the present disclosure, the receiving a code message including a sequence of code characters comprises: the code message is received over a network, and the method further includes receiving a message regarding a programming language of the code message over the network.
According to an embodiment of the present disclosure, determining a code meaning of at least a portion of a sequence of code characters comprises: the code character sequences are matched according to grammatical rules of the programming language to determine a code meaning of at least a portion of the code character sequences.
According to an embodiment of the present disclosure, matching a code character sequence according to a grammar rule of the programming language includes: and matching the at least one part of the code character sequence according to a programming rule and a programming mode defined according to a grammar rule to determine the programming mode to which the code character sequence belongs, wherein the programming mode represents the meaning of the code.
According to an embodiment of the present disclosure, matching the code character sequence according to the grammar rules of the programming language further comprises: for a matched code character sequence for which a programming pattern has been determined by matching, further matching is performed on a partial code character sequence in the matched code character sequence according to a sub-programming rule and a sub-programming pattern defined for the programming pattern.
According to an embodiment of the present disclosure, matching the code character sequence according to the grammar rules of the programming language further comprises: for a code character sequence whose code meaning cannot be determined by matching, its code meaning is determined as unmatched.
According to an embodiment of the present disclosure, the method for processing a code message further includes generating a matching parameter, where the matching parameter includes a start position of the at least one portion of the code character sequence, a code character sequence length, and a code meaning.
According to an embodiment of the present disclosure, determining a display format of the at least a portion of the sequence of code characters according to the code meaning includes: and determining the display format of the code character sequence corresponding to the starting position and the length of the code character sequence in the matching parameters according to the code meaning in the matching parameters.
In accordance with an embodiment of the disclosure, in the case that the code message includes a plurality of lines of character sequences, displaying the at least a portion of the code character sequence includes: and displaying the code character sequences of the same line in the code message as the code character sequences with the same line number.
According to an embodiment of the present disclosure, the method for processing a code message further includes: hiding a portion of the code character sequence from display.
According to an embodiment of the present disclosure, the method for processing a code message further includes: and transmitting the code message and a message about a programming language of the code message, wherein the code message has a structure of a text message.
According to another aspect of the present disclosure, there is provided an apparatus for processing a code message, including: a receiving unit configured to receive a code message including a sequence of code characters; a code meaning determination unit configured to determine a code meaning of at least a portion of the sequence of code characters; a display format determination unit configured to determine a display format of the at least a portion of the sequence of code characters according to the code meaning; and a display unit configured to display the at least a portion of the sequence of code characters in accordance with the display format.
According to an embodiment of the present disclosure, the receiving unit receives the code message from an input device, and the receiving unit is further configured to acquire a programming language of the code message.
According to an embodiment of the present disclosure, the receiving unit receives the code message through a network, and the receiving unit is further configured to receive a message regarding a programming language of the code message through the network.
According to an embodiment of the present disclosure, the code meaning determining unit matches the code character sequence according to a grammar rule of the programming language to determine the code meaning of at least a part of the code character sequence.
According to the embodiment of the present disclosure, the code meaning determining unit matches the at least a part of the code character sequence according to a programming rule and a programming pattern defined according to a syntax rule to determine a programming pattern to which the code character sequence belongs, wherein the programming pattern represents the code meaning.
According to an embodiment of the present disclosure, the code meaning determining unit determines a programming mode to which the code character sequence belongs as a programming mode to which the code character sequence belongs by matching a programming mode to which the at least one portion of the code character sequence is determined to conform, wherein the programming mode represents a code meaning of the code character sequence.
According to an embodiment of the present disclosure, the code meaning determination unit is further configured to: for a matched code character sequence for which a programming pattern has been determined by matching, further matching is performed on a partial code character sequence in the matched code character sequence according to a sub-programming rule and a sub-programming pattern defined for the programming pattern.
According to an embodiment of the present disclosure, the code meaning determination unit is further configured to: for a code character sequence whose code meaning cannot be determined by matching, its code meaning is determined as unmatched.
According to an embodiment of the present disclosure, the code meaning determination unit is further configured to generate matching parameters including a start position of the at least one portion of the code character sequence, a code character sequence length, and a code meaning.
According to the embodiment of the present disclosure, the code meaning determining unit determines the display format of the code character sequence corresponding to the start position and the length of the code character sequence in the matching parameter, according to the code meaning in the matching parameter.
According to the embodiment of the present disclosure, in a case where the code message includes a plurality of lines of character sequences, the display unit displays the lines of code character sequences as having the same line number for code character sequences belonging to the same line in the code message.
According to an embodiment of the disclosure, the display unit is further configured to: hiding a portion of the code character sequence from display.
According to an embodiment of the present disclosure, the apparatus for processing a code message further includes a sending unit configured to: and transmitting the code message and a message about a programming language of the code message, wherein the code message has a structure of a text message.
According to still another aspect of the present disclosure, there is provided an apparatus for processing a code message, including: one or more processors; and one or more memories, wherein the memories have stored therein computer readable code which, when executed by the one or more processors, performs a method for processing code messages as described above.
According to yet another aspect of the present disclosure, there is provided a computer-readable storage medium having stored thereon instructions, which, when executed by a processor, cause the processor to perform the method for processing a code message as described above.
Drawings
In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present disclosure, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1A shows a schematic diagram of the display effect 101 of an unprocessed code message in a mobile terminal;
FIG. 1B is a diagram illustrating the display effect 102 of an unprocessed code message on a computer screen;
FIG. 2 shows a flow diagram of a method for processing a code message according to an embodiment of the present disclosure;
FIG. 3 shows a schematic diagram of receiving a code message from an input device according to an embodiment of the disclosure;
FIG. 4A shows a schematic diagram of a display effect 401 of a processed code message in a mobile terminal according to an embodiment of the disclosure;
FIG. 4B is a diagram illustrating the display effect 402 of a processed code message on a computer screen according to an embodiment of the disclosure;
FIG. 5 illustrates a schematic diagram of hidden display of a portion of a code message, according to an embodiment of the disclosure;
FIG. 6 shows a schematic diagram of an apparatus for processing code messages according to an embodiment of the present disclosure;
FIG. 7 shows a schematic diagram of an apparatus for processing code messages according to an embodiment of the present disclosure;
FIG. 8A illustrates a block diagram of one particular embodiment of an apparatus or device in accordance with embodiments of the disclosure;
FIG. 8B shows a schematic diagram of a sender session window, according to an embodiment of the present disclosure;
FIG. 9 illustrates a schematic diagram of an architecture of an exemplary computing device, according to an embodiment of the present disclosure.
Detailed Description
The technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the drawings in the embodiments of the present disclosure. It is to be understood that the described embodiments are merely exemplary of some, and not all, of the present disclosure. All other embodiments, which can be derived by a person skilled in the art from the embodiments disclosed herein without any inventive step, are intended to be within the scope of the present disclosure.
The terms "a," "an," "the," and/or "the" are not intended to be inclusive in the singular, but rather are inclusive in the plural, unless the context clearly dictates otherwise. The use of "first," "second," and similar terms in this disclosure is not intended to indicate any order, quantity, or importance, but rather is used to distinguish one element from another. Likewise, the word "comprising" or "comprises", and the like, means that the element or item listed before the word covers the element or item listed after the word and its equivalents, but does not exclude other elements or items. The terms "connected" or "coupled" and the like are not restricted to physical or mechanical connections, but may include electrical connections, whether direct or indirect.
Flow charts are used in this disclosure to illustrate steps of methods according to embodiments of the disclosure. It should be understood that the preceding and following steps are not necessarily performed in the exact order in which they are performed. Rather, various steps may be processed in reverse order or simultaneously. Meanwhile, other operations may be added to the processes, or a certain step or steps may be removed from the processes.
As previously mentioned, a user may share code messages in a communication device, such as a cell phone or computer, for example, for conducting discussions, research, communications, etc., with respect to program code. The communication device includes, but is not limited to, a mobile terminal or a fixed terminal having data processing capability, such as a notebook computer, a desktop computer, a smart phone, a tablet computer, and the like. For example, a software engineer may need to transmit program code edited in specialized programming software to other personnel in some cases for the purpose of discussing or researching the program code.
For example, a sender may utilize communication software to send a code message to a recipient over a communication network. The communication software may be any type of instant messaging software, e-mail, etc., for example. The communication networks include, but are not limited to, the internet, IPTV networks, wireless fidelity (Wi-Fi) networks, Wireless Local Area Networks (WLAN), Local Area Networks (LAN) and/or Metropolitan Area Networks (MAN), etc., following configurations such as transmission control protocol and internet protocol (TCP/IP), User Datagram Protocol (UDP), hypertext transfer protocol (HTTP) and/or File Transfer Protocol (FTP).
Currently, in communication software, the sender typically transmits the code message in the format of a text message, whereby the code message received by the receiver also has only the format of a text message. The viewed program code lacks the processing of typesetting and formatting for both the sender and the receiver. Fig. 1A shows a schematic diagram of a display effect 101 of an unprocessed code message in a mobile terminal, and fig. 1B shows a schematic diagram of a display effect 102 of an unprocessed code message in a computer screen.
As shown in fig. 1A and 1B, the displayed code message has only the format of a text message, and does not have the format of program code displayed in professional programming software. In professional programming software, codes with different code meanings are distinguished, and are displayed in a distinguished manner through font formats such as colors, bolding and the like. In addition, in professional programming software, the code displayed has a line number.
For example, as shown in fig. 1A, there is no distinction made in the display process for code character sequences having different code meanings, for example, the code character sequence "def fib (n)" for defining a function is not distinguished from "write Fibonacci series up to n" as a code comment in a received code message, so that it is difficult for a user to quickly distinguish between the two. This will affect the user's viewing experience of the coded message. In addition, the code messages shown in fig. 1A and 1B do not show a line number, and in the case where the program code includes a plurality of lines, the code messages without the line number will appear cluttered, for example, it is difficult for the receiving party to quickly locate the program code of a certain line. Therefore, the unprocessed code message is not beneficial to the discussion and research among users in the display process, and the user experience is seriously influenced.
To this end, the present disclosure provides a method for processing a code message. Before the code message is displayed on a display screen of a sender or a receiver, the code meaning of the code character sequence is identified according to the grammar rule of the programming language, and the display format of the code character sequence is determined according to the identified code meaning of the code character sequence, so that the formatted display effect of the code message is realized. For example, program code can be clearly and intuitively displayed in conversation messages in layouts and formats familiar to users (e.g., software engineers), enhancing the user experience of viewing code messages in conversations.
FIG. 2 shows a flow diagram 200 of a method for processing a code message according to an embodiment of the disclosure. Hereinafter, a method for processing a code message according to the present disclosure will be described in detail with reference to fig. 2.
As shown in fig. 2, first, in step S101, a code message including a code character sequence is received. Wherein the code character sequence may be represented as a piece of program code.
It is to be noted that the method for processing a code message provided by the present disclosure may be applied to a sender and a receiver, respectively, i.e. the sender and the receiver may individually perform the method according to the present disclosure to achieve a formatted display effect of the code message. In the course of performing the method, the sender and the receiver have differences in the implementation of receiving the code message, and for this point, detailed description will be separately described below in different implementations according to the embodiments of the present disclosure. In addition, for the sender, the step of sending the code message and the programming language of the code message to the recipient is also included, which will be described in detail below. In addition to the above two differences, unless otherwise noted, the other steps of the method (e.g., steps S102-S105) are applicable to both the sender and the receiver, i.e., both the sender and the receiver are executable to enable formatted display of the code message.
According to one implementation of the embodiments of the present disclosure, the receiving a code message including a sequence of code characters (step S101) may include receiving the code message from an input device. For example, a user who is a sender of a code message may obtain the code message to be sent based on an input device. In other words, this implementation means that step S101 is performed by the sender.
By way of example, fig. 3 shows a schematic diagram of receiving a code message from an input device according to this implementation of an embodiment of the disclosure. The code character sequence shown in fig. 3 is Python language. For example, the sender may enter the code message editing interface through a dialog entry box toolbar of the communication software. As shown in fig. 3, the sender may directly input the program code to be sent in the code message edit box, or may copy the program code edited in the professional programming software into the code message edit box. Here, the program code received from the code message edit box may be represented as a code message, and thus, reception of the code message from the input device may be achieved.
According to this implementation of the embodiment of the present disclosure, the method for processing a code message further includes acquiring a programming language of the code message. For example, as shown in fig. 3, the sender may select a programming language, e.g., Python language, corresponding to the code message through a drop-down list box located at the top right in block 300. In addition, the programming language of the program code entered into the code message edit box may also be automatically identified.
According to another implementation of the embodiment of the present disclosure, the receiving a code message including a sequence of code characters (step S101) may further include receiving the code message through a network. For example, a user who is a recipient of a code message may receive the code message from a sender via a communication network using a mobile terminal or a computer or the like. In other words, this implementation means that step S101 is performed by the receiving side.
According to this implementation of the embodiment of the present disclosure, the method for processing a code message further includes receiving a message regarding a programming language of the code message through a network. For example, while sending the code message to the receiver, the sender may also send the programming language of the code message to the receiver in the form of a message, so that the receiver may obtain information about the programming language of the code message while receiving the code message for processing the received code message. In addition, the programming language of the program code in the received code message may also be automatically identified.
As described above, both the sender and the receiver may perform the method according to the present disclosure. Wherein, in the step S101 of receiving the code message, the sender may receive the code message and the programming language from the input device; the recipient may receive the code message and programming language from the sender over the network. After the sender or the receiver receives the code message, the method according to the present disclosure may be performed individually, for example:
for a sender, in the process of receiving a code message from a code message editing frame, matching processing can be carried out on an input code character sequence in real time to determine the code meaning of the code character sequence, and the code character sequence is displayed according to the identified code meaning;
for the receiving party, after receiving the code message through the communication network, the code character sequence in the code message can be matched to determine the code meaning and displayed according to the identified code meaning.
Thus, the sender and the receiver receiving the code message will perform the following steps S102-S104 and optionally step S105, respectively, according to the method according to the present disclosure, i.e. the following description regarding steps S102-S105 applies to both the sender and the receiver, without distinction here. Next, as shown in FIG. 2, at step S102, the code meaning of at least a portion of the code character sequence is determined. For example, in the program code of Python language, the code meaning may include comments, keywords, values, custom functions, variables, and the like.
For example, in the program code of Python language as shown in fig. 3, the character sequence following the symbol "#" is a comment, and adding a comment to the code helps understanding the program code; "def", "while" and "print" are keywords in Python language; "0, 1" is a number; "fib (n)" is a custom function; "result" is a variable, and so on. Furthermore, the code meaning is associated with the programming language, which may be represented by different symbols in different programming languages, for example, in the C + + language the symbol "/" indicates the beginning of the annotation and the symbol "/" indicates the end of the annotation. The meaning of the code may have the same meaning commonly understood by those of ordinary skill in the art to which this disclosure belongs, and a list of the meanings of the code included in each programming language is not provided herein.
According to an embodiment of the present disclosure, determining a code meaning of at least a portion of a sequence of code characters may include: the code character sequences are matched according to grammatical rules of the programming language to determine a code meaning of at least a portion of the code character sequences. For example, after a code message including a code character sequence and a programming language of the code message are acquired, the at least a portion of the code character sequence may be matched according to a programming rule and a programming pattern defined according to a grammar rule to determine a programming pattern to which the code character sequence belongs, wherein the programming pattern represents a meaning of a code.
According to the embodiments of the present disclosure, a set of programming rules and programming patterns may be predefined according to syntax rules of a programming language.
The programming pattern may be used to represent code meaning. For example, here, taking JSON language as an example, the programming schema may include an object schema, an array schema, a string schema, a number schema, a predefined constant schema, an annotation schema, and the like.
The programming rules may indicate which programming patterns may be applied for a certain position in the code character sequence. For example, still taking the JSON language as an example, a programming rule may include that the position of the beginning of a code character sequence can only be a "value", i.e., can only be one of the following six programming modes: an object mode, an array mode, a string mode, a number mode, a predefined constant mode, and an annotation mode. The programming rules may further include: in the array mode, the first occurrence is only "value", followed by "symbol" as separator.
It should be understood that for a certain programming language, the rules for writing program code are fixed and known, and thus, a series of programming rules and programming patterns can be predefined for the programming language, and the code character sequence can be matched by using the predefined programming rules and programming patterns to determine the code meaning of the code character sequence.
First, in the case where the programming rule and the programming pattern are defined in advance, for example, matching processing may be performed to determine the programming pattern to which the code character sequence belongs, starting from the head position of the code character sequence.
According to one implementation of an embodiment of the present disclosure, a matching process for a sequence of code characters may be performed by defining a start and/or end symbol. For example, in Python language, the annotation pattern starts with the symbol "#" and ends with a line feed; the object mode starts with the symbol "{" and ends with the symbol "}, the array mode ends with the symbol" [ "and ends with the symbol" ] ", and for the predefined constant mode, it is one of three fixed strings," true "," false "," null ".
Thus, for example, the received code character sequence may be as follows:
Figure BDA0001962165980000091
TABLE 1
The matching process can be performed from the beginning position of the above code character sequence. That is, by matching, the code character sequence "Example" starting with the symbol "#" to ending with a line feed can be determined as the annotation pattern. Then, the matching process may be continued from the end of the last group of successfully matched character sequences, for example, the character "a" may be determined as a constant pattern, and the code character sequence "[ 1,2, [3,4,5] ] ending with the symbol" [ "start, with the symbol" ] "may be determined as a group pattern.
According to another implementation manner of the embodiment of the present disclosure, the matching process may also be implemented by a Regular Expression (Regular Expression). The regular expression is a logical formula that operates on character strings (including common characters (e.g., letters between a to z) and special characters (e.g., "meta characters")), i.e., a "regular character string" that expresses the filtering logic for a character string is composed of a number of specific characters defined in advance and a combination of the specific characters. For example, the code character sequence is matched with the rule character string, so as to determine the rule character string which is accorded with the code character sequence, and further determine the programming mode which belongs to the code character sequence. In other implementation manners according to the embodiments of the present disclosure, the specific manner of performing the matching processing on the code character sequence may also be performed in other manners, and does not limit the present disclosure.
Thus, after determining a programming pattern to which at least a portion of a code character sequence conforms by matching, the programming pattern may be determined as a programming pattern to which the code character sequence belongs, wherein the programming pattern represents a code meaning of the code character sequence. For example, by matching the code character sequence, in the case where the character "a" shown in table 1 is determined to be a constant pattern, the character "a" can be marked as a constant pattern. That is, the character "a" marked as constant mode indicates the code meaning of the constant.
According to an embodiment of the present disclosure, matching the code character sequence according to the grammar rules of the programming language further comprises: for a matched code character sequence for which a programming pattern has been determined by matching, further matching is performed on a partial code character sequence in the matched code character sequence according to a sub-programming rule and a sub-programming pattern defined for the programming pattern.
According to the embodiment of the present disclosure, the programming mode defined according to the grammar rule of the programming language may further include a recursible sub-programming rule and a sub-programming mode. For example, a code character sequence which is determined to belong to the array mode through matching can be further subjected to matching processing, so that whether the code character sequence which belongs to the array mode further comprises the sub-programming mode is judged. The sub-programming rules and sub-programming patterns may be partially the same as the programming rules and programming patterns described above. For example, the sub-programming modes may include an object mode, an array mode, a string mode, a number mode, a predefined constant mode, an annotation mode, and the like. The sub-programming rules may indicate which sub-programming patterns a location within a certain programming pattern may apply. For example, the sub-programming rules may include: in the array mode, the first occurrence is only "value", followed by "symbol" as separator. For a certain programming language, the rules for writing program code are fixed and known, whereby a set of sub-programming rules and sub-programming patterns can be predefined for each programming pattern, and the code meaning of the code character sequence can be determined by further matching the code character sequence within the programming pattern using the predefined sub-programming rules and sub-programming patterns.
For example, for the code character sequence "[ 1,2, [3,4,5] ]" shown in table 1, it can be determined as an array pattern in its entirety by matching. Then, continuing to match the code character sequences in the array, it is possible to determine "1" and "2" as numerical patterns and "[ 3,4,5 ]" as array patterns. Further, "3", "4", "5" in the array pattern "[ 3,4,5 ]" may be determined as the numerical value pattern by further matching. Thereby, determination of the meaning of the code represented by each character sequence in the code character sequence of row number 2 shown in table 1 is achieved.
It can be seen that, in the process of matching a code character sequence according to the present disclosure, a segment of code character sequence may be determined as a certain programming pattern according to the programming rule and the programming pattern, and then, the segment of code character sequence may be further matched according to the sub-programming rule and the sub-programming pattern of the programming pattern until no more sub-programming patterns are applicable.
Next, according to the embodiment of the present disclosure, the matching operation may be continuously performed from the end of the last group of code character sequences that are successfully matched, for example, the character "def" is continuously subjected to the matching process described above, and is determined as the keyword pattern. Then, similarly, the above matching process may be continued, and the programming mode thereof is determined in the order of the code character sequence, for example, fib is a custom function mode; n is a variable mode; write Fibonacci series up to n is the annotation mode; a. b is a variable mode; 0. 1 is a numerical mode; while and print are keyword patterns. According to an embodiment of the present disclosure, matching the code character sequence according to the grammar rules of the programming language further comprises: for a code character sequence whose code meaning cannot be determined by matching, its code meaning is determined as unmatched.
For example, as shown in table 1, when the matching process proceeds to the code character sequence having the line number of 6, for the symbol "^" following "b", the program pattern to which it belongs cannot be determined by the program rule and the program pattern as described above, for example, because the program pattern corresponding to the symbol "^" is not specified in the predefined program pattern, or because the symbol "^" is an erroneously input character in the program code.
According to one embodiment of the present disclosure, for a code character sequence, such as a symbol "^" for which the code meaning could not be determined by matching, its code meaning can be directly determined as not matching. According to another embodiment of the present disclosure, an unmatched pattern may also be defined, which may be determined as belonging to an unmatched pattern for a code character sequence, such as the symbol "^" for which the unambiguous code meaning was not determined by matching, the unmatched pattern indicating that the code meaning of the code character sequence is ambiguous or undefined.
After the symbol "^" the above matching process is continued until the end of the whole code character sequence is reached, i.e. the characters a and b in "a + b" in the code character sequence with row number 7 are variable patterns, or no pattern can match.
As shown in fig. 2, optionally, the method for processing a code message may further include step S105 of generating a matching parameter. Wherein the matching parameters include a start position of at least a portion of the code character sequence, a code character sequence length, and a code meaning. For example, the matching parameters may be represented by an array function with a structure { start, length, mode }.
For example, as described above, after the code character sequence with the row number 1 in table 1 is determined to be the comment mode by matching, the array function 1 with the structure of {2,8, comment } may be output. The array function 1 may be used to indicate that the 2 nd-8 th bit characters are annotation patterns in the code message. Then, after the code character sequence with the row number 2 in the chart 1 is processed by matching, the array functions 2, {9,1, constant }, and 3{11, 13, array }, which indicate that the character with the 9 th bit is a variable pattern and the characters with the 11 th to 23 th bits are an array pattern, are output for the code character sequence with the row number 2. For a code character sequence "[ 1,2, [3,4,5] ] that has been determined to be an array pattern, sub-programming patterns therein may also be determined according to a sub-programming rule and the sub-programming patterns for the array pattern, and the following array functions for the above-described array patterns are output: array function 4{12,1, value }, array function 5{14,1, value }, and array function 6{16, 7, array }, which indicate that the 12 th and 14 th characters are in the sub-array mode, and the 16 th to 22 th characters are in the sub-array mode. Further, for the code character sequence "[ 3,4,5 ]" belonging to the sub-array mode, the secondary programming mode can be determined according to the secondary programming rule and the secondary programming mode for the sub-array mode, and the array function 7{17,1, value }, the array function 8{19,1, value }, the array function 9{21,1, value }, is output, and the characters representing the 17 th, 19 th and 21 st bits are in the secondary value mode. By analogy, the matching parameters corresponding to the whole code character sequence shown in table 1 can be obtained. The matching parameters may be used to determine a display format for the sequence of code characters.
Next, as shown in fig. 2, at step S103, a display format of at least a part of the code character sequence is determined based on the code meaning, and at step S014, the at least a part of the code character sequence is displayed in the display format. According to the embodiment of the disclosure, a corresponding display format may be defined in advance for each programming mode, and the display format may be a color, a font size, a bolder, a slant, and the like of a displayed code character sequence.
Fig. 4A is a schematic diagram illustrating a display effect 401 of a processed code message in a mobile terminal according to an embodiment of the present disclosure, and fig. 4B is a schematic diagram illustrating a display effect 402 of a processed code message in a computer screen according to an embodiment of the present disclosure. Where the code character sequence shown in fig. 4A and 4B is Python language as an example, the method according to the present disclosure may also be applied to other programming languages, such as JSON language, C + + language, and so on.
Further, the code character sequences shown in fig. 4A and 4B are the same as those shown in table 1. That is, for the codes in fig. 4A and 4B, the code meaning of the code character sequence may be determined through step S102 as described above, and optionally, the corresponding matching parameter may be output through step S105 as described above, and the specific process is not described herein again. Next, the above steps S103 and S104 may be performed on the code character sequence, and displayed with the display effect as shown in fig. 4A and 4B.
Hereinafter, the above step S103 and step S104 according to the embodiment of the present disclosure will be described in detail with reference to the schematic display effect in fig. 4A and 4B.
According to an embodiment of the present disclosure, a programming pattern, such as a numerical pattern, to which a code character sequence belongs can be determined by matching, and the numerical value indicates that the code meaning of the code character sequence is a numerical value. According to the embodiment of the disclosure, in order to clearly and intuitively display the program codes, different display formats can be set for different code meanings as required.
For example, as shown in fig. 4A or 4B, a code character sequence (such as 1,2,3,4,5) belonging to a numerical pattern may be set to be displayed in italics; code character sequences belonging to annotation patterns (such as, Example, sample, write Fibonacci series up to n) are set to appear gray; displaying the code character sequence (such as def, while, print) setting belonging to the keyword pattern as font bolded; setting fib belonging to the self-defined function to be displayed as italic bold; code character sequences belonging to unmatched patterns (such as symbols ^) are set to show underlined and word sizes are increased, and so on.
According to the embodiment of the present disclosure, the above process of determining the display format of at least a part of the code character sequence according to the code meaning may be implemented according to the matching parameters output in step S105.
For example, the display format of the code character sequence corresponding to the start position and the length of the code character sequence in the matching parameter may be determined according to the meaning of the code in the matching parameter. For example, according to the array function 1{2,8, comment } output in step S105, the characters of 2 th to 8 th bits in the code character sequence whose code meaning is comment can be displayed in gray. Similarly, the code character sequence with row number 2 in fig. 4A can be set to a corresponding display format according to the output array functions 2-9, which is not described herein again. The process of determining the display format of at least a portion of the sequence of code characters may also be implemented in other ways and should not be construed as limiting the present disclosure.
In step S104, the at least a portion of the code character sequence is displayed in the display format.
According to the embodiment of the disclosure, in the process of displaying the code character sequence, the screen space occupied by displaying the line number can be calculated, and the line number is added on the left side of the code character sequence. For example, for a code character sequence that includes only a line number of a single digit, displaying the line number requires only one character of screen space, and for a code character sequence that includes a line number of a ten digit, displaying the line number requires two characters of screen space. The line number may facilitate a user to quickly locate a certain travel order code.
In accordance with an embodiment of the disclosure, in the case that the code message includes a plurality of lines of character sequences, displaying the at least a portion of the code character sequence includes: and displaying the code character sequences of the same line in the code message as the code character sequences with the same line number.
For example, the number of characters that can be displayed in a line is different for display screens having different widths. The width of the display screen of the terminal device shown in fig. 4A may be smaller than the width of the display screen of the computer screen shown in fig. 4B. For a line of longer code character sequences, for example, a code character sequence with a line number of 3 may be displayed in the same line in fig. 4B, whereas in fig. 4A, the screen width is not wide enough to display the code character sequence of the entire line, in which case a part of the line of code sequence may be displayed in the next line of the display screen according to the screen size.
In fig. 4A, for the code character sequences "def fib (n) # write filenamecci series up to n" belonging to the same line in the code message, the line code character sequences are shown as corresponding to the same line number, i.e., each corresponding to line number 3. When a user views the same code message in display screens with different sizes, the display mode can ensure that the line number of the program code does not change along with the size of the display screens. For example, when a user exchanges and discusses program code with line number 3, the same code character sequence "def fib (n): # write Fibonacci series up to n" is represented.
As shown in fig. 4A and 4B, the characters such as keywords and numerical values included in the whole code character sequence can be clearly and definitely checked, the code character sequence in a certain row can be quickly located, or the symbols included in the whole code character sequence and having unmatched code meanings can be remarkably checked, for example, the erroneously input symbol "^" in the code can be quickly identified. By the method for processing the code message, the code message displayed in the conversation box can be displayed in different display formats according to different code meanings, so that the code message is convenient for a user to view, and the code can be displayed in the conversation message in a format familiar to programmers, so that the user experience is improved.
In the case where the code message includes a long sequence of code characters, displaying the entire sequence of code characters occupies an excessively long space in the display screen, which causes inconvenience in view for the user. According to an embodiment of the present disclosure, the method for processing a code message further includes hiding and displaying a portion of the code character sequence.
Fig. 5 shows a schematic diagram of hiding and displaying a part of a code character sequence, according to an embodiment of the present disclosure, for example, the maximum display line number of a code message may be set according to the size of a display screen, for example, for the display screen of a terminal device, the maximum display line number may be set to 5, more than 5 lines of code character sequences are folded, and a user may know that all code messages are not displayed here through the fields shown in fig. 5 for viewing all codes, that is, the code character sequences after 5 lines are automatically hidden. In addition, the user may also display all code messages, for example, by clicking on the view all codes field. It should be noted that the maximum display line number is set to 5 as an example, and may be set to other values, for example, for a larger display screen, the maximum display line number may be set to 10. For another example, for a display screen of a computer, a code character sequence displaying more lines can be set for easy viewing.
By hiding a portion of the sequence of code characters as shown in fig. 5, the received code message may be displayed more compactly and without taking up too much space in the display screen, which may enhance the user experience of viewing the code message in a conversation.
According to the embodiment of the disclosure, when necessary, the complete code character sequence can be expanded to a larger display area for viewing and operation. For example, the complete code character sequence may be displayed on another page, such as in a separate pop-up window, at which point the code may be displayed over nearly the entire screen space for easy viewing.
According to an embodiment of the present disclosure, the method for processing a code message may further include transmitting the code message and a message of a programming language with respect to the code message, wherein the code message has a structure of a text message.
For example, as a sender of the code message, the program code in the code message edit box can be sent to a receiver in a text message format for the receiver to view the program code. In the process of sending the code message, the sender can also send the programming language of the code message to the receiver. The recipient may process and display the received code message as described above according to a programming language.
According to the embodiment of the disclosure, the definition of the code message structure can be expanded on the basis of the text message, and a field of a programming language is additionally added. For example, before sending a code message, a message body may be first assembled according to the structure of a text message, and a field indicating a programming language may be additionally set on the message body.
This way of sending the code message in text message format can solve the problem of compatibility of old and new versions of the device for display. For example, a recipient device that cannot implement the method of processing a code message as described above, such as may be represented as a legacy device. And the received code message is still in the structure of a text message, so that the old-version equipment can still normally display the received code message. For example, after receiving the code message and the message of the programming language, the old device ignores the message of the programming language and displays the received code message according to the format of the text message, and the display effect can be as shown in fig. 1A or fig. 1B, thereby avoiding the problem that the old device cannot display and view the code. After the old device can implement the method of processing a code message as described above, such as represented as a new device, the method can be implemented and displayed for a previously received code message, and the display effect can be as shown in fig. 4A or fig. 4B.
In addition, after receiving the code message, the receiving-side device may copy the code message to a code message editing frame configured in the receiving-side device to perform a corresponding operation when the received code message needs to be operated and edited.
According to the method for processing the code message, the received code message is matched according to the programming rule and the programming mode defined by the grammar rule of the programming language, the code meaning of the code character sequence is determined, the display format of the code character sequence is determined according to the code meaning, and the processed code message is displayed, so that the code message can be displayed in a conversation message stream in the typesetting and format familiar to programmers, the method is clear and intuitive, is convenient to view, does not occupy too much display space, and greatly improves the user experience of viewing the code message in conversation.
The present disclosure also provides an apparatus for processing a code message. Fig. 6 shows a schematic diagram of an apparatus 1000 for processing a code message according to an embodiment of the present disclosure.
As shown in fig. 6, the apparatus 1000 for processing a code message may include a receiving unit 1010, a code meaning determining unit 1020, a display format determining unit 1030, and a display unit 1040. Wherein the receiving unit 1010 is configured to receive a code message comprising a sequence of code characters, the code meaning determining unit 1020 is configured to determine a code meaning of at least a portion of the sequence of code characters, the display format determining unit 1030 is configured to determine a display format of the at least a portion of the sequence of code characters based on the code meaning, and the display unit 1040 is configured to display the at least a portion of the sequence of code characters in the display format.
Both the sender and the receiver may be respectively configured with the above-described apparatus 1000 according to an embodiment of the present disclosure, and perform corresponding operations. It should be noted that the receiving units 1010 of the transmitting side and the receiving side are different in implementation of receiving the code message, and will be described separately below. The sender may further comprise a sending unit 1050 for sending the code message and the programming language of the code message to the recipient. Except for this, the operations performed by the above-described code meaning determining unit 1020, display format determining unit 1030, and display unit 1040 included in the sender and the receiver are the same and will not be described separately here.
According to an embodiment of the present disclosure, the receiving unit 1010 configured at the sender may receive the code message from an input device. In this case, the receiving unit 1010 is further configured to obtain the programming language of the code message, for example, by the input device.
According to an embodiment of the present disclosure, the receiving unit 1010 configured at the receiving side may further receive the code message through a network, where the code message has a structure of a text message. In this case, the receiving unit 1010 is further configured to receive a message regarding a programming language of the code message through a network.
According to an embodiment of the present disclosure, the code meaning determining unit 1020 may match the code character sequence according to a grammar rule of the programming language to determine the code meaning of at least a portion of the code character sequence.
According to the embodiment of the present disclosure, the code meaning determining unit 1020 may match the at least one portion of the code character sequence according to a programming rule and a programming pattern defined according to a syntax rule to determine the programming pattern to which the code character sequence belongs, wherein the programming pattern represents the code meaning.
According to the embodiment of the present disclosure, the code meaning determining unit 1020 may determine, as a programming mode to which the code character sequence belongs, a programming mode to which the at least one portion of the code character sequence is determined to conform by matching, where the programming mode represents a code meaning of the code character sequence.
According to an embodiment of the present disclosure, the code meaning determining unit 1020 may be further configured to: for the matched code character sequences of which the programming modes are determined through matching, carrying out further matching on partial code character sequences in the matched code character sequences according to the sub-programming rules and the sub-programming modes defined according to the grammar rules.
According to an embodiment of the present disclosure, optionally, the code meaning determining unit 1020 may be further configured to: for a code character sequence whose code meaning cannot be determined by matching, its code meaning is determined as unmatched.
According to the embodiment of the present disclosure, the code meaning determining unit 1020 may be further configured to generate matching parameters including a start position of the at least one portion of the code character sequence, a code character sequence length, and a code meaning, wherein determining a display format of the at least one portion of the code character sequence according to the code meaning includes: and determining the display format of the code character sequence corresponding to the starting position and the length of the code character sequence in the matching parameters according to the code meaning in the matching parameters.
According to the embodiment of the present disclosure, in the case where the code message includes a plurality of lines of character sequences, the display unit 1040 displays the lines of code character sequences as having the same line number for code character sequences belonging to the same line in the code message.
According to an embodiment of the present disclosure, the display unit 1040 may be further configured to: hiding a portion of the code character sequence from display.
As shown in fig. 6, in the apparatus 1000 for processing a code message according to an embodiment of the present disclosure, a sending unit 1050 may be further configured for the sender to send the code message and a programming language of the code message to the recipient.
The sending unit 1050 is configured to: and transmitting the code message and a message about a programming language of the code message, wherein the code message has a structure of a text message.
The present disclosure also provides an apparatus for processing a code message. Fig. 7 shows a schematic diagram of an apparatus 2000 according to an embodiment of the present disclosure.
As shown in fig. 7, the device 2000 may include one or more processors 2010, and one or more memories 2020, wherein the memory 2020 has stored therein computer-readable code that, when executed by the one or more processors 2010, may perform a method for processing code messages as described above.
FIG. 8A illustrates a block diagram of one particular embodiment of an apparatus or device in accordance with embodiments of the disclosure. A schematic diagram of an apparatus or device applying the processing of a code message as described above, in particular comprising a sender 601 and a receiver 602, is schematically illustrated in a block diagram 600 shown in fig. 8A.
The sender may for example represent a communication device of a user configured to send a code message, for example, may be implemented as an application in a mobile terminal, which may compose the code message and send it over a network. For example, the sender may enter the code message editing interface through an entry in the dialog entry box toolbar. Fig. 8B schematically shows a schematic diagram of a sender session window according to an embodiment of the present disclosure. The sender may enter the code message editing interface as shown in fig. 3 through a toolbar entry as shown in fig. 8B and receive the code message and the programming language through a code message editing box. As shown in fig. 8A, after the code message is written, the sender may be further configured to send the code message to the receiver in a text message format, and at the same time, may send the programming language of the code message to the receiver.
The recipient may for example represent a communication device of a user configured to receive the code message, and similarly may be implemented as an application in a mobile terminal, which may receive the code message from the sender and display the code message for viewing.
Illustratively, the functions of the above-described apparatus for processing a code message may be implemented by a code message support component configured in the sender and the receiver. For example, as shown in fig. 8A, the code message support component may specifically include a code parsing module and a display format generation module.
It is noted that, as described above, both the sender and the receiver may be configured with the above-described code message support component and implement the formatting display function of the code message individually.
The code parsing module may be configured to implement the operation of a code meaning determination unit 1020 as shown in fig. 6, i.e. for determining the code meaning of a received sequence of code characters and, optionally, for generating matching parameters. The display format generation module may be configured to implement the display format determination unit 1030 and the display unit 1040 shown in fig. 6, that is, to determine a display format of the code character sequence according to the code meaning and display the code character sequence according to the determined display format. The functions of the above units are similar to those described in connection with fig. 6 and will not be described again here.
By means of the above-mentioned code message support component shown in fig. 8A, an apparatus for processing a code message as described above may be implemented, i.e. a processed code message may be displayed at both the sender and the receiver, and the display effect of the displayed code message may be as shown in fig. 4A and 4B.
In practice, the code message support component of the sender will detect the received code message in real time and apply the code message processing method as described above thereto, so that the user of the sender can view the processed code message as shown in fig. 3 in real time. After the code message is edited, the sender may first assemble a message body according to the structure of the text message, attach a field indicating a programming language to the message body, and send a message including the code message and the programming language to the recipient.
After receiving the above message, the receiving party applies the processing method as described above to the received code message through the code message support component located at the receiving party, so that the user of the receiving party can view the processed code message as shown in fig. 4A or fig. 4B in real time.
In addition, in the case that the receiver does not have a code message support component, the receiver may ignore the additionally set programming language field, treat the received code message as a text message, and display it in the format of the text message. At this time, since the message stored to the memory device is a complete message, i.e., a package code message and a message of a programming language. In this way, after the receiver has the code message support component, the code message support component is obtained, for example, by upgrading to a new version, and the processing method as described above can still be applied to display the code message received before upgrading.
Furthermore, methods or apparatus according to embodiments of the present disclosure may also be implemented by way of the architecture of computing device 3000 shown in FIG. 9. As shown in fig. 9, computing device 3000 may include a bus 3010, one or more CPUs 3020, a Read Only Memory (ROM)3030, a Random Access Memory (RAM)3040, a communication port 3050 to connect to a network, input/output components 3060, a hard disk 3070, and the like. A storage device, such as ROM 3030 or hard disk 3070, in computing device 3000 may store various data or files used by the processes and/or communications of the methods for determining a social hierarchy of a node in a social network provided by the present disclosure, as well as program instructions executed by the CPU. Computing device 800 may also include a user interface 3080. Of course, the architecture shown in FIG. 9 is merely exemplary, and one or more components of the computing device shown in FIG. 9 may be omitted when implementing different devices, as desired.
Embodiments of the present disclosure may also be implemented as a computer-readable storage medium. A computer readable storage medium according to an embodiment of the present disclosure has computer readable instructions stored thereon. The computer readable instructions, when executed by a processor, may perform a method for processing a code message according to embodiments of the present disclosure described with reference to the above figures. The computer-readable storage medium includes, but is not limited to, volatile memory and/or non-volatile memory, for example. The volatile memory may include, for example, Random Access Memory (RAM), cache memory (cache), and/or the like. The non-volatile memory may include, for example, Read Only Memory (ROM), hard disk, flash memory, etc.
Those skilled in the art will appreciate that the disclosure of the present disclosure is susceptible to numerous variations and modifications. For example, the various devices or components described above may be implemented in hardware, or may be implemented in software, firmware, or a combination of some or all of the three.
Further, while the present disclosure makes various references to certain elements of a system according to embodiments of the present disclosure, any number of different elements may be used and run on a client and/or server. The units are illustrative only, and different aspects of the systems and methods may use different units.
It will be understood by those skilled in the art that all or part of the steps of the above methods may be implemented by instructing the relevant hardware through a program, and the program may be stored in a computer readable storage medium, such as a read only memory, a magnetic or optical disk, and the like. Alternatively, all or part of the steps of the above embodiments may be implemented using one or more integrated circuits. Accordingly, each module/unit in the above embodiments may be implemented in the form of hardware, and may also be implemented in the form of a software functional module. The present disclosure is not limited to any specific form of combination of hardware and software.
Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this disclosure belongs. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the relevant art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.
The foregoing is illustrative of the present disclosure and is not to be construed as limiting thereof. Although a few exemplary embodiments of this disclosure have been described, those skilled in the art will readily appreciate that many modifications are possible in the exemplary embodiments without materially departing from the novel teachings and advantages of this disclosure. Accordingly, all such modifications are intended to be included within the scope of this disclosure as defined in the claims. It is to be understood that the foregoing is illustrative of the present disclosure and is not to be construed as limited to the specific embodiments disclosed, and that modifications to the disclosed embodiments, as well as other embodiments, are intended to be included within the scope of the appended claims. The present disclosure is defined by the claims and their equivalents.

Claims (12)

1. A method for processing code messages, comprising:
receiving a code message comprising a sequence of code characters;
matching at least one part of the code character sequence according to a programming rule and a programming mode defined according to a grammar rule so as to determine the programming mode to which the at least one part of the code character sequence belongs;
for a matched code character sequence of the at least one part of code character sequence, the programming mode of which is determined by matching, further matching the part of the matched code character sequence according to a sub-programming rule and a sub-programming mode defined for the programming mode to determine the code meaning of the part of the code character sequence represented by the determined programming mode and/or at least one sub-programming mode defined for the determined programming mode, so as to obtain the code meaning of the at least one part of code character sequence, wherein the sub-programming rule and the sub-programming mode are partially the same as the programming rule and the programming mode defined according to the grammar rule;
determining a display format of the at least one portion of the sequence of code characters according to the code meaning of the at least one portion; and
displaying the at least a portion of the sequence of code characters in accordance with the display format.
2. The method of claim 1, wherein the receiving a code message comprising a sequence of code characters comprises: receiving the code message from an input device,
the method also includes obtaining a programming language for the code message.
3. The method of claim 1, wherein the receiving a code message comprising a sequence of code characters comprises: receiving the code message over a network, wherein the code message is transmitted over the network,
the method also includes receiving a message in a programming language for the code message over a network.
4. The method of claim 1, further comprising: for a code character sequence whose code meaning cannot be determined by matching, its code meaning is determined as unmatched.
5. The method of claim 1, further comprising generating match parameters including a start position of the at least a portion of the code character sequence, a code character sequence length, and a code meaning.
6. The method of claim 5, wherein determining a display format of the at least a portion of the sequence of code characters based on the code meaning of the at least a portion comprises:
and determining the display format of the code character sequence corresponding to the starting position and the length of the code character sequence in the matching parameters according to the code meaning in the matching parameters.
7. The method of claim 1, wherein, in the case that the code message comprises a plurality of lines of character sequences, displaying the at least a portion of the code character sequence comprises:
and displaying the code character sequences of the same line in the code message as the code character sequences with the same line number.
8. The method of claim 7, further comprising:
hiding a portion of the code character sequence from display.
9. The method of claim 2, further comprising:
transmitting the code message and a message regarding a programming language of the code message, wherein,
the code message has the structure of a text message.
10. An apparatus for processing code messages, comprising:
a receiving unit configured to receive a code message including a sequence of code characters;
a code meaning determination unit configured to:
matching at least one part of the code character sequence according to a programming rule and a programming mode defined according to a grammar rule so as to determine the programming mode to which the at least one part of the code character sequence belongs;
for a matched code character sequence of the at least one part of code character sequence, the programming mode of which is determined by matching, further matching the part of the matched code character sequence according to a sub-programming rule and a sub-programming mode defined for the programming mode to determine the code meaning of the part of the code character sequence represented by the determined programming mode and/or at least one sub-programming mode defined for the determined programming mode, so as to obtain the code meaning of the at least one part of code character sequence, wherein the sub-programming rule and the sub-programming mode are partially the same as the programming rule and the programming mode defined according to the grammar rule;
a display format determination unit configured to determine a display format of the at least one portion of the sequence of code characters according to the code meaning of the at least one portion; and
a display unit configured to display the at least a portion of the sequence of code characters in accordance with the display format.
11. An apparatus for processing a code message, comprising:
one or more processors; and
one or more memories, wherein the memory has stored therein computer readable code, which when executed by the one or more processors, performs the method of any of claims 1-9.
12. A computer-readable storage medium having stored thereon instructions that, when executed by a processor, cause the processor to perform the method of any one of claims 1-9.
CN201910087244.0A 2019-01-29 2019-01-29 Method, apparatus, device and readable storage medium for processing code message Active CN109840110B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910087244.0A CN109840110B (en) 2019-01-29 2019-01-29 Method, apparatus, device and readable storage medium for processing code message

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910087244.0A CN109840110B (en) 2019-01-29 2019-01-29 Method, apparatus, device and readable storage medium for processing code message

Publications (2)

Publication Number Publication Date
CN109840110A CN109840110A (en) 2019-06-04
CN109840110B true CN109840110B (en) 2022-02-01

Family

ID=66884332

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910087244.0A Active CN109840110B (en) 2019-01-29 2019-01-29 Method, apparatus, device and readable storage medium for processing code message

Country Status (1)

Country Link
CN (1) CN109840110B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024022432A1 (en) * 2022-07-28 2024-02-01 北京字跳网络技术有限公司 Information processing methods and apparatus, and electronic device

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106775777A (en) * 2017-01-22 2017-05-31 合网络技术(北京)有限公司 Content interaction method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8621442B2 (en) * 2011-02-09 2013-12-31 Beek Fund B.V. L.L.C. Quicker translation of a computer program source code

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106775777A (en) * 2017-01-22 2017-05-31 合网络技术(北京)有限公司 Content interaction method and device

Also Published As

Publication number Publication date
CN109840110A (en) 2019-06-04

Similar Documents

Publication Publication Date Title
US20070192687A1 (en) Document content and structure conversion
US20190050376A1 (en) Automatic value formatting based on intrinsic structural semantics
US9336194B2 (en) Submatch extraction
CN105574092A (en) Information mining method and device
CN113657395B (en) Text recognition method, training method and device for visual feature extraction model
CN109840110B (en) Method, apparatus, device and readable storage medium for processing code message
JP7309811B2 (en) Data annotation method, apparatus, electronics and storage medium
CN105893342A (en) Text information processing method and device
CN111832258B (en) Document segmentation method and device and electronic equipment
CN113705182A (en) Contract online generation method and device and readable storage medium
CN117709310A (en) Method, device and equipment for editing document based on mobile terminal
JP2022017173A (en) Method and device for outputting information, electronic device, computer-readable storage medium, and computer program
CN110134920A (en) Draw the compatible display methods of text, device, terminal and computer readable storage medium
KR102466164B1 (en) Translation method
CN110928995A (en) Interactive information processing method, device, equipment and storage medium
CN108984491A (en) A kind of method and apparatus of document format conversion
CN108897870A (en) Generate method, medium, device and the calculating equipment of digest
CN115344538A (en) Log processing method, device and equipment and readable storage medium
CN112784527B (en) Document merging method and device and electronic equipment
US9922011B2 (en) Masking an object in hypertext markup language
CN111695350B (en) Word segmentation method and word segmentation device for text
US20100191751A1 (en) Information processing system, information processing apparatus, information processing method and computer readable medium
CN110263303B (en) Method and device for tracing text modification history
CN115526186A (en) Translation method, electronic device and readable storage medium
CN116484802B (en) Character string color marking method, device, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant