Knowledge base construction method and device, equipment, storage medium and program product

By performing screenshots on the graphical user interface and constructing corresponding relationships in class information during the operation of the application, the problem of understanding the difficulty of others writing code is solved, and the function of helping users understand the code without increasing human resources costs is achieved.

CN120020715APending Publication Date: 2025-05-20BEIJING YOUZHUJU NETWORK TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202311553040.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-11-20
Publication Date
2025-05-20

AI Technical Summary

Technical Problem

There are difficulties in understanding code written by others when reading and reviewing code. The existing technology solves it by adding comments when writing code, but this increases the cost of human resources, and the rules and language habits of comments are different from others, resulting in the difficulty of understanding.

Method used

During the operation of the application, screenshots the graphical user interface, obtains class information, and builds the correspondence between the screenshot image and class information, and stores it as a knowledge base, thereby helping users understand the functions of the code.

Benefits of technology

It realizes the function of helping users understand the code without increasing human resources costs, and reduces the difficulty of understanding other people's code through the correspondence between screenshots and class information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120020715A_ABST
    Figure CN120020715A_ABST
Patent Text Reader

Abstract

The invention provides a knowledge base construction method and device, equipment, a storage medium and a program product, and the method comprises the steps: carrying out the screen capture processing of a first graphical user interface of an application program in the operation process of the application program, and obtaining a screen capture image; acquiring class information corresponding to the first graphical user interface; and constructing a corresponding relationship between the screenshot image and the class information, and carrying out storage processing on the corresponding relationship to obtain a knowledge base of the application program. Based on the knowledge base of the application program constructed by the invention, for any type of information of the application program, a user can obtain the screenshot image corresponding to the type of information, so that the user is helped to understand the function effect realized by the type of information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of data processing, and in particular, to a method, apparatus, device, storage medium, and program product for constructing a knowledge base. Background Art

[0002] This section aims to provide background or context for the embodiments of the present disclosure described in the claims. The description herein is not admitted to be prior art merely by virtue of being included in this section.

[0003] During the process of reading and reviewing code (Code Review), it is difficult to understand the code written by others.

[0004] In the related art, a solution of annotating code while writing the code is usually adopted, that is, when a programmer writes code, the function and related information of the code are simultaneously annotated on the code to help others understand the function and related information of the code when others read or review the code.

[0005] However, annotating code while writing the code will increase the human resource cost, and when annotating the code, the programmer will still maintain their own rules and language habits, resulting in a relatively high difficulty in understanding the code written by others. Summary of the Invention

[0006] In view of this, an object of the present disclosure is to provide a method, apparatus, device, storage medium, and program product for constructing a knowledge base, which can at least solve one of the technical problems in the related art to a certain extent.

[0007] Based on the above object, a first aspect of an exemplary embodiment of the present disclosure provides a method for constructing a knowledge base, including:

[0008] During the running of an application, taking a screenshot of a first graphical user interface of the application to obtain a screenshot image;

[0009] Obtaining class information corresponding to the first graphical user interface;

[0010] Constructing a correspondence between the screenshot image and the class information, and performing a storage process on the correspondence to obtain a knowledge base of the application.

[0011] Based on the same inventive concept, a second aspect of an exemplary embodiment of the present disclosure provides a device for constructing a knowledge base, including:

[0012] A screenshot image acquisition module configured to take a screenshot of a first graphical user interface of the application during the running of the application to obtain a screenshot image;

[0013] A class information acquisition module, configured to acquire class information corresponding to the first graphical user interface;

[0014] A knowledge base construction module, configured to construct a correspondence relationship between the screenshot image and the class information, perform storage processing on the correspondence relationship, and obtain a knowledge base of the application program.

[0015] Based on the same inventive concept, a third aspect of an exemplary embodiment of the present disclosure provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, the method described in the first aspect is implemented.

[0016] Based on the same inventive concept, a fourth aspect of an exemplary embodiment of the present disclosure provides a non-transitory computer-readable storage medium storing computer instructions for causing a computer to execute the method described in the first aspect.

[0017] Based on the same inventive concept, a fifth aspect of an exemplary embodiment of the present disclosure provides a computer program product including computer program instructions that, when run on a computer, cause the computer to execute the method described in the first aspect.

[0018] As can be seen from the above, the method, apparatus, device, storage medium, and program product for constructing a knowledge base provided by the embodiments of the present disclosure include: during the running process of an application program, performing a screenshot process on the first graphical user interface of the application program to obtain a screenshot image; acquiring class information corresponding to the first graphical user interface; constructing a correspondence relationship between the screenshot image and the class information, and performing storage processing on the correspondence relationship to obtain a knowledge base of the application program. Based on the knowledge base of the application program constructed according to the present disclosure, for any class information of the application program, a user can obtain a screenshot image corresponding to the class information to help the user understand the functional effects achieved by the class information. Description of the Drawings

[0019] In order to more clearly illustrate the technical solutions in the present disclosure or related technologies, the following will briefly introduce the drawings required for use in the description of the embodiments or related technologies. Obviously, the drawings in the following description are only embodiments of the present disclosure. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0020] Figure 1 A schematic diagram of code annotation provided for an exemplary embodiment of the present disclosure;

[0021] Figure 2A schematic diagram of an application scenario of the method for constructing a knowledge base provided by an exemplary embodiment of the present disclosure;

[0022] Figure 3 A schematic flow diagram of the method for constructing a knowledge base provided by an exemplary embodiment of the present disclosure;

[0023] Figure 4 A schematic flow diagram of a method for obtaining class information provided by an exemplary embodiment of the present disclosure;

[0024] Figure 5 A schematic structural diagram of a screenshot image provided by an exemplary embodiment of the present disclosure;

[0025] Figure 6 A schematic flow diagram of the method for applying the knowledge base provided by an exemplary embodiment of the present disclosure;

[0026] Figure 7 A schematic diagram of an application scenario of the method for applying the knowledge base provided by an exemplary embodiment of the present disclosure;

[0027] Figure 8 Another schematic flow diagram of the method for applying the knowledge base provided by an exemplary embodiment of the present disclosure;

[0028] Figure 9 Another schematic diagram of an application scenario of the method for applying the knowledge base provided by an exemplary embodiment of the present disclosure;

[0029] Figure 10 A schematic structural diagram of a device for constructing a knowledge base provided by an exemplary embodiment of the present disclosure;

