CN116340627A - Vocabulary recommendation method and device, electronic equipment and storage medium - Google Patents

Vocabulary recommendation method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN116340627A
CN116340627A CN202310288186.4A CN202310288186A CN116340627A CN 116340627 A CN116340627 A CN 116340627A CN 202310288186 A CN202310288186 A CN 202310288186A CN 116340627 A CN116340627 A CN 116340627A
Authority
CN
China
Prior art keywords
vocabulary
searched
dictionary
word list
value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310288186.4A
Other languages
Chinese (zh)
Inventor
徐双
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Pingan Payment Technology Service Co Ltd
Original Assignee
Pingan Payment Technology Service Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Pingan Payment Technology Service Co Ltd filed Critical Pingan Payment Technology Service Co Ltd
Priority to CN202310288186.4A priority Critical patent/CN116340627A/en
Publication of CN116340627A publication Critical patent/CN116340627A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9535Search customisation based on user profiles and personalisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/237Lexical tools
    • G06F40/242Dictionaries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • General Health & Medical Sciences (AREA)
  • Software Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application provides a vocabulary recommending method, a vocabulary recommending device, electronic equipment and a storage medium, wherein the vocabulary recommending method comprises the following steps: scanning the names of interfaces and interface annotation texts in a project package, and constructing a plurality of option dictionaries of the project package based on the names of the interfaces and the interface annotation texts; receiving a word to be searched in a to-be-developed project package in real time, and constructing a search request based on the name of the to-be-developed project package and the word to be searched; selecting a target dictionary from the option dictionary according to the search request, and performing fuzzy search from the target dictionary by utilizing the vocabulary to be searched to obtain an available word list; and calculating the similarity of the vocabulary to be searched and each value in the available word list, and pushing the available word list to a user according to the sequence from the big to the small of the similarity. The method can store the terms in the project development as a dictionary, so that the term standardization in the project development process can be improved.

Description

