WO2021087818A1 - Method, apparatus and system for capturing knowledge in software - Google Patents

Method, apparatus and system for capturing knowledge in software Download PDF

Info

Publication number
WO2021087818A1
WO2021087818A1 PCT/CN2019/116052 CN2019116052W WO2021087818A1 WO 2021087818 A1 WO2021087818 A1 WO 2021087818A1 CN 2019116052 W CN2019116052 W CN 2019116052W WO 2021087818 A1 WO2021087818 A1 WO 2021087818A1
Authority
WO
WIPO (PCT)
Prior art keywords
software
target
event
screenshot
knowledge
Prior art date
Application number
PCT/CN2019/116052
Other languages
French (fr)
Chinese (zh)
Inventor
陈雪
Original Assignee
西门子股份公司
西门子(中国)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 西门子股份公司, 西门子(中国)有限公司 filed Critical 西门子股份公司
Priority to PCT/CN2019/116052 priority Critical patent/WO2021087818A1/en
Priority to CN201980100741.8A priority patent/CN114430823A/en
Publication of WO2021087818A1 publication Critical patent/WO2021087818A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Definitions

  • the present invention relates to the field of software, in particular to a method, device and system for capturing modeling knowledge.
  • a large amount of useful knowledge data is generated during the user's operation of the software, and it is very meaningful to obtain and use such knowledge data.
  • a large amount of knowledge data is generated in the process of engineering modeling.
  • These knowledge data, especially expert knowledge, are actually very useful. This is because based on this knowledge can help junior engineers provide reference and guidance in their modeling work, so it can improve the efficiency and quality of modeling work.
  • the above process is called knowledge capture and reuse.
  • the first way is to manually input and construct knowledge. Specifically, the necessary knowledge is acquired by interviewing experts, and then the information is constructed manually, but this is a waste of time and requires the cooperation of experts.
  • the second way is to get information from the log file. Specifically, software event log files are generally regarded as the most important resource, which provides first-hand process information.
  • business modeling software does not provide users with these record files, so it is impossible for users to identify and capture knowledge in this way.
  • the third way is to develop the capture function based on the application program interface. Specifically, some software can provide an application program interface, which can be used to develop customized functions, so this is another function that recognizes knowledge and captures it.
  • the first aspect of the present invention provides a knowledge capture method for music software, which includes the following steps: S1, acquiring a screenshot of the software and performing recognition based on the screenshot execution target and its pixel coordinates, wherein the target includes the screenshot Iteratively execute step S1 to obtain a list of the target and its pixels corresponding to the maximum and minimum values on the X-coordinate axis and the Y-coordinate axis, and save it in the first database. , And then perform the following steps: S2, online capture of events based on the software on the software operating device, and map the events in the list to obtain the software operations corresponding to the events; S3, extract the events based on multiple software operations
  • the knowledge graph of the stream is stored in the second database.
  • the pixel coordinates are the coordinates of the target relative to the window where the target is located.
  • the step S1 also includes the following steps: S11, acquiring a screenshot of the software and converting the screenshot into a gray image; S12, performing image segmentation on the screenshot of the gray image based on each target, so as to divide the Each target is positioned in the gray image to obtain the pixel coordinates of the target; S13, using an image matching algorithm to recognize an image-based target, and using an optical character recognition function to recognize a text-based target.
  • step S1 further includes the following step: capturing a simulation operation based on the software on the software operating device to obtain a screenshot of the software and perform recognition based on the screenshot execution target and its pixel coordinates, wherein, The simulation operation is realized by traversing and simulating user operations by software.
  • the simulation operation includes operations on the main interface of the software and its secondary interfaces, wherein the secondary interface is the first interface obtained by performing keyboard, mouse, and keyboard operations once from the main interface of the software, And all operations on the first interface and its sub-interfaces.
  • the list also includes the time stamp when the operation occurred, the name of the related sub-panel, the name of the parent panel, and the key value corresponding to the operation, wherein the key value includes coordinates, input text, and input value.
  • the second aspect of the present invention provides a knowledge capture system for music software, including: a processor; and a memory coupled with the processor, the memory having instructions stored therein, and the instructions cause the
  • the electronic device performs an action, and the action includes: A1, acquiring a screenshot of the software and performing recognition based on the screenshot execution target and its pixel coordinates, wherein the target includes a plurality of functional areas, icons, or
  • step A1 iteratively to obtain a list of the target and its pixels corresponding to the maximum and minimum values on the X-coordinate axis and Y-coordinate axis, and save it in the first database, and then perform the following steps: A2, online Capture an event based on the software on the software operating device, and map the event to the list to obtain the software operation corresponding to the event;
  • A3. Refine the knowledge graph based on the event stream based on multiple software operations and save it in the second database.
  • the pixel coordinates are the coordinates of the target relative to the window where the target is located.
  • the step A1 also includes the following steps: A11, acquiring a screenshot of the software and converting the screenshot into a gray image; A12, performing image segmentation on the screenshot of the gray image based on each target, so as to divide the Each target is located in the gray image to obtain the pixel coordinates of the target; A13, the image matching algorithm is used to recognize the image-based target, and the optical character recognition function is used to recognize the text-based target.
  • step A1 further includes the following step: capturing a simulation operation based on the software on the software operating device to obtain a screenshot of the software and perform recognition based on the screenshot execution target and its pixel coordinates, wherein, The simulation operation is realized by traversing and simulating user operations by software.
  • the simulation operation includes operations on the main interface of the software and its secondary interfaces, wherein the secondary interface is the first interface obtained by performing keyboard, mouse, and keyboard operations once from the main interface of the software, And all operations on the first interface and its sub-interfaces.
  • the list also includes the time stamp when the operation occurred, the name of the related sub-panel, the name of the parent panel, and the key value corresponding to the operation, wherein the key value includes coordinates, input text, and input value.
  • a third aspect of the present invention provides a knowledge capture device for music software, which includes: a knowledge learning module that obtains a screenshot of the software and performs recognition based on the screenshot execution target and its pixel coordinates, wherein the target includes the Take a screenshot of a plurality of functional areas, icons or texts until the target and its pixels correspond to the maximum and minimum lists on the X-coordinate axis and the Y-coordinate axis and save them in the first database: knowledge acquisition device , It captures events based on the software on the software operating device online, maps the events in the list to obtain the software operations corresponding to the events, and refines the knowledge graph based on the event flow based on multiple software operations, and saves them In the second database.
  • the fourth aspect of the present invention provides a computer program product, which is tangibly stored on a computer-readable medium and includes computer-executable instructions that, when executed, cause at least one processor to execute the present invention.
  • the method of the first aspect of the invention is tangibly stored on a computer-readable medium and includes computer-executable instructions that, when executed, cause at least one processor to execute the present invention.
  • the fifth aspect of the present invention provides a computer-readable medium on which computer-executable instructions are stored, and when executed, the computer-executable instructions cause at least one processor to perform the method described in the first aspect of the present invention.
  • the knowledge acquisition mechanism of the software provided by the present invention can learn knowledge offline in advance and save the knowledge in the database, and combine the simple and rapid mapping function to recognize the information, which greatly improves the efficiency.
  • the invention can be applied to many softwares, especially engineering software, and is especially suitable for modeling software.
  • the present invention does not depend on the function of the software itself, nor does it interfere with the modeling process, so it can run independently.
  • the knowledge capture function provided by the present invention runs in the background, so it will not disturb, influence or change the user's operation of the software.
  • the present invention is based on operating system functions, such as windows hook or screenshot function, so it can be applied to a variety of software without affecting the original functions or user interfaces of these software.
  • the present invention is not only suitable for a single software tool, but can also be used for multi-software. For example, when the user needs to switch between multiple software tools, such as co-simulation (multi-software), knowledge is also Can be captured.
  • Fig. 1 is a schematic structural diagram of a knowledge capturing device for modeling according to a specific embodiment of the present invention
  • FIG. 2 is a schematic diagram of the main interface of the modeling software according to a specific embodiment of the present invention.
  • FIG. 3 is a schematic diagram of a primary interface and a secondary interface of the modeling software according to a specific embodiment of the present invention.
  • FIG. 4 is a schematic diagram of another level interface of the main interface of the modeling software according to a specific embodiment of the present invention.
  • Fig. 5 is a schematic diagram of an event flow of a knowledge capture method for modeling according to a specific embodiment of the present invention.
  • Fig. 6 is a schematic diagram of an event flow of a knowledge capture method for modeling according to another specific embodiment of the present invention.
  • Fig. 7 is an object characteristic table of a modeled knowledge acquisition mechanism according to a specific embodiment of the present invention.
  • the present invention provides a software knowledge capture mechanism, which has offline software-based related information acquisition, combined with related information corresponding to the online software operation in the software operation process, to analyze the software operation intention to refine the knowledge graph based on the event flow, In order to complete the entire online and offline combination of modeling software knowledge capture.
  • the software is modeling software, and the present invention will be described below in conjunction with modeling software.
  • Fig. 1 is a schematic structural diagram of a knowledge capturing device for modeling according to a specific embodiment of the present invention.
  • the user usually performs modeling operations on the modeling software 300, where the modeling software 300 is installed on the modeling device, and the knowledge learning module 100 and the knowledge acquisition device 200 provided by the present invention are also embedded on the modeling device. It is used to capture modeling knowledge offline and users perform modeling process at the same time.
  • the present invention mainly includes two modules: a knowledge learning module 100 and a knowledge acquisition device 200.
  • the knowledge learning module 100 is an offline operation module
  • the knowledge acquisition device 200 is an online operation module, which is executed simultaneously during the modeling process.
  • the knowledge learning module 100 includes two sub-modules, namely a primary learning module 110 and a secondary learning module 120.
  • the primary learning module 110 is used to learn the knowledge of the main interface of the modeling software
  • the secondary learning module 120 is used to learn the knowledge of the secondary interface of the main interface of the modeling software.
  • the primary learning module 110 includes a first image acquisition module 111 and a first optical character recognition module 112
  • the secondary learning module 120 includes an event simulation module 121, a second image acquisition module 121, and a second optical character recognition module 122.
  • the knowledge learning module 100 performs offline knowledge learning data stored in the first database DB1.
  • the knowledge acquisition device 200 includes an event capture module 210 and a refinement analysis device 220.
  • the mouse capture module 211 in the event capture module 210 is used to capture mouse operations
  • the keyboard capture module 212 in the event capture module 210 is used to capture keyboard operations.
  • the refining analysis module 220 further includes two sub-modules, including a mapping module 221 and a refining module 222, respectively.
  • the mapping module 221 maps the event based on the modeling software on the online capturing modeling device to the data in the first database DB1 to obtain the modeling operation issued to the modeling software of the modeling device corresponding to the event .
  • the refinement module 222 refines the knowledge graph based on the event flow based on a plurality of modeling operations, and saves the knowledge graph in the second database DB2.
  • the modeling device is a personal computer
  • the operating system of the personal computer is Windows.
  • the simulation operation includes operations on the main interface of the software and its secondary interfaces, wherein the secondary interface is the first interface obtained by performing keyboard, mouse, and keyboard operations once from the main interface of the software, And all operations on the first interface and its sub-interfaces.
  • the first aspect of the present invention provides a method for capturing modeling knowledge, which includes the following steps.
  • step S1 is executed.
  • the knowledge learning module 100 obtains a screenshot of the modeling software and performs recognition based on the screenshot execution target and its pixel coordinates, where the target includes a plurality of functional areas on the modeling software screenshot, Icon or text.
  • the primary learning module 110 in the knowledge learning module 100 is used to learn the knowledge of the main interface of the modeling software
  • the secondary learning module 120 is used to learn the knowledge of the secondary interface of the main interface of the modeling software.
  • the step S1 includes a sub-step S11, a sub-step S12, and a sub-step S13.
  • the first image acquisition module 111 acquires a screenshot of the main interface of the modeling software 300 and converts the screenshot of the main interface into a gray image.
  • the image color conversion refers to the conversion of the color RGB image of the main interface into a gray image.
  • the gray image needed to perform the subsequent process.
  • the main interface of the modeling software 300 shown in FIG. 2 is a converted gray image.
  • the image segmentation device (not used) in the primary learning module 110 performs image segmentation on the screenshot of the gray image based on each target, wherein the target includes a complex number on the screenshot of the modeling software. Functional areas, icons or text. Therefore, image segmentation is to locate the main functional areas in the image to obtain the location of each target in the gray image, such as the command bar 510, the tool bar 520, and the white modeling area 530 of the main interface 500 in FIG. 2.
  • sub-step S13 is executed.
  • the first image acquisition module 111 uses an image matching algorithm to recognize image-based objects
  • the first optical character recognition module 112 uses an optical character recognition function to recognize text-based objects.
  • Fig. 2 is a schematic diagram of the main interface of the modeling software according to a specific embodiment of the present invention.
  • the main interface 500 of the modeling software includes a command bar 510, a tool bar 520 and a modeling area 530.
  • the toolbar 520 has multiple tabs, and after clicking each tab, each tab also has multiple buttons to choose from.
  • the following uses the label 521 "Resources" in the toolbar 520 as an example to describe the image recognition of the present invention.
  • the label 521 "Resources" is a rectangle, the coordinates of the upper left corner of the rectangle are (X min , Y min ), and the coordinates of the lower right corner of the rectangle are (X max , Y max ), so if the mouse clicks in this area , It is considered that the operator has clicked the label 521 "Resources”.
  • the present invention further performs pattern recognition after finding the functional area to correspond to the label 521" Button 5211 "worker” on Resources”.
  • the button 5211 "worker” is a rectangle, the coordinates of the upper left corner of the rectangle are (X min , Y min ), and the coordinates of the lower right corner of the rectangle are (X max , Y max ), so if the mouse clicks in this area , It is considered that the operator has clicked the button 5211 "worker”.
  • the operator is operating the icon 541 "MaterialFlow” in the side window 540 "basis" on the left side of the modeling software main interface 500 as shown in FIG. 2, and the icon 541 "MaterialFlow” Located in the window on the left side of the main interface 500 of the modeling software shown throughout, the side window 540 "basis” is a tree structure.
  • the present invention has different algorithms for image recognition for different types of icons in the software interface.
  • the optical character recognition function is introduced next.
  • the mouse action objects and their types, characteristics, and positions are listed on the sub-panel "Models.Frame.TestStation1".
  • the objects are recorded in the form of images, and the object types include numerical boxes, Label items, check boxes, and menu items.
  • the object feature of the value box is "A rectangle with a large blank area” (A rectangle with a large blank area), and its position is "on the left of the mouse cursor” (on the left of mouse click).
  • the object feature of the label item is "A narrow rectangle-like shape, but no 4 edge-contour” (A narrow rectangle-like shape, but no 4 edge-contour), and its position is "at the mouse cursor position” (at the mouse position).
  • the object feature of the check box is "A square blank area” (A square blank), and its position is “On the right of the mouse” (On the right of the mouse).
  • the object feature of the menu item is "The position on the Y coordinate is very close to the origin of the window (the upper left corner of the window), and there is no outline near the mouse position” (Y position is quite close to the origin of the window (top left corner of the window) ), no contour around the mouse position, and its position is "at the mouse position”.
  • an area of interest is generated according to the object type and object position, and the area of interest is stored as an enlarged sub-image.
  • the optical character recognition module (not used) can determine the object type based on the above object characteristics, and based on the object type and object position, generate a region of interest (ROI) as shown in FIG. 4, where the interest is The area ROI is generated based on the position of the object.
  • the optical character recognition module crops the original screenshot shown in FIG. 4 into a sub-image ROI' based on the region of interest ROI.
  • the mapping module 221 enlarges the above-mentioned sub-image ROI'.
  • the optical character recognition module executes the optical character recognition function to obtain the text on the sub-image, and the information in the timetable is matched with the text of the object and a second event record table is generated.
  • the recognition module (not used) is used to perform Optical Character Recognition (OCR, Optical Character Recognition).
  • OCR Optical Character Recognition
  • the recognition module converts the text on the sub-image Extracted, therefore, we can get the name of the value box and the text "Processing time: Const" on the sub-image. Therefore, therefore, the knowledge structure constructed by the present invention for the main interface 500 of the modeling software is as shown in the following table:
  • Table 1 The structure of the main interface 500 of the modeling software 300
  • the main components of the main interface 500 of the modeling software include a command bar 510, a tool bar 520, and a side window 540.
  • the command bar 510 has a minimum X min and a maximum X max of its pixels on the X axis, and its pixel coordinates in Y.
  • the minimum value Y min and the maximum maximum value Y max of the axis have other required information.
  • the sub-components of the command bar 510 include the label 511 "Home”, the label 512 "Debugger", and the label 513 "Window”...
  • the label 511 "Home” has the minimum value X min and the maximum value X of its pixels on the X axis.
  • the label 512 "Debugger” has the minimum value X min and maximum value X max of its pixels on the X axis and the minimum value of its pixel coordinates on the Y axis.
  • the sub-components of the toolbar 520 include the label 522 “Material Flow", the label 523 “Fluids”... and the minimum and maximum values of the pixels on the X axis and the Y axis, respectively.
  • the secondary components of the side window 540 include the label 541 "Material Flow", the label 542 "Fluids"...
  • the sub-component label 511 "Home” includes the buttons “Event Controller”, “Reset” and “Start/Stop” and the minimum and maximum values of their pixels on the X-axis and Y-axis, respectively.
  • the secondary component label 512 "Debugger” includes button 1 and button 2
  • the label 513 “Window” includes button 3 and button 4
  • the label 522 "Material Flow” includes the buttons “Connector”, “Source” and “SingleProc”.
  • the label 523 "Fluids” includes button 5 and button 6, the secondary component label 541 "Material Flow” includes buttons “Connector”, “Source” and “SingleProc”, and the secondary component label 542 "Fluids” includes button 7 and button 8.
  • the present invention decomposes the construction of the main software interface into multiple layers.
  • the knowledge included is hierarchical.
  • the first layer includes main components, each layer of main components includes multiple secondary components, and each layer requires multiple components. Buttons.
  • Each of the above-mentioned layers includes the area covered by the minimum and maximum values of its pixels on the X-axis and Y-axis, respectively, covering the value range, or some other information is used to describe these components. Therefore, this knowledge is goal-oriented, and it can be saved in many formats, such as JSON files, ontology files, xml files, or others.
  • the target identification and positioning of the secondary interface 600 is similar to that of the main interface 500.
  • the target identification and positioning of the primary interface and the secondary interface are The difference of the mechanism is that the main interface 600 needs to be operated to expand the secondary interface, and the relationship between multiple targets needs to be paid attention to.
  • the secondary learning module 120 is used to acquire knowledge of the secondary interfaces below the main interface of the modeling software, where the secondary interface is an interface displayed after the main interface of the modeling software is operated once, and it mainly includes Secondary window list or drop-down menu.
  • the secondary interface 6 is activated by clicking some buttons under the main interface.
  • the simulator 121 is designed as an operation of the secondary interface displayed after the main interface of the modeling software once.
  • the operation includes but not limited to keyboard operation, mouse operation, and touch screen operation.
  • the simulator 121 is a mouse click simulator, which simulates the function of completing the main interface of the click modeling software, and simulates the action of the mouse click to open the secondary interface that needs to be learned.
  • the goals of the secondary interface include many types and have many levels, and the layout of the secondary interface is very detailed.
  • the emulator 121 provided by the present invention opens a secondary interface, and when the target secondary interface is opened, a screenshot of the secondary interface is automatically taken to obtain an image of a window, and then the automatic learning process is executed.
  • the secondary interface knowledge learning process is similar to the primary interface knowledge learning process, including graphics color conversion, graphics segmentation, pattern matching and optical character recognition functions.
  • sub-step S21, sub-step S22, and sub-step S23 need to be executed.
  • a secondary interface type of SingleProc includes a menu bar 610, a tab bar 620, and other areas, such as character boxes 630 and 640, and check boxes.
  • the menu bar 610 has the minimum value X min and maximum value X max of its pixels on the X axis and the minimum value Y min and maximum value Y max of its pixel coordinates on the Y axis.
  • the menu bar 610 has the label 610 "Navigate” and the label 620 “View”, label 630 “Tools”, label 640 "Help”, label 610 "Navigate”, label 620 “View”, label 630 "Tools” and label 640 "Help” also have their smallest pixels on the X axis.
  • the label 612 "Navigate” also includes the list item 6121 “Open Location”, the list item 6122 “Open Origin”, the list item 6123 “Go to Origin” and the list item 6124 "Open Class Alt+Home", of which the list item 6121 “Open Location”, list item 6122 “Open Origin”, list item 6123 “Go to Origin” and list item 6124 "Open Class Alt+Home” also have the minimum X min and maximum X max of its pixels on the X axis. And the minimum value Y min and maximum maximum value Y max of its pixel coordinates on the Y axis.
  • the label column 620 includes the label 621 “Time”, the label 622 “Set-up” and the label 623 "Failures”.
  • the label 621 “Time” includes the character box 6211 "Processing Time”, the character box 6212 “Set-up Time”... the character box 6211 “Processing Time”, the character box 6212 “Set-up Time”, etc. also have their pixels in X.
  • the label 622 "Set-up” includes the buttons “Entrance” and “Exit”.
  • the buttons "Entrance” and “Exit” also have the minimum X min and maximum X max of the pixels on the X axis, and the pixel coordinates in the The minimum value Y min and the maximum value Y max of the Y axis.
  • the knowledge structure constructed by the present invention for the secondary interface of the main interface 500 of the modeling software is as shown in the following table:
  • Table 2 The structure of the secondary interface of the main interface 500 of the modeling software 300
  • the present invention decomposes the construction of the software secondary interface into multiple layers.
  • the secondary interface is regarded as a target, which includes different components, and each component is also regarded as a target, which can have secondary components, and each Each component has coordinate values.
  • the types of components include, for example, a digital fan, a command button, or a switch key. Then the mapping function module will track this hierarchical structure to illustrate the event target name and location.
  • step S1 Iteratively executed to step S1, to obtain a list of the target pixel and respectively correspond to the X-axis and Y axes, and the maximum and minimum values stored in the first database DB 1.
  • all operations of the main interface 500 of the modeling software and all of its secondary interfaces are targeted for identification and positioning, that is, the targets and their pixels of all operations in all subsequent modeling processes are separated corresponding to the X-axis and Y coordinate axes, and a list of maximum and minimum values stored in the first database DB 1.
  • Target recognition and positioning of all operations on the main interface 500 of the modeling software and all of its secondary interfaces can be achieved by traversing the software to simulate user clicks.
  • step S1 further includes the following step: capturing a simulation operation based on the software on the software operating device to obtain a screenshot of the software and perform recognition based on the screenshot execution target and its pixel coordinates, wherein, The simulation operation is realized by traversing and simulating user operations by software.
  • step S2 is executed.
  • the event capturing module 210 of the knowledge acquisition device 200 captures an event based on the modeling software 300 on the modeling device online, and the mapping module 221 maps the event to the target and its pixels correspond to the X coordinate axis and In the list of the maximum value and the minimum value on the Y coordinate axis, the modeling operation issued to the modeling software 300 of the modeling device corresponding to the event can be obtained.
  • the mouse capture module 211 captures mouse actions based on modeling software
  • the keyboard capture module 212 is used to capture keyboard actions.
  • the event capture module 210 preferably further includes a touch screen capture module (not shown), which is used to capture touch screen actions. Therefore, once the event capturing module 210 of the knowledge acquisition device 200 online captures the operations of the mouse, keyboard, and touch screen on the modeling device based on the modeling software 300, the Windows hook function will capture the interaction between the mouse, keyboard, and touch screen.
  • Information related to the operation of the screen including the above-mentioned actions and the time stamp when the above-mentioned actions occurred, the names of the related sub-panels, the names of the parent panels, and the key values of the above-mentioned actions on the modeling software generate a first event record table.
  • the key value includes coordinates, input text, and input value.
  • Each keyboard, mouse, and touch screen operation is regarded as an event, and the first event record table shown below is generated:
  • Table 1 saves event records in .csv format.
  • the time stamp represents the time when the action was executed. Specifically, “Thu Mar2614:59:30 2019” means that it was done at 14:59:30 PM on March 26, 2019. "Mouse left down” is the action of clicking the left mouse button, and then “Key down” is made on “Thu Mar26 14:59:322019” at 14:59:32 PM on March 26, 2019, which is the keyboard The typing action, followed by "Thu Mar26 14:59:33 2019” at 14:59:33 PM on March 26, 2019, a "Key down” was made, that is, the keyboard typing action, the input character was "20".
  • the engineer has completed a left mouse click on the user interface of the modeling software and entered information through the keyboard, and the information includes two characters.
  • the name of the sub-panel and the name of the parent panel both indicate the panel on the user interface of the modeling software.
  • the key value represents the coordinates on the user interface. Therefore, the position of the left mouse button above is specifically in the sub-panel.
  • the specific coordinates are (1340,630).
  • the sub-panel "Models.Frame.TestStation1" belongs to the parent panel ".Models.Frame”.
  • the window position of "Models.Frame.TestStation1" is the coordinates (1090, 454)".
  • the window system cannot obtain enough meaningful modeling software
  • the name of the text box text box name
  • the name of the value box box name
  • the mapping module 221 maps the event to the target and its pixels in a list corresponding to the maximum and minimum values on the X-coordinate axis and the Y-coordinate axis, respectively, wherein, according to the above-mentioned embodiment of the present invention,
  • Table 2 is one of the secondary interfaces 600 of the primary interface 500, and the primary interface 500 must also include other secondary interfaces.
  • the window type is "SingleProc”
  • the window type of "SingleProc” is "Time label”.
  • each event is not isolated from each other, some events need to refer to some previous events. For example, in this embodiment, if the label clicked here is not a label switch, the default label should be "time label”. Then what needs to be mapped is the secondary target to the window "Processing times" and the number box.
  • the pixel coordinates are the coordinates of the target relative to the window where the target is located. For example, take the coordinates of the upper left corner of the software window where the target is located as the origin, because the position of the target relative to the upper left corner of the window where it is located remains unchanged.
  • step S3 the extraction module 222 based on a plurality of modeling operations to extract the knowledge-based event stream pattern, and stored in the second database DB 2.
  • the user’s modeling intention on the modeling software is the event "Set_item[Process time]on_sub_panel” and "Keyboard input[20]for[Process time]on_sub_panel".
  • the event "Set_item[Process time] on_sub_panel” indicates that the modeling intention is to issue a command to operate the modeling software to set "Process times” (execution time) on the modeling device in response to the above-mentioned mouse action.
  • events and data nodes are saved as a knowledge graph and saved in the second database DB 2 for subsequent analysis.
  • the events shown in Table 4 are stored as the knowledge graph shown in Figure 5.
  • the type of event 1 is mouse action, and the timestamp of event 1 "Set_item[Process time]on_sub_panel” is "Thu Apr 26 14:59:31 2018", the location of event 1 is "Technomatix Observer_example1_rev3_0.spp-.[.Models.Frame.Test Station1]", and the key value of event 1 is the coordinate "(1340, 630)".
  • event 2 Keyboard input[20]for[Process time]on_sub_panel” is keyboard action
  • time stamp of event 1 is "Thu Apr 26 14:59:33 2018”
  • location of event 2 is "Technomatix Observer_example1_rev3_0. spp-.[.Models.Frame.Test Station1]”
  • key value of event 2 is the keyboard input value "20”.
  • the relationship between event 1 and event 2 is: the previous event of event 2 is "event 1", and the next event of event 1 is "event 2".
  • the user uses the left mouse button to click the four components in the label 522 "Material Flow” in the toolbar 520 in the main interface 500, and drag them to the modeling area 530.
  • the components are "Source”, “SingleProc”, “ParallelProc” and “Drain”, then double-click to open the component “SingleProc", and then enter "2:00" in the number box following "Processing time”. Then record the above user operation as the first event record table as shown below:
  • Table 5 The first event record table
  • mapping module 221 performs the mapping function
  • refining module 222 performs the refining function.
  • the event “Create_object[SingleProc]” indicates that the modeling intention is to send a command to the modeling device to operate the modeling interface of the modeling software in response to the mouse action.
  • the user completed a left mouse button at (673,552) on the sub-panel ".Model.Frame” of the parent panel “Example.spp” on the modeling software interface.
  • the action of the click indicates that the modeling intention is to issue a command to the modeling device to operate the ParallelProc component on the modeling interface of the modeling software in response to the above-mentioned mouse action.
  • the event "Set_item[Processing Time] on_sub_panel” indicates that the modeling intention is to send a command to operate the modeling software to set the “Process time” (execution time) of the modeling device in response to the mouse action described above.
  • the user completed a keyboard action on the sub-panel ".Model.Frame.SingleProc” of the parent panel "Example.spp” on the modeling software interface.
  • the event “keyboard input[2] for [Processing Time] on_sub_panel” indicates that the modeling intention is to issue a command to operate the modeling software input execution time "2" to the modeling device in response to the above keyboard action. It should be noted that the modeling software automatically recognizes the "2" input by the user as "2:00".
  • the refinement module 222 refines the knowledge graph based on the event flow based on a plurality of modeling operations, and saves the knowledge graph in the second database DB 2 .
  • the knowledge graph of the event stream includes event 3, event 4, event 5, event 6, event 7 and event 8.
  • the above events form an event stream in the order of execution.
  • the type of event 3 "Create_object[Source]” is a mouse action
  • the time stamp of event 3 is "5/22/2018 10:53:20”
  • the location of event 3 is "Example.spp–[.Model.Frame ]”
  • the key value of event 4 "Create_object[SingleProc]" is the coordinate "(515,551)".
  • the type of event 4 is a mouse action
  • the time stamp of event 4 is "5/22/2018 10:53:23”
  • the location of event 4 is "Example.spp–[.Model.Frame]”
  • the time stamp of event 4 is "Example.spp–[.Model.Frame]”.
  • the key value is the coordinate "(587,546)”.
  • the type of event 5 "Create_object[ParallelProc]” is a mouse action
  • the time stamp of event 5 is "5/22/2018 10:53:25”
  • the location of event 5 is "Example.spp–[.Model.Frame ]”
  • the key value of event 5 is the coordinate "(673,552)”.
  • the type of event 6 "Create_object[Drain]” is a mouse action
  • the time stamp of event 6 is "5/22/2018 10:53:28”
  • the location of event 6 is "Example.spp–[.Model.Frame ]”
  • the key value of event 6 is the coordinate "(757,550)”.
  • the type of event 7 is a mouse action
  • the time stamp of event 7 is "5/22/2018 10:53:34”
  • the location of event 7 is "Example.spp–[.Model.Frame.SingleProc]”
  • the event 7 The key value of "Set_item[Processing Time]on_sub_panel” is the coordinate "(21,1187)”.
  • the type of event 8 is keyboard action
  • the time stamp of event 8 is "5/22/2018 10:53:37”
  • the location of event 8 "keyboard input[2]for[Processing Time]on_sub_panel” is "Example. spp–[.Model.Frame.SingleProc]”
  • the key value of event 8 is keyboard input "2".
  • event 3 and event 4 the previous event of event 4 is "event 3", and the next event of event 3 is "event 4".
  • event 4 and event 5 the previous event of event 5 is "event 4", and the subsequent event of event 4 is "event 5".
  • event 5 and event 6 the previous event of event 6 is event 5, and the next event of event 5 is "event 6".
  • event 6 and event 7 the previous event of event 7 is "event 6"
  • the next event of event 6 is "event 7”.
  • event 7 and event 8 is: the previous event of event 8 is "event 7", and the next event of event 7 is "event 8”.
  • the present invention sets the learning module to run offline, which is more efficient and faster.
  • the second aspect of the present invention provides a knowledge capture system for music software, including: a processor; and a memory coupled with the processor, the memory having instructions stored therein, and the instructions cause the
  • the electronic device performs an action, and the action includes: A1, acquiring a screenshot of the software and performing recognition based on the screenshot execution target and its pixel coordinates, wherein the target includes a plurality of functional areas, icons, or
  • step A1 iteratively to obtain a list of the target and its pixels corresponding to the maximum and minimum values on the X-coordinate axis and Y-coordinate axis, and save it in the first database, and then perform the following steps: A2, online Capture an event based on the software on the software operating device, and map the event to the list to obtain the software operation corresponding to the event;
  • A3. Refine the knowledge graph based on the event stream based on multiple software operations and save it in the second database.
  • the pixel coordinates are the coordinates of the target relative to the window where the target is located.
  • the step A1 also includes the following steps: A11, acquiring a screenshot of the software and converting the screenshot into a gray image; A12, performing image segmentation on the screenshot of the gray image based on each target, so as to divide the Each target is located in the gray image to obtain the pixel coordinates of the target; A13, the image matching algorithm is used to recognize the image-based target, and the optical character recognition function is used to recognize the text-based target.
  • step A1 further includes the following step: capturing a simulation operation based on the software on the software operating device to obtain a screenshot of the software and perform recognition based on the screenshot execution target and its pixel coordinates, wherein, The simulation operation is realized by traversing and simulating user operations by software.
  • the simulation operation includes operations on the main interface of the software and its secondary interfaces, wherein the secondary interface is the first interface obtained by performing keyboard, mouse, and keyboard operations once from the main interface of the software, And all operations on the first interface and its sub-interfaces.
  • the list also includes the time stamp when the operation occurred, the name of the related sub-panel, the name of the parent panel, and the key value corresponding to the operation, wherein the key value includes coordinates, input text, and input value.
  • a third aspect of the present invention provides a knowledge capture device for music software, which includes: a knowledge learning module that obtains a screenshot of the software and performs recognition based on the screenshot execution target and its pixel coordinates, wherein the target includes the Take a screenshot of a plurality of functional areas, icons or texts until the target and its pixels correspond to the maximum and minimum lists on the X-coordinate axis and the Y-coordinate axis and save them in the first database: knowledge acquisition device It captures events based on the software on the software operating device online, maps the events to the list to obtain the software operations corresponding to the events, and refines the knowledge graph based on the event flow based on multiple software operations, and saves them In the second database.
  • the fourth aspect of the present invention provides a computer program product, which is tangibly stored on a computer-readable medium and includes computer-executable instructions that, when executed, cause at least one processor to execute the present invention.
  • the method of the first aspect of the invention is tangibly stored on a computer-readable medium and includes computer-executable instructions that, when executed, cause at least one processor to execute the present invention.
  • the fifth aspect of the present invention provides a computer-readable medium on which computer-executable instructions are stored, and when executed, the computer-executable instructions cause at least one processor to perform the method described in the first aspect of the present invention.
  • the knowledge acquisition mechanism of the software provided by the present invention can learn knowledge offline in advance and save the knowledge in the database, and combine the simple and rapid mapping function to recognize the information, which greatly improves the efficiency.
  • the invention can be applied to many softwares, especially engineering software, and is especially suitable for modeling software.
  • the present invention does not depend on the function of the software itself, nor does it interfere with the modeling process, so it can run independently.
  • the knowledge capture function provided by the present invention runs in the background, so it will not disturb, influence or change the user's operation of the software.
  • the present invention is based on operating system functions, such as windows hook or screenshot function, so it can be applied to a variety of software without affecting the original functions or user interfaces of these software.
  • the present invention is not only suitable for a single software tool, but can also be used for multi-software. For example, when the user needs to switch between multiple software tools, such as co-simulation (multi-software), knowledge is also Can be captured.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

