CN112035193A - Application program interface generation method and device, storage medium and computer equipment - Google Patents

Application program interface generation method and device, storage medium and computer equipment Download PDF

Info

Publication number
CN112035193A
CN112035193A CN202010732584.7A CN202010732584A CN112035193A CN 112035193 A CN112035193 A CN 112035193A CN 202010732584 A CN202010732584 A CN 202010732584A CN 112035193 A CN112035193 A CN 112035193A
Authority
CN
China
Prior art keywords
target control
page
application program
browser
trigger event
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN202010732584.7A
Other languages
Chinese (zh)
Inventor
潘明
李烃林
田野
何世伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chengdu Anyixun Technology Co ltd
Original Assignee
Chengdu Anyixun Technology Co ltd
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 Chengdu Anyixun Technology Co ltd filed Critical Chengdu Anyixun Technology Co ltd
Priority to CN202010732584.7A priority Critical patent/CN112035193A/en
Publication of CN112035193A publication Critical patent/CN112035193A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces

Landscapes

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

Abstract

The invention discloses an interface generation method and device of an application program, a storage medium and computer equipment, relates to the technical field of information, and mainly aims to realize various rich visual effects by utilizing a browser and more conveniently increase or modify the control picture effect in an interface. The method comprises the following steps: capturing a trigger event based on a target control in an application program window; sending a page acquisition request of the target control to a browser according to the trigger event and identification information corresponding to the target control, wherein the browser is used for determining a page file corresponding to the target control according to the identification information, responding in the page file according to the trigger event, performing corresponding processing and generating a page corresponding to the target control; and receiving a page fed back by the browser, drawing a picture corresponding to the target control according to the page, pasting the picture into an application program window, and generating a display interface. The method and the device are suitable for generating the application program interface.

Description