Vocabulary recommendation method and device, electronic equipment and storage medium
Technical Field
The application relates to the technical field of artificial intelligence, in particular to a vocabulary recommending method, a vocabulary recommending device, electronic equipment and a storage medium.
Background
In a large environment with more and more complex internet system architecture, in order to make the system function clear, a large system is often split into a plurality of subsystems which are respectively developed and maintained by different development group members, and different development groups often use different development naming specifications or even have no specifications, and even worse, developers with different English levels and developers who are not in need of the section also use pinyin from time to time.
Because of the compact configuration of functions between the system domains, resources are often shared or transferred, whether the system has a good interface to the inside and outside or annotations to certain interfaces or methods and units. The readability, link coherence, definition, etc. of the system interface are greatly reduced due to different naming standards, and communication cost is rapidly increased.
Disclosure of Invention
In view of the foregoing, it is necessary to provide a vocabulary recommendation method, apparatus, electronic device and storage medium, so as to solve the technical problem of how to improve the standardization of interface naming in the project development process.
The embodiment of the application provides a vocabulary recommending method, which comprises the following steps:
scanning names and interface annotation texts of a plurality of interfaces in a project package, and constructing a plurality of option dictionaries of the project package based on the names and interface annotation texts of the interfaces;
receiving a word to be searched in a to-be-developed project package in real time, and constructing a search request based on the name of the to-be-developed project package and the word to be searched;
selecting a target dictionary from the option dictionary according to the search request, and performing fuzzy search from the target dictionary by utilizing the vocabulary to be searched to obtain an available word list;
and calculating the similarity of the vocabulary to be searched and each value in the available word list, and pushing the available word list to a user according to the sequence from the big to the small of the similarity.
In some embodiments, the constructing a plurality of option dictionaries of the package of items based on the names of the interfaces and the interface annotation text comprises:
inputting the interface annotation text into a preset semantic classification model for all interfaces in each project package to obtain the semantic category of the interface annotation text;
taking the name of the interface as a key and the semantic category as a value to construct a key-value pair;
and for each item package, jointly storing key value pairs of all interfaces to be used as an option dictionary corresponding to the item package, and taking the name of the item package as an index of the option dictionary.
In some embodiments, the search request includes a request header for characterizing a name of the to-be-developed project package and a request message for recording the to-be-searched vocabulary.
In some embodiments, the selecting the target dictionary from the option dictionary according to the search request specifically includes:
and comparing the names of the to-be-developed project packages with the index of each option dictionary in sequence, and taking the option dictionary as a target dictionary if the names of the to-be-developed project packages are the same as the index of the option dictionary.
In some embodiments, the fuzzy search is performed from the target dictionary by using the vocabulary to be searched to obtain an available word list, which specifically includes:
the vocabulary to be searched comprises at least one text to be searched, each text to be searched is compared with each value in the target dictionary, and if the text to be searched exists in the value of the target dictionary, the key value pair corresponding to the value of the target dictionary is listed as an alternative key value pair;
and jointly storing all the candidate key value pairs to serve as an available word list of the words to be searched.
In some embodiments, the calculating the similarity between the vocabulary to be searched and each value in the available word list, and pushing the available word list to the user according to the order of the similarity from big to small specifically includes:
each value in the available word list comprises a plurality of texts, and for each value in the available word list, the text in the value, which is the same as the text to be detected, is recorded as a selected text;
taking the sum of the number of texts to be detected and the number of texts in the values as a reference value for each value in the available word list;
calculating the quotient of the number of the selected texts and the reference value to serve as the similarity between the vocabulary to be searched and the value;
and sorting all key value pairs in the available word list according to the sequence of the similarity from big to small, and pushing the sorted available word list to a user.
In some embodiments, after the obtaining the list of available words, the method further comprises:
and if the highest similarity in the available word list is lower than a preset similarity threshold, storing the word to be searched into the target dictionary to update the target dictionary.
The embodiment of the application also provides a vocabulary recommending device, which comprises:
a first construction unit, configured to scan names and interface annotation texts of a plurality of interfaces in a package, and construct a plurality of option dictionaries of the package based on the names of the interfaces and the interface annotation texts;
the second construction unit is used for receiving the vocabulary to be searched in the project package to be developed in real time, and constructing a search request based on the name of the project package to be developed and the vocabulary to be searched;
the retrieval unit is used for selecting a target dictionary from the option dictionary according to the retrieval request, and performing fuzzy retrieval from the target dictionary by utilizing the vocabulary to be retrieved to obtain an available word list;
and the recommending unit is used for calculating the similarity of each value in the vocabulary to be searched and the available word list, and pushing the available word list to the user according to the sequence from the high similarity to the low similarity.
The embodiment of the application also provides electronic equipment, which comprises:
a memory storing computer readable instructions; a kind of electronic device with high-pressure air-conditioning system
And a processor executing the computer readable instructions stored in the memory to implement the vocabulary recommending method.
Embodiments of the present application also provide a computer readable storage medium having computer readable instructions stored therein, the computer readable instructions being executed by a processor in an electronic device to implement the vocabulary recommendation method.
The vocabulary recommending method comprises the steps of constructing an option dictionary of a project package by scanning interface names and interface annotation texts in the project package, and receiving to-be-searched vocabularies in the project package to be developed in real time to construct a search request; selecting a target dictionary from the option dictionary according to the search request, carrying out fuzzy search from the target dictionary by utilizing the vocabulary to be searched to obtain an available word list, finally calculating the similarity of each value in the vocabulary to be searched and the available word list, pushing the available word list to a user according to the sequence from big to small of the similarity, storing standard terms in the mode of the option dictionary, and providing suggestions for the user, so that the standard degree of the words in the project development process can be improved.
Drawings
FIG. 1 is a flow chart of a preferred embodiment of a vocabulary recommendation method according to the present application.
Fig. 2 is a schematic diagram of a list of available words according to embodiments of the present application.
FIG. 3 is a schematic diagram comparing the list of available words with the ordered list of available words according to embodiments of the present application.
FIG. 4 is a functional block diagram of a preferred embodiment of the vocabulary recommending apparatus according to the present application.
Fig. 5 is a schematic structural diagram of an electronic device according to a preferred embodiment of the vocabulary recommending method according to the present application.
Detailed Description
In order that the objects, features and advantages of the present application may be more clearly understood, a more particular description of the invention will be rendered by reference to specific embodiments thereof which are illustrated in the appended drawings. It should be noted that, without conflict, the embodiments of the present application and features of the embodiments may be combined with each other. In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present application, the described embodiments are merely some, rather than all, of the embodiments of the present application.
Furthermore, the terms "first," "second," and the like, are used for descriptive purposes only and are not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include one or more of the described features. In the description of the present application, the meaning of "a plurality" is two or more, unless explicitly defined otherwise.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein in the description of the application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. The term "and/or" as used herein includes any and all combinations of one or more of the associated listed items.
The present embodiment provides a vocabulary recommending method, which can be applied to one or more electronic devices, wherein the electronic devices are devices capable of automatically performing numerical calculation and/or information processing according to preset or stored instructions, and the hardware of the electronic devices includes, but is not limited to, microprocessors, application specific integrated circuits (Application Specific Integrated Circuit, ASIC), programmable gate arrays (Field-Programmable Gate Array, FPGA), digital processors (Digital Signal Processor, DSP), embedded devices, and the like.
The electronic device may be any electronic product that can interact with a user in a human-computer manner, such as a personal computer, tablet computer, smart phone, personal digital assistant (Personal Digital Assistant, PDA), game console, interactive internet protocol television (Internet Protocol Television, IPTV), smart wearable device, etc.
The electronic device may also include a network device and/or a user device. Wherein the network device includes, but is not limited to, a single network server, a server group composed of a plurality of network servers, or a Cloud based Cloud Computing (Cloud Computing) composed of a large number of hosts or network servers.
The network in which the electronic device is located includes, but is not limited to, the internet, a wide area network, a metropolitan area network, a local area network, a virtual private network (Virtual Private Network, VPN), and the like.
FIG. 1 is a flow chart of a preferred embodiment of the vocabulary recommendation method of the present application. The order of the steps in the flowchart may be changed and some steps may be omitted according to various needs.
S10, names and interface annotation texts of a plurality of interfaces in a project package are scanned, and a plurality of option dictionaries of the project package are constructed based on the names of the interfaces and the interface annotation texts.
In an alternative embodiment, the constructing the option dictionary of the item package based on the interface name and the interface annotation text includes:
inputting the interface annotation text into a preset semantic classification model for all interfaces in each project package to obtain the semantic category of the interface annotation text;
taking the name of the interface as a key and the semantic category as a value to construct a key-value pair;
and for each item package, jointly storing key value pairs of all interfaces to be used as an option dictionary corresponding to the item package, and taking the name of the item package as an index of the option dictionary.
In this alternative embodiment, the packages refer to a set of multiple groups of programs in the system development process, each package is provided with at least one interface, and the interfaces refer to a set of codes with specific functions.
For each package, the names of all interfaces in the package can be queried, and the interface annotation text corresponding to each interface can be queried. Illustratively, when the program in a certain interface is: "@ PAFDoc (title=" query cost center through batch application line ", author=" XUSHUANG887", ver=" 20210428"", the name of the interface is PAFDoc, and the corresponding interface annotation text of the interface is query cost center through batch application line.
In this alternative embodiment, for each interface, the annotation text corresponding to the interface may be input into a pre-trained semantic detection model to obtain a semantic category corresponding to the interface, where the semantic category is used to characterize the output content of the interface.
In this alternative embodiment, the interface name may be used as a key, and the semantic category may be used as a value to construct a key-value pair corresponding to each of the interfaces. And for each item package, jointly storing key value pairs corresponding to all interfaces in the item package so as to obtain an option dictionary corresponding to each item package. And the names of the packages can be used as indexes of the option dictionary so as to facilitate the subsequent query of the corresponding option dictionary by using the names of the packages.
Thus, the option dictionary corresponding to each item package is constructed, and data support can be provided for subsequent retrieval of normative terms.
S11, receiving words to be searched in a to-be-developed project package in real time, and constructing a search request based on the names of the to-be-developed project package and the words to be searched.
In an alternative embodiment, the search request includes a request header and a request message, the request header is used for characterizing the name of the to-be-developed project package, and the request message is used for recording the to-be-searched vocabulary.
In this optional embodiment, the to-be-developed package refers to a package program edited by a user in a process of developing the package, and the to-be-retrieved vocabulary refers to a vocabulary selected by the user in the to-be-developed package, where the vocabulary is used to represent a semantic category corresponding to an interface to be written by the user, that is, content to be output by the interface to be written by the user.
Therefore, a search request is generated based on the names of the to-be-developed project packages and the to-be-searched words, and data support is provided for the word list corresponding to the to-be-searched words to be searched in the follow-up query, so that the word searching efficiency can be improved.
S12, selecting a target dictionary from the option dictionary according to the search request, and carrying out fuzzy search from the target dictionary by utilizing the vocabulary to be searched to obtain an available word list.
In an optional embodiment, the selecting the target dictionary from the option dictionary according to the search request specifically includes:
sequentially comparing the names of the to-be-developed project packages with the index of each option dictionary, taking the option dictionary as a target dictionary if the names of the to-be-developed project packages are the same as the index of the option dictionary, and ending the comparison;
in an optional embodiment, if the names of the to-be-developed project packages are different from the indexes of all the option dictionaries, the names of all the interfaces in the to-be-developed project packages and the interface annotation text of each interface are scanned to construct the option dictionary corresponding to the to-be-developed project packages.
For example, when the index of the to-be-developed package is "package a", and the indexes of all the option dictionaries are "package a", "package B", "package C", and "package D", respectively, the option dictionary with the index of "package a" may be used as the target dictionary, and then vocabulary searching may be performed according to the option dictionary corresponding to the package a.
In this optional embodiment, if the names of the to-be-developed project packages are different from the indexes of all the option dictionaries, it indicates that the interfaces in the to-be-developed project packages are not scanned and the option dictionary corresponding to the to-be-developed project packages is not established, so that the option dictionary of the to-be-developed project packages can be constructed according to the names of all the interfaces in the to-be-developed project packages and the interface annotation text of each interface, and the names of the to-be-developed project packages are used as the indexes of the corresponding option dictionaries.
In an optional embodiment, the fuzzy search is performed from the target dictionary by using the vocabulary to be searched to obtain a usable word list, which specifically includes:
the vocabulary to be searched comprises at least one text to be searched, each text to be searched is compared with each value in the target dictionary, and if the text to be searched exists in the value of the target dictionary, the key value pair corresponding to the value of the target dictionary is listed as an alternative key value pair;
and jointly storing all the candidate key value pairs to serve as an available word list of the words to be searched.
In this alternative embodiment, the vocabulary to be searched includes at least one text to be searched, and, for example, when the vocabulary to be searched is "professional company", the vocabulary to be searched includes four texts to be searched, and the texts are respectively "private", "industrial", "public" and "department".
And if any text to be searched in the vocabulary to be searched exists in the value of the target dictionary, taking the key value pair corresponding to the value as an alternative key value pair. For example, when the text to be retrieved is "private", "business", "public" and "driver", and the values in the target dictionary include "private", "company", "private company", "contact" and "private company contact", the candidate key value pairs include key value pairs corresponding to "private", "company", "private company" and "private company contact", respectively.
In this alternative embodiment, all the candidate key-value pairs may be jointly stored as a list of available words of the vocabulary to be retrieved, and fig. 2 shows a schematic diagram of the list of available words when the vocabulary to be retrieved is a "professional company".
In this way, by inquiring candidate key value pairs corresponding to the to-be-searched vocabulary from all option dictionaries through the names of the to-be-developed project packages and the to-be-searched vocabulary, and jointly storing all the candidate key value pairs to obtain an available word list, data support can be provided for the interface naming suggestion provided for the user.
S13, calculating the similarity of the vocabulary to be searched and each value in the available word list, and pushing the available word list to a user according to the sequence from the high similarity to the low similarity.
In an optional embodiment, the calculating the similarity between the vocabulary to be searched and each value in the available word list, and pushing the available word list to the user according to the order of the similarity from high to low specifically includes:
each value in the available word list comprises a plurality of texts, and for each value in the available word list, the text in the value, which is the same as the text to be detected, is recorded as a selected text;
taking the sum of the number of texts to be detected and the number of texts in the values as a reference value for each value in the available word list;
calculating the quotient of the number of the selected texts and the reference value to serve as the similarity between the vocabulary to be searched and the value;
and sorting all key value pairs in the available word list according to the sequence of the similarity from big to small, and pushing the sorted available word list to a user.
In this alternative embodiment, the value in the available list vocabulary is at least one vocabulary, including at least one text. And regarding each value in the available word list, taking the text which is the same as the text to be searched in a plurality of texts as a selected text, and taking the sum of the value and the number of all the texts in the vocabulary to be detected as a reference value. The quotient of the number of the selected texts and the reference value can be further calculated to serve as the similarity of the vocabulary to be searched and the value.
For example, when the vocabulary to be detected includes four texts to be detected and is "private", "business", "public" and "span", the texts of the values in the available word list are "professional company contacts", the number of the selected texts is 4, and the total number of texts is 11, the similarity is 4/11.
In this optional embodiment, the greater the similarity between the value in the available word list and the vocabulary to be detected, the more similar the value is to the vocabulary to be detected, the available word list may be ordered according to the order of the similarity from high to low, and the ordered available word list may be pushed to the user, so as to ensure that the user may conveniently select the available vocabulary with high similarity to the vocabulary to be searched.
FIG. 3 shows a schematic diagram of a comparison of the list of available words and the ordered list of available words.
In an alternative embodiment, after the obtaining the list of available words, the method further includes:
and if the highest similarity in the available word list is lower than a preset similarity threshold, storing the word to be searched into the target dictionary to update the target dictionary.
In this optional embodiment, when the highest similarity in the available word list is lower than a preset similarity threshold, it indicates that all words in the available word list have low similarity to the word to be searched, so that the word to be searched may be stored in the target word list to update the target word list.
Therefore, the target dictionary is continuously updated in the process of developing the project, so that the content contained in the option dictionary can be continuously expanded, the richness of the option dictionary can be improved, and the standard degree of interface naming in the process of developing the project is improved.
The artificial intelligence-based vocabulary recommending method constructs an option dictionary of the project package by scanning interface names and interface annotation texts in the project package, and receives the vocabulary to be searched in the project package to be developed in real time so as to construct a search request; selecting a target dictionary from the option dictionary according to the search request, carrying out fuzzy search from the target dictionary by utilizing the vocabulary to be searched to obtain an available word list, finally calculating the similarity of each value in the vocabulary to be searched and the available word list, pushing the available word list to a user according to the sequence from big to small of the similarity, storing standard terms in the mode of the option dictionary, and providing suggestions for the user, so that the standard degree of the words in the project development process can be improved.
Fig. 4 is a functional block diagram of a preferred embodiment of the vocabulary recommending apparatus according to the embodiment of the present application. The vocabulary recommending apparatus 11 includes a first constructing unit 110, a second constructing unit 111, a retrieving unit 112, and a recommending unit 113. The module/unit referred to in this application refers to a series of computer program segments capable of being executed by the processor 13 and of performing fixed functions, which are stored in the memory 12. In the present embodiment, the functions of the respective modules/units will be described in detail in the following embodiments.
The first construction unit 110 is configured to scan names and interface annotation texts of a plurality of interfaces in a package, and construct a plurality of option dictionaries of the package based on the names of the interfaces and the interface annotation texts.
The second construction unit 111 is configured to receive, in real time, a word to be searched in a package of items to be developed, and construct a search request based on a name of the package of items to be developed and the word to be searched.
The retrieving unit 112 is configured to select a target dictionary from the option dictionary according to the retrieval request, and perform fuzzy retrieval from the target dictionary by using the vocabulary to be retrieved to obtain an available word list.
The recommending unit 113 is configured to calculate a similarity between the vocabulary to be searched and each value in the available word list, and push the available word list to a user according to the order of the similarity from high to low.
In an alternative embodiment, the first construction unit 110 is specifically configured to:
inputting the interface annotation text into a preset semantic classification model for all interfaces in each project package to obtain the semantic category of the interface annotation text;
taking the name of the interface as a key and the semantic category as a value to construct a key-value pair;
and for each item package, jointly storing key value pairs of all interfaces to be used as an option dictionary corresponding to the item package, and taking the name of the item package as an index of the option dictionary.
In an alternative embodiment, the retrieving unit 112 is specifically configured to:
and comparing the names of the to-be-developed project packages with the index of each option dictionary in sequence, and taking the option dictionary as a target dictionary if the names of the to-be-developed project packages are the same as the index of the option dictionary.
In an alternative embodiment, the retrieving unit 112 is further configured to:
the vocabulary to be searched comprises at least one text to be searched, each text to be searched is compared with each value in the target dictionary, and if the text to be searched exists in the value of the target dictionary, the key value pair corresponding to the value of the target dictionary is listed as an alternative key value pair;
and jointly storing all the candidate key value pairs to serve as an available word list of the words to be searched.
In an alternative embodiment, the recommendation unit 113 is specifically configured to:
each value in the available word list comprises a plurality of texts, and for each value in the available word list, the text in the value, which is the same as the text to be detected, is recorded as a selected text;
taking the sum of the number of texts to be detected and the number of texts in the values as a reference value for each value in the available word list;
calculating the quotient of the number of the selected texts and the reference value to serve as the similarity between the vocabulary to be searched and the value;
and sorting all key value pairs in the available word list according to the sequence of the similarity from big to small, and pushing the sorted available word list to a user.
In an alternative embodiment, after the obtaining the list of available words, the recommending unit 113 is further configured to:
and if the highest similarity in the available word list is lower than a preset similarity threshold, storing the word to be searched into the target dictionary to update the target dictionary.
Fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present application. The electronic device 1 comprises a memory 12 and a processor 13. The memory 12 is used for storing computer readable instructions, and the processor 13 implements the vocabulary recommendation method of any of the above embodiments by executing the computer readable instructions stored in the memory.
In an alternative embodiment, the electronic device 1 further comprises a bus, a computer program stored in the memory 12 and executable on the processor 13, such as a vocabulary recommender.
Fig. 5 shows only an electronic device 1 with a memory 12 and a processor 13, it being understood by a person skilled in the art that the structure shown in fig. 5 does not constitute a limitation of the electronic device 1, and may comprise fewer or more components than shown, or may combine certain components, or a different arrangement of components.
In connection with fig. 1, the memory 12 in the electronic device 1 stores a plurality of computer readable instructions to implement a vocabulary recommendation method, the processor 13 may execute the plurality of instructions to implement:
scanning names and interface annotation texts of a plurality of interfaces in a project package, and constructing a plurality of option dictionaries of the project package based on the names and interface annotation texts of the interfaces;
receiving a word to be searched in a to-be-developed project package in real time, and constructing a search request based on the name of the to-be-developed project package and the word to be searched;
selecting a target dictionary from the option dictionary according to the search request, and performing fuzzy search from the target dictionary by utilizing the vocabulary to be searched to obtain an available word list;
and calculating the similarity of the vocabulary to be searched and each value in the available word list, and pushing the available word list to a user according to the sequence from the big to the small of the similarity.
Specifically, the specific implementation method of the above instructions by the processor 13 may refer to the description of the relevant steps in the corresponding embodiment of fig. 1, which is not repeated herein.
It will be appreciated by those skilled in the art that the schematic diagram is merely an example of the electronic device 1 and does not constitute a limitation of the electronic device 1, the electronic device 1 may be a bus type structure, a star type structure, the electronic device 1 may further comprise more or less other hardware or software than illustrated, or a different arrangement of components, e.g. the electronic device 1 may further comprise an input-output device, a network access device, etc.
It should be noted that the electronic device 1 is only used as an example, and other electronic products that may be present in the present application or may be present in the future are also included in the scope of the present application and are incorporated herein by reference.
The memory 12 includes at least one type of readable storage medium, which may be non-volatile or volatile. The readable storage medium includes flash memory, a removable hard disk, a multimedia card, a card type memory (e.g., SD or DX memory, etc.), a magnetic memory, a magnetic disk, an optical disk, etc. The memory 12 may in some embodiments be an internal storage unit of the electronic device 1, such as a mobile hard disk of the electronic device 1. The memory 12 may in other embodiments also be an external storage device of the electronic device 1, such as a plug-in mobile hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card) or the like, which are provided on the electronic device 1. Further, the memory 12 may also include both an internal storage unit and an external storage device of the electronic device 1. The memory 12 may be used not only for storing application software installed in the electronic device 1 and various types of data, such as codes of vocabulary recommended programs, etc., but also for temporarily storing data that has been output or is to be output.
The processor 13 may be comprised of integrated circuits in some embodiments, for example, a single packaged integrated circuit, or may be comprised of multiple integrated circuits packaged with the same or different functions, including one or more central processing units (Central Processing unit, CPU), microprocessors, digital processing chips, graphics processors, a combination of various control chips, and the like. The processor 13 is a Control Unit (Control Unit) of the electronic device 1, connects the respective components of the entire electronic device 1 using various interfaces and lines, executes programs or modules stored in the memory 12 (for example, executes a vocabulary recommended program or the like), and invokes data stored in the memory 12 to perform various functions of the electronic device 1 and process data.
The processor 13 executes an operating system of the electronic device 1 and various types of applications installed. The processor 13 executes the application program to implement the steps of the various vocabulary recommendation method embodiments described above, such as the steps shown in fig. 1.
The computer program may be divided into one or more modules/units, which are stored in the memory 12 and executed by the processor 13 to complete the present application, for example. The one or more modules/units may be a series of computer readable instruction segments capable of performing the specified functions, which instruction segments describe the execution of the computer program in the electronic device 1. For example, the computer program may be divided into a first construction unit 110, a second construction unit 111, a retrieval unit 112, a recommendation unit 113.
The integrated units implemented in the form of software functional modules described above may be stored in a computer readable storage medium. The software functional modules described above are stored in a storage medium and include instructions for causing a computer device (which may be a personal computer, a computer device, or a network device, etc.) or a processor (processor) to perform portions of the vocabulary recommendation methods described in various embodiments of the present application.
The integrated modules/units of the electronic device 1 may be stored in a computer readable storage medium if implemented in the form of software functional units and sold or used as a stand alone product. Based on such understanding, the present application may implement all or part of the flow of the method of the above embodiment, or may be implemented by instructing the relevant hardware device by a computer program, where the computer program may be stored in a computer readable storage medium, and the computer program may implement the steps of each method embodiment described above when executed by a processor.
Wherein the computer program comprises computer program code which may be in source code form, object code form, executable file or some intermediate form etc. The computer readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer Memory, a Read-Only Memory (ROM), a random access Memory, other memories, and the like.
Further, the computer-readable storage medium may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function, and the like; the storage data area may store data created from the use of blockchain nodes, and the like.
The bus may be a peripheral component interconnect standard (Peripheral Component Interconnect, PCI) bus or an extended industry standard architecture (Extended Industry Standard Architecture, EISA) bus, among others. The bus may be classified as an address bus, a data bus, a control bus, etc. For ease of illustration, only one arrow is shown in FIG. 5, but only one bus or one type of bus is not shown. The bus is arranged to enable a connection communication between the memory 12 and the at least one processor 13 etc.
The present application further provides a computer readable storage medium (not shown), where computer readable instructions are stored, where the computer readable instructions are executed by a processor in an electronic device to implement the vocabulary recommendation method according to any one of the foregoing embodiments.
Furthermore, it is evident that the word "comprising" does not exclude other elements or steps, and that the singular does not exclude a plurality. Several of the elements or devices described in the specification may be embodied by one and the same item of software or hardware. The terms first, second, etc. are used to denote a name, but not any particular order.
Finally, it should be noted that the above embodiments are merely for illustrating the technical solution of the present application and not for limiting, and although the present application has been described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that the technical solution of the present application may be modified or substituted without departing from the spirit and scope of the technical solution of the present application.

