





技术领域technical field
本发明实施例涉及计算机技术领域,尤其涉及一种业务处理方法和业务引擎。The embodiment of the present invention relates to the field of computer technology, in particular to a service processing method and a service engine.
背景技术Background technique
目前,随着Internet应用的不断丰富和相关技术的不断成熟,开发人员可以把Internet上的各种应用和服务作为可重用的对象创造出新的应用,使得能够重用的组件的粒度越来越大,为用户创建应用提供更多的方便。聚合(mashup)通过组合多种数据源、应用来形成新应用,具有面向普通用户而非开发者、面向集成而非软件开发的特点。At present, with the continuous enrichment of Internet applications and the continuous maturity of related technologies, developers can use various applications and services on the Internet as reusable objects to create new applications, making the granularity of reusable components larger and larger. , to provide more convenience for users to create applications. Aggregation (mashup) forms a new application by combining multiple data sources and applications, and has the characteristics of being oriented to ordinary users rather than developers, and oriented to integration rather than software development.
在现有技术中,mashup的内容抽取主要依靠编程来实现,例如从一个网页中分离出特定内容时,需要分析页面内容,编程获取所需数据。当然,可以借助网页内容提取kapow工具进行辅助开发,但此时需要程序员定义所要获取的内容的输入和输出,并重新编写页面对所获取的数据进行封装。In the prior art, content extraction of a mashup is mainly implemented by programming. For example, when separating specific content from a web page, it is necessary to analyze the content of the page and program to obtain the required data. Of course, web page content extraction kapow tool can be used for auxiliary development, but at this time, the programmer needs to define the input and output of the content to be obtained, and rewrite the page to encapsulate the obtained data.
因此,在使用现有技术获取某个网页的特定内容时,对业务创建者的编程要求仍然很高,如仍需要从编程语言层次对页面内容进行分析等。Therefore, when using the existing technology to obtain specific content of a webpage, the programming requirements for the service creator are still very high, such as still needing to analyze the page content from the programming language level.
发明内容Contents of the invention
本发明实施例提供一种业务处理方法和业务引擎,用以解决现有技术中对业务创建者的编程要求高的缺陷,使得业务创建者可通过截图来进行编程,降低业务开发的难度。Embodiments of the present invention provide a service processing method and a service engine, which are used to solve the defect of high programming requirements for service creators in the prior art, so that service creators can program through screenshots, reducing the difficulty of service development.
本发明实施例提供一种业务处理方法,包括:An embodiment of the present invention provides a business processing method, including:
获取业务脚本,所述业务脚本包括操作指令和所述操作指令对应的子业务的图像信息;Obtaining a business script, the business script including an operation instruction and image information of a sub-service corresponding to the operation instruction;
执行所述业务脚本,在所述子业务的图像信息所指示的位置模拟执行所述操作指令,并将执行结果在客户端进行显示。Executing the service script, simulating the execution of the operation instruction at the position indicated by the image information of the sub-service, and displaying the execution result on the client.
本发明实施例提供一种业务引擎,包括:An embodiment of the present invention provides a service engine, including:
脚本获取模块,用于获取业务脚本,所述业务脚本包括操作指令和所述操作指令对应的子业务的图像信息;A script acquiring module, configured to acquire a business script, the business script including an operation instruction and image information of a sub-service corresponding to the operation instruction;
脚本执行模块,用于执行所述业务脚本,在所述子业务的图像信息所指示的位置模拟执行所述操作指令;a script execution module, configured to execute the service script, and simulate the execution of the operation instruction at the position indicated by the image information of the sub-service;
结果显示模块,用于将执行结果在客户端进行显示。The result display module is used to display the execution result on the client.
本发明实施例的业务处理方法和业务引擎,通过获取业务脚本并执行,根据业务脚本中各操作指令对应的子业务的图像信息在所示的位置模拟执行各操作指令,将获取的执行结果显示在客户端,本实施例将图像引入业务创建过程中,使得业务创建者可以通过获取的图像信息来进行编程,解决了现有技术中对业务创建者的编程要求高的缺陷,使得业务创建者可通过截图来进行编程,降低了业务开发的难度。The business processing method and the business engine of the embodiment of the present invention obtain and execute the business script, simulate and execute each operation command at the position shown according to the image information of the sub-service corresponding to each operation command in the business script, and display the obtained execution result On the client side, this embodiment introduces images into the business creation process, so that the business creator can program through the acquired image information, which solves the defect of high programming requirements for the business creator in the prior art, and makes the business creator Programming can be performed through screenshots, which reduces the difficulty of business development.
附图说明Description of drawings
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description These are some embodiments of the present invention. For those skilled in the art, other drawings can also be obtained according to these drawings without any creative effort.
图1为本发明业务处理方法实施例一的流程图;FIG. 1 is a flow chart of Embodiment 1 of the business processing method of the present invention;
图2为本发明业务处理方法实施例二的流程图;FIG. 2 is a flow chart of Embodiment 2 of the business processing method of the present invention;
图3为本发明业务处理方法实施例三的流程图;FIG. 3 is a flow chart of Embodiment 3 of the business processing method of the present invention;
图4为本发明业务处理方法实施例三中的图像信息的示例图;FIG. 4 is an example diagram of image information in Embodiment 3 of the business processing method of the present invention;
图5为本发明业务引擎实施例一的结构示意图;FIG. 5 is a schematic structural diagram of Embodiment 1 of the service engine of the present invention;
图6为本发明业务引擎实施例二的结构示意图。Fig. 6 is a schematic structural diagram of the second embodiment of the service engine of the present invention.
具体实施方式Detailed ways
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments It is a part of embodiments of the present invention, but not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without creative efforts fall within the protection scope of the present invention.
图1为本发明业务处理方法实施例一的流程图,如图1所示,本实施例提供了一种业务处理方法,可以具体包括如下步骤:Fig. 1 is a flowchart of Embodiment 1 of the business processing method of the present invention. As shown in Fig. 1, this embodiment provides a business processing method, which may specifically include the following steps:
步骤101,业务引擎获取业务脚本,所述业务脚本包括操作指令和所述操作指令对应的子业务的图像信息。Step 101, the service engine obtains a service script, and the service script includes an operation instruction and image information of a sub-service corresponding to the operation instruction.
本实施例中的业务引擎可以独立于客户端而设置,此时业务引擎与客户端是分离的,当然业务引擎也可以与客户端设置在一起,同时可以充当客户端的角色。本步骤为业务引擎获取业务脚本,该业务脚本为业务创建者通过创建工具创建的组合业务的业务脚本,此处的组合业务可以由多个相互关联的子业务组成,也可以只包括一个子业务。具体地,本实施例中的业务脚本可以包括业务创建者创建业务时记录的各个操作指令和操作指令对应的子业务的图像信息,子业务的图像信息为业务创建者记录的子业务服务器返回的业务响应对应的图像信息。The service engine in this embodiment can be set independently from the client. At this time, the service engine and the client are separated. Of course, the service engine can also be set together with the client, and can also play the role of the client. This step is to obtain the business script for the business engine. The business script is the business script of the combined business created by the business creator through the creation tool. The combined business here can consist of multiple interrelated sub-businesses, or only include one sub-business . Specifically, the business script in this embodiment may include each operation instruction recorded by the business creator when creating the business and the image information of the sub-service corresponding to the operation instruction. The image information of the sub-service is returned by the sub-service server recorded by the business creator. The image information corresponding to the business response.
步骤102,业务引擎执行所述业务脚本,在所述子业务的图像信息所指示的位置模拟执行所述操作指令,并将执行结果在客户端进行显示。Step 102, the service engine executes the service script, simulates the execution of the operation instruction at the position indicated by the image information of the sub-service, and displays the execution result on the client.
业务引擎在获取到业务脚本后,执行该业务脚本,在业务脚本中记录的子业务的图像信息所指示的位置模拟执行对应的操作指令,生成执行结果,并将该执行结果发送到客户端进行显示。在本实施例中,业务脚本中记录的子业务的图像信息可以为操作指令对应的位置的相对位置信息或截图信息,也可以为操作指令对应的位置的截图信息,此处所指的操作指令对应的位置即为执行该操作指令的位置。After the business engine obtains the business script, it executes the business script, simulates and executes the corresponding operation command at the position indicated by the image information of the sub-service recorded in the business script, generates the execution result, and sends the execution result to the client for further processing. show. In this embodiment, the image information of the sub-service recorded in the business script can be the relative position information or screenshot information of the position corresponding to the operation instruction, or it can be the screenshot information of the position corresponding to the operation instruction. The operation instruction referred to here The corresponding location is the location where the operation instruction is executed.
本实施例提供了一种业务处理方法,通过业务引擎获取业务脚本并执行,根据业务脚本中各操作指令对应的子业务的图像信息在所指示的位置模拟执行各操作指令,将获取的执行结果显示在客户端,本实施例将图像引入业务创建过程中,使得业务创建者可以通过获取的图像信息来进行编程,解决了现有技术中对业务创建者的编程要求高的缺陷,使得业务创建者可通过截图来进行编程,降低了业务开发的难度。This embodiment provides a business processing method. The business script is obtained and executed by the business engine, and each operation command is simulated and executed at the indicated position according to the image information of the sub-service corresponding to each operation command in the business script, and the obtained execution result is Displayed on the client side, this embodiment introduces the image into the business creation process, so that the business creator can program through the acquired image information, which solves the defect of high programming requirements for the business creator in the prior art, and makes the business creation Users can program through screenshots, which reduces the difficulty of business development.
图2为本发明业务处理方法实施例二的流程图,如图2所示,本实施例提供了一种业务处理方法,可以具体包括如下步骤:Fig. 2 is a flowchart of Embodiment 2 of the business processing method of the present invention. As shown in Fig. 2, this embodiment provides a business processing method, which may specifically include the following steps:
步骤201,业务引擎获取业务脚本,所述业务脚本包括操作指令和所述操作指令对应的子业务的图像信息。In
本步骤可以类似上述步骤101,此处不再赘述。在本实施例中,在业务引擎获取业务脚本之前,先由业务创建者通过创建工具创建组合业务的业务脚本。在进行业务创建时,先确定创建的组合业务中所包含的子业务,再依次创建各子业务的相关业务脚本。本实施例中创建子业务的业务脚本的过程即为业务创建工具记录各操作指令并生成业务脚本的过程,本实施例中的操作指令可以包括但不限于点击操作指令、输入操作指令、等待操作指令、区域选择操作指令、结果展示操作指令中的一项或多项,以下将对各操作指令的记录过程分别进行详细的说明。This step may be similar to the above step 101, and will not be repeated here. In this embodiment, before the service engine obtains the service script, the service creator first creates the service script of the composite service through the creation tool. When creating a service, first determine the sub-services contained in the created combined service, and then create the relevant service scripts of each sub-service in turn. In this embodiment, the process of creating a business script for a sub-service is the process in which the business creation tool records each operation instruction and generates a business script. The operation instructions in this embodiment may include but are not limited to click operation instructions, input operation instructions, and waiting operations. One or more of the instruction, the area selection operation instruction, and the result display operation instruction, the recording process of each operation instruction will be described in detail below.
对于打开操作指令来说,由创建工具在业务脚本中记录打开操作指令以及所述打开操作指令对应的子业务的业务地址。在创建子业务的业务脚本时,根据子业务的业务地址执行该子业务,同时在业务脚本中记录打开该子业务的打开操作指令以及该打开操作指令对应的子业务的业务地址,如子业务为新浪网站的天气预报时,则打开操作指令为在浏览器中打开新浪网站的页面,并在业务脚本中记录新浪网站的网络地址。此处假定创建者可以获取到新浪网站的地址,而获取不到天气预报的地址。在本实施例中,如果子业务的业务地址为本地地址,则表明该子业务为本地可执行程序,执行该子业务的过程为直接在本机运行该子业务对应的程序;如果子业务的业务地址为远程地址,则表明该子业务为web应用,执行该子业务的过程为通过浏览器打开该远程地址。For the opening operation instruction, the creation tool records the opening operation instruction and the service address of the sub-service corresponding to the opening operation instruction in the service script. When creating a business script for a sub-service, execute the sub-service according to the business address of the sub-service, and record the opening operation instruction for opening the sub-service and the service address of the sub-service corresponding to the opening operation instruction in the business script, such as sub-service When it is the weather forecast of the Sina website, the opening operation instruction is to open the page of the Sina website in the browser, and record the network address of the Sina website in the business script. It is assumed here that the creator can obtain the address of the Sina website, but not the address of the weather forecast. In this embodiment, if the service address of the sub-service is a local address, it indicates that the sub-service is a local executable program, and the process of executing the sub-service is to directly run the program corresponding to the sub-service on this machine; if the sub-service If the business address is a remote address, it indicates that the sub-service is a web application, and the process of executing the sub-service is to open the remote address through a browser.
对于点击操作指令来说,由创建工具根据子业务的界面上的点击位置的截图或位置信息,在所述业务脚本中记录点击操作指令和所述点击操作指令对应的所述点击位置的截图或位置信息。仍以子业务为新浪网站的天气预报为例,通过对新浪网站首页中的“天气预报”的图标进行点击,同时在业务脚本中记录该点击位置的截图或该点击位置的位置信息以及该点击操作指令,此处的点击位置的位置信息可以为该点击位置在子业务的界面中对应的坐标信息。For the click operation instruction, the creation tool records the click operation instruction and the screenshot or screenshot of the click location corresponding to the click operation instruction in the business script according to the screenshot or location information of the click location on the interface of the sub-service. location information. Still taking the weather forecast of the Sina website as the sub-service as an example, by clicking the "weather forecast" icon on the homepage of the Sina website, record the screenshot of the clicked position or the location information of the clicked position and the clicked position in the business script. In the operation instruction, the position information of the click position here may be coordinate information corresponding to the click position in the interface of the sub-service.
对于输入操作指令来说,由创建工具根据子业务的界面上的输入区域的截图或位置信息,在所述业务脚本中记录输入操作指令、所述输入操作指令对应的所述输入区域的截图或位置信息和输入默认值。此处以子业务为手机号码的归属地信息查询为例进行说明,该子业务需要输入一个手机号码作为输入值,可以根据子业务的界面上的输入区域,来截取输入区域的相关图片,在业务脚本中增加该输入操作指令、输入区域的相关图片以及可选的默认输入值。在本实施例中,也可以通过截取其他子业务的区域图片作为该输入区域的默认输入值,如将手机号码的归属地信息查询这一子业务生成的归属地信息作为天气预报查询的默认输入值。另外,也可以将输入区域的相关图片替换为输入区域的相对位置信息,将默认输入值对应的区域图片替换为该区域的相对位置信息。For the input operation instruction, the creation tool records the input operation instruction, the screenshot of the input area corresponding to the input operation instruction or Location information and input defaults. Here, the sub-service is the attribution information query of the mobile phone number as an example. This sub-service needs to input a mobile phone number as the input value. The relevant pictures of the input area can be intercepted according to the input area on the interface of the sub-service. In the service Add the input operation command, related pictures of the input area, and optional default input values in the script. In this embodiment, the area pictures of other sub-services can also be intercepted as the default input value of the input area, such as the attribution information generated by the sub-service of mobile phone number attribution information query as the default input of weather forecast query value. In addition, it is also possible to replace the relevant pictures of the input area with the relative position information of the input area, and replace the picture of the area corresponding to the default input value with the relative position information of the area.
对于等待操作指令来说,由创建工具在所述业务脚本中记录等待操作指令和所述等待操作指令对应的等待时间信息、业务响应消息或业务请求消息。在本实施例中,如果等待操作指令为等待时间过期,则在业务脚本中记录的可以为等待操作指令和等待操作指令对应的等待时间信息;如果等待操作指令为等待业务响应消息,则在业务脚本中记录的也可以为等待操作指令和等待操作指令对应的业务响应消息,此处的业务响应消息可以具体为特定的返回图片;如果等待操作指令为等待客户端的业务请求消息,则业务脚本中记录的还可以为等待操作指令和等待操作指令对应的客户端发送的业务请求消息。For the waiting operation instruction, the creation tool records the waiting operation instruction and the waiting time information, service response message or service request message corresponding to the waiting operation instruction in the service script. In this embodiment, if the waiting operation instruction is that the waiting time expires, then the waiting time information corresponding to the waiting operation instruction and the waiting operation instruction may be recorded in the business script; if the waiting operation instruction is waiting for a service response message, then in the service What is recorded in the script can also be the waiting operation instruction and the business response message corresponding to the waiting operation instruction. The business response message here can be a specific return picture; What is recorded may also be the waiting operation instruction and the service request message sent by the client corresponding to the waiting operation instruction.
对于区域选择操作指令来说,由创建工具根据对所述子业务的界面上选定内容进行截取的边框图片或位置信息,在所述业务脚本中记录区域选择操作指令和所述区域选择操作指令对应的所述边框图片或位置信息。即在返回子业务的界面中通过区域选择操作指令截取所需内容的边框图片,在业务脚本中记录区域选择操作指令和该区域选择操作指令对应的该边框图片;或者在返回的子业务的界面中通过区域选择操作指令截取所需内容的位置信息,在业务脚本中记录区域选择操作指令和该区域选择操作指令对应的位置信息。For the area selection operation instruction, the creation tool records the area selection operation instruction and the area selection operation instruction in the service script according to the frame picture or position information intercepted from the selected content on the interface of the sub-service The corresponding frame picture or position information. That is, in the interface of the returned sub-service, intercept the frame picture of the required content through the area selection operation command, record the area selection operation command and the frame picture corresponding to the area selection operation command in the business script; or in the interface of the returned sub-service The location information of the required content is intercepted through the region selection operation instruction, and the region selection operation instruction and the location information corresponding to the region selection operation instruction are recorded in the business script.
对于结果展示操作指令来说,由创建工具在所述业务脚本中记录结果展示操作指令。在本实施例中,结果信息可以为截取的图片或页面内容,即可以通过结果展示操作指令来展示截取的图片,还可以展示页面内容,如将整个网页展示到客户端。For the result display operation instruction, the creation tool records the result display operation instruction in the business script. In this embodiment, the result information can be the intercepted picture or the page content, that is, the intercepted picture can be displayed through the result display operation instruction, and the page content can also be displayed, such as displaying the entire webpage to the client.
在由创建工具对子业务对应的操作指令进行记录,生成对应的业务脚本后,将该业务脚本映射到布局模板对应的组件上。本实施例中的布局模板可以采用HTML等语言来实现,通过该布局模板可以方便地组织和调节各个子组件。另外,在本实施例提供的业务处理方法中,还可以包括:对该组件的属性进行配置。其中,对各组件的属性的配置主要为对该组件的图像的可变性进行配置,将该组件的图像配置为可变或不可变,此处的图像的可变性可以具体为该组件中的图像可压缩或拉升等,如当业务界面缩小时,业务界面上的按钮等也随之缩小,则此时该组件的图像可变,而当业务界面缩小时,业务界面上的按钮等不随之缩小,则此时该组件的图像不可变。当配置后的组件的图像可变时,上述业务脚本中记录的各操作指令对应的子业务的图像信息为该操作指令对应的位置的截图信息;当配置后的组件的图像不可变时,上述业务脚本中记录的各操作指令对应的子业务的图像信息为该操作指令对应的位置的相对位置信息或截图信息。After the creation tool records the operation instructions corresponding to the sub-services and generates the corresponding service scripts, the service scripts are mapped to the components corresponding to the layout template. The layout template in this embodiment can be implemented in languages such as HTML, and each sub-component can be conveniently organized and adjusted through the layout template. In addition, the business processing method provided in this embodiment may further include: configuring attributes of the component. Among them, the configuration of the attributes of each component is mainly to configure the variability of the image of the component, and configure the image of the component to be variable or immutable. The variability of the image here can be specifically the image in the component It can be compressed or stretched. For example, when the business interface is reduced, the buttons on the business interface are also reduced, and the image of the component is variable at this time, but when the business interface is reduced, the buttons on the business interface are not Zoom out, the image of the component is immutable at this time. When the image of the configured component is variable, the image information of the sub-service corresponding to each operation instruction recorded in the above business script is the screenshot information of the location corresponding to the operation instruction; when the image of the configured component is not variable, the above The image information of the sub-service corresponding to each operation instruction recorded in the service script is relative position information or screenshot information of the location corresponding to the operation instruction.
步骤202,业务引擎根据业务脚本中子业务的业务地址调用特定客户端访问子业务,并获取所述子业务的响应页面。Step 202, the service engine invokes a specific client to access the sub-service according to the service address of the sub-service in the service script, and obtains a response page of the sub-service.
业务引擎在获取到之前创建的组合业务的业务脚本后,对该业务脚本进行执行,以获取组合业务中各子业务的特定内容。在执行业务脚本时,业务引擎根据业务脚本中记录的打开操作指令对应的子业务的业务地址调用特定客户端对子业务进行访问,如果业务地址为本地地址,则直接在本地执行该子业务的可执行程序,如果业务地址为远程地址,则调用浏览器访问该子业务。业务引擎通过对子业务的访问,从子业务对应的子业务服务器获取返回的该子业务的响应页面。After obtaining the previously created service script of the combined service, the service engine executes the service script to obtain the specific content of each sub-service in the combined service. When executing a business script, the business engine invokes a specific client to access the sub-service according to the business address of the sub-service corresponding to the opening operation command recorded in the business script. If the business address is a local address, the sub-service is directly executed locally. Executable program, if the service address is a remote address, invoke the browser to access the sub-service. The service engine obtains the returned response page of the sub-service from the sub-service server corresponding to the sub-service by accessing the sub-service.
步骤203,业务引擎将所述响应页面映射为所述子业务对应的图像。
业务引擎获取到子业务的响应页面后,将该响应页面映射为该子业务对应的图像。具体地,业务引擎可以将获取的响应页面在屏幕中进行显示,通过截屏操作来获取该子业务对应的图像,或业务引擎可以通过调用显卡对所述响应页面进行处理,获取所述子业务对应的图像。After obtaining the response page of the sub-service, the service engine maps the response page to an image corresponding to the sub-service. Specifically, the service engine can display the obtained response page on the screen, and obtain the image corresponding to the sub-service through a screenshot operation, or the service engine can process the response page by invoking a graphics card, and obtain the image corresponding to the sub-service. Image.
步骤204,业务引擎执行所述业务脚本,在所述子业务的图像信息所指示的位置模拟执行所述操作指令,并将执行结果在客户端进行显示。
业务引擎根据上述步骤中获取的子业务对应的图像和业务脚本来模拟执行业务脚本中记录的各操作指令,并将生成的执行结果发送到客户端进行显示,此处的客户端为业务使用客户端,即业务使用者所对应的客户端。业务引擎在完成对业务脚本的执行,并将执行结果显示在客户端后,还将执行结果对应的用户界面相关的后继地址修改为引擎地址,使得后续用户与组合业务的交互经过业务引擎。以下将对业务脚本中可能记录的各操作指令的模拟执行过程分别进行详细的说明。The business engine simulates and executes each operation command recorded in the business script according to the images and business scripts corresponding to the sub-services obtained in the above steps, and sends the generated execution results to the client for display. The client here is a business user end, that is, the client corresponding to the business user. After the service engine completes the execution of the service script and displays the execution result on the client, it also modifies the subsequent address related to the user interface corresponding to the execution result to the engine address, so that the subsequent interaction between the user and the combined service passes through the service engine. The simulation execution process of each operation command that may be recorded in the business script will be described in detail below.
当操作指令为点击操作指令时,步骤204可以具体为:业务引擎将所述业务脚本中点击操作指令对应的点击位置的截图与所述子业务对应的图像进行匹配和定位处理,并根据定位处理获取的选定位置在子业务对应的页面上模拟执行所述点击操作指令;或业务引擎根据所述业务脚本中点击操作指令对应的点击位置的位置信息在所述子业务对应的页面上模拟执行所述点击操作指令。由于业务脚本中记录的点击操作指令对应的点击位置的信息可以为点击位置的截图信息或点击位置的相对位置信息,则模拟执行该点击操作指令的执行过程不同。当点击位置的信息为点击位置的截图信息时,本步骤为业务引擎将业务脚本中点击操作指令对应的点击位置的截图与之前获取的子业务对应的图像进行匹配和定位处理,通过对两张图像的匹配和定位处理,来获取执行该点击操作指令的选定位置,然后激活该业务的应用界面,使得显示于屏幕中,此时便能够接受鼠标的操作,并在获取的选定位置模拟执行该点击操作指令。需要指出的是,本实施例中的图像匹配处理为模糊匹配,由于图像在不同客户端进行显示时可能导致图像的大小发生变化,如图像被压缩或拉伸,或者图像的背景色发生变化等。另外,在图像匹配过程中,当子业务对应的页面的尺寸大于一个屏幕显示界面的尺寸,即子业务对应的页面不能在一个屏幕内全部显示时,也即子业务对应的页面存在翻页操作时,上述与子业务对应的图像进行匹配和定位处理的步骤可以包括:对子业务对应的页面进行翻页操作,与翻页后页面对应的图像进行匹配和定位处理,并重复执行该步骤,直到不能在子业务对应的页面上再执行翻页操作为止。即在进行图像匹配和定位过程中,需要对页面进行翻页操作,再根据翻页后的页面的图像进行匹配和定位处理,直到不能再翻页为止。需要指出的是,本实施例的后续步骤中的匹配和定位处理过程与此类似,后续不再赘述。当点击位置的信息为点击位置的相对位置信息时,本步骤为业务引擎根据业务脚本中点击操作指令对应的点击位置的相对位置信息,来获取执行该点击操作指令的选定位置,然后激活该业务使其能够接受鼠标的操作,并在获取的选定位置模拟执行该点击操作指令。此处的相对位置信息具体应用于业务界面中组件的图像在操作过程中不可变的情况下,即当业务界面缩小时,界面上的按钮等不随之缩小的情况。相对位置信息为相对于业务界面而言,即业务界面中图像相对于该业务界面而言的位置信息,具体为可以明确指明该位置的一组坐标数据。When the operation instruction is a click operation instruction,
当操作指令为输入操作指令时,步骤204可以具体为:业务引擎将所述业务脚本中输入操作指令对应的输入位置的截图与所述子业务对应的图像进行匹配和定位处理,并根据定位处理获取的选定位置在子业务对应的页面上模拟执行所述输入操作指令;或业务引擎根据所述业务脚本中输入操作指令对应的输入位置的位置信息在所述子业务对应的页面上模拟执行所述输入操作指令。当业务脚本中记录的输入操作指令对应的输入位置的信息为输入位置的截图信息时,本步骤为业务引擎将业务脚本中输入操作指令对应的输入位置的截图与所述子业务对应的图像进行匹配和定位处理,通过对两张图片的匹配和定位操作,来获取执行该输入操作指令的选定位置,然后激活该业务使其能够接受键盘的操作,并根据获取的选定位置在子业务对应的页面上模拟执行该输入操作指令,将默认输入值模拟输入到选定位置中。当输入位置的信息为输入位置的相对位置信息时,本步骤为业务引擎根据业务脚本中输入操作指令对应的输入位置的相对位置信息,来获取执行该输入操作指令的选定位置,然后激活该业务使其能够接受键盘的操作,并根据获取的选定位置在子业务对应的页面上模拟输入默认输入值。When the operation instruction is an input operation instruction,
当操作指令为区域选择操作指令时,步骤204可以具体为:业务引擎将所述业务脚本中区域选择操作指令对应的区域选择位置的边框图片与所述子业务对应的图像进行匹配和定位处理,并根据定位处理获取的选定区域从子业务对应的页面中获取该选定区域的图像或页面内容;或业务引擎根据所述业务脚本中区域选择操作指令对应的区域选择位置的位置信息从所述子业务对应的页面中获取选定区域的图像或页面内容。当业务脚本中记录的区域选择操作指令对应的区域选择位置的信息为区域选择位置的边框图片信息时,本步骤为业务引擎将区域选择位置的边框图片与之前获取的子业务对应的图像进行匹配和定位处理,来获取执行该区域选择操作指令的选定区域,根据该选定区域来获取对应的选定内容的图像信息或网页信息。当业务脚本中记录的区域选择操作指令对应的区域选择位置的信息为区域选择位置的相对位置信息时,此处的相对位置信息为可以明确指明该选定区域的一组坐标数据,本步骤为业务引擎直接根据该区域选择位置的相对位置信息从业务对应的页面中获取对应的选定内容的图像信息或网页信息。当业务脚本中记录的区域选择操作指令对应的区域选择位置的信息为空时,此时默认选定子业务的整个页面内容。When the operation instruction is an area selection operation instruction,
当操作指令为等待操作指令时,步骤204可以具体为业务引擎执行等待操作,直到获取特定的业务响应消息为止,该业务响应消息可为特定的图片信息;或业务引擎执行等待操作,直到接收到来自所述客户端的业务请求消息为止;或业务引擎执行等待操作,直到达到所述等待时间信息指示的时间为止。当业务脚本中记录的等待操作指令对应的信息为特定返回图片时,本步骤为业务引擎执行等待操作,直到获取到特定返回图片为止,即直到接收到的子业务的响应页面对应的图像中包括该特定返回图片时,业务引擎触发执行业务脚本中的后续操作指令。当业务脚本中记录的等待操作指令对应的信息为客户端的业务请求消息时,本步骤为业务引擎模拟执行等待操作,直到接收到来自客户端的业务请求消息时,业务引擎触发执行业务脚本中的后续操作指令。当业务脚本中记录的等待操作指令对应的信息为等待时间信息时,本步骤为业务引擎模拟执行等待操作,直到达到等待时间信息指示的时间为止,即直到等待时间过期时,业务引擎触发执行业务脚本中的后续操作指令。When the operation instruction is a waiting operation instruction,
当操作指令为展示操作指令时,步骤204可以具体为业务引擎判断业务脚本中所述结果展示操作指令之前的区域选择操作指令对应的选定区域的内容是图像信息还是网页信息。如果区域选择操作指令对应的选定区域的内容为图像信息,则模拟执行结果展示操作指令,将图像信息对应的内容显示到客户端;如果区域选择操作指令对应的选定区域的内容为网页信息,则模拟执行结果展示操作指令,将网页信息对应的内容显示到客户端。在将页面内容显示到客户端之前,引擎需要将页面中的后继地址改为引擎地址,使得后继业务请求都经过引擎处理。在本实施例中,业务引擎可以采用流媒体技术将执行结果传递到客户端,此时需要客户端能够支持接收流媒体,并能实时播放接收到的流媒体。When the operation instruction is a display operation instruction,
步骤205,客户端在组合业务生成的图像或页面上执行用户操作。
在完成本实施例中的上述步骤之后,即实现了对组合业务的创建和业务脚本的执行过程,本实施例提供的业务处理方法还可以进一步包括业务使用客户端与业务的交互过程,即业务使用者通过业务使用客户端对组合业务的使用过程。具体地,本步骤中业务引擎生成的执行结果可以为页面内容,也可以为图像信息,例如可以是整个网页,也可以是网页中的部分图像。After completing the above steps in this embodiment, the creation of combined services and the execution of service scripts are realized. The service processing method provided in this embodiment may further include the interaction process between the service client and the service, that is, the service The user uses the client to use the composite service through the service. Specifically, the execution result generated by the service engine in this step may be page content or image information, for example, it may be the entire web page or part of an image in the web page.
当上述获取的执行结果为页面内容时,本实施例还可以进一步包括如下步骤:首先,业务引擎直接获取或通过客户端获取由用户操作触发的业务请求消息,将所述业务请求消息转发到子业务服务器。由于本实施例中的业务引擎可以与客户端独立设置,也可以与客户端设置为一体,直接充当客户端的角色。因此,当业务引擎与客户端独立设置时,用户通过客户端对组合业务的应用界面进行相应的用户操作,客户端在接收到该用户操作后,触发生成对应的业务请求消息,并将该业务请求消息发送到业务引擎。业务引擎通过客户端来获取由用户操作触发的该业务请求消息,业务引擎再将该业务请求消息转发到子业务服务器上。其次,业务引擎从所述子业务服务器获取所述子业务对应的响应页面并将响应页面显示在客户端。子业务服务器根据接收到的业务请求消息生成子业务对应的响应页面,并将该响应页面返回到业务引擎上,即业务引擎从子业务服务器上获取子业务对应的响应页面,并经处理后发送到客户端进行显示,该处理包括将后继地址修改为引擎地址。When the execution result obtained above is the page content, this embodiment may further include the following steps: first, the service engine obtains directly or through the client the service request message triggered by the user operation, and forwards the service request message to the child business server. Since the service engine in this embodiment can be set independently from the client, or can be set as one with the client, it can directly play the role of the client. Therefore, when the service engine and the client are set independently, the user performs corresponding user operations on the application interface of the combined service through the client. After receiving the user operation, the client triggers the generation of a corresponding service request The request message is sent to the business engine. The service engine obtains the service request message triggered by the user operation through the client, and the service engine forwards the service request message to the sub-service server. Secondly, the service engine acquires the response page corresponding to the sub-service from the sub-service server and displays the response page on the client. The sub-service server generates the response page corresponding to the sub-service according to the received service request message, and returns the response page to the service engine, that is, the service engine obtains the response page corresponding to the sub-service from the sub-service server, and sends it after processing To the client for display, this process includes modifying the subsequent address to the engine address.
当上述获取的执行结果为图像信息时,本实施例还可以进一步包括如下步骤:首先,业务引擎直接获取或通过所述客户端获取用户操作和所述用户操作对应的操作位置的图像信息。当执行业务脚本后生成的执行结果为图像信息,用户基于该图像进行操作时,业务引擎直接获取或通过客户端获取用户操作以及该用户操作对应的操作位置的位置信息,即将用户操作和用户操作对应的操作位置的图像信息携带在同步命令中同步到业务引擎。需要指出的是,此处的操作位置的位置信息可以为操作位置的截图信息或操作位置的相对位置信息。其次,业务引擎根据所述图像信息在所述子业务的对应位置模拟所述用户操作,并获取所述子业务响应对应的图像。业务引擎在接收到客户端发送的同步命令后,根据操作位置的截图信息或相对位置信息在对应位置模拟该用户操作,以进行相应的业务访问。业务引擎将模拟用户操作后从子业务服务器获取的响应页面的特定区域的图像返回到客户端进行显示。When the execution result obtained above is image information, this embodiment may further include the following steps: first, the service engine acquires the user operation and the image information of the operation position corresponding to the user operation directly or through the client. When the execution result generated after executing the business script is image information, when the user operates based on the image, the service engine directly or through the client obtains the user operation and the position information of the operation position corresponding to the user operation, that is, the user operation and the user operation The image information of the corresponding operating position is carried in the synchronization command and synchronized to the service engine. It should be noted that the position information of the operating position here may be screenshot information of the operating position or relative position information of the operating position. Secondly, the service engine simulates the user operation at a corresponding position of the sub-service according to the image information, and obtains an image corresponding to the sub-service response. After receiving the synchronization command sent by the client, the service engine simulates the user operation at the corresponding location according to the screenshot information or relative location information of the operation location, so as to perform corresponding service access. The service engine returns the image of a specific area of the response page obtained from the sub-service server after simulating the user operation to the client for display.
进一步地,在本实施例中,当执行上述用户对子业务的应用界面的操作后,操作后的子业务对应的图像发生变化时,业务引擎还将变化后的图像也更新到客户端。其中,当子业务对应的是整个页面的图像时,业务引擎将变化后的整个页面图像更新到客户端。当子业务对应的是页面的部分图像时,业务引擎通过子业务对应的区域选择操作指令进行图像的匹配和定位处理,来获取变化后的部分图像,将变化后的部分图像更新到客户端。Further, in this embodiment, when the image corresponding to the operated sub-service changes after the user performs the operation on the application interface of the sub-service, the service engine also updates the changed image to the client. Wherein, when the sub-service corresponds to the image of the entire page, the service engine updates the changed image of the entire page to the client. When the sub-service corresponds to a part of the image on the page, the service engine performs image matching and positioning processing through the region selection operation command corresponding to the sub-service to obtain the changed part of the image, and updates the changed part of the image to the client.
更进一步地,在本实施例中,当组合业务由多个子业务对应的组件组成时,假设包括第一组件和第二组件,第一组件和第二组件之间存在相互之间的关联关系,假设第二组件的输入依赖于第一组件的输出的情况。此时,本实施例还可以包括如下步骤:业务引擎从第一组件中获取对应于第二组件的通知信息,并根据所述通知信息执行所述第二组件对应的业务,即由第一组件的执行结果来触发第二组件的执行。Furthermore, in this embodiment, when the combined service is composed of components corresponding to multiple sub-services, it is assumed that the first component and the second component are included, and there is a relationship between the first component and the second component, Assume the case where the input of the second component depends on the output of the first component. At this point, this embodiment may also include the following steps: the service engine obtains notification information corresponding to the second component from the first component, and executes the service corresponding to the second component according to the notification information, that is, the first component The execution result to trigger the execution of the second component.
本实施例提供了一种业务处理方法,通过业务引擎获取业务脚本并执行,根据业务脚本中各操作指令对应的子业务的图像信息在对应位置模拟执行各操作指令,将获取的执行结果显示在客户端,本实施例将图像引入业务创建过程中,使得业务创建者可以通过获取的图像信息来进行编程,解决了现有技术中对业务创建者的编程要求高的缺陷,使得业务创建者可通过截图来进行编程,降低了业务开发的难度。This embodiment provides a business processing method. The business script is obtained and executed by the business engine, and each operation command is simulated and executed at the corresponding position according to the image information of the sub-service corresponding to each operation command in the business script, and the obtained execution result is displayed on the Client, this embodiment introduces images into the service creation process, so that the service creator can program through the acquired image information, which solves the defect of high programming requirements for the service creator in the prior art, so that the service creator can Programming through screenshots reduces the difficulty of business development.
图3为本发明业务处理方法实施例三的流程图,如图3所示,本实施例提供了一种具体的业务处理方法,以下将以一个具体的实施例来说明本发明的业务处理方法,本实施例中使用两个组件,其中一个组件为手机号码归属地查询组件,另一个为天气查询组件。其中,手机号码归属地查询组件为根据手机号码查询对应的归属地,返回的是原网页信息,不需要截取其中图像作为结果,假定该组件的ID为comp1。另外一个天气查询组件为根据地址查天气情况,其需要提取其中天气预报页面中的部分图像作为结果,假定该组件的ID为comp2。当查到手机号码的归属地信息后,其天气信息随之变化。具体地,本实施例可以具体包括如下步骤:Fig. 3 is a flow chart of the third embodiment of the business processing method of the present invention. As shown in Fig. 3, this embodiment provides a specific business processing method, and a specific embodiment will be used to illustrate the business processing method of the present invention below , two components are used in this embodiment, one of which is a mobile phone number attribution query component, and the other is a weather query component. Among them, the mobile phone number attribution query component is to query the corresponding attribution according to the mobile phone number, and returns the original webpage information, and does not need to intercept the image as the result, assuming that the ID of the component is comp1. Another weather query component is to check the weather conditions according to the address, which needs to extract some images in the weather forecast page as the result, assuming that the ID of this component is comp2. When the attribution information of the mobile phone number is found, its weather information changes accordingly. Specifically, this embodiment may specifically include the following steps:
步骤301,由创建工具创建手机号码归属地查询组件。In
在本实施例中,假设手机号码归属地查询组件被配置为图像不可变,即组件中的各个图像大小不会变化,所以此处的各操作指令对应的图像信息采用相对位置信息的方式。假设本实施例中创建的手机号码归属地查询组件的业务脚本示例如下:In this embodiment, it is assumed that the mobile phone number attribution query component is configured with immutable images, that is, the size of each image in the component will not change, so the image information corresponding to each operation instruction here adopts the form of relative position information. Assume that the business script example of the mobile phone number attribution query component created in this embodiment is as follows:
Open(http://www.ip138.com:8080/search.asp?action=mobile);该业务脚本对应于打开操作指令,即在业务脚本中记录打开操作指令为“Open”操作,该“Open”操作对应的子业务的业务地址为“http://www.ip138.com:8080/search.asp?action=mobile”。Open(http://www.ip138.com:8080/search.asp?action=mobile); This business script is corresponding to opening operation instruction, promptly records opening operation instruction as " Open " operation in business script, and this " Open The service address of the sub-service corresponding to the "operation is "http://www.ip138.com:8080/search.asp?action=mobile".
Input(“13425152294”,“10,20”);该业务脚本对应于输入操作指令,即在业务脚本中记录输入操作指令为“Input”操作,“Input”操作对应的输入区域的位置信息为业务界面的相对位置坐标“10,20”,默认输入值为“13425152294”。即表示在该组件的业务界面的相对位置坐标为“10,20”处输入默认输入值“13425152294”。Input("13425152294", "10, 20"); The business script corresponds to the input operation instruction, that is, the input operation instruction is recorded in the business script as the "Input" operation, and the location information of the input area corresponding to the "Input" operation is the business The relative position coordinates of the interface are "10, 20", and the default input value is "13425152294". That is, it means that the default input value "13425152294" is input at the position where the relative position coordinates of the business interface of the component are "10, 20".
Click(“10,70”);该业务脚本对应于点击操作指令,即在业务脚本中记录点击操作指令为“Click”操作,“Click”操作对应的点击位置的位置信息为业务界面的相对位置坐标为“10,70”。即表示该组件的业务界面的相对位置坐标“10,70”处执行点击操作。Click("10, 70"); the business script corresponds to the click operation command, that is, the click operation command is recorded in the business script as a "Click" operation, and the position information of the click position corresponding to the "Click" operation is the relative position of the business interface The coordinates are "10, 70". That is to say, the click operation is performed at the relative position coordinates "10, 70" of the business interface of the component.
Wait(“2s”);该业务脚本对应于等待操作指令,即在业务脚本中记录等待操作指令为“Wait”操作,“Wait”操作对应的信息为等待时间信息,该等待时间信息为2秒,即表示执行等待2秒的操作。Wait("2s"); the business script corresponds to the waiting operation instruction, that is, the waiting operation instruction is recorded in the business script as a "Wait" operation, and the information corresponding to the "Wait" operation is the waiting time information, and the waiting time information is 2 seconds , which means to execute the operation of waiting for 2 seconds.
Select();该业务脚本对应于区域选择操作指令,即在业务脚本中记录区域选择操作指令为“Select”操作,“Select”操作对应的区域选择位置为选择整个数据页面,而不是图像。需要指出的是,如果此处需要仅显示部分图像,则可在业务脚本中记录为:Select(“10,20”,“10,80”,“70,20”,“70,80”),表示选择由该四个相对坐标而确定的图像区域。Select(); this business script corresponds to the area selection operation instruction, that is, the area selection operation instruction is recorded in the business script as the "Select" operation, and the area selection position corresponding to the "Select" operation is to select the entire data page instead of an image. It should be pointed out that if only part of the image needs to be displayed here, it can be recorded in the business script as: Select("10, 20", "10, 80", "70, 20", "70, 80"), Indicates that the image area determined by the four relative coordinates is selected.
Print();该业务脚本对应于结果展示操作指令,即在业务脚本中记录结果展示操作指令为“Print”操作,即表示将选择的部分图像在客户端进行显示。Print(); the business script corresponds to the result display operation instruction, that is, the result display operation instruction is recorded in the business script as a "Print" operation, which means that the selected part of the image will be displayed on the client.
Info(comp2);该业务脚本表示通知组件comp2该组件的执行已结束。Info(comp2); the business script means to notify the component comp2 that the execution of the component has ended.
步骤302,由创建工具创建天气查询组件。In
假设本实施例中的天气查询组件中的图像可变,即该组件中的各个图像大小会发生变化,因此此处的图像信息为截图信息,以图像作为其业务脚本的元素,本实施例中的业务脚本由操作指令以及操作指令对应的图像组成。假设本实施例中创建的天气查询组件的业务脚本示例如下:Assume that the image in the weather query component in this embodiment is variable, that is, the size of each image in the component will change, so the image information here is screenshot information, and the image is used as an element of its business script. In this embodiment The business script of is composed of operation instructions and images corresponding to the operation instructions. Assume that the business script example of the weather query component created in this embodiment is as follows:
Receive(comp1);由于本实施例中的天气查询组件的执行依赖于上述手机号码归属地查询组件,在上述手机号码归属地查询组件的业务脚本执行完毕后,向该天气查询组件发送通知消息,此业务脚本为天气查询组件接收到手机号码归属地查询组件发送的通知消息,以触发该天气查询组件的业务脚本的执行。Receive (comp1); Since the execution of the weather query component in the present embodiment depends on the above-mentioned mobile phone number attribution query component, after the business script of the above-mentioned mobile phone number attribution query component has been executed, send a notification message to the weather query component, This business script is that the weather query component receives the notification message sent by the mobile phone number attribution query component, so as to trigger the execution of the business script of the weather query component.
Open(“http://www.baidu.com”);该业务脚本对应于打开操作指令,即在业务脚本中记录打开操作指令为“Open”操作,该“Open”操作对应的子业务的业务地址为“http://www.baidu.com”。Open("http://www.baidu.com"); The business script corresponds to the opening operation instruction, that is, the opening operation instruction is recorded in the business script as the "Open" operation, and the corresponding sub-service business of the "Open" operation The address is "http://www.baidu.com".
Input(comp1..right.toString()+“天气预报”,);该业务脚本对应于输入操作指令,即在业务脚本中记录输入操作指令为“Input”操作,“Input”操作对应的输入区域的位置信息为输入区域的截图信息,默认输入值为手机号码归属地查询组件的输出信息。表示将手机号码归属地查询组件中图像的右侧的图片进行文字识别,将识别出来的文字和“天气预报”这个词组成新的字符串作为该组件的输入内容。Input(comp1. .right.toString() + "weather forecast", ); the business script corresponds to the input operation command, that is, the input operation command is recorded in the business script as the "Input" operation, the location information of the input area corresponding to the "Input" operation is the screenshot information of the input area, and the default input value is the mobile phone number Attributively query the output information of the component. Indicates that text recognition is performed on the picture on the right side of the image in the mobile phone number attribution query component, and a new character string is formed from the recognized text and the word "weather forecast" as the input content of the component.
Click该业务脚本对应于点击操作指令,即在业务脚本中记录点击操作指令为“Click”操作,“Click”操作对应的点击位置的位置信息为点击位置的截图信息。Click The business script corresponds to the click operation instruction, that is, the click operation instruction is recorded in the business script as a "Click" operation, and the position information of the click position corresponding to the "Click" operation is the screenshot information of the click position.
Wait(把百度设为主页百度一下,找到相关网页约);该业务脚本对应于等待操作指令,即在业务脚本中记录等待操作指令为“Wait”操作,“Wait”操作对应的信息为特定返回图片。Wait (set Baidu as the home page Baidu, find the relevant web page about); the business script corresponds to the waiting operation instruction, that is, the waiting operation instruction is recorded in the business script as "Wait" operation, and the information corresponding to the "Wait" operation is a specific return picture.
Select(Select(
);该业务脚本对应于区域选择操作指令,即在业务脚本中记录区域选择操作指令为“Select”操作,“Select”操作对应的区域选择位置为上述边框图片。 ); the business script corresponds to the area selection operation instruction, that is, the area selection operation instruction is recorded in the business script as the "Select" operation, and the area selection position corresponding to the "Select" operation is the above-mentioned frame picture.
Print();该业务脚本对应于结果展示操作指令,即在业务脚本中记录结果展示操作指令为“Print”操作,即表示将选择的部分图像在客户端进行显示。Print(); the business script corresponds to the result display operation instruction, that is, the result display operation instruction is recorded in the business script as a "Print" operation, which means that the selected part of the image will be displayed on the client.
步骤303,业务引擎执行手机号码归属地查询组件的业务脚本。Step 303, the service engine executes the service script of the mobile phone number attribution inquiry component.
本步骤为业务引擎根据上述步骤记录的业务脚本执行各操作指令,具体的执行过程大致如下所示:In this step, the business engine executes various operation instructions according to the business script recorded in the above steps. The specific execution process is roughly as follows:
1、用户通过一个业务地址访问该组合业务,该业务地址例如“http://www.engine.com:8080/locationBasedWeather”。1. The user accesses the combined service through a service address, such as "http://www.engine.com:8080/locationBasedWeather ".
2、业务引擎通过该业务地址确定该组合业务,并执行其中一个组件的业务脚本,此处是手机号码归属地查询组件。2. The service engine determines the combined service through the service address, and executes the service script of one of the components, here is the mobile phone number attribution query component.
3、业务引擎执行open指令,调用浏览器访问上述记录的url,并获取返回的数据信息。3. The business engine executes the open command, calls the browser to access the url recorded above, and obtains the returned data information.
4、业务引擎执行input指令,根据input指令的相对位置定位,并执行模拟键盘输入操作,输入默认输入值13425152294。4. The service engine executes the input command, locates according to the relative position of the input command, and performs a simulated keyboard input operation, and enters the default input value 13425152294.
5、业务引擎执行click指令,根据click指令的相对位置定位,激活这个归属地查询业务,在该业务中模拟鼠标点击操作。5. The service engine executes the click command, activates the attribution query service according to the relative position of the click command, and simulates the mouse click operation in this service.
6、业务引擎执行wait操作,等待2秒。6. The service engine executes the wait operation and waits for 2 seconds.
7、业务引擎执行select操作,没任何参数表示选择数据页面,而不是图像。7. The business engine executes the select operation, and there is no parameter indicating that the data page is selected instead of the image.
8、业务引擎执行print操作,结合布局模板,将返回的网页显示到客户端的特定位置。8. The business engine executes the print operation, combined with the layout template, and displays the returned web page at a specific location on the client.
业务引擎通过上述步骤便完成手机号码归属地查询组件的业务脚本的执行,执行完后的组件将显示上述url页面查询后的web页面。The service engine completes the execution of the service script of the mobile phone number attribution query component through the above steps, and the component after execution will display the web page after the above url page query.
步骤304,业务引擎执行天气查询组件的业务脚本。
本步骤为业务引擎根据上述步骤302记录的业务脚本模拟执行各操作指令,具体的执行过程大致如下所示:In this step, the business engine simulates and executes various operation instructions according to the business script recorded in
1、业务引擎等待手机号码归属地查询组件的通知消息,当接收到该通知消息后,启动执行该组件的业务脚本。1. The service engine waits for the notification message from the mobile phone number attribution query component, and starts to execute the service script of the component after receiving the notification message.
2、业务引擎执行open指令,调用浏览器访问baidu首页,并获得baidu首页对应的图像。2. The business engine executes the open command, invokes the browser to access the Baidu homepage, and obtains the image corresponding to the Baidu homepage.
3、业务引擎执行input指令,根据input指令的图像,在获取的baidu首页的图像中进行匹配并定位。另外,由于此处需要用到手机号码归属地查询组件的图像作为一个输入,所以此处要从手机号码归属地查询组件中获取图像并进行文字识别,并将识别出的文字同“天气预报”组合在一起作为输入。激活天气预报查询业务,在该业务中的指定位置执行鼠标输入操作。3. The business engine executes the input command, and performs matching and positioning in the acquired image of the Baidu home page according to the image of the input command. In addition, since the image of the mobile phone number attribution query component needs to be used as an input here, it is necessary to obtain the image from the mobile phone number attribution query component and perform text recognition, and the recognized text is the same as "weather forecast". grouped together as input. Activate the weather forecast query service, and perform the mouse input operation at the specified position in the service.
4、业务引擎执行click指令,根据click指令的图像,在刚获取的baidu首页的图像中进行匹配并定位,同时激活天气预报查询业务并在该业务中模拟鼠标点击操作。4. The business engine executes the click command. According to the image of the click command, it matches and locates in the newly acquired image of the Baidu homepage, and at the same time activates the weather forecast query service and simulates the mouse click operation in this service.
5、业务引擎执行wait操作,直到响应页面对应的图像中带有指定图像。5. The service engine executes the wait operation until the image corresponding to the response page contains the specified image.
6、业务引擎执行select操作,根据select指令的图像,以该框作为匹配对象,在返回页面的图像中进行匹配并定位,同时截取该图像框内的内容作为返回值。6. The business engine executes the select operation, uses the frame as the matching object according to the image of the select command, performs matching and positioning in the image on the returned page, and intercepts the content in the image frame as the return value.
7、业务引擎执行print操作,结合布局模板,将截取的图像显示到客户端的特定位置。7. The business engine executes the print operation, combined with the layout template, and displays the captured image to a specific location on the client.
在执行上述步骤303记录的该业务脚本后,业务引擎最终获取到的组合业务的内容为图像信息,如图4为本发明业务处理方法实施例三中的图像信息的示例图。After executing the service script recorded in the above step 303, the content of the combined service finally acquired by the service engine is image information, as shown in FIG. 4 , which is an example diagram of image information in Embodiment 3 of the service processing method of the present invention.
步骤305,客户端在组合业务生成的图像上执行用户操作。Step 305, the client performs user operations on the image generated by the combined service.
假设客户端对组合业务生成的上述图像中的“今日气象指数”进行点击操作,假设布局模板中该组件对应的图像属性为可变,则客户端将截取“今日气象指数”相关的图像,并将该图像以及点击操作指令携带在同步命令中发送到业务引擎,即Click(今日气象指数)。如果布局模板中该组件对应的图像属性为不可变,则客户端获得“今日气象指数”对应的相对位置,并将该相对位置以及点击操作指令携带在同步命令中发送到业务引擎。业务引擎在接收到同步命令后,根据点击操作指令所提供的图像与业务对应的图像进行匹配和定位处理,同时激活天气查询组件,并在该组件对应的应用界面中模拟鼠标点击操作,进行该业务的访问。如果该操作访问气象局提供的一个链接,并提供弹出页面显示气象指数。业务引擎接收来自气象局的气象指数,并获得响应业务的图像。此时,由于业务的图像内容发生变化,引擎将获取所需的部分图像更新到客户端。经该操作之后,客户端就能看到对应的气象指数。Assuming that the client clicks on the "today's weather index" in the above image generated by the combination service, and assuming that the image attribute corresponding to the component in the layout template is variable, the client will intercept the image related to "today's weather index", and The image and the click operation instruction are carried in a synchronous command and sent to the service engine, that is, Click (today's weather index ). If the image attribute corresponding to the component in the layout template is immutable, the client obtains the relative position corresponding to "today's weather index", and sends the relative position and the click operation instruction to the business engine in a synchronization command. After receiving the synchronization command, the service engine performs matching and positioning processing on the image provided by the click operation instruction and the image corresponding to the service, activates the weather query component at the same time, and simulates the mouse click operation in the application interface corresponding to the component to perform the operation. business visit. If the operation visits a link provided by the Bureau of Meteorology, a pop-up page is provided to display the weather index. The business engine receives the weather index from the meteorological bureau and obtains images corresponding to the business. At this time, due to changes in the image content of the business, the engine will obtain the required part of the image and update it to the client. After this operation, the client can see the corresponding weather index.
本领域普通技术人员可以理解:实现上述方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成,前述的程序可以存储于一计算机可读取存储介质中,该程序在执行时,执行包括上述方法实施例的步骤;而前述的存储介质包括:ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。Those of ordinary skill in the art can understand that all or part of the steps for realizing the above-mentioned method embodiments can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the It includes the steps of the above method embodiments; and the aforementioned storage medium includes: ROM, RAM, magnetic disk or optical disk and other various media that can store program codes.
图5为本发明业务引擎实施例一的结构示意图,如图5所示,本实施例提供了一种业务引擎,具体可以包括脚本获取模块501、脚本执行模块502和结果显示模块503。其中,脚本获取模块501用于获取业务脚本,所述业务脚本包括操作指令和所述操作指令对应的子业务的图像信息。脚本执行模块502用于执行所述业务脚本,在所述子业务的图像信息所指示的位置模拟执行所述操作指令。结果显示模块503用于将执行结果在客户端进行显示。FIG. 5 is a schematic structural diagram of Embodiment 1 of the service engine of the present invention. As shown in FIG. 5 , this embodiment provides a service engine, which may specifically include a
图6为本发明业务引擎实施例二的结构示意图,如图6所示,本实施例提供了一种业务引擎,本实施例在上述图5所示的实施例的基础之上。FIG. 6 is a schematic structural diagram of the second embodiment of the service engine of the present invention. As shown in FIG. 6 , this embodiment provides a service engine, and this embodiment is based on the above embodiment shown in FIG. 5 .
进一步地,脚本执行模块502可以具体包括第一执行单元512、第二执行单元522、第三执行单元532、第四执行单元542、第五执行单元552和第六执行单元562。其中,第一执行单元512用于当操作指令为打开操作指令时,根据业务脚本中子业务的业务地址调用特定客户端访问子业务,并获取所述子业务的响应页面,将所述响应页面映射为所述子业务对应的图像。第二执行单元522用于当操作指令为点击操作指令时,将所述业务脚本中点击操作指令对应的点击位置的截图与所述子业务对应的图像进行匹配和定位处理,并根据定位处理获取的选定位置在所述子业务对应的页面上模拟执行所述点击操作指令;或根据所述业务脚本中点击操作指令对应的点击位置的位置信息在所述子业务对应的页面上模拟执行所述点击操作指令。第三执行单元532用于当操作指令为输入操作指令时,将所述业务脚本中输入操作指令对应的输入位置的截图与所述子业务对应的图像进行匹配和定位处理,并根据定位处理获取的选定位置在所述的子业务对应的页面上模拟执行所述输入操作指令;或根据所述业务脚本中输入操作指令对应的输入位置的位置信息在所述子业务对应的页面上模拟执行所述输入操作指令。第四执行单元542用于当操作指令为区域选择操作指令时,将所述业务脚本中区域选择操作指令对应的边框图片与所述子业务对应的图像进行匹配和定位处理,并根据定位处理获取的选定区域从所述子业务对应的页面中获取所述选定区域的图像信息或网页信息;或根据所述业务脚本中区域选择操作指令对应的位置信息从所述子业务对应的页面中获取选定区域的图像信息或网页信息。第五执行单元552用于当操作指令为等待操作指令时,执行等待操作,直到接收到业务响应消息,所述业务相应消息可为特定返回图片;或执行等待操作,直到接收到来自所述客户端的业务请求消息;或执行等待操作,直到达到所述等待时间信息指示的时间。第六执行单元562用于当操作指令为结果展示操作指令,所述区域选择操作指令对应的定区域的内容为图像信息时,模拟执行所述结果展示操作指令,并将所述图像信息对应的内容在客户端进行显示;或用于当操作指令为结果展示操作指令,且所述区域选择操作指令对应的选定区域的内容为网页信息时,模拟执行所述结果展示操作指令,并将所述页面信息对应内容在客户端进行显示。Further, the
更进一步地,当所述执行结果为页面内容时,本实施例提供的业务引擎还可以包括请求获取模块504和页面获取模块505。其中,请求获取模块504用于直接获取或通过所述客户端获取由用户操作触发的业务请求消息,将所述业务请求消息转发到子业务服务器。页面获取模块505用于从所述子业务服务器获取所述子业务对应的响应页面,并将所述响应页面显示在所述客户端。Furthermore, when the execution result is page content, the service engine provided by this embodiment may further include a
或者,当所述执行结果为图像信息时,本实施例提供的业务引擎还可以包括操作同步模块506和操作模拟模块507。其中,操作同步模块506用于直接获取或通过所述客户端获取用户操作和所述用户操作对应的操作位置的位置信息。操作模拟模块507用于根据所述位置信息在所述子业务页面的对应位置模拟所述用户操作,并获取所述子业务响应页面对应的图像。Alternatively, when the execution result is image information, the service engine provided in this embodiment may further include an
本发明实施例的业务引擎的相关模块在执行本发明的方法实施例的具体过程可以参考方法的相关描述,在此不再赘述。For the specific process of executing the method embodiment of the present invention by the relevant modules of the service engine of the embodiment of the present invention, reference may be made to the relevant description of the method, which will not be repeated here.
本实施例提供了一种业务引擎,通过获取业务脚本并执行,根据业务脚本中各操作指令对应的子业务的图像信息在指示的位置模拟执行各操作指令,将获取的执行结果显示在客户端,本实施例将图像引入业务创建过程中,使得业务创建者可以通过获取的图像信息来进行编程,解决了现有技术中对业务创建者的编程要求高的缺陷,使得业务创建者可通过截图来进行编程,降低了业务开发的难度。This embodiment provides a service engine, by obtaining and executing a service script, simulating and executing each operation instruction at the indicated position according to the image information of the sub-service corresponding to each operation instruction in the service script, and displaying the obtained execution result on the client , this embodiment introduces images into the business creation process, so that the business creator can program through the acquired image information, which solves the defect of high programming requirements for the business creator in the prior art, so that the business creator can use the screenshot To program, reducing the difficulty of business development.
本实施例还提供了一种业务处理系统,可以包括客户端和上述图5或图6所示的业务引擎。This embodiment also provides a service processing system, which may include a client and the service engine shown in FIG. 5 or FIG. 6 above.
最后应说明的是:以上实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的精神和范围。Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: it can still be Modifications are made to the technical solutions described in the foregoing embodiments, or equivalent replacements are made to some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the various embodiments of the present invention.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN 201010261208CN102142004B (en) | 2010-08-20 | 2010-08-20 | Service processing method and service engine |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN 201010261208CN102142004B (en) | 2010-08-20 | 2010-08-20 | Service processing method and service engine |
| Publication Number | Publication Date |
|---|---|
| CN102142004A CN102142004A (en) | 2011-08-03 |
| CN102142004Btrue CN102142004B (en) | 2013-03-20 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN 201010261208Expired - Fee RelatedCN102142004B (en) | 2010-08-20 | 2010-08-20 | Service processing method and service engine |
| Country | Link |
|---|---|
| CN (1) | CN102142004B (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN110020307B (en)* | 2017-11-30 | 2023-06-13 | 阿里巴巴集团控股有限公司 | Drawing method and device for client end view |
| CN111143736B (en)* | 2018-11-06 | 2024-02-06 | 广东万丈金数信息技术股份有限公司 | Data transmission method, device, main page server and storage medium |
| CN111273798B (en)* | 2020-01-16 | 2024-02-06 | 钮永豪 | Method and system for executing macro instruction of mouse, and method and device for executing macro instruction |
| CN113487294B (en)* | 2021-07-23 | 2023-06-09 | 重庆富民银行股份有限公司 | On-line business noninductive verification method based on list mechanism |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101126980A (en)* | 2006-08-15 | 2008-02-20 | 国际商业机器公司 | Apparatus, system, and method for rendering multiple segment hypertext script |
| CN101587438A (en)* | 2009-06-18 | 2009-11-25 | 南京联创科技股份有限公司 | Graphic process template method for drafting under the ARP framework |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101126980A (en)* | 2006-08-15 | 2008-02-20 | 国际商业机器公司 | Apparatus, system, and method for rendering multiple segment hypertext script |
| CN101587438A (en)* | 2009-06-18 | 2009-11-25 | 南京联创科技股份有限公司 | Graphic process template method for drafting under the ARP framework |
| Title |
|---|
| Tom Yeh,Tsung-Hsiang Chang ,Robert C.Miller.Sikuli:using GUI Screenshots for Search and Automation.《UIST’09 Proceedings of the 22nd annual ACM symposium on User interface software and technology》.2009,第183-192页. |
| Tom Yeh,Tsung-Hsiang Chang,Robert C.Miller.Sikuli:using GUI Screenshots for Search and Automation.《UIST’09 Proceedings of the 22nd annual ACM symposium on User interface software and technology》.2009,第183-192页.* |
| Publication number | Publication date |
|---|---|
| CN102142004A (en) | 2011-08-03 |
| Publication | Publication Date | Title |
|---|---|---|
| CN111611518B (en) | Automatic visual display page publishing method and system based on Html5 | |
| CN109863527B (en) | Method and system for server-side rendering of rendered local content | |
| CN105955888B (en) | A kind of page debugging preview method and system | |
| US10108715B2 (en) | Transformation and presentation of on-demand native application crawling results | |
| US9645977B2 (en) | Systems and methods for configuring a header and layout of a mobile version of a conventional website | |
| WO2016015432A1 (en) | Page construction method, apparatus, system and device, and nonvolatile computer storage medium | |
| JP5930497B2 (en) | Template file processing method and apparatus | |
| CN104216691A (en) | Application creating method and device | |
| CN101488151A (en) | System and method for gathering website contents | |
| CN111797340B (en) | A service encapsulation system for custom extraction process | |
| CN104572114A (en) | Binding device, application updating device and method and application | |
| JP2014524623A5 (en) | ||
| CN113779469B (en) | Website page modification method and device, electronic device, and storage medium | |
| WO2022048141A1 (en) | Image processing method and apparatus, and computer readable storage medium | |
| US20250013440A1 (en) | Front-end user interface design tool and human readable code generator | |
| CN104050190B (en) | Method and system for processing relation chain data and client | |
| CN102142004B (en) | Service processing method and service engine | |
| CN114168875B (en) | A method, device, computer equipment and storage medium for generating a page program | |
| CN117093386B (en) | Page screenshot method, device, computer equipment and storage medium | |
| CN118885173A (en) | Website rendering method based on JSON Schema data format | |
| RU2634221C2 (en) | Method and device for drawing presentation of electronic document on screen | |
| Koehl et al. | M. site: Efficient content adaptation for mobile devices | |
| US11983483B2 (en) | Web site preview generation with action control | |
| CN119234209A (en) | Page rendering method, device, equipment and storage medium | |
| CN106156253A (en) | Obtain and the partial content of shared webpage the method and apparatus that generates Web page bookmark |
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| C14 | Grant of patent or utility model | ||
| GR01 | Patent grant | ||
| CF01 | Termination of patent right due to non-payment of annual fee | Granted publication date:20130320 | |
| CF01 | Termination of patent right due to non-payment of annual fee |