WO2021008287A1 - 字符推荐方法、装置、计算机设备及存储介质 - Google Patents

字符推荐方法、装置、计算机设备及存储介质 Download PDF

Info

Publication number
WO2021008287A1
WO2021008287A1 PCT/CN2020/096289 CN2020096289W WO2021008287A1 WO 2021008287 A1 WO2021008287 A1 WO 2021008287A1 CN 2020096289 W CN2020096289 W CN 2020096289W WO 2021008287 A1 WO2021008287 A1 WO 2021008287A1
Authority
WO
WIPO (PCT)
Prior art keywords
character
node
target
code
input interface
Prior art date
Application number
PCT/CN2020/096289
Other languages
English (en)
French (fr)
Inventor
朱仕达
宿海成
蔡雨利
郭沛然
刘历
Original Assignee
腾讯科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 腾讯科技(深圳)有限公司 filed Critical 腾讯科技(深圳)有限公司
Priority to JP2021546226A priority Critical patent/JP7236551B2/ja
Publication of WO2021008287A1 publication Critical patent/WO2021008287A1/zh
Priority to US17/337,778 priority patent/US11537213B2/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/02Input arrangements using manually operated switches, e.g. using keyboards or dials
    • G06F3/023Arrangements for converting discrete items of information into a coded form, e.g. arrangements for interpreting keyboard generated codes as alphanumeric codes, operand codes or instruction codes
    • G06F3/0233Character input methods
    • G06F3/0237Character input methods using prediction or retrieval techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/02Input arrangements using manually operated switches, e.g. using keyboards or dials
    • G06F3/023Arrangements for converting discrete items of information into a coded form, e.g. arrangements for interpreting keyboard generated codes as alphanumeric codes, operand codes or instruction codes
    • G06F3/0233Character input methods
    • G06F3/0236Character input methods using selection techniques to select from displayed items
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/03Arrangements for converting the position or the displacement of a member into a coded form
    • G06F3/033Pointing devices displaced or positioned by the user, e.g. mice, trackballs, pens or joysticks; Accessories therefor
    • G06F3/0346Pointing devices displaced or positioned by the user, e.g. mice, trackballs, pens or joysticks; Accessories therefor with detection of the device orientation or free movement in a 3D space, e.g. 3D mice, 6-DOF [six degrees of freedom] pointers using gyroscopes, accelerometers or tilt-sensors
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
    • G06F3/0488Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
    • G06F3/0488Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures
    • G06F3/04886Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures by partitioning the display area of the touch-screen or the surface of the digitising tablet into independently controllable areas, e.g. virtual keyboards or menus
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/33Intelligent editors
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/42Syntactic analysis
    • G06F8/427Parsing

