Method, device and equipment for generating data and readable medium
By determining the input DOM nodes and their associated information in the page, and using machine learning models to generate data groups, the accuracy and comprehensiveness of data generation in automatic generation of test cases of web pages is solved, and efficient and low-cost data generation is achieved.
Patent Information
- Application Number
- CN202411612469.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-12
- Publication Date
- 2025-03-04
AI Technical Summary
In the process of automatically generating test cases on the web page, how to generate an accurate and comprehensive set of data or groups to fill the input file object model DOM nodes has become an urgent problem.
By determining the inputable DOM node in the page, in response to the inputable DOM node being in the initial state, association information corresponding to the inputable DOM node is determined and provided to the first machine learning model to determine at least one set of data sets for indicating the input content of the inputable DOM node.
This method improves the efficiency and comprehensiveness of data generation, reduces costs, and can generate high-quality test cases, covering all verification scenarios of the input box.
Smart Images

Figure CN119557219A_ABST
Abstract
Description
Technical Field
[0001] Example embodiments of the present disclosure generally relate to the field of computer technology, and more particularly, to a method, apparatus, device, and computer-readable storage medium for generating data. Background Art
[0002] In the process of automatically generating test cases for Web (World Wide Web) pages, one or more data sets need to be filled in the input document object model DOM nodes to generate complete test cases. How to generate one or more accurate and comprehensive data sets is an urgent problem to be solved. Summary of the invention
[0003] In a first aspect of the present disclosure, a method for generating data is provided. The method includes: determining an inputtable file object model (DOM) node in a page; in response to the inputtable DOM node being in an initial state, determining association information corresponding to the inputtable DOM node; and providing the association information to a first machine learning model to determine at least one set of data groups, the at least one set of data groups being used to indicate input content of the inputtable DOM node.
[0004] In a second aspect of the present disclosure, a device for generating data is provided. The device includes: a determination module configured to determine an inputtable file object model DOM node in a page; an association module configured to determine association information corresponding to the inputtable DOM node in response to the inputtable DOM node being in an initial state; and an execution module configured to provide the association information to a first machine learning model to determine at least one set of data groups, the at least one set of data groups being used to indicate input content of the inputtable DOM node.
[0005] In a third aspect of the present disclosure, an electronic device is provided. The electronic device includes at least one processing unit; and at least one memory, the at least one memory is coupled to the at least one processing unit and stores instructions for execution by the at least one processing unit, and when the instructions are executed by the at least one processing unit, the electronic device executes the method of the first aspect of the present disclosure.
[0006] In a fourth aspect of the present disclosure, a computer-readable storage medium is provided, wherein a computer program is stored on the computer-readable storage medium, and the computer program can be executed by a processor to perform the method according to the first aspect of the present disclosure.
[0007] In a fifth aspect of the present disclosure, a computer program product is provided, comprising computer executable instructions, wherein the computer executable instructions can be executed by a processor to perform the method according to the first aspect of the present disclosure.
[0008] It should be understood that the contents described in the summary of the invention are not intended to limit the key features or important features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] In the following, in conjunction with the accompanying drawings and with reference to the following detailed description, the above and other features, advantages and aspects of various implementations of the present disclosure will become more apparent. In the accompanying drawings, the same or similar reference numerals represent the same or similar nodes, wherein:
[0010] Figure 1 A schematic diagram showing an example environment in which embodiments of the present disclosure can be implemented;
[0011] Figure 2 A flowchart showing a process of generating data according to some embodiments of the present disclosure;
[0012] Figure 3 A flowchart showing a process of determining that text has semantic meaning according to some embodiments of the present disclosure is shown;
[0013] Figure 4 A schematic structural block diagram showing an apparatus for generating data according to some embodiments of the present disclosure; and
[0014] Figure 5 A block diagram of an electronic device is shown in which one or more embodiments of the present disclosure may be implemented. DETAILED DESCRIPTION
[0015] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although some embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein. On the contrary, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0016] In the description of the embodiments of the present disclosure, the term "including" and similar terms should be understood as open inclusion, that is, "including but not limited to". The term "based on" should be understood as "based at least in part on". The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment". The term "some embodiments" should be understood as "at least some embodiments". Other explicit and implicit definitions may also be included below.
[0017] It should be noted that the acquisition, storage and application of user personal information involved in the technical solution of the present disclosure are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0018] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure 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.
[0019] For example, in response 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 to be performed will require obtaining and using the user's personal information, so that the user can independently choose whether to provide personal information to software or hardware such as electronic devices, applications, servers or storage media that execute operations of the technical solution of the present disclosure based on the prompt message.
[0020] As an optional but non-limiting implementation, in response to receiving an active request from the user, the prompt information is sent to the user in a manner such as a pop-up window, in which the prompt information can be presented in text form. In addition, the pop-up window can also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.
[0021] As used herein, the term "model" can learn the association between the corresponding input and output from the training data, so that after the training is completed, the corresponding output can be generated for a given input. The generation of the model can be based on machine learning technology. Deep learning is a machine learning algorithm that processes inputs and provides corresponding outputs by using multi-layer processing units. A neural network model is an example of a model based on deep learning. In this article, "model" may also be referred to as "machine learning model", "learning model", "machine learning network" or "learning network", and these terms are used interchangeably in this article.
[0022] Generally, machine learning can be roughly divided into three stages, namely the training stage, the testing stage, and the application stage (also called the inference stage). In the training stage, a given model can be trained using a large amount of training data, and the parameter values are continuously updated iteratively until the model can obtain consistent inferences that meet the expected goals from the training data. Through training, the model can be considered to be able to learn the association between input and output (also called input-to-output mapping) from the training data. The parameter values of the trained model are determined. In the testing stage, the test input is applied to the trained model to test whether the model can provide the correct output, thereby determining the performance of the model. The testing stage can sometimes be integrated into the training stage. In the application or inference stage, the trained model can be used to process the actual model input based on the parameter values obtained through training to determine the corresponding model output.
[0023] In the process of generating test cases for page detection, data needs to be automatically filled in for the input DOM nodes in the page. Traditionally, the scheme for generating data is mainly through the following three methods. The first method is to prepare multiple types of fill values (such as strings, numbers, Chinese, English, etc.) in advance, and randomly fill in one or more fill values when encountering an input DOM node. However, this scheme of generating data only in a random way may result in poor quality of the obtained test cases, making it difficult to hit the verification rules of the input box, and almost unable to cover all the verification scenarios of the input box. The second is to fill in manually. In this case, due to the need for manual intervention, the generation cost may be high. The third is to query the matched historical test cases and fill in according to historical data. In this case, if the code is iterated frequently, it may be difficult to match the same historical test cases as the test cases that need to be tested.
[0024] Table 1 below shows an example verification method that is conventionally used.
[0025] Table 1 Traditional example verification
[0026]
[0027]
[0028] In view of this, an embodiment of the present disclosure provides a scheme for generating data. The scheme includes: determining an inputtable DOM node in a page; if the inputtable DOM node is in an initial state, determining association information corresponding to the inputtable DOM node; and then providing the association information to a first machine learning model to determine at least one set of data groups, at least one set of data groups being used to indicate input content of the inputtable DOM node. In this way, the efficiency and comprehensiveness of data generation can be improved, and the cost can also be reduced.
[0029] Figure 1 A schematic diagram of an example environment 100 is shown in which embodiments of the present disclosure can be implemented.
[0030] like Figure 1 As shown, for page 130 for generating test cases, terminal device 110 communicates with server 120 to provide required input data for page 130. In some embodiments, the input data may indicate one or more data groups corresponding to the input content required to be input into a DOM node.
[0031] The terminal device 110 can be any type of mobile terminal, fixed terminal or portable terminal, including mobile phones, desktop computers, laptop computers, notebook computers, netbook computers, tablet computers, media computers, multimedia tablets, personal communication systems (PCS) devices, personal navigation devices, personal digital assistants (PDAs), audio / video players, digital cameras / camcorders, positioning devices, television receivers, radio broadcast receivers, e-book devices, gaming devices, or any combination of the foregoing, including accessories and peripherals of these devices or any combination thereof. In some embodiments, the terminal device 110 can also support any type of interface for the user (such as "wearable" circuits, etc.). The server 120 can be various types of computing systems / servers that can provide computing power, including but not limited to mainframes, edge computing nodes, computing devices in cloud environments, and the like.
[0032] It should be understood that the structure and function of the various elements in the environment 100 are described for exemplary purposes only and do not imply any limitation on the scope of the present disclosure.
[0033] Some example embodiments of the present disclosure will be described below with reference to the accompanying drawings. It should be understood that, hereinafter, the example embodiments will be described mainly with respect to the terminal device 110. It should be understood that the actions described with respect to the terminal device 110 can be performed by the terminal device 110 in collaboration with its service end (e.g., server 120).
[0034] Figure 2 FIG. 2 is a flowchart of a process 200 for generating data according to some embodiments of the present disclosure. The process 200 may be implemented at the terminal device 110. For ease of discussion, reference will be made to FIG. Figure 1 The process 200 is described with reference to the environment 100 of FIG.
[0035] In block 210 , the terminal device 110 determines an importable Document Object Model (DOM) node in the page 130 .
[0036] In some embodiments, the terminal device 110 may use an application without a graphical interface to determine at least one node from the page 130. Then, the terminal device 110 determines an inputtable DOM node from the at least one node.
[0037] In some examples, the application without a graphical interface can indicate a headless browser, which is a browser without an interface but has a complete browser kernel, including a JavaScript parsing engine, a rendering engine, etc. In addition, although the running interface cannot be seen during the execution of the headless browser, we can still use the screenshot function of the GUI test framework to capture the executing page 130. In other examples, if the page 130 is in the form of a browser plug-in, at least one node can be determined by injecting JavaScript.
[0038] In some examples, the input DOM node may indicate at least one of a form input element (input) node, a text area element (textarea) node, and a global attribute (contenteditable) node. Specifically, the form input element may be used to create an interactive space based on the form of page 130 to receive input data. The global attribute is an enumerated attribute that may indicate whether an element may be edited. The text area element is a multi-line plain text editing control that may be used to receive input free-form text (e.g., a comment or feedback form, etc.).
[0039] In block 220 , in response to the inputtable DOM node being in the initial state, the terminal device 110 determines association information corresponding to the inputtable DOM node.
[0040] In some embodiments, the associated information indicates at least one of a prompt text and a label, the prompt text indicates the default input content of the input DOM node, and the label indicates the type of input content of the input DOM node. In some examples, if the interactive DOM node indicates an input box, the default input content may indicate "Please enter your nickname", "Please enter and select your handling type", "Please note that you need to enter the correct format", etc. It will be understood that this is merely exemplary and not restrictive. In other examples, if the interactive DOM node indicates an input box, the label may indicate the text in front of the input box, such as "nickname", "user name", "search content", etc. It will be understood that this is merely exemplary and not restrictive.
[0041] In some examples, the hint text can indicate a placeholder attribute, which can define the text displayed in the control when the input DOM node has no value. In other examples, the label can indicate an element label, that is, the label can indicate a description of the node. For example, the Element.closest() method can be used to obtain the ancestor node closest to the current node (which can also be the current node itself) for a specific selector.
[0042] In some embodiments, the terminal device 110 determines the parent node of the input DOM node. Specifically, the parent node indicates the node of the upper level in the node tree structure of the input DOM node. Then, the terminal device 110 determines whether the text associated with the parent node has semantics. If it is determined that the text has semantics, the terminal device 110 determines the text as the associated information corresponding to the input DOM node.
[0043] In some embodiments, if the terminal device 110 determines that the length of the text in the parent node is greater than a length threshold, it is determined that the text has semantics. In some examples, the terminal device 110 can determine the length threshold according to the language type of the text. For example, assuming that the language type of the text indicates Chinese, the terminal device 110 can determine that the length threshold is 2. It can be understood that this is merely exemplary and not restrictive. In other examples, the terminal device 110 can use a natural language processing (Natural Language Processing, NLP) database to determine whether the text in the parent node has semantics.
[0044] In some embodiments, the terminal device 110 may use a second machine learning model to determine at least part of the associated information and the associated information coordinates from an image associated with the page 130. In some examples, if the inputtable DOM node includes an input box, the terminal device 110 may provide a screenshot associated with the page 130 to the second machine learning model to determine the input box coordinates and the corresponding title text. The terminal device 110 may then use the browser's application programming interface (API) to determine the corresponding inputtable DOM node based on the input box coordinates.
[0045] At block 230 , the association information is provided to a first machine learning model to determine at least one set of data groups.
[0046] In some embodiments, at least one data set is used to indicate input content that can be input into a DOM node. In some embodiments, the first machine learning model is determined based on a configuration file required for page 130. In some examples, the configuration file required for page 130 can indicate at least one of a requirements document, a design document, and an interface document.
[0047] Table 2 below shows that, when the text content of the inputtable DOM node is related to the amount, after the corresponding financial data conditions are input, data under all normal and abnormal scenarios are covered.
[0048] Table 2 Amount data group
[0049]
[0050]
[0051] In other embodiments of the present disclosure, the terminal device 110 may provide a screenshot of a page to a machine learning model to determine at least one set of data.
[0052] Continue to refer to Figure 3 The process of determining whether text in a parent node has semantic meaning is further described.
[0053] Figure 3 FIG. 3 is a flowchart of a process 300 for determining that a text has semantic meaning according to some embodiments of the present disclosure. The process 300 may be implemented at the terminal device 110. For ease of discussion, reference will be made to Figure 1 The process 300 is described with reference to the environment 100 of FIG.
[0054] In block 310 , the terminal device 110 determines that a DOM node may be input.
[0055] In some examples, DOM nodes can be input in the form of a node tree to determine the hierarchy and relationship between each node. Specifically, the nodes in the node tree have a hierarchical relationship with each other, and each node has a corresponding parent node except the top node. In other words, except the top node, each node has a corresponding upper-level node. Assuming that the nodes of the next level of the top node A include node B, node C, node D, and node E, then the parent nodes of node B, node C, node D, and node E are all node A, and node B, node C, node D, and node E may also correspond to the child nodes of the next layer respectively.
[0056] At block 320 , the terminal device 110 determines whether the inputtable DOM node has a parent node.
[0057] In some examples, the terminal device 110 can determine whether the input DOM node has a parent node by determining whether the input DOM node is a top node. If the input DOM node is not a top node, the terminal device 110 can determine that the input DOM node has a parent node, and then block 330 can be executed. If the input DOM node is not a top node, the terminal device 110 can determine that the input DOM node has no parent node, and then block 325 can be executed.
[0058] At block 325 , the terminal device 110 interrupts the process 300 .
[0059] In some examples, if the inputtable DOM node is not a top node, the terminal device 110 may determine that the inputtable DOM node has no parent node and the process 300 may be interrupted.
[0060] At block 330 , the terminal device 110 looks up a parent node.
[0061] In some examples, if the terminal device 110 can determine that the inputtable DOM node has a parent node, the corresponding parent node can be searched to determine the text in the parent node.
[0062] In block 340 , the terminal device 110 determines whether the text in the parent node has semantic meaning.
[0063] In some embodiments, if the length of the text in the parent node is greater than a length threshold, the terminal device 110 can determine that the text has semantics. In some examples, the terminal device 110 can determine the length threshold based on the language type of the text. In other examples, the terminal device 110 can use an NLP database to determine whether the text in the parent node has semantics. In some examples, the text in the parent node can be represented by the inner Text attribute. If the terminal device 110 determines that the text of the parent node does not have semantics, it returns to box 330 and searches for the parent node again. If the terminal device 110 determines that the text of the parent node has semantics, it outputs the text, that is, executes box 350.
[0064] At block 350 , terminal device 110 outputs the text.
[0065] After determining that the text has semantics, the terminal device 110 may determine the text as associated information corresponding to an inputtable DOM node.
[0066] In summary, the embodiments of the present disclosure can generate one or more data groups indicating input content that can be input into a DOM node based on the first machine learning model and the second machine learning model. In this way, the efficiency and comprehensiveness of data generation can be improved, and the cost can also be reduced.
[0067] The embodiments of the present disclosure also provide corresponding devices for implementing the above methods or processes.
[0068] Figure 4 A schematic structural block diagram of an apparatus 400 for generating data according to some embodiments of the present disclosure is shown. The apparatus 400 may be implemented as or included in a terminal device 110. Each module / component in the apparatus 400 may be implemented by hardware, software, firmware, or any combination thereof.
[0069] like Figure 4As shown, the device 400 includes a determination module 410 configured to determine an inputtable file object model DOM node in a page. The device 400 also includes an association module 420 configured to determine association information corresponding to the inputtable DOM node in response to the inputtable DOM node being in an initial state. The device 400 also includes an execution module 430 configured to provide the association information to a first machine learning model to determine at least one set of data groups, and the at least one set of data groups is used to indicate the input content of the inputtable DOM node.
[0070] In some embodiments, the association module 420 is further configured to determine a parent node of the input DOM node; determine whether the text associated with the parent node has semantics; and in response to determining that the text has semantics, determine the text as association information corresponding to the input DOM node.
[0071] In some embodiments, the association module 420 is further configured to determine that the text has semantic meaning in response to determining that the length of the text in the parent node is greater than a length threshold.
[0072] In some embodiments, the association module 420 is further configured to determine at least part of the association information and the association information coordinates from the image associated with the page using a second machine learning model.
[0073] In some embodiments, the determination module 410 is further configured to determine at least one node from the page using an application without a graphical interface; and determine an inputtable DOM node from the at least one node.
[0074] In some embodiments, the associated information indicates at least one of a prompt text and a label, the prompt text indicates a default input content that can be input into the DOM node, and the label indicates a type of input content that can be input into the DOM node.
[0075] In some embodiments, the first machine learning model is determined based on a profile required for the page.
[0076] The units and / or modules included in the device 400 can be implemented in various ways, including software, hardware, firmware, or any combination thereof. In some embodiments, one or more units and / or modules can be implemented using software and / or firmware, such as machine executable instructions stored on a storage medium. In addition to or as an alternative to machine executable instructions, some or all of the units and / or modules in the device 400 can be implemented at least in part by one or more hardware logic components. As an example and not limitation, exemplary types of hardware logic components that can be used include field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0077] It should be understood that one or more steps in the above method can be performed by a suitable electronic device or a combination of electronic devices. Such an electronic device or a combination of electronic devices may include, for example, Figure 1 The terminal device 110 in.
[0078] Figure 5 1 shows a block diagram of an electronic device 500 in which one or more embodiments of the present disclosure may be implemented. It should be understood that Figure 5 The electronic device 500 shown is merely exemplary and should not constitute any limitation on the functionality and scope of the embodiments described herein. Figure 5 The electronic device 500 shown can be used to implement Figure 1 terminal device 110.
[0079] like Figure 5 As shown, the electronic device 500 is in the form of a general electronic device. The components of the electronic device 500 may include, but are not limited to, one or more processors or processing units 510, a memory 520, a storage device 530, one or more communication units 540, one or more input devices 550, and one or more output devices 560. The processing unit 510 may be an actual or virtual processor and is capable of performing various processes according to a program stored in the memory 520. In a multi-processor system, multiple processing units execute computer executable instructions in parallel to improve the parallel processing capability of the electronic device 500.
[0080] The electronic device 500 typically includes a plurality of computer storage media. Such media may be any available media accessible to the electronic device 500, including but not limited to volatile and non-volatile media, removable and non-removable media. The memory 520 may be a volatile memory (e.g., registers, caches, random access memory (RAM)), a non-volatile memory (e.g., a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), flash memory), or some combination thereof. The storage device 530 may be a removable or non-removable medium, and may include a machine-readable medium, such as a flash drive, a disk, or any other medium, which may be capable of being used to store information and / or data and may be accessed within the electronic device 500.
[0081] The electronic device 500 may further include additional removable / non-removable, volatile / non-volatile storage media. Figure 5As shown in , a disk drive for reading or writing from a removable, non-volatile disk (e.g., a "floppy disk") and an optical drive for reading or writing from a removable, non-volatile optical disk may be provided. In these cases, each drive may be connected to the bus (not shown) by one or more data media interfaces. The memory 520 may include a computer program product 525 having one or more program modules that are configured to perform various methods or actions of various embodiments of the present disclosure.
[0082] The communication unit 540 implements communication with other electronic devices through a communication medium. Additionally, the functions of the components of the electronic device 500 can be implemented in a single computing cluster or multiple computing machines that can communicate through a communication connection. Therefore, the electronic device 500 can operate in a networked environment using a logical connection with one or more other servers, a network personal computer (PC), or another network node.
[0083] The input device 550 may be one or more input devices, such as a mouse, a keyboard, a tracking ball, etc. The output device 560 may be one or more output devices, such as a display, a speaker, a printer, etc. The electronic device 500 may also communicate with one or more external devices (not shown) through the communication unit 540 as needed, such as a storage device, a display device, etc., communicate with one or more devices that allow a user to interact with the electronic device 500, or communicate with any device that allows the electronic device 500 to communicate with one or more other electronic devices (e.g., a network card, a modem, etc.). Such communication may be performed via an input / output (I / O) interface (not shown).
[0084] According to an exemplary implementation of the present disclosure, a computer-readable storage medium is provided, on which computer-executable instructions are stored, wherein the computer-executable instructions are executed by a processor to implement the method described above. According to an exemplary implementation of the present disclosure, a computer program product is also provided, which is tangibly stored on a non-transitory computer-readable medium and includes computer-executable instructions, and the computer-executable instructions are executed by a processor to implement the method described above.
[0085] Various aspects of the present disclosure are described herein with reference to the flowcharts and / or block diagrams of the methods, devices, equipment, and computer program products implemented according to the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer-readable program instructions.
[0086] These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processing unit of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0087] Computer-readable program instructions can be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operational steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, so that the instructions executed on the computer, other programmable data processing apparatus, or other device implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0088] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to multiple implementations of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of a module, program segment or instruction includes one or more executable instructions for realizing the logical function of the specification. In some implementations as replacements, the function marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be realized by a special hardware-based system that performs the function or action of the specification, or can be realized by a combination of special hardware and computer instructions.
[0089] The above descriptions of various implementations of the present disclosure are exemplary, non-exhaustive, and not limited to the disclosed implementations. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described implementations. The selection of terms used herein is intended to best explain the principles of the implementations, practical applications, or improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the various implementations disclosed herein.
Claims
1. A method for generating data, comprising: Determine the importable document object model DOM node in the page; In response to the input-enabled DOM node being in an initial state, determining association information corresponding to the input-enabled DOM node; as well as The association information is provided to a first machine learning model to determine at least one set of data groups, wherein the at least one set of data groups is used to indicate input content of the inputtable DOM node.
2. The method according to claim 1, wherein determining the associated information corresponding to the inputtable DOM node comprises: Determine the parent node of the input DOM node; Determining whether text associated with the parent node is semantically meaningful; as well as In response to determining that the text has the semantics, the text is determined as the associated information corresponding to the inputtable DOM node.
3. The method according to claim 2, wherein determining that the text has the semantic meaning comprises: In response to determining that the length of the text in the parent node is greater than a length threshold, it is determined that the text has the semantics.
4. The method according to claim 1, wherein determining the associated information corresponding to the inputtable DOM node further comprises: Using a second machine learning model, at least part of the associated information and the associated information coordinates are determined from an image associated with the page.
5. The method according to claim 1, wherein determining the inputtable DOM nodes in the page comprises: Determine at least one node from the page using an application without a graphical interface; as well as An inputtable DOM node is determined from the at least one node.
6. The method according to claim 1, wherein the associated information indicates at least one of a prompt text and a label, the prompt text indicates a default input content of the inputtable DOM node, and the label indicates a type of input content of the inputtable DOM node.
7. The method of claim 1, wherein the first machine learning model is determined based on a profile required for the page.
8. A device for generating data, comprising: A determination module is configured to determine an inputtable document object model DOM node in a page; an association module configured to determine association information corresponding to the inputtable DOM node in response to the inputtable DOM node being in an initial state; as well as An execution module is configured to provide the association information to a first machine learning model to determine at least one set of data groups, wherein the at least one set of data groups is used to indicate input content of the inputtable DOM node.
9. An electronic device, comprising: at least one processing unit; as well as At least one memory, the at least one memory is coupled to the at least one processing unit and stores instructions for execution by the at least one processing unit, the instructions, when executed by the at least one processing unit, cause the electronic device to perform the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, wherein the computer program can be executed by a processor to implement the method according to any one of claims 1 to 7.
11. A computer program product comprising computer executable instructions, wherein the computer executable instructions, when executed by a processor, implement the method according to any one of claims 1 to 7.