Rapid retrieval method and device for dynamic interface document, equipment and medium
Through vectorization and storage dynamic interface documents, the problem of low retrieval efficiency of dynamic interface documents and unable to automatically generate code examples, realize fast and accurate search and code reference provision, and improve development efficiency.
Patent Information
- Application Number
- CN202411138375.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-19
- Publication Date
- 2025-01-24
AI Technical Summary
As the content of interface documents increases and becomes more complex, developers' efficiency decreases significantly when searching dynamic interface documents, and they cannot automatically generate code examples, limiting developers' ability to understand and apply interface information.
By importing a dynamic interface document, conducting vectorization and stored in the vector database, responding to the content retrieval request, and determining and feeding the target retrieval content and code examples.
Realize the rapid and accurate retrieval of dynamic interface documents, and provide code reference for developers, which improves the understanding and development efficiency of dynamic interfaces.
Smart Images

Figure CN119357181A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of Internet technology, and specifically relates to a method, device, equipment and medium for quickly retrieving dynamic interface documents. Background Art
[0002] An interface is a connection point between two independent systems or components, used to achieve interaction and data exchange between them. A dynamic interface is a programming method in which the definition and behavior of an interface can be dynamically changed when the program is running. By writing interface documentation for dynamic interfaces, developers can understand and use dynamic interfaces more conveniently and better.
[0003] However, as the content of interface documents continues to increase and become more complex, the efficiency of developers manually retrieving these documents has significantly decreased, which is not only time-consuming and laborious, but also easily leads to the omission of key information. In addition, traditional methods cannot automatically generate the required code examples for developers, which greatly limits their ability to understand and apply interface information, and it is difficult to meet the current efficient and accurate development needs. Therefore, how to achieve rapid retrieval of dynamic interface documents and provide corresponding code examples is a problem that people in this field urgently need to solve. Summary of the invention
[0004] The embodiments of the present application provide a method, apparatus, device and medium for quickly retrieving a dynamic interface document, the purpose of which is to quickly and accurately retrieve the text content of the dynamic interface document and provide code references for developers, thereby improving developers' understanding of the dynamic interface and development efficiency.
[0005] In a first aspect, an embodiment of the present application provides a method for quickly retrieving a dynamic interface document, the method comprising:
[0006] In response to the document import request, import the dynamic interface document;
[0007] Vectorizing the dynamic interface document and storing it in a vector database;
[0008] In response to a content retrieval request, determining target retrieval content and a target code example according to the content retrieval request;
[0009] Feedback the target search content and the target code example.
[0010] In a second aspect, an embodiment of the present application provides a fast retrieval device for a dynamic interface document, the device comprising:
[0011] A document import module, used to import a dynamic interface document in response to a document import request;
[0012] A document processing and storage module, used for vectorizing the dynamic interface document and storing it in a vector database;
[0013] A content retrieval module, configured to respond to a content retrieval request and determine a target retrieval content and a target code example according to the content retrieval request;
[0014] The content feedback module is used to feedback the target search content and the target code example.
[0015] In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the method described in the first aspect.
[0016] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.
[0017] In a fifth aspect, an embodiment of the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the method described in the first aspect.
[0018] In an embodiment of the present application, in response to a document import request, a dynamic interface document is imported; the dynamic interface document is vectorized and stored in a vector database; in response to a content retrieval request, a target retrieval content and a target code example are determined according to the content retrieval request; and the target retrieval content and the target code example are fed back. The above-mentioned method for rapid retrieval of dynamic interface documents, by vectorizing the dynamic interface document and storing it in a vector database, and feeding back the target retrieval content and the target code example according to the content retrieval request, can quickly and accurately retrieve the text content of the dynamic interface document, and provide code references for developers, thereby improving developers' understanding of the dynamic interface and development efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 It is a flowchart of a method for quickly retrieving dynamic interface documents provided in Example 1 of the present application;
[0020] Figure 2 This is a scene example diagram of the method for quickly retrieving dynamic interface documents provided in Example 1 of the present application;
[0021] Figure 3 This is a scene example diagram of the method for quickly retrieving dynamic interface documents provided in Example 1 of the present application;
[0022] Figure 4 This is a scene example diagram of the method for quickly retrieving dynamic interface documents provided in Example 1 of the present application;
[0023] Figure 5 It is a flowchart of a method for quickly retrieving dynamic interface documents provided in Example 2 of the present application;
[0024] Figure 6 It is a flowchart of a method for quickly retrieving dynamic interface documents provided in Example 3 of the present application;
[0025] Figure 7 This is a flowchart of a method for quickly retrieving dynamic interface documents provided in Example 3 of the present application;
[0026] Figure 8 It is a schematic diagram of the structure of a fast retrieval device for dynamic interface documents provided in the fourth embodiment of the present application;
[0027] Fig. 9 It is a schematic diagram of the structure of an electronic device provided in Example 5 of the present application. DETAILED DESCRIPTION
[0028] In order to make the purpose, technical scheme and advantages of the present application clearer, the specific embodiments of the present application are further described in detail below in conjunction with the accompanying drawings. It is understood that the specific embodiments described herein are only used to explain the present application, rather than to limit the present application. It should also be noted that, for the convenience of description, only the part related to the present application but not all the contents are shown in the accompanying drawings. Before discussing the exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flow charts. Although the flow chart describes each operation (or step) as a sequential process, many of the operations therein can be implemented in parallel, concurrently or simultaneously. In addition, the order of each operation can be rearranged. The process can be terminated when its operation is completed, but it can also have additional steps not included in the accompanying drawings. The process can correspond to a method, a function, a procedure, a subroutine, a subprogram, etc.
[0029] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.
[0030] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0031] The following, in conjunction with the accompanying drawings, describes in detail the method, device, equipment and medium for quickly retrieving dynamic interface documents provided by the embodiments of the present application through specific embodiments and their application scenarios.
[0032] Embodiment 1
[0033] Figure 1 FIG. 1 is a flow chart of a method for quickly retrieving dynamic interface documents provided in Example 1 of the present application. Figure 1 As shown, the specific steps include:
[0034] S101, importing a dynamic interface document in response to a document import request;
[0035] First of all, the present application is applicable to the scenario of retrieving the content of the docking document of the dynamic interface. Based on the above usage scenarios, it can be understood that the executor of the present application can be a document retrieval system. Specifically, the vectorization processing and storage of dynamic interface documents and the determination and feedback of target retrieval content and target code examples can be performed by the document retrieval system, and developers can quickly complete code integration based on the feedback target retrieval content and target code examples. Among them, the document retrieval system can be a program system for finding and accessing target information in a large amount of documents or text content, which can be connected to a vector database.
[0036] A dynamic interface may refer to a programming method in which the definition and behavior of an interface can be dynamically changed when the program is running. A dynamic interface document may be a document used to describe how to integrate and use a dynamically generated interface. The format of the dynamic interface document may be a Markdown document. Markdown is a lightweight markup language that allows documents to be written in an easy-to-read and easy-to-write plain text format and then converted into a valid HTML (Hypertext Transfer Protocol) document.
[0037] The document import request may be information sent by a developer and used to import a dynamic interface document into a document retrieval system. Figure 2 1 is a scene example diagram of a method for quickly retrieving dynamic interface documents provided in the first embodiment of the present application. Figure 2 As shown, the surface form of issuing a document import request can be that the developer selects the dynamic interface document to be imported and clicks the import button.
[0038] Correspondingly, the method of importing the dynamic interface document can be that after the developer clicks the import button, the selected dynamic interface document is transmitted to the document retrieval system through the import interface provided by the document retrieval system.
[0039] S102, vectorizing the dynamic interface document and storing it in a vector database;
[0040] Vectorization is an efficient computing method for data structures that improves performance by converting scalar operations into vector operations. Specifically, vectorization can be performed by extracting the text content of the dynamic interface document and using a natural language processing algorithm to obtain the document vector corresponding to the text content.
[0041] A vector database is a database that is specifically used to store and manage high-dimensional vector data. The vectors of each document may be stored in the vector database in the order of their import time.
[0042] S103, in response to the content search request, determining target search content and target code examples according to the content search request;
[0043] The content retrieval request may be issued by a developer and is used to find information about target retrieval content in a dynamic interface document. Figure 3 1 is a scene example diagram of a method for quickly retrieving dynamic interface documents provided in the first embodiment of the present application. Figure 3 As shown, the surface form of issuing a content retrieval request can be that the developer inputs the content to be retrieved and clicks a retrieval button.
[0044] The target search content may refer to the content in the dynamic interface document that the developer needs to review, copy or download. The target code example may refer to an executable computer program code snippet that implements the function with the target search content. The target search content and the target code example may be determined by determining the target document vector in the vector database according to the search input content in the content search request, performing a reverse conversion process on the target document vector to obtain the target search content, inputting the target search content into a pre-built code generation model, and determining the target code example according to the output result of the code generation model.
[0045] S104: Feedback the target search content and the target code example.
[0046] The method of feeding back the target search content and the target code example can adopt a feedback interface provided by the document retrieval system to transmit the target search content and the target code example to the web (global wide area network) page where the developer is located.
[0047] Figure 4 1 is a scene example diagram of a method for quickly retrieving dynamic interface documents provided in the first embodiment of the present application. Figure 4 As shown, the target search content and the target code example can be displayed on the web page where the developer is located, and the developer can select the target search content and the target code example to copy or download.
[0048] In an embodiment of the present application, in response to a document import request, a dynamic interface document is imported; the dynamic interface document is vectorized and stored in a vector database; in response to a content retrieval request, a target retrieval content and a target code example are determined according to the content retrieval request; and the target retrieval content and the target code example are fed back. The above-mentioned method for rapid retrieval of dynamic interface documents, by vectorizing the dynamic interface document and storing it in a vector database, and feeding back the target retrieval content and the target code example according to the content retrieval request, can quickly and accurately retrieve the text content of the dynamic interface document, and provide code references for developers, thereby improving developers' understanding of the dynamic interface and development efficiency.
[0049] Embodiment 2
[0050] Figure 5 This is a flow chart of the method for rapid retrieval of dynamic interface documents provided in Example 2 of the present application. This solution makes a better improvement on the above-mentioned embodiment, and the specific improvement is: vectorizing the dynamic interface document and storing it in a vector database, including: extracting the text content of the dynamic interface document; using a natural language processing algorithm to obtain a document vector corresponding to the text content; wherein the document vector is composed of at least one numerical object; and storing the document vector in a vector database.
[0051] like Figure 5 As shown, the specific steps include:
[0052] S501, importing a dynamic interface document in response to a document import request;
[0053] S502, extracting the text content of the dynamic interface document;
[0054] The text content may refer to information or content presented in text form. The text content of the dynamic interface document may be extracted by using a file reading function applicable to the file format of the dynamic interface document to obtain the text content of the dynamic interface document.
[0055] S503, using a natural language processing algorithm to obtain a document vector corresponding to the text content; wherein the document vector is composed of at least one numerical object;
[0056] The document vector may be a vectorized representation of the text content, including at least one numerical object. The numerical object may be numerical data used to represent the features or attributes of the text content. For example, if the text content is "get user information", the document vector is [0.12, 0.47, 0.98], and its numerical objects are 0.12, 0.47, and 0.98 respectively.
[0057] Natural language processing algorithms can refer to a series of computer programs and methods used to process, analyze and understand human natural languages (such as Chinese, English and French, etc.), such as BERT or GPT models. Specifically, BERT (BidirectionalEncoder Representations from Transformers) uses a bidirectional Transformer encoder structure, which can better understand the semantics and contextual information of sentences; GPT (Generative Pre-trained Transformer) uses a Transformer decoder structure and is good at language generation and text completion tasks.
[0058] S504, storing the document vector in a vector database;
[0059] The document vectors may be stored in the vector database in a manner of storing the document vectors in sequence in the same directory of the vector database.
[0060] In this technical solution, optionally, storing the document vector in a vector database includes:
[0061] Determine the range of each numerical object in the document vector;
[0062] Determine the target storage location of each numerical object based on the range of each numerical object according to a predetermined storage location determination rule;
[0063] Each numerical object is stored in a target storage location in the vector database.
[0064] The range of a numerical object may refer to a preset numerical interval range of the numerical object. The numerical interval range may be preset according to the file size of the dynamic interface document. For example, 0.1 may be set as a numerical interval range. Specifically, the range of a numerical object 0.12 is (0.1, 0.2], the range of a numerical object 0.47 is (0.4, 0.5], and the range of a numerical object 0.98 is (0.9, 1.0]
[0065] The predetermined storage location determination rule may uniquely correspond to a storage directory for each numerical interval range. Accordingly, the method of determining the target storage location of each numerical object based on the range of a numerical object may be to determine the storage directory corresponding to the numerical object according to the range of the numerical object and the predetermined storage location determination rule, and determine the target storage location of the numerical object according to the numerical objects stored in the storage directory.
[0066] The method of storing each numerical object in a target storage location in the vector database can be to add a new record in the target storage location and assign the numerical object to the record.
[0067] The benefit of this arrangement of the present scheme is that by determining the range of each numerical object in the document vector and determining the target storage location of each numerical object based on the range of each numerical object according to a predetermined storage location determination rule, it is possible to avoid dense concentration of data storage, improve the utilization of storage space, and achieve rapid positioning of the target numerical object, thereby improving retrieval efficiency.
[0068] S505, in response to the content search request, determining target search content and target code examples according to the content search request;
[0069] S506: Feedback the target search content and the target code example.
[0070] The benefit of this arrangement is that by using a natural language processing algorithm to convert the text content of the dynamic interface document into a document vector and storing it in a vector database, the storage space can be greatly reduced and the searchability of the dynamic interface document can be improved, thereby improving content retrieval efficiency.
[0071] Embodiment 3
[0072] Figure 6It is a flowchart of the method for rapid retrieval of dynamic interface documents provided in Example 3 of the present application. This solution makes a better improvement on the above-mentioned embodiment, and the specific improvement is: in response to a content retrieval request, the target retrieval content and the target code example are determined according to the content retrieval request, including: in response to the content retrieval request, the target document vector is determined in the vector database according to the retrieval input content in the content retrieval request; the target document vector is reversely converted to obtain the target retrieval content; the target retrieval content is input into a pre-built code generation model, and the target code example is determined according to the output result of the code generation model.
[0073] like Figure 6 As shown, the specific steps include:
[0074] S601, importing a dynamic interface document in response to a document import request;
[0075] S602, vectorizing the dynamic interface document and storing it in a vector database;
[0076] S603, in response to the content retrieval request, determining a target document vector in the vector database according to retrieval input content in the content retrieval request;
[0077] The search input content may be a restriction condition for the target search content input by a developer. It is understandable that the target search content should be related to the search input content.
[0078] The target document vector may refer to a document vector that is highly correlated with the search input content. The target document vector may be determined in a vector database according to the search input content in the content search request. The search input content in the content search request may be vectorized to obtain a search vector, the degree of matching between the search vector and each document vector in the vector database may be determined, and the target document vector may be determined in each document vector according to the degree of matching.
[0079] In the technical solution, optionally, in response to a content retrieval request, determining a target document vector in the vector database according to retrieval input content in the content retrieval request includes:
[0080] In response to a content search request, vectorizing search input content in the content search request to obtain a search vector;
[0081] Determining the matching degree between the search vector and each document vector in the vector database;
[0082] A target document vector is determined among the document vectors according to the matching degree.
[0083] The search vector may refer to a vectorized representation of the search input content. The search input content in the content search request may be vectorized by using a natural language processing algorithm to obtain a search vector corresponding to the search input content.
[0084] The degree of matching may refer to the similarity between the search vector and each document vector in the vector database. The degree of matching between the search vector and each document vector in the vector database may be determined by using a similarity (such as cosine similarity) algorithm to calculate the degree of matching between the search vector and each document vector in the vector database. Specifically, the cosine similarity algorithm calculates the dot product and the modulus of two vectors, and divides the dot product by the product of the modulus of the two vectors to obtain the degree of matching between the two vectors.
[0085] The target document vector may be determined from each document vector according to the matching degree. For example, the document vector whose matching degree exceeds a preset matching degree threshold may be determined as the target document vector.
[0086] In the technical solution, optionally, determining a target document vector in each document vector according to the matching degree includes:
[0087] Sorting the document vectors in descending order of the matching degree to obtain a sorting result;
[0088] A preset number of document vectors from the sorting results are selected in order as target document vectors.
[0089] The document vectors may be sorted in descending order of matching degree by using a sorting algorithm such as bubble sort, selection sort, insertion sort, merge sort, quick sort, etc.
[0090] A preset number of document vectors in the sorting result are selected in order as target document vectors, that is, a preset number of document vectors are selected from the front to the back in the sorting result as target document vectors. The preset number can be set by the developer according to development needs.
[0091] The benefit of this arrangement of the present scheme is that by sorting the document vectors in order of matching degree from high to low, and selecting a preset number of document vectors from the sorting results in order as target document vectors, the display quantity of the target retrieval content can be adapted to the actual needs of the developer, which helps to improve development efficiency.
[0092] In the technical solution, optionally, after vectorizing the search input content in the content search request to obtain a search vector, the method further includes:
[0093] Determine a standard search vector in the vector database according to the search vector;
[0094] Accordingly, determining the matching degree between the search vector and each document vector in the vector database includes:
[0095] The matching degree between the standard search vector and each document vector in the vector database is determined.
[0096] The standard search vector may refer to the document vector in the vector database that has the highest matching degree with the search vector. The method for determining the standard search vector may be to use a similarity algorithm (such as cosine similarity) to calculate the matching degree between the search vector and each document vector in the vector database, and determine the document vector with the highest matching degree as the standard search vector. For example, if the search input content is "collect user information", the corresponding search vector is [0.14, 0.47, 0.98], then the standard search vector is [0.12, 0.47, 0.98], and the corresponding text content is "obtain user information".
[0097] The benefit of this arrangement is that by determining the standard search vector in the vector database based on the search vector, it is possible to avoid a situation where the developer's search input content is too far away from the text content of the dynamic interface document, thereby preventing a document vector from having a matching degree that meets the requirements.
[0098] The benefit of this arrangement of the present scheme is that by vectorizing the search input content in the content search request to obtain a search vector and determining the degree of matching between the search vector and each document vector in the vector database, the correlation between the search input content and each document vector can be quantified, thereby improving the accuracy of the target search content fed back.
[0099] S604, performing reverse conversion processing on the target document vector to obtain target retrieval content;
[0100] The target document vector is subjected to reverse conversion processing to obtain the target search content. The target document vector may be subjected to reverse conversion processing by using a reverse natural language processing algorithm, thereby obtaining the target search content.
[0101] S605, inputting the target search content into a pre-built code generation model, and determining a target code example according to an output result of the code generation model;
[0102] A code generation model can be a model that can automatically generate corresponding codes for various programming languages (such as Python and Java, etc.) based on the input natural language description, such as Codex or a custom template. The output result of the code generation model is the target code example. Specifically, Codex is a code generation technology based on a large language model developed by OpenAI. It uses a language model trained on a large amount of programming data and can generate corresponding codes based on natural language descriptions; a custom template can refer to a customized code generation template based on specific scenarios and requirements, and the generated code has good controllability and predictability.
[0103] S606: Feedback the target search content and the target code example.
[0104] Figure 7 FIG. 1 is a flowchart of a method for quickly retrieving dynamic interface documents provided in Example 3 of the present application. Figure 7 As shown, first, the document is imported, the imported document is vectorized, and the processing results of the vectorization processing are stored in the vector database; when the user queries, the user query information is matched with the vectors in the vector database, and relevant documents with a high matching degree are returned, and multi-language code examples are generated based on the returned relevant documents, and finally the returned relevant documents and multi-language code examples are displayed.
[0105] The benefit of this arrangement of the scheme is that by inputting the target search content into the code generation model to obtain a target code example, the workload of developers in manual coding can be reduced and the development efficiency of the dynamic interface can be improved.
[0106] Embodiment 4
[0107] Figure 8 Schematic diagram of the structure of the fast retrieval device for dynamic interface documents provided in the fourth embodiment of the present application. Figure 8 As shown, the device comprises:
[0108] The document import module 810 is used to import the dynamic interface document in response to the document import request;
[0109] The document processing and storage module 820 is used to vectorize the dynamic interface document and store it in a vector database;
[0110] A content retrieval module 830, configured to respond to a content retrieval request and determine a target retrieval content and a target code example according to the content retrieval request;
[0111] The content feedback module 840 is used to feedback the target search content and the target code example.
[0112] In an embodiment of the present application, a document import module is used to import a dynamic interface document in response to a document import request; a document processing and storage module is used to vectorize the dynamic interface document and store it in a vector database; a content retrieval module is used to respond to a content retrieval request and determine a target retrieval content and a target code example according to the content retrieval request; and a content feedback module is used to feedback the target retrieval content and the target code example. The above-mentioned fast retrieval device for dynamic interface documents can quickly and accurately retrieve the text content of the dynamic interface document by vectorizing the dynamic interface document and storing it in a vector database, and feedback the target retrieval content and the target code example according to the content retrieval request, and provide code references for developers, thereby improving developers' understanding of the dynamic interface and development efficiency.
[0113] The fast retrieval device of the dynamic interface document in the embodiment of the present application can be a device, or a component, integrated circuit, or chip in a terminal. The device can be a mobile electronic device or a non-mobile electronic device. Exemplarily, the mobile electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, an in-vehicle electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (PDA), etc. The non-mobile electronic device can be a server, a network attached storage (NAS), a personal computer (PC), a television (TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.
[0114] The fast retrieval device of the dynamic interface document in the embodiment of the present application can be a device with an operating system. The operating system can be an Android operating system, an IOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.
[0115] The fast retrieval device for dynamic interface documents provided in the embodiment of the present application can implement each process implemented in the above-mentioned embodiments one to three, and will not be described again here to avoid repetition.
[0116] Embodiment 5
[0117] like Fig. 9As shown, an embodiment of the present application also provides an electronic device 900, including a processor 901, a memory 902, and a program or instruction stored in the memory 902 and executable on the processor 901. When the program or instruction is executed by the processor 901, each process of the embodiment of the method for rapid retrieval of the dynamic interface document described above is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.
[0118] It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.
[0119] Embodiment 6
[0120] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, each process of the above-mentioned embodiment of the method for rapid retrieval of dynamic interface documents is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0121] The processor is a processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0122] Embodiment 7
[0123] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned dynamic interface document rapid retrieval method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0124] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0125] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0126] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0127] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
[0128] The above are only preferred embodiments of the present application and the technical principles used. The present application is not limited to the specific embodiments described herein, and various obvious changes, readjustments and substitutions that can be made by those skilled in the art will not deviate from the scope of protection of the present application. Therefore, although the present application is described in more detail through the above embodiments, the present application is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present application, and the scope of the present application is determined by the scope of the claims.
Claims
1. A method for rapid retrieval of dynamic interface documents, characterized in that: The method comprises: In response to the document import request, import the dynamic interface document; Vectorizing the dynamic interface document and storing it in a vector database; In response to a content retrieval request, determining target retrieval content and a target code example according to the content retrieval request; Feedback the target search content and the target code example.
2. The method for rapid retrieval of dynamic interface documents according to claim 1, characterized in that: The dynamic interface document is vectorized and stored in a vector database, including: Extracting text content of the dynamic interface document; Using a natural language processing algorithm to obtain a document vector corresponding to the text content; wherein the document vector is composed of at least one numerical object; The document vector is stored in a vector database.
3. The method for rapid retrieval of dynamic interface documents according to claim 2, characterized in that: Storing the document vector in a vector database includes: Determine the range of each numerical object in the document vector; Determine the target storage location of each numerical object based on the range of each numerical object according to a predetermined storage location determination rule; Each numerical object is stored in a target storage location in the vector database.
4. The method for rapid retrieval of dynamic interface documents according to claim 1, characterized in that: In response to a content retrieval request, determining a target retrieval content and a target code example according to the content retrieval request, including: In response to a content retrieval request, determining a target document vector in the vector database according to retrieval input content in the content retrieval request; Performing a reverse conversion process on the target document vector to obtain target retrieval content; The target search content is input into a pre-built code generation model, and a target code example is determined according to an output result of the code generation model.
5. The method for rapid retrieval of dynamic interface documents according to claim 4, characterized in that: In response to a content retrieval request, determining a target document vector in the vector database according to retrieval input content in the content retrieval request includes: In response to a content search request, vectorizing search input content in the content search request to obtain a search vector; Determining the matching degree between the search vector and each document vector in the vector database; A target document vector is determined among the document vectors according to the matching degree.
6. The method for rapid retrieval of dynamic interface documents according to claim 5, characterized in that: Determining a target document vector from each document vector according to the matching degree includes: Sorting the document vectors in descending order of the matching degree to obtain a sorting result; A preset number of document vectors from the sorting results are selected in order as target document vectors.
7. The method for rapid retrieval of dynamic interface documents according to claim 5, characterized in that: After vectorizing the search input content in the content search request to obtain a search vector, the method further includes: Determine a standard search vector in the vector database according to the search vector; Accordingly, determining the matching degree between the search vector and each document vector in the vector database includes: The matching degree between the standard search vector and each document vector in the vector database is determined.
8. A fast retrieval device for dynamic interface documents, characterized in that: The device comprises: A document import module, used to import a dynamic interface document in response to a document import request; A document processing and storage module, used for vectorizing the dynamic interface document and storing it in a vector database; A content retrieval module, configured to respond to a content retrieval request and determine a target retrieval content and a target code example according to the content retrieval request; The content feedback module is used to feedback the target search content and the target code example.
9. An electronic device, characterized in that: It includes a processor, a memory, and a program or instruction stored in the memory and executable on the processor. When the program or instruction is executed by the processor, the steps of the method for rapid retrieval of dynamic interface documents as described in any one of claims 1 to 7 are implemented.
10. A readable storage medium, characterized in that: The readable storage medium stores a program or instruction, and when the program or instruction is executed by the processor, the steps of the method for quickly retrieving a dynamic interface document as described in any one of claims 1-7 are implemented.