Claims (10)

1. A vocabulary recommendation method, the method comprising:
scanning names and interface annotation texts of a plurality of interfaces in a project package, and constructing a plurality of option dictionaries of the project package based on the names and interface annotation texts of the interfaces;
receiving a word to be searched in a to-be-developed project package in real time, and constructing a search request based on the name of the to-be-developed project package and the word to be searched;
selecting a target dictionary from the option dictionary according to the search request, and performing fuzzy search from the target dictionary by utilizing the vocabulary to be searched to obtain an available word list;
and calculating the similarity of the vocabulary to be searched and each value in the available word list, and pushing the available word list to a user according to the sequence from the big to the small of the similarity.
2. The vocabulary recommending method of claim 1 wherein constructing a plurality of option dictionaries of the package based on the names of the interfaces and the interface annotation text comprises:
inputting the interface annotation text into a preset semantic classification model for all interfaces in each project package to obtain the semantic category of the interface annotation text;
taking the name of the interface as a key and the semantic category as a value to construct a key-value pair;
and for each item package, jointly storing key value pairs of all interfaces to be used as an option dictionary corresponding to the item package, and taking the name of the item package as an index of the option dictionary.
3. The vocabulary recommending method of claim 1 wherein the retrieving request comprises a request header for characterizing the name of the package of items to be developed and a request message for recording the vocabulary to be retrieved.
4. The vocabulary recommending method of claim 1 wherein selecting the target dictionary from the option dictionary based on the retrieval request comprises:
and comparing the names of the to-be-developed project packages with the index of each option dictionary in sequence, and taking the option dictionary as a target dictionary if the names of the to-be-developed project packages are the same as the index of the option dictionary.
5. The vocabulary recommending method according to claim 1, wherein the performing fuzzy search from the target dictionary using the vocabulary to be searched to obtain the available word list specifically comprises:
the vocabulary to be searched comprises at least one text to be searched, each text to be searched is compared with each value in the target dictionary, and if the text to be searched exists in the value of the target dictionary, the key value pair corresponding to the value of the target dictionary is listed as an alternative key value pair;
and jointly storing all the candidate key value pairs to serve as an available word list of the words to be searched.
6. The vocabulary recommending method according to claim 1, wherein the calculating the similarity between the vocabulary to be searched and each value in the available word list and pushing the available word list to the user according to the order of the similarity from the higher to the lower comprises:
each value in the available word list comprises a plurality of texts, and for each value in the available word list, the text in the value, which is the same as the text to be detected, is recorded as a selected text;
taking the sum of the number of texts to be detected and the number of texts in the values as a reference value for each value in the available word list;
calculating the quotient of the number of the selected texts and the reference value to serve as the similarity between the vocabulary to be searched and the value;
and sorting all key value pairs in the available word list according to the sequence of the similarity from big to small, and pushing the sorted available word list to a user.
7. The vocabulary recommendation method of claim 1 wherein after the obtaining the list of available words, the method further comprises:
and if the highest similarity in the available word list is lower than a preset similarity threshold, storing the word to be searched into the target dictionary to update the target dictionary.
8. A vocabulary recommending apparatus, the apparatus comprising:
a first construction unit, configured to scan names and interface annotation texts of a plurality of interfaces in a package, and construct a plurality of option dictionaries of the package based on the names of the interfaces and the interface annotation texts;
the second construction unit is used for receiving the vocabulary to be searched in the project package to be developed in real time, and constructing a search request based on the name of the project package to be developed and the vocabulary to be searched;
the retrieval unit is used for selecting a target dictionary from the option dictionary according to the retrieval request, and performing fuzzy retrieval from the target dictionary by utilizing the vocabulary to be retrieved to obtain an available word list;
and the recommending unit is used for calculating the similarity of each value in the vocabulary to be searched and the available word list, and pushing the available word list to the user according to the sequence from the high similarity to the low similarity.
9. An electronic device, the electronic device comprising:
a memory storing computer readable instructions; a kind of electronic device with high-pressure air-conditioning system
A processor executing computer readable instructions stored in the memory to implement the vocabulary recommendation method of any one of claims 1 to 7.
10. A computer-readable storage medium, characterized by: the computer readable storage medium has stored therein computer readable instructions that are executed by a processor in an electronic device to implement the vocabulary recommendation method of any one of claims 1 to 7.
CN202310288186.4A 2023-03-15 2023-03-15 Vocabulary recommendation method and device, electronic equipment and storage medium Pending CN116340627A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310288186.4A CN116340627A (en) 2023-03-15 2023-03-15 Vocabulary recommendation method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310288186.4A CN116340627A (en) 2023-03-15 2023-03-15 Vocabulary recommendation method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116340627A true CN116340627A (en) 2023-06-27

