WO2020124377A1 - 建模的知识获取方法、装置和系统 - Google Patents

建模的知识获取方法、装置和系统 Download PDF

Info

Publication number
WO2020124377A1
WO2020124377A1 PCT/CN2018/121814 CN2018121814W WO2020124377A1 WO 2020124377 A1 WO2020124377 A1 WO 2020124377A1 CN 2018121814 W CN2018121814 W CN 2018121814W WO 2020124377 A1 WO2020124377 A1 WO 2020124377A1
Authority
WO
WIPO (PCT)
Prior art keywords
event
modeling
mouse
action
record table
Prior art date
Application number
PCT/CN2018/121814
Other languages
English (en)
French (fr)
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/CN2018/121814 priority Critical patent/WO2020124377A1/zh
Priority to CN201880099861.6A priority patent/CN113168283A/zh
Publication of WO2020124377A1 publication Critical patent/WO2020124377A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/58Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N5/00Computing arrangements using knowledge-based models
    • G06N5/02Knowledge representation; Symbolic representation
    • G06N5/022Knowledge engineering; Knowledge acquisition
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis

Definitions

  • the invention relates to the field of modeling, in particular to a method, device and system for acquiring knowledge of modeling.
  • the engineering modeling process covers a large amount of knowledge, which is especially beneficial for experts’ knowledge. Based on this knowledge, some junior engineers can gain insights in their modeling work, which can help them improve the quality and efficiency of modeling work.
  • the above process is called knowledge capture and reuse (capturing and reuse).
  • the prior art usually has three ways to capture knowledge.
  • One way to capture knowledge is to manually input and construct knowledge. Specifically, it is necessary for specialized personnel and experts to communicate to obtain the necessary information, and then to construct the knowledge manually. This method takes time and requires the cooperation of experts.
  • Another way to capture knowledge is to obtain information from log files. Specifically, software event log files are regarded as the most important resources that can provide first-hand process information. However, most of the time, business modeling software does not provide these log files to users, so users It is very difficult to achieve knowledge capture in this way.
  • the last way is based on the application program interface (API, Application Program Interface), some industrial software provides an application program interface, which can be used to develop customized functions (customized functions).
  • API Application Program Interface
  • a first aspect of the present invention provides a method for acquiring modeling knowledge, which includes the following steps: S1, capturing modeling information based on modeling software on a modeling device, where the modeling information includes an event and a screenshot of the event, The event is to issue a command to the modeling device to operate the modeling software in response to a mouse action, a keyboard action, or a touch screen action; S2, based on the event and a screenshot of the event when the event occurs, analyze the modeling intent, extract and Generate a semantic model of the event; S3, store the semantic model of the event in the knowledge base.
  • mouse action includes at least one of the following:
  • the keyboard action includes pressing any key of the keyboard.
  • touch screen action includes at least one of the following:
  • the key value includes coordinates, input text, and input value.
  • the step S2 further includes: locating the action in the first event record table in the screenshot, and judging the object selected by the action based on the object characteristics according to image recognition; according to the object type and The object position generates an area of interest and stores the area of interest as an enlarged sub-image; perform optical character recognition to obtain the text on the sub-image, and combine the information and all Corresponding to the text of the object and generating a second event record table; analyzing the operation of the modeling software according to the second time record table, extracting and generating a semantic model of the event.
  • the semantic models of the multiple events in the knowledge base are stored as event streams based on the order of the multiple events, and the knowledge base recommends the next event of the event stream to which the event belongs when the user performs the event operation when modeling again Or simultaneous events, and the corresponding user's selection automatically matches the next event or simultaneous event.
  • mouse action includes at least one of the following:
  • the action S1 further includes: capturing mouse actions, keyboard actions, or touch screen actions based on the modeling software, and based on the actions and time stamps when the actions occur, related sub-panel names, parent panel names, and the above
  • the key value of the action on the modeling software generates a first event record table.
  • the key value includes coordinates, input text, and input value.
  • the action S2 further includes: locating the action in the first event record table in the screenshot, and judging the object selected by the action based on the object characteristics according to image recognition; according to the object type and The object position generates an area of interest and stores the area of interest as an enlarged sub-image; perform optical character recognition to obtain the text on the sub-image, and combine the information and all Corresponding to the text of the object and generating a second event record table; analyzing the operation of the modeling software according to the second time record table, extracting and generating a semantic model of the event.
  • the second event record table includes: objects, object types, object characteristics, and object positions.
  • the object in the second event record table is a value box
  • its object feature is "a rectangle with a large blank area” and its position is “the left side of the mouse cursor”
  • its object characteristic is "a narrow rectangular-like shape, but there are no four edge contours", and its position is “at the position of the mouse cursor”
  • its object characteristic is "a square blank area” and its position is “to the right of the mouse cursor”
  • its object characteristic is "Y
  • the position on the coordinates is very close to the origin of the window (the upper left corner of the window), there is no outline near the mouse position, and its position is "at the mouse cursor position”.
  • the semantic models of the multiple events in the knowledge base are stored as event streams based on the order of the multiple events, and the knowledge base recommends the next event of the event stream to which the event belongs when the user performs the event operation when modeling again Or simultaneous events, and the corresponding user's selection automatically matches the next event or simultaneous event.
  • a third aspect of the present invention provides a modeling knowledge acquisition system, including: a 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 performs an action, and the action includes: S1, capturing modeling information based on modeling software on the modeling device, wherein the modeling information includes an event and a screenshot of the event, where the event is in response to a mouse action, A keyboard action or a touch screen action issues a command to the modeling device to operate the modeling software; S2, analyzes the modeling intent based on the event and the screenshot when the event occurs, extracts and generates a semantic model of the event; S3 , Store the semantic model of the event in the knowledge base.
  • mouse action includes at least one of the following:
  • the keyboard action includes pressing any key of the keyboard.
  • touch screen action includes at least one of the following:
  • step S1 further includes: capturing mouse actions, keyboard actions or touch screen actions based on the modeling software, and based on the above actions and the time stamp when the above actions occur, the related sub-panel name, the name of the parent panel and the above
  • the key value of the action on the modeling software generates a first event record table.
  • the key value includes coordinates, input text, and input value.
  • the step S2 further includes: locating the action in the first event record table in the screenshot, and judging the object selected by the action based on the object characteristics according to image recognition; according to the object type and The object position generates an area of interest and stores the area of interest as an enlarged sub-image; perform optical character recognition to obtain the text on the sub-image, and combine the information and all Corresponding to the text of the object and generating a second event record table; analyzing the operation of the modeling software according to the second time record table, extracting and generating a semantic model of the event.
  • the second event record table includes: objects, object types, object characteristics, and object positions.
  • the object in the second event record table is a value box
  • its object feature is "a rectangle with a large blank area” and its position is “the left side of the mouse cursor”
  • its object characteristic is "a narrow rectangular-like shape, but there are no four edge contours", and its position is “at the position of the mouse cursor”
  • its object characteristic is "a square blank area” and its position is “to the right of the mouse cursor”
  • its object characteristic is "Y
  • the position on the coordinates is very close to the origin of the window (the upper left corner of the window), there is no outline near the mouse position, and its position is "at the mouse cursor position”.
  • the semantic models of the multiple events in the knowledge base are stored as event streams based on the order of the multiple events, and the knowledge base recommends the next event of the event stream to which the event belongs when the user performs the event operation when modeling again Or simultaneous events, and the corresponding user's selection automatically matches the next event or simultaneous event.
  • a fifth aspect of the present invention provides a computer-readable medium on which computer-executable instructions are stored, which when executed cause at least one processor to perform the method of the first aspect of the present invention.
  • the modeling knowledge acquisition mechanism provided by the invention can reproduce the modeling process based on events or data and its screenshots, and provides good resources for knowledge base extraction.
  • the invention can be used for various modeling software, does not depend on the specific modeling software itself, nor does it interfere with the functions of any specific modeling software, and the invention can be independently executed.
  • the present invention is not only used for one modeling software tool, but can be used for multiple software. When the user needs to switch work between multiple modeling software tools (for example, multiple software co-simulation), the present invention is still applicable.
  • the present invention can still be used to perform modeling knowledge acquisition functions without requiring additional software development work.
  • the modeling knowledge acquisition mechanism of the present invention runs in the background, and does not disturb the designer's modeling work or its working method.
  • the present invention is applicable not only to Windows systems, but also to MAC or Linux systems.
  • the present invention is based on OS (Operation) System functions, for example, Windows hook or screen capture function.
  • the invention can also be used for many other kinds of software that does not need to change its original function or UI, as long as the software does not block the Windows hook or screen capture function.
  • the present invention has nothing to do with the UI mode or function of the modeling software itself, so users do not need to develop or revise their functions based on different modeling software.
  • Windows systems, MAC or Linux systems they are suitable for Windows hook, screen capture function or optical character recognition function (OCR, Optical, Character, Recognition). Therefore, for different OS platforms, the modeling knowledge acquisition function provided by the present invention can be developed .
  • FIG. 1 is a schematic structural diagram of a modeling knowledge acquisition mechanism according to a specific embodiment of the present invention
  • FIG. 2 is a first screenshot of a modeling knowledge acquisition mechanism according to a specific embodiment of the present invention.
  • FIG. 3 is an object mapping table of a modeling knowledge acquisition mechanism according to a specific embodiment of the present invention.
  • FIG. 5a-5c are first screenshots of a modeling knowledge acquisition mechanism according to another specific embodiment of the invention.
  • FIG. 1 is a schematic structural diagram of a modeling knowledge acquisition mechanism according to a specific embodiment of the present invention.
  • the engineer usually performs the modeling process on the tool interface 100 of the modeling software, where the modeling software is installed on the modeling device, and the modeling knowledge acquisition device 200 provided by the present invention is also embedded on the modeling device, Used to perform modeling knowledge acquisition while engineers perform the modeling process.
  • the modeling knowledge acquisition device 200 includes a capturing device 210 and an analyzing device 220, wherein the capturing device 210 captures the operation of the engineer on the modeling software and then takes a screenshot of a series of events and simultaneously steps, the analyzing device 220 is based on the capture
  • the received events and screenshots analyze the modeling intent and generate a semantic model, and then store the above semantic model in the knowledge base 230.
  • the modeling device is a personal computer, wherein the operating system of the personal computer is Windows.
  • the knowledge acquisition device 200 includes a capture module 211 and a screenshot module 212.
  • the step module 210 is mainly used to capture mouse actions, keyboard actions or touch screen actions.
  • the mouse action includes at least one of the following: click the left mouse button; click the right mouse button; move the mouse.
  • the mouse action includes: double-clicking the left or right mouse button, clicking the left or right mouse button for a period of time, and simultaneously clicking the left and right mouse buttons, right-click and/or Left click and move to a time at the same time.
  • the keyboard action includes pressing any key of the keyboard.
  • Table 1 saves event records in .csv format.
  • the timestamp indicates the time the action is executed. Specifically, “Thu Apr 26" 14:59:30 2018” indicates that it was made at 14:59:30 on April 26, 2018. “Mouse left” is the action of clicking the left mouse button, and then “Mouse left” was made at 14:59:31 on April 26, 2018 at "Thu Apr 26” 14:59:31 2018 That is, the action of lifting the left mouse button. This means that the engineer has completed a left mouse click on the user interface of the modeling software. Then, both the name of the sub-panel and the name of the parent panel indicate the panel on the user interface of the modeling software.
  • the key value in this embodiment represents the coordinates on the user interface. Coordinates (1340,630) on the panel “Models.Frame.TestStation1". Among them, the sub-panel "Models.Frame.TestStation1" belongs to the parent panel "Technomatix Observer_example1_rev3_0.spp". According to the first time record table, between 14:59:30 and 31 seconds on April 26, 2018, the user’s sub-panel "Models.Frame” of the mother panel “Technomatix Observer_example1_rev3_0.spp" on the modeling software interface .TestStation1" coordinates (1340,630) completed a left mouse click.
  • the windown system cannot obtain enough meaningful information of the modeling software, such as the text box name (text box name) or the value box name (box name), which requires the help of the screen shot of the modeling software.
  • the screenshot module 212 is triggered to perform a screen capture function. Therefore, we obtain the entire screenshot of the user interface of the modeling software at the moment. Among them, in order to make the text or number on the screen larger, other edge parts will be adjusted.
  • first perform sub-step S21 locate the action in the first event recording table in the screenshot, and determine the object selected by the action based on the object characteristics based on image recognition.
  • the mapping module 221 can locate the action in the first screenshot.
  • the mapping module 221 is also used to determine the above actions based on the image recognition algorithm. In this embodiment, it needs to determine the object selected by the mouse.
  • 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 cursor” (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” ), no contour around the mouse position), its position is “at the mouse cursor position” (at the mouse position).
  • step S22 is executed to generate an area of interest based on the object type and object position, and store the area of interest as an enlarged sub-image.
  • the mapping module 221 can determine the object type based on the above object characteristics, and generate an ROI (Region of Interest) as shown in FIG. 2 based on the object type and the object position, where the ROI is based on the object position produce.
  • the mapping module 221 crops the original screenshot shown in FIG. 2 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'.
  • Timestamp action Sub-panel name Mother panel name Key figure Object text ThuApr 26:14:59:30 2018 Mouse left Models.Frame.TestStation1 TechnomatixObserver_example1_rev3_0.spp (1340,630) Processing Time ThuApr 26:14:59:31 2018 Mouse left Models.Frame.TestStation1 TechnomatixObserver_example1_rev3_0.spp (1340,630) Processing Time
  • the modeling intention of the user on the modeling software is the events "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 the "Process” time (execution time) of the modeling software in response to the above mouse action.
  • step S3 is executed to store the semantic model of the event in the knowledge base 230.
  • the semantic model of the event includes the relationship between the event and the data point in the form of a chart.
  • the semantic model of the events stored in the knowledge base 230 is shown in FIG. 4, where event 1 has a mouse action type and event 1 "Set_item[Process] time_on_sub_panel” has a time stamp of "Thu Apr 26" 14:59 :31”2018”, Event 1 has the location “TechnomatixObserver_example1_rev3_0.spp-.[.Models.Frame.Test Station1]”, and Event 1 has the key value as the coordinate “(1340,630)”.
  • event 2 "Keyboard input[20]for[Process] time_on_sub_panel” has the type of keyboard action
  • event 1 has the time stamp "ThuApr 26"14:59:332018”
  • event 2 has the position "TechnomatixObserver_example1_rev3_0.spp- .[.Models.Frame.TestStation1]”
  • event 2 has a key value of "20" entered on the keyboard.
  • the relationship between event 1 and event 2 is that event 2 has the previous event “event 1" and event 1 has the latter event "event 2".
  • the semantic models of multiple events in the knowledge base are stored as an event stream based on the order of the multiple events, and the knowledge base recommends the next event of the event stream to which the event belongs when the user performs an event operation when modeling again Or simultaneous events, and the corresponding user's selection automatically matches the next event or simultaneous event.
  • the semantic models of multiple events in the knowledge base are related to each other and become event flows. Therefore, when any user executes the modeling software on the modeling device again, once the user executes the event 1 as shown in FIG. 4, the knowledge base 230 recognizes the event 1 and recommends the correlation with the event 1 Event 2, the user can choose whether to continue to execute Event 2. Once the knowledge base recognizes different event streams, it is updated and stored.
  • the knowledge acquisition device 200 captures modeling information based on modeling software on the personal computer as shown in the following table. Among them, because Mouse left can already show the left mouse click action, so the record table omits the Mouse left up event.
  • the user's timestamp is "5/22/2018 10:53:21" (that is, 10:53:21 am on May 22, 2018) in the parent panel is “example.spp” and the child panel is " "Models.Frame” position completed a mouse click, this mouse click coordinate position is (621,211), and then the time stamp is "5/22/2018 10:53:23" (that is, May 22, 2018 (10:53:23 am)
  • Another mouse click was completed at the position where the parent panel was "example.spp” and the child panel was ".Models.Frame”, and the coordinate position of this mouse click was (587,546).
  • the user's operation of the modeling software corresponding to this click is to click the icon of the second element Singleproc and drag to the position shown in FIG. 5b.
  • the user's timestamp is "5/22/2018 10:53:24" (that is, May 22, 2018, 10:53:24) on the parent panel is “example.spp” and the child panel is " "Models.Frame” position completed a mouse click, this mouse click coordinate position is (662,218), and then the time stamp is "5/22/2018 10:53:25" (that is, May 22, 2018 (10:53:25 am)
  • Another mouse click was completed at the position where the parent panel was "example.spp” and the child panel was ".Models.Frame", and the coordinate position of this mouse click was (673,552).
  • the user's operation of the modeling software corresponding to this click is to click the icon of the third element Parallelstation and drag to the position shown in FIG. 5b.
  • step S22 is executed to generate an area of interest based on the object type and object position, and store the area of interest as an enlarged sub-image.
  • sub-step S23 is executed, an optical character recognition function is executed to obtain the text on the sub-image, the information in the schedule and the text of the object are matched, and a second event record table is generated.
  • the recognition module 222 is used to perform an optical characteristic recognition function (OCR, Optical, Recognition). Therefore, we can now associate the timestamp, action, sub-panel name, parent panel name, and key value in the event record table of Table 1 with the text of the specific object, as shown in the following table:
  • the user's first mouse operation is identified as the source icon of the first component, and the source icon is dragged to the blank modeling interface (Blank Page), the same reason, then the user's second mouse operation
  • the object of the second element is the Singleproc icon, and the source icon is dragged to the blank modeling interface (Blank Page).
  • the user’s third mouse operation is the third element Parallelproc icon, and the Parallelproc icon is dragged to the blank Modeling interface (Blank Page), the user's fourth mouse operation object is the fourth element Drain icon, and drag the Drain icon to the blank modeling interface (Blank Page).
  • the user's next operation object is identified as the second element Singleproc on the modeling software interface, and the object whose parameter setting is "Processing time" is identified.
  • sub-step S24 is executed to analyze the operation of the modeling software according to the second time record table, and extract and generate a semantic model of the event.
  • the analysis module 223 is used to analyze the modeling intention of the engineer based on all the above information.
  • the analysis module 223 interprets the object-related information shown in Table 6 as meaningful process-related information shown in Table 7:
  • the event “Create_object[SingleProc]” indicates that the modeling intention is to issue a command to establish the second element SingleProc on the modeling interface of the modeling software to the modeling device in response to the above mouse action.
  • the user completed a left mouse button at the coordinates (673,552) on the sub-panel ".Model.Frame” of the parent panel “Example.spp” on the modeling software interface Click action.
  • the event “Create_object[ParallelProc]” indicates that the modeling intention is to issue a command to create a third element ParallelProc on the modeling interface of the modeling software to the modeling device in response to the above mouse action.
  • keyboard input[2] for [Processing 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 "2" in response to the above keyboard action. It should be noted that, in FIG. 5c, the modeling software automatically recognizes the "2" input by the user as "2:00".
  • step S3 is executed to store the semantic model of the event in the knowledge base 230.
  • the semantic model of the event includes the relationship between the event and the data point in the form of a chart.
  • the semantic model of the events stored in the knowledge base 230 is shown in FIG. 6, wherein event 3, event 4, event 5, and event 6 form an event stream in the order of execution.
  • event 3 "Create_object[Source]” has a type of mouse action
  • event 3 has a time stamp of "5/22/2018 10:53:20”
  • event 3 has a position of "Example.spp–[.Model.Frame]”
  • Event 4 "Create_object[SingleProc]” has a key value of coordinates "(515,551)”.
  • event 4 has a type of mouse action
  • event 4 has a time stamp of “5/22/201810:53:23”
  • event 4 has a position of “Example.spp–[.Model.Frame]”
  • event 4 has a key value of Coordinates "(587,546)”.
  • event 5 "Create_object[ParallelProc]” has a type of mouse action
  • event 5 has a time stamp of "5/22/2018 10:53:25”
  • event 5 has a position of "Example.spp–[.Model.Frame]”
  • Event 5 has a key value of coordinates "(673,552)”
  • event 6 “Create_object[Drain]” has a type of mouse action
  • event 6 has a time stamp of "5/22/2018 10:53:28”
  • event 6 has a position of "Example.spp–[.Model.Frame]”
  • Event 6 has a key value of coordinate "(757,550)”.
  • event 7 has a type of mouse action
  • event 7 has a time stamp of “5/22/2018 10:53:34”
  • event 7 has a position of “Example.spp–[.Model.Frame.SingleProc]”
  • event 7 “ Set_item[ProcessingTime]on_sub_panel” has a key value of coordinates "(21,1187)”.
  • event 8 has a keyboard action
  • event 8 has a time stamp of "5/22/201810:53:37”
  • event 8 "keyboard input[2]for[Processing Time]on_sub_panel” has a location of "Example.spp--[ .Model.Frame.SingleProc]”
  • event 8 has a key value of "2" for keyboard input.
  • event 3 and event 4 event 4 has the previous event “event 3", and event 3 has the latter event “event 4".
  • event 4 and event 5 is that event 5 has the previous event “event 4", and event 4 has the latter event “event 5".
  • event 5 and event 6 is: event 6 has the previous event “event 5", and event 5 has the latter event “event 6".
  • event 6 and event 7 is that event 7 has the previous event “event 6" and event 6 has the latter event "event 7".
  • event 7 and event 8 is: event 8 has the previous event "event 7", and event 7 has the latter event "event 8".
  • a second aspect of the present invention provides a modeling knowledge acquisition device, which includes: a capturing device that captures modeling information based on modeling software on the modeling device, where the modeling information includes an event and a screenshot when the event occurs, The event is to issue a command to the modeling device to operate the modeling software in response to a mouse action, a keyboard action, or a touch screen action; an analysis device, which analyzes the modeling intent based on the event and a screenshot when the event occurs, Extract and generate a semantic model of the event, and store the semantic model of the event in the knowledge base.
  • mouse action includes at least one of the following:
  • the keyboard action includes pressing any key of the keyboard.
  • touch screen action includes at least one of the following:
  • step S1 further includes: capturing mouse actions, keyboard actions or touch screen actions based on the modeling software, and based on the above actions and the time stamp when the above actions occur, the related sub-panel name, the name of the parent panel and the above
  • the key value of the action on the modeling software generates a first event record table.
  • the key value includes coordinates, input text, and input value.
  • the step S2 further includes: locating the action in the first event record table in the screenshot, and judging the object selected by the action based on the object characteristics according to image recognition; according to the object type and The object position generates an area of interest and stores the area of interest as an enlarged sub-image; perform optical character recognition to obtain the text on the sub-image, and combine the information and all Corresponding to the text of the object and generating a second event record table; analyzing the operation of the modeling software according to the second time record table, extracting and generating a semantic model of the event.
  • the second event record table includes: objects, object types, object characteristics, and object positions.
  • the object in the second event record table is a value box
  • its object feature is "a rectangle with a large blank area” and its position is “the left side of the mouse cursor”
  • its object characteristic is "a narrow rectangular-like shape, but there are no four edge contours", and its position is “at the position of the mouse cursor”
  • its object characteristic is "a square blank area” and its position is “to the right of the mouse cursor”
  • its object characteristic is "Y
  • the position on the coordinates is very close to the origin of the window (the upper left corner of the window), there is no outline near the mouse position, and its position is "at the mouse cursor position”.
  • the semantic models of the multiple events in the knowledge base are stored as event streams based on the order of the multiple events, and the knowledge base recommends the next event of the event stream to which the event belongs when the user performs the event operation when modeling again Or simultaneous events, and the corresponding user's selection automatically matches the next event or simultaneous event.
  • a third aspect of the present invention provides a modeling knowledge acquisition system, including: a 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 performs an action, and the action includes: S1, capturing modeling information based on modeling software on the modeling device, wherein the modeling information includes an event and a screenshot of the event, where the event is in response to a mouse action, A keyboard action or a touch screen action issues a command to the modeling device to operate the modeling software; S2, analyzes the modeling intent based on the event and the screenshot when the event occurs, extracts and generates a semantic model of the event; S3 , Store the semantic model of the event in the knowledge base.
  • mouse action includes at least one of the following:
  • the keyboard action includes pressing any key of the keyboard.
  • touch screen action includes at least one of the following:
  • the action S1 further includes: capturing mouse actions, keyboard actions, or touch screen actions based on the modeling software, and based on the actions and time stamps when the actions occur, related sub-panel names, parent panel names, and the above
  • the key value of the action on the modeling software generates a first event record table.
  • the key value includes coordinates, input text, and input value.
  • the action S2 further includes: locating the action in the first event record table in the screenshot, and judging the object selected by the action based on the object characteristics according to image recognition; according to the object type and The object position generates an area of interest and stores the area of interest as an enlarged sub-image; perform optical character recognition to obtain the text on the sub-image, and combine the information and all Corresponding to the text of the object and generating a second event record table; analyzing the operation of the modeling software according to the second time record table, extracting and generating a semantic model of the event.
  • the second event record table includes: objects, object types, object characteristics, and object positions.
  • the object in the second event record table is a value box
  • its object feature is "a rectangle with a large blank area” and its position is “the left side of the mouse cursor”
  • its object characteristic is "a narrow rectangular-like shape, but there are no four edge contours", and its position is “at the position of the mouse cursor”
  • its object characteristic is "a square blank area” and its position is “to the right of the mouse cursor”
  • its object characteristic is "Y
  • the position on the coordinates is very close to the origin of the window (the upper left corner of the window), there is no outline near the mouse position, and its position is "at the mouse cursor position”.
  • the semantic models of the multiple events in the knowledge base are stored as event streams based on the order of the multiple events, and the knowledge base recommends the next event of the event stream to which the event belongs when the user performs the event operation when modeling again Or simultaneous events, and the corresponding user's selection automatically matches the next event or simultaneous event.
  • a fourth aspect of the present invention provides 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 the present The method of the first aspect of the invention.
  • a fifth aspect of the present invention provides a computer-readable medium on which computer-executable instructions are stored, which when executed cause at least one processor to perform the method of the first aspect of the present invention.
  • the modeling knowledge acquisition mechanism provided by the invention can reproduce the modeling process based on events or data and its screenshots, and provides good resources for knowledge base extraction.
  • the invention can be used for various modeling software, does not depend on the specific modeling software itself, nor does it interfere with the functions of any specific modeling software, and the invention can be independently executed.
  • the present invention is not only used for one modeling software tool, but can be used for multiple software. When the user needs to switch work between multiple modeling software tools (for example, multiple software co-simulation), the present invention is still applicable.
  • the present invention can still be used to perform modeling knowledge acquisition functions without requiring additional software development work.
  • the modeling knowledge acquisition mechanism of the present invention runs in the background, and does not disturb the designer's modeling work or its working method.
  • the present invention is applicable not only to Windows systems, but also to MAC or Linux systems.
  • the present invention is based on OS (Operation) System functions, for example, Windows hook or screen capture function.
  • the invention can also be used for many other kinds of software that does not need to change its original function or UI, as long as the software does not block the Windows hook or screen capture function.
  • the present invention has nothing to do with the UI mode or function of the modeling software itself, so users do not need to develop or revise their functions based on different modeling software.
  • Windows systems, MAC or Linux systems they are suitable for Windows hooks, screen capture functions, or optical character recognition (OCR) functions. Therefore, for different OS platforms, the modeling knowledge acquisition function provided by the present invention can be developed.
  • OCR optical character recognition
  • the modeling knowledge acquisition mechanism provided by the present invention has a wide range of applications, can meet the multiplexing requirements of modeling knowledge acquisition, and can improve the functional expansion of modeling software.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • Evolutionary Computation (AREA)
  • Computing Systems (AREA)
  • Computational Linguistics (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Artificial Intelligence (AREA)
  • Library & Information Science (AREA)
  • Databases & Information Systems (AREA)
  • Input From Keyboards Or The Like (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

建模知识获取方法、装置和系统,其中,包括如下步骤:S1,捕捉建模装置上基于建模软件的建模信息,其中建模信息包括事件以及事件发生时的截屏,其中所述事件为响应鼠标动作、键盘动作或者触屏动作对所述建模装置发出操作所述建模软件的命令;S2,基于所述事件以及事件发生时的截屏分析建模意图,提取并生成所述事件的语义模型;S3,存储所述事件的语义模型于知识库。能够适用于多种建模软件,并且能够独立执行,还能够实现建模的重现,效率高,可靠性强。

Description

建模的知识获取方法、装置和系统 技术领域
本发明涉及建模领域,尤其涉及一种建模的知识获取方法、装置和系统。
背景技术
工程建模过程种涵盖了大量知识,这些知识尤其是专家知识(experts’knowledge)非常有益处。基于这些知识,一些初级工程师能够在他们的建模工作中获得洞察力(insights),因此可以帮助他们改善建模工作的质量和效率。上述过程被称为知识捕捉和再利用(capturing and reusing)。
其中,现有技术通常有三种方式来进行知识捕捉。其中一种知识捕捉方式是人工输入和构成知识。具体地,由专门人员和专家沟通来获得必要的信息,然后将这些信息进行人工构成知识,这样的方式很花费时间并需要专家的配合。另外一种知识捕捉方式是从记录文件(log files)获得信息。具体地,软件事件记录文件(Software event log files)被视为能够提供第一手过程信息的最重要的资源,然而,大部分时间,商业建模软件并不提供这些记录文件给用户,因此用户通过这样的方式来实现知识捕捉难度很高。最后一种方式是基于应用程序接口(API,Application Program Interface),一些工业软件提供了应用程序接口,其可用于发展自定义的功能(customized functions)。
然而,一些工业软件不能提供包括提供给用户建模过程信息的记录文件,或者开发用于捕捉建模过程信息工具的用户应用程序界面的记录文件,其中,开发用户界面比脚本(script)更加生动,其更容易识别建模过程中的知识获取。
发明内容
本发明第一方面提供了一种建模知识获取方法,其中,包括如下步骤:S1,捕捉建模装置上基于建模软件的建模信息,其中建模信息包括 事件以及事件发生时的截屏,其中所述事件为响应鼠标动作、键盘动作或者触屏动作对所述建模装置发出操作所述建模软件的命令;S2,基于所述事件以及事件发生时的截屏分析建模意图,提取并生成所述事件的语义模型;S3,存储所述事件的语义模型于知识库。
进一步地,所述鼠标动作包括以下至少一项:
-单击鼠标左键;
-单击鼠标右键;
-鼠标移动。
进一步地,所述键盘动作包括对按压所述键盘的任意键。
进一步地,所述触屏动作包括以下至少一项:
-点击屏幕;
-滑动屏幕;
-晃动屏幕。
进一步地,所述步骤S1还包括:捕捉基于建模软件的鼠标动作、键盘动作或者触屏动作,并且基于上述动作和上述动作发生时的时间戳,相关的子面板名字、母面板名字以及上述动作在所述建模软件上的关键值生成第一事件记录表。
进一步地,所述关键值包括坐标、输入文本、输入数值。
进一步地,所述步骤S2还包括:对所述第一事件记录表中的动作在所述截屏中定位,并根据图像识别基于对象特征来判断上述动作所选择的对象;根据所述对象类型和对象位置产生一个感兴趣区域,并将所述感兴趣区域存储为一个放大的子图象;执行光学字符识别功能以获得所述子图象上的文字,将所述时间表中的信息和所述对象的文字对应起来并生成第二事件记录表;根据所述第二时间记录表分析对所述建模软件的操作,提取并生成事件的语义模型。
进一步地,所述第二事件记录表包括:对象、对象类型、对象特征、对象位置。
进一步地,当所述第二事件记录表中的对象为数值框时,其对象特征为“具有一个大空白区域的矩形”,其位置为“鼠标光标的左边”;当所述第二事件记录表中的对象为标签框时,其对象特征为“一个狭窄的类矩形外形,但并无4个边缘轮廓”,其位置为“在鼠标光标位置”;当 所述第二事件记录表中的对象为复选框时,其对象特征为“一个正方形空白区域”,其位置为“鼠标光标的右边”;当所述第二事件记录表中的对象为菜单项时,其对象特征为“Y坐标上的位置非常接近于窗口原点(窗口的左上角),没有鼠标位置附近的轮廓,其位置为“在鼠标光标位置”。
进一步地,所述知识库中的多个事件的语义模型基于该多个事件的先后顺序存储为事件流,知识库在用户再次建模时执行事件操作时推荐该事件所属事件流的下一事件或者同时执行的事件,并相应用户的选择自动匹配下一事件或者同时执行的事件。
本发明第二方面提供了一种建模知识获取装置,其中,包括:捕捉装置,其捕捉建模装置上基于建模软件的建模信息,其中建模信息包括事件以及事件发生时的截屏,其中所述事件为响应鼠标动作、键盘动作或者触屏动作对所述建模装置发出操作所述建模软件的命令;分析装置,其基于所述事件以及事件发生时的截屏分析建模意图,提取并生成所述事件的语义模型,并存储所述事件的语义模型于知识库。
进一步地,所述鼠标动作包括以下至少一项:
-单击鼠标左键;
-单击鼠标右键;
-鼠标移动。
进一步地,所述键盘动作包括对按压所述键盘的任意键。
进一步地,所述触屏动作包括以下至少一项:
-点击屏幕;
-滑动屏幕;
-晃动屏幕。
进一步地,所述动作S1还包括:捕捉基于建模软件的鼠标动作、键盘动作或者触屏动作,并且基于上述动作和上述动作发生时的时间戳,相关的子面板名字、母面板名字以及上述动作在所述建模软件上的关键值生成第一事件记录表。
进一步地,所述关键值包括坐标、输入文本、输入数值。
进一步地,所述动作S2还包括:对所述第一事件记录表中的动作在所述截屏中定位,并根据图像识别基于对象特征来判断上述动作所选择 的对象;根据所述对象类型和对象位置产生一个感兴趣区域,并将所述感兴趣区域存储为一个放大的子图象;执行光学字符识别功能以获得所述子图象上的文字,将所述时间表中的信息和所述对象的文字对应起来并生成第二事件记录表;根据所述第二时间记录表分析对所述建模软件的操作,提取并生成事件的语义模型。
进一步地,所述第二事件记录表包括:对象、对象类型、对象特征、对象位置。
进一步地,当所述第二事件记录表中的对象为数值框时,其对象特征为“具有一个大空白区域的矩形”,其位置为“鼠标光标的左边”;当所述第二事件记录表中的对象为标签框时,其对象特征为“一个狭窄的类矩形外形,但并无4个边缘轮廓”,其位置为“在鼠标光标位置”;当所述第二事件记录表中的对象为复选框时,其对象特征为“一个正方形空白区域”,其位置为“鼠标光标的右边”;当所述第二事件记录表中的对象为菜单项时,其对象特征为“Y坐标上的位置非常接近于窗口原点(窗口的左上角),没有鼠标位置附近的轮廓,其位置为“在鼠标光标位置”。
进一步地,所述知识库中的多个事件的语义模型基于该多个事件的先后顺序存储为事件流,知识库在用户再次建模时执行事件操作时推荐该事件所属事件流的下一事件或者同时执行的事件,并相应用户的选择自动匹配下一事件或者同时执行的事件。
本发明第三方面提供了建模知识获取系统,其中,包括:处理器;以及与所述处理器耦合的存储器,所述存储器具有存储于其中的指令,所述指令在被处理器执行时使所述电子设备执行动作,所述动作包括:S1,捕捉建模装置上基于建模软件的建模信息,其中建模信息包括事件以及事件发生时的截屏,其中所述事件为响应鼠标动作、键盘动作或者触屏动作对所述建模装置发出操作所述建模软件的命令;S2,基于所述事件以及事件发生时的截屏分析建模意图,提取并生成所述事件的语义模型;S3,存储所述事件的语义模型于知识库。
进一步地,所述鼠标动作包括以下至少一项:
-单击鼠标左键;
-单击鼠标右键;
-鼠标移动。
进一步地,所述键盘动作包括对按压所述键盘的任意键。
进一步地,所述触屏动作包括以下至少一项:
-点击屏幕;
-滑动屏幕;
-晃动屏幕。
进一步地,所述步骤S1还包括:捕捉基于建模软件的鼠标动作、键盘动作或者触屏动作,并且基于上述动作和上述动作发生时的时间戳,相关的子面板名字、母面板名字以及上述动作在所述建模软件上的关键值生成第一事件记录表。
进一步地,所述关键值包括坐标、输入文本、输入数值。
进一步地,所述步骤S2还包括:对所述第一事件记录表中的动作在所述截屏中定位,并根据图像识别基于对象特征来判断上述动作所选择的对象;根据所述对象类型和对象位置产生一个感兴趣区域,并将所述感兴趣区域存储为一个放大的子图象;执行光学字符识别功能以获得所述子图象上的文字,将所述时间表中的信息和所述对象的文字对应起来并生成第二事件记录表;根据所述第二时间记录表分析对所述建模软件的操作,提取并生成事件的语义模型。
进一步地,所述第二事件记录表包括:对象、对象类型、对象特征、对象位置。
进一步地,当所述第二事件记录表中的对象为数值框时,其对象特征为“具有一个大空白区域的矩形”,其位置为“鼠标光标的左边”;当所述第二事件记录表中的对象为标签框时,其对象特征为“一个狭窄的类矩形外形,但并无4个边缘轮廓”,其位置为“在鼠标光标位置”;当所述第二事件记录表中的对象为复选框时,其对象特征为“一个正方形空白区域”,其位置为“鼠标光标的右边”;当所述第二事件记录表中的对象为菜单项时,其对象特征为“Y坐标上的位置非常接近于窗口原点(窗口的左上角),没有鼠标位置附近的轮廓,其位置为“在鼠标光标位置”。
进一步地,所述知识库中的多个事件的语义模型基于该多个事件的先后顺序存储为事件流,知识库在用户再次建模时执行事件操作时推荐 该事件所属事件流的下一事件或者同时执行的事件,并相应用户的选择自动匹配下一事件或者同时执行的事件。
本发明第四方面提供了计算机程序产品,所述计算机程序产品被有形地存储在计算机可读介质上并且包括计算机可执行指令,所述计算机可执行指令在被执行时使至少一个处理器执行本发明第一方面所述的方法。
本发明第五方面提供了计算机可读介质,其上存储有计算机可执行指令,所述计算机可执行指令在被执行时使至少一个处理器执行本发明第一方面所述的方法。
本发明提供的建模知识获取机制能够基于事件或者数据及其截屏再现建模过程,并且为知识库提取提供了好的资源。本发明能够用于多种建模软件,并不依赖于特定建模软件本身,也不干预任何特定建模软件的功能,本发明能够独立执行。本发明并不仅仅用于一个建模软件工具,而能够用于多个软件,当用户需要在多个建模软件工具之间切换工作时(例如多种软件联合仿真),本发明仍然适用。对于提供应用程序界面(API)的建模软件工具,本发明仍然能够用于执行建模知识获取功能,而并不需要其他额外软件开发的工作。本发明的建模知识获取机制在后台运行,并不会打搅设计者的建模工作或者其工作方式。
此外,本发明不仅适用于Windows系统,还适用于MAC或者Linux系统等。本发明基于OS(Operation System)功能,例如,Windows hook或者截屏功能。本发明还能够用于其他很多种不需要改变其原始功能或者UI的软件,只要这些软件不会屏蔽Windows hook或者截屏功能即可。本发明和建模软件本身的UI模式或者功能无关,因此用户并不需要基于不同建模软件来发展或者修订其功能。对于Windows系统、MAC或者Linux系统等,他们都适用于Windows hook、截屏功能或者光学字符识别功能(OCR,Optical Character Recognition)因此不同的OS平台,本发明提供的建模知识获取功能都能够被发展。
总之,本发明提供的建模知识获取机制适用范围广,能够满足建模知识获取的复用需求,并且能够提高建模软件的功能扩展。
附图说明
图1是根据本发明一个具体实施例的建模知识获取机制的架构示意图;
图2是根据本发明一个具体实施例的建模知识获取机制的第一截屏图;
图3是根据本发明一个具体实施例的建模知识获取机制的对象映射表格;
图4是根据本发明一个具体实施例的建模知识获取机制的事件的语义模型结构示意图;
图5a~5c根据本发明另一具体实施例的建模知识获取机制的第一截屏图;
图6是根据本发明又一具体实施例的建模知识获取机制的事件的语义模型结构示意图。
具体实施方式
以下结合附图,对本发明的具体实施方式进行说明。
本发明提供了一种建模的知识获取机制。工程师通常通过特定软件执行软件建模过程,相似或者相同的建模过程可以被复用,以节省后续建模事件,特别是可以参照资深专家之前的建模经验。本发明能够将所有历史建模中执行人员的操作(例如鼠标、键盘或触屏等操作)步骤下来,并通过分析判断建模意图,然后解读为有意义的一系列事件的语义模型,接着存储于知识库作为下次建模的基础。
图1是根据本发明一个具体实施例的建模知识获取机制的架构示意图。工程师通常在建模软件的工具界面100上执行建模过程,其中,所述建模软件安装在建模装置上,本发明提供的建模知识获取装置200也内嵌在该建模装置上,用于在工程师执行建模过程的同时执行建模知识获取。具体地,所述建模知识获取装置200包括捕捉装置210和分析装置220,其中,捕捉装置210捕捉工程师在建模软件上的操作然后作为一系列事件并同时步骤其截屏,分析装置220基于捕捉到的事件和截屏分析建模意图并生成语义模型,然后将上述语义模型存储在知识库230。
在本实施例中,示例性地,建模装置为个人电脑,其中,个人电脑的操作系统为Windows。
首先执行步骤S1,捕捉装置210捕捉个人电脑上基于建模软件的建模信息,其中建模信息包括事件以及事件发生时的个人电脑屏幕截屏,其中所述事件为响应鼠标动作、键盘动作或者触屏动作对所述个人电脑发出操作所述建模软件的命令。具体地,捕捉装置210捕捉基于建模软件的鼠标动作、键盘动作或者触屏动作,并且基于上述动作和上述动作发生时的时间戳,相关的子面板名字、母面板名字以及上述动作在所述建模软件上的关键值生成第一事件记录表。其中,所述关键值包括坐标、输入文本、输入数值。
其中,知识获取装置200包括捕捉模块211和截屏模块212。其中,步骤模块210主要用于捕捉鼠标动作、键盘动作或者触屏动作。
其中,所述鼠标动作包括以下至少一项:单击鼠标左键;单击鼠标右键;鼠标移动。可选地,将上述任多项进行排列组合,所述鼠标动作包括:双击鼠标左键或者右键,单击鼠标左键或者右键并保持一段时间,同时点击鼠标左右键,点击鼠标右键和/或左键并同时移动至一段时间。总之,所有的鼠标操作都应涵盖在本发明的保护范围内,为简明起见,不再赘述。
其中,所述键盘动作包括对按压所述键盘的任意键。
其中,所述触屏动作包括以下至少一项:点击屏幕;滑动屏幕;晃动屏幕等。
示例性地,如图2所示,工程师如果在建模软件上点击了位置P1,则知识获取装置200捕捉个人电脑上基于建模软件的建模信息如下表所示。
表1 第一事件记录表
时间戳 动作 子面板名字 母面板名字 关键值
Thu Apr 26 14:59:30 2018 Mouse left down Models.Frame.TestStation1 Technomatix Observer_example1_rev3_0.spp (1340,630)
Thu Apr 26 14:59:31 2018 Mouse left up Models.Frame.TestStation1 Technomatix Observer_example1_rev3_0.spp (1340,630)
可选地,表1是按照.csv格式来保存事件记录的。如表1所示,时间戳(time stamp)表示动作执行的时间,具体地,“Thu Apr 26 14:59:30 2018”表示在2018年的4月26日下午14时59分30秒做出了“Mouse left down”即单击鼠标左键的动作,然后在“Thu Apr 26 14:59:31 2018”2018年的4月26日下午14时59分31秒做出了“Mouse left up”即鼠 标左键抬起的动作。这表示工程师在建模软件的用户界面上完成了一次鼠标左键点击。然后,子面板名字和母面板名字都指示的是建模软件用户界面上的面板,关键值在本实施例中表示在用户界面上的坐标,因此,上述鼠标左键点击的位置具体是在子面板“Models.Frame.TestStation1”上坐标(1340,630)。其中,所述子面板“Models.Frame.TestStation1”属于母面板“Technomatix Observer_example1_rev3_0.spp”。根据第一时间记录表,2018年的4月26日下午14时59分30秒和31秒之间,用户在建模软件界面上的母面板“Technomatix Observer_example1_rev3_0.spp”的子面板“Models.Frame.TestStation1”上坐标为(1340,630)完成了一次鼠标左键点击的动作。然而,上述信息并不足以识别对象名字。因此,windown系统(Windows Hook)并不能获得建模软件足够的有意义的信息,例如文本框名字(text box name)或者数值框名字(box name),这需要借助建模软件的屏幕截屏。
其中,在工程师通过鼠标、键盘或者触屏等动作操作建模软件时即会触发截屏模块212执行屏幕截屏功能,因此,我们得到了建模软件此刻用户界面的整个截屏。其中,为了在屏幕上的文本或者数字更大,其他边缘部分会做适应调整。
然后执行步骤S2,基于所述事件以及事件发生时的截屏分析建模意图,提取并生成所述事件的语义模型。具体地,对事件以及所述连续事件发生时的截屏执行映射,基于所述映射分析对所述建模软件的操作,提取并生成所述事件的语义模型。如图1所示,所述分析装置220包括映射模块221、识别模块222和分析模块223。所述步骤S2包括子步骤S21、子步骤S22和子步骤S23
具体地,首先执行子步骤S21,对所述第一事件记录表中的动作在所述截屏中定位,并根据图像识别基于对象特征来判断上述动作所选择的对象.基于表1中的动作及其发生的位置和如图2所示的第一截屏,映射模块221能将动作在第一截屏中定位。映射模块221还用于基于图像识别算法判断上述动作,在本实施例中,其需要判断鼠标所选择的对象。
如图3所示的表格,在子面板“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)。
接着执行步骤S22,根据所述对象类型和对象位置产生一个感兴趣区域,并将所述感兴趣区域存储为一个放大的子图象。映射模块221能够基于上述对象特征来确定对象类型,并且基于对象类型和对象位置产生一个如图2所示的感兴趣区域ROI(Region of Interest),其中,所述感兴趣区域ROI基于对象位置来产生。映射模块221基于感兴趣区域ROI将图2所示的原始的截屏裁剪为一个子图像(a sub-image)ROI’。为了改善文本提取质量,映射模块221放大上述子图象ROI’。
接着执行子步骤S23,执行 )光学字符识别功能以获得所述子图象上的文字,将所述时间表中的信息和所述对象的文字对应起来并生成第二事件记录表。识别模块222用于执行光学字符识别(OCR,Optical Character Recognition),当第一截屏的感兴趣区域ROI被放大并被剪裁为一个子图象,识别模块222将子图象上的文字提取下来,因此,我们可以得到数值框名字,获得子图象上的文字“Processing time:Const”。因此,现在我们可以将表1事件记录表中的时间戳、动作、子面板名字、母面板名字和关键值与具体对象的文字对应起来,如下表所示:
表2 第二事件记录表
时间戳 动作 子面板名字 母面板名字 关键值 对象的文字
Thu Apr 26 14:59:30 2018 Mouse left down Models.Frame.TestStation1 Technomatix Observer_example1_rev3_0.spp (1340,630) Processing Time
Thu Apr 26 14:59:31 2018 Mouse left up Models.Frame.TestStation1 Technomatix Observer_example1_rev3_0.spp (1340,630) Processing Time
最后执行子步骤S24,根据所述第二时间记录表分析对所述建模软件的操作,提取并生成事件的语义模型。分析模块223用于基于上述所 有信息分析工程师的建模意图。在本实施例中,分析模块223解读如表3所示的对象相关的上述信息为如表4所示的有意义的过程相关信息:
表3 第二事件记录表
时间戳 动作 子面板名字 母面板名字 关键值 对象的文字
Thu Apr 26 14:59:30 2018 Mouse left down Models.Frame.TestStation1 Technomatix Observer_example1_rev3_0.spp (1340,630) Processing Time
Thu Apr 26 14:59:31 2018 Mouse left up Models.Frame.TestStation1 Technomatix Observer_example1_rev3_0.spp (1340,630) Processing Time
Thu Apr 26 14:59:32 2018 Key down Models.Frame.TestStation1 .Models.Frame Numpad2 Processing Time
Thu Apr 26 14:59:33 2018 Key down Models.Frame.TestStation1 .Models.Frame Numpad0 Processing Time
表4 第三事件记录表
时间戳 位置 关键值 类型 事件
Thu Apr 26 14:59:31 2018 Technomatix Observer_example1_rev3_0.spp-.[.Models.Frame.Test Station1] (1340,630) 鼠标 Set_item[Processing time]on_sub_panel
Thu Apr 26 14:59:33 2018 Technomatix Observer_example1_rev3_0.spp-.[.Models.Frame.Test Station1] 20 键盘 Keyboard input[20]for[Processing time]on_sub_panel
具体地,如表3所示,2018年的4月26日下午14时59分30秒和31秒之间,用户在建模软件界面上的母面板“Technomatix Observer_example1_rev3_0.spp”的子面板“Models.Frame.TestStation1”上坐标为(1340,630)完成了一次鼠标左键点击的动作。然后,2018年的4月26日下午14时59分32秒和33秒之间,用户在建模软件界面上的母面板“.Models.Frame”的子面板“Models.Frame.TestStation1”上完成了两次键盘输入的动作,用户依次按下的键盘的数值键2(Numpad2)和数值键0(Numpad2)了。因此,如表4的第三事件记录表所示,经过分析模块223分析工程师的建模意图,用户在建模软件上的建模意图为事件“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 time”(执行时间)的命令,事件“Keyboard input[20]for[Process time]on_sub_panel”表示建模意图为响应上述键盘动作对建模装置发出操作所述建模软件输入执行时间为“20”的命令。需要说明的是,在图2中,建模软件自动将用户输入的“20”识别为“20:00”。
然后执行步骤S3,存储所述事件的语义模型于知识库230。具体地,所述事件的语义模型包括图表形式的事件和数据点之间的关系。示例性 地,知识库230中存储的事件的语义模型如图4所示,其中,事件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”。
优选地,所述知识库中的多个事件的语义模型基于该多个事件的先后顺序存储为事件流,知识库在用户再次建模时执行事件操作时推荐该事件所属事件流的下一事件或者同时执行的事件,并相应用户的选择自动匹配下一事件或者同时执行的事件。知识库中多个事件的语义模型相互关联,成为事件流(event flow)。因此,任何用户在再次在建模装置上执行该建模软件时,一旦用户执行了如图4所示的事件1,知识库230则识别到了事件1从而推荐了与所述事件1相互关联的事件2,用户可以选择是否继续执行事件2。一旦知识库识别到了不同的事件流,则更新并存储。
图5a~5c根据本发明另一具体实施例的建模知识获取机制的第一截屏图。其中,图5a示出了建模软件的建模界面,用户在该建模界面上放置了如图5b所示的四个元件,分别为:第一元件Source、第二元件SingleProc、第三元件Parallelproc和第四元件Drain。如图5c所示,鼠标点击打开第二元件SingleProc来为这个元件设定参数,将其中的Processing time设定为2:00。
首先执行步骤S1,捕捉装置210捕捉个人电脑上基于建模软件的建模信息,其中建模信息包括事件以及事件发生时的个人电脑屏幕截屏,其中所述事件为响应鼠标动作、键盘动作或者触屏动作对所述个人电脑发出操作所述建模软件的命令。
因此,知识获取装置200捕捉个人电脑上基于建模软件的建模信息如下表所示。,其中,由于Mouse left down已经能够表示出鼠标左键单 击动作,故此记录表省去了Mouse left up(鼠标左键抬起)事件。
表5 第一事件记录表
时间戳 动作 子面板名字 母面板名字 关键值
5/22/2018 10:53:19 Mouse left down .Models.Frame example.spp (534,219)
5/22/2018 10:53:20 Mouse left down .Models.Frame example.spp (515,551)
5/22/2018 10:53:21 Mouse left down .Models.Frame example.spp (621,211)
5/22/2018 10:53:23 Mouse left down .Models.Frame example.spp (587,546)
5/22/2018 10:53:24 Mouse left down .Models.Frame example.spp (662,218)
5/22/2018 10:53:25 Mouse left down .Models.Frame example.spp (673,552)
5/22/2018 10:53:26 Mouse left down .Models.Frame example.spp (586,218)
5/22/2018 10:53:28 Mouse left down .Models.Frame example.spp (757,550)
5/22/2018 10:53:30 Mouse left down .Models.Frame example.spp (590,550)
5/22/2018 10:53:34 Mouse left down .Models.Frame.SingleProc .Models.Frame (21,1187)
5/22/2018 10:53:37 key down .Models.Frame.SingleProc .Models.Frame Numpad2
如表7所示,用户首先在时间戳为“5/22/2018 10:53:19”(即2018年5月22日上午10点53分19秒)在母面板为“example.spp”和子面板为“.Models.Frame”的位置完成了一次鼠标点击,这次鼠标点击的坐标位置为(534,219),然后在时间戳为“5/22/2018 10:53:20”(即2018年5月22日上午10点53分20秒)在母面板为“example.spp”和子面板为“.Models.Frame”的位置又完成了一次鼠标点击,这次鼠标点击的坐标位置为(515,551)。这次点击所对应的用户对建模软件的操作为点击第一元件Source的图标并拖拽至如图5b所示的位置。
同理,用户首先在时间戳为“5/22/2018 10:53:21”(即2018年5月22日上午10点53分21秒)在母面板为“example.spp”和子面板为“.Models.Frame”的位置完成了一次鼠标点击,这次鼠标点击的坐标位置为(621,211),然后在时间戳为“5/22/2018 10:53:23”(即2018年5月22日上午10点53分23秒)在母面板为“example.spp”和子面板为“.Models.Frame”的位置又完成了一次鼠标点击,这次鼠标点击的坐标位置为(587,546)。这次点击所对应的用户对建模软件的操作为点击第二元件Singleproc的图标并拖拽至如图5b所示的位置。
同理,用户首先在时间戳为“5/22/2018 10:53:24”(即2018年5 月22日上午10点53分24秒)在母面板为“example.spp”和子面板为“.Models.Frame”的位置完成了一次鼠标点击,这次鼠标点击的坐标位置为(662,218),然后在时间戳为“5/22/2018 10:53:25”(即2018年5月22日上午10点53分25秒)在母面板为“example.spp”和子面板为“.Models.Frame”的位置又完成了一次鼠标点击,这次鼠标点击的坐标位置为(673,552)。这次点击所对应的用户对建模软件的操作为点击第三元件Parallelstation的图标并拖拽至如图5b所示的位置。
同理,用户首先在时间戳为“5/22/2018 10:53:26”(即2018年5月22日上午10点53分26秒)在母面板为“example.spp”和子面板为“.Models.Frame”的位置完成了一次鼠标点击,这次鼠标点击的坐标位置为(586,218),然后在时间戳为“5/22/2018 10:53:28”(即2018年5月22日上午10点53分28秒)在母面板为“example.spp”和子面板为“.Models.Frame”的位置又完成了一次鼠标点击,这次鼠标点击的坐标位置为(757,550)。这次点击所对应的用户对建模软件的操作为点击第四元件Drain的图标并拖拽至如图5b所示的位置。
接着,用户在时间戳为“5/22/2018 10:53:30”(即2018年5月22日上午10点53分30秒)在母面板为“example.spp”和子面板为“.Models.Frame”的位置完成了一次鼠标点击,这次鼠标点击的坐标位置为(590,550)。这次鼠标点击打开第二元件SingleProc,想要对它设定参数。
最后,用户在时间戳为“5/22/2018 10:53:37”(即2018年5月22日上午10点53分37秒)在母面板为“.Models.Frame”和子面板为“.Models.Frame.SingleProc”的位置完成了一次鼠标点击,这次鼠标点击的坐标位置为(21,1187)。用户在时间戳为“5/22/2018 10:53:34”(即2018年5月22日上午10点53分34秒)在母面板为“.Models.Frame”和子面板为“.Models.Frame.SingleProc”的位置完成了一次键盘输入,其输入的是数字2。这两次操作将第二元件SingleProc的参数Processing time设定为2,如图5c所示,键盘输入数字2被识别为“2:00”。
然后执行步骤S2,基于所述事件以及事件发生时的截屏分析建模意图,提取并生成所述事件的语义模型。具体地,对事件以及所述连续事件发生时的截屏执行映射,基于所述映射分析对所述建模软件的操作, 提取并生成所述事件的语义模型。
具体地,首先执行子步骤S21,对所述第一事件记录表中的动作在所述截屏中定位,并根据图像识别基于对象特征来判断上述动作所选择的对象。
接着执行步骤S22,根据所述对象类型和对象位置产生一个感兴趣区域,并将所述感兴趣区域存储为一个放大的子图象。
接着执行子步骤S23,执行光学字符识别功能以获得所述子图象上的文字,将所述时间表中的信息和所述对象的文字对应起来并生成第二事件记录表。识别模块222用于执行光学特性辨认功能(OCR,Optical Character Recognition)。因此,现在我们可以将表1事件记录表中的时间戳、动作、子面板名字、母面板名字和关键值与具体对象的文字对应起来,如下表所示:
表6 第二事件记录表
时间戳 动作 子面板名字 母面板名字 关键值 对象
5/22/2018 10:53:19 Mouse left down .Models.Frame example.spp (534,219) source
5/22/2018 10:53:20 Mouse left down .Models.Frame example.spp (515,551) Blank Page
5/22/2018 10:53:21 Mouse left down .Models.Frame example.spp (621,211) SingleProc
5/22/2018 10:53:23 Mouse left down .Models.Frame example.spp (587,546) Blank Page
5/22/2018 10:53:24 Mouse left down .Models.Frame example.spp (662,218) ParallelProc
5/22/2018 10:53:25 Mouse left down .Models.Frame example.spp (673,552) Blank Page
5/22/2018 10:53:26 Mouse left down .Models.Frame example.spp (586,218) Drain
5/22/2018 10:53:28 Mouse left down .Models.Frame example.spp (757,550) Blank Page
5/22/2018 10:53:30 Mouse left down .Models.Frame example.spp (590,550) SingleProc
5/22/2018 10:53:34 Mouse left down .Models.Frame.SingleProc .Models.Frame (21,1187) Processing time
5/22/2018 10:53:37 key down .Models.Frame.SingleProc .Models.Frame Numpad2 Processing time
其中,在本步骤中识别了用户第一次鼠标操作的对象为第一元件source图标,并将source图标拖拽至空白的建模界面(Blank Page),同理,然后用户第二次鼠标操作的对象为第二元件Singleproc图标,并将source图标拖拽至空白的建模界面(Blank Page),用户第三次鼠标操作的对象为第三元件Parallelproc图标,并将Parallelproc图标拖拽至空白的建模界面(Blank Page),用户第四次鼠标操作的对象为第四元件Drain 图标,并将Drain图标拖拽至空白的建模界面(Blank Page)。接着,本步骤识别了用户接下来的操作对象为建模软件界面上的第二元件Singleproc,识别其参数设定的对象为“Processing time”。
最后执行子步骤S24,根据所述第二时间记录表分析对所述建模软件的操作,提取并生成事件的语义模型。分析模块223用于基于上述所有信息分析工程师的建模意图。在本实施例中,分析模块223解读如表6所示的对象相关的上述信息为如表7所示的有意义的过程相关信息:
表7 第三事件记录表
时间戳 位置 关键值 类型 事件
5/22/2018 10:53:20 Example.spp–[.Model.Frame] (515,551) 鼠标 Create_object[Source]
5/22/2018 10:53:23 Example.spp–[.Model.Frame] (587,546) 鼠标 Create_object[SingleProc]
5/22/2018 10:53:25 Example.spp–[.Model.Frame] (673,552) 鼠标 Create_object[ParallelProc]
5/22/2018 10:53:28 Example.spp–[.Model.Frame] (757,550) 鼠标 Create_object[Drain]
5/22/2018 10:53:34 Example.spp–[.Model.Frame.SingleProc] (21,1187) 鼠标 Set_item[Processing Time]on_sub_panel
5/22/2018 10:53:37 Example.spp–[.Model.Frame.SingleProc] 2 键盘 keyboard input[2]for[Processing Time]on_sub_panel
具体地,如表7所示,2018年5月22日上午10时53分20秒,用户在建模软件界面上的母面板“Example.spp”的子面板“.Model.Frame”上坐标为(515,551)完成了一次鼠标左键点击的动作。其中事件“Create_object[Source]”表示建模意图为响应上述鼠标动作对建模装置发出操作所述建模软件的建模界面上建立第一元件Source的命令。2018年5月22日上午10时53分23秒,用户在建模软件界面上的母面板“Example.spp”的子面板“.Model.Frame”上坐标为(587,546)完成了一次鼠标左键点击的动作。其中事件“Create_object[SingleProc]”表示建模意图为响应上述鼠标动作对建模装置发出操作所述建模软件的建模界面上建立第二元件SingleProc的命令。2018年5月22日上午10时53分25秒,用户在建模软件界面上的母面板“Example.spp”的子面板“.Model.Frame”上坐标为(673,552)完成了一次鼠标左键点击的动作。其中事件“Create_object[ParallelProc]”表示建模意图为响应上述鼠标动作对建模装置发出操作所述建模软件的建模界面上建立第三元件ParallelProc的命令。2018年5月22日上午10时53分28秒,用户在建模软件界面上的母面板“Example.spp”的子面板“.Model.Frame”上坐 标为(757,550)完成了一次鼠标左键点击的动作。其中事件“Create_object[Drain]”表示建模意图为响应上述鼠标动作对建模装置发出操作所述建模软件的建模界面上建立第四元件Drain的命令。
2018年5月22日上午10时53分34秒,用户在建模软件界面上的母面板“Example.spp”的子面板“.Model.Frame.SingleProc”上坐标为(21,1187)完成了一次鼠标左键点击的动作。其中事件“Set_item[Processing Time]on_sub_panel”表示建模意图为响应上述鼠标动作对建模装置发出操作所述建模软件设定“Process time”(执行时间)的命令。2018年5月22日上午10时53分37秒,用户在建模软件界面上的母面板“Example.spp”的子面板“.Model.Frame.SingleProc”上坐标为(21,1187)完成了一次键盘的动作。其中事件“keyboard input[2]for[Processing Time]on_sub_panel”表示建模意图为响应上述键盘动作对建模装置发出操作所述建模软件输入执行时间为“2”的命令。需要说明的是,在图5c中,建模软件自动将用户输入的“2”识别为“2:00”。
然后执行步骤S3,存储所述事件的语义模型于知识库230。具体地,所述事件的语义模型包括图表形式的事件和数据点之间的关系。示例性地,在本实施例中,知识库230中存储的事件的语义模型如图6所示,其中,事件3、事件4、事件5和事件6按照执行先后顺序形成一事件流。其中,事件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/201810: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/201810:53:37”,事件8“keyboard input[2]for[Processing Time]on_sub_panel”有位置“Example.spp–[.Model.Frame.SingleProc]”,事件8具有关键值为键盘输入“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”。
本发明第二方面提供了一种建模知识获取装置,其中,包括:捕捉装置,其捕捉建模装置上基于建模软件的建模信息,其中建模信息包括事件以及事件发生时的截屏,其中所述事件为响应鼠标动作、键盘动作或者触屏动作对所述建模装置发出操作所述建模软件的命令;分析装置,其基于所述事件以及事件发生时的截屏分析建模意图,提取并生成所述事件的语义模型,并存储所述事件的语义模型于知识库。
进一步地,所述鼠标动作包括以下至少一项:
-单击鼠标左键;
-单击鼠标右键;
-鼠标移动。
进一步地,所述键盘动作包括对按压所述键盘的任意键。
进一步地,所述触屏动作包括以下至少一项:
-点击屏幕;
-滑动屏幕;
-晃动屏幕。
进一步地,所述步骤S1还包括:捕捉基于建模软件的鼠标动作、键盘动作或者触屏动作,并且基于上述动作和上述动作发生时的时间戳,相关的子面板名字、母面板名字以及上述动作在所述建模软件上的关键值生成第一事件记录表。
进一步地,所述关键值包括坐标、输入文本、输入数值。
进一步地,所述步骤S2还包括:对所述第一事件记录表中的动作在所述截屏中定位,并根据图像识别基于对象特征来判断上述动作所选择的对象;根据所述对象类型和对象位置产生一个感兴趣区域,并将所述感兴趣区域存储为一个放大的子图象;执行光学字符识别功能以获得所述子图象上的文字,将所述时间表中的信息和所述对象的文字对应起来并生成第二事件记录表;根据所述第二时间记录表分析对所述建模软件的操作,提取并生成事件的语义模型。
进一步地,所述第二事件记录表包括:对象、对象类型、对象特征、对象位置。
进一步地,当所述第二事件记录表中的对象为数值框时,其对象特征为“具有一个大空白区域的矩形”,其位置为“鼠标光标的左边”;当所述第二事件记录表中的对象为标签框时,其对象特征为“一个狭窄的类矩形外形,但并无4个边缘轮廓”,其位置为“在鼠标光标位置”;当所述第二事件记录表中的对象为复选框时,其对象特征为“一个正方形空白区域”,其位置为“鼠标光标的右边”;当所述第二事件记录表中的对象为菜单项时,其对象特征为“Y坐标上的位置非常接近于窗口原点(窗口的左上角),没有鼠标位置附近的轮廓,其位置为“在鼠标光标位置”。
进一步地,所述知识库中的多个事件的语义模型基于该多个事件的先后顺序存储为事件流,知识库在用户再次建模时执行事件操作时推荐该事件所属事件流的下一事件或者同时执行的事件,并相应用户的选择自动匹配下一事件或者同时执行的事件。
本发明第三方面提供了建模知识获取系统,其中,包括:处理器;以及与所述处理器耦合的存储器,所述存储器具有存储于其中的指令,所述指令在被处理器执行时使所述电子设备执行动作,所述动作包括:S1,捕捉建模装置上基于建模软件的建模信息,其中建模信息包括事件以及事件发生时的截屏,其中所述事件为响应鼠标动作、键盘动作或者触屏动作对所述建模装置发出操作所述建模软件的命令;S2,基于所述事件以及事件发生时的截屏分析建模意图,提取并生成所述事件的语义模型;S3,存储所述事件的语义模型于知识库。
进一步地,所述鼠标动作包括以下至少一项:
-单击鼠标左键;
-单击鼠标右键;
-鼠标移动。
进一步地,所述键盘动作包括对按压所述键盘的任意键。
进一步地,所述触屏动作包括以下至少一项:
-点击屏幕;
-滑动屏幕;
-晃动屏幕。
进一步地,所述动作S1还包括:捕捉基于建模软件的鼠标动作、键盘动作或者触屏动作,并且基于上述动作和上述动作发生时的时间戳,相关的子面板名字、母面板名字以及上述动作在所述建模软件上的关键值生成第一事件记录表。
进一步地,所述关键值包括坐标、输入文本、输入数值。
进一步地,所述动作S2还包括:对所述第一事件记录表中的动作在所述截屏中定位,并根据图像识别基于对象特征来判断上述动作所选择的对象;根据所述对象类型和对象位置产生一个感兴趣区域,并将所述感兴趣区域存储为一个放大的子图象;执行光学字符识别功能以获得所述子图象上的文字,将所述时间表中的信息和所述对象的文字对应起来并生成第二事件记录表;根据所述第二时间记录表分析对所述建模软件的操作,提取并生成事件的语义模型。
进一步地,所述第二事件记录表包括:对象、对象类型、对象特征、对象位置。
进一步地,当所述第二事件记录表中的对象为数值框时,其对象特征为“具有一个大空白区域的矩形”,其位置为“鼠标光标的左边”;当所述第二事件记录表中的对象为标签框时,其对象特征为“一个狭窄的类矩形外形,但并无4个边缘轮廓”,其位置为“在鼠标光标位置”;当所述第二事件记录表中的对象为复选框时,其对象特征为“一个正方形空白区域”,其位置为“鼠标光标的右边”;当所述第二事件记录表中的对象为菜单项时,其对象特征为“Y坐标上的位置非常接近于窗口原点(窗口的左上角),没有鼠标位置附近的轮廓,其位置为“在鼠标光标位 置”。
进一步地,所述知识库中的多个事件的语义模型基于该多个事件的先后顺序存储为事件流,知识库在用户再次建模时执行事件操作时推荐该事件所属事件流的下一事件或者同时执行的事件,并相应用户的选择自动匹配下一事件或者同时执行的事件。
本发明第四方面提供了计算机程序产品,所述计算机程序产品被有形地存储在计算机可读介质上并且包括计算机可执行指令,所述计算机可执行指令在被执行时使至少一个处理器执行本发明第一方面所述的方法。
本发明第五方面提供了计算机可读介质,其上存储有计算机可执行指令,所述计算机可执行指令在被执行时使至少一个处理器执行本发明第一方面所述的方法。
本发明提供的建模知识获取机制能够基于事件或者数据及其截屏再现建模过程,并且为知识库提取提供了好的资源。本发明能够用于多种建模软件,并不依赖于特定建模软件本身,也不干预任何特定建模软件的功能,本发明能够独立执行。本发明并不仅仅用于一个建模软件工具,而能够用于多个软件,当用户需要在多个建模软件工具之间切换工作时(例如多种软件联合仿真),本发明仍然适用。对于提供应用程序界面(API)的建模软件工具,本发明仍然能够用于执行建模知识获取功能,而并不需要其他额外软件开发的工作。本发明的建模知识获取机制在后台运行,并不会打搅设计者的建模工作或者其工作方式。
此外,本发明不仅适用于Windows系统,还适用于MAC或者Linux系统等。本发明基于OS(Operation System)功能,例如,Windows hook或者截屏功能。本发明还能够用于其他很多种不需要改变其原始功能或者UI的软件,只要这些软件不会屏蔽Windows hook或者截屏功能即可。本发明和建模软件本身的UI模式或者功能无关,因此用户并不需要基于不同建模软件来发展或者修订其功能。对于Windows系统、MAC或者Linux系统等,他们都适用于Windows hook、截屏功能或者光学字符识别功能(OCR),因此不同的OS平台,本发明提供的建模知识获取功能都能够被发展。
总之,本发明提供的建模知识获取机制适用范围广,能够满足建模 知识获取的复用需求,并且能够提高建模软件的功能扩展。
尽管本发明的内容已经通过上述优选实施例作了详细介绍,但应当认识到上述的描述不应被认为是对本发明的限制。在本领域技术人员阅读了上述内容后,对于本发明的多种修改和替代都将是显而易见的。因此,本发明的保护范围应由所附的权利要求来限定。此外,不应将权利要求中的任何附图标记视为限制所涉及的权利要求;“包括”一词不排除其它权利要求或说明书中未列出的装置或步骤;“第一”、“第二”等词语仅用来表示名称,而并不表示任何特定的顺序。

Claims (23)

  1. 建模知识获取方法,其中,包括如下步骤:
    S1,捕捉建模装置上基于建模软件的建模信息,其中建模信息包括事件以及事件发生时的截屏,其中所述事件为响应鼠标动作、键盘动作或者触屏动作对所述建模装置发出操作所述建模软件的命令;
    S2,基于所述事件以及事件发生时的截屏分析建模意图,提取并生成所述事件的语义模型;
    S3,存储所述事件的语义模型于知识库。
  2. 根据权利要求1所述的建模知识获取方法,其特征在于,所述鼠标动作包括以下至少一项:
    -单击鼠标左键;
    -单击鼠标右键;
    -鼠标移动。
  3. 根据权利要求1所述的建模知识获取方法,其特征在于,所述键盘动作包括对按压所述键盘的任意键。
  4. 根据权利要求1所述的建模知识获取方法,其特征在于,所述触屏动作包括以下至少一项:
    -点击屏幕;
    -滑动屏幕;
    -晃动屏幕。
  5. 根据权利要求1所述的建模知识获取方法,其特征在于,所述步骤S1还包括:
    捕捉基于建模软件的鼠标动作、键盘动作或者触屏动作,并且基于上述动作和上述动作发生时的时间戳,相关的子面板名字、母面板名字以及上述动作在所述建模软件上的关键值生成第一事件记录表。
  6. 根据权利要求5所述的建模知识获取方法,其特征在于,所述关键值包括坐标、输入文本、输入数值。
  7. 根据权利要求5所述的建模知识获取方法,其特征在于,所述步骤S2还包括:
    对所述第一事件记录表中的动作在所述截屏中定位,并根据图像识 别基于对象特征来判断上述动作所选择的对象;
    根据所述对象类型和对象位置产生一个感兴趣区域,并将所述感兴趣区域存储为一个放大的子图象;
    执行光学字符识别功能以获得所述子图象上的文字,将所述时间表中的信息和所述对象的文字对应起来并生成第二事件记录表;
    根据所述第二时间记录表分析对所述建模软件的操作,提取并生成事件的语义模型。
  8. 根据权利要求7所述的建模知识获取方法,其特征在于,所述第二事件记录表包括:对象、对象类型、对象特征、对象位置。
  9. 根据权利要求7所述的建模知识获取方法,其特征在于,当所述第二事件记录表中的对象为数值框时,其对象特征为“具有一个大空白区域的矩形”,其位置为“鼠标光标的左边”;当所述第二事件记录表中的对象为标签框时,其对象特征为“一个狭窄的类矩形外形,但并无4个边缘轮廓”,其位置为“在鼠标光标位置”;当所述第二事件记录表中的对象为复选框时,其对象特征为“一个正方形空白区域”,其位置为“鼠标光标的右边”;当所述第二事件记录表中的对象为菜单项时,其对象特征为“Y坐标上的位置非常接近于窗口原点(窗口的左上角),没有鼠标位置附近的轮廓,其位置为“在鼠标光标位置”。
  10. 根据权利要求7所述的建模知识获取方法,其特征在于,所述知识库中的多个事件的语义模型基于该多个事件的先后顺序存储为事件流,知识库在用户再次建模时执行事件操作时推荐该事件所属事件流的下一事件或者同时执行的事件,并相应用户的选择自动匹配下一事件或者同时执行的事件。
  11. 建模知识获取装置,其中,包括:
    捕捉装置,其捕捉建模装置上基于建模软件的建模信息,其中建模信息包括事件以及事件发生时的截屏,其中所述事件为响应鼠标动作、键盘动作或者触屏动作对所述建模装置发出操作所述建模软件的命令;
    分析装置,其基于所述事件以及事件发生时的截屏分析建模意图,提取并生成所述事件的语义模型,并存储所述事件的语义模型于知识库。
  12. 建模知识获取系统,其中,包括:
    处理器;以及
    与所述处理器耦合的存储器,所述存储器具有存储于其中的指令,所述指令在被处理器执行时使所述电子设备执行动作,所述动作包括:
    S1,捕捉建模装置上基于建模软件的建模信息,其中建模信息包括事件以及事件发生时的截屏,其中所述事件为响应鼠标动作、键盘动作或者触屏动作对所述建模装置发出操作所述建模软件的命令;
    S2,基于所述事件以及事件发生时的截屏分析建模意图,提取并生成所述事件的语义模型;
    S3,存储所述事件的语义模型于知识库。
  13. 根据权利要求12所述的建模知识获取系统,其特征在于,所述鼠标动作包括以下至少一项:
    -单击鼠标左键;
    -单击鼠标右键;
    -鼠标移动。
  14. 根据权利要求12所述的建模知识获取系统,其特征在于,所述键盘动作包括对按压所述键盘的任意键。
  15. 根据权利要求12所述的建模知识获取系统,其特征在于,所述触屏动作包括以下至少一项:
    -点击屏幕;
    -滑动屏幕;
    -晃动屏幕。
  16. 根据权利要求12所述的建模知识获取系统,其特征在于,所述动作S1还包括:
    捕捉基于建模软件的鼠标动作、键盘动作或者触屏动作,并且基于上述动作和上述动作发生时的时间戳,相关的子面板名字、母面板名字以及上述动作在所述建模软件上的关键值生成第一事件记录表。
  17. 根据权利要求16所述的建模知识获取系统,其特征在于,所述关键值包括坐标、输入文本、输入数值。
  18. 根据权利要求16所述的建模知识获取系统,其特征在于,所述动作S2还包括:
    对所述第一事件记录表中的动作在所述截屏中定位,并根据图像识别基于对象特征来判断上述动作所选择的对象;
    根据所述对象类型和对象位置产生一个感兴趣区域,并将所述感兴趣区域存储为一个放大的子图象;
    执行光学字符识别功能以获得所述子图象上的文字,将所述时间表中的信息和所述对象的文字对应起来并生成第二事件记录表;
    根据所述第二时间记录表分析对所述建模软件的操作,提取并生成事件的语义模型。
  19. 根据权利要求18所述的建模知识获取系统,其特征在于,所述第二事件记录表包括:对象、对象类型、对象特征、对象位置。
  20. 根据权利要求18所述的建模知识获取系统,其特征在于,当所述第二事件记录表中的对象为数值框时,其对象特征为“具有一个大空白区域的矩形”,其位置为“鼠标光标的左边”;当所述第二事件记录表中的对象为标签框时,其对象特征为“一个狭窄的类矩形外形,但并无4个边缘轮廓”,其位置为“在鼠标光标位置”;当所述第二事件记录表中的对象为复选框时,其对象特征为“一个正方形空白区域”,其位置为“鼠标光标的右边”;当所述第二事件记录表中的对象为菜单项时,其对象特征为“Y坐标上的位置非常接近于窗口原点(窗口的左上角),没有鼠标位置附近的轮廓,其位置为“在鼠标光标位置”。
  21. 根据权利要求18所述的建模知识获取系统,其特征在于,所述知识库中的多个事件的语义模型基于该多个事件的先后顺序存储为事件流,知识库在用户再次建模时执行事件操作时推荐该事件所属事件流的下一事件或者同时执行的事件,并相应用户的选择自动匹配下一事件或者同时执行的事件。
  22. 计算机程序产品,所述计算机程序产品被有形地存储在计算机可读介质上并且包括计算机可执行指令,所述计算机可执行指令在被执行时使至少一个处理器执行根据权利要求1至10中任一项所述的方法。
  23. 计算机可读介质,其上存储有计算机可执行指令,所述计算机可执行指令在被执行时使至少一个处理器执行根据权利要求1至10中任一项所述的方法。
PCT/CN2018/121814 2018-12-18 2018-12-18 建模的知识获取方法、装置和系统 WO2020124377A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2018/121814 WO2020124377A1 (zh) 2018-12-18 2018-12-18 建模的知识获取方法、装置和系统
CN201880099861.6A CN113168283A (zh) 2018-12-18 2018-12-18 建模的知识获取方法、装置和系统

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/121814 WO2020124377A1 (zh) 2018-12-18 2018-12-18 建模的知识获取方法、装置和系统

Publications (1)

Publication Number Publication Date
WO2020124377A1 true WO2020124377A1 (zh) 2020-06-25

Family

ID=71102421

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/121814 WO2020124377A1 (zh) 2018-12-18 2018-12-18 建模的知识获取方法、装置和系统

Country Status (2)

Country Link
CN (1) CN113168283A (zh)
WO (1) WO2020124377A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116400907B (zh) * 2023-06-08 2024-02-02 四川云申至诚科技有限公司 基于知识学习的程式自动编写方法、存储介质及装置

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102365597A (zh) * 2009-03-30 2012-02-29 西门子公司 用于创建过程模型的装置和方法
CN107392915A (zh) * 2016-05-14 2017-11-24 谷歌公司 基于捕获内容的截屏图像的像素将计算设备上显示的内容分割成区域
CN108139849A (zh) * 2015-10-01 2018-06-08 谷歌有限责任公司 针对用户选择内容的动作建议
CN108268505A (zh) * 2016-12-30 2018-07-10 西门子公司 基于语义知识的建模方法和装置
CN108345622A (zh) * 2017-01-25 2018-07-31 西门子公司 基于语义模型框架的模型检索方法和装置

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020016707A1 (en) * 2000-04-04 2002-02-07 Igor Devoino Modeling of graphic images from text
CN108509519B (zh) * 2018-03-09 2021-03-09 北京邮电大学 基于深度学习的通用知识图谱增强问答交互系统及方法

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102365597A (zh) * 2009-03-30 2012-02-29 西门子公司 用于创建过程模型的装置和方法
CN108139849A (zh) * 2015-10-01 2018-06-08 谷歌有限责任公司 针对用户选择内容的动作建议
CN107392915A (zh) * 2016-05-14 2017-11-24 谷歌公司 基于捕获内容的截屏图像的像素将计算设备上显示的内容分割成区域
CN108268505A (zh) * 2016-12-30 2018-07-10 西门子公司 基于语义知识的建模方法和装置
CN108345622A (zh) * 2017-01-25 2018-07-31 西门子公司 基于语义模型框架的模型检索方法和装置

Also Published As

Publication number Publication date
CN113168283A (zh) 2021-07-23

Similar Documents

Publication Publication Date Title
CN105988924B (zh) 一种非侵入式嵌入式软件图形用户界面自动化测试方法
US11061661B2 (en) Image based method and system for building object model and application states comparison and graphic-based interoperability with an application
US20140218385A1 (en) System and method for visual segmentation of application screenshots
US20140033091A1 (en) Image-based automation systems and methods
Linn et al. Desktop activity mining-a new level of detail in mining business processes
CN113255614A (zh) 一种基于视频分析的rpa流程自动生成方法与系统
US8417026B2 (en) Gesture recognition methods and systems
CN101930399A (zh) 一种对软件测试进行记录的方法
US9519355B2 (en) Mobile device event control with digital images
CN102541561B (zh) 配置式软件开发方法及装置
WO2024066067A1 (zh) 一种定位界面上目标元素的方法、介质及电子设备
CN111857470A (zh) 一种生产设备的无人值守控制方法、装置和控制器
CN104216646A (zh) 基于手势创建应用程序的方法及装置
WO2020124377A1 (zh) 建模的知识获取方法、装置和系统
CN117057318A (zh) 领域模型生成方法、装置、设备以及存储介质
WO2021087818A1 (zh) 软件知识捕捉方法、装置和系统
Chen et al. UI layers merger: merging UI layers via visual learning and boundary prior
CN114416516A (zh) 基于截图的测试用例及测试脚本生成方法、系统及介质
JP7380714B2 (ja) 操作ログ取得装置および操作ログ取得方法
US10133953B2 (en) System and method for enabling graphic-based interoperability with a run-time application
CN116126697A (zh) 测试用例生成方法、装置、设备及计算机可读存储介质
CN114201144A (zh) 基于领域驱动设计的微服务系统构建方法、设备及介质
JP2000163602A (ja) 入力履歴蓄積装置
CN109032907B (zh) 面向设备应用的数据监控方法及系统
Wu et al. A model based testing approach for mobile device

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18943506

Country of ref document: EP

Kind code of ref document: A1