[0030] Figure 11 A schematic structural diagram of an electronic device provided by an exemplary embodiment of the present disclosure. Detailed implementation manners

[0031] It can be understood that before using the technical solutions disclosed in the embodiments of the present application, the types, usage scopes, usage scenarios, etc. of the personal information involved in the present application should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.

[0032] For example, when responding to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested by the user will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, an application program, a server, or a storage medium that executes the operations of the technical solutions of the present application according to the prompt message.

[0033] As an optional but non-limiting implementation, in response to receiving an active request from a user, the way to send a prompt message to the user can be, for example, in the form of a pop-up window. The prompt message can be presented in text in the pop-up window. In addition, the pop-up window can also carry selection controls for the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0034] It can be understood that the above notification and the process of obtaining user authorization are only illustrative and do not limit the implementation of this application. Other ways that comply with relevant laws and regulations can also be applied to the implementation of this application.

[0035] It can be understood that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) should comply with the requirements of the corresponding laws, regulations and related provisions.

[0036] To make the purpose, technical solution and advantages of the present disclosure clearer and more understandable, the principles and spirit of the present disclosure will be described below with reference to several exemplary embodiments. It should be understood that these embodiments are given only to enable those skilled in the art to better understand and then implement the present disclosure, rather than limiting the scope of the present disclosure in any way. On the contrary, these embodiments are provided to make the present disclosure more thorough and complete, and to be able to convey the scope of the present disclosure completely to those skilled in the art.

[0037] In this article, it should be understood that any number of elements in the drawings is for illustration rather than limitation, and any naming is only for distinction and does not have any limiting meaning.

[0038] It should be noted that unless otherwise defined, the technical terms or scientific terms used in the embodiments of the present disclosure should have the ordinary meaning understood by those of ordinary skill in the field to which the present disclosure belongs. The "first", "second" and similar terms used in the embodiments of the present disclosure do not indicate any order, quantity or importance, but are only used to distinguish different components. Words such as "including" or "comprising" mean that the elements or objects appearing before this word cover the elements or objects listed after this word and their equivalents, without excluding other elements or objects. "Connection" or "connected" and similar words are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. "Up", "down", "left", "right", etc. are only used to represent relative position relationships. When the absolute position of the object being described changes, the relative position relationship may also change accordingly. The article "a" or "an" before an element does not exclude the existence of multiple such elements.

[0039] Next, with reference to several representative embodiments of the present disclosure, the principles and spirit of the present disclosure will be elaborated in detail.

[0040] As described in the background art, it is difficult to understand the code written by others during the process of reading and reviewing code (Code Review).

[0041] In the related art, a solution of adding comments to the code while writing the code is usually adopted. Refer to Figure 1 , when a programmer writes code 110, code comments 120 representing the functions and related information of the code 110 are added to the code 110 at the same time, so as to help others understand the functions and related information of the code 110 when others read or review the code 110.

[0042] However, the inventors of the present disclosure have found that adding comments to the code while writing the code will increase the human resource cost, and when adding comments to the code, programmers still maintain their own rules and language habits, resulting in a relatively high difficulty in understanding the code written by others.

[0043] To solve the above problems, the present disclosure provides a solution for constructing a knowledge base, which specifically includes: during the running process of an application, taking a screenshot of a first graphical user interface of the application to obtain a screenshot image; obtaining class information corresponding to the first graphical user interface; constructing a correspondence relationship between the screenshot image and the class information, and performing a storage process on the correspondence relationship to obtain the knowledge base of the application. Based on the knowledge base of the application constructed according to the present disclosure, for any class information of the application, a user can obtain the screenshot image corresponding to the class information to help the user understand the functional effects achieved by the class information.

[0044] Specifically, before the application runs, the correspondence relationship between the class information and the screenshot image (i.e., the actual situation of the graphical user interface) cannot be established. The reason is that during the writing process of the class information, the class information only defines the way to construct the graphical user interface, but at this time, the actual situation of the graphical user interface during the running of the application cannot be obtained, nor can the screenshot image be obtained. And during the operation process of the application, the screenshot image actually corresponding to the class information will also change. Therefore, only when the application is running can the correspondence relationship between the class information and the screenshot image be effectively established and stored as the knowledge base of the application.

[0045] After introducing the basic principle of the present disclosure, the following specifically introduces various non-limiting implementation manners of the present disclosure.

[0046] Refer to Figure 2 , which is a schematic diagram of an application scenario of the method for constructing a knowledge base provided by an exemplary embodiment of the present disclosure.

[0047] In this application scenario, it includes a terminal device 210, a server 220, and a data storage system 230. Among them, the terminal device 210, the server 220, and the data storage system 230 can all be connected through a wired or wireless communication network to achieve data interaction.

[0048] The terminal device 210 can be an electronic device near the user side with data transmission, multimedia input / output functions, including but not limited to a desktop computer, a mobile phone, a mobile computer, a tablet computer, a media player, a smart wearable device, a personal digital assistant (PDA), or other electronic devices capable of implementing the above functions. This electronic device may include a processor and a display screen with touch input function. The display screen is used to present a graphical user interface, and the graphical user interface can display an application interface. The processor is used to process application data, generate a graphical user interface, and control the display of the graphical user interface on the display screen.

[0049] Both the server 220 and the data storage system 230 can be independent physical servers, or a server cluster or distributed system composed of multiple physical servers. They can also be cloud servers that provide basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), as well as big data and artificial intelligence platforms.

[0050] In some exemplary embodiments, the method for constructing a knowledge base can run on the terminal device 210 or the server 220.

[0051] When the method for constructing a knowledge base runs on the server 220, the server 220 is used to provide a knowledge base construction service to the user of the terminal device 210. A client for communicating with the server 220 is installed in the terminal device 210. The user can input a construction instruction for the knowledge base of the target application program through this client. After clicking the construction button, the client sends the construction instruction for the knowledge base of the target application program to the server 220. During the running of the target application program, the server 220 takes a screenshot of the first graphical user interface of the target application program to obtain a screenshot image; obtains the class information corresponding to the first graphical user interface; constructs the corresponding relationship between the screenshot image and the class information, and performs a storage process on the corresponding relationship to obtain the knowledge base of the application program. Based on the knowledge base of the application program, for any class information of the application program, the user can obtain the screenshot image corresponding to the class information to help the user understand the functional effect implemented by the class information.