Application program interface generation method and device, storage medium and computer equipment
Technical Field
The present invention relates to the field of information technologies, and in particular, to a method and an apparatus for generating an interface of an application program, a storage medium, and a computer device.
Background
Most of the interface libraries on the market comprise two types, namely a window interface library with a handle, such as an MFC interface library, and a window interface library without a handle, such as a DerectUI interface library.
At present, for a window interface library without handles, pictures corresponding to each control are usually drawn in advance, and when a user operates in a window, the drawn pictures are switched to be pasted in the window, and an interface is generated and displayed to the user. However, in this way of generating the interface, the drawing tool needs to be used to draw the pictures corresponding to the controls on the interface in advance, and the drawing of the drawing tool is difficult to achieve various rich visual effects.
Disclosure of Invention
The invention provides an interface generation method and device of an application program, a storage medium and computer equipment, which mainly aim to realize various rich visual effects by using a browser and facilitate the increase or modification of the control picture effect in an interface.
According to a first aspect of the present invention, there is provided a packet assembling method, including:
capturing a trigger event based on a target control in an application program window;
sending a page acquisition request of the target control to a browser according to the trigger event and identification information corresponding to the target control, wherein the browser is used for determining a page file corresponding to the target control according to the identification information, responding in the page file according to the trigger event, performing corresponding processing and generating a page corresponding to the target control;
and receiving a page fed back by the browser, drawing a picture corresponding to the target control according to the page, pasting the picture into an application program window, and generating a display interface.
According to a second aspect of the present invention, there is provided an interface generating method for an application program, including:
receiving a page acquisition request of a target control in an application program window, wherein the page acquisition request carries a trigger event and identification information corresponding to the target control;
determining a page file corresponding to the target control according to the identification information, responding in the page file according to the trigger event, performing corresponding processing, and generating a page corresponding to the target control;
and feeding back the page to an internal memory of an application program, so that an interface library of the application program draws a picture corresponding to the target control according to the page, and pastes the picture to an application program window to generate a display interface.
According to a third aspect of the present invention, there is provided an interface generating apparatus for an application, comprising:
the capturing unit is used for capturing a trigger event based on the target control in the application program window;
the processing unit is used for sending a page acquisition request of the target control to a browser according to the trigger event and the identification information corresponding to the target control, and the browser is used for determining a page file corresponding to the target control according to the identification information, responding in the page file according to the trigger event, performing corresponding processing and generating a page corresponding to the target control;
and the drawing unit is used for receiving the page fed back by the browser, drawing the picture corresponding to the target control according to the page, pasting the picture into an application program window and generating a display interface. According to a fourth aspect of the present invention, there is provided an interface generating apparatus for an application, comprising:
the device comprises a receiving unit, a processing unit and a processing unit, wherein the receiving unit is used for receiving a page acquisition request of a target control in an application program window, and the page acquisition request carries a trigger event and identification information corresponding to the target control;
the rendering unit is used for determining a page file corresponding to the target control according to the identification information, responding in the page file according to the trigger event, performing corresponding processing and generating a page corresponding to the target control;
and the feedback unit is used for feeding the page back to an internal memory of an application program, so that an interface library of the application program draws a picture corresponding to the target control according to the page, and pastes the picture to an application program window to generate a display interface.
According to a fifth aspect of the present invention, there is provided a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of:
capturing a trigger event based on a target control in an application program window;
sending a page acquisition request of the target control to a browser according to the trigger event and identification information corresponding to the target control, wherein the browser is used for determining a page file corresponding to the target control according to the identification information, responding in the page file according to the trigger event, performing corresponding processing and generating a page corresponding to the target control;
and receiving a page fed back by the browser, drawing a picture corresponding to the target control according to the page, pasting the picture into an application program window, and generating a display interface.
According to a sixth aspect of the present invention, there is provided a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the program:
capturing a trigger event based on a target control in an application program window;
sending a page acquisition request of the target control to a browser according to the trigger event and identification information corresponding to the target control, wherein the browser is used for determining a page file corresponding to the target control according to the identification information, responding in the page file according to the trigger event, performing corresponding processing and generating a page corresponding to the target control;
and receiving a page fed back by the browser, drawing a picture corresponding to the target control according to the page, pasting the picture into an application program window, and generating a display interface.
According to a seventh aspect of the present invention, there is provided a computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of:
receiving a page acquisition request of a target control in an application program window, wherein the page acquisition request carries a trigger event and identification information corresponding to the target control;
determining a page file corresponding to the target control according to the identification information, responding in the page file according to the trigger event, performing corresponding processing, and generating a page corresponding to the target control;
and feeding back the page to an internal memory of an application program, so that an interface library of the application program draws a picture corresponding to the target control according to the page, and pastes the picture to an application program window to generate a display interface.
According to an eighth aspect of the present invention, there is provided a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the program:
receiving a page acquisition request of a target control in an application program window, wherein the page acquisition request carries a trigger event and identification information corresponding to the target control;
determining a page file corresponding to the target control according to the identification information, responding in the page file according to the trigger event, performing corresponding processing, and generating a page corresponding to the target control;
and feeding back the page to an internal memory of an application program, so that an interface library of the application program draws a picture corresponding to the target control according to the page, and pastes the picture to an application program window to generate a display interface.
Compared with the mode that pictures corresponding to various controls are drawn in advance at present, and the pictures corresponding to the controls are switched to be pasted in the windows when a user operates the windows, the method, the device, the storage medium and the computer equipment for generating the interface of the application program can capture the trigger event based on the target controls in the application program windows; sending a page acquisition request of the target control to a browser according to the trigger event and identification information corresponding to the target control, wherein the browser is used for determining a page file corresponding to the target control according to the identification information, responding in the page file according to the trigger event, performing corresponding processing and generating a page corresponding to the target control; meanwhile, a page fed back by the browser is received, a picture corresponding to the target control is drawn according to the page, the picture is pasted to an application program window, and a display interface is generated.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
fig. 1 is a flowchart illustrating an interface generation method for an application according to an embodiment of the present invention;
FIG. 2 is a flow chart of an interface generation method for another application program according to an embodiment of the present invention;
FIG. 3 is a diagram illustrating information interaction among an interface library, a CEF and a browser provided by an embodiment of the present invention;
fig. 4 is a schematic structural diagram illustrating an interface generating apparatus for an application according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram illustrating an interface generating apparatus of another application according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram illustrating an interface generating apparatus of another application according to an embodiment of the present invention;
FIG. 7 is a block diagram illustrating an example of a physical structure of a computer device according to an embodiment of the present invention;
fig. 8 is a schematic physical structure diagram of another computer device according to an embodiment of the present invention.
Detailed Description
The invention will be described in detail hereinafter with reference to the accompanying drawings in conjunction with embodiments. It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
At present, in the mode of generating an interface by using a window interface library without a handle, a drawing tool needs to be used for drawing pictures corresponding to various controls on the interface in advance, and the drawing of the drawing tool is difficult to realize various rich visual effects.
In order to solve the above problem, an embodiment of the present invention provides an interface generating method for an application program, as shown in fig. 1, the method includes:
101. a target control-based trigger event in an application window is captured.
Wherein, the triggering event is an event generated by capturing a mouse, a keyboard, a focus and the like by an application program window, the target control is a control operated by a user in the application program window, and specifically can be a button in the window, for example, the user moves a mouse to a 'login' button in the application program window, or clicks the 'login' button by the mouse, for the embodiment of the invention, in order to realize various rich visual effects and simultaneously facilitate the modification and the increase of the control picture effect, the embodiment of the invention adopts a mode of separating picture effect processing and picture drawing, the processing of the control picture effect is completely processed by a browser, various rich visual effects can be realized by the browser, and simultaneously, when the picture effect of the control is modified or increased, only a page file corresponding to the control needs to be adjusted in the browser, the picture and the compiler do not need to be redrawn, so that the method is more convenient.
Specifically, when a user operates a target control in an application program window, the window program can capture the user operation, determine a trigger event based on the target control in the application program window according to the captured user operation so as to notify the browser of the trigger event, and the browser processes the picture effect of the target control according to the received trigger event.
102. And sending a page acquisition request of the target control to a browser according to the trigger event and the identification information corresponding to the target control.
The browser is used for determining a page file corresponding to the target control according to the identification information, responding in the page file according to the trigger event, performing corresponding processing, and generating a page corresponding to the target control, wherein the identification information corresponding to the target control can be a name or a code corresponding to the target control; 2) generating a bitmap (html/css/js natural attribute) according to user operation, wherein the interactive form is rich; 3) the CEF supports html5, and has abundant data visualization schemes (such as Flott, chartjs and the like), so that the difficulty of data visualization technology is greatly reduced; 4) the http/css/js + data can be deployed to an http server side, a typical BS architecture is adopted, and the appearance of local application is completely controlled by the http server side. As shown in fig. 3, after a trigger event based on a target control in an application window is captured, acquiring identification information corresponding to the target control, and sending a page acquisition request of the target control to a browser according to the captured trigger event and the identification information, specifically, sending the trigger event and the identification information to a CEF, after the CEF receives the page acquisition request of the target control, the processing request carries the identification information and the trigger event corresponding to the target control, after the browser receives the page acquisition request, searching a page file corresponding to the target control according to the identification information, where the page file specifically includes an HTML file, a CSS file, and a javascript file of the target control, and a handler of the target control based on different trigger events is recorded in the page file, for example, the color or size of a control picture can be changed according to different trigger events, further, the browser executes a corresponding program in the page file according to the trigger event, namely responds to the trigger event, performs corresponding processing, renders to generate a page corresponding to the target control, and outputs the page to an application program memory.
For example, when a user moves a mouse to a 'login' button in an interface of an application program, a window program captures the trigger event and then sends the trigger event and identification information corresponding to the button to a CEF, the CEF receives the trigger event and the identification information corresponding to the button and then generates a page acquisition request and sends the page acquisition request to a browser, the browser receives the page acquisition request and then acquires a page file corresponding to the 'login' button according to the identification information of the button carried by the page acquisition request, executes a corresponding program in the page file according to the captured trigger event and carries out corresponding processing, renders and generates a page of which the mouse moves to the 'login' button, and outputs the page to an application program memory through the CEF, an application program interface library draws a picture corresponding to the 'login' button according to the page in the memory, so that all picture effect processing can be carried out by the browser, the interface library only needs to be drawn into pictures according to pages generated by the browser, the processing of picture effects is separated from the drawing of the pictures, when the picture effects need to be modified or increased, only the page files corresponding to the controls in the browser need to be modified, the pictures and the compiling program do not need to be redrawn by using drawing software, the modification and the increase of the picture effects of the controls are more convenient, the realized effects are richer, meanwhile, because the page files corresponding to different controls in the browser are different, the coupling degree between different controls is lower, and the effect of any control can be independently modified.
103. And receiving a page fed back by the browser, drawing a picture corresponding to the target control according to the page, pasting the picture into an application program window, and generating a display interface.
For the embodiment of the invention, the CEF outputs the page of the browser to the memory of the application program, the interface library of the application program draws the picture corresponding to the target control according to the page, the user can see the effect change of the target control after the operation through the picture, and then the effect change is pasted in the window of the application program to generate the interface to be displayed to the user.
Further, in order to better explain the generation process of the interface, as a refinement and an extension of the above embodiment, the embodiment of the present invention provides several alternative embodiments, but is not limited thereto, and specifically, the following embodiments are provided:
in an optional embodiment of the present invention, in order to draw a picture corresponding to a target control, the drawing a picture corresponding to the target control according to the picture effect processing result includes: determining the pixel value of each point in the picture corresponding to the target control according to the page; and drawing the picture corresponding to the target control based on the determined pixel values of all points in the picture. Specifically, a page is obtained according to bitmap data generated by rendering of a browser in an application program memory, pixel values corresponding to each point in a target control effect graph are determined according to the page, and then a picture is drawn according to the pixel values corresponding to each point.
In another optional embodiment of the present invention, the capturing a target control-based trigger event in an application window includes: capturing the operation of a user on the target control in the application program window; and determining a trigger event based on the target control in the application program window based on the operation of the target control. In particular, when a user operates a target control in a window, the event triggered by the operation can be captured by the window program, for example, when the user clicks a "login" button in the window, the login event can be captured by the window program.
In another optional embodiment of the present invention, the sending, according to the trigger event and the identification information corresponding to the target control, a page obtaining request of the target control to a browser includes: and sending the trigger event and the identification information corresponding to the target control to a preset browser control, so that the preset browser control sends a page acquisition request of the target control to a browser according to the trigger event and the identification information corresponding to the target control. In the embodiment of the present invention, a CEF off-screen rendering technology is adopted to implement processing of the picture effect of the target control, and the processing of the picture effect of the control is completely handed to the browser, specifically, when the widget captures a target control-based trigger event, call CefBrowserHost: a SendXXX () method informing the CEF of the trigger event, so that the CEF transmits the trigger event to the browser, therefore, the user can carry out various operations in the window, the browser can respond in time and draw the refreshed picture effect processing result into a picture in real time, in the process of pasting the drawn picture on the window, the drawn picture can be pasted to a corresponding position in the application program window according to the position information of the target control in the application program window, so that a display interface is generated.
Compared with the mode that pictures corresponding to various controls are drawn in advance at present, and the pictures corresponding to the controls are switched to be pasted in the windows when a user operates the windows, the method for generating the interface of the application program can capture the trigger event based on the target controls in the application program windows; sending a page acquisition request of the target control to a browser according to the trigger event and identification information corresponding to the target control, wherein the browser is used for determining a page file corresponding to the target control according to the identification information, responding in the page file according to the trigger event, performing corresponding processing and generating a page corresponding to the target control; meanwhile, a page fed back by the browser is received, a picture corresponding to the target control is drawn according to the page, the picture is pasted to an application program window, and a display interface is generated.
Further, as an extension and refinement of the implementation content, an embodiment of the present invention further provides another interface generation method for an application program, as shown in fig. 2, where the method includes:
201. and receiving a page acquisition request of a target control in an application program window.
And the processing request carries a trigger event and identification information corresponding to the target control. For the embodiment of the invention, after an application program window captures a trigger event based on a target control, the trigger event is notified to the CEF, the CEF sends a page acquisition request to the browser according to the trigger event and identification information corresponding to the target control, after receiving the page acquisition request, the browser performs corresponding processing according to the trigger event and the identification information corresponding to the target control to generate bitmap data corresponding to the target control, and determines a page corresponding to the target control according to the bitmap data, so that picture effect processing of all controls on an interface can be given to the browser for execution, an interface library only draws pictures according to the result of the browser processing, effect processing and picture drawing are separated, the coupling degree is reduced, and meanwhile, a colorful animation effect can be realized by using the browser.
Further, before sending a page acquisition request to a browser, a page file corresponding to different controls in an application program window needs to be created in the browser in advance, the page file includes processing programs of the controls under different trigger events, the picture effect processing programs of the different controls may be the same or different, and may be specifically set according to business requirements, embodiments of the present invention are not specifically limited, for example, an interface window of the application program includes a control a and a control B, picture effects corresponding to the control a and the control B may be set by creating the page file corresponding to the control a and the control B, when a mouse moves to the control a or the control B, the picture effects corresponding to the control a and the control B are respectively color-darkened, so that the picture effect processing programs between the control a and the control B can be multiplexed, the development efficiency of the picture effect of the control in the browser is improved, meanwhile, when the mouse moves to the control A, the color deepening processing can be carried out on the picture effect corresponding to the control A, when the mouse moves to the control B, the picture amplification processing can be carried out on the picture effect corresponding to the control B, the picture effects of different controls can be achieved by setting the picture effect processing program in the page file, in addition, if the picture effect of one control is required to be modified or increased, the page file in the browser can be directly adjusted, the picture is not required to be redrawn by using a drawing tool, and the program is not required to be recompiled, so that the modification or the increase of the picture effect of the control in the embodiment of the invention is more convenient.
202. And determining a page file corresponding to the target control according to the identification information, responding in the page file according to the trigger event, performing corresponding processing, and generating a page corresponding to the target control.
For the embodiment of the present invention, in order to generate the picture effect processing result corresponding to the target control, step 202 specifically includes: responding in the page file according to the trigger event, performing corresponding processing, and generating bitmap data corresponding to the target control; and determining a page corresponding to the target control according to the bitmap data corresponding to the target control. For example, the browser searches for a page file corresponding to the control a according to the identification information corresponding to the control a carried in the page acquisition request, responds to the trigger event according to the found page file corresponding to the control a, performs corresponding processing to obtain bitmap data corresponding to the control a, can determine a page corresponding to the control a according to the bitmap data, and simultaneously outputs the determined page to a memory of the application program through the CEF. Therefore, when a user operates in the window, the trigger event is notified to the browser, the browser performs corresponding processing to generate a display page, and equivalently, the user directly operates in the browser, the browser can perform real-time rendering, the page rendered by the browser changes, and the interface library can also dynamically refresh the picture effect in real time.
203. And feeding back the page to an internal memory of an application program, so that an interface library of the application program draws a picture corresponding to the target control according to the page, and pastes the picture to an application program window to generate a display interface.
For the embodiment of the present invention, in order to feed back the picture processing result to the memory of the application program, step 203 specifically includes: and feeding back the page to a preset browser control so that the preset browser control can output the page to a memory of the application program. The preset browser control can be a CEF (browser application format), the browser performs corresponding processing to generate a display page, the generated page is fed back to the CEF, the CEF outputs the page to a memory of an application program, an interface library of the application program draws a picture according to the page of the target control and pastes the picture to a corresponding position of a window to generate an interface to be displayed to a user, and therefore the user can see the picture effect after the target control is operated on the interface.
Compared with the mode that pictures corresponding to various controls are drawn in advance at present, and pictures corresponding to the controls are switched to be pasted in a window when a user operates the windows, the method for generating the interface of the application program can receive a page acquisition request of a target control in the window of the application program, wherein the page acquisition request carries a trigger event and identification information corresponding to the target control; determining a page file corresponding to the target control according to the identification information, responding in the page file according to the trigger event, performing corresponding processing, and generating a page corresponding to the target control; meanwhile, the page is fed back to the memory of the application program, so that the interface library of the application program draws the picture corresponding to the target control according to the page, the picture is pasted to the application program window, and a display interface is generated, therefore, various rich visual effects can be realized by using the browser, when the picture effect of the control needs to be modified or increased, the page file of the control in the browser can be directly adjusted, the picture and the compiling program do not need to be redrawn, the picture effect is more convenient to increase or modify, meanwhile, the picture effect is processed by the browser, the coupling degree between the picture effect of the control and the program is reduced, and the effect of each control can be independently modified.
Further, as a specific implementation of fig. 1, an embodiment of the present invention provides an interface generating apparatus for an application program, and as shown in fig. 4, the apparatus includes: a capturing unit 31, a processing unit 32 and a rendering unit 33.
The capturing unit 31 may be configured to capture a trigger event based on a target control in an application window. The capturing unit 31 is a main functional module in the device for capturing the target control-based trigger event in the application program window.
The processing unit 32 may be configured to send a page obtaining request of the target control to a browser according to the trigger event and the identification information corresponding to the target control, where the browser is configured to determine a page file corresponding to the target control according to the identification information, and respond in the page file according to the trigger event, perform corresponding processing, and generate a page corresponding to the target control. The processing unit 32 is a main function module, which is also a core module, in the device, and sends a page acquisition request of the target control to the browser according to the trigger event and the identification information corresponding to the target control.
The drawing unit 33 may be configured to receive a page fed back by the browser, draw a picture corresponding to the target control according to the page, paste the picture into an application window, and generate a display interface. The drawing unit 33 is a main function module, which is also a core module, of the device that receives the page fed back by the browser, draws the picture corresponding to the target control according to the page, and pastes the picture to an application program window to generate a display interface.
For the embodiment of the present invention, as shown in fig. 5, in order to draw the picture corresponding to the target control, the drawing unit 33 includes: a determination module 331 and a rendering module 332.
The determining module 331 may be configured to determine, according to the page, pixel values of each point in the picture corresponding to the target control.
The drawing module 322 may be configured to draw a picture corresponding to the target control based on the determined pixel values of the points in the picture.
Further, in order to capture a target control-based trigger event in an application window, the capturing unit 31 includes: an acquisition module 311 and a determination module 312.
The capture module 311 may be configured to capture an operation of the target control by the user in the application window.
The determining module 312 may be configured to determine a target control-based trigger event in the application window based on the operation of the target control.
Further, in order to send the page obtaining request of the target control to the browser, the processing unit 32 may be specifically configured to send the trigger event and the identification information corresponding to the target control to a preset browser control, so that the preset browser control sends the page obtaining request of the target control to the browser according to the trigger event and the identification information corresponding to the target control.
It should be noted that other corresponding descriptions of the functional modules related to the interface generating apparatus for an application provided in the embodiment of the present invention may refer to the corresponding description of the method shown in fig. 1, and are not described herein again.
Based on the method shown in fig. 1, correspondingly, an embodiment of the present invention further provides a computer-readable storage medium, where the storage medium stores at least one executable instruction, and the computer-executable instruction may execute relevant steps in the embodiment of the interface generation method for an application program.
Based on the above embodiments of the method shown in fig. 1 and the apparatus shown in fig. 4, an embodiment of the present invention further provides an entity structure diagram of a computer device, as shown in fig. 7, where the computer device includes: a processor 51, a memory 52, and a computer program stored on the memory 52 and executable on the processor, wherein the memory 52 and the processor 51 are both arranged on a bus 53, and the processor 51 implements the following steps when executing the program: capturing a trigger event based on a target control in an application program window; sending a page acquisition request of the target control to a browser according to the trigger event and identification information corresponding to the target control, wherein the browser is used for determining a page file corresponding to the target control according to the identification information, responding in the page file according to the trigger event, performing corresponding processing and generating a page corresponding to the target control; and receiving a page fed back by the browser, drawing a picture corresponding to the target control according to the page, pasting the picture into an application program window, and generating a display interface.
Further, as a specific implementation of fig. 2, an embodiment of the present invention provides an interface generating apparatus for an application program, and as shown in fig. 6, the apparatus includes: a receiving unit 41, a rendering unit 42 and a feedback unit 43.
The receiving unit 41 may be configured to receive a page obtaining request of a target control in an application window, where the page obtaining request carries a trigger event and identification information corresponding to the target control. The receiving unit 41 is a main function module in the device that receives a page obtaining request of a target control in an application window, where the page obtaining request carries a trigger event and identification information corresponding to the target control.
The rendering unit 42 may be configured to determine, according to the identification information, a page file corresponding to the target control, respond to the page file according to the trigger event, perform corresponding processing, and generate a page corresponding to the target control. The rendering unit 42 is a main function module, which is also a core module, in the apparatus, determines a page file corresponding to the target control according to the identification information, responds in the page file according to the trigger event, and performs corresponding processing to generate a page corresponding to the target control.
The feedback unit 43 may be configured to feed the page back to an internal memory of an application program, so that an interface library of the application program draws a picture corresponding to the target control according to the page, and pastes the picture to an application program window to generate a display interface. The feedback unit 43 is a main functional module in the device that feeds the page back to the memory of the application program.
Further, in order to generate the page corresponding to the target control, the rendering unit 42 includes a rendering module and a determining module.
The rendering module may be configured to respond to the trigger event in the page file, perform corresponding processing, and generate bitmap data corresponding to the target control.
The determining module may be configured to determine, according to the bitmap data corresponding to the target control, a page corresponding to the target control.
Further, the feedback unit 43 may be specifically configured to feed back the page to a preset browser control, so that the preset browser control outputs the page to the memory of the application program.
It should be noted that other corresponding descriptions of the functional modules related to the interface generating apparatus for an application provided in the embodiment of the present invention may refer to the corresponding description of the method shown in fig. 2, and are not described herein again.
Based on the method shown in fig. 2, correspondingly, an embodiment of the present invention further provides a computer-readable storage medium, where the storage medium stores at least one executable instruction, and the computer-executable instruction may execute relevant steps in the embodiment of the interface generation method for an application program.
Based on the above embodiments of the method shown in fig. 2 and the apparatus shown in fig. 6, an embodiment of the present invention further provides an entity structure diagram of another computer device, as shown in fig. 8, where the computer device includes: a processor 61, a memory 62, and a computer program stored on the memory 62 and executable on the processor, wherein the memory 62 and the processor 61 are both arranged on a bus 63 such that when the processor 61 executes the program, the following steps are performed: receiving a page acquisition request of a target control in an application program window, wherein the page acquisition request carries a trigger event and identification information corresponding to the target control; determining a page file corresponding to the target control according to the identification information, responding in the page file according to the trigger event, performing corresponding processing, and generating a page corresponding to the target control; and feeding back the page to an internal memory of an application program, so that an interface library of the application program draws a picture corresponding to the target control according to the page, and pastes the picture to an application program window to generate a display interface.
By the technical scheme, the method can capture the trigger event based on the target control in the application program window; sending a page acquisition request of the target control to a browser according to the trigger event and identification information corresponding to the target control, wherein the browser is used for determining a page file corresponding to the target control according to the identification information, responding in the page file according to the trigger event, performing corresponding processing and generating a page corresponding to the target control; meanwhile, a page fed back by the browser is received, a picture corresponding to the target control is drawn according to the page, the picture is pasted to an application program window, and a display interface is generated.
It will be apparent to those skilled in the art that the modules or steps of the present invention described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed across a network of multiple computing devices, and alternatively, they may be implemented by program code executable by a computing device, such that they may be stored in a storage device and executed by a computing device, and in some cases, the steps shown or described may be performed in an order different than that described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. An interface generating method of an application program is characterized by comprising the following steps:
capturing a trigger event based on a target control in an application program window;
sending a page acquisition request of the target control to a browser according to the trigger event and identification information corresponding to the target control, wherein the browser is used for determining a page file corresponding to the target control according to the identification information, responding in the page file according to the trigger event, performing corresponding processing and generating a page corresponding to the target control;
and receiving a page fed back by the browser, drawing a picture corresponding to the target control according to the page, pasting the picture into an application program window, and generating a display interface.
2. The method according to claim 1, wherein the drawing the picture corresponding to the target control according to the page comprises:
determining the pixel value of each point in the picture corresponding to the target control according to the page;
and drawing the picture corresponding to the target control based on the determined pixel values of all points in the picture.
3. The method of claim 1, wherein capturing a target control-based triggering event in an application window comprises:
capturing the operation of a user on the target control in the application program window;
and determining a trigger event based on the target control in the application program window based on the operation of the target control.
4. The method according to claim 1, wherein the sending a page obtaining request of the target control to a browser according to the trigger event and the identification information corresponding to the target control includes:
and sending the trigger event and the identification information corresponding to the target control to a preset browser control, so that the preset browser control sends a page acquisition request of the target control to a browser according to the trigger event and the identification information corresponding to the target control.
5. An interface generating method of an application program is characterized by comprising the following steps:
receiving a page acquisition request of a target control in an application program window, wherein the page acquisition request carries a trigger event and identification information corresponding to the target control;
determining a page file corresponding to the target control according to the identification information, responding in the page file according to the trigger event, performing corresponding processing, and generating a page corresponding to the target control;
and feeding back the page to an internal memory of an application program, so that an interface library of the application program draws a picture corresponding to the target control according to the page, and pastes the picture to an application program window to generate a display interface.
6. The method according to claim 5, wherein the responding in the pagefile according to the trigger event and performing corresponding processing to generate a page corresponding to the target control comprises:
responding in the page file according to the trigger event, performing corresponding processing, and generating bitmap data corresponding to the target control;
and determining a page corresponding to the target control according to the bitmap data corresponding to the target control.
7. The method of claim 5, wherein feeding the page back to the memory of the application comprises:
and feeding back the page to a preset browser control so that the preset browser control can output the page to a memory of the application program.
8. An interface generating apparatus for an application program, comprising:
the capturing unit is used for capturing a trigger event based on the target control in the application program window;
the processing unit is used for sending a page acquisition request of the target control to a browser according to the trigger event and the identification information corresponding to the target control, and the browser is used for determining a page file corresponding to the target control according to the identification information, responding in the page file according to the trigger event, performing corresponding processing and generating a page corresponding to the target control;
and the drawing unit is used for receiving the page fed back by the browser, drawing the picture corresponding to the target control according to the page, pasting the picture into an application program window and generating a display interface.
9. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 4.
10. A computer arrangement comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the computer program realizes the steps of the method of any one of claims 1 to 4 when executed by the processor.
CN202010732584.7A 2020-07-27 2020-07-27 Application program interface generation method and device, storage medium and computer equipment Pending CN112035193A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010732584.7A CN112035193A (en) 2020-07-27 2020-07-27 Application program interface generation method and device, storage medium and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010732584.7A CN112035193A (en) 2020-07-27 2020-07-27 Application program interface generation method and device, storage medium and computer equipment

