IP Library Granted Patent US 10,678,514
Granted Patent B2
US 10,678,514 · App. 16/143,988 · Granted Jun 9, 2020

Method and device for generating code assistance information

Inventors: Ming Xue (Hangzhou, CN); Jinpeng Wu (Hangzhou, CN); Zhenyu Hou (Hangzhou, CN)
Assignee: Alibaba Group Holding Limited
G06F8/33G06F9/44
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 10,678,514
App. No.
16/143,988
Granted
Jun 9, 2020
Kind
B2
Abstract

A method for generating code assistance information comprises: obtaining input status information corresponding to a program development process, wherein the input status information comprises input content information and input language environment information; obtaining a preset grammar rule corresponding to the input status information, wherein the preset grammar rule stores an association relationship between different statement information, and different input status information corresponds to different preset grammar rules; and generating code assistance information corresponding to the input content information according to the input content information and the preset grammar rule corresponding to the input status information.

Claims (77)

1. A method for generating code assistance information, comprising:

obtaining input status information corresponding to a program development process, wherein the input status information comprises input content information and input language environment information;

obtaining a preset grammar rule corresponding to the input status information, wherein the preset grammar rule stores an association relationship between different statement information, and different input status information corresponds to different preset grammar rules;

obtaining a transform rule between different statement information based on the preset grammar rule;

generating a follow-up symbol set corresponding to subsequent input content information corresponding to the input content information according to the input content information and the transform rule, wherein the follow-up symbol set comprises a grammar production set of the transform rule, a non-terminator set corresponding to the grammar production, and an initial terminator set corresponding to the grammar production;

associating a grammar expansion corresponding to a non-terminator in the non-terminator set with a grammar expansion of an initial terminator in the initial terminator set; and

generating code assistance information corresponding to the input content information according to the associated result of the grammar expansion corresponding to the non-terminator with the grammar expansion of the initial terminator.

2. The method according to claim 1 , further comprising:

after the generating code assistance information corresponding to the input content information, outputting the code assistance information.

3. The method according to claim 2 , further comprising:

after the outputting the code assistance information,

receiving an information choosing instruction corresponding to the code assistance information, wherein the information choosing instruction indicates chosen data from the code assistance information; and

updating the input content information according to the chosen data.

4. The method according to claim 3 , further comprising:

after the updating the input content information according to the chosen data,

storing the chosen data into the historical input status information.

5. The method according to claim 1 , further comprising:

after the obtaining a preset grammar rule corresponding to the input status information,

detecting whether the input content information comprises preset information, wherein the preset information is special separation character information; and

if the input content information comprises the preset information, performing the obtaining a preset grammar rule corresponding to the input status information.

6. The method according to claim 1 , wherein the obtaining a transform rule between different statement information based on the preset grammar rule comprises:

obtaining a finite state machine corresponding to the preset grammar rule, wherein the finite state machine stores a transform rule between different statement information.

7. The method according to claim 1 , wherein:

the associating a grammar expansion corresponding to a non-terminator in the non-terminator set with a grammar expansion of an initial terminator in the initial terminator set comprises:

when the grammar expansion corresponding to the non-terminator is equal to the grammar expansion of the initial terminator, determining the grammar expansion of the initial terminator as assistance candidate information of the subsequent input content information; and

the generating the code assistance information corresponding to the input content information comprises:

determining the initial terminator and the assistance candidate information as the code assistance information corresponding to the input content information.

8. The method according to claim 7 , further comprising:

before the determining the initial terminator and the assistance candidate information as the code assistance information corresponding to the input content information:

obtaining historical input status information corresponding to the input status information; and

sorting the initial terminator and the assistance candidate information according to the historical input status information; and wherein:

the determining the initial terminator and the assistance candidate information as the code assistance information corresponding to the input content information comprises:

determining the sorted initial terminator and assistance candidate information as the code assistance information corresponding to the input content information.

9. The method according to claim 1 , further comprising: before the associating a grammar expansion corresponding to a non-terminator in the non-terminator set with a grammar expansion of an initial terminator in the initial terminator set, obtaining a grammar production corresponding to the non-terminator and corresponding to the initial terminator in the initial terminator set; and

determining, as the grammar expansion corresponding to the non-terminator, a result obtained after all non-terminators in the grammar production are cyclically expanded until the all non-terminators are eliminated.

10. A device for generating code assistance information, comprising one or more processors and one or more non-transitory computer-readable storage media storing instructions that, when executed by the processors, cause the one or more processors to perform operations comprising:

obtaining input status information corresponding to a program development process, wherein the input status information comprises input content information and input language environment information;

obtaining a preset grammar rule corresponding to the input status information, wherein the preset grammar rule stores an association relationship between different statement information, and different input status information corresponds to different preset grammar rules;

obtaining a transform rule between different statement information based on the preset grammar rule;

generating a follow-up symbol set corresponding to subsequent input content information corresponding to the input content information according to the input content information and the transform rule, wherein the follow-up symbol set comprises a grammar production set of the transform rule, a non-terminator set corresponding to the grammar production, and an initial terminator set corresponding to the grammar production;