A method for capturing knowledge in software, the method comprising the following steps: S1, acquiring a captured screen of the software and identifying a target and pixel coordinates thereof on the basis of the captured screen, wherein the target comprises a plurality of functional regions, icons or characters on the captured screen, iteratively performing step S1 to acquire a list of maximum values and minimum values on an X-coordinate axis and a Y-coordinate axis respectively corresponding to the target and the pixels thereof, and storing the list in a first database, and then performing the following steps: S2, capturing, online, a software-based event on a software operation apparatus, and mapping the event into the list to acquire a software operation corresponding to the event; and S3, extracting an event stream-based knowledge graph on the basis of a plurality of software operations, and storing the knowledge graph in a second database. The method is high in speed and efficiency, has no impact on the operations of a user with regards to the software, and is applicable to various types of software, in particular modeling software.

Description

软件知识捕捉方法、装置和系统Software knowledge capture method, device and system 技术领域Technical field
本发明涉及软件领域,尤其涉及建模知识捕捉方法、装置和系统。The present invention relates to the field of software, in particular to a method, device and system for capturing modeling knowledge.
背景技术Background technique
在用户操作软件的过程中产生了大量有用的知识数据,获取并利用这样的知识数据非常有意义。例如,在工程建模过程中产生了大量知识数据,这些知识数据尤其是专家知识其实非常有用。这是由于基于这些知识能够帮助初级工程师在他们的建模工作中提供参考和引导,因此能够改善建模工作的效率和质量。上述过程被称为知识捕捉和复用。A large amount of useful knowledge data is generated during the user's operation of the software, and it is very meaningful to obtain and use such knowledge data. For example, a large amount of knowledge data is generated in the process of engineering modeling. These knowledge data, especially expert knowledge, are actually very useful. This is because based on this knowledge can help junior engineers provide reference and guidance in their modeling work, so it can improve the efficiency and quality of modeling work. The above process is called knowledge capture and reuse.
如今知识捕捉主要通过三种方式。第一种方式是人工输入和构建知识,具体地,通过采访专家来获取必要的知识,然后人工构建这些信息,但是这非常浪费时间并需要专家的合作。第二种方式是从记录文件获取信息。具体地,软件事件记录文件通常被认为是最重要的资源,其提供了第一手过程信息。然而,绝大部分时间中商业建模软件并不给用户提供这些记录文件,因此对用户来说通过这种方式识别知识并捕捉并不可能。第三种方式是基于应用程序接口发展捕捉功能。具体地,一些软件能够提供应用程序接口,其能够被用于发展定制功能,因此这是另一种识别知识并捕捉的功能。Nowadays, there are three main ways to capture knowledge. The first way is to manually input and construct knowledge. Specifically, the necessary knowledge is acquired by interviewing experts, and then the information is constructed manually, but this is a waste of time and requires the cooperation of experts. The second way is to get information from the log file. Specifically, software event log files are generally regarded as the most important resource, which provides first-hand process information. However, most of the time, business modeling software does not provide users with these record files, so it is impossible for users to identify and capture knowledge in this way. The third way is to develop the capture function based on the application program interface. Specifically, some software can provide an application program interface, which can be used to develop customized functions, so this is another function that recognizes knowledge and captures it.
因此,针对建模的知识捕捉现有技术需要解决的问题主要是:一些建模软件并不提供给用户包括建模过程信息的记录文件,也不提供给用户应用程序接口来捕捉建模过程信息。并且。用户界面的开发是用图表示的,而并非是脚本文件,这使得在建模过程中识别知识并且捕捉更加困难。Therefore, the problems that need to be solved in the prior art for knowledge capture of modeling are mainly: some modeling software does not provide users with record files including modeling process information, nor does it provide users with application program interfaces to capture modeling process information. . and. The development of the user interface is represented by graphs, not script files, which makes it more difficult to identify and capture knowledge in the modeling process.
发明内容Summary of the invention
本发明第一方面提供乐软件的知识捕捉方法,其中,包括如下步骤:S1,获取所述软件的截屏并进行基于该截屏执行目标及其像素坐标的识 别,其中,所述目标包括所述截屏上的复数个功能区域、图标或文字,迭代执行步骤S1,以获取所述目标及其像素分别对应于X坐标轴和Y坐标轴上的最大值和最小值的列表并保存于第一数据库中,然后执行如下步骤:S2,在线捕捉软件操作装置上基于该软件的事件,将所述事件映射于所述列表中以获取该事件所对应的软件操作;S3,基于复数个软件操作提炼基于事件流的知识图谱,并保存于第二数据库中。The first aspect of the present invention provides a knowledge capture method for music software, which includes the following steps: S1, acquiring a screenshot of the software and performing recognition based on the screenshot execution target and its pixel coordinates, wherein the target includes the screenshot Iteratively execute step S1 to obtain a list of the target and its pixels corresponding to the maximum and minimum values on the X-coordinate axis and the Y-coordinate axis, and save it in the first database. , And then perform the following steps: S2, online capture of events based on the software on the software operating device, and map the events in the list to obtain the software operations corresponding to the events; S3, extract the events based on multiple software operations The knowledge graph of the stream is stored in the second database.
进一步地,所述像素坐标为所述目标相对于该目标所在窗口的坐标。Further, the pixel coordinates are the coordinates of the target relative to the window where the target is located.
进一步地,所述步骤S1还包括如下步骤:S11,获取所述软件的截屏并将该截屏转化为灰色图像;S12,对所述灰色图像的截屏基于每个目标执行图像分割,以将所述每个目标在所述灰色图像中进行定位以获得所述目标的像素坐标;S13,利用图像匹配算法识别基于图像的目标,以及利用光学字符识别功能识别基于文字的目标。Further, the step S1 also includes the following steps: S11, acquiring a screenshot of the software and converting the screenshot into a gray image; S12, performing image segmentation on the screenshot of the gray image based on each target, so as to divide the Each target is positioned in the gray image to obtain the pixel coordinates of the target; S13, using an image matching algorithm to recognize an image-based target, and using an optical character recognition function to recognize a text-based target.
进一步地,在所述步骤S1还包括如下步骤:捕捉所述软件操作装置上基于该软件的模拟操作,以获取所述软件的截屏并进行基于该截屏执行目标及其像素坐标的识别,其中,所述模拟操作是通过软件遍历模拟用户操作来实现。Further, the step S1 further includes the following step: capturing a simulation operation based on the software on the software operating device to obtain a screenshot of the software and perform recognition based on the screenshot execution target and its pixel coordinates, wherein, The simulation operation is realized by traversing and simulating user operations by software.
进一步地,所述模拟操作包括对软件的主界面及其次级界面的操作,其中,所述次级界面是从所述软件的主界面执行一次的键盘、鼠标和键盘操作获得的第一界面,以及所有针对该第一界面及其子界面的操作。Further, the simulation operation includes operations on the main interface of the software and its secondary interfaces, wherein the secondary interface is the first interface obtained by performing keyboard, mouse, and keyboard operations once from the main interface of the software, And all operations on the first interface and its sub-interfaces.
进一步地,所述列表还包括所述操作发生时的时间戳,相关的子面板名字、母面板名字以及所述操作对应的关键值,其中,所述关键值包括坐标、输入文本、输入数值。Further, the list also includes the time stamp when the operation occurred, the name of the related sub-panel, the name of the parent panel, and the key value corresponding to the operation, wherein the key value includes coordinates, input text, and input value.
本发明第二方面提供乐软件的知识捕捉系统,包括:处理器;以及与所述处理器耦合的存储器,所述存储器具有存储于其中的指令,所述指令在被处理器执行时使所述电子设备执行动作,所述动作包括:A1,获取所述软件的截屏并进行基于该截屏执行目标及其像素坐标的识别,其中,所述目标包括所述截屏上的复数个功能区域、图标或文字,迭代执行步骤A1,以获取所述目标及其像素分别对应于X坐标轴和Y坐标轴上的最大值和最小值的列表并保存于第一数据库中,然后执行如下步骤:A2,在线捕捉软件操作装置上基于该软件的事件,将所述事件映射于所述列表中以获取该事件所对应的软件操作;The second aspect of the present invention provides a knowledge capture system for music software, including: a processor; and a memory coupled with the processor, the memory having instructions stored therein, and the instructions cause the The electronic device performs an action, and the action includes: A1, acquiring a screenshot of the software and performing recognition based on the screenshot execution target and its pixel coordinates, wherein the target includes a plurality of functional areas, icons, or For text, perform step A1 iteratively to obtain a list of the target and its pixels corresponding to the maximum and minimum values on the X-coordinate axis and Y-coordinate axis, and save it in the first database, and then perform the following steps: A2, online Capture an event based on the software on the software operating device, and map the event to the list to obtain the software operation corresponding to the event;
A3,基于复数个软件操作提炼基于事件流的知识图谱,并保存于第二数据库中。A3. Refine the knowledge graph based on the event stream based on multiple software operations and save it in the second database.
进一步地,所述像素坐标为所述目标相对于该目标所在窗口的坐标。Further, the pixel coordinates are the coordinates of the target relative to the window where the target is located.
进一步地,所述步骤A1还包括如下步骤:A11,获取所述软件的截屏并将该截屏转化为灰色图像;A12,对所述灰色图像的截屏基于每个目标执行图像分割,以将所述每个目标在所述灰色图像中进行定位以获得所述目标的像素坐标;A13,利用图像匹配算法识别基于图像的目标,以及利用光学字符识别功能识别基于文字的目标。Further, the step A1 also includes the following steps: A11, acquiring a screenshot of the software and converting the screenshot into a gray image; A12, performing image segmentation on the screenshot of the gray image based on each target, so as to divide the Each target is located in the gray image to obtain the pixel coordinates of the target; A13, the image matching algorithm is used to recognize the image-based target, and the optical character recognition function is used to recognize the text-based target.
进一步地,在所述步骤A1还包括如下步骤:捕捉所述软件操作装置上基于该软件的模拟操作,以获取所述软件的截屏并进行基于该截屏执行目标及其像素坐标的识别,其中,所述模拟操作是通过软件遍历模拟用户操作来实现。Further, the step A1 further includes the following step: capturing a simulation operation based on the software on the software operating device to obtain a screenshot of the software and perform recognition based on the screenshot execution target and its pixel coordinates, wherein, The simulation operation is realized by traversing and simulating user operations by software.
进一步地,所述模拟操作包括对软件的主界面及其次级界面的操作,其中,所述次级界面是从所述软件的主界面执行一次的键盘、鼠标和键盘操作获得的第一界面,以及所有针对该第一界面及其子界面的操作。Further, the simulation operation includes operations on the main interface of the software and its secondary interfaces, wherein the secondary interface is the first interface obtained by performing keyboard, mouse, and keyboard operations once from the main interface of the software, And all operations on the first interface and its sub-interfaces.
进一步地,所述列表还包括所述操作发生时的时间戳,相关的子面板名字、母面板名字以及所述操作对应的关键值,其中,所述关键值包括坐标、输入文本、输入数值。Further, the list also includes the time stamp when the operation occurred, the name of the related sub-panel, the name of the parent panel, and the key value corresponding to the operation, wherein the key value includes coordinates, input text, and input value.
本发明第三方面提供乐软件的知识捕捉装置,其中,包括:知识学习模块,其获取所述软件的截屏并进行基于该截屏执行目标及其像素坐标的识别,其中,所述目标包括所述截屏上的复数个功能区域、图标或文字,直至获取所述目标及其像素分别对应于X坐标轴和Y坐标轴上的最大值和最小值的列表并保存于第一数据库中:知识获取装置,其在线捕捉软件操作装置上基于该软件的事件,将所述事件映射于所述列表中以获取该事件所对应的软件操作,并基于复数个软件操作提炼基于事件流的知识图谱,并保存于第二数据库中。A third aspect of the present invention provides a knowledge capture device for music software, which includes: a knowledge learning module that obtains a screenshot of the software and performs recognition based on the screenshot execution target and its pixel coordinates, wherein the target includes the Take a screenshot of a plurality of functional areas, icons or texts until the target and its pixels correspond to the maximum and minimum lists on the X-coordinate axis and the Y-coordinate axis and save them in the first database: knowledge acquisition device , It captures events based on the software on the software operating device online, maps the events in the list to obtain the software operations corresponding to the events, and refines the knowledge graph based on the event flow based on multiple software operations, and saves them In the second database.
本发明第四方面提供了计算机程序产品,所述计算机程序产品被有形地存储在计算机可读介质上并且包括计算机可执行指令,所述计算机可执行指令在被执行时使至少一个处理器执行本发明第一方面所述的方法。The fourth aspect of the present invention provides a computer program product, which is tangibly stored on a computer-readable medium and includes computer-executable instructions that, when executed, cause at least one processor to execute the present invention. The method of the first aspect of the invention.
本发明第五方面提供了计算机可读介质,其上存储有计算机可执行 指令,所述计算机可执行指令在被执行时使至少一个处理器执行本发明第一方面所述的方法。The fifth aspect of the present invention provides a computer-readable medium on which computer-executable instructions are stored, and when executed, the computer-executable instructions cause at least one processor to perform the method described in the first aspect of the present invention.
如果在线将用户的鼠标、键盘事件翻译为用户界面目标导向的事件将消耗一些时间,有时会持续几百毫秒,这会影响客户在同时进行的建模操作。本发明提供的软件的知识获取机制能够提前在线下学习知识并将这些知识保存于数据库,并结合简单快速地映射功能来将识别这些信息,这极大地提高了效率。Translating the user's mouse and keyboard events into user interface goal-oriented events will consume some time online, sometimes lasting several hundred milliseconds, which will affect the modeling operations performed by customers at the same time. The knowledge acquisition mechanism of the software provided by the present invention can learn knowledge offline in advance and save the knowledge in the database, and combine the simple and rapid mapping function to recognize the information, which greatly improves the efficiency.
本发明能够适用于许多软件,特别是工程软件,并尤其适合建模软件。本发明不依赖于软件本身的功能,也不干涉建模过程,因此能够独立运行。本发明提供的知识捕捉功能在后台运行,因此并不会打搅、影响和改变用户对软件的操作。本发明基于操作系统功能,例如windows hook或者截屏功能,因此其能够应用于多种软件,并且不会影响这些软件的原始功能或者用户界面。The invention can be applied to many softwares, especially engineering software, and is especially suitable for modeling software. The present invention does not depend on the function of the software itself, nor does it interfere with the modeling process, so it can run independently. The knowledge capture function provided by the present invention runs in the background, so it will not disturb, influence or change the user's operation of the software. The present invention is based on operating system functions, such as windows hook or screenshot function, so it can be applied to a variety of software without affecting the original functions or user interfaces of these software.
本发明并不仅仅适用于单一软件工具,也能够用于复合软件(multi-software),例如,当用户需要在多个软件工具之间切换工作时,比如协同仿真(multi-software),知识也能被捕捉。The present invention is not only suitable for a single software tool, but can also be used for multi-software. For example, when the user needs to switch between multiple software tools, such as co-simulation (multi-software), knowledge is also Can be captured.
附图说明Description of the drawings
图1是根据本发明一个具体实施例的建模的知识捕捉装置的结构示意图;Fig. 1 is a schematic structural diagram of a knowledge capturing device for modeling according to a specific embodiment of the present invention;
图2是根据本发明一个具体实施例的建模软件的主界面示意图;2 is a schematic diagram of the main interface of the modeling software according to a specific embodiment of the present invention;
图3是根据本发明一个具体实施例的建模软件的主界面一个次级界面的示意图;3 is a schematic diagram of a primary interface and a secondary interface of the modeling software according to a specific embodiment of the present invention;
图4是根据本发明一个具体实施例的建模软件的主界面又一次级界面的示意图;4 is a schematic diagram of another level interface of the main interface of the modeling software according to a specific embodiment of the present invention;
图5是根据本发明一个具体实施例的建模的知识捕捉方法的事件流示意图;Fig. 5 is a schematic diagram of an event flow of a knowledge capture method for modeling according to a specific embodiment of the present invention;
图6是根据本发明又一具体实施例的建模的知识捕捉方法的事件流示意图;Fig. 6 is a schematic diagram of an event flow of a knowledge capture method for modeling according to another specific embodiment of the present invention;
图7是根据本发明一个具体实施例的建模的知识获取机制的对象特征表格。Fig. 7 is an object characteristic table of a modeled knowledge acquisition mechanism according to a specific embodiment of the present invention.
具体实施方式Detailed ways
以下结合附图,对本发明的具体实施方式进行说明。The specific embodiments of the present invention will be described below with reference to the accompanying drawings.
本发明提供了软件知识捕捉机制,其具有线下的基于软件的相关信息获取,结合软件操作过程中线上对软件的操作所对应的相关信息,以分析软件操作意图提炼基于事件流的知识图谱,从而完成整个线上线下结合的建模软件知识捕捉。特别地,所述软件是建模软件,下面结合建模软件对本发明进行说明。The present invention provides a software knowledge capture mechanism, which has offline software-based related information acquisition, combined with related information corresponding to the online software operation in the software operation process, to analyze the software operation intention to refine the knowledge graph based on the event flow, In order to complete the entire online and offline combination of modeling software knowledge capture. In particular, the software is modeling software, and the present invention will be described below in conjunction with modeling software.
图1是根据本发明一个具体实施例的建模的知识捕捉装置的结构示意图。用户通常在建模软件300上执行建模操作,其中,所述建模软件300安装在建模装置上,本发明提供的知识学习模块100和知识获取装置200也内嵌在该建模装置上,用于在线下和用户在执行建模过程的同时执行建模知识捕捉。本发明主要包括知识学习模块100和知识获取装置200两个模块,所述知识学习模块100为线下运行模块,所述知识获取装置200为线上运行模块,即在建模过程中同时执行。其中,所述知识学习模块100包括两个子模块,分别为为初级学习模块110和次级学习模块120。其中,初级学习模块110用于学习建模软件主界面的知识,次级学习模块120用于学习建模软件主界面的次级界面的知识。具体地,初级学习模块110包括第一图像获取模块111和第一光学字符识别模块112,次级学习模块120包括事件仿真模块121、第二图像获取模块121和第二光学字符识别模块122。其中,所述知识学习模块100执行线下知识学习的数据存储于第一数据库DB1中。Fig. 1 is a schematic structural diagram of a knowledge capturing device for modeling according to a specific embodiment of the present invention. The user usually performs modeling operations on the modeling software 300, where the modeling software 300 is installed on the modeling device, and the knowledge learning module 100 and the knowledge acquisition device 200 provided by the present invention are also embedded on the modeling device. It is used to capture modeling knowledge offline and users perform modeling process at the same time. The present invention mainly includes two modules: a knowledge learning module 100 and a knowledge acquisition device 200. The knowledge learning module 100 is an offline operation module, and the knowledge acquisition device 200 is an online operation module, which is executed simultaneously during the modeling process. Wherein, the knowledge learning module 100 includes two sub-modules, namely a primary learning module 110 and a secondary learning module 120. Among them, the primary learning module 110 is used to learn the knowledge of the main interface of the modeling software, and the secondary learning module 120 is used to learn the knowledge of the secondary interface of the main interface of the modeling software. Specifically, the primary learning module 110 includes a first image acquisition module 111 and a first optical character recognition module 112, and the secondary learning module 120 includes an event simulation module 121, a second image acquisition module 121, and a second optical character recognition module 122. Wherein, the knowledge learning module 100 performs offline knowledge learning data stored in the first database DB1.
进一步地,知识获取装置200包括事件捕捉模块210和提炼分析装置220。其中,事件捕捉模块210中的鼠标捕捉模块211用于捕捉鼠标操作,事件捕捉模块210中的键盘捕捉模块212用于捕捉键盘操作。提炼分析模块220进一步地包括两个子模块,分别包括映射模块221和提炼模块222。其中,映射模块221将在线捕捉建模装置上基于建模软件的事件映射于第一数据库DB1中的数据,以获取该事件所对应的对所述建模装置的建模软件发出的建模操作。提炼模块222基于复数个建模操作提炼基于事件流的知识图谱,并保存于第二数据库DB2中。Further, the knowledge acquisition device 200 includes an event capture module 210 and a refinement analysis device 220. The mouse capture module 211 in the event capture module 210 is used to capture mouse operations, and the keyboard capture module 212 in the event capture module 210 is used to capture keyboard operations. The refining analysis module 220 further includes two sub-modules, including a mapping module 221 and a refining module 222, respectively. Wherein, the mapping module 221 maps the event based on the modeling software on the online capturing modeling device to the data in the first database DB1 to obtain the modeling operation issued to the modeling software of the modeling device corresponding to the event . The refinement module 222 refines the knowledge graph based on the event flow based on a plurality of modeling operations, and saves the knowledge graph in the second database DB2.
在本实施例中,示例性地,建模装置为个人电脑,其中,个人电脑 的操作系统为Windows。进一步地,所述模拟操作包括对软件的主界面及其次级界面的操作,其中,所述次级界面是从所述软件的主界面执行一次的键盘、鼠标和键盘操作获得的第一界面,以及所有针对该第一界面及其子界面的所有操作。In this embodiment, illustratively, the modeling device is a personal computer, and the operating system of the personal computer is Windows. Further, the simulation operation includes operations on the main interface of the software and its secondary interfaces, wherein the secondary interface is the first interface obtained by performing keyboard, mouse, and keyboard operations once from the main interface of the software, And all operations on the first interface and its sub-interfaces.
本发明第一方面提供了一种建模知识捕捉方法,其中,包括如下步骤。The first aspect of the present invention provides a method for capturing modeling knowledge, which includes the following steps.
首先执行步骤S1,知识学习模块100获取所述建模软件的截屏并进行基于该截屏执行目标及其像素坐标的识别,其中,所述目标包括所述建模软件截屏上的复数个功能区域、图标或文字。知识学习模块100中的初级学习模块110用于学习建模软件主界面的知识,次级学习模块120用于学习建模软件主界面的次级界面的知识。First, step S1 is executed. The knowledge learning module 100 obtains a screenshot of the modeling software and performs recognition based on the screenshot execution target and its pixel coordinates, where the target includes a plurality of functional areas on the modeling software screenshot, Icon or text. The primary learning module 110 in the knowledge learning module 100 is used to learn the knowledge of the main interface of the modeling software, and the secondary learning module 120 is used to learn the knowledge of the secondary interface of the main interface of the modeling software.
具体地,所述步骤S1包括子步骤S11、子步骤S12和子步骤S13。Specifically, the step S1 includes a sub-step S11, a sub-step S12, and a sub-step S13.
首先执行子步骤S11,第一图像获取模块111获取所述建模软件300的主界面截屏并将该主界面截屏转化为灰色图像,其中,图像颜色转换是指将主界面的彩色RGB图像转换为执行后续过程所需的灰色图像。图2所示的建模软件300的主界面则为转换后的灰色图像。First, sub-step S11 is executed. The first image acquisition module 111 acquires a screenshot of the main interface of the modeling software 300 and converts the screenshot of the main interface into a gray image. The image color conversion refers to the conversion of the color RGB image of the main interface into a gray image. The gray image needed to perform the subsequent process. The main interface of the modeling software 300 shown in FIG. 2 is a converted gray image.
然后执行子步骤S12,初级学习模块110中的图像分割装置(未使出)对所述灰色图像的截屏基于每个目标执行图像分割,其中,所述目标包括所述建模软件截屏上的复数个功能区域、图标或文字。因此,图像分割是将主要功能区在图像中定位,以获得每个目标在灰色图像中的定位,例如图2中的主界面500的命令栏510、工具栏520和白色建模区域530等。Then sub-step S12 is executed. The image segmentation device (not used) in the primary learning module 110 performs image segmentation on the screenshot of the gray image based on each target, wherein the target includes a complex number on the screenshot of the modeling software. Functional areas, icons or text. Therefore, image segmentation is to locate the main functional areas in the image to obtain the location of each target in the gray image, such as the command bar 510, the tool bar 520, and the white modeling area 530 of the main interface 500 in FIG. 2.
最后执行子步骤S13,第一图像获取模块111利用图像匹配算法识别基于图像的目标,第一光学字符识别模块112利用光学字符识别功能识别基于文字的目标。Finally, sub-step S13 is executed. The first image acquisition module 111 uses an image matching algorithm to recognize image-based objects, and the first optical character recognition module 112 uses an optical character recognition function to recognize text-based objects.
因此,初级学习模块110需要学习的是打开建模软件300的主界面的目标名称和位置,以及主界面上目标之间的关系。Therefore, what the primary learning module 110 needs to learn is to open the target name and location of the main interface of the modeling software 300, and the relationship between the targets on the main interface.
图2是根据本发明一个具体实施例的建模软件的主界面示意图。如图2所示,建模软件主界面500包括命令栏510、工具栏520和建模区域530。其中,所述工具栏520具有多个标签,点开每个标签以后每个标签还具有多个按钮可以选择。下面以工具栏520中的标签521 “Resources”为例对本发明的图像识别进行说明。其中,如图2所示,标签521“Resources”在工具栏的功能区域,其像素坐标在X轴的最小值X min=345,其像素坐标在X轴的最大值X max=405,其像素坐标在Y轴的最小值Y min=175,其像素坐标在Y轴的最大值Y max=191。由于标签521“Resources”是一个矩形,因此该矩形左上角的坐标为(X min,Y min),该矩形的右下角的坐标为(X max,Y max),因此如果鼠标点击在这个区域内,则认为操作者点击了标签521“Resources”。 Fig. 2 is a schematic diagram of the main interface of the modeling software according to a specific embodiment of the present invention. As shown in FIG. 2, the main interface 500 of the modeling software includes a command bar 510, a tool bar 520 and a modeling area 530. Wherein, the toolbar 520 has multiple tabs, and after clicking each tab, each tab also has multiple buttons to choose from. The following uses the label 521 "Resources" in the toolbar 520 as an example to describe the image recognition of the present invention. Among them, as shown in Figure 2, the label 521 "Resources" is in the functional area of the toolbar, the minimum value of its pixel coordinates on the X axis X min = 345, and the maximum value of its pixel coordinates on the X axis X max = 405. The minimum value of the coordinates on the Y axis Y min =175, and the maximum value of its pixel coordinates on the Y axis Y max =191. Since the label 521 "Resources" is a rectangle, the coordinates of the upper left corner of the rectangle are (X min , Y min ), and the coordinates of the lower right corner of the rectangle are (X max , Y max ), so if the mouse clicks in this area , It is considered that the operator has clicked the label 521 "Resources".
在本实施例中,操作者在点击了标签521“Resources”以后进一步选择标签521“Resources”中的按钮5211“worker”,因此本发明在找到功能区域以后进一步进行图案识别以对应到标签521“Resources”上的按钮5211“worker”。其中,如图2所示,按钮5211“worker”在工具栏的功能区域,其像素坐标在X轴的最小值X min=410,tu其像素坐标在X轴的最大值X max=450,其像素坐标在Y轴的最小值Y min=196,其像素坐标在Y轴的最大值Y max=234。由于按钮5211“worker”是一个矩形,因此该矩形左上角的坐标为(X min,Y min),该矩形的右下角的坐标为(X max,Y max),因此如果鼠标点击在这个区域内,则认为操作者点击了按钮5211“worker”。 In this embodiment, after clicking the label 521 "Resources", the operator further selects the button 5211 "worker" in the label 521 "Resources". Therefore, the present invention further performs pattern recognition after finding the functional area to correspond to the label 521" Button 5211 "worker" on Resources". Among them, as shown in Figure 2, the button 5211 "worker" is in the functional area of the toolbar, and the minimum value of its pixel coordinates on the X axis X min =410, and the maximum value of its pixel coordinates on the X axis X max =450. The minimum value of the pixel coordinates on the Y axis Y min =196, and the maximum value of the pixel coordinates on the Y axis Y max =234. Since the button 5211 "worker" is a rectangle, the coordinates of the upper left corner of the rectangle are (X min , Y min ), and the coordinates of the lower right corner of the rectangle are (X max , Y max ), so if the mouse clicks in this area , It is considered that the operator has clicked the button 5211 "worker".
根据本实施例的一个变化例,假设操作人员操作的是如图2所示的建模软件主界面500左边的侧窗口540“basis”中的图标541“MaterialFlow”,所述图标541“MaterialFlow”位于整个所示的建模软件主界面500左侧的窗口,所述侧窗口540“basis”是一个树状结构。其中,如图2所示,图标541“MaterialFlow”在工具栏的功能区域,其像素坐标在X轴的最小值X min=6,其像素坐标在X轴的最大值X max=104,其像素坐标在Y轴的最小值Y min=18,其像素坐标在Y轴的最大值Y max=202。由于图标541“MaterialFlow”是一个矩形,因此该矩形左上角的坐标为(X min,Y min),该矩形的右下角的坐标为(X max,Y max),因此如果鼠标点击在这个区域内,则认为操作者点击了图标541“MaterialFlow”。 According to a variation of this embodiment, it is assumed that the operator is operating the icon 541 "MaterialFlow" in the side window 540 "basis" on the left side of the modeling software main interface 500 as shown in FIG. 2, and the icon 541 "MaterialFlow" Located in the window on the left side of the main interface 500 of the modeling software shown throughout, the side window 540 "basis" is a tree structure. Among them, as shown in Figure 2, the icon 541 "MaterialFlow" is in the functional area of the toolbar, and its pixel coordinate is the minimum value X min =6 on the X axis, and its pixel coordinate is the maximum value X max =104 on the X axis. The minimum value of the coordinate on the Y axis Y min =18, and the maximum value of its pixel coordinate on the Y axis Y max =202. Since the icon 541 "MaterialFlow" is a rectangle, the coordinates of the upper left corner of the rectangle are (X min , Y min ), and the coordinates of the lower right corner of the rectangle are (X max , Y max ), so if the mouse clicks in this area , It is considered that the operator has clicked the icon 541 "MaterialFlow".
综上可知,本发明针对软件界面不同类型的图标,图像识别所用算法有所不同。In summary, the present invention has different algorithms for image recognition for different types of icons in the software interface.
根据本发明一个具体实施例,接下来介绍光学字符识别功能。According to a specific embodiment of the present invention, the optical character recognition function is introduced next.
对所述第一事件记录表中的动作在所述截屏中定位,并根据图像识别基于对象特征来判断上述动作所选择的对象.基于动作及其发生的位置和截屏,能将动作在第一截屏中定位。本实施例还能够基于图像识别算法判断上述动作,在本实施例中,其需要判断鼠标所选择的对象。Locate the action in the first event record table in the screenshot, and determine the object selected by the action based on the characteristics of the object based on image recognition. Based on the action and its location and screenshot, the action can be placed in the first Positioning in the screenshot. This embodiment can also determine the above actions based on the image recognition algorithm. In this embodiment, it needs to determine the object selected by the mouse.
如图7所示的表格,在子面板“Models.Frame.TestStation1”上列出了鼠标动作的对象及其类型、特征、位置,其中,对象是以图像方式记录的,对象类型包括数值框、标签项、复选框和菜单项。其中,数值框的对象特征为“具有一个大空白区域的矩形”(A rectangle with a large blank area),其位置在“鼠标光标的左边”(on the left of mouse click)。标签项的对象特征为“一个狭窄的类矩形外形,但并无4个边缘轮廓”(A narrow rectangle-like shape,but no 4 edge-contour),其位置为“在鼠标光标位置”(at the mouse position)。复选框的对象特征为“一个正方形空白区域”(A square blank),其位置为“鼠标光标的右边”(On the right of the mouse)。菜单项的对象特征为“Y坐标上的位置非常接近于窗口原点(窗口的左上角),没有鼠标位置附近的轮廓”(Y position is quite close to the origin of the window(top left corner of the window),no contour around the mouse position),其位置为“在鼠标光标位置”(at the mouse position)。As shown in the table shown in Figure 7, the mouse action objects and their types, characteristics, and positions are listed on the sub-panel "Models.Frame.TestStation1". Among them, the objects are recorded in the form of images, and the object types include numerical boxes, Label items, check boxes, and menu items. Among them, the object feature of the value box is "A rectangle with a large blank area" (A rectangle with a large blank area), and its position is "on the left of the mouse cursor" (on the left of mouse click). The object feature of the label item is "A narrow rectangle-like shape, but no 4 edge-contour" (A narrow rectangle-like shape, but no 4 edge-contour), and its position is "at the mouse cursor position" (at the mouse position). The object feature of the check box is "A square blank area" (A square blank), and its position is "On the right of the mouse" (On the right of the mouse). The object feature of the menu item is "The position on the Y coordinate is very close to the origin of the window (the upper left corner of the window), and there is no outline near the mouse position" (Y position is quite close to the origin of the window (top left corner of the window) ), no contour around the mouse position, and its position is "at the mouse position".
如图4所示,根据所述对象类型和对象位置产生一个感兴趣区域,并将所述感兴趣区域存储为一个放大的子图象。光学字符识别模块(未使出)能够基于上述对象特征来确定对象类型,并且基于对象类型和对象位置产生一个如图4所示的感兴趣区域ROI(Region of Interest),其中,所述感兴趣区域ROI基于对象位置来产生。光学字符识别模块基于感兴趣区域ROI将图4所示的原始的截屏裁剪为一个子图像(a sub-image)ROI’。为了改善文本提取质量,映射模块221放大上述子图象ROI’。As shown in FIG. 4, an area of interest is generated according to the object type and object position, and the area of interest is stored as an enlarged sub-image. The optical character recognition module (not used) can determine the object type based on the above object characteristics, and based on the object type and object position, generate a region of interest (ROI) as shown in FIG. 4, where the interest is The area ROI is generated based on the position of the object. The optical character recognition module crops the original screenshot shown in FIG. 4 into a sub-image ROI' based on the region of interest ROI. In order to improve the quality of text extraction, the mapping module 221 enlarges the above-mentioned sub-image ROI'.
接着,光学字符识别模块执行光学字符识别功能以获得所述子图象上的文字,将所述时间表中的信息和所述对象的文字对应起来并生成第二事件记录表。识别模块(未使出)用于执行光学字符识别(OCR,Optical Character Recognition),当第一截屏的感兴趣区域ROI被放大并被剪裁为一个子图象,识别模块将子图象上的文字提取下来,因此,我们可以得到数值框名字,获得子图象上的文字“Processing time:Const”。因此, 因此,本发明对建模软件主界面500构建的知识结构如下表所示:Then, the optical character recognition module executes the optical character recognition function to obtain the text on the sub-image, and the information in the timetable is matched with the text of the object and a second event record table is generated. The recognition module (not used) is used to perform Optical Character Recognition (OCR, Optical Character Recognition). When the ROI of the first screenshot is enlarged and cut into a sub-image, the recognition module converts the text on the sub-image Extracted, therefore, we can get the name of the value box and the text "Processing time: Const" on the sub-image. Therefore, therefore, the knowledge structure constructed by the present invention for the main interface 500 of the modeling software is as shown in the following table:
表1建模软件300的主界面500的结构Table 1 The structure of the main interface 500 of the modeling software 300
Figure PCTCN2019116052-appb-000001
Figure PCTCN2019116052-appb-000001
Figure PCTCN2019116052-appb-000002
Figure PCTCN2019116052-appb-000002
其中,建模软件主界面500主要组件包括命令栏510、工具栏520和侧窗口540等,其中命令栏510具有其像素在X轴的最小值X min和最大值X max以及其像素坐标在Y轴的最小值Y min和最最大值Y max还有其他所需信息。其中命令栏510的次级组件包括标签511“Home”、标签512“Debugger”和标签513“Window”……其中,标签511“Home”具有其像素在X轴的最小值X min和最大值X max以及其像素坐标在Y轴的最小值Y min和最最大值Y max,标签512“Debugger”具有其像素在X轴的最小值X min和最大值X max以及其像素坐标在Y轴的最小值Y min和最最大值Y max等。其中工具栏520的次级组件包括标签522“Material Flow”、标签523“Fluids”……及其像素分别在X轴和Y轴的最小值和最大值。同理,侧窗口540的次级组件包括标签541“Material Flow”、标签542“Fluids”……及其其像素分别在X轴和Y轴的最小值和最大值。其中次级组件标签511“Home”包括按钮“Event Controller”、“Reset”和“Start/Stop”及其其像素分别在X轴和Y轴的最小值和最大值。同理,次级组件标签512“Debugger”包括按钮1和按钮2,标签513“Window”包括按钮3和按钮4,标签522“Material Flow”包括按钮“Connector”、“Source”和“SingleProc”,标签523“Fluids”包括按钮5和按钮6,次级组件标签541“Material Flow”包括按钮“Connector”、“Source”和“SingleProc”,次级组件标签542“Fluids”包括按钮7和按钮8。 Among them, the main components of the main interface 500 of the modeling software include a command bar 510, a tool bar 520, and a side window 540. The command bar 510 has a minimum X min and a maximum X max of its pixels on the X axis, and its pixel coordinates in Y. The minimum value Y min and the maximum maximum value Y max of the axis have other required information. The sub-components of the command bar 510 include the label 511 "Home", the label 512 "Debugger", and the label 513 "Window"... Among them, the label 511 "Home" has the minimum value X min and the maximum value X of its pixels on the X axis. max and the minimum value Y min and maximum maximum value Y max of its pixel coordinates on the Y axis. The label 512 "Debugger" has the minimum value X min and maximum value X max of its pixels on the X axis and the minimum value of its pixel coordinates on the Y axis. The value Y min and the maximum value Y max, etc. The sub-components of the toolbar 520 include the label 522 "Material Flow", the label 523 "Fluids"... and the minimum and maximum values of the pixels on the X axis and the Y axis, respectively. In the same way, the secondary components of the side window 540 include the label 541 "Material Flow", the label 542 "Fluids"... and the minimum and maximum values of its pixels on the X axis and the Y axis, respectively. The sub-component label 511 "Home" includes the buttons "Event Controller", "Reset" and "Start/Stop" and the minimum and maximum values of their pixels on the X-axis and Y-axis, respectively. Similarly, the secondary component label 512 "Debugger" includes button 1 and button 2, the label 513 "Window" includes button 3 and button 4, and the label 522 "Material Flow" includes the buttons "Connector", "Source" and "SingleProc". The label 523 "Fluids" includes button 5 and button 6, the secondary component label 541 "Material Flow" includes buttons "Connector", "Source" and "SingleProc", and the secondary component label 542 "Fluids" includes button 7 and button 8.
因此,本发明将软件主要界面的构建分解为多层,其中包括得知识是分层次的,第一层包括主要组件,每一层主要组件包括多个次级组件,每一层次要组件包括多个按钮。上述每一层都包括其像素分别在X轴和Y轴的最小值和最大值构成的区域覆盖取值范围,或者其他一些信息用于描述这些组件。因此,这些知识是目标导向的,其能够用很多格式保存,例如JSON文件、本体文件、xml文件或者其他。Therefore, the present invention decomposes the construction of the main software interface into multiple layers. The knowledge included is hierarchical. The first layer includes main components, each layer of main components includes multiple secondary components, and each layer requires multiple components. Buttons. Each of the above-mentioned layers includes the area covered by the minimum and maximum values of its pixels on the X-axis and Y-axis, respectively, covering the value range, or some other information is used to describe these components. Therefore, this knowledge is goal-oriented, and it can be saved in many formats, such as JSON files, ontology files, xml files, or others.
接着对建模软件300的主界面500下的次级界面600截屏的目标识别和定位,其中次级界面600的目标识别和定位与主界面500类似,主界面和次级界面的目标识别和定位机制的不同在于:需要操作主界面600来展开次级界面,以及需要关注多个目标之间的关系。Next, take a screenshot of the target identification and positioning of the secondary interface 600 under the main interface 500 of the modeling software 300. The target identification and positioning of the secondary interface 600 is similar to that of the main interface 500. The target identification and positioning of the primary interface and the secondary interface are The difference of the mechanism is that the main interface 600 needs to be operated to expand the secondary interface, and the relationship between multiple targets needs to be paid attention to.
如图1所示,次级学习模块120用于获取建模软件主界面以下的次级界面的知识,其中,所述次级界面为操作建模软件主界面一次以后显示的界面,其主要包括二级窗口列表或者下拉菜单。示例性地,所述次级界面6在点击主界面下的一些按钮被开启。为了实现自动化,仿真器121被设计为建模软件主界面一次以后显示的次级界面的一次操作,同理,所述操作包括但不限于键盘操作、鼠标操作和触屏操作等。优选地,仿真器121为鼠标点击仿真器,其模拟完成点击建模软件主界面的功能,其仿真了鼠标点击的动作来开启需要学习的次级界面。其中,次级界面的目标包括很多类型并且具有很多分级,并且次级界面的布局非常细节化。As shown in Figure 1, the secondary learning module 120 is used to acquire knowledge of the secondary interfaces below the main interface of the modeling software, where the secondary interface is an interface displayed after the main interface of the modeling software is operated once, and it mainly includes Secondary window list or drop-down menu. Exemplarily, the secondary interface 6 is activated by clicking some buttons under the main interface. In order to realize automation, the simulator 121 is designed as an operation of the secondary interface displayed after the main interface of the modeling software once. Similarly, the operation includes but not limited to keyboard operation, mouse operation, and touch screen operation. Preferably, the simulator 121 is a mouse click simulator, which simulates the function of completing the main interface of the click modeling software, and simulates the action of the mouse click to open the secondary interface that needs to be learned. Among them, the goals of the secondary interface include many types and have many levels, and the layout of the secondary interface is very detailed.
具体地,本发明提供的仿真器121打开一个次级界面,当目标次级界面被开启,一个次级界面截屏也自动被获取来得到一个窗口的图像,并接着执行自动学习过程。次级界面知识学习过程和主界面知识学习过程是相似的,包括图形颜色转换、图形分割、图案匹配和光学字符识别功能。同理,需要执行子步骤S21、子步骤S22和子步骤S23。Specifically, the emulator 121 provided by the present invention opens a secondary interface, and when the target secondary interface is opened, a screenshot of the secondary interface is automatically taken to obtain an image of a window, and then the automatic learning process is executed. The secondary interface knowledge learning process is similar to the primary interface knowledge learning process, including graphics color conversion, graphics segmentation, pattern matching and optical character recognition functions. Similarly, sub-step S21, sub-step S22, and sub-step S23 need to be executed.
同理,从次级界面学习的知识也是分层和目标导向的。主界面和次级界面的区别在于次级界面具有不同层级结构,因此每个次级界面都被视为一个目标,其主要元素是区别于其他目标之处在于类型不同。具体地,一个类型为SingleProc的次级界面类型包括菜单栏610、标签栏620以及其他区域,例如字符框630和640以及复选框等。其中菜单栏610具有其像素在X轴的最小值X min和最大值X max以及其像素坐标在Y轴 的最小值Y min和最最大值Y max,菜单栏610具有标签610“Navigate”、标签620“View”、标签630“Tools”、标签640“Help”,标签610“Navigate”、标签620“View”、标签630“Tools”和标签640“Help”也分别具有其像素在X轴的最小值X min和最大值X max以及其像素坐标在Y轴的最小值Y min和最最大值Y max。进一步地,标签612“Navigate”还包括列表项6121“Open Location”、列表项6122“Open Origin”、列表项6123“Go to Origin”和列表项6124“Open Class Alt+Home”,其中列表项6121“Open Location”、列表项6122“Open Origin”、列表项6123“Go to Origin”和列表项6124“Open Class Alt+Home”也分别具有其像素在X轴的最小值X min和最大值X max以及其像素坐标在Y轴的最小值Y min和最最大值Y max。标签栏620包括标签621“Time”、标签622“Set-up”和标签623“Failures”,标签621“Time”、标签622“Set-up”、标签623“Failures”……也分别具有其像素在X轴的最小值X min和最大值X max以及其像素坐标在Y轴的最小值Y min和最大值Y max。标签621“Time”包括字符框6211“Processing Time”、字符框6212“Set-up Time”……字符框6211“Processing Time”、字符框6212“Set-up Time”等也分别具有其像素在X轴的最小值X min和最大值X max以及其像素坐标在Y轴的最小值Y min和最大值Y max。标签622“Set-up”包括按钮“Entrance”和“Exit”,其中,按钮“Entrance”和“Exit”也分别具有其像素在X轴的最小值X min和最大值X max以及其像素坐标在Y轴的最小值Y min和最大值Y maxIn the same way, the knowledge learned from the secondary interface is hierarchical and goal-oriented. The difference between the primary interface and the secondary interface is that the secondary interface has a different hierarchical structure, so each secondary interface is regarded as a target, and its main element is different from other targets in the type. Specifically, a secondary interface type of SingleProc includes a menu bar 610, a tab bar 620, and other areas, such as character boxes 630 and 640, and check boxes. The menu bar 610 has the minimum value X min and maximum value X max of its pixels on the X axis and the minimum value Y min and maximum value Y max of its pixel coordinates on the Y axis. The menu bar 610 has the label 610 "Navigate" and the label 620 "View", label 630 "Tools", label 640 "Help", label 610 "Navigate", label 620 "View", label 630 "Tools" and label 640 "Help" also have their smallest pixels on the X axis. The value X min and the maximum value X max and the minimum value Y min and the maximum value Y max of the pixel coordinates on the Y axis. Further, the label 612 "Navigate" also includes the list item 6121 "Open Location", the list item 6122 "Open Origin", the list item 6123 "Go to Origin" and the list item 6124 "Open Class Alt+Home", of which the list item 6121 "Open Location", list item 6122 "Open Origin", list item 6123 "Go to Origin" and list item 6124 "Open Class Alt+Home" also have the minimum X min and maximum X max of its pixels on the X axis. And the minimum value Y min and maximum maximum value Y max of its pixel coordinates on the Y axis. The label column 620 includes the label 621 "Time", the label 622 "Set-up" and the label 623 "Failures". The label 621 "Time", the label 622 "Set-up", the label 623 "Failures"... also have their respective pixels. The minimum value X min and maximum value X max on the X axis and the minimum value Y min and maximum value Y max of its pixel coordinates on the Y axis. The label 621 "Time" includes the character box 6211 "Processing Time", the character box 6212 "Set-up Time"... the character box 6211 "Processing Time", the character box 6212 "Set-up Time", etc. also have their pixels in X. The minimum X min and maximum X max of the axis and the minimum Y min and maximum Y max of its pixel coordinates on the Y axis. The label 622 "Set-up" includes the buttons "Entrance" and "Exit". The buttons "Entrance" and "Exit" also have the minimum X min and maximum X max of the pixels on the X axis, and the pixel coordinates in the The minimum value Y min and the maximum value Y max of the Y axis.
因此,在本实施例中,本发明对建模软件主界面500的次级界面构建的知识结构如下表所示:Therefore, in this embodiment, the knowledge structure constructed by the present invention for the secondary interface of the main interface 500 of the modeling software is as shown in the following table:
表2建模软件300的主界面500的次级界面的结构Table 2 The structure of the secondary interface of the main interface 500 of the modeling software 300
Figure PCTCN2019116052-appb-000003
Figure PCTCN2019116052-appb-000003
Figure PCTCN2019116052-appb-000004
Figure PCTCN2019116052-appb-000004
Figure PCTCN2019116052-appb-000005
Figure PCTCN2019116052-appb-000005
因此,本发明将软件次级界面的构建分解为多层,次级界面被视为一个目标,其中包括不同的组件,每个组件也被看作为一个目标,其能够具有次级组件,并且每个组件都具有坐标值。组件的类型例如包括数字狂、命令按钮或者切换键。随后映射功能模块会追踪这样的层级结构来说明事件目标名称和位置。Therefore, the present invention decomposes the construction of the software secondary interface into multiple layers. The secondary interface is regarded as a target, which includes different components, and each component is also regarded as a target, which can have secondary components, and each Each component has coordinate values. The types of components include, for example, a digital fan, a command button, or a switch key. Then the mapping function module will track this hierarchical structure to illustrate the event target name and location.
迭代执行步骤S1,以获取所述目标及其像素分别对应于X坐标轴和Y坐标轴上的最大值和最小值的列表并保存于第一数据库DB 1中。根据本发明一个优选实施例,将建模软件的主界面500及其所有次级界面的所有操作都进行目标识别和定位,也就是将所有后续建模过程重所有的操作的目标及其像素分别对应于X坐标轴和Y坐标轴上的最大值和最小值的列表并保存于第一数据库DB 1中。这样,不论用户在该建模软件上执行何种操作,都能够识别其建模意图和操作,进行知识捕捉。将建模软件的主界面500及其所有次级界面的所有操作都进行目标识别和定位可以通过软件遍历模拟用户点击来实现。 Iteratively executed to step S1, to obtain a list of the target pixel and respectively correspond to the X-axis and Y axes, and the maximum and minimum values stored in the first database DB 1. According to a preferred embodiment of the present invention, all operations of the main interface 500 of the modeling software and all of its secondary interfaces are targeted for identification and positioning, that is, the targets and their pixels of all operations in all subsequent modeling processes are separated corresponding to the X-axis and Y coordinate axes, and a list of maximum and minimum values stored in the first database DB 1. In this way, no matter what operation the user performs on the modeling software, he can recognize his modeling intention and operation, and capture knowledge. Target recognition and positioning of all operations on the main interface 500 of the modeling software and all of its secondary interfaces can be achieved by traversing the software to simulate user clicks.
进一步地,在所述步骤S1还包括如下步骤:捕捉所述软件操作装置上基于该软件的模拟操作,以获取所述软件的截屏并进行基于该截屏执行目标及其像素坐标的识别,其中,所述模拟操作是通过软件遍历模拟用户操作来实现。Further, the step S1 further includes the following step: capturing a simulation operation based on the software on the software operating device to obtain a screenshot of the software and perform recognition based on the screenshot execution target and its pixel coordinates, wherein, The simulation operation is realized by traversing and simulating user operations by software.
然后执行步骤S2,知识获取装置200的事件捕捉模块210在线捕捉建模装置上基于建模软件300的事件,映射模块221将所述事件映射于所述目标及其像素分别对应于X坐标轴和Y坐标轴上的最大值和最小值的列表中,以获取该事件所对应的对所述建模装置的建模软件300发出的建模操作。Then step S2 is executed. The event capturing module 210 of the knowledge acquisition device 200 captures an event based on the modeling software 300 on the modeling device online, and the mapping module 221 maps the event to the target and its pixels correspond to the X coordinate axis and In the list of the maximum value and the minimum value on the Y coordinate axis, the modeling operation issued to the modeling software 300 of the modeling device corresponding to the event can be obtained.
具体地,鼠标捕捉模块211捕捉基于建模软件的鼠标动作,键盘捕捉模块212用于捕捉键盘动作。此外,事件捕捉模块210优选地还包括触屏捕捉模块(未示出),其用于捕捉触屏动作。因此,一旦知识获取装 置200的事件捕捉模块210在线捕捉建模装置上基于建模软件300的鼠标、键盘和触屏的操作,Windows钩子函数(Windows hook function)会捕捉和上述鼠标、键盘和触屏的操作相关的信息,包括上述动作和上述动作发生时的时间戳,相关的子面板名字、母面板名字以及上述动作在所述建模软件上的关键值生成第一事件记录表。其中,所述关键值包括坐标、输入文本、输入数值。每一次的键盘、鼠标和触屏操作都视为一个事件,并生成如下所示的第一事件记录表:Specifically, the mouse capture module 211 captures mouse actions based on modeling software, and the keyboard capture module 212 is used to capture keyboard actions. In addition, the event capture module 210 preferably further includes a touch screen capture module (not shown), which is used to capture touch screen actions. Therefore, once the event capturing module 210 of the knowledge acquisition device 200 online captures the operations of the mouse, keyboard, and touch screen on the modeling device based on the modeling software 300, the Windows hook function will capture the interaction between the mouse, keyboard, and touch screen. Information related to the operation of the screen, including the above-mentioned actions and the time stamp when the above-mentioned actions occurred, the names of the related sub-panels, the names of the parent panels, and the key values of the above-mentioned actions on the modeling software generate a first event record table. Wherein, the key value includes coordinates, input text, and input value. Each keyboard, mouse, and touch screen operation is regarded as an event, and the first event record table shown below is generated:
表3第一事件记录表Table 3 The first event record table
时间戳Timestamp 动作action 子面板名字Subpanel name 窗口类型Window type 窗口位置Window position 母面板名字Mother panel name 关键值Key value
Thu Mar26 14:59:30 2019Thu Mar26 14:59:30 2019 Mouse left downMouse left down Models.Frame.TestStation1Models.Frame.TestStation1 SingleProcSingleProc (1090,454)(1090, 454) .Models.Frame.Models.Frame (1340,630)(1340,630)
Thu Mar26 14:59:32 2019Thu Mar26 14:59:32 2019 Key downKey down Models.Frame.TestStation1Models.Frame.TestStation1 SingleProcSingleProc (1090,454)(1090, 454) .Models.Frame.Models.Frame Numpad2Numpad2
Thu Mar26 14:59:33 2019Thu Mar26 14:59:33 2019 Key downKey down Models.Frame.TestStation1Models.Frame.TestStation1 SingleProcSingleProc (1090,454)(1090, 454) .Models.Frame.Models.Frame Numpad0Numpad0
可选地,表1是按照.csv格式来保存事件记录的。如表1和图4所示,时间戳(time stamp)表示动作执行的时间,具体地,“Thu Mar2614:59:30 2019”表示在2019年的3月26日下午14时59分30秒做出了“Mouse left down”即单击鼠标左键的动作,然后在“Thu Mar26 14:59:322019”2019年的3月26日下午14时59分32秒做出了“Key down”即键盘键入的动作,接着“Thu Mar26 14:59:33 2019”2019年的3月26日下午14时59分33秒做出了“Key down”即键盘键入的动作,输入的字符是“20”。这表示工程师在建模软件的用户界面上完成了一次鼠标左键点击,并且通过键盘输入了信息,并且该信息包括了两个字符。然后,子面板名字和母面板名字都指示的是建模软件用户界面上的面板,关键值在本实施例中表示在用户界面上的坐标,因此,上述鼠标左键点击的位置具体是在子面板“Models.Frame.TestStation1”上,具体坐标为(1340,630)。其中,所述子面板“Models.Frame.TestStation1”属于母面板“.Models.Frame”。并且,“Models.Frame.TestStation1”的窗口位置为坐标(1090,454)”。然而,上述信息并不足以识别对象名字。因此,windown系统(Windows Hook)并不能获得建模软件足够的有意义的信息,例如文本框名字(text box name)或者数值框名字(box name),这需要借助建模软件的屏幕截屏。Optionally, Table 1 saves event records in .csv format. As shown in Table 1 and Figure 4, the time stamp represents the time when the action was executed. Specifically, "Thu Mar2614:59:30 2019" means that it was done at 14:59:30 PM on March 26, 2019. "Mouse left down" is the action of clicking the left mouse button, and then "Key down" is made on "Thu Mar26 14:59:322019" at 14:59:32 PM on March 26, 2019, which is the keyboard The typing action, followed by "Thu Mar26 14:59:33 2019" at 14:59:33 PM on March 26, 2019, a "Key down" was made, that is, the keyboard typing action, the input character was "20". This means that the engineer has completed a left mouse click on the user interface of the modeling software and entered information through the keyboard, and the information includes two characters. Then, the name of the sub-panel and the name of the parent panel both indicate the panel on the user interface of the modeling software. In this embodiment, the key value represents the coordinates on the user interface. Therefore, the position of the left mouse button above is specifically in the sub-panel. On the panel "Models.Frame.TestStation1", the specific coordinates are (1340,630). Wherein, the sub-panel "Models.Frame.TestStation1" belongs to the parent panel ".Models.Frame". In addition, the window position of "Models.Frame.TestStation1" is the coordinates (1090, 454)". However, the above information is not enough to identify the object name. Therefore, the window system (Windows Hook) cannot obtain enough meaningful modeling software For example, the name of the text box (text box name) or the name of the value box (box name), which requires the help of screenshots of modeling software.
进一步地,映射模块221将所述事件映射于所述目标及其像素分别 对应于X坐标轴和Y坐标轴上的最大值和最小值的列表中,其中,根据本发明的上述实施例,所述目标及其像素分别对应于X坐标轴和Y坐标轴上的最大值和最小值的列表中包括上文的表1和表2。需要说明的是,主界面500的结构如表1所示,表2是主界面500的其中一个次级界面600,主界面500必然还包括其他次级界面。Further, the mapping module 221 maps the event to the target and its pixels in a list corresponding to the maximum and minimum values on the X-coordinate axis and the Y-coordinate axis, respectively, wherein, according to the above-mentioned embodiment of the present invention, The list of the target and its pixels corresponding to the maximum and minimum values on the X-coordinate axis and the Y-coordinate axis respectively includes Table 1 and Table 2 above. It should be noted that the structure of the main interface 500 is shown in Table 1. Table 2 is one of the secondary interfaces 600 of the primary interface 500, and the primary interface 500 must also include other secondary interfaces.
在本实施例中,由于在表3中得知窗口类型为“SingleProc”,因此映射为窗口类型为“SingleProc”的次级界面,并且所映射的目标为“时间标签”。其中,每个事件都并不是互相孤立的,一些事件需要参考前面一些事件。例如,在本实施例中,如果这里所点击的标签并不是标签切换,默认的标签应该是“时间标签”。然后需要映射的是二级目标到窗口“Processing times”和数字框。其中,从表3可知本实施例在位置(1340,630)完成了一次鼠标左键点击,“Models.Frame.TestStation1”的左上位置为坐标(1090,454)”,因此在窗口“TestStation1”上的鼠标点击位置应该是(1340-1090,630-454),相对坐标应该是(250,176)。通过映射功能,我们知道用户在位置(250,176)上点击了“SingleProc”的次级界面,并且是在时间标签的“Processing times”范围内。In this embodiment, since it is known in Table 3 that the window type is "SingleProc", it is mapped to the secondary interface with the window type of "SingleProc", and the mapped target is "time label". Among them, each event is not isolated from each other, some events need to refer to some previous events. For example, in this embodiment, if the label clicked here is not a label switch, the default label should be "time label". Then what needs to be mapped is the secondary target to the window "Processing times" and the number box. Among them, it can be seen from Table 3 that this embodiment has completed a left mouse click at the position (1340, 630), and the upper left position of "Models.Frame.TestStation1" is the coordinates (1090, 454)", so on the window "TestStation1" The mouse click position should be (1340-1090, 630-454), and the relative coordinates should be (250, 176). Through the mapping function, we know that the user clicked on the secondary interface of "SingleProc" at the position (250, 176) , And it is within the "Processing times" range of the time label.
因此目前为止,我们获得的信息是:用户用鼠标左键点击了“Processing times”的数字框。So so far, the information we have obtained is: the user clicked the number box of "Processing times" with the left mouse button.
进一步地,所述像素坐标为所述目标相对于该目标所在窗口的坐标。例如,以目标所在的软件窗口的左上角坐标为原点,这是因为目标相对于其所在窗口的左上角的位置保持不变。Further, the pixel coordinates are the coordinates of the target relative to the window where the target is located. For example, take the coordinates of the upper left corner of the software window where the target is located as the origin, because the position of the target relative to the upper left corner of the window where it is located remains unchanged.
最后执行步骤S3,提炼模块222基于复数个建模操作提炼基于事件流的知识图谱,并保存于第二数据库DB 2中。根据前文所述,虽然我们有如表3第一事件列表示出的目标名称以及相关事件等分散的目标对象趋向的相关信息,但是我们还需要提炼和分析用户的建模意图,因此需要将上述信息解释为有意义的过程导向相关信息,如下表示出: Finally performing step S3, the extraction module 222 based on a plurality of modeling operations to extract the knowledge-based event stream pattern, and stored in the second database DB 2. According to the foregoing, although we have the target names and related events as shown in the first event list in Table 3, we have relevant information about scattered target object trends, but we also need to refine and analyze the user’s modeling intentions, so we need to combine the above information Interpreted as meaningful process-oriented related information, expressed as follows:
表4第二事件记录表Table 4 The second event record table
Figure PCTCN2019116052-appb-000006
Figure PCTCN2019116052-appb-000006
Figure PCTCN2019116052-appb-000007
Figure PCTCN2019116052-appb-000007
具体地,如表4所示,2019年的3月26日下午14时59分30秒,用户在建模软件界面上的母面板“Technomatix Observer_example1_rev3_0.spp”的子面板“Models.Frame.TestStation1”上坐标为(250,176)完成了一次鼠标左键点击的动作。然后,2019年的3月26日下午14时59分33秒,用户在建模软件界面上的母面板“.Models.Frame”的子面板“Models.Frame.TestStation1”上完成了两次键盘输入的动作,用户依次按下的键盘的数值键2(Numpad2)和数值键0(Numpad2)了。因此,如表4的第二事件记录表所示,经过提炼模块222分析,用户在建模软件上的建模意图为事件“Set_item[Process time]on_sub_panel”和“Keyboard input[20]for[Process time]on_sub_panel”。如图2所示,其中事件“Set_item[Process time]on_sub_panel”表示建模意图为响应上述鼠标动作对建模装置发出操作所述建模软件设定“Process times”(执行时间)的命令,事件“Keyboard input[20]for[Process time]on_sub_panel”表示建模意图为响应上述键盘动作对建模装置发出操作所述建模软件输入执行时间为“20”的命令。需要说明的是,在图4中,建模软件自动将用户输入的“20”识别为“20:00”。Specifically, as shown in Table 4, at 14:59:30 PM on March 26, 2019, the user displayed the sub-panel "Models.Frame.TestStation1" of the parent panel "Technomatix Observer_example1_rev3_0.spp" on the modeling software interface. The upper coordinate is (250, 176) to complete the action of a left mouse click. Then, at 14:59:33 PM on March 26, 2019, the user completed two keyboard inputs on the sub-panel "Models.Frame.TestStation1" of the parent panel ".Models.Frame" on the modeling software interface In the action, the user sequentially presses the numeric key 2 (Numpad2) and numeric key 0 (Numpad2) of the keyboard. Therefore, as shown in the second event record table of Table 4, after analysis by the refining module 222, the user’s modeling intention on the modeling software is the event "Set_item[Process time]on_sub_panel" and "Keyboard input[20]for[Process time]on_sub_panel". As shown in Figure 2, the event "Set_item[Process time] on_sub_panel" indicates that the modeling intention is to issue a command to operate the modeling software to set "Process times" (execution time) on the modeling device in response to the above-mentioned mouse action. "Keyboard input[20] for [Process time] on_sub_panel" indicates that the modeling intention is to issue a command to the modeling device to operate the modeling software input execution time of "20" in response to the above keyboard action. It should be noted that, in Figure 4, the modeling software automatically recognizes "20" input by the user as "20:00".
最后,这些事件和数据节点被保存为知识图谱,并保存于第二数据库DB 2中供后续分析。表4所示的事件被存储为如图5所示的知识图谱,如图5所示其中,事件1有类型为鼠标动作,事件1“Set_item[Process time]on_sub_panel”的时间戳为“Thu Apr 26 14:59:31 2018”,事件1的位置为“Technomatix Observer_example1_rev3_0.spp-.[.Models.Frame.Test Station1]”,事件1的关键值为坐标“(1340,630)”。其中,事件2“Keyboard input[20]for[Process time]on_sub_panel”的类型为键盘动作,事件1的时间戳为“Thu Apr 26 14:59:33 2018”,事件2的位置为“Technomatix Observer_example1_rev3_0.spp-.[.Models.Frame.Test Station1]”,事件2的关键值为键盘输入数值“20”。事件1和事件2的关系为:事件2的前一事件为“事件1”,事件1的后一事件为“事件2”。 Finally, these events and data nodes are saved as a knowledge graph and saved in the second database DB 2 for subsequent analysis. The events shown in Table 4 are stored as the knowledge graph shown in Figure 5. As shown in Figure 5, the type of event 1 is mouse action, and the timestamp of event 1 "Set_item[Process time]on_sub_panel" is "Thu Apr 26 14:59:31 2018", the location of event 1 is "Technomatix Observer_example1_rev3_0.spp-.[.Models.Frame.Test Station1]", and the key value of event 1 is the coordinate "(1340, 630)". Among them, the type of event 2 "Keyboard input[20]for[Process time]on_sub_panel" is keyboard action, the time stamp of event 1 is "Thu Apr 26 14:59:33 2018", and the location of event 2 is "Technomatix Observer_example1_rev3_0. spp-.[.Models.Frame.Test Station1]", the key value of event 2 is the keyboard input value "20". The relationship between event 1 and event 2 is: the previous event of event 2 is "event 1", and the next event of event 1 is "event 2".
根据本发明的又一优选实施例,用户用鼠标左键主界面500中的工具栏520中的标签522“Material Flow”中的四个组件,并将其拖拽到建模区域530,这四个组件分别为“Source”、“SingleProc”、“ParallelProc” 和“Drain”,然后双击打开组件“SingleProc”,然后将其中的“Processing time”后续的数字框中输入“2:00”。然后将上述用户操作记录为如下所示的第一事件记录表:According to another preferred embodiment of the present invention, the user uses the left mouse button to click the four components in the label 522 "Material Flow" in the toolbar 520 in the main interface 500, and drag them to the modeling area 530. The components are "Source", "SingleProc", "ParallelProc" and "Drain", then double-click to open the component "SingleProc", and then enter "2:00" in the number box following "Processing time". Then record the above user operation as the first event record table as shown below:
表5第一事件记录表Table 5 The first event record table
时间戳Timestamp 动作action 子面板名字Subpanel name 类型Types of 窗口位置Window position 母面板名字Mother panel name 关键值Key value
3/26/2019 14:53:193/26/2019 14:53:19 Mouse left downMouse left down .Models.Frame.Models.Frame mainmain NANA example.sppexample.spp (419,219)(419,219)
3/26/2019 14:53:223/26/2019 14:53:22 Mouse left downMouse left down .Models.Frame.Models.Frame mainmain NANA example.sppexample.spp (515,551)(515,551)
3/26/2019 14:53:243/26/2019 14:53:24 Mouse left downMouse left down .Models.Frame.Models.Frame mainmain NANA example.sppexample.spp (501,211)(501,211)
3/26/2019 14:53:273/26/2019 14:53:27 Mouse left downMouse left down .Models.Frame.Models.Frame mainmain NANA example.sppexample.spp (587,546)(587,546)
3/26/2019 14:53:303/26/2019 14:53:30 Mouse left downMouse left down .Models.Frame.Models.Frame mainmain NANA example.sppexample.spp (541,218)(541,218)
3/26/2019 14:53:323/26/2019 14:53:32 Mouse left downMouse left down .Models.Frame.Models.Frame mainmain NANA example.sppexample.spp (673,552)(673,552)
3/26/2019 14:53:343/26/2019 14:53:34 Mouse left downMouse left down .Models.Frame.Models.Frame mainmain NANA example.sppexample.spp (464,218)(464,218)
3/26/2019 14:53:373/26/2019 14:53:37 Mouse left downMouse left down .Models.Frame.Models.Frame mainmain NANA example.sppexample.spp (757,550)(757,550)
3/26/2019 14:53:393/26/2019 14:53:39 Mouse left downMouse left down .Models.Frame.Models.Frame mainmain NANA example.sppexample.spp (590,550)(590,550)
3/26/2019 14:53:413/26/2019 14:53:41 Mouse left downMouse left down .Models.Frame.SingleProc.Models.Frame.SingleProc SingleProcSingleProc (383,200)(383, 200) .Models.Frame.Models.Frame (631,375)(631,375)
3/26/2019 14:53:443/26/2019 14:53:44 key downkey down .Models.Frame.SingleProc.Models.Frame.SingleProc SingleProcSingleProc (383,200)(383, 200) .Models.Frame.Models.Frame Numpad2Numpad2
接着,映射模块221执行映射功能,提炼模块222执行提炼功能。根据前文所述,虽然我们有如表5第一事件列表示出的目标名称以及相关事件等分散的目标对象趋向的相关信息,但是我们还需要提炼和分析用户的建模意图,因此需要将上述信息解释为有意义的过程导向相关信息,如下表示出:Next, the mapping module 221 performs the mapping function, and the refining module 222 performs the refining function. According to the foregoing, although we have the target names and related events as shown in the first event list in Table 5, we have relevant information about the trends of scattered target objects, but we also need to refine and analyze the user's modeling intentions, so we need to combine the above information Interpreted as meaningful process-oriented related information, expressed as follows:
表6第三事件记录表Table 6 The third event record table
Figure PCTCN2019116052-appb-000008
Figure PCTCN2019116052-appb-000008
具体地,如表6所示,2018年3月26日下午14时53分22秒,用户在建模软件界面上的母面板“Example.spp”的子面板“.Model.Frame”上坐标为(515,551)完成了一次鼠标左键点击的动作。其中事件“Create_object[Source]”表示建模意图为响应上述鼠标动作对建模装置发出操作所述建模软件的建模界面上建立第一元件Source的命令。2019年3月26日下午14时53分27秒,用户在建模软件界面上的母面板“Example.spp”的子面板“.Model.Frame”上坐标为(587,546)完成了一次鼠标左键点击的动作。其中事件“Create_object[SingleProc]”表示建模意图为响应上述鼠标动作对建模装置发出操作所述建模软件的建模界面上建立组件SingleProc的命令。2019年3月26日下午14时53分32秒,用户在建模软件界面上的母面板“Example.spp”的子面板“.Model.Frame”上坐标为(673,552)完成了一次鼠标左键点击的动作。其中事件“Create_object[ParallelProc]”表示建模意图为响应上述鼠标动作对建模装置发出操作所述建模软件的建模界面上建立组件ParallelProc的命令。2019年3月26日下午14时53分37秒,用户在建模软件界面上的母面板“Example.spp”的子面板“.Model.Frame”上坐标为(757,550)完成了一次鼠标左键点击的动作。其中事件“Create_object[Drain]”表示建模意图为响应上述鼠标动作对建模装置发出操作所述建模软件的建模界面上建立第四元件Drain的命令。2019年3月26日下午14时53分41秒,用户在建模软件界面上的母面板“Example.spp”的子面板“.Model.Frame.SingleProc”上坐标为(248,175)完成了一次鼠标左键点击的动作。其中事件“Set_item[Processing Time]on_sub_panel”表示建模意图为响应上述鼠标动作对建模装置发出操作所述建模软件设定“Process time”(执行时间)的命令。2019年3月26日下午14时53分44秒,用户在建模软件界面上的母面板“Example.spp”的子面板“.Model.Frame.SingleProc”上完成了一次键盘的动作。其中事件“keyboard input[2]for[Processing Time]on_sub_panel”表示建模意图为响应上述键盘动作对建模装置发出操作所述建模软件输入执行时间为“2”的命令。需要说明的是,建模软件自动将用户输入的“2”识别为“2:00”。Specifically, as shown in Table 6, at 14:53:22 PM on March 26, 2018, the coordinates of the user on the sub-panel ".Model.Frame" of the parent panel "Example.spp" on the modeling software interface are (515,551) Completed a click of the left mouse button. The event "Create_object[Source]" indicates that the modeling intention is to send a command to the modeling device to operate the modeling interface of the modeling software to establish the first element Source in response to the above-mentioned mouse action. At 14:53:27 pm on March 26, 2019, the user completed a left mouse button at (587,546) on the sub-panel ".Model.Frame" of the parent panel "Example.spp" on the modeling software interface The action of the click. The event "Create_object[SingleProc]" indicates that the modeling intention is to send a command to the modeling device to operate the modeling interface of the modeling software in response to the mouse action. At 14:53:32 PM on March 26, 2019, the user completed a left mouse button at (673,552) on the sub-panel ".Model.Frame" of the parent panel "Example.spp" on the modeling software interface. The action of the click. The event "Create_object[ParallelProc]" indicates that the modeling intention is to issue a command to the modeling device to operate the ParallelProc component on the modeling interface of the modeling software in response to the above-mentioned mouse action. At 14:53:37 PM on March 26, 2019, the user completed a left mouse button on the sub-panel ".Model.Frame" of the parent panel "Example.spp" on the modeling software interface at (757,550) The action of the click. The event "Create_object[Drain]" indicates that the modeling intention is to issue a command to the modeling device to operate the modeling interface of the modeling software to establish the fourth element Drain in response to the above-mentioned mouse action. At 14:53:41 PM on March 26, 2019, the user completed a mouse at (248,175) on the sub-panel ".Model.Frame.SingleProc" of the parent panel "Example.spp" on the modeling software interface Left click action. The event "Set_item[Processing Time] on_sub_panel" indicates that the modeling intention is to send a command to operate the modeling software to set the "Process time" (execution time) of the modeling device in response to the mouse action described above. At 14:53:44 PM on March 26, 2019, the user completed a keyboard action on the sub-panel ".Model.Frame.SingleProc" of the parent panel "Example.spp" on the modeling software interface. The event "keyboard input[2] for [Processing Time] on_sub_panel" indicates that the modeling intention is to issue a command to operate the modeling software input execution time "2" to the modeling device in response to the above keyboard action. It should be noted that the modeling software automatically recognizes the "2" input by the user as "2:00".
提炼模块222基于复数个建模操作提炼基于事件流的知识图谱,并 保存于第二数据库DB 2中。其中,如图6所示,事件流的知识图谱包括事件事件3、事件4、事件5、事件6、事件7和事件8,上述事件按照执行先后顺序形成一事件流。其中,事件3“Create_object[Source]”的类型为鼠标动作,事件3的时间戳为“5/22/2018 10:53:20”,事件3的位置为“Example.spp–[.Model.Frame]”,事件4“Create_object[SingleProc]”的关键值为坐标“(515,551)”。其中,事件4的类型为鼠标动作,事件4的时间戳为“5/22/2018 10:53:23”,事件4的位置为“Example.spp–[.Model.Frame]”,事件4的关键值为坐标“(587,546)”。其中,事件5“Create_object[ParallelProc]”的类型为鼠标动作,事件5的时间戳为“5/22/2018 10:53:25”,事件5的位置为“Example.spp–[.Model.Frame]”,事件5的关键值为坐标“(673,552)”。其中,事件6“Create_object[Drain]”的类型为鼠标动作,事件6的时间戳为“5/22/2018 10:53:28”,事件6的位置为“Example.spp–[.Model.Frame]”,事件6的关键值为坐标“(757,550)”。其中,事件7的类型为鼠标动作,事件7的时间戳为“5/22/2018 10:53:34”,事件7的位置为“Example.spp–[.Model.Frame.SingleProc]”,事件7“Set_item[Processing Time]on_sub_panel”的关键值为坐标“(21,1187)”。其中,事件8的类型为键盘动作,事件8的时间戳为“5/22/2018 10:53:37”,事件8“keyboard input[2]for[Processing Time]on_sub_panel”的位置为“Example.spp–[.Model.Frame.SingleProc]”,事件8的关键值为键盘输入“2”。 The refinement module 222 refines the knowledge graph based on the event flow based on a plurality of modeling operations, and saves the knowledge graph in the second database DB 2 . Among them, as shown in Figure 6, the knowledge graph of the event stream includes event 3, event 4, event 5, event 6, event 7 and event 8. The above events form an event stream in the order of execution. Among them, the type of event 3 "Create_object[Source]" is a mouse action, the time stamp of event 3 is "5/22/2018 10:53:20", and the location of event 3 is "Example.spp–[.Model.Frame ]", the key value of event 4 "Create_object[SingleProc]" is the coordinate "(515,551)". Among them, the type of event 4 is a mouse action, the time stamp of event 4 is "5/22/2018 10:53:23", the location of event 4 is "Example.spp–[.Model.Frame]", and the time stamp of event 4 is "Example.spp–[.Model.Frame]". The key value is the coordinate "(587,546)". Among them, the type of event 5 "Create_object[ParallelProc]" is a mouse action, the time stamp of event 5 is "5/22/2018 10:53:25", and the location of event 5 is "Example.spp–[.Model.Frame ]", the key value of event 5 is the coordinate "(673,552)". Among them, the type of event 6 "Create_object[Drain]" is a mouse action, the time stamp of event 6 is "5/22/2018 10:53:28", and the location of event 6 is "Example.spp–[.Model.Frame ]", the key value of event 6 is the coordinate "(757,550)". Among them, the type of event 7 is a mouse action, the time stamp of event 7 is "5/22/2018 10:53:34", and the location of event 7 is "Example.spp–[.Model.Frame.SingleProc]", the event 7 The key value of "Set_item[Processing Time]on_sub_panel" is the coordinate "(21,1187)". Among them, the type of event 8 is keyboard action, the time stamp of event 8 is "5/22/2018 10:53:37", and the location of event 8 "keyboard input[2]for[Processing Time]on_sub_panel" is "Example. spp–[.Model.Frame.SingleProc]", the key value of event 8 is keyboard input "2".
其中,事件3和事件4的关系为:事件4的前一事件为“事件3”,事件3的后一事件为“事件4”。事件4和事件5的关系为:事件5具的前一事件为“事件4”,事件4的后一事件为“事件5”。事件5和事件6的关系为:事件6的前一事件为事件5”,事件5的后一事件为“事件6”。事件6和事件7的关系为:事件7的前一事件为“事件6”,事件6的后一事件为“事件7”。事件7和事件8的关系为:事件8的前一事件为“事件7”,事件7的后一事件为“事件8”。Among them, the relationship between event 3 and event 4 is: the previous event of event 4 is "event 3", and the next event of event 3 is "event 4". The relationship between event 4 and event 5 is: the previous event of event 5 is "event 4", and the subsequent event of event 4 is "event 5". The relationship between event 5 and event 6 is: the previous event of event 6 is event 5, and the next event of event 5 is "event 6". The relationship between event 6 and event 7 is: the previous event of event 7 is "event 6", the next event of event 6 is "event 7". The relationship between event 7 and event 8 is: the previous event of event 8 is "event 7", and the next event of event 7 is "event 8".
由于用于该学习模块的图像识别和光学字符识别功能(OCR,Optical Character Recognition)需要消耗一定量时间,因此本发明将所述学习模块设置为线下运行,效率更高,速度更快。Since the image recognition and optical character recognition (OCR, Optical Character Recognition) functions used for the learning module need to consume a certain amount of time, the present invention sets the learning module to run offline, which is more efficient and faster.
本发明第二方面提供乐软件的知识捕捉系统,包括:处理器;以及与所述处理器耦合的存储器,所述存储器具有存储于其中的指令,所述指令在被处理器执行时使所述电子设备执行动作,所述动作包括:A1,获取所述软件的截屏并进行基于该截屏执行目标及其像素坐标的识别,其中,所述目标包括所述截屏上的复数个功能区域、图标或文字,迭代执行步骤A1,以获取所述目标及其像素分别对应于X坐标轴和Y坐标轴上的最大值和最小值的列表并保存于第一数据库中,然后执行如下步骤:A2,在线捕捉软件操作装置上基于该软件的事件,将所述事件映射于所述列表中以获取该事件所对应的软件操作;The second aspect of the present invention provides a knowledge capture system for music software, including: a processor; and a memory coupled with the processor, the memory having instructions stored therein, and the instructions cause the The electronic device performs an action, and the action includes: A1, acquiring a screenshot of the software and performing recognition based on the screenshot execution target and its pixel coordinates, wherein the target includes a plurality of functional areas, icons, or For text, perform step A1 iteratively to obtain a list of the target and its pixels corresponding to the maximum and minimum values on the X-coordinate axis and Y-coordinate axis, and save it in the first database, and then perform the following steps: A2, online Capture an event based on the software on the software operating device, and map the event to the list to obtain the software operation corresponding to the event;
A3,基于复数个软件操作提炼基于事件流的知识图谱,并保存于第二数据库中。A3. Refine the knowledge graph based on the event stream based on multiple software operations and save it in the second database.
进一步地,所述像素坐标为所述目标相对于该目标所在窗口的坐标。Further, the pixel coordinates are the coordinates of the target relative to the window where the target is located.
进一步地,所述步骤A1还包括如下步骤:A11,获取所述软件的截屏并将该截屏转化为灰色图像;A12,对所述灰色图像的截屏基于每个目标执行图像分割,以将所述每个目标在所述灰色图像中进行定位以获得所述目标的像素坐标;A13,利用图像匹配算法识别基于图像的目标,以及利用光学字符识别功能识别基于文字的目标。Further, the step A1 also includes the following steps: A11, acquiring a screenshot of the software and converting the screenshot into a gray image; A12, performing image segmentation on the screenshot of the gray image based on each target, so as to divide the Each target is located in the gray image to obtain the pixel coordinates of the target; A13, the image matching algorithm is used to recognize the image-based target, and the optical character recognition function is used to recognize the text-based target.
进一步地,在所述步骤A1还包括如下步骤:捕捉所述软件操作装置上基于该软件的模拟操作,以获取所述软件的截屏并进行基于该截屏执行目标及其像素坐标的识别,其中,所述模拟操作是通过软件遍历模拟用户操作来实现。Further, the step A1 further includes the following step: capturing a simulation operation based on the software on the software operating device to obtain a screenshot of the software and perform recognition based on the screenshot execution target and its pixel coordinates, wherein, The simulation operation is realized by traversing and simulating user operations by software.
进一步地,所述模拟操作包括对软件的主界面及其次级界面的操作,其中,所述次级界面是从所述软件的主界面执行一次的键盘、鼠标和键盘操作获得的第一界面,以及所有针对该第一界面及其子界面的操作。Further, the simulation operation includes operations on the main interface of the software and its secondary interfaces, wherein the secondary interface is the first interface obtained by performing keyboard, mouse, and keyboard operations once from the main interface of the software, And all operations on the first interface and its sub-interfaces.
进一步地,所述列表还包括所述操作发生时的时间戳,相关的子面板名字、母面板名字以及所述操作对应的关键值,其中,所述关键值包括坐标、输入文本、输入数值。Further, the list also includes the time stamp when the operation occurred, the name of the related sub-panel, the name of the parent panel, and the key value corresponding to the operation, wherein the key value includes coordinates, input text, and input value.
本发明第三方面提供乐软件的知识捕捉装置,其中,包括:知识学习模块,其获取所述软件的截屏并进行基于该截屏执行目标及其像素坐标的识别,其中,所述目标包括所述截屏上的复数个功能区域、图标或文字,直至获取所述目标及其像素分别对应于X坐标轴和Y坐标轴上的 最大值和最小值的列表并保存于第一数据库中:知识获取装置,其在线捕捉软件操作装置上基于该软件的事件,将所述事件映射于所述列表中以获取该事件所对应的软件操作,并基于复数个软件操作提炼基于事件流的知识图谱,并保存于第二数据库中。A third aspect of the present invention provides a knowledge capture device for music software, which includes: a knowledge learning module that obtains a screenshot of the software and performs recognition based on the screenshot execution target and its pixel coordinates, wherein the target includes the Take a screenshot of a plurality of functional areas, icons or texts until the target and its pixels correspond to the maximum and minimum lists on the X-coordinate axis and the Y-coordinate axis and save them in the first database: knowledge acquisition device It captures events based on the software on the software operating device online, maps the events to the list to obtain the software operations corresponding to the events, and refines the knowledge graph based on the event flow based on multiple software operations, and saves them In the second database.
本发明第四方面提供了计算机程序产品,所述计算机程序产品被有形地存储在计算机可读介质上并且包括计算机可执行指令,所述计算机可执行指令在被执行时使至少一个处理器执行本发明第一方面所述的方法。The fourth aspect of the present invention provides a computer program product, which is tangibly stored on a computer-readable medium and includes computer-executable instructions that, when executed, cause at least one processor to execute the present invention. The method of the first aspect of the invention.
本发明第五方面提供了计算机可读介质,其上存储有计算机可执行指令,所述计算机可执行指令在被执行时使至少一个处理器执行本发明第一方面所述的方法。The fifth aspect of the present invention provides a computer-readable medium on which computer-executable instructions are stored, and when executed, the computer-executable instructions cause at least one processor to perform the method described in the first aspect of the present invention.
如果在线将用户的鼠标、键盘事件翻译为用户界面目标导向的事件将消耗一些时间,有时会持续几百毫秒,这会影响客户在同时进行的建模操作。本发明提供的软件的知识获取机制能够提前在线下学习知识并将这些知识保存于数据库,并结合简单快速地映射功能来将识别这些信息,这极大地提高了效率。Translating the user's mouse and keyboard events into user interface goal-oriented events will consume some time online, sometimes lasting several hundred milliseconds, which will affect the modeling operations performed by customers at the same time. The knowledge acquisition mechanism of the software provided by the present invention can learn knowledge offline in advance and save the knowledge in the database, and combine the simple and rapid mapping function to recognize the information, which greatly improves the efficiency.
本发明能够适用于许多软件,特别是工程软件,并尤其适合建模软件。本发明不依赖于软件本身的功能,也不干涉建模过程,因此能够独立运行。本发明提供的知识捕捉功能在后台运行,因此并不会打搅、影响和改变用户对软件的操作。本发明基于操作系统功能,例如windows hook或者截屏功能,因此其能够应用于多种软件,并且不会影响这些软件的原始功能或者用户界面。The invention can be applied to many softwares, especially engineering software, and is especially suitable for modeling software. The present invention does not depend on the function of the software itself, nor does it interfere with the modeling process, so it can run independently. The knowledge capture function provided by the present invention runs in the background, so it will not disturb, influence or change the user's operation of the software. The present invention is based on operating system functions, such as windows hook or screenshot function, so it can be applied to a variety of software without affecting the original functions or user interfaces of these software.
本发明并不仅仅适用于单一软件工具,也能够用于复合软件(multi-software),例如,当用户需要在多个软件工具之间切换工作时,比如协同仿真(multi-software),知识也能被捕捉。The present invention is not only suitable for a single software tool, but can also be used for multi-software. For example, when the user needs to switch between multiple software tools, such as co-simulation (multi-software), knowledge is also Can be captured.
尽管本发明的内容已经通过上述优选实施例作了详细介绍,但应当认识到上述的描述不应被认为是对本发明的限制。在本领域技术人员阅读了上述内容后,对于本发明的多种修改和替代都将是显而易见的。因此,本发明的保护范围应由所附的权利要求来限定。此外,不应将权利要求中的任何附图标记视为限制所涉及的权利要求;“包括”一词不排除其它权利要求或说明书中未列出的装置或步骤;“第一”、“第二”等词语 仅用来表示名称,而并不表示任何特定的顺序。Although the content of the present invention has been described in detail through the above preferred embodiments, it should be recognized that the above description should not be considered as limiting the present invention. After those skilled in the art have read the above content, various modifications and alternatives to the present invention will be obvious. Therefore, the protection scope of the present invention should be defined by the appended claims. In addition, any reference signs in the claims should not be regarded as limiting the involved claims; the word "comprising" does not exclude other claims or devices or steps not listed in the specification; "first", "section Words such as "two" are only used to indicate names, and do not indicate any specific order.