Publications (1)

Publication Number Publication Date
CN112035193A true CN112035193A (en) 2020-12-04

Family

ID=73583270

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010732584.7A Pending CN112035193A (en) 2020-07-27 2020-07-27 Application program interface generation method and device, storage medium and computer equipment

Country Status (1)

Country Link
CN (1) CN112035193A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116466952A (en) * 2023-06-19 2023-07-21 成都赛力斯科技有限公司 Control visual effect element adjusting method and device, electronic equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104267947A (en) * 2014-09-23 2015-01-07 广州金山网络科技有限公司 Method and device for editing popup picture
CN105302569A (en) * 2015-11-18 2016-02-03 网易(杭州)网络有限公司 Method and device used for generating special-shaped window
CN107025583A (en) * 2016-01-29 2017-08-08 阿里巴巴集团控股有限公司 A kind of rendering intent of page control, equipment and terminal device
CN107798084A (en) * 2017-10-17 2018-03-13 广东广业开元科技有限公司 The visual edit generation system and device of a kind of web front-end page
CN108108219A (en) * 2017-12-30 2018-06-01 上海壹账通金融科技有限公司 Application program operation method, device, computer equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104267947A (en) * 2014-09-23 2015-01-07 广州金山网络科技有限公司 Method and device for editing popup picture
CN105302569A (en) * 2015-11-18 2016-02-03 网易(杭州)网络有限公司 Method and device used for generating special-shaped window
CN107025583A (en) * 2016-01-29 2017-08-08 阿里巴巴集团控股有限公司 A kind of rendering intent of page control, equipment and terminal device
CN107798084A (en) * 2017-10-17 2018-03-13 广东广业开元科技有限公司 The visual edit generation system and device of a kind of web front-end page
CN108108219A (en) * 2017-12-30 2018-06-01 上海壹账通金融科技有限公司 Application program operation method, device, computer equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116466952A (en) * 2023-06-19 2023-07-21 成都赛力斯科技有限公司 Control visual effect element adjusting method and device, electronic equipment and storage medium
CN116466952B (en) * 2023-06-19 2023-09-01 成都赛力斯科技有限公司 Control visual effect element adjusting method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN111008520B (en) Annotating method and device, terminal equipment and storage medium
CN110096277B (en) Dynamic page display method and device, electronic equipment and storage medium
CN110781423A (en) Webpage generation method and device and electronic equipment
US10163048B2 (en) Method and device for page synchronization
CN113158619B (en) Document processing method and device, computer readable storage medium and computer equipment
CN112269576A (en) Component display method and device, server and storage medium
CN108335342B (en) Method, apparatus and computer program product for multi-person drawing on a web browser
CN114218052A (en) Service interaction graph generation method, device, equipment and storage medium
KR20090074580A (en) A apparatus and a method of screen capturing
CN111538601A (en) Webpage end communication method and device, electronic equipment and storage medium
CN113688341B (en) Dynamic picture decomposition method and device, electronic equipment and readable storage medium
CN113867580B (en) Display control method and device for pointer in window, equipment and storage medium
CN112035193A (en) Application program interface generation method and device, storage medium and computer equipment
CN113852756B (en) Image acquisition method, device, equipment and storage medium
CN109388737A (en) A kind of sending method, device and the storage medium of the exposure data of content item
CN105138697B (en) A kind of search result shows method, apparatus and system
WO2020000812A1 (en) Method and apparatus for generating ppt document, storage medium, and computer device
CN109905753B (en) Corner mark display method and device, storage medium and electronic device
CN114168853A (en) Data visualization display method, device, medium and electronic equipment
CN117950546A (en) Click-to-read data processing method, electronic document display method and electronic device
CN113778405A (en) Cross-platform APP construction method, device, system and medium
CN106383705B (en) Method and device for setting mouse display state in application thin client
CN111428452A (en) Comment data storage method and device
CN113672143B (en) Image labeling method, system, device and storage medium
CN112202958B (en) Screenshot method and device and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20201204