associating a grammar expansion corresponding to a non-terminator in the non-terminator set with a grammar expansion of an initial terminator in the initial terminator set; and

generating code assistance information corresponding to the associated result of the grammar expansion corresponding to the non-terminator with the grammar expansion of the initial terminator.

11. The device according to claim 10 , wherein the instructions further cause the one or more processors to perform:

after the generating code assistance information corresponding to the input content information, outputting the code assistance information.

12. The device according to claim 11 , wherein the instructions further cause the one or more processors to perform:

after the outputting the code assistance information, receiving an information choosing instruction corresponding to the code assistance information, wherein the information choosing instruction is used to instruct to choose information from the code assistance information; and

updating the input content information according to the chosen information.

13. The device according to claim 12 , wherein the instructions further cause the one or more processors to perform:

after the updating the input content information according to the chosen information, storing the information into historical input status information.

14. The device according to claim 10 , wherein the instructions further cause the one or more processors to perform:

after the obtaining a preset grammar rule corresponding to the input status information,

detecting whether the input content information comprises preset information, wherein the preset information is special separation character information; and

if the input content information comprises the preset information, performing the obtaining a preset grammar rule corresponding to the input status information.

15. The device according to claim 10 , wherein the obtaining a transform rule between different statement information based on the preset grammar rule comprises:

obtaining a finite state machine corresponding to the preset grammar rule, wherein the finite state machine stores a transform rule between different statement information.

16. The device according to claim 10 , wherein the associating a grammar expansion corresponding to a non-terminator in the non-terminator set with another grammar expansion of an initial terminator in the initial terminator set comprises:

when the grammar expansion corresponding to the non-terminator is equal to the grammar expansion of the initial terminator, determining the grammar expansion of the initial terminator as assistance candidate information of the subsequent input content information; and

the generating the code assistance information corresponding to the input content information comprises:

determining the initial terminator and the assistance candidate information as the code assistance information corresponding to the input content information.

17. The device according to claim 16 , wherein the instructions further cause the one or more processors to perform:

before the determining the initial terminator and the assistance candidate information as the code assistance information corresponding to the input content information,

obtaining historical input status information corresponding to the input status information; and

sorting the initial terminator and the assistance candidate information according to the historical input status information; and wherein:

the determining the initial terminator and the assistance candidate information as the code assistance information corresponding to the input content information comprises:

determining the sorted initial terminator and assistance candidate information as the code assistance information corresponding to the input content information.

18. The device according to claim 10 , wherein the instructions further cause the one or more processors to perform:

before the associating a grammar expansion corresponding to a non-terminator in the non-terminator set with another grammar expansion of an initial terminator in the initial terminator set, obtaining a grammar production corresponding to the non-terminator and corresponding to the initial terminator in the initial terminator set; and

determining, as the grammar expansion corresponding to the non-terminator, a result obtained after all non-terminators in the grammar production are cyclically expanded until the all non-terminators are eliminated.

19. A non-transitory computer-readable storage medium storing instructions that, when executed by one or more processors, cause the processors to perform operations comprising:

obtaining input status information corresponding to a program development process, wherein the input status information comprises input content information and input language environment information;

obtaining a preset grammar rule corresponding to the input status information, wherein the preset grammar rule stores an association relationship between different statement information, and different input status information corresponds to different preset grammar rules;

obtaining a transform rule between different statement information based on the preset grammar rule;

generating a follow-up symbol set corresponding to subsequent input content information corresponding to the input content information according to the input content information and the transform rule, wherein the follow-up symbol set comprises a grammar production set of the transform rule, a non-terminator set corresponding to the grammar production, and an initial terminator set corresponding to the grammar production;

associating a grammar expansion corresponding to a non-terminator in the non-terminator set with a grammar expansion of an initial terminator in the initial terminator set; and

generating code assistance information corresponding to the input content information according to the associated result of the grammar expansion corresponding to the non-terminator with the grammar expansion of the initial terminator.

20. The storage medium according to claim 19 , wherein the obtaining a transform rule between different statement information based on the preset grammar rule comprises:

obtaining a finite state machine corresponding to the preset grammar rule, wherein the finite state machine stores a transform rule between different statement information.

Assignments (2)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 29, 2026
From: ALIBABA GROUP HOLDING LIMITED
To: CLOUD INTELLIGENCE ASSETS HOLDING (SINGAPORE) PRIVATE LIMITED
Reel/Frame 075499/0384 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jul 1, 2020
From: XUE, MING; WU, JINPENG; HOU, ZHENYU
To: ALIBABA GROUP HOLDING LIMITED
Reel/Frame 053855/0231 →
Priority Claims (1)
CN 2016 1 0183039 · Mar 28, 2016 · national
Continuity (2)
Continuation PCTCN2017077252 · Mar 20, 2017
Related Publication 20190026081A1 · Jan 24, 2019