[0052] The data storage system 230 is used to store the knowledge base of the application program.

[0053] For the method of constructing the knowledge base according to the embodiments of the present disclosure, for different application programs, knowledge bases of different application programs can be constructed respectively.

[0054] When the method of constructing the knowledge base runs on the server 220, this method can be implemented and executed based on the cloud interaction system.

[0055] Among them, the cloud interaction system includes client devices and cloud application servers.

[0056] In some exemplary embodiments, various cloud applications can run under the cloud interaction system. A cloud application refers to an application mode based on cloud computing. In the operation mode of a cloud application, the running entity of the application program and the presenting entity of the application screen are separated. The storage and running of the control method of the state in the application are completed on the cloud application server. The role of the client device is to receive and send data and present the application screen. For example, the client device can be a display device with data transmission function near the user side, such as a mobile terminal, a television, a computer, a personal digital assistant, etc.; however, the information processing is performed by the cloud application server in the cloud. When using the application, the player operates the client device to send an operation instruction to the cloud application server. The cloud application server runs the application according to the operation instruction, encodes and compresses data such as the application screen, returns it to the client device through the network, and finally, the client device decodes and outputs the application screen.

[0057] In the above embodiments, the method of constructing the knowledge base running on the server 220 is taken as an example for illustration. However, the present disclosure is not limited thereto. In some exemplary embodiments, the method of constructing the knowledge base can also run on the terminal device 210.

[0058] When the method of constructing the knowledge base runs on the terminal device 210, the terminal device 110 may include a display screen and a processor. A client is installed in the terminal device 110. The user can input a construction instruction for the knowledge base of the target application program through the client. After clicking the construction button, the client sends the construction instruction for the knowledge base of the target application program to the processor. During the running process of the target application program, the processor takes a screenshot of the first graphical user interface of the target application program to obtain a screenshot image; obtains the class information corresponding to the first graphical user interface; constructs the corresponding relationship between the screenshot image and the class information, and performs storage processing on the corresponding relationship to obtain the knowledge base of the application program. Based on the knowledge base of the application program, for any class information of the application program, the user can obtain the screenshot image corresponding to the class information to help the user understand the functional effect achieved by the class information.

[0059] When the method for constructing a knowledge base runs on the terminal device 210, the terminal device stores an application program and is used to present an application screen. The terminal device is used to interact with players through a graphical user interface, that is, conventionally, an application program is downloaded and installed on an electronic device and run. The manner in which the terminal device provides the graphical user interface to the player can include various ways. For example, it can be rendered and displayed on the display screen of the terminal, or provided to the player through holographic projection. For example, the terminal device can include a display screen and a processor. The display screen is used to present the graphical user interface, and the graphical user interface includes an application screen. The processor is used to run the application, generate the graphical user interface, and control the display of the graphical user interface on the display screen.

[0060] The following combines Figure 1 and Figure 2 application scenarios to describe the method for constructing a knowledge base and the application method of the knowledge base according to the exemplary embodiments of the present disclosure. It should be noted that the above application scenarios are only shown for the convenience of understanding the spirit and principle of the present disclosure, and the embodiments of the present disclosure are not limited in this regard. On the contrary, the embodiments of the present disclosure can be applied to any applicable scenario.

[0061] Refer to Figure 3 , which is a schematic flowchart of a method for constructing a knowledge base provided by an exemplary embodiment of the present disclosure.

[0062] The method for constructing a knowledge base includes the following steps:

[0063] Step S310: During the running of the application program, take a screenshot of the first graphical user interface of the application program to obtain a screenshot image.

[0064] Specifically, the first graphical user interface includes a user operation interface (User Interface, UI) and a game screen. Among them, the UI interface is a medium for human-computer interaction and information exchange between the system and the user. The UI interface can display system information in a form acceptable to humans, enabling users to conveniently and efficiently operate the computer to achieve two-way human-computer interaction. The user operation interface can be composed of visual elements such as controls, text, graphics, images, icons, input boxes, etc. In an alternative embodiment, the user operation interface may include a collection control, a research control, an expedition control, etc.

[0065] First, the timing of taking the screenshot will be introduced:

[0066] In some exemplary embodiments, during the running of the application program, taking a screenshot of the first graphical user interface of the application program to obtain a screenshot image includes:

[0067] During the running of the application, in response to a screenshot instruction, perform screenshot processing on the first graphical user interface of the application to obtain the screenshot image.

[0068] In the above exemplary embodiment, the timing of performing screenshot processing is described as receiving a screenshot instruction. For the screenshot instruction, the present disclosure provides various generation methods of the screenshot instruction. Next, several exemplary generation methods of the screenshot instruction will be specifically introduced:

[0069] In this exemplary embodiment, the generation methods of the screenshot instruction include:

[0070] In response to a first trigger operation on the first graphical user interface, generate the screenshot instruction for the first graphical user interface.

[0071] Specifically in implementation, the first trigger operation refers to an operation input by the user in a touch manner on a position on the first graphical user interface, which is used to realize the user's selection intention for the first graphical user interface or a position on the first graphical user interface.

[0072] Specifically in implementation, the first trigger operation can be a single click, double click, long press, hard press, or swipe, etc. For example, for a long press, the duration that the user needs to hold to form the long press can be set according to specific implementation needs, such as 1 second, 2 seconds, etc.; for a single click, double click, or hard press, specific parameters such as the action duration, operation interval, and pressing force can be set according to the specific hardware and software parameters of the client device to which the method of this embodiment is applied. The above specific setting contents are not specifically limited in this embodiment. In addition, the first trigger operation can also be any feasible trigger operation that is simple and different from the trigger operations in the prior art other than those exemplified above.

[0073] In the above exemplary embodiment, an example is given of generating a screenshot instruction based on an operation on the first graphical user interface. However, the present disclosure is not limited thereto. In some other exemplary embodiments, a screenshot instruction can also be generated based on an operation on the terminal device that provides the first graphical user interface:

[0074] In this exemplary embodiment, the first graphical user interface is provided by the terminal device. Then, the generation methods of the screenshot instruction include:

[0075] In response to a second trigger operation on the terminal device, generate the screenshot instruction for the first graphical user interface.

[0076] Specifically in implementation, the second trigger operation refers to an operation input by the user in a physical manner on the whole terminal device or a key on the terminal device.