Family

ID=86880140

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310288186.4A Pending CN116340627A (en) 2023-03-15 2023-03-15 Vocabulary recommendation method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116340627A (en)

Similar Documents

Publication Publication Date Title
CN110647614B (en) Intelligent question-answering method, device, medium and electronic equipment
CN107256267B (en) Query method and device
CN106844341B (en) Artificial intelligence-based news abstract extraction method and device
CN111898643B (en) Semantic matching method and device
CN111566654A (en) Machine learning integrating knowledge and natural language processing
JP7451747B2 (en) Methods, devices, equipment and computer readable storage media for searching content
CN113204621B (en) Document warehouse-in and document retrieval method, device, equipment and storage medium
US10083398B2 (en) Framework for annotated-text search using indexed parallel fields
US11874798B2 (en) Smart dataset collection system
US9690862B2 (en) Realtime ingestion via multi-corpus knowledge base with weighting
CN112988784B (en) Data query method, query statement generation method and device
CN112100396A (en) Data processing method and device
CN112148701A (en) File retrieval method and equipment
CN116882372A (en) Text generation method, device, electronic equipment and storage medium
US20120059786A1 (en) Method and an apparatus for matching data network resources
Song et al. Semi-automatic construction of a named entity dictionary for entity-based sentiment analysis in social media
US9720910B2 (en) Using business process model to create machine translation dictionaries
CN110929526A (en) Sample generation method and device and electronic equipment
CN113591881B (en) Intention recognition method and device based on model fusion, electronic equipment and medium
US10255349B2 (en) Requesting enrichment for document corpora
CN116340627A (en) Vocabulary recommendation method and device, electronic equipment and storage medium
CN111368036B (en) Method and device for searching information
CN114780712A (en) Quality evaluation-based news topic generation method and device
US11379669B2 (en) Identifying ambiguity in semantic resources
CN109815312B (en) Document query method and device, computing equipment and computer storage medium

Legal Events

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