Definitions

  • This application relates to the field of computer technology, in particular to a character recommendation method, device, computer equipment and storage medium.
  • Computer equipment usually runs based on code, and the function corresponding to the code is realized by running the code.
  • the development of the code needs to be realized by the developer through the terminal.
  • the developer inputs characters in the terminal, and the input characters form the code.
  • the embodiments of the present application provide a character recommendation method, device, computer equipment, and storage medium, which can simplify operations, save input time, and improve input efficiency.
  • the technical solution is as follows:
  • a character recommendation method includes:
  • the target character is recommended.
  • a character recommendation device in another aspect, includes:
  • the conversion module is used to convert the code entered in the code input interface into a syntax tree, the syntax tree including a plurality of nodes, a hierarchical relationship between the plurality of nodes, and a position interval of the plurality of nodes, the The hierarchical relationship between the plurality of nodes and the plurality of nodes is used to represent the grammatical structure of the code, and the position interval of the node is used to indicate the position interval of the character set corresponding to the node in the code input interface ;
  • a node determining module configured to determine at least one reference node corresponding to the position of the cursor in the syntax tree according to the position of the cursor in the code input interface and the syntax tree;
  • a character determination module configured to analyze the at least one reference node, and determine the target character to be recommended according to the analysis result
  • the recommendation module is used for recommending the target character in the code input interface.
  • a computer device in another aspect, includes a processor and a memory, and an instruction or a program is stored in the memory, and the instruction or the program is loaded and executed by the processor to realize the Describe the operations performed in the character recommendation method.
  • a computer-readable storage medium stores an instruction or a program, and the instruction or the program is loaded and executed by a processor to implement the character recommendation method as described in The operation performed.
  • a computer program product in another aspect, includes computer instructions, and the computer instructions are stored in a computer-readable storage medium.
  • the processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to cause the computer device to perform operations as performed in the character recommendation method.
  • the character recommendation method, device, computer equipment and storage medium provided by the embodiments of the present application convert the code entered in the code input interface into a syntax tree, and determine the position of the cursor according to the position of the cursor in the code input interface and the syntax tree At least one reference node corresponding to the syntax tree is parsed, the target character to be recommended is determined according to the analysis result, and the target character is recommended in the code input interface.
  • Figure 1 is a schematic structural diagram of a syntax tree provided by an embodiment of the present application.
  • Figure 2 is a schematic diagram of an implementation environment provided by an embodiment of the present application.
  • FIG. 3 is a flowchart of a character recommendation method provided by an embodiment of the present application.
  • FIG. 4 is a flowchart of a character recommendation method provided by an embodiment of the present application.
  • FIG. 5 is a schematic diagram of a character recommendation window provided by an embodiment of the present application.
  • FIG. 6 is a schematic structural diagram of a character recommendation device provided by an embodiment of the present application.
  • FIG. 7 is a schematic structural diagram of another character recommendation apparatus provided by an embodiment of the present application.
  • FIG. 8 is a schematic structural diagram of a terminal provided by an embodiment of the present application.
  • FIG. 9 is a schematic structural diagram of a server provided by an embodiment of the present application.
  • the syntax tree can express the syntax structure of the code in a tree-like form.
  • the syntax tree includes multiple nodes, the hierarchical relationship between the multiple nodes, and the location interval of the multiple nodes.
  • the hierarchical relationship of the multiple nodes can determine the grammatical structure of the code, and the location range of the character set corresponding to the node in the code input interface is represented by the location range of the multiple nodes.
  • the code looks like this:
  • the code can be converted into the syntax tree shown in Figure 1.
  • the root node in the syntax tree is the script node (script)
  • the next level node of the script node is the source code node (sourceType)
  • the next level node of the source code node It is a program node (program).
  • the next level of the program node includes two branches, which represent two instructions in the code.
  • the first node in the next layer of the program node is a variable declaration node (VariableDeclaration)
  • the variable declaration node corresponds to a kind node (kind)
  • the corresponding class of this kind of node is "var”
  • the next variable declaration node The nodes in the layer are variable declarator nodes (VariableDeclarator).
  • the first node in the next layer of the variable declarator node is the identifier node (Identifier)
  • the node in the next layer of the identifier node is the name node (name)
  • the character set corresponding to the name node is " a”.
  • the second node in the next layer of the variable declarator node is a literal value node (Literal), and the next layer of the literal value node (Literal) includes a value node (value) and a string node (raw).
  • value node value
  • string node raw
  • the first branch in the syntax tree represents a variable declaration instruction.
  • the variable declaration instruction uses the class "var”, and the variable declarator includes an identifier and a literal value.
  • the identifier is "a”
  • the second node of the next level of the program node is a variable declaration node, which corresponds to a class node, and the corresponding class of this type of node is "var".
  • the node in the next level of the variable declaration node is a variable declaration Character node.
  • the first node in the next layer of the variable declarator node is the identifier node
  • the node in the next layer of the identifier node is the name node
  • the character set corresponding to the name node is "b".
  • the second node in the next layer of the variable declarator node is a binary expression node (BinaryExpression).
  • the first node in the next layer of the binary expression node is the identifier node
  • the node in the next layer of the identifier node is the name node
  • the character set corresponding to the name node is "a”.
  • the character set corresponding to the second node in the next layer of the binary expression node is "+”.
  • the third node in the next layer of the binary expression node is a literal value node.
  • the next layer of the literal value node includes a numeric value node and a string node. The value corresponding to the literal value node is "1", the literal value The string corresponding to the node is "1".
  • the second branch in the syntax tree represents a variable declaration instruction.
  • the class of the variable declaration instruction is "var”
  • the variable declarator includes an identifier and a binary expression.
  • the identifier is "b”
  • the binary expression Including an identifier, an operator and a literal value.
  • syntax tree may include operation nodes, identifier nodes or other types of nodes.
  • the operation node refers to a node whose corresponding character set includes an operator, for example, the operator can be a plus sign, a minus sign, a multiplication sign, and so on. Since the code includes an operator, and the operator is used to instruct the code to perform the operation corresponding to the operator, the operation corresponding to the operator will be executed in the process of running the code including the operator.
  • the identifier node refers to a node whose corresponding character set is an identifier, for example, the identifier may be English characters, numbers, etc.
  • the character set corresponding to the identifier node may be "abc", "dd” or other identifier nodes.
  • the character set corresponding to the node includes at least one character.
  • each node includes a position interval, and the position interval includes a starting position and an ending position, the starting position is the position of the starting character of the character set corresponding to the node in the code, and the ending position is the character corresponding to the node The position of the ending character of the set in the code.
  • the embodiment of the application provides a character recommendation method, which can recommend characters for developers when they edit code.
  • the character recommendation method provided in the embodiment of the present application may be applied in a terminal.
  • the terminal obtains the code in the code input interface, generates a syntax tree according to the obtained code, parses the syntax tree, determines the target character to be recommended, and recommends the target character to the developer.
  • the character recommendation method provided in the embodiment of the present application can be applied in an implementation environment composed of a terminal and a server.
  • Fig. 2 is a schematic diagram of an implementation environment provided by an embodiment of the present application.
  • the implementation environment includes a server 201 and a terminal 202, and the server 201 and the terminal 202 are connected through a communication network.
  • the server 201 may be a server, or a server cluster composed of several servers, or a cloud computing service center.
  • the terminal 202 can be a mobile phone, a tablet computer, a personal computer, and other devices.
  • the terminal 202 obtains the code entered in the code input interface and sends the code to the server 201.
  • the server 201 converts the code into a syntax tree, parses the syntax tree, determines the target character to be recommended, and sends the determined target character To the terminal 202, the terminal 202 recommends the target character to the developer.
  • the character recommendation method provided by the embodiment of the present application can be applied to the scenario of writing code.
  • the terminal provides a code input interface for the developer, and the developer can input characters in the code input interface to form a code.
  • the code that the developer has entered in the code input interface is analyzed, and the target character can be recommended to the developer for the developer to choose, so that the target character selected by the developer can be input to the cursor position.
  • Fig. 3 is a flowchart of a character recommendation method provided by an embodiment of the present application. Referring to Fig. 3, when applied to a terminal, the method includes:
  • the terminal provides a code input interface for the developer, and the developer inputs characters in the code input interface provided by the terminal, and forms a code through the input characters.
  • the code input interface can be the input interface of a designated application installed on the terminal, and the designated application can be a code editor for inputting code. After the developer enters the code in the code editor, Run the entered code in the code editor. When there is a problem with the code running, you can modify it in the code editor according to the problem.
  • the code input interface may be an input interface of an application program configured by the terminal itself.
  • the input interface may be an input interface of an application program such as a memo and a notepad configured in the terminal.
  • the code input interface provided by the terminal also includes a cursor, which can be located at any position in the code input interface.
  • a cursor which can be located at any position in the code input interface.
  • the terminal receives the characters input by the developer and inputs the characters to the cursor position.
  • developers need to change the position of input characters, they only need to change the position of the cursor in the code input interface.
  • the terminal in the embodiment of the application not only provides a code input interface for developers, but also provides a virtual keyboard for developers, and the virtual keyboard is displayed in the code input interface.
  • the developer needs to input characters, select the virtual keyboard.
  • the character in the keyboard when the terminal detects the selection operation of the character in the virtual keyboard, the character is input to the position of the cursor.
  • the size of the code input interface provided by the terminal is also limited, which in turn leads to the limitation of the size of the virtual keyboard.
  • the character, the type of the character can include English letters, numbers, operators, etc.
  • the developer When the developer needs to input a certain type of character in the code input interface, first display the keyboard interface containing that type of character in the code input interface, the developer selects the desired character in the keyboard interface, and the terminal can The selection operation of the character is detected, and the character is input to the cursor position.
  • the switch option in the keyboard interface is triggered, and the terminal detects the trigger operation on the switch option and switches to the keyboard interface containing the other type of character.
  • the developer selects the desired character in the keyboard interface, and the terminal can detect the selection operation of the character and input the character to the cursor position.
  • the trigger operation may be a click operation, a double-click operation, a long-press operation, or other operations.
  • the terminal can obtain the code entered in the code input interface, and perform subsequent operations according to the entered code.
  • the terminal acquiring the code entered in the code input interface may include any one of steps 3011-3013:
  • the terminal detects the total number of characters of the code entered in the code input interface, and when the total number of characters changes, obtains the code that has been entered in the code input interface.
  • the total number of characters of the code entered in the current code input interface is 1000. Later, when the total number of characters of the code entered in the code input interface is changed to 999, it means that the characters in the code input interface have changed , The terminal obtains the code entered in the code input interface.
  • the terminal obtains the code entered in the code input interface every preset time period.
  • the preset duration can be 1 minute, 2 minutes, or other values.
  • the terminal detects the total number of characters of the code entered in the code input interface, and when the difference between the total number of characters and the total number of codes in the last code input interface is not less than the preset value, the code input interface is obtained The code entered in.
  • the preset value can be 5, 10, 20 or other values.
  • the preset value is 5, and the total number of characters of the code entered in the terminal detection code input interface is 1000. Later, when the total number of characters of the code entered in the terminal detection code input interface is 997, the difference is 3 If it is less than 5, the terminal will not obtain the code entered in the code input interface. When the terminal detects that the total number of characters of the code entered in the code input interface is 990, the difference is 10 and greater than 5, and the code that has been entered in the code input interface is obtained.
  • the terminal determines multiple nodes according to the grammatical structure of the code entered in the code input interface and determines that the multiple nodes have a hierarchical relationship, and constructs a syntax tree of the code entered in the code input interface according to the hierarchical relationship of the multiple nodes. Realize the effect of converting the code entered in the code input interface into a syntax tree, and complete the construction of the syntax tree.
  • the syntax tree may be an abstract syntax tree or other types of syntax trees.
  • the syntax tree includes multiple nodes, the hierarchical relationship between multiple nodes, and the location interval of multiple nodes.
  • the hierarchical relationship between multiple nodes and multiple nodes is used to express the grammatical structure of the code, and the location interval of nodes is used It indicates the position interval of the character set corresponding to the node in the code input interface.
  • the position interval includes the start position and the end position of the character set corresponding to the node. And the position in the code of the starting character in the character set corresponding to the node is used to indicate the starting position, and the position of the ending character in the character set in the code is used to indicate the ending position.
  • the total number of characters before the start character is taken as the start position of the position interval
  • the total number of characters before the end character is taken as the end position of the position interval
  • code for the structure of the syntax tree is as follows:
  • the character set corresponding to the node "identifier" is "tips", the starting position of this node is 183, and the ending position is 187.
  • the terminal converts the code entered in the code input interface into a syntax tree, uses the syntax tree to express the syntax structure of the code in a tree form, and generates a syntax tree for terminal recognition, and subsequent terminals can execute recommended characters according to the generated syntax tree Operation.
  • the lexical analysis means that the characters included in the code are divided into words.
  • the characters in the code are read in turn, and the code is divided according to the language specification of the current code to obtain the division Good multiple words.
  • syntax analysis means to analyze the grammar of the divided nodes and determine the hierarchical relationship between multiple nodes.
  • the code in the code input interface is converted into a syntax tree, so that the terminal can recognize the converted syntax tree, determine the syntax structure of the code according to the syntax tree, and subsequently recommend characters according to the syntax structure represented by the syntax tree.
  • the node is determined as a reference node.
  • the terminal When the terminal subsequently recommends characters, it is based on the position of the cursor in the current code input interface to guess which character should be input at the cursor position. Therefore, the cursor position is determined in the code input interface, from multiple nodes in the syntax tree , Determine the node whose position interval in the syntax tree contains the position of the cursor, determine the node as a reference node, and subsequently determine the target character to be recommended according to the reference node.
  • Each node in the syntax tree includes a position interval.
  • the terminal traverses each node in the syntax tree according to the position of the cursor in the code input interface and the syntax tree, and according to the position of the cursor and the position interval of each node in the syntax tree, At least one reference node corresponding to the position of the cursor in the syntax tree is determined.
  • the at least one reference node may also include operation nodes, identifier nodes, or other types of nodes. At least one of the nodes.
  • traversal refers to visiting each node in the syntax tree according to rules, and each node is visited only once.
  • the above-mentioned rule may be pre-order traversal, middle-order traversal, post-order traversal, or other traversals.
  • pre-order traversal refers to traversing each node in the syntax tree in sequence from top to bottom and from left to right in the syntax tree.
  • Middle-order traversal refers to traversing each node in the syntax tree in sequence from left to right in the syntax tree.
  • Post-order traversal refers to traversing each node in the syntax tree in sequence from right to left.
  • the terminal obtains the current cursor position from the code input interface, and compares the cursor position with the position interval of each node to determine whether the cursor position belongs to the traversed
  • the position interval of the node when the cursor position belongs to the position interval of the traversed node, the node is determined as the reference node.
  • the position interval includes a starting position and an ending position. Then, when the position of the cursor is not less than the start position of the position interval of the node in the syntax tree, and the position of the cursor is not greater than the end position of the position interval of the node, the node is taken as the reference node.
  • the position of the cursor is represented by the total number of characters before the cursor
  • the starting position of the node is represented by the total number of characters before the starting character corresponding to the node
  • the ending position of the node is represented by the ending character corresponding to the node. The total number of previous characters is indicated.
  • the cursor position belongs to The location interval of the node, and the node is used as the reference node.
  • This embodiment of the application determines whether a node in the syntax tree is a reference node by judging whether the position of the cursor belongs to the position interval of the node in the syntax tree, and subsequently the character to be recommended can be determined according to the determined reference node, and the character to be recommended can be determined according to the position of the cursor.
  • the recommended characters improve the accuracy of the characters to be recommended.
  • This step 305 includes any one of steps 3051-3053:
  • an operation node may also be set, and the operation node is a node in the syntax tree for indicating that the character set corresponding to the node includes an operator. And the operation node is a preset operation node.
  • the operation node can be set by the developer or by the terminal.
  • the determined at least one reference node is compared with the operation node, and when the at least one reference node includes the same reference node as the operation node, the reference node can be determined as the operation node, and the operation node indicates the corresponding character set For the corresponding operation type, the operation type of the operation node is obtained, and the operator belonging to the operation type of the operation node is obtained from the operator database as the target character.
  • the operation node refers to a node whose corresponding character set includes an operator.
  • the at least one reference node includes a program node, a variable declaration node, and a name node.
  • the operator database is used to store operators belonging to at least one type of operation. And the operator database is stored in the terminal. Alternatively, the operator database is stored in the server, and when the terminal parses at least one reference node, it sends an operator acquisition request to the server, and when the server receives the operator acquisition request, the operator database stored in the At least one type of operation operator is sent to the terminal.
  • the determined at least one reference node includes multiple reference nodes
  • the starting position of each reference node in the multiple reference nodes is obtained, and the order is sorted according to the starting positions of the multiple reference nodes,
  • the multiple reference nodes are connected to form a node path, the node path is parsed to obtain the analysis result, and the operation type to which the node path belongs is determined according to the analysis result, from the operator database Obtain at least one operator belonging to the operation type as the target character.
  • the starting position of the reference node is also referred to as the left position of the reference node, and the left positions of the multiple reference nodes may be used to sort the multiple reference nodes to form a node path.
  • the operator database is used to store operators belonging to at least one operation type. And the operator database is stored in the terminal. Or, the operator database is stored in the server, and when the terminal parses the determined node path, it sends an operator acquisition request to the server, and when the server receives the operator acquisition request, the operator database stored in the At least one type of operation operator is sent to the terminal.
  • the steps 3051 and 3052 provided in the embodiment of the application both determine the operator to be recommended from the operator database according to at least one reference node, and then the determined operator can be recommended to the developer as the target character without the developer switching the keyboard
  • the interface uses the input operator to realize the effect of automatically recommending the operator, simplifying the operation of the developer, saving the operation time, and improving the input efficiency.
  • an identifier node may also be set, and the identifier node is a node in the syntax tree used to indicate that the character set corresponding to the node includes an identifier.
  • the operation node is a preset operation node. The operation node can be set by the developer or by the terminal.
  • the reference node can be determined as the identifier node, and from the at least one reference node
  • the last identifier node is determined in, the corresponding character is determined according to the last identifier node, the identifier containing the character is obtained from the identifier database, and the identifier is used as the target character.
  • the last identifier node is determined from the at least one reference node, the character corresponding to the identifier node is determined, the character set starting with the character is obtained from the identifier database, and the The character set serves as the target character.
  • the character corresponding to the identifier node is "ab”
  • the character set contained in the identifier database is “abcd”. This “abcd” is the character set starting with “ab”, so “abcd” is used as Target character.
  • the last identifier node is determined from the at least one reference node, the corresponding character is determined according to the last identifier node, the character set containing the character is obtained from the identifier database, and the The characters in the character set are used as target characters.
  • the character corresponding to the identifier node is "ab”
  • the characters contained in the identifier database are “cabd” and “abcd”
  • the "cabd” contains the characters “ab”
  • the "abcd” also contains characters “Ab”
  • the identifier node refers to a node whose corresponding character set is an identifier, and the identifier database is used to store at least one identifier.
  • the step 3053 provided by the embodiment of this application determines the character to be recommended from the identifier database according to at least one reference node, and then the determined character can be recommended to the developer as the target character, without the developer manually inputting the characters in a character set All characters can be automatically completed, which simplifies the operation of developers, saves operation time, and improves input efficiency.
  • step 3053 Before performing steps 3051-3053, first determine the character corresponding to the last reference node in at least one reference node, and determine whether it is in the identifier database Whether the character is included, when it is determined that the character is contained in the identifier database, step 3053 is executed, and when it is determined that the character is not included in the identifier database, step 3051 or step 3052 is executed.
  • step 3052 is combined with step 3053, the operation flow is shown in FIG. 4, it is judged whether the character corresponding to the last reference node is contained in the identifier database, if yes, step 3052 is executed, if not, step 3053 is executed.
  • step 3053 only the identifier is used as the target character for explanation.
  • the last identifier node is determined from the at least one reference node, the character corresponding to the last identifier node is determined, the character set starting with the character is obtained from the identifier database, and the The remaining characters in the character set except the character corresponding to the identifier node are used as target characters.
  • the character corresponding to the identifier node is "ab”
  • the character set contained in the identifier database is “abcd”. This "abcd” is the character set starting with “ab”, so “cd” is used as Target character.
  • the target character After determining the target character to be recommended, the target character can be recommended to the code input interface without the developer switching the keyboard interface again, and the target character can be input through the switched keyboard interface.
  • the embodiment of this application only takes the terminal to perform steps 301-305 as an example for description.
  • the server may also perform steps 301-305.
  • the server determines at least one target character
  • the The at least one target character is sent to the terminal, and step 306 is executed by the terminal.
  • the method provided in the embodiment of the present application converts the code entered in the code input interface into a syntax tree, and determines at least one reference node corresponding to the cursor position in the syntax tree according to the position of the cursor in the code input interface and the syntax tree Analyze the at least one reference node, determine the target character to be recommended according to the analysis result, and recommend the target character in the code input interface.
  • the method provided by the embodiments of the present application can not only recommend operators for developers, but also automatically complete the characters when the developers input the initial characters, which simplifies the operation, saves input time, and improves input. effectiveness.
  • the foregoing step 306 may include the following optional methods:
  • step 306 may include the following step 3061: in response to determining multiple target characters to be recommended according to the analysis result, generate a character recommendation window in the code input interface, and display multiple targets in the character recommendation window character.
  • a character recommendation window is generated in the code input interface, and multiple target characters are displayed in the character recommendation window. Subsequent developers can follow the multiple characters displayed in the character recommendation window. Select the desired target character from the target characters, and enter the desired target character at the cursor position.
  • the character recommendation window is located at the upper layer of the code input interface. And the character recommendation window can be moved in the code input interface.
  • the character recommendation window may be generated at the position of the cursor, or the character recommendation window may also be generated at a position other than the position of the cursor in the code input interface.
  • the method may further include: in response to detecting the selection operation of the first target character among the plurality of target characters, inputting the selected first target character to the position of the cursor.
  • the terminal displays a character recommendation window in the code input interface, and the character recommendation window includes at least one target character.
  • the developer can select the first target character from at least one target character displayed in the character recommendation window, and the terminal responds to the detection To select the first target character, input the selected first target character to the cursor position.
  • the selection operation can be a single-click operation, a double-click operation, a long-press operation, or other operations.
  • step 306 may include the following step 3062: in response to determining the multiple target characters to be recommended according to the analysis result, input the second target character of the multiple target characters to the position of the cursor.
  • a character recommendation window is generated in the code input interface, and other target characters except the second target character are displayed in the character recommendation window.
  • Target characters other than the second target character are displayed in the character recommendation window.
  • the determined multiple target characters are A, B, C, and D
  • input A to the position of the cursor, and display B, C, and D in the character recommendation window.
  • the method may further include: in response to detecting the selection operation of the third target character in the character recommendation window, replacing the second target character with the third target character.
  • the third target character is used to replace the second target character to achieve the correct target character input to The effect of the cursor position.
  • the selection operation can be a single-click operation, a double-click operation, a long-press operation, or other operations.
  • step 306 may include the following step 3063: in response to determining a target character to be recommended according to the analysis result, input a target character to the position of the cursor.
  • the character recommendation window in the code input interface also includes a close option.
  • the terminal in response to detecting the trigger operation of the closing option, determines to receive a closing instruction, and closes the character recommendation window.
  • step 3061 and step 3062 when the developer does not need to use multiple recommended target characters, he can trigger a preset operation in the code input interface except for the character recommendation window.
  • the terminal detects the preset operation, it determines to receive a close instruction and closes the character recommendation window.
  • the preset operation may be a click operation, a double-click operation, a long-press operation, or other operations.
  • the terminal after performing step 306, after the developer selects the target character, the terminal inputs the target character to the cursor position, and then can continue to perform steps 301-306, continue to recommend target characters for the developer, and continue by After the developer selects the target character, the terminal inputs the target character to the cursor position.
  • the determined target character is displayed in the character recommendation window, and the selected target character is added to the cursor position in response to the detection of the selection operation of the target character, and the developer can directly select the target character from the character recommendation window , There is no need to switch the keyboard interface to input the target characters, which simplifies the operation, saves the input time, and improves the input efficiency.
  • the embodiment of the present application can also directly input the target character to the position of the cursor, and the developer only needs to detect whether the input target character is correct, which simplifies the operation of the developer to input the target character, saves input time, and improves input effectiveness.
  • FIG. 6 is a schematic structural diagram of a character recommendation device provided by an embodiment of the present application. Referring to FIG. 6, the device includes:
  • the conversion module 601 is used to convert the code entered in the code input interface into a syntax tree.
  • the syntax tree includes multiple nodes, hierarchical relationships among multiple nodes, and position intervals of multiple nodes, multiple nodes and multiple nodes The hierarchical relationship between is used to indicate the grammatical structure of the code, and the position interval of the node is used to indicate the position interval of the character set corresponding to the node in the code input interface;
  • the node determination module 602 is configured to determine at least one reference node corresponding to the position of the cursor in the syntax tree according to the position of the cursor in the code input interface and the syntax tree;
  • the character determination module 603 is configured to analyze at least one reference node, and determine the target character to be recommended according to the analysis result;
  • the recommendation module 604 is used for recommending target characters in the code input interface.
  • the recommendation module 604 includes:
  • the generating unit 6041 is configured to generate a character recommendation window in the code input interface in response to determining multiple target characters to be recommended according to the analysis result;
  • the display unit 6042 is configured to display multiple target characters in the character recommendation window.
  • the device further includes:
  • the input module 605 is configured to input the selected first target character to the position of the cursor in response to detecting the selection operation of the first target character among the multiple target characters.
  • the recommendation module 604 includes:
  • the input unit 6043 is configured to input a target character to the position of the cursor in response to determining a target character to be recommended according to the analysis result.
  • the recommendation module 604 includes:
  • the input unit 6043 is configured to input a second target character of the multiple target characters to the position of the cursor in response to determining the multiple target characters to be recommended according to the analysis result;
  • the generating unit 6041 is configured to generate a character recommendation window in the code input interface
  • the display unit 6042 is configured to display other target characters except the second target character in the character recommendation window.
  • the device further includes:
  • the replacement module 606 is configured to replace the second target character with the third target character in response to detecting the selection operation of the third target character in the character recommendation window.
  • the node determining module 602 includes:
  • the traversal unit 6021 is used to traverse the nodes in the syntax tree
  • the node determining unit 6022 is configured to determine the node as a reference node if the position of the cursor belongs to the position interval of the node currently traversed.
  • the character determination module 603 includes:
  • the type determining unit 6031 determines an operation node in at least one reference node and an operation type corresponding to the operation node, where the operation node refers to a node whose corresponding character set includes an operator;
  • the first obtaining unit 6032 is configured to obtain an operator belonging to an operation type from an operator database.
  • the operator database is used to store an operator belonging to at least one operation type.
  • the character determination module 603 includes:
  • the connecting unit 6033 is configured to connect at least one reference node according to the sequence of the position interval of the at least one reference node to form a node path;
  • the parsing unit 6034 is configured to analyze the node path, and determine the operation type to which the node path belongs according to the analysis result;
  • the second obtaining unit 6035 is configured to obtain at least one operator belonging to the operation type from the operator database, as a target character, and the operator database is used to store the operator belonging to at least one operation type.
  • the character determination module 603 includes:
  • the character determining unit 6036 is configured to determine the character corresponding to the last identifier node in at least one reference node, where the identifier node refers to a node whose corresponding character set is an identifier;
  • the identifier obtaining unit 6037 obtains an identifier containing characters from an identifier database, and uses the identifier as a target character.
  • the identifier database is used to store at least one identifier.
  • the character recommendation device provided in the above embodiment only uses the division of the above functional modules to illustrate when recommending characters.
  • the above functions can be allocated by different functional modules as required, namely The internal structure of the computer equipment is divided into different functional modules to complete all or part of the functions described above.
  • the embodiment of the character recommendation device provided in the above embodiment and the embodiment of the character recommendation method belong to the same concept, and the specific implementation process is detailed in the method embodiment, and will not be repeated here.
  • FIG. 8 is a schematic structural diagram of a terminal provided by an embodiment of the present application.
  • the terminal 800 may be a portable mobile terminal, such as a smart phone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III, dynamic image expert compression standard audio layer 3), MP4 (Moving Picture Experts Group Audio Layer IV, dynamic Video experts compress the standard audio level 4) Players, laptops, desktop computers, head-mounted devices, or any other intelligent terminals.
  • the terminal 800 may also be called user equipment, portable terminal, laptop terminal, desktop terminal and other names.
  • the terminal 800 includes a processor 801 and a memory 802.
  • the processor 801 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and so on.
  • the processor 801 may adopt at least one hardware form among DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array, Programmable Logic Array). achieve.
  • the processor 801 may also include a main processor and a coprocessor.
  • the main processor is a processor used to process data in the awake state, also called a CPU (Central Processing Unit, central processing unit); the coprocessor is A low-power processor used to process data in the standby state.
  • the processor 801 may be integrated with a GPU (Graphics Processing Unit, image processor), and the GPU is responsible for rendering and drawing content that needs to be displayed on the display screen.
  • the processor 801 may further include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.
  • AI Artificial Intelligence
  • the memory 802 may include one or more computer-readable storage media, which may be non-transitory.
  • the memory 802 may also include high-speed random access memory and non-volatile memory, such as one or more magnetic disk storage devices and flash memory storage devices.
  • the non-transitory computer-readable storage medium in the memory 802 is used to store at least one instruction, and the at least one instruction is used by the processor 801 to implement the character recommendation provided by the method embodiment of the present application. method.
  • the terminal 800 may optionally further include: a peripheral device interface 803 and at least one peripheral device.
  • the processor 801, the memory 802, and the peripheral device interface 803 may be connected by a bus or a signal line.
  • Each peripheral device can be connected to the peripheral device interface 803 through a bus, a signal line or a circuit board.
  • the peripheral device includes at least one of a radio frequency circuit 804, a display screen 805, a camera component 806, an audio circuit 807, a positioning component 808, and a power supply 809.
  • the peripheral device interface 803 may be used to connect at least one peripheral device related to I/O (Input/Output) to the processor 801 and the memory 802.
  • the processor 801, the memory 802, and the peripheral device interface 803 are integrated on the same chip or circuit board; in some other embodiments, any one of the processor 801, the memory 802 and the peripheral device interface 803 or The two can be implemented on separate chips or circuit boards, which are not limited in this embodiment.
  • the radio frequency circuit 804 is used to receive and transmit RF (Radio Frequency, radio frequency) signals, also called electromagnetic signals.
  • the radio frequency circuit 804 communicates with a communication network and other communication devices through electromagnetic signals.
  • the radio frequency circuit 804 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals into electrical signals.
  • the radio frequency circuit 804 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, and so on.
  • the radio frequency circuit 804 can communicate with other terminals through at least one wireless communication protocol.
  • the wireless communication protocol includes, but is not limited to: metropolitan area networks, various generations of mobile communication networks (2G, 3G, 4G and 8G), wireless local area networks and/or WiFi (Wireless Fidelity, wireless fidelity) networks.
  • the radio frequency circuit 804 may also include NFC (Near Field Communication) related circuits, which is not limited in this application.
  • the display screen 805 is used to display UI (User Interface, user interface).
  • the UI can include graphics, text, icons, videos, and any combination thereof.
  • the display screen 805 also has the ability to collect touch signals on or above the surface of the display screen 805.
  • the touch signal can be input to the processor 801 as a control signal for processing.
  • the display screen 805 may also be used to provide virtual buttons and/or virtual keyboards, also called soft buttons and/or soft keyboards.
  • the display screen 805 there may be one display screen 805, which is provided with the front panel of the terminal 800; in other embodiments, there may be at least two display screens 805, which are respectively arranged on different surfaces of the terminal 800 or in a folded design; In still other embodiments, the display screen 805 may be a flexible display screen, which is arranged on the curved surface or the folding surface of the terminal 800. Furthermore, the display screen 805 can also be set as a non-rectangular irregular pattern, that is, a special-shaped screen.
  • the display screen 805 may be made of materials such as LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode, organic light emitting diode).
  • the camera assembly 806 is used to capture images or videos.
  • the camera assembly 806 includes a front camera and a rear camera.
  • the front camera is set on the front panel of the terminal, and the rear camera is set on the back of the terminal.
  • the camera assembly 806 may also include a flash.
  • the flash can be a single-color flash or a dual-color flash. Dual color temperature flash refers to the combination of warm light flash and cold light flash, which can be used for light compensation under different color temperatures.
  • the audio circuit 807 may include a microphone and a speaker.
  • the microphone is used to collect the sound waves of the user and the environment, and convert the sound waves into electrical signals and input to the processor 801 for processing, or input to the radio frequency circuit 804 to implement voice communication. For the purpose of stereo collection or noise reduction, there may be multiple microphones, which are respectively set in different parts of the terminal 800.
  • the microphone can also be an array microphone or an omnidirectional acquisition microphone.
  • the speaker is used to convert the electrical signal from the processor 801 or the radio frequency circuit 804 into sound waves.
  • the speaker can be a traditional membrane speaker or a piezoelectric ceramic speaker.
  • the speaker When the speaker is a piezoelectric ceramic speaker, it can not only convert the electrical signal into human audible sound waves, but also convert the electrical signal into human inaudible sound waves for purposes such as distance measurement.
  • the audio circuit 807 may also include a headphone jack.
  • the positioning component 808 is used to locate the current geographic position of the terminal 800 to implement navigation or LBS (Location Based Service, location-based service).
  • the positioning component 808 may be a positioning component based on the GPS (Global Positioning System, Global Positioning System) of the United States, the Beidou system of China, the Granus system of Russia, or the Galileo system of the European Union.
  • the power supply 809 is used to supply power to various components in the terminal 800.
  • the power source 809 may be alternating current, direct current, disposable batteries, or rechargeable batteries.
  • the rechargeable battery may support wired charging or wireless charging.
  • the rechargeable battery can also be used to support fast charging technology.
  • the terminal 800 further includes one or more sensors 810.
  • the one or more sensors 810 include, but are not limited to, an acceleration sensor 811, a gyroscope sensor 812, a pressure sensor 813, a fingerprint sensor 814, an optical sensor 815, and a proximity sensor 816.
  • the acceleration sensor 811 can detect the magnitude of acceleration on the three coordinate axes of the coordinate system established by the terminal 800.
  • the acceleration sensor 811 can be used to detect the components of the gravitational acceleration on three coordinate axes.
  • the processor 801 may control the display screen 805 to display the user interface in a horizontal view or a vertical view according to the gravity acceleration signal collected by the acceleration sensor 811.
  • the acceleration sensor 811 may also be used for the collection of game or user motion data.
  • the gyroscope sensor 812 can detect the body direction and rotation angle of the terminal 800, and the gyroscope sensor 812 can cooperate with the acceleration sensor 811 to collect the user's 3D actions on the terminal 800.
  • the processor 801 can implement the following functions according to the data collected by the gyroscope sensor 812: motion sensing (such as changing the UI according to the user's tilt operation), image stabilization during shooting, game control, and inertial navigation.
  • the pressure sensor 813 may be disposed on the side frame of the terminal 800 and/or the lower layer of the display screen 805.
  • the processor 801 performs left and right hand recognition or quick operation according to the holding signal collected by the pressure sensor 813.
  • the processor 801 controls the operability controls on the UI interface according to the user's pressure operation on the display screen 805.
  • the operability control includes at least one of a button control, a scroll bar control, an icon control, and a menu control.
  • the fingerprint sensor 814 is used to collect the user's fingerprint.
  • the processor 801 identifies the user's identity according to the fingerprint collected by the fingerprint sensor 814, or the fingerprint sensor 814 identifies the user's identity according to the collected fingerprint. When it is recognized that the user's identity is a trusted identity, the processor 801 authorizes the user to have related sensitive operations, including unlocking the screen, viewing encrypted information, downloading software, paying, and changing settings.
  • the fingerprint sensor 814 may be provided on the front, back or side of the terminal 800. When a physical button or a manufacturer logo is provided on the terminal 800, the fingerprint sensor 814 can be integrated with the physical button or a manufacturer logo.
  • the optical sensor 815 is used to collect the ambient light intensity.
  • the processor 801 may control the display brightness of the display screen 805 according to the ambient light intensity collected by the optical sensor 815. Specifically, when the ambient light intensity is high, the display brightness of the display screen 805 is increased; when the ambient light intensity is low, the display brightness of the display screen 805 is decreased.
  • the processor 801 may also dynamically adjust the shooting parameters of the camera assembly 806 according to the ambient light intensity collected by the optical sensor 815.
  • the proximity sensor 816 also called a distance sensor, is usually arranged on the front panel of the terminal 800.
  • the proximity sensor 816 is used to collect the distance between the user and the front of the terminal 800.
  • the processor 801 controls the display screen 805 to switch from the on-screen state to the off-screen state; when the proximity sensor 816 detects When the distance between the user and the front of the terminal 800 gradually increases, the processor 801 controls the display screen 805 to switch from the rest screen state to the bright screen state.
  • FIG. 8 does not constitute a limitation on the terminal 800, and may include more or fewer components than shown, or combine some components, or adopt different component arrangements.
  • Fig. 9 is a schematic structural diagram of a server provided by an embodiment of the present application.
  • the server 900 may have relatively large differences due to different configurations or performance, and may include one or more processors (central processing units, CPU) 901 and one Or more than one memory 902, where at least one instruction is stored in the memory 902, and the at least one instruction is loaded and executed by the processor 901 to implement the methods provided in the foregoing method embodiments.
  • the server may also have components such as a wired or wireless network interface, a keyboard, an input and output interface for input and output, and the server may also include other components for implementing device functions, which are not described here.
  • the server 900 may be used to execute the steps performed by the server in the character recommendation method described above.
  • the embodiment of the present application also provides a computer device, which includes a processor and a memory, and an instruction or a program is stored in the memory, and the instruction or the program is loaded and executed by the processor to implement the following operations:
  • the syntax tree includes multiple nodes, the hierarchical relationship between multiple nodes, and the position interval of multiple nodes.
  • the hierarchical relationship between multiple nodes and multiple nodes is used
  • the position interval of the node is used to indicate the position interval of the character set corresponding to the node in the code input interface; according to the position of the cursor in the code input interface and the syntax tree, determine the position of the cursor in the syntax tree
  • At least one reference node; at least one reference node is parsed, and the target character to be recommended is determined according to the analysis result; in the code input interface, the target character is recommended.
  • the instruction or the program is loaded and executed by the processor to achieve the following operations: in response to determining multiple target characters to be recommended according to the analysis result, a character recommendation window is generated in the code input interface, Multiple target characters are displayed in the recommendation window.
  • the instruction or the program is loaded and executed by the processor to implement the following operation: in response to detecting a selection operation on the first target character among the multiple target characters, the selected first target The character is entered at the cursor position.
  • the instruction or the program is loaded and executed by the processor to implement the following operation: in response to determining a target character to be recommended according to the analysis result, input a target character to the position of the cursor.
  • the instruction or the program is loaded and executed by the processor to achieve the following operations: in response to determining the multiple target characters to be recommended according to the analysis result, the second target character among the multiple target characters Input to the cursor position; generate a character recommendation window in the code input interface, and display other target characters except the second target character in the character recommendation window.
  • the instruction or the program is loaded and executed by the processor to implement the following operation: in response to detecting the selection operation of the third target character in the character recommendation window, the third target character is replaced with the third target character Two target characters.
  • the instruction or the program is loaded and executed by the processor to achieve the following operations: traverse the nodes in the syntax tree; if the position of the cursor belongs to the position range of the node currently traversed, the node is determined Is the reference node.
  • the instruction or the program is loaded and executed by the processor to implement the following operations: determine the operation node in at least one reference node and the operation type corresponding to the operation node, the operation node refers to the corresponding character set A node including an operator; the operator belonging to the operation type is obtained from the operator database, as the target character, the operator database is used to store the operator belonging to at least one operation type.
  • the instruction or the program is loaded and executed by the processor to implement the following operations: according to the sequence of the position intervals of the multiple reference nodes, multiple reference nodes are connected to form a node path; The path is parsed, and the operation type to which the node path belongs is determined according to the analysis result; at least one operator belonging to the operation type is obtained from the operator database as a target character, and the operator database is used to store operators belonging to at least one operation type.
  • the instruction or the program is loaded and executed by the processor to implement the following operations: determine the character corresponding to the last identifier node in at least one reference node, and the identifier node refers to the corresponding character set
  • the node is an identifier; an identifier containing characters is obtained from the identifier database, the identifier is used as the target character, and the identifier database is used to store at least one identifier.
  • the embodiment of the present application also provides a computer-readable storage medium, the computer-readable storage medium stores an instruction or a program, and the instruction or the program is loaded and executed by a processor to implement the following operations: input code into the interface
  • the input code is converted into a syntax tree.
  • the syntax tree includes multiple nodes, the hierarchical relationship between multiple nodes, and the position interval of multiple nodes.
  • the hierarchical relationship between multiple nodes and multiple nodes is used to represent the grammatical structure of the code ,
  • the position interval of the node is used to indicate the position interval of the character set corresponding to the node in the code input interface; according to the position of the cursor in the code input interface and the syntax tree, at least one reference node corresponding to the position of the cursor in the syntax tree is determined; At least one reference node is analyzed, and the target character to be recommended is determined according to the analysis result; in the code input interface, the target character is recommended.
  • the instruction or the program is loaded and executed by the processor to achieve the following operations: in response to determining multiple target characters to be recommended according to the analysis result, a character recommendation window is generated in the code input interface, Multiple target characters are displayed in the recommendation window.
  • the instruction or the program is loaded and executed by the processor to implement the following operation: in response to detecting a selection operation on the first target character among the multiple target characters, the selected first target The character is entered at the cursor position.
  • the instruction or the program is loaded and executed by the processor to implement the following operation: in response to determining a target character to be recommended according to the analysis result, input a target character to the position of the cursor.
  • the instruction or the program is loaded and executed by the processor to achieve the following operations: in response to determining the multiple target characters to be recommended according to the analysis result, the second target character among the multiple target characters Input to the cursor position; generate a character recommendation window in the code input interface, and display other target characters except the second target character in the character recommendation window.
  • the instruction or the program is loaded and executed by the processor to implement the following operation: in response to detecting the selection operation of the third target character in the character recommendation window, the third target character is replaced with the third target character Two target characters.
  • the instruction or the program is loaded and executed by the processor to achieve the following operations: traverse the nodes in the syntax tree; if the position of the cursor belongs to the position range of the node currently traversed, the node is determined Is the reference node.
  • the instruction or the program is loaded and executed by the processor to implement the following operations: determine the operation node in at least one reference node and the operation type corresponding to the operation node, the operation node refers to the corresponding character set A node including an operator; the operator belonging to the operation type is obtained from the operator database, as the target character, the operator database is used to store the operator belonging to at least one operation type.
  • the instruction or the program is loaded and executed by the processor to implement the following operations: according to the sequence of the position intervals of the multiple reference nodes, multiple reference nodes are connected to form a node path; The path is parsed, and the operation type to which the node path belongs is determined according to the analysis result; at least one operator belonging to the operation type is obtained from the operator database as a target character, and the operator database is used to store operators belonging to at least one operation type.
  • the instruction or the program is loaded and executed by the processor to implement the following operations: determine the character corresponding to the last identifier node in at least one reference node, and the identifier node refers to the corresponding character set
  • the node is an identifier; an identifier containing characters is obtained from the identifier database, the identifier is used as the target character, and the identifier database is used to store at least one identifier.
  • the embodiments of the present application also provide a computer program product.
  • the computer program product includes computer instructions, and the computer instructions are stored in a computer-readable storage medium.
  • the processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions so that the computer device performs the following operations:
  • the syntax tree includes multiple nodes, the hierarchical relationship between multiple nodes, and the position interval of multiple nodes.
  • the hierarchical relationship between multiple nodes and multiple nodes is used
  • the position interval of the node is used to indicate the position interval of the character set corresponding to the node in the code input interface; according to the position of the cursor in the code input interface and the syntax tree, determine the position of the cursor in the syntax tree
  • At least one reference node; at least one reference node is parsed, and the target character to be recommended is determined according to the analysis result; in the code input interface, the target character is recommended.
  • the instruction or the program is loaded and executed by the processor to achieve the following operations: in response to determining multiple target characters to be recommended according to the analysis result, a character recommendation window is generated in the code input interface, Multiple target characters are displayed in the recommendation window.
  • the instruction or the program is loaded and executed by the processor to implement the following operation: in response to detecting a selection operation on the first target character among the multiple target characters, the selected first target The character is entered at the cursor position.
  • the instruction or the program is loaded and executed by the processor to implement the following operation: in response to determining a target character to be recommended according to the analysis result, input a target character to the position of the cursor.
  • the instruction or the program is loaded and executed by the processor to achieve the following operations: in response to determining the multiple target characters to be recommended according to the analysis result, the second target character among the multiple target characters Input to the cursor position; generate a character recommendation window in the code input interface, and display other target characters except the second target character in the character recommendation window.
  • the instruction or the program is loaded and executed by the processor to implement the following operation: in response to detecting the selection operation of the third target character in the character recommendation window, the third target character is replaced with the third target character Two target characters.
  • the instruction or the program is loaded and executed by the processor to achieve the following operations: traverse the nodes in the syntax tree; if the position of the cursor belongs to the position range of the node currently traversed, the node is determined Is the reference node.
  • the instruction or the program is loaded and executed by the processor to implement the following operations: determine the operation node in at least one reference node and the operation type corresponding to the operation node, the operation node refers to the corresponding character set A node including an operator; the operator belonging to the operation type is obtained from the operator database, as the target character, the operator database is used to store the operator belonging to at least one operation type.
  • the instruction or the program is loaded and executed by the processor to implement the following operations: according to the sequence of the position intervals of the multiple reference nodes, multiple reference nodes are connected to form a node path; The path is parsed, and the operation type to which the node path belongs is determined according to the analysis result; at least one operator belonging to the operation type is obtained from the operator database as a target character, and the operator database is used to store operators belonging to at least one operation type.
  • the instruction or the program is loaded and executed by the processor to implement the following operations: determine the character corresponding to the last identifier node in at least one reference node, and the identifier node refers to the corresponding character set
  • the node is an identifier; an identifier containing characters is obtained from the identifier database, the identifier is used as the target character, and the identifier database is used to store at least one identifier.

Abstract

一种字符推荐方法、装置、计算机设备及存储介质,方法包括:将代码输入界面中已输入的代码转换为语法树(302),语法树包括多个节点、多个节点之间的层级关系及多个节点的位置区间;根据代码输入界面中光标的位置和语法树,确定光标的位置在语法树中对应的至少一个参考节点;对至少一个参考节点进行解析,根据解析结果确定待推荐的目标字符(305);在代码输入界面中,推荐目标字符,通过根据当前已输入的代码推荐后续要输入的目标字符,无需开发人员自行输入字符,尤其是开发人员需要切换字符类型时无需切换键盘界面,方便开发人员编写代码,简化了操作,节省了输入时间,提高了输入效率。

Description

字符推荐方法、装置、计算机设备及存储介质
本申请要求于2019年07月15日提交、申请号为201910636592.9、发明名称为“字符推荐方法、装置及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及计算机技术领域,特别涉及一种字符推荐方法、装置、计算机设备及存储介质。
背景技术
计算机设备通常基于代码运行,通过运行代码实现该代码对应的功能。而代码的开发需要由开发人员通过终端实现,开发人员在终端中输入字符,将输入的字符构成代码。
目前的终端通常会配置触摸屏幕,开发人员通过该终端在触摸屏幕上提供的虚拟键盘来输入字符。而由于触摸屏幕的尺寸有限,虚拟键盘的尺寸也受到限制,因此需要在该虚拟键盘中设置多个键盘界面,在不同键盘界面中显示不同类型的字符,该字符的类型可以包括英文字母、数字、操作符等。开发人员编写代码的过程中需要切换字符类型时,需要先切换虚拟键盘的键盘界面,才能通过切换后的键盘界面输入相应类型的字符,操作繁琐,耗费的时间长,输入效率低下。
发明内容
本申请实施例提供了一种字符推荐方法、装置、计算机设备及存储介质,能够简化操作,节省输入时间,提高输入效率。所述技术方案如下:
一方面,提供了一种字符推荐方法,所述方法包括:
将代码输入界面中已输入的代码转换为语法树,所述语法树包括多个节点、所述多个节点之间的层级关系及所述多个节点的位置区间,所述多个节点与所述多个节点之间的层级关系用于表示所述代码的语法结构,所述节点的位置区间用于表示所述节点对应的字符集合在所述代码输入界面中的位置区间;
根据所述代码输入界面中光标的位置和所述语法树,确定所述光标的位置在所述语法树中对应的至少一个参考节点;
对所述至少一个参考节点进行解析,根据解析结果确定待推荐的目标字符;
在所述代码输入界面中,推荐所述目标字符。
另一方面,提供了一种字符推荐装置,所述装置包括:
转换模块,用于将代码输入界面中已输入的代码转换为语法树,所述语法树包括多个节点、所述多个节点之间的层级关系及所述多个节点的位置区间,所述多个节点与所述多个节点之间的层级关系用于表示所述代码的语法结构,所述节点的位置区间用于表示所述节点对应的字符集合在所述代码输入界面中的位置区间;
节点确定模块,用于根据所述代码输入界面中光标的位置和所述语法树,确定所述光标的位置在所述语法树中对应的至少一个参考节点;
字符确定模块,用于对所述至少一个参考节点进行解析,根据解析结果确定待推荐的目标字符;
推荐模块,用于在所述代码输入界面中,推荐所述目标字符。
另一方面,提供了一种计算机设备,所述计算机设备包括处理器和存储器,所述存储器中存储有指令或程序,所述指令或所述程序由所述处理器加载并执行以实现如所述字符推荐方法中所执行的操作。
另一方面,提供了一种计算机可读存储介质,所述计算机可读存储介质中存储有指令或程序,所述指令或所述程序由处理器加载并执行以实现如所述字符推荐方法中所执行的操作。
另一方面,提供了一种计算机程序产品,所述计算机程序产品包括计算机指令,所述计算机指令存储在计算机可读存储介质中。计算机设备的处理器从所述计算机可读存储介质读取所述计算机指令,所述处理器执行所述计算机指令,使得所述计算机设备执行如所述字符推荐方法中所执行的操作。
本申请实施例提供的字符推荐方法、装置、计算机设备及存储介质,通过 将代码输入界面中已输入的代码转换为语法树,根据该代码输入界面中光标的位置和语法树,确定光标的位置在语法树中对应的至少一个参考节点,对该至少一个参考节点进行解析,根据解析结果确定待推荐的目标字符,在代码输入界面中推荐目标字符。通过根据当前已输入的代码推荐后续要输入的目标字符,无需开发人员自行输入字符,尤其是开发人员需要切换字符类型时无需切换键盘界面,方便开发人员编写代码,简化了操作,节省了输入时间,提高了输入效率。
附图说明
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是本申请实施例提供的一种语法树的结构示意图;
图2是本申请实施例提供的一种实施环境示意图;
图3是本申请实施例提供的一种字符推荐方法的流程图;
图4是本申请实施例提供的一种字符推荐方法的流程图;
图5是本申请实施例提供的一种字符推荐窗口的示意图;
图6是本申请实施例提供的一种字符推荐装置的结构示意图;
图7是本申请实施例提供的另一种字符推荐装置的结构示意图;
图8是本申请实施例提供的一种终端的结构示意图;
图9是本申请实施例提供的一种服务器的结构示意图。
具体实施方式
为使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请实施方式作进一步地详细描述。
在对本申请实施例进行详细地解释说明之前,先对本申请实施例涉及的一些名词进行解释说明:
1、语法树:语法树可通过树状的表现形式将代码的语法结构表示出来,该语法树中包括多个节点、该多个节点之间的层级关系和该多个节点的位置区间,通过该多个节点的层级关系即可确定代码的语法结构,通过该多个节点的位置 区间来表示节点对应的字符集合在代码输入界面中的位置区间。
例如,代码如下所示:
var a=1;
var b=a+1;
该代码可以转换为如图1所示的语法树,语法树中的根节点为脚本节点(script),脚本节点的下一层节点为源代码节点(sourceType),源代码节点的下一层节点为程序节点(program)。
该程序节点的下一层包括两个分支,分别代表代码中的两条指令。
针对第一个分支:
该程序节点的下一层中的第一个节点为变量声明节点(VariableDeclaration),变量声明节点对应一个类节点(kind),该类节点对应的类为“var”,该变量声明节点的下一层中的节点为变量声明符节点(VariableDeclarator)。
该变量声明符节点的下一层中的第一个节点为标识符节点(Identifier),该标识符节点的下一层中的节点为名称节点(name),该名称节点对应的字符集合为“a”。
该变量声明符节点的下一层中的第二个节点为字面值节点(Literal),该字面值节点(Literal)的下一层中包括数值节点(value)和字符串节点(raw),字面值节点对应的数值为“1”,字面值节点对应的字符串为“1”。
语法树中的第一个分支代表一条变量声明指令,该变量声明指令采用的类为“var”,且变量声明符包括一个标识符和一个字面值,标识符为“a”,字面值的数值为“1”,表示该变量声明符为“a=1”。
针对第二个分支:
该程序节点的下一层的第二个节点为变量声明节点,变量声明节点对应一个类节点,该类节点对应的类为“var”,该变量声明节点的下一层中的节点为变量声明符节点。
该变量声明符节点的下一层中的第一个节点为标识符节点,该标识符节点的下一层中的节点为名称节点,该名称节点对应的字符集合为“b”。
该变量声明符节点的下一层中的第二个节点为二进制表达式节点(BinaryExpression)。该二进制表达式节点的下一层中的第一个节点为标识符节点,该标识符节点的下一层中的节点为名称节点,该名称节点对应的字符集合 为“a”。该二进制表达式节点的下一层中的第二个节点对应的字符集合为“+”。该二进制表达式节点的下一层中的第三个节点为字面值节点,该字面值节点的下一层中包括数值节点和字符串节点,字面值节点对应的数值为“1”,字面值节点对应的字符串为“1”。
语法树中的第二个分支代表一条变量声明指令,该变量声明指令采用的类为“var”,且变量声明符包括一个标识符和一个二进制表达式,标识符为“b”,二进制表达式包括一个标识符、一个操作符和一个字面值,标识符为“a”,操作符为“+”,字面值为“1”,表示该变量声明符为“b=a+1”。
其中,语法树中的“a”、“b”、“1”及“+”均可以称为字符。且,“a”、“b”均属于标识符,“+”属于操作符。
且,语法树中可以包括操作节点、标识符节点或者其他类型的节点。
该操作节点是指对应的字符集合包括操作符的节点,例如该操作符可以为加号、减号、乘号等。由于代码中包括操作符,且该操作符用于指示代码执行该操作符对应的操作,则在运行包括操作符的代码的过程中,会执行与该操作符对应的操作。
该标识符节点是指对应的字符集合为标识符的节点,例如该标识符为可以为英文字符、数字等。例如该标识符节点对应的字符集合可以为“abc”、“dd”或者其他标识符节点。其中,节点对应的字符集合中包括至少一个字符。
且,每个节点均包括位置区间,且该位置区间包括起始位置和终止位置,该起始位置为节点对应的字符集合的起始字符在代码中的位置,该终止位置为节点对应的字符集合的终止字符在代码中的位置。
以图1所示的语法树为例,确定名称为“b”的标识符节点对应的字符集合的位置区间时,该字符集合仅为“b”,在代码中的起始位置为13,终止位置为14。
本申请实施例提供了一种字符推荐方法,能够在开发人员编辑代码时,为开发人员推荐字符。
在一种可能实现方式中,本申请实施例提供的字符推荐方法可以应用在终端中。该终端获取代码输入界面中的代码,根据获取的代码生成语法树,对该语法树进行解析,确定待推荐的目标字符,向开发人员推荐该目标字符。
在另一种可能实现方式中,本申请实施例提供的字符推荐方法可以应用在 由终端和服务器构成的实施环境中。
图2是本申请实施例提供的一种实施环境示意图。参见图2,该实施环境包括服务器201和终端202,该服务器201和终端202通过通信网络连接。
其中,该服务器201可以为一台服务器,或者由若干台服务器组成的服务器集群,或者是一个云计算服务中心。该终端202可以为手机、平板电脑、个人计算机等设备。
终端202获取代码输入界面中已输入的代码,将该代码发送给服务器201,服务器201将该代码转换为语法树,对该语法树进行解析,确定待推荐的目标字符,将确定的目标字符发送给终端202,由终端202向开发人员推荐该目标字符。
本申请实施例提供的字符推荐方法可以应用于编写代码的场景中,终端为开发人员提供代码输入界面,开发人员即可在该代码输入界面中输入字符,以构成代码。采用本申请实施例提供的方法,对开发人员在代码输入界面中已输入的代码进行解析,即可为开发人员推荐目标字符,供开发人员选择,以便将开发人员选择的目标字符输入至光标的位置。
图3是本申请实施例提供的一种字符推荐方法的流程图。参见图3,应用于终端中,该方法包括:
301、获取代码输入界面中已输入的代码。
终端为开发人员提供代码输入界面,开发人员在终端提供的代码输入界面中输入字符,通过输入的字符构成代码。
其中,该代码输入界面可以为终端安装的指定应用程序的输入界面,该指定应用程序可以为用于输入代码的代码编辑器,当开发人员在该代码编辑器中输入代码后,即可在该代码编辑器中运行已输入的代码,当代码运行出现问题时,即可根据出现的问题在该代码编辑器中进行修改。
或者,该代码输入界面可以为终端自身配置的应用程序的输入界面,例如该输入界面可以为终端中配置的备忘录、记事本等应用程序的输入界面。
在终端提供的代码输入界面中还包括光标,该光标可以位于代码输入界面中的任一位置,当开发人员输入字符时,终端接收开发人员输入的字符,且将字符输入至光标的位置。而当开发人员需要更换输入字符的位置时,仅需更换 光标在代码输入界面中的位置。
可选地,本申请实施例中终端不仅为开发人员提供代码输入界面,而且终端还为开发人员提供虚拟键盘,且该虚拟键盘显示在代码输入界面中,当开发人员需要输入字符时,选中虚拟键盘中的字符,当终端检测到对虚拟键盘中的字符的选中操作时,将该字符输入至光标的位置。
由于终端的显示屏幕的尺寸有限,该终端提供的代码输入界面的尺寸也有限,进而导致虚拟键盘的尺寸也受到限制,在虚拟键盘中设置有多个键盘界面,在不同键盘界面中显示不同类型的字符,该字符的类型可以包括英文字母、数字、操作符等。
当开发人员需要在代码输入界面中输入某一种类型的字符时,先在代码输入界面中显示包含该类型的字符的键盘界面,开发人员在该键盘界面中选中所需的字符,终端即可检测到对该字符的选中操作,将该字符输入至光标的位置。当开发人员需要在代码输入界面中输入另一种类型的字符时,触发键盘界面中的切换选项,终端检测到对切换选项的触发操作,切换为包含该另一种类型的字符的键盘界面,开发人员在该键盘界面中选中所需的字符,终端即可检测到对该字符的选中操作,将该字符输入至光标的位置。
其中,该触发操作可以为点击操作、双击操作、长按操作或者其他操作。
本申请实施例中,当开发人员在代码输入界面中输入代码后,终端即可获取该代码输入界面中已输入的代码,根据已输入的代码执行后续操作。
其中,终端获取代码输入界面中已输入的代码可以包括步骤3011-3013中的任一项:
3011、终端检测代码输入界面中已输入的代码的字符总数量,当该字符总数量发生更改时,获取该代码输入界面中已输入的代码。
例如,当前代码输入界面中已输入的代码的字符总数量为1000,之后,当该代码输入界面中已输入的代码的字符的总数量更改为999时,表示该代码输入界面中的字符发生更改,则终端获取该代码输入界面中已输入的代码。
3012、终端每隔预设时长获取代码输入界面中已输入的代码。其中,该预设时长可以为1分钟、2分钟或者为其他数值。
3013、终端检测代码输入界面中已输入的代码的字符总数量,当该字符总数量与上一次获取代码输入界面中的代码总数量之间的差值不小于预设数值时,获取代码输入界面中已输入的代码。
其中,该预设数值可以为5、10、20或者其他数值。
例如,预设数值为5,终端检测代码输入界面中已输入的代码的字符总数量为1000,之后,当终端检测代码输入界面中已输入的代码的字符总数量为997时,差值为3且小于5,终端不会获取该代码输入界面中已输入的代码。而当终端检测代码输入界面中已输入的代码的字符总数量为990时,差值为10且大于5,获取代码输入界面中已输入的代码。
302、将代码输入界面中已输入的代码转换为语法树。
终端根据代码输入界面中已输入的代码的语法结构确定多个节点且确定该多个节点具有层级关系,按照该多个节点的层级关系,构建该代码输入界面中已输入的代码的语法树,实现将代码输入界面中已输入的代码转换为语法树的效果,完成语法树的构建。
其中,该语法树可以为抽象语法树,或者为其他类型的语法树。且该语法树包括多个节点、多个节点之间的层级关系及多个节点的位置区间,多个节点与多个节点之间的层级关系用于表示代码的语法结构,节点的位置区间用于表示节点对应的字符集合在代码输入界面中的位置区间。
该位置区间中包括节点对应的字符集合的起始位置和终止位置。且采用节点对应的字符集合中的起始字符在代码中的位置表示起始位置,采用该字符集合中的终止字符在代码中的位置表示终止位置。
在一种可能实现方式中,将在该起始字符之前的字符的总数量作为位置区间的起始位置,将在该终止字符之前的字符的总数量作为位置区间的终止位置。
例如,语法树的结构的代码如下所示:
Figure PCTCN2020096289-appb-000001
该节点“identifier”对应的字符集合为“tips”,该节点对应的起始位置为183,终止位置为187。
终端将代码输入界面中已输入的代码转换为语法树,采用该语法树将代码的语法结构通过树状形式表达出来,通过生成语法树供终端识别,后续终端可 以根据生成的语法树执行推荐字符的操作。
在一种可能实现方式中,获取代码输入界面中已输入的代码后,对该代码包括的字符进行词法解析,以将该代码中的字符划分为单词,根据划分的单词确定多个节点,再对划分好的节点进行语法解析,得到该节点对应的多个字符集合之间的层级关系,根据该多个字符集合之间的层级关系构建该代码的语法树,通过该语法树表示代码的语法结构。
其中,该词法解析表示将代码中包括的字符划分为单词,在对代码进行词法解析的过程中,依次读取该代码中的字符,根据当前代码的语言规范,对该代码进行划分,得到划分好的多个单词。语法解析表示对划分好的节点解析语法,确定多个节点之间的层级关系。
本申请实施例通过将代码输入界面中的代码转换为语法树,从而终端可以识别转换的语法树,根据该语法树确定代码的语法结构,后续可以根据该语法树表示的语法结构推荐字符。
303、遍历语法树中的节点。
304、如果光标的位置属于当前遍历到的节点的位置区间,则将节点确定为参考节点。
由于终端后续推荐字符时,是根据当前代码输入界面中光标的位置,推测该光标的位置应输入何种字符,因此,在代码输入界面中确定光标的位置,从语法树中的多个节点中,确定语法树中位置区间包含光标的位置的节点,将该节点确定为参考节点,后续可以根据该参考节点确定待推荐的目标字符。
该语法树中的每个节点均包括位置区间,终端根据代码输入界面中光标的位置和语法树,遍历语法树中的每个节点,根据光标的位置以及语法树中每个节点的位置区间,确定该光标的位置在语法树中对应的至少一个参考节点。
其中,由于语法树中包括多个节点,且该多个节点包括操作节点、标识符节点或其他类型的节点,因此,该至少一个参考节点中也可以包括操作节点、标识符节点或者其他类型的节点中的至少一种。
本申请实施例中,遍历是指按照规则,访问语法树中的每个节点,且每个节点仅访问一次。
在一种可能实现方式中,上述规则可以为前序遍历、中序遍历、后序遍历或者其他方式的遍历。
其中,前序遍历是指按照语法树从上到下,从左到右的顺序依次遍历语法 树中的每个节点。中序遍历是指按照语法树先左后右的顺序依次遍历语法树中的每个节点。后序遍历是指按照语法树先右后左的顺序依次遍历语法树中的每个节点。
在对语法树中包含的节点进行遍历的过程中,终端从代码输入界面中获取当前光标的位置,将光标的位置分别与每个节点的位置区间进行对比,确定光标的位置是否属于遍历到的节点的位置区间,当光标的位置属于遍历到的节点的位置区间时,将该节点确定为参考节点。
其中,该位置区间包括起始位置和终止位置。那么,当光标的位置不小于语法树中的节点的位置区间的起始位置,且光标的位置不大于该节点的位置区间的终止位置时,将该节点作为参考节点。
在一种可能实现方式中,该光标的位置采用光标之前的字符总数量表示,节点的起始位置采用节点对应的起始字符之前的字符总数量表示,节点的终止位置采用节点对应的终止字符之前的字符总数量表示。
因此,当光标之前的字符总数量不小于节点对应的起始字符之前的字符总数量,且光标之前的字符总数量不大于该节点对应的终止字符之前的字符总数量时,确定光标的位置属于该节点的位置区间,将该节点作为参考节点。
本申请实施例通过判断光标的位置是否属于语法树中节点的位置区间,来确定语法树中的节点是否为参考节点,后续可以根据确定的参考节点确定待推荐的字符,根据光标的位置确定待推荐的字符,提高了待推荐字符的准确率。
305、对至少一个参考节点进行解析,根据解析结果确定待推荐的目标字符。
该步骤305包括步骤3051-3053中的任一项:
3051、确定至少一个参考节点中的操作节点及操作节点对应的操作类型,从操作符数据库中获取属于操作类型的操作符,作为目标字符。
在本申请实施例中,还可以设置有操作节点,该操作节点为语法树中用于指示该节点对应的字符集合包括操作符的节点。且该操作节点为预先设置好的操作节点。该操作节点可以由开发人员设置,也可以由终端设置。
将确定的至少一个参考节点分别与操作节点对比,当该至少一个参考节点中包括与操作节点相同的参考节点时,即可将该参考节点确定为操作节点,该操作节点即指示对应的字符集合对应的操作类型,获取该操作节点的操作类型,从操作符数据库中获取属于该操作节点的操作类型的操作符,作为目标字符。
其中,该操作节点是指对应的字符集合包括操作符的节点。
例如,该至少一个参考节点中包括程序节点,变量声明节点,名称节点,该变量声明节点为操作节点,此时获取属于该变量声明节点的“+”、“()”、“=”,将获取的操作符作为目标字符。
其中,该操作符数据库用于存储属于至少一种操作类型的操作符。且该操作符数据库存储在终端中。或者,该操作符数据库存储在服务器中,当终端对至少一个参考节点进行解析时,向服务器发送操作符获取请求,当服务器接收到该操作符获取请求后,将该操作符数据库中存储的属于至少一种操作类型的操作符发送给终端。
3052、根据至少一个参考节点的位置区间的先后顺序,将至少一个参考节点连接,构成节点路径,对节点路径进行解析,根据解析结果确定节点路径所属的操作类型,从操作符数据库中获取属于操作类型的至少一个操作符,作为目标字符。
在一种可能实现方式中,确定的至少一个参考节点包括多个参考节点,则获取该多个参考节点中每个参考节点的起始位置,按照该多个参考节点的起始位置进行排序,且按照该多个参考节点的顺序,将该多个参考节点连接,构成节点路径,对该节点路径进行解析,得到解析结果,根据该解析结果确定该节点路径所属的操作类型,从操作符数据库中获取属于操作类型的至少一个操作符,作为目标字符。
其中,该参考节点的起始位置也称为参考节点的左位置,可以采用该多个参考节点的左位置对该多个参考节点进行排序,构成节点路径。
其中,对该节点路径进行解析时,根据该节点路径节点中的每个节点进行解析,综合考虑每个节点之间的关系,确定该节点路径所属的操作类型,后续根据该操作类型获取属于操作类型的至少一个操作符。
例如,根据该多个参考节点的位置区间的先后顺序确定了节点路径后,按照该节点路径从起始位置到终止位置的顺序开始解析,确定该节点路径中每个节点所对应的字符集合代表的操作,该节点路径中包括变量声明节点,且该变量声明节点后面连接有标识符节点和名称节点,即代表该节点路径的操作类型为赋值操作,则推荐属于该赋值操作的“=”,将该操作符作为目标字符。
其中,操作符数据库用于存储属于至少一种操作类型的操作符。且该操作符数据库存储在终端中。或者,该操作符数据库存储在服务器中,当终端对确定的节点路径进行解析时,向服务器发送操作符获取请求,当服务器接收到该 操作符获取请求后,将该操作符数据库中存储的属于至少一种操作类型的操作符发送给终端。
本申请实施例提供的步骤3051和步骤3052均根据至少一个参考节点从操作符数据库中确定待推荐的操作符,后续即可将确定的操作符作为目标字符推荐给开发人员,无需开发人员切换键盘界面以输入操作符,实现了自动推荐操作符的效果,简化了开发人员的操作,节省了操作时间,提高了输入效率。
3053、确定至少一个参考节点中的最后一个标识符节点对应的字符,从标识符数据库中获取包含该字符的标识符,将该标识符作为目标字符。
在本申请实施例中,还可以设置有标识符节点,该标识符节点为语法树中用于指示该节点对应的字符集合包括标识符的节点。且该操作节点为预先设置好的操作节点。该操作节点可以由开发人员设置,也可以由终端设置。
将确定的至少一个参考节点分别与标识符节点对比,当该至少一个参考节点中包括与标识符节点相同的参考节点时,即可将该参考节点确定为标识符节点,从该至少一个参考节点中确定最后一个标识符节点,根据该最后一个标识符节点确定对应的字符,从标识符数据库中获取包含该字符的标识符,将该标识符作为目标字符。
在一种可能实现方式中,从该至少一个参考节点中确定最后一个标识符节点,确定该标识符节点对应的字符,从标识符数据库中获取以该字符为起始字符的字符集合,将该字符集合作为目标字符。
例如,标识符节点对应的字符为“ab”,该标识符数据库中包含的字符集合为“abcd”,该“abcd”为以“ab”为起始字符的字符集合,因此将“abcd”作为目标字符。
在另一种可能实现方式中,从该至少一个参考节点中确定最后一个标识符节点,根据该最后一个标识符节点确定对应的字符,从标识符数据库中获取包含该字符的字符集合,将该字符集合中的字符作为目标字符。
例如,标识符节点对应的字符为“ab”,该标识符数据库中包含的字符为“cabd”、“abcd”,该“cabd”中包含字符“ab”,且该“abcd”中也包含字符“ab”,则将“cabd”、“abcd”作为目标字符。
其中,标识符节点是指对应的字符集合为标识符的节点,标识符数据库用于存储至少一个标识符。
本申请实施例提供的步骤3053根据至少一个参考节点,从标识符数据库中 确定待推荐的字符,后续即可将确定的字符作为目标字符推荐给开发人员,无需开发人员手动输入一个字符集合中的全部字符,即可实现字符的自动补齐,简化了开发人员的操作,节省了操作时间,提高了输入效率。
需要说明的第一点是,步骤3051-3053中的至少两项可以相互结合,在执行步骤3051-3053之前,先确定至少一个参考节点中的最后一个参考节点对应的字符,判断标识符数据库中是否包含该字符,当确定标识符数据库中包含该字符时,执行该步骤3053,当确定标识符数据库中不包含该字符时,执行步骤3051或步骤3052。当该步骤3052与步骤3053结合时,操作流程如图4所示,判断标识符数据库中是否包含最后一个参考节点对应的字符,如果是,则执行步骤3052,如果否,则执行步骤3053。
需要说明的第二点是,在步骤3053中,仅是以将标识符作为目标字符为例进行说明。在另一实施例中,从该至少一个参考节点中确定最后一个标识符节点,确定该最后一个标识符节点对应的字符,从标识符数据库中获取以该字符为起始字符的字符集合,将该字符集合中除该标识符节点对应的字符之外的剩余字符作为目标字符。
例如,标识符节点对应的字符为“ab”,该标识符数据库中包含的字符集合为“abcd”,该“abcd”为以“ab”为起始字符的字符集合,因此将“cd”作为目标字符。
306、在代码输入界面中,推荐确定的目标字符。
确定了待推荐的目标字符后,即可将目标字符推荐至代码输入界面中,无需开发人员再次切换键盘界面,通过切换后的键盘界面输入目标字符。
需要说明的是,本申请实施例仅是以终端执行步骤301-305为例进行说明,在另一实施例中,还可以由服务器执行步骤301-305,当服务器确定至少一个目标字符后,将该至少一个目标字符发送至终端,由终端执行步骤306。
本申请实施例提供的方法,通过将代码输入界面中已输入的代码转换为语法树,根据该代码输入界面中光标的位置和语法树,确定光标的位置在语法树中对应的至少一个参考节点,对该至少一个参考节点进行解析,根据解析结果确定待推荐的目标字符,在代码输入界面中推荐目标字符。通过根据当前已输入的代码推荐后续要输入的目标字符,无需开发人员自行输入字符,尤其是开发人员需要切换字符类型时无需切换键盘界面,方便开发人员编写代码,简化了操作,节省了输入时间,提高了输入效率。
并且,本申请实施例提供的方法,既可以为开发人员推荐操作符,还可以在开发人员输入起始字符时,自动实现字符的自动补齐,简化了操作,节省了输入时间,提高了输入效率。
在上述实施例的基础上,上述步骤306可以包括以下几种可选方式:
在第一种可能实现方式中,步骤306可以包括以下步骤3061:响应于根据解析结果确定待推荐的多个目标字符,在代码输入界面中生成字符推荐窗口,在字符推荐窗口中显示多个目标字符。
响应于根据解析结果确定待推荐的多个目标字符,在代码输入界面中生成字符推荐窗口,在该字符推荐窗口中显示多个目标字符,后续开发人员可以根据在字符推荐窗口中显示的多个目标字符中选择所需的目标字符,将该所需的目标字符输入至光标的位置。
其中,该字符推荐窗口位于代码输入界面的上层。且该字符推荐窗口可以在代码输入界面中移动。
在一种可能实现方式中,该字符推荐窗口可以在光标的位置生成,或者,该字符推荐窗口还可以在代码输入界面中除光标的位置的其他位置生成。
例如,如图5所示,当光标位于字符集合“value”的后面时,在生成的字符推荐窗口中即可显示“.”、“()”、“+”和“=”。
在步骤3061之后,该方法还可以包括:响应于检测到对多个目标字符中的第一目标字符的选择操作,将选择的第一目标字符输入至光标的位置。
终端在代码输入界面中显示字符推荐窗口,且该字符推荐窗口中包括至少一个目标字符,开发人员可以通过在该字符推荐窗口中显示的至少一个目标字符中选择第一目标字符,终端响应于检测到对第一目标字符的选择操作,将选择的第一目标字符输入至光标的位置。
其中,该选择操作可以为单击操作、双击操作、长按操作或者其他操作。
在第二种可能实现方式中,步骤306可以包括以下步骤3062:响应于根据解析结果确定待推荐的多个目标字符时,将多个目标字符中的第二目标字符输入至光标的位置。在代码输入界面中生成字符推荐窗口,在字符推荐窗口中显示除第二目标字符之外的其他目标字符。
响应于根据解析结果确定待推荐的多个目标字符,先从多个目标字符中选取第二目标字符,将该第二目标字符输入至光标的位置,然后在代码输入界面 中生成字符推荐窗口,在字符推荐窗口中显示出第二目标字符之外的其他目标字符。
例如,当确定的多个目标字符分别为A、B、C、D时,将A输入至光标的位置,在字符推荐窗口中显示B、C、D。
在步骤3062之后,该方法还可以包括:响应于检测到对字符推荐窗口中的第三目标字符的选择操作,将第三目标字符替换第二目标字符。
响应于检测到对字符推荐窗口中的第三目标字符的选择操作,确定初始输入的第二目标字符为错误字符,采用该第三目标字符替换第二目标字符,实现将正确的目标字符输入至光标的位置的效果。
其中,该选择操作可以为单击操作、双击操作、长按操作或者其他操作。
在第三种可能实现方式中,步骤306可以包括以下步骤3063:响应于根据解析结果确定待推荐的一个目标字符,将一个目标字符输入至光标的位置。
响应于根据解析结果确定待推荐的一个目标字符,此时无需再向开发人员展示该目标字符,可以直接将该目标字符输入至光标的位置,无需开发人员再次在代码输入界面中的选择目标字符,方便开发人员的操作,提高了操作效率。
需要说明的是,在一种可能实现方式中,在步骤3061和步骤3062中,在代码输入界面中的字符推荐窗口中还包括关闭选项,当开发人员无需使用推荐的多个目标字符时,可以触发该关闭选项,终端响应于检测到对该关闭选项的触发操作,确定接收到关闭指令,关闭该字符推荐窗口。
在另一种可能实现方式中,在步骤3061和步骤3062中,当开发人员无需使用推荐的多个目标字符时,可以在代码输入界面中除字符推荐窗口中的区域内触发预设操作,响应于终端检测到预设操作时,确定接收到关闭指令,关闭该字符推荐窗口。
其中,预设操作可以为点击操作、双击操作、长按操作或者其他操作。
本申请实施例在执行完步骤306后,由开发人员选择目标字符后,终端将该目标字符输入至光标的位置,后续还可以继续执行步骤301-306,继续为开发人员推荐目标字符,继续由开发人员选择目标字符后,终端将该目标字符输入至光标的位置。
本申请实施例通过将确定的目标字符显示在字符推荐窗口,响应于检测到对目标字符的选择操作,将选择的目标字符添加至光标的位置,开发人员可以直接从字符推荐窗口中选择目标字符,无需通过切换键盘界面以输入目标字符, 简化了操作,节省了输入时间,提高了输入效率。
并且,本申请实施例还可以直接将目标字符输入至光标的位置,开发人员仅需检测输入的目标字符是否正确即可,简化了开发人员输入目标字符的操作,节省了输入时间,提高了输入效率。
图6是本申请实施例提供的一种字符推荐装置的结构示意图,参见图6,该装置包括:
转换模块601,用于将代码输入界面中已输入的代码转换为语法树,语法树包括多个节点、多个节点之间的层级关系及多个节点的位置区间,多个节点与多个节点之间的层级关系用于表示代码的语法结构,节点的位置区间用于表示节点对应的字符集合在代码输入界面中的位置区间;
节点确定模块602,用于根据代码输入界面中光标的位置和语法树,确定光标的位置在语法树中对应的至少一个参考节点;
字符确定模块603,用于对至少一个参考节点进行解析,根据解析结果确定待推荐的目标字符;
推荐模块604,用于在代码输入界面中,推荐目标字符。
在一种可能实现方式中,推荐模块604,包括:
生成单元6041,用于响应于根据解析结果确定待推荐的多个目标字符,在代码输入界面中生成字符推荐窗口;
显示单元6042,用于在字符推荐窗口中显示多个目标字符。
在另一种可能实现方式中,装置还包括:
输入模块605,用于响应于检测到对多个目标字符中的第一目标字符的选择操作,将选择的第一目标字符输入至光标的位置。
在另一种可能实现方式中,推荐模块604,包括:
输入单元6043,用于响应于根据解析结果确定待推荐的一个目标字符,将一个目标字符输入至光标的位置。
在另一种可能实现方式中,推荐模块604,包括:
输入单元6043,用于响应于根据解析结果确定待推荐的多个目标字符,将多个目标字符中的第二目标字符输入至光标的位置;
生成单元6041,用于在代码输入界面中生成字符推荐窗口;
显示单元6042,用于在字符推荐窗口中显示除第二目标字符之外的其他目 标字符。
在另一种可能实现方式中,装置还包括:
替换模块606,用于响应于检测到对字符推荐窗口中的第三目标字符的选择操作,将第三目标字符替换第二目标字符。
在另一种可能实现方式中,节点确定模块602,包括:
遍历单元6021,用于遍历语法树中的节点;
节点确定单元6022,用于如果光标的位置属于当前遍历到的节点的位置区间,则将节点确定为参考节点。
在另一种可能实现方式中,字符确定模块603,包括:
类型确定单元6031,确定至少一个参考节点中的操作节点及操作节点对应的操作类型,操作节点是指对应的字符集合包括操作符的节点;
第一获取单元6032,用于从操作符数据库中获取属于操作类型的操作符,作为目标字符,操作符数据库用于存储属于至少一种操作类型的操作符。
在另一种可能实现方式中,字符确定模块603,包括:
连接单元6033,用于根据至少一个参考节点的位置区间的先后顺序,将至少一个参考节点连接,构成节点路径;
解析单元6034,用于对节点路径进行解析,根据解析结果确定节点路径所属的操作类型;
第二获取单元6035,用于从操作符数据库中获取属于操作类型的至少一个操作符,作为目标字符,操作符数据库用于存储属于至少一种操作类型的操作符。
在另一种可能实现方式中,字符确定模块603,包括:
字符确定单元6036,用于确定至少一个参考节点中的最后一个标识符节点对应的字符,标识符节点是指对应的字符集合为标识符的节点;
标识符获取单元6037,从标识符数据库中获取包含字符的标识符,将标识符作为目标字符,标识符数据库用于存储至少一个标识符。
上述所有可选技术方案,可以采用任意结合形成本申请的可选实施例,在此不再一一赘述。
需要说明的是:上述实施例提供的字符推荐装置在推荐字符时,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将计算机设备的内部结构划分成不同的功能模块, 以完成以上描述的全部或者部分功能。另外,上述实施例提供的字符推荐装置的实施例与字符推荐方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。
图8是本申请实施例提供的一种终端的结构示意图。该终端800可以是便携式移动终端,比如:智能手机、平板电脑、MP3播放器(Moving Picture Experts Group Audio Layer III,动态影像专家压缩标准音频层面3)、MP4(Moving Picture Experts Group Audio Layer IV,动态影像专家压缩标准音频层面4)播放器、笔记本电脑、台式电脑、头戴式设备,或其他任意智能终端。终端800还可能被称为用户设备、便携式终端、膝上型终端、台式终端等其他名称。
通常,终端800包括有:处理器801和存储器802。
处理器801可以包括一个或多个处理核心,比如4核心处理器、8核心处理器等。处理器801可以采用DSP(Digital Signal Processing,数字信号处理)、FPGA(Field-Programmable Gate Array,现场可编程门阵列)、PLA(Programmable Logic Array,可编程逻辑阵列)中的至少一种硬件形式来实现。处理器801也可以包括主处理器和协处理器,主处理器是用于对在唤醒状态下的数据进行处理的处理器,也称CPU(Central Processing Unit,中央处理器);协处理器是用于对在待机状态下的数据进行处理的低功耗处理器。在一些实施例中,处理器801可以集成有GPU(Graphics Processing Unit,图像处理器),GPU用于负责显示屏所需要显示的内容的渲染和绘制。一些实施例中,处理器801还可以包括AI(Artificial Intelligence,人工智能)处理器,该AI处理器用于处理有关机器学习的计算操作。
存储器802可以包括一个或多个计算机可读存储介质,该计算机可读存储介质可以是非暂态的。存储器802还可包括高速随机存取存储器,以及非易失性存储器,比如一个或多个磁盘存储设备、闪存存储设备。在一些实施例中,存储器802中的非暂态的计算机可读存储介质用于存储至少一个指令,该至少一个指令用于被处理器801所具有以实现本申请中方法实施例提供的字符推荐方法。
在一些实施例中,终端800还可选包括有:外围设备接口803和至少一个外围设备。处理器801、存储器802和外围设备接口803之间可以通过总线或信号线相连。各个外围设备可以通过总线、信号线或电路板与外围设备接口803 相连。具体地,外围设备包括:射频电路804、显示屏805、摄像头组件806、音频电路807、定位组件808和电源809中的至少一种。
外围设备接口803可被用于将I/O(Input/Output,输入/输出)相关的至少一个外围设备连接到处理器801和存储器802。在一些实施例中,处理器801、存储器802和外围设备接口803被集成在同一芯片或电路板上;在一些其他实施例中,处理器801、存储器802和外围设备接口803中的任意一个或两个可以在单独的芯片或电路板上实现,本实施例对此不加以限定。
射频电路804用于接收和发射RF(Radio Frequency,射频)信号,也称电磁信号。射频电路804通过电磁信号与通信网络以及其他通信设备进行通信。射频电路804将电信号转换为电磁信号进行发送,或者,将接收到的电磁信号转换为电信号。可选地,射频电路804包括:天线系统、RF收发器、一个或多个放大器、调谐器、振荡器、数字信号处理器、编解码芯片组、用户身份模块卡等等。射频电路804可以通过至少一种无线通信协议来与其它终端进行通信。该无线通信协议包括但不限于:城域网、各代移动通信网络(2G、3G、4G及8G)、无线局域网和/或WiFi(Wireless Fidelity,无线保真)网络。在一些实施例中,射频电路804还可以包括NFC(Near Field Communication,近距离无线通信)有关的电路,本申请对此不加以限定。
显示屏805用于显示UI(UserInterface,用户界面)。该UI可以包括图形、文本、图标、视频及其它们的任意组合。当显示屏805是触摸显示屏时,显示屏805还具有采集在显示屏805的表面或表面上方的触摸信号的能力。该触摸信号可以作为控制信号输入至处理器801进行处理。此时,显示屏805还可以用于提供虚拟按钮和/或虚拟键盘,也称软按钮和/或软键盘。在一些实施例中,显示屏805可以为一个,设置终端800的前面板;在另一些实施例中,显示屏805可以为至少两个,分别设置在终端800的不同表面或呈折叠设计;在再一些实施例中,显示屏805可以是柔性显示屏,设置在终端800的弯曲表面上或折叠面上。甚至,显示屏805还可以设置成非矩形的不规则图形,也即异形屏。显示屏805可以采用LCD(Liquid Crystal Display,液晶显示屏)、OLED(Organic Light-Emitting Diode,有机发光二极管)等材质制备。
摄像头组件806用于采集图像或视频。可选地,摄像头组件806包括前置摄像头和后置摄像头。通常,前置摄像头设置在终端的前面板,后置摄像头设置在终端的背面。在一些实施例中,后置摄像头为至少两个,分别为主摄像头、 景深摄像头、广角摄像头、长焦摄像头中的任意一种,以实现主摄像头和景深摄像头融合实现背景虚化功能、主摄像头和广角摄像头融合实现全景拍摄以及VR(Virtual Reality,虚拟现实)拍摄功能或者其它融合拍摄功能。在一些实施例中,摄像头组件806还可以包括闪光灯。闪光灯可以是单色温闪光灯,也可以是双色温闪光灯。双色温闪光灯是指暖光闪光灯和冷光闪光灯的组合,可以用于不同色温下的光线补偿。
音频电路807可以包括麦克风和扬声器。麦克风用于采集用户及环境的声波,并将声波转换为电信号输入至处理器801进行处理,或者输入至射频电路804以实现语音通信。出于立体声采集或降噪的目的,麦克风可以为多个,分别设置在终端800的不同部位。麦克风还可以是阵列麦克风或全向采集型麦克风。扬声器则用于将来自处理器801或射频电路804的电信号转换为声波。扬声器可以是传统的薄膜扬声器,也可以是压电陶瓷扬声器。当扬声器是压电陶瓷扬声器时,不仅可以将电信号转换为人类可听见的声波,也可以将电信号转换为人类听不见的声波以进行测距等用途。在一些实施例中,音频电路807还可以包括耳机插孔。
定位组件808用于定位终端800的当前地理位置,以实现导航或LBS(Location Based Service,基于位置的服务)。定位组件808可以是基于美国的GPS(Global Positioning System,全球定位系统)、中国的北斗系统、俄罗斯的格雷纳斯系统或欧盟的伽利略系统的定位组件。
电源809用于为终端800中的各个组件进行供电。电源809可以是交流电、直流电、一次性电池或可充电电池。当电源809包括可充电电池时,该可充电电池可以支持有线充电或无线充电。该可充电电池还可以用于支持快充技术。
在一些实施例中,终端800还包括有一个或多个传感器810。该一个或多个传感器810包括但不限于:加速度传感器811、陀螺仪传感器812、压力传感器813、指纹传感器814、光学传感器815以及接近传感器816。
加速度传感器811可以检测以终端800建立的坐标系的三个坐标轴上的加速度大小。比如,加速度传感器811可以用于检测重力加速度在三个坐标轴上的分量。处理器801可以根据加速度传感器811采集的重力加速度信号,控制显示屏805以横向视图或纵向视图进行用户界面的显示。加速度传感器811还可以用于游戏或者用户的运动数据的采集。
陀螺仪传感器812可以检测终端800的机体方向及转动角度,陀螺仪传感 器812可以与加速度传感器811协同采集用户对终端800的3D动作。处理器801根据陀螺仪传感器812采集的数据,可以实现如下功能:动作感应(比如根据用户的倾斜操作来改变UI)、拍摄时的图像稳定、游戏控制以及惯性导航。
压力传感器813可以设置在终端800的侧边框和/或显示屏805的下层。当压力传感器813设置在终端800的侧边框时,可以检测用户对终端800的握持信号,由处理器801根据压力传感器813采集的握持信号进行左右手识别或快捷操作。当压力传感器813设置在显示屏805的下层时,由处理器801根据用户对显示屏805的压力操作,实现对UI界面上的可操作性控件进行控制。可操作性控件包括按钮控件、滚动条控件、图标控件、菜单控件中的至少一种。
指纹传感器814用于采集用户的指纹,由处理器801根据指纹传感器814采集到的指纹识别用户的身份,或者,由指纹传感器814根据采集到的指纹识别用户的身份。在识别出用户的身份为可信身份时,由处理器801授权该用户具有相关的敏感操作,该敏感操作包括解锁屏幕、查看加密信息、下载软件、支付及更改设置等。指纹传感器814可以被设置终端800的正面、背面或侧面。当终端800上设置有物理按键或厂商Logo时,指纹传感器814可以与物理按键或厂商标志集成在一起。
光学传感器815用于采集环境光强度。在一个实施例中,处理器801可以根据光学传感器815采集的环境光强度,控制显示屏805的显示亮度。具体地,当环境光强度较高时,调高显示屏805的显示亮度;当环境光强度较低时,调低显示屏805的显示亮度。在另一个实施例中,处理器801还可以根据光学传感器815采集的环境光强度,动态调整摄像头组件806的拍摄参数。
接近传感器816,也称距离传感器,通常设置在终端800的前面板。接近传感器816用于采集用户与终端800的正面之间的距离。在一个实施例中,当接近传感器816检测到用户与终端800的正面之间的距离逐渐变小时,由处理器801控制显示屏805从亮屏状态切换为息屏状态;当接近传感器816检测到用户与终端800的正面之间的距离逐渐变大时,由处理器801控制显示屏805从息屏状态切换为亮屏状态。
本领域技术人员可以理解,图8中示出的结构并不构成对终端800的限定,可以包括比图示更多或更少的组件,或者组合某些组件,或者采用不同的组件布置。
图9是本申请实施例提供的一种服务器的结构示意图,该服务器900可因配置或性能不同而产生比较大的差异,可以包括一个或一个以上处理器(central processing units,CPU)901和一个或一个以上的存储器902,其中,所述存储器902中存储有至少一条指令,所述至少一条指令由所述处理器901加载并执行以实现上述各个方法实施例提供的方法。当然,该服务器还可以具有有线或无线网络接口、键盘以及输入输出接口等部件,以便进行输入输出,该服务器还可以包括其他用于实现设备功能的部件,在此不做赘述。
服务器900可以用于执行上述字符推荐方法中服务器所执行的步骤。
本申请实施例还提供了一种计算机设备,该计算机设备包括处理器和存储器,存储器中存储有指令或程序,该指令或该程序由处理器加载并执行以实现如下操作:
将代码输入界面中已输入的代码转换为语法树,语法树包括多个节点、多个节点之间的层级关系及多个节点的位置区间,多个节点与多个节点之间的层级关系用于表示代码的语法结构,节点的位置区间用于表示节点对应的字符集合在代码输入界面中的位置区间;根据代码输入界面中光标的位置和语法树,确定光标的位置在语法树中对应的至少一个参考节点;对至少一个参考节点进行解析,根据解析结果确定待推荐的目标字符;在代码输入界面中,推荐目标字符。
在一种可能实现方式中,该指令或该程序由处理器加载并执行以实现如下操作:响应于根据解析结果确定待推荐的多个目标字符,在代码输入界面中生成字符推荐窗口,在字符推荐窗口中显示多个目标字符。
在另一种可能实现方式中,该指令或该程序由处理器加载并执行以实现如下操作:响应于检测到对多个目标字符中的第一目标字符的选择操作,将选择的第一目标字符输入至光标的位置。
在另一种可能实现方式中,该指令或该程序由处理器加载并执行以实现如下操作:响应于根据解析结果确定待推荐的一个目标字符,将一个目标字符输入至光标的位置。
在另一种可能实现方式中,该指令或该程序由处理器加载并执行以实现如下操作:响应于根据解析结果确定待推荐的多个目标字符,将多个目标字符中的第二目标字符输入至光标的位置;在代码输入界面中生成字符推荐窗口,在 字符推荐窗口中显示除第二目标字符之外的其他目标字符。
在另一种可能实现方式中,该指令或该程序由处理器加载并执行以实现如下操作:响应于检测到对字符推荐窗口中的第三目标字符的选择操作,将第三目标字符替换第二目标字符。
在另一种可能实现方式中,该指令或该程序由处理器加载并执行以实现如下操作:遍历语法树中的节点;如果光标的位置属于当前遍历到的节点的位置区间,则将节点确定为参考节点。
在另一种可能实现方式中,该指令或该程序由处理器加载并执行以实现如下操作:确定至少一个参考节点中的操作节点及操作节点对应的操作类型,操作节点是指对应的字符集合包括操作符的节点;从操作符数据库中获取属于操作类型的操作符,作为目标字符,操作符数据库用于存储属于至少一种操作类型的操作符。
在另一种可能实现方式中,该指令或该程序由处理器加载并执行以实现如下操作:根据多个参考节点的位置区间的先后顺序,将多个参考节点连接,构成节点路径;对节点路径进行解析,根据解析结果确定节点路径所属的操作类型;从操作符数据库中获取属于操作类型的至少一个操作符,作为目标字符,操作符数据库用于存储属于至少一种操作类型的操作符。
在另一种可能实现方式中,该指令或该程序由处理器加载并执行以实现如下操作:确定至少一个参考节点中的最后一个标识符节点对应的字符,标识符节点是指对应的字符集合为标识符的节点;从标识符数据库中获取包含字符的标识符,将标识符作为目标字符,标识符数据库用于存储至少一个标识符。
本申请实施例还提供了一种计算机可读存储介质,该计算机可读存储介质中存储有指令或程序,该指令或该程序由处理器加载并执行以实现如下操作:将代码输入界面中已输入的代码转换为语法树,语法树包括多个节点、多个节点之间的层级关系及多个节点的位置区间,多个节点与多个节点之间的层级关系用于表示代码的语法结构,节点的位置区间用于表示节点对应的字符集合在代码输入界面中的位置区间;根据代码输入界面中光标的位置和语法树,确定光标的位置在语法树中对应的至少一个参考节点;对至少一个参考节点进行解析,根据解析结果确定待推荐的目标字符;在代码输入界面中,推荐目标字符。
在一种可能实现方式中,该指令或该程序由处理器加载并执行以实现如下 操作:响应于根据解析结果确定待推荐的多个目标字符,在代码输入界面中生成字符推荐窗口,在字符推荐窗口中显示多个目标字符。
在另一种可能实现方式中,该指令或该程序由处理器加载并执行以实现如下操作:响应于检测到对多个目标字符中的第一目标字符的选择操作,将选择的第一目标字符输入至光标的位置。
在另一种可能实现方式中,该指令或该程序由处理器加载并执行以实现如下操作:响应于根据解析结果确定待推荐的一个目标字符,将一个目标字符输入至光标的位置。
在另一种可能实现方式中,该指令或该程序由处理器加载并执行以实现如下操作:响应于根据解析结果确定待推荐的多个目标字符,将多个目标字符中的第二目标字符输入至光标的位置;在代码输入界面中生成字符推荐窗口,在字符推荐窗口中显示除第二目标字符之外的其他目标字符。
在另一种可能实现方式中,该指令或该程序由处理器加载并执行以实现如下操作:响应于检测到对字符推荐窗口中的第三目标字符的选择操作,将第三目标字符替换第二目标字符。
在另一种可能实现方式中,该指令或该程序由处理器加载并执行以实现如下操作:遍历语法树中的节点;如果光标的位置属于当前遍历到的节点的位置区间,则将节点确定为参考节点。
在另一种可能实现方式中,该指令或该程序由处理器加载并执行以实现如下操作:确定至少一个参考节点中的操作节点及操作节点对应的操作类型,操作节点是指对应的字符集合包括操作符的节点;从操作符数据库中获取属于操作类型的操作符,作为目标字符,操作符数据库用于存储属于至少一种操作类型的操作符。
在另一种可能实现方式中,该指令或该程序由处理器加载并执行以实现如下操作:根据多个参考节点的位置区间的先后顺序,将多个参考节点连接,构成节点路径;对节点路径进行解析,根据解析结果确定节点路径所属的操作类型;从操作符数据库中获取属于操作类型的至少一个操作符,作为目标字符,操作符数据库用于存储属于至少一种操作类型的操作符。
在另一种可能实现方式中,该指令或该程序由处理器加载并执行以实现如下操作:确定至少一个参考节点中的最后一个标识符节点对应的字符,标识符节点是指对应的字符集合为标识符的节点;从标识符数据库中获取包含字符的 标识符,将标识符作为目标字符,标识符数据库用于存储至少一个标识符。
本申请实施例还提供了一种计算机程序产品,计算机程序产品包括计算机指令,计算机指令存储在计算机可读存储介质中。计算机设备的处理器从计算机可读存储介质读取计算机指令,处理器执行计算机指令,使得计算机设备执行如下操作:
将代码输入界面中已输入的代码转换为语法树,语法树包括多个节点、多个节点之间的层级关系及多个节点的位置区间,多个节点与多个节点之间的层级关系用于表示代码的语法结构,节点的位置区间用于表示节点对应的字符集合在代码输入界面中的位置区间;根据代码输入界面中光标的位置和语法树,确定光标的位置在语法树中对应的至少一个参考节点;对至少一个参考节点进行解析,根据解析结果确定待推荐的目标字符;在代码输入界面中,推荐目标字符。
在一种可能实现方式中,该指令或该程序由处理器加载并执行以实现如下操作:响应于根据解析结果确定待推荐的多个目标字符,在代码输入界面中生成字符推荐窗口,在字符推荐窗口中显示多个目标字符。
在另一种可能实现方式中,该指令或该程序由处理器加载并执行以实现如下操作:响应于检测到对多个目标字符中的第一目标字符的选择操作,将选择的第一目标字符输入至光标的位置。
在另一种可能实现方式中,该指令或该程序由处理器加载并执行以实现如下操作:响应于根据解析结果确定待推荐的一个目标字符,将一个目标字符输入至光标的位置。
在另一种可能实现方式中,该指令或该程序由处理器加载并执行以实现如下操作:响应于根据解析结果确定待推荐的多个目标字符,将多个目标字符中的第二目标字符输入至光标的位置;在代码输入界面中生成字符推荐窗口,在字符推荐窗口中显示除第二目标字符之外的其他目标字符。
在另一种可能实现方式中,该指令或该程序由处理器加载并执行以实现如下操作:响应于检测到对字符推荐窗口中的第三目标字符的选择操作,将第三目标字符替换第二目标字符。
在另一种可能实现方式中,该指令或该程序由处理器加载并执行以实现如下操作:遍历语法树中的节点;如果光标的位置属于当前遍历到的节点的位置区间,则将节点确定为参考节点。
在另一种可能实现方式中,该指令或该程序由处理器加载并执行以实现如下操作:确定至少一个参考节点中的操作节点及操作节点对应的操作类型,操作节点是指对应的字符集合包括操作符的节点;从操作符数据库中获取属于操作类型的操作符,作为目标字符,操作符数据库用于存储属于至少一种操作类型的操作符。
在另一种可能实现方式中,该指令或该程序由处理器加载并执行以实现如下操作:根据多个参考节点的位置区间的先后顺序,将多个参考节点连接,构成节点路径;对节点路径进行解析,根据解析结果确定节点路径所属的操作类型;从操作符数据库中获取属于操作类型的至少一个操作符,作为目标字符,操作符数据库用于存储属于至少一种操作类型的操作符。
在另一种可能实现方式中,该指令或该程序由处理器加载并执行以实现如下操作:确定至少一个参考节点中的最后一个标识符节点对应的字符,标识符节点是指对应的字符集合为标识符的节点;从标识符数据库中获取包含字符的标识符,将标识符作为目标字符,标识符数据库用于存储至少一个标识符。
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。
以上所述仅为本申请的可选实施例,并不用以限制本申请,凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。

Claims (15)

  1. 一种字符推荐方法,其特征在于,应用于计算机设备,所述方法包括:
    将代码输入界面中已输入的代码转换为语法树,所述语法树包括多个节点、所述多个节点之间的层级关系及所述多个节点的位置区间,所述多个节点与所述多个节点之间的层级关系用于表示所述代码的语法结构,所述节点的位置区间用于表示所述节点对应的字符集合在所述代码输入界面中的位置区间;
    根据所述代码输入界面中光标的位置和所述语法树,确定所述光标的位置在所述语法树中对应的至少一个参考节点;
    对所述至少一个参考节点进行解析,根据解析结果确定待推荐的目标字符;
    在所述代码输入界面中,推荐所述目标字符。
  2. 根据权利要求1所述的方法,其特征在于,所述在所述代码输入界面中,推荐所述目标字符,包括:
    响应于根据所述解析结果确定待推荐的多个目标字符,在所述代码输入界面中生成字符推荐窗口,在所述字符推荐窗口中显示所述多个目标字符。
  3. 根据权利要求2所述的方法,其特征在于,所述在所述字符推荐窗口中显示所述多个目标字符之后,所述方法还包括:
    响应于检测到对所述多个目标字符中的第一目标字符的选择操作,将选择的所述第一目标字符输入至所述光标的位置。
  4. 根据权利要求1所述的方法,其特征在于,所述在所述代码输入界面中,推荐所述目标字符,包括:
    响应于根据所述解析结果确定待推荐的一个目标字符,将所述一个目标字符输入至所述光标的位置。
  5. 根据权利要求1所述的方法,其特征在于,所述在所述代码输入界面中,推荐所述目标字符,包括:
    响应于根据所述解析结果确定待推荐的多个目标字符,将所述多个目标字符中的第二目标字符输入至所述光标的位置;
    在所述代码输入界面中生成字符推荐窗口,在所述字符推荐窗口中显示除所述第二目标字符之外的其他目标字符。
  6. 根据权利要求5所述的方法,其特征在于,所述在所述字符推荐窗口中显示除所述第二目标字符之外的其他目标字符之后,所述方法还包括:
    响应于检测到对所述字符推荐窗口中的第三目标字符的选择操作,将所述第三目标字符替换所述第二目标字符。
  7. 根据权利要求1所述的方法,其特征在于,所述根据所述代码输入界面中光标的位置和所述语法树,确定所述光标的位置在所述语法树中对应的至少一个参考节点,包括:
    遍历所述语法树中的节点;
    如果所述光标的位置属于当前遍历到的节点的位置区间,则将所述节点确定为参考节点。
  8. 根据权利要求1所述的方法,其特征在于,所述对所述至少一个参考节点进行解析,根据解析结果确定待推荐的目标字符,包括:
    确定所述至少一个参考节点中的操作节点及所述操作节点对应的操作类型,所述操作节点是指对应的字符集合包括操作符的节点;
    从操作符数据库中获取属于所述操作类型的操作符,作为目标字符,所述操作符数据库用于存储属于至少一种操作类型的操作符。
  9. 根据权利要求1所述的方法,其特征在于,所述至少一个参考节点包括多个参考节点,所述对所述至少一个参考节点进行解析,根据解析结果确定待推荐的目标字符,包括:
    根据所述多个参考节点的位置区间的先后顺序,将所述多个参考节点连接,构成节点路径;
    对所述节点路径进行解析,根据解析结果确定所述节点路径所属的操作类型;
    从操作符数据库中获取属于所述操作类型的至少一个操作符,作为目标字 符,所述操作符数据库用于存储属于至少一种操作类型的操作符。
  10. 根据权利要求1所述的方法,其特征在于,所述对所述至少一个参考节点进行解析,根据解析结果确定待推荐的目标字符,包括:
    确定所述至少一个参考节点中的最后一个标识符节点对应的字符,所述标识符节点是指对应的字符集合为标识符的节点;
    从标识符数据库中获取包含所述字符的标识符,将所述标识符作为目标字符,所述标识符数据库用于存储至少一个标识符。
  11. 一种字符推荐装置,其特征在于,所述装置包括:
    转换模块,用于将代码输入界面中已输入的代码转换为语法树,所述语法树包括多个节点、所述多个节点之间的层级关系及所述多个节点的位置区间,所述多个节点与所述多个节点之间的层级关系用于表示所述代码的语法结构,所述节点的位置区间用于表示所述节点对应的字符集合在所述代码输入界面中的位置区间;
    节点确定模块,用于根据所述代码输入界面中光标的位置和所述语法树,确定所述光标的位置在所述语法树中对应的至少一个参考节点;
    字符确定模块,用于对所述至少一个参考节点进行解析,根据解析结果确定待推荐的目标字符;
    推荐模块,用于在所述代码输入界面中,推荐所述目标字符。
  12. 根据权利要求11所述的装置,其特征在于,所述推荐模块,包括:
    生成单元,用于响应于根据所述解析结果确定待推荐的多个目标字符,在所述代码输入界面中生成字符推荐窗口;
    显示单元,用于在所述字符推荐窗口中显示所述多个目标字符。
  13. 根据权利要求12所述的装置,其特征在于,所述装置还包括:
    输入模块,用于响应于检测到对所述多个目标字符中的第一目标字符的选择操作,将选择的所述第一目标字符输入至所述光标的位置。
  14. 一种计算机设备,其特征在于,所述计算机设备包括处理器和存储器,所述存储器中存储有指令或程序,所述指令或所述程序由所述处理器加载并执行以实现如权利要求1至10任一权利要求所述的字符推荐方法中所执行的操作。
  15. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有指令或程序,所述指令或所述程序由处理器加载并执行以实现如权利要求1至10任一权利要求所述的字符推荐方法中所执行的操作。
PCT/CN2020/096289 2019-07-15 2020-06-16 字符推荐方法、装置、计算机设备及存储介质 WO2021008287A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2021546226A JP7236551B2 (ja) 2019-07-15 2020-06-16 キャラクタ推薦方法、キャラクタ推薦装置、コンピュータ装置およびプログラム
US17/337,778 US11537213B2 (en) 2019-07-15 2021-06-03 Character recommending method and apparatus, and computer device and storage medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910636592.9 2019-07-15
CN201910636592.9A CN112230781B (zh) 2019-07-15 2019-07-15 字符推荐方法、装置及存储介质

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/337,778 Continuation US11537213B2 (en) 2019-07-15 2021-06-03 Character recommending method and apparatus, and computer device and storage medium

Publications (1)

Publication Number Publication Date
WO2021008287A1 true WO2021008287A1 (zh) 2021-01-21

Family

ID=74111549

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/096289 WO2021008287A1 (zh) 2019-07-15 2020-06-16 字符推荐方法、装置、计算机设备及存储介质

Country Status (4)

Country Link
US (1) US11537213B2 (zh)
JP (1) JP7236551B2 (zh)
CN (1) CN112230781B (zh)
WO (1) WO2021008287A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115756449A (zh) * 2022-12-02 2023-03-07 之江实验室 一种页面复用方法、装置、存储介质及电子设备

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117632106A (zh) * 2023-11-21 2024-03-01 广州致远电子股份有限公司 代码补全方法、装置、设备以及存储介质

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130067435A1 (en) * 2011-09-08 2013-03-14 International Business Machines Corporation Method and apparatus for programming assistance
CN108388425A (zh) * 2018-03-20 2018-08-10 北京大学 一种基于lstm自动补全代码的方法
CN108595165A (zh) * 2018-04-25 2018-09-28 清华大学 一种基于代码中间表示的代码补全方法、装置及存储介质

Family Cites Families (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7958493B2 (en) * 2006-01-20 2011-06-07 Kevin Edward Lindsey Type inference system and method
US8074172B2 (en) * 2007-01-05 2011-12-06 Apple Inc. Method, system, and graphical user interface for providing word recommendations
US20090077091A1 (en) * 2007-09-18 2009-03-19 Gilad Khen System for development and hosting of network applications
JP5376163B2 (ja) * 2007-11-15 2013-12-25 日本電気株式会社 文書管理・検索システムおよび文書の管理・検索方法
US9934224B2 (en) * 2012-05-15 2018-04-03 Google Llc Document editor with research citation insertion tool
CN102768681B (zh) * 2012-06-26 2014-10-22 北京奇虎科技有限公司 一种用于搜索输入的推荐系统及方法
US20140173563A1 (en) * 2012-12-19 2014-06-19 Microsoft Corporation Editor visualizations
CN116185209A (zh) * 2014-08-11 2023-05-30 张锐 手写输入字符的处理、数据拆分和合并及编解码处理方法
US9448770B2 (en) * 2014-12-29 2016-09-20 Sap Se Source code editor
US9860063B2 (en) * 2015-02-27 2018-01-02 Microsoft Technology Licensing, Llc Code analysis tool for recommending encryption of data without affecting program semantics
CN106293124A (zh) * 2016-08-05 2017-01-04 努比亚技术有限公司 输入法切换装置、终端及方法
US10114624B1 (en) * 2017-10-12 2018-10-30 Devfactory Fz-Llc Blackbox matching engine
CN110020140B (zh) * 2017-11-15 2023-02-21 腾讯科技(深圳)有限公司 推荐内容显示方法、装置及系统
US10990504B2 (en) * 2018-01-08 2021-04-27 Ozcode Ltd. Time travel source code debugger incorporating future prediction
CN109271038B (zh) * 2018-07-17 2023-06-27 努比亚技术有限公司 候选词推荐方法、终端及计算机可读存储介质
US11150875B2 (en) * 2018-09-27 2021-10-19 Microsoft Technology Licensing, Llc Automated content editor
CN109614103A (zh) * 2018-10-19 2019-04-12 北京硅心科技有限公司 一种基于字符的代码补全方法及系统
CN109739494B (zh) * 2018-12-10 2023-05-02 复旦大学 一种基于Tree-LSTM的API使用代码生成式推荐方法
CN109670022B (zh) * 2018-12-13 2023-09-29 南京航空航天大学 一种基于语义相似度的Java应用程序接口使用模式推荐方法

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130067435A1 (en) * 2011-09-08 2013-03-14 International Business Machines Corporation Method and apparatus for programming assistance
CN108388425A (zh) * 2018-03-20 2018-08-10 北京大学 一种基于lstm自动补全代码的方法
CN108595165A (zh) * 2018-04-25 2018-09-28 清华大学 一种基于代码中间表示的代码补全方法、装置及存储介质

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
陈梓瀚 (CHEN, ZIHAN): "开发自己的IDE (九) (Non-official translation: Develop Your Own IDE (9))", HTTP://WWW.CPPBLOG.COM/VCZH/ARCHIVE/2010/11/06/132654.HTML, 6 November 2010 (2010-11-06) *
陈梓瀚 (CHEN, ZIHAN): "开发自己的IDE (十) (Non-official translation: Develop Your Own IDE (10))", HTTP://WWW.CPPBLOG.COM/VCZH/ARCHIVE/2010/11/07/132876.HTML, 7 November 2020 (2020-11-07) *
陈梓瀚 (CHEN, ZIHAN): "开发自己的IDE (十二) (Non-official translation: Develop Your Own IDE (12))", HTTP://WWW.CPPBLOG.COM/VCZH/ARCHIVE/2010/12/05/135505.HTML, 5 December 2020 (2020-12-05) *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115756449A (zh) * 2022-12-02 2023-03-07 之江实验室 一种页面复用方法、装置、存储介质及电子设备

Also Published As

Publication number Publication date
CN112230781A (zh) 2021-01-15
CN112230781B (zh) 2023-07-25
US20210294432A1 (en) 2021-09-23
JP7236551B2 (ja) 2023-03-09
US11537213B2 (en) 2022-12-27
JP2022540736A (ja) 2022-09-20

Similar Documents

Publication Publication Date Title
CN107885533B (zh) 管理组件代码的方法及装置
CN110471858B (zh) 应用程序测试方法、装置及存储介质
CN110841285B (zh) 界面元素的显示方法、装置、计算机设备及存储介质
CN110377195B (zh) 展示交互功能的方法和装置
CN108132790B (zh) 检测无用代码的方法、装置及计算机存储介质
CN112116690B (zh) 视频特效生成方法、装置及终端
WO2022057435A1 (zh) 基于搜索的问答方法及存储介质
CN111949680A (zh) 数据处理方法、装置、计算机设备及存储介质
CN112000331A (zh) 页面渲染方法、装置、电子设备及存储介质
WO2022088765A1 (zh) 交互处理方法及计算机设备
WO2021008287A1 (zh) 字符推荐方法、装置、计算机设备及存储介质
CN111459466B (zh) 代码生成方法、装置、设备及存储介质
CN113742366A (zh) 数据处理方法、装置、计算机设备及存储介质
WO2020253129A1 (zh) 歌曲显示方法、装置、设备及存储介质
CN113469360B (zh) 推理方法及装置
CN113190307A (zh) 控件添加方法、装置、设备及存储介质
CN114168369A (zh) 日志显示方法、装置、设备及存储介质
CN111949341A (zh) 展示信息的方法、装置、设备及存储介质
CN111475611B (zh) 词典管理方法、装置、计算机设备及存储介质
CN112905328B (zh) 任务处理方法、装置及计算机可读存储介质
CN110569064B (zh) 接口标识生成方法、装置、设备及存储介质
CN111063372B (zh) 确定音高特征的方法、装置、设备及存储介质
CN116244299A (zh) 业务数据路径的确定方法、装置、电子设备及介质
CN111125095B (zh) 数据前缀添加的方法、装置、电子设备及介质
KR102488359B1 (ko) 어휘 데이터베이스를 처리하는 방법 및 장치

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20840509

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2021546226

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20840509

Country of ref document: EP

Kind code of ref document: A1