[0077] In specific implementation, the second trigger operation can be a single click, double click, long press, or hard press on a button of the terminal device, etc. For example, for a long press, the duration that the user needs to hold to form the long press can be set accordingly according to specific implementation requirements, such as 1 second, 2 seconds, etc.; for a single click, double click, or hard press, specific parameters such as the action duration, operation interval, and pressing force (which can be collected based on a button pressure sensor) can be set accordingly according to the specific hardware and software parameters of the client device to which the method of this embodiment is applied. No specific limitations are made on the above specific setting contents in this embodiment.

[0078] In specific implementation, the second trigger operation can be the movement or shaking of the entire terminal device, etc. For example, for movement, the movement speed, movement distance, etc. that the user needs to maintain to form the movement can be set accordingly according to specific implementation requirements; for shaking (i.e., shaking the device), specific parameters such as the shaking amplitude, shaking frequency, and shaking force can be set accordingly according to the specific hardware and software parameters of the client device to which the method of this embodiment is applied. No specific limitations are made on the above specific setting contents in this embodiment. In addition, the second trigger operation can also be any feasible trigger operation that is simple and different from the trigger operations in the prior art other than those exemplified above.

[0079] In the above exemplary embodiment, an example is given of generating a screenshot instruction based on an operation on the first graphical user interface or an operation on the terminal device providing the first graphical user interface. However, the present disclosure is not limited thereto. In some other exemplary embodiments, a screenshot instruction can also be generated when the first graphical user interface loads content:

[0080] In this exemplary embodiment, the generation method of the screenshot instruction includes:

[0081] Responding to a content loading event of the first graphical user interface, generating the screenshot instruction for the first graphical user interface.

[0082] In specific implementation, for a content loading event of the first graphical user interface, for example, adding a View to the screen. In Android, if you want to display a page, you only need to pass the written page layout layout into the setContentView() method in the onCreate() method of the Activity. Then the Activity will complete the subsequent work and display the desired layout page through a series of operations without any further processing by the user, that is, the effect of automatically loading content of the first graphical user interface can be achieved.

[0083] In the above exemplary embodiment, the timing of performing screenshot processing is described. Next, the method of performing screenshot processing will be introduced:

[0084] The present disclosure does not limit the specific manner of screenshot processing, and any manner that can implement screenshot processing in related technologies can be included.

[0085] Step S320: Obtain the class information corresponding to the first graphical user interface.

[0086] First, the definition of class information will be introduced:

[0087] In class information, the class refers to a construct in an object-oriented computer programming language. It is a blueprint for creating objects and describes the common attributes and methods of the created objects. A more rigorous definition of a class is a cohesive package composed of a certain type of metadata. It describes the behavioral rules of some objects, and these objects are called instances of the class. A class has an interface and a structure. The interface describes how to interoperate with the class and its instances through methods, while the structure describes how the data in an instance is divided into multiple attributes.

[0088] In the above content, the definition of class information is described. Next, the method for obtaining the class information corresponding to the first graphical user interface will be specifically introduced:

[0089] Refer to Figure 4 , the method for obtaining the class information corresponding to the first graphical user interface includes the following steps:

[0090] Step S410: Obtain the root view corresponding to the first graphical user interface;

[0091] Step S420: Based on the root view, obtain the top-level view corresponding to the first graphical user interface;

[0092] Step S430: Traverse the top-level view to obtain the view information corresponding to the first graphical user interface;

[0093] Step S440: Based on the view information, obtain the class information corresponding to the first graphical user interface.

[0094] Specifically, in implementation, the root view is at the top of the view hierarchy and serves as the only direct view of the main window and the parent view of all other interfaces.

[0095] A view is an object visible to the user, such as a button, text field, image, etc. Views compose the first graphical user interface of an application. Views exist in a view hierarchy whose root is the window of the application. When a view is added to the window, it is considered a subview of the window. A view that is a subview of a window can also have subviews, resulting in a view hierarchy rooted at the window. Once the view hierarchy is created, it is drawn onto the screen, and this process can be divided into two steps: each view (including the window) in the view hierarchy draws itself, rendering itself onto its layer; the layers of all views are composited together on the screen.

[0096] In this exemplary embodiment, obtaining the top-level view corresponding to the first graphical user interface based on the root view includes:

[0097] Traversing and processing the view hierarchy corresponding to the first graphical user interface starting from the root view to obtain the top-level view.

[0098] Specifically in implementation, based on the root view controller, traversing and processing the view hierarchy corresponding to the first graphical user interface starting from the root view to obtain the top-level view.

[0099] The root view controller is a view controller that manages the root view. In an application, there is always a root view controller and a root view corresponding to the root view controller. If there are other view controllers in the application, then these other view controllers are subordinate to the root view controller.

[0100] In this exemplary embodiment, obtaining the class information corresponding to the first graphical user interface based on the view information includes:

[0101] Filtering the view information to obtain the class information corresponding to the first graphical user interface.

[0102] Specifically in implementation, the class information is included in the view information.

[0103] In the above exemplary embodiment, a method for obtaining class information is described. In some exemplary embodiments, the view information further includes layout information and buried point information. The following will introduce the processing manner for the screenshot image based on the layout information and the buried point information:

[0104] In this exemplary embodiment, after traversing and processing the top-level view to obtain the view information, the method further includes:

[0105] Obtaining the layout information and buried point information corresponding to the first graphical user interface based on the view information;

[0106] Based on the layout information, label the buried point information on the screenshot image.

[0107] In the above exemplary embodiment, the screenshot image includes buried point information. However, the present disclosure is not limited thereto. In some other exemplary embodiments, if the user performs a triggering operation on the first graphical user interface, the triggering position of the triggering operation can also be labeled on the screenshot image:

[0108] In this exemplary embodiment, during the running of the application, after performing a screenshot process on the first graphical user interface of the application to obtain a screenshot image, the method further includes:

[0109] Determine the triggering position of the triggering operation;

[0110] Label the triggering position on the screenshot image.

[0111] Reference Figure 5 , where the screenshot image before labeling includes a first virtual button 510 and a second virtual button 530. Through the above exemplary embodiment, if the buried point information 520 is configured on the first virtual button 510, for example, the buried point information 520 is used to obtain the usage times of the first virtual button 510, then the layout information corresponding to the buried point information 520 is the position of the first virtual button 510, and the buried point information 520 is labeled on the first virtual button 510; through the above exemplary embodiment, if the triggering position when the user performs a triggering operation on the second virtual button 530 is the triggering position 540, then the triggering position 540 is labeled on the second virtual button 530 to obtain a screenshot image labeled with the buried point information 520 and the triggering position 540.