Claims (15)

  1. 软件的知识捕捉方法,其中,包括如下步骤:Software knowledge capture method, which includes the following steps:
    S1,获取所述软件的截屏并进行基于该截屏执行目标及其像素坐标的识别,其中,所述目标包括所述截屏上的复数个功能区域、图标或文字,S1. Obtain a screenshot of the software and perform recognition based on the screenshot execution target and its pixel coordinates, wherein the target includes a plurality of functional areas, icons or texts on the screenshot,
    迭代执行步骤S1,以获取所述目标及其像素分别对应于X坐标轴和Y坐标轴上的最大值和最小值的列表并保存于第一数据库中,然后执行如下步骤:Step S1 is performed iteratively to obtain a list of the target and its pixels corresponding to the maximum and minimum values on the X-coordinate axis and the Y-coordinate axis, and save them in the first database, and then perform the following steps:
    S2,在线捕捉软件操作装置上基于该软件的事件,将所述事件映射于所述列表中以获取该事件所对应的软件操作;S2, online capturing an event based on the software on the software operating device, and mapping the event to the list to obtain the software operation corresponding to the event;
    S3,基于复数个软件操作提炼基于事件流的知识图谱,并保存于第二数据库中。S3: Refine the knowledge graph based on the event stream based on a plurality of software operations, and save it in the second database.
  2. 根据权利要求1所述的软件的知识捕捉方法,其特征在于,所述像素坐标为所述目标相对于该目标所在窗口的坐标。The software knowledge capture method according to claim 1, wherein the pixel coordinates are the coordinates of the target relative to the window where the target is located.
  3. 根据权利要求1所述的软件的知识捕捉方法,其特征在于,所述步骤S1还包括如下步骤:The software knowledge capture method according to claim 1, wherein the step S1 further comprises the following steps:
    S11,获取所述软件的截屏并将该截屏转化为灰色图像;S11. Obtain a screenshot of the software and convert the screenshot into a gray image;
    S12,对所述灰色图像的截屏基于每个目标执行图像分割,以将所述每个目标在所述灰色图像中进行定位以获得所述目标的像素坐标;S12. Perform image segmentation on the screen capture of the gray image based on each target, so as to locate each target in the gray image to obtain the pixel coordinates of the target;
    S13,利用图像匹配算法识别基于图像的目标,以及利用光学字符识别功能识别基于文字的目标。S13, using an image matching algorithm to recognize an image-based target, and using an optical character recognition function to recognize a text-based target.
  4. 根据权利要求1所述的软件的知识捕捉方法,其特征在于,在所述步骤S1还包括如下步骤:The software knowledge capture method according to claim 1, wherein said step S1 further comprises the following steps:
    捕捉所述软件操作装置上基于该软件的模拟操作,以获取所述软件的截屏并进行基于该截屏执行目标及其像素坐标的识别,其中,所述模拟操作是通过软件遍历模拟用户操作来实现。Capture the simulation operation based on the software on the software operating device to obtain a screenshot of the software and perform recognition based on the screenshot execution target and its pixel coordinates, wherein the simulation operation is realized by traversing the simulation user operation by the software .
  5. 根据权利要求1所述的软件的知识捕捉方法,其特征在于,所述模拟操作包括对软件的主界面及其次级界面的操作,其中,所述次级界面是从所述软件的主界面执行一次的键盘、鼠标和键盘操作获得的第一界面,以及所有针对该第一界面及其子界面的操作。The method for capturing knowledge of software according to claim 1, wherein the simulation operation includes an operation on the main interface of the software and its secondary interface, wherein the secondary interface is executed from the main interface of the software. The first interface obtained by one keyboard, mouse, and keyboard operation, and all operations on the first interface and its sub-interfaces.
  6. 根据权利要求1所述的软件的知识捕捉方法,其特征在于,所述列表还包括所述操作发生时的时间戳,相关的子面板名字、母面板名字以及所述操作对应的关键值,其中,所述关键值包括坐标、输入文本、输入数值。The method for capturing knowledge of software according to claim 1, wherein the list further includes the time stamp when the operation occurs, the name of the related child panel, the name of the parent panel, and the key value corresponding to the operation, wherein , The key value includes coordinates, input text, and input value.
  7. 软件的知识捕捉系统,包括:Software knowledge capture system, including:
    处理器;以及Processor; and
    与所述处理器耦合的存储器,所述存储器具有存储于其中的指令,所述指令在被处理器执行时使所述电子设备执行动作,所述动作包括:A memory coupled to the processor, the memory having instructions stored therein, the instructions, when executed by the processor, cause the electronic device to perform actions, and the actions include:
    A1,获取所述软件的截屏并进行基于该截屏执行目标及其像素坐标的识别,其中,所述目标包括所述截屏上的复数个功能区域、图标或文字,A1. Obtain a screenshot of the software and perform recognition based on the screenshot execution target and its pixel coordinates, wherein the target includes a plurality of functional areas, icons or text on the screenshot,
    迭代执行步骤A1,以获取所述目标及其像素分别对应于X坐标轴和Y坐标轴上的最大值和最小值的列表并保存于第一数据库中,然后执行如下步骤:Step A1 is performed iteratively to obtain a list of the target and its pixels corresponding to the maximum and minimum values on the X-coordinate axis and the Y-coordinate axis, and save them in the first database, and then perform the following steps:
    A2,在线捕捉软件操作装置上基于该软件的事件,将所述事件映射于所述列表中以获取该事件所对应的软件操作;A2. Online capture of events based on the software on the software operating device, and map the events to the list to obtain the software operation corresponding to the event;
    A3,基于复数个软件操作提炼基于事件流的知识图谱,并保存于第二数据库中。A3. Refine the knowledge graph based on the event stream based on multiple software operations and save it in the second database.
  8. 根据权利要求1所述的软件的知识捕捉系统,其特征在于,所述像素坐标为所述目标相对于该目标所在窗口的坐标。The software knowledge capture system according to claim 1, wherein the pixel coordinates are the coordinates of the target relative to the window where the target is located.
  9. 根据权利要求1所述的软件的知识捕捉系统,其特征在于,所述步骤A1还包括如下步骤:The software knowledge capture system according to claim 1, wherein the step A1 further comprises the following steps:
    A11,获取所述软件的截屏并将该截屏转化为灰色图像;A11. Obtain a screenshot of the software and convert the screenshot into a gray image;
    A12,对所述灰色图像的截屏基于每个目标执行图像分割,以将所述每个目标在所述灰色图像中进行定位以获得所述目标的像素坐标;A12. Perform image segmentation on the screenshot of the gray image based on each target, so as to locate each target in the gray image to obtain the pixel coordinates of the target;
    A13,利用图像匹配算法识别基于图像的目标,以及利用光学字符识别功能识别基于文字的目标。A13, use image matching algorithms to recognize image-based targets, and use optical character recognition to recognize text-based targets.
  10. 根据权利要求1所述的软件的知识捕捉系统,其特征在于,在所述步骤A1还包括如下步骤:The software knowledge capture system according to claim 1, wherein said step A1 further comprises the following steps:
    捕捉所述软件操作装置上基于该软件的模拟操作,以获取所述软件 的截屏并进行基于该截屏执行目标及其像素坐标的识别,其中,所述模拟操作是通过软件遍历模拟用户操作来实现。Capture the simulation operation based on the software on the software operating device to obtain a screenshot of the software and perform recognition based on the screenshot execution target and its pixel coordinates, wherein the simulation operation is realized by traversing the simulation user operation by the software .
  11. 根据权利要求1所述的软件的知识捕捉系统,其特征在于,所述模拟操作包括对软件的主界面及其次级界面的操作,其中,所述次级界面是从所述软件的主界面执行一次的键盘、鼠标和键盘操作获得的第一界面,以及所有针对该第一界面及其子界面的操作。The software knowledge capture system according to claim 1, wherein the simulation operation includes an operation on the main interface of the software and its secondary interface, wherein the secondary interface is executed from the main interface of the software The first interface obtained by one keyboard, mouse, and keyboard operation, and all operations on the first interface and its sub-interfaces.
  12. 根据权利要求1所述的软件的知识捕捉系统,其特征在于,所述列表还包括所述操作发生时的时间戳,相关的子面板名字、母面板名字以及所述操作对应的关键值,其中,所述关键值包括坐标、输入文本、输入数值。The software knowledge capture system according to claim 1, wherein the list further includes the timestamp when the operation occurs, the name of the related child panel, the name of the parent panel, and the key value corresponding to the operation, wherein , The key value includes coordinates, input text, and input value.
  13. 软件的知识捕捉装置,其中,包括:Software knowledge capture device, including:
    知识学习模块,其获取所述软件的截屏并进行基于该截屏执行目标及其像素坐标的识别,其中,所述目标包括所述截屏上的复数个功能区域、图标或文字,A knowledge learning module that obtains a screenshot of the software and performs recognition based on the screenshot execution target and its pixel coordinates, wherein the target includes a plurality of functional areas, icons or text on the screenshot,
    直至获取所述目标及其像素分别对应于X坐标轴和Y坐标轴上的最大值和最小值的列表并保存于第一数据库中:Until the target and its pixels correspond to the maximum and minimum lists on the X-coordinate axis and the Y-coordinate axis, and save them in the first database:
    知识获取装置,其在线捕捉软件操作装置上基于该软件的事件,将所述事件映射于所述列表中以获取该事件所对应的软件操作,并基于复数个软件操作提炼基于事件流的知识图谱,并保存于第二数据库中。A knowledge acquisition device that online captures events based on the software on a software operating device, maps the events in the list to obtain the software operations corresponding to the events, and refines the knowledge graph based on the event flow based on a plurality of software operations , And save in the second database.
  14. 计算机程序产品,所述计算机程序产品被有形地存储在计算机可读介质上并且包括计算机可执行指令,所述计算机可执行指令在被执行时使至少一个处理器执行根据权利要求1至6中任一项所述的方法。A computer program product that is tangibly stored on a computer-readable medium and includes computer-executable instructions that when executed cause at least one processor to execute any of claims 1 to 6 The method described in one item.
  15. 计算机可读介质,其上存储有计算机可执行指令,所述计算机可执行指令在被执行时使至少一个处理器执行根据权利要求1至6中任一项所述的方法。A computer-readable medium having computer-executable instructions stored thereon, the computer-executable instructions, when executed, cause at least one processor to execute the method according to any one of claims 1 to 6.