[0112] Step S330, construct a correspondence between the screenshot image and the class information, and perform a storage process on the correspondence to obtain the knowledge base of the application.

[0113] In this exemplary embodiment, the knowledge base is configured to obtain the screenshot image corresponding to the class information based on any class information of the application.

[0114] Specifically, for any application, obtain the screenshot images and class information of all graphical user interfaces of the application, and establish a correspondence between all the screenshot images and the class information, and store to obtain the knowledge base of the application.

[0115] As can be seen from the above, the method for constructing a knowledge base provided by the embodiments of the present disclosure includes: during the running of an application, taking a screenshot of the first graphical user interface of the application to obtain a screenshot image; obtaining class information corresponding to the first graphical user interface; constructing a correspondence relationship between the screenshot image and the class information, and performing a storage process on the correspondence relationship to obtain the knowledge base of the application. Based on the knowledge base of the application constructed according to the present disclosure, for any class information of the application, the user can obtain the screenshot image corresponding to the class information to help the user understand the functional effect realized by the class information.

[0116] Furthermore, the present disclosure also marks relevant buried point information and the trigger position during user operation on the screenshot image, further demonstrating the functional effect realized by the class information.

[0117] In the above exemplary embodiment, the method for constructing a knowledge base is described. Next, the application method of the knowledge base will be introduced:

[0118] Reference Figure 6 , the application method of the knowledge base includes the following steps:

[0119] Step S610, in response to a query request based on target class information, determining a target screenshot image corresponding to the target class information based on the knowledge base;

[0120] In this exemplary embodiment, the query request includes the target class information.

[0121] Step S620, for the query request, feeding back the target screenshot image corresponding to the target class information.

[0122] Specifically, when the application method of the knowledge base runs on a server, the server is used to provide the application service of the knowledge base to the user of the terminal device. A client communicating with the server is installed in the terminal device. The user can input a query request based on the target class information through the client. After clicking the query button, the client will send the query request based on the target class information to the server. The server, in response to the query request based on the target class information, determines the target screenshot image corresponding to the target class information based on the knowledge base; for the query request, feeds back the target screenshot image corresponding to the target class information. The server can send the target screenshot image to the client, and the client displays the target screenshot image to the user to help the user understand the functional effect realized by the class information.

[0123] In specific implementation, when the application mode of the knowledge base runs on a terminal device, the terminal device may include a display screen and a processor. A client is installed on the terminal device. The user can input a query request based on the target class information through the client. After clicking the query button, the client sends the query request based on the target class information to the processor. The processor, in response to the query request based on the target class information, determines the target screenshot image corresponding to the target class information based on the knowledge base, and feeds back the target screenshot image corresponding to the query request. The processor may send the target screenshot image to the client, and the client displays the target screenshot image to the user through the display screen to help the user understand the functional effects achieved by this type of information.

[0124] In specific implementation, referring to Figure 7 , as a specific example, a graphical user interface is provided through the terminal device. The content displayed in the graphical user interface includes a text box 710 for inputting class information and a virtual button 720 for representing the query intention. When the user inputs class information 730 through the text box 710 and clicks the virtual button 720, the screenshot image 740 corresponding to the class information 730 is determined based on the knowledge base, and the screenshot image 740 is displayed in the graphical user interface to assist the user in understanding the display effects that the class information 730 can achieve when the application is running.

[0125] Referring to Figure 8 , the application mode of the knowledge base includes the following steps:

[0126] Step S810: In response to the selection operation for the target class information among the several classes of information, determine the target screenshot image corresponding to the target class information based on the knowledge base;

[0127] Step S820: In the second graphical user interface, display the target screenshot image corresponding to the target class information.

[0128] In specific implementation, when the application mode of the knowledge base runs on the server, the server is used to provide the application service of the knowledge base to the users of the terminal device. A client communicating with the server is installed on the terminal device. The client displays several classes of information to the user through the second graphical user interface provided by the terminal device. The user can select the target class information among the several classes of information through the client. The client sends the selection situation for the target class information to the server. The server, in response to the selection operation for the target class information among the several classes of information, determines the target screenshot image corresponding to the target class information based on the knowledge base, and displays the target screenshot image corresponding to the target class information in the second graphical user interface to help the user understand the functional effects achieved by this type of information.

[0129] In specific implementation, when the application mode of the knowledge base runs on a terminal device, the terminal device may include a display screen and a processor. A client is installed in the terminal device. The client presents several types of information to the user through a second graphical user interface provided by the display screen. The user can select a target type of information from the several types of information through the client. The client sends the selection situation of the target type of information to the processor. In response to the selection operation on the target type of information among the several types of information, the processor determines a target screenshot image corresponding to the target type of information based on the knowledge base; in the second graphical user interface, the target screenshot image corresponding to the target type of information is displayed to help the user understand the functional effects achieved by this type of information.

[0130] In specific implementation, referring to Figure 9 , as a specific example, a graphical user interface is provided by a terminal device. The content displayed in the graphical user interface includes a first preset area 910 and a second preset area 930. Several types of information are displayed in the first preset area 910. When the user selects the type of information 920 among the several types of information, a screenshot image 940 corresponding to the type of information 920 is determined based on the knowledge base, and the screenshot image 940 is controlled to be displayed in the second preset area 930 to assist the user in understanding the display effects that the type of information 920 can achieve during the operation of the application program.

[0131] It should be noted that the method of the embodiments of the present disclosure can be executed by a single device, such as a computer or a server, etc. The method of this embodiment can also be applied to a distributed scenario and completed by multiple devices cooperating with each other. In this case of a distributed scenario, one of the multiple devices can only execute one or more steps of the method of the embodiments of the present disclosure, and these multiple devices will interact with each other to complete the described method.

[0132] It should be noted that some embodiments of the present disclosure have been described above. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be executed in a different order from those in the above embodiments and still achieve the desired results. Additionally, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0133] Based on the same inventive concept, corresponding to the method of any of the above embodiments, the present disclosure further provides a device for constructing a knowledge base.

[0134] Referring to Figure 10 , which is a schematic structural diagram of a device for constructing a knowledge base provided by an exemplary embodiment of the present disclosure.

[0135] An apparatus for constructing a knowledge base, comprising the following modules:

[0136] A screenshot image acquisition module 1010, configured to perform a screenshot process on a first graphical user interface of the application during the running of the application to obtain a screenshot image;

[0137] A class information acquisition module 1020, configured to acquire class information corresponding to the first graphical user interface;

[0138] A knowledge base construction module 1030, configured to construct a correspondence relationship between the screenshot image and the class information, perform a storage process on the correspondence relationship, and obtain a knowledge base of the application.

[0139] In some exemplary embodiments, the apparatus for constructing a knowledge base further includes a screenshot image query module (not shown in the figure), configured to:

[0140] In response to a query request based on target class information, determine a target screenshot image corresponding to the target class information based on the knowledge base;

[0141] For the query request, feedback the target screenshot image corresponding to the target class information.

[0142] In some exemplary embodiments, a second graphical user interface is provided by a terminal device, and the content displayed on the second graphical user interface includes several types of information. The apparatus for constructing a knowledge base further includes a screenshot image query module (not shown in the figure), configured to:

[0143] In response to a selection operation on target class information among the several types of information, determine a target screenshot image corresponding to the target class information based on the knowledge base;

[0144] In the second graphical user interface, display the target screenshot image corresponding to the target class information.

[0145] In some exemplary embodiments, the class information acquisition module 1020 is specifically configured to:

[0146] Acquire a root view corresponding to the first graphical user interface;

[0147] Based on the root view, obtain a top-level view corresponding to the first graphical user interface;

[0148] Perform a traversal process on the top-level view to obtain view information corresponding to the first graphical user interface;

[0149] Based on the view information, obtain the class information corresponding to the first graphical user interface.

[0150] In some exemplary embodiments, the class information acquisition module 1020 is specifically configured to:

[0151] Traverse the view hierarchy corresponding to the first graphical user interface starting from the root view to obtain the top-level view.

[0152] In some exemplary embodiments, the class information acquisition module 1020 is specifically configured to:

[0153] Filter the view information to obtain the class information corresponding to the first graphical user interface.

[0154] In some exemplary embodiments, the class information acquisition module 1020 is further configured to:

[0155] Based on the view information, obtain the layout information and buried point information corresponding to the first graphical user interface;

[0156] Then, the screenshot image acquisition module 1010 is further configured to:

[0157] Based on the layout information, mark the buried point information on the screenshot image.

[0158] In some exemplary embodiments, the screenshot image acquisition module 1010 is specifically configured to:

[0159] During the running of the application, in response to a screenshot instruction, perform a screenshot process on the first graphical user interface of the application to obtain the screenshot image.

[0160] In some exemplary embodiments, the screenshot image acquisition module 1010 is further configured to:

[0161] In response to a first trigger operation on the first graphical user interface, generate the screenshot instruction for the first graphical user interface.

[0162] In some exemplary embodiments, the screenshot image acquisition module 1010 is specifically configured to:

[0163] Determine the trigger position of the first trigger operation;

[0164] Mark the trigger position on the screenshot image.

[0165] For the sake of convenience of description, when describing the above device, various modules are described separately according to functions. Of course, when implementing the present disclosure, the functions of each module can be implemented in the same or multiple software and / or hardware.

[0166] The device of the above embodiments is used to implement the corresponding knowledge base construction method in any of the foregoing embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be elaborated here.

[0167] Based on the same inventive concept, corresponding to the method of any of the above embodiments, the present disclosure also provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, it implements the knowledge base construction method described in any of the above embodiments.

[0168] Figure 11 FIG. shows a more specific schematic diagram of the hardware structure of the electronic device provided in this embodiment. The device may include: a processor 1110, a memory 1120, an input / output interface 1130, a communication interface 1140, and a bus 1150. Among them, the processor 1110, the memory 1120, the input / output interface 1130, and the communication interface 1140 are communicatively connected to each other inside the device through the bus 1150.

[0169] The processor 1110 may be implemented in a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, etc., and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.

[0170] The memory 1120 may be implemented in the form of a ROM (Read Only Memory), a RAM (Random Access Memory), a static storage device, a dynamic storage device, etc. The memory 1120 may store an operating system and other application programs. When implementing the technical solutions provided in the embodiments of this specification through software or firmware, the relevant program codes are stored in the memory 1120 and are called and executed by the processor 1110.

[0171] The input / output interface 1130 is used to connect to an input / output module to implement information input and output. The input / output module may be configured as a component in the device (not shown in the figure) or externally connected to the device to provide corresponding functions. Among them, the input device may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device may include a display, a speaker, a vibrator, an indicator light, etc.

[0172] The communication interface 1140 is used to connect to a communication module (not shown in the figure) to achieve communication and interaction between this device and other devices. The communication module can communicate through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).

[0173] The bus 1150 includes a path for transmitting information between various components of the device (such as the processor 1110, the memory 1120, the input / output interface 1130, and the communication interface 1140).

[0174] It should be noted that although the above device only shows the processor 1110, the memory 1120, the input / output interface 1130, the communication interface 1140, and the bus 1150, in the specific implementation process, the device may also include other components necessary for normal operation. In addition, those skilled in the art can understand that the above device may also only include the components necessary to implement the solution of the embodiments of this specification, and does not necessarily include all the components shown in the figure.

[0175] The electronic device in the above embodiment is used to implement the corresponding knowledge base construction method in any of the foregoing embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be elaborated here.

[0176] The memory 1120 stores machine-readable instructions executable by the processor 1110. When the electronic device runs, the processor 1110 communicates with the memory 1120 through the bus 1130, so that the processor 1110 executes the following instructions when running:

[0177] During the running of the application program, take a screenshot of the first graphical user interface of the application program to obtain a screenshot image;

[0178] Obtain the class information corresponding to the graphical user interface;

[0179] Construct a correspondence between the screenshot image and the class information, and perform storage processing on the correspondence to obtain the knowledge base of the application program.

[0180] In a possible implementation manner, among the instructions executed by the processor 1110, after performing the storage processing on the correspondence to obtain the knowledge base of the application program, the method further includes:

[0181] In response to a query request based on the target class information, determine the target screenshot image corresponding to the target class information based on the knowledge base;

[0182] For the query request, feedback the target screenshot image corresponding to the target class information.

[0183] In a possible implementation, among the instructions executed by the processor 1110, a second graphical user interface is provided through a terminal device, and the content displayed on the second graphical user interface includes several types of information;

[0184] After storing and processing the corresponding relationship to obtain the knowledge base of the application program, the method further includes:

[0185] In response to a selection operation on the target type of information among the several types of information, determine the target screenshot image corresponding to the target type of information based on the knowledge base;

[0186] In the second graphical user interface, display the target screenshot image corresponding to the target type of information.

[0187] In a possible implementation, among the instructions executed by the processor 1110, the obtaining of the type of information corresponding to the first graphical user interface includes:

[0188] Obtain the root view corresponding to the first graphical user interface;

[0189] Based on the root view, obtain the top-level view corresponding to the first graphical user interface;

[0190] Perform a traversal process on the top-level view to obtain the view information corresponding to the first graphical user interface;

[0191] Based on the view information, obtain the type of information corresponding to the first graphical user interface.

[0192] In a possible implementation, among the instructions executed by the processor 1110, the obtaining of the top-level view corresponding to the first graphical user interface based on the root view includes:

[0193] Start from the root view and perform a traversal process on the view hierarchy corresponding to the first graphical user interface to obtain the top-level view.

[0194] In a possible implementation, among the instructions executed by the processor 1110, the obtaining of the type of information corresponding to the first graphical user interface based on the view information includes:

[0195] Perform a filtering process on the view information to obtain the type of information corresponding to the first graphical user interface.

[0196] In a possible implementation, among the instructions executed by the processor 1110, after performing a traversal process on the top-level view to obtain the view information corresponding to the first graphical user interface, the method further includes:

[0197] Based on the view information, obtain the layout information and the buried point information corresponding to the first graphical user interface;

[0198] Based on the layout information, mark the buried point information on the screenshot image.

[0199] In a possible implementation manner, among the instructions executed by the processor 1110, the step of taking a screenshot of the first graphical user interface of the application during the running of the application to obtain a screenshot image includes:

[0200] During the running of the application, in response to a screenshot instruction, take a screenshot of the first graphical user interface of the application to obtain the screenshot image.

[0201] In a possible implementation manner, among the instructions executed by the processor 1110, the screenshot instruction is generated in the following manner:

[0202] In response to a first trigger operation on the first graphical user interface, generate the screenshot instruction for the first graphical user interface.

[0203] In a possible implementation manner, among the instructions executed by the processor 1110, after taking a screenshot of the first graphical user interface of the application during the running of the application to obtain a screenshot image, the method further includes:

[0204] Determine the trigger position of the first trigger operation;

[0205] Mark the trigger position on the screenshot image.

[0206] As can be seen from the above, based on the knowledge base of the application constructed according to the present disclosure, for any type of information of the application, the user can obtain the screenshot image corresponding to this type of information to help the user understand the functional effects achieved by this type of information.

[0207] Based on the same inventive concept, corresponding to the method of any of the above embodiments, the present disclosure further provides a non-transitory computer-readable storage medium storing computer instructions for causing the computer to execute the method for constructing the knowledge base as described in any of the above embodiments.

[0208] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. The information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory, or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD), or other optical storage, magnetic cassette tapes, magnetic tape magnetic disk storage, or other magnetic storage devices, or any other non-transmission medium that can be used to store information accessible by a computing device.

[0209] The above non-transitory computer-readable storage medium can be any available medium or data storage device accessible by a computer, including but not limited to magnetic memory (such as floppy disks, hard disks, magnetic tapes, magneto-optical discs (MO), etc.), optical memory (such as CDs, DVDs, BDs, HVDs, etc.), and semiconductor memory (such as ROM, EPROM, EEPROM, non-volatile memory (NAND FLASH), solid-state drives (SSD)), etc.

[0210] The computer instructions stored in the storage medium of the above embodiment are used to cause the computer to execute the method for constructing a knowledge base described in any one of the above exemplary method embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be elaborated here.

[0211] Based on the same inventive concept, corresponding to the method for constructing a knowledge base described in any of the above embodiments, the present disclosure also provides a computer program product, which includes computer program instructions. In some embodiments, the computer program instructions can be executed by one or more processors of a computer to cause the computer and / or the processor to execute the method for constructing the knowledge base. Corresponding to the execution subjects of the respective steps in the respective embodiments of the method for constructing the knowledge base, the processors executing the corresponding steps can belong to the corresponding execution subjects.

[0212] The computer program product of the above embodiment is used to cause the computer and / or the processor to execute the method for constructing a knowledge base described in any of the above embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be elaborated here.

[0213] Those skilled in the art will know that the embodiments of the present disclosure can be implemented as a system, method, or computer program product. Therefore, the present disclosure can be specifically implemented in the following forms, namely: complete hardware, complete software (including firmware, resident software, microcode, etc.), or a combination of hardware and software, generally referred to herein as "circuit", "module", or "system". In addition, in some embodiments, the present disclosure can also be implemented in the form of a computer program product in one or more computer-readable media, which contain computer-readable program code.

[0214] Any combination of one or more computer-readable media can be adopted. The computer-readable media can be computer-readable signal media or computer-readable storage media. The computer-readable storage media can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples (non-exhaustive examples) of the computer-readable storage media can include, for example: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, the computer-readable storage media can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

[0215] The computer-readable signal media can include data signals propagated in a baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer-readable signal media can also be any computer-readable media other than the computer-readable storage media, which can send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0216] The program code contained on the computer-readable media can be transmitted by any appropriate medium, including but not limited to wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0217] Computer program code for performing the operations of this disclosure can be written in one or more programming languages or combinations thereof. The programming languages include object-oriented programming languages such as Java, Smalltalk, C++, and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, executed as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or, alternatively, can be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0218] It should be understood that each block of the flowchart and / or block diagram, and combinations of blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine, such that the computer program instructions, when executed by the computer or other programmable data processing apparatus, create means for implementing the functions / operations specified in the blocks of the flowchart and / or block diagram.

[0219] These computer program instructions can also be stored in a computer-readable medium that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable medium produce an article of manufacture including instruction means for implementing the functions / operations specified in the blocks of the flowchart and / or block diagram.

[0220] The computer program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other device, causing a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, such that the instructions executed on the computer or other programmable apparatus provide a process for implementing the functions / operations specified in the blocks of the flowchart and / or block diagram.

[0221] In addition, although the operations of the method of this disclosure are described in a particular order in the figures, this is not required or implied to perform these operations in that particular order, or that all of the illustrated operations must be performed to achieve the desired result. Instead, the steps depicted in the flowchart can be changed in their order of execution. Additionally or alternatively, certain steps can be omitted, multiple steps can be combined into one step for execution, and / or one step can be decomposed into multiple steps for execution.

[0222] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present application. Among them, each box in the flowchart or block diagram may represent a module, a program segment, or a part of code, and the above-mentioned module, program segment, or part of code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the boxes may occur in a different order than that marked in the accompanying drawings. For example, two consecutive boxes shown may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, as well as the combination of boxes in the block diagram or flowchart, can be implemented by a dedicated hardware-based system for performing the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.

[0223] It should be noted that although several modules or units of devices for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present application, the features and functions of the two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.

[0224] Those of ordinary skill in the art should understand that: the discussion of any of the above embodiments is only exemplary and is not intended to imply that the scope of the present application (including the claims) is limited to these examples; under the concept of the present application, the technical features between the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other variations in different aspects of the embodiments of the present application as described above, and they are not provided in detail for the sake of brevity.

[0225] In addition, for the sake of simplicity of description and discussion, and in order not to make the embodiments of the present application difficult to understand, the well-known power / ground connections to integrated circuit (IC) chips and other components may or may not be shown in the provided drawings. In addition, the device may be shown in the form of a block diagram in order not to make the embodiments of the present application difficult to understand, and this also takes into account the fact that the details of the implementation of these block diagram devices are highly dependent on the platform on which the embodiments of the present application are to be implemented (that is, these details should be completely within the understanding of those skilled in the art). In the case where specific details (such as circuits) are set forth to describe the exemplary embodiments of the present application, it will be apparent to those skilled in the art that the embodiments of the present application can be implemented without these specific details or with variations of these specific details. Therefore, these descriptions should be considered illustrative rather than restrictive.

[0226] Although the present application has been described in connection with specific embodiments thereof, many alternatives, modifications, and variations of these embodiments will be apparent to those of ordinary skill in the art in light of the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may be used with the embodiments discussed.

[0227] Embodiments of the present application are intended to cover all such alternatives, modifications, and variations that fall within the broad scope of the appended claims. Accordingly, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the embodiments of the present application shall be included within the protection scope of the present application.

[0228] Although the spirit and principles of the present disclosure have been described with reference to several specific embodiments, it should be understood that the present disclosure is not limited to the specific embodiments disclosed, and the division of each aspect does not mean that the features in these aspects cannot be combined for benefit. This division is only for convenience of expression. The present disclosure is intended to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims. The scope of the appended claims is to be accorded the broadest interpretation so as to encompass all such modifications and equivalent structures and functions.

Claims

1. A method for constructing a knowledge base, characterized in that: include: During the running of the application, taking a screenshot of the first graphical user interface of the application to obtain a screenshot image; Acquire class information corresponding to the first graphical user interface; A correspondence between the screenshot image and the class information is constructed, and the correspondence is stored to obtain a knowledge base of the application.

2. The method according to claim 1, characterized in that After storing the corresponding relationship to obtain the knowledge base of the application, the method further includes: In response to a query request based on target class information, determining a target screenshot image corresponding to the target class information based on the knowledge base; In response to the query request, the target screenshot image corresponding to the target class information is fed back.

3. The method according to claim 1, characterized in that Providing a second graphical user interface through a terminal device, wherein content displayed by the second graphical user interface includes several types of information; After storing the corresponding relationship to obtain the knowledge base of the application, the method further includes: In response to a selection operation on target type information among the plurality of types of information, determining a target screenshot image corresponding to the target type information based on the knowledge base; In the second graphical user interface, the target screenshot image corresponding to the target class information is displayed.

4. The method according to claim 1, characterized in that The obtaining of class information corresponding to the first graphical user interface includes: Obtaining a root view corresponding to the first graphical user interface; Based on the root view, obtaining a top-level view corresponding to the first graphical user interface; Traversing the top-level view to obtain view information corresponding to the first graphical user interface; Based on the view information, the class information corresponding to the first graphical user interface is obtained.

5. The method according to claim 4, characterized in that The obtaining, based on the root view, a top-level view corresponding to the first graphical user interface includes: The view hierarchy corresponding to the first graphical user interface is traversed starting from the root view to obtain the top-level view.

6. The method according to claim 4, characterized in that The obtaining, based on the view information, the class information corresponding to the first graphical user interface includes: The view information is filtered to obtain the class information corresponding to the first graphical user interface.

7. The method according to claim 4, characterized in that After traversing the top-level view to obtain view information corresponding to the first graphical user interface, the method further includes: Based on the view information, obtain layout information and embedding information corresponding to the first graphical user interface; Based on the layout information, the embedding point information is marked on the screenshot image.

8. The method according to claim 1, characterized in that During the running of the application, taking a screenshot of the first graphical user interface of the application to obtain a screenshot image includes: During the running of the application, in response to a screenshot instruction, a screenshot is taken of the first graphical user interface of the application to obtain the screenshot image.

9. The method according to claim 8, characterized in that The screenshot instruction is generated in the following way: In response to a first trigger operation on the first graphical user interface, the screenshot instruction for the first graphical user interface is generated.

10. The method according to claim 9, characterized in that During the running of the application, after taking a screenshot of the first graphical user interface of the application to obtain a screenshot image, the method further includes: determining a trigger position of the first trigger operation; The trigger position is marked on the screenshot image.

11. A device for constructing a knowledge base, characterized in that: include: A screenshot image acquisition module is configured to perform screenshot processing on the first graphical user interface of the application during the running of the application to obtain a screenshot image; a class information acquisition module, configured to acquire class information corresponding to the first graphical user interface; The knowledge base construction module is configured to construct a corresponding relationship between the screenshot image and the class information, store the corresponding relationship, and obtain a knowledge base of the application.

12. An electronic device, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method according to any one of claims 1 to 10 is implemented.

13. A non-transitory computer-readable storage medium, characterized in that: The non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to cause a computer to execute the method according to any one of claims 1 to 10.

14. A computer program product, characterized in that The method comprises computer program instructions, which, when executed on a computer, cause the computer to execute the method according to any one of claims 1 to 10.

Citation Information

Cited By

  • Knowledge base construction method and electronic equipment

    CN121212290A