PCT/CN2019/116052 2019-11-06 2019-11-06 Method, apparatus and system for capturing knowledge in software WO2021087818A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2019/116052 WO2021087818A1 (en) 2019-11-06 2019-11-06 Method, apparatus and system for capturing knowledge in software
CN201980100741.8A CN114430823A (en) 2019-11-06 2019-11-06 Software knowledge capturing method, device and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2019/116052 WO2021087818A1 (en) 2019-11-06 2019-11-06 Method, apparatus and system for capturing knowledge in software

Publications (1)

Publication Number Publication Date
WO2021087818A1 true WO2021087818A1 (en) 2021-05-14

Family

ID=75848215

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/116052 WO2021087818A1 (en) 2019-11-06 2019-11-06 Method, apparatus and system for capturing knowledge in software

Country Status (2)

Country Link
CN (1) CN114430823A (en)
WO (1) WO2021087818A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116400992A (en) * 2023-03-30 2023-07-07 芜湖本初子午信息技术有限公司 Big data-based computer control management system and method

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116400907B (en) * 2023-06-08 2024-02-02 四川云申至诚科技有限公司 Knowledge learning-based automatic programming method, storage medium and apparatus

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040037451A1 (en) * 2002-08-22 2004-02-26 Kim Tae Jung Image processing method for automatic image registration and correction
CN104268006A (en) * 2014-10-27 2015-01-07 北京奇虎科技有限公司 Keyboard and mouse script playback method and device
CN108228421A (en) * 2017-12-26 2018-06-29 东软集团股份有限公司 data monitoring method, device, computer and storage medium
CN109324864A (en) * 2018-10-24 2019-02-12 北京赢销通软件技术有限公司 A kind of acquisition methods and device of man-machine interactive operation information

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050060719A1 (en) * 2003-09-12 2005-03-17 Useractive, Inc. Capturing and processing user events on a computer system for recording and playback
CN105988924B (en) * 2015-02-10 2018-12-28 中国船舶工业综合技术经济研究院 A kind of non-intrusion type embedded software graphic user interface automated testing method
US9998598B1 (en) * 2017-02-02 2018-06-12 Conduent Business Services, Llc Methods and systems for automatically recognizing actions in a call center environment using screen capture technology

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040037451A1 (en) * 2002-08-22 2004-02-26 Kim Tae Jung Image processing method for automatic image registration and correction
CN104268006A (en) * 2014-10-27 2015-01-07 北京奇虎科技有限公司 Keyboard and mouse script playback method and device
CN108228421A (en) * 2017-12-26 2018-06-29 东软集团股份有限公司 data monitoring method, device, computer and storage medium
CN109324864A (en) * 2018-10-24 2019-02-12 北京赢销通软件技术有限公司 A kind of acquisition methods and device of man-machine interactive operation information

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116400992A (en) * 2023-03-30 2023-07-07 芜湖本初子午信息技术有限公司 Big data-based computer control management system and method

Also Published As

Publication number Publication date
CN114430823A (en) 2022-05-03

Similar Documents

Publication Publication Date Title
US10354225B2 (en) Method and system for process automation in computing
JP2022514155A (en) Software test
US5627959A (en) Method for manipulating graphic objects
CN111079387B (en) Automatic questionnaire generation method and device, computer equipment and storage medium
CN107666987A (en) Robotic process automates
CN104572072B (en) A kind of language transfer method and equipment to the program based on MVC pattern
Burns et al. A dataset for interactive vision-language navigation with unknown command feasibility
CN113255614A (en) RPA flow automatic generation method and system based on video analysis
US9459780B1 (en) Documenting interactive graphical designs
Rhyne Dialogue management for gestural interfaces
WO2021087818A1 (en) Method, apparatus and system for capturing knowledge in software
CN108664461A (en) A kind of web form Auto-writing method and device
EP1876553A1 (en) Method and system for engineering process graphics using sketch recognition
CN114201144A (en) Micro service system construction method, device and medium based on domain-driven design
CN112667517A (en) Method, device, equipment and storage medium for acquiring automatic test script
EP3933653A1 (en) Method and system for generating a digital representation of one or more engineering diagrams in a computing environment
JP2009134673A (en) Gui screen operation sequence verifying apparatus, method, and program
WO2020124377A1 (en) Modeling knowledge acquisition method and apparatus, and system
US20230169399A1 (en) System and methods for robotic process automation
JP7053219B2 (en) Document retrieval device and method
Heil et al. Assessing completeness in training data for image-based analysis of web user interfaces
WO2022195784A1 (en) Classification device, classification method, and classification program
Guo et al. A business process explorer: recovering and visualizing e-commerce business processes
JP7386560B2 (en) Software testing methods
WO2022054262A1 (en) Data processing device, data processing method, and data processing program

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19951893

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19951893

Country of ref document: EP

Kind code of ref document: A1