Display method and display system of target object, electronic equipment and storage medium
By automatically creating a floating window and obtaining attribute information and original data of the target object on the web page, the display method simplifies user operations, improves user experience, and solves the problems of complex operations in the existing technology, achieving high-resolution target object display.
Patent Information
- Application Number
- CN202310505852.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-06
- Publication Date
- 2024-11-08
AI Technical Summary
In the prior art, when a user views pictures or videos in a web page, he or she needs to perform complex operation steps to display the target object in a floating window, affecting the user experience.
Provide a display method, which automatically creates a floating window in response to the user's preset operations and requests to obtain the attribute information and original data of the target object. Based on these data, the target object is displayed in the floating window to reduce user manual operations.
It simplifies the user operation process, improves the user experience, avoids the steps of manually creating a floating window and obtaining target objects, and can display high-resolution target objects in the floating window, solving the problems of inaccurate screenshots and incomplete pictures.
Smart Images

Figure CN118916555A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the field of computer technology, and in particular to a method for displaying a target object, a display system, an electronic device, and a storage medium. Background Art
[0002] When users view pictures or videos on a web page, they will display and compare the pictures or videos in a floating window based on reference assistance needs. One existing display solution is that the user first downloads the picture or video file to the local terminal device and stores it as a local file, and then the user starts a specific program to import the local file into the floating window and open it for display. Another existing display solution is that the user first selects the target object in a specific area on the screen to generate a screenshot and store it as a local file, and then the user starts a specific program to import the local file into the floating window and open it for display.
[0003] For the first display scheme, the user needs to perform multiple operation steps including selecting to save the image or video file locally, specifying the save path, and using a specific program to open the local file. For the second display scheme, the user needs to participate in multiple operation steps including selecting the target object in a specific area, selecting to save the image locally, specifying the save path, and using a specific program to open the local file. The above two display schemes require users to perform complex operation steps, which affects the user experience.
[0004] The contents of the background technology section are merely the technologies known to the public and do not necessarily represent the existing technologies in the field. Summary of the invention
[0005] In view of this, the embodiments of the present invention provide a method, a system, an electronic device and a storage medium for displaying a target object, which can reduce user operations and improve user experience.
[0006] First, an embodiment of the present invention provides a method for displaying a target object, which is suitable for displaying a target object in a web page. The method includes:
[0007] In response to a preset operation on the target object, a floating window is created to request to obtain attribute information and original data of the target object;
[0008] Based on the acquired attribute information and original data of the target object, the target object is displayed in the floating window.
[0009] Optionally, the preset operation includes a first sub-operation and a second sub-operation, and in response to the preset operation on the target object, creating a floating window and requesting to obtain the attribute information and original data of the target object includes:
[0010] In response to the first sub-operation, requesting to obtain the attribute information and original data of the target object;
[0011] In response to the second sub-operation, the floating window is created.
[0012] Optionally, the preset operation includes a first sub-operation, a second sub-operation, and a third sub-operation, and in response to the preset operation on the target object, creating a floating window and requesting to obtain the attribute information and original data of the target object includes:
[0013] In response to the first sub-operation, requesting to obtain attribute information of the target object;
[0014] In response to the second sub-operation, requesting to obtain original data of the target object;
[0015] In response to the third sub-operation, the floating window is created.
[0016] Optionally, the request to obtain the attribute information of the target object includes:
[0017] The attribute information of the target object is obtained from the web page through a browser.
[0018] Optionally, the request to obtain the original data of the target object includes at least one of the following:
[0019] Requesting the source website of the target object to obtain the original data of the target object through a browser;
[0020] A request is made to the browser to obtain the original data of the target object.
[0021] Optionally, the creating a floating window includes at least one of the following:
[0022] Creating the floating window with the current operation position of the preset operation as the center point of the floating window;
[0023] The floating window is created on top of the display screen.
[0024] Optionally, the creating a floating window includes at least one of the following:
[0025] Creating the floating window with a preset size;
[0026] The floating window is created according to the acquired attribute information of the target object.
[0027] The embodiment of the present invention further provides a display system, which is suitable for displaying a target object in a web page, and includes:
[0028] A floating window creation module, adapted to create a floating window in response to a preset operation on the target object;
[0029] A data request module, adapted to request to obtain attribute information and original data of the target object in response to a preset operation on the target object;
[0030] The display module is adapted to display the target object in the floating window based on the acquired attribute information and original data of the target object.
[0031] Optionally, the preset operation includes a first sub-operation and a second sub-operation;
[0032] The data request module is adapted to request, in response to the first sub-operation, to obtain the attribute information and original data of the target object;
[0033] The floating window creation module is adapted to create a floating window in response to the second sub-operation.
[0034] Optionally, the preset operation includes a first sub-operation, a second sub-operation and a third sub-operation;
[0035] The data request module is adapted to request, in response to the first sub-operation, to obtain the attribute information of the target object; and in response to the second sub-operation, to request to obtain the original data of the target object;
[0036] The floating window creation module is adapted to create a floating window in response to the third sub-operation.
[0037] Optionally, the data request module is adapted to request, through a browser, a source website of the target object to obtain original data of the target object; and / or,
[0038] Suitable for requesting the browser to obtain the original data of the target object.
[0039] Optionally, the data request module includes:
[0040] A first data request unit is provided in the browser;
[0041] The second data requesting unit is adapted to request the source website of the target object to obtain the original data of the target object through the first data requesting unit.
[0042] Optionally, the first data requesting unit is adapted to request, through the browser, to obtain a source URL in the attribute information of the target object from the web page, request the original data of the target object from the corresponding source website according to the source URL, and transmit the obtained original data of the target object to the second data requesting unit;
[0043] The second data requesting unit is adapted to obtain original data of the target object transmitted by the first data requesting unit.
[0044] Optionally, the first data requesting unit is adapted to request a source URL in the attribute information of the target object from the web page through the browser, and pass the acquired source URL to the second data requesting unit;
[0045] The second data request unit is adapted to request the corresponding source website to obtain the original data of the target object according to the source URL.
[0046] Optionally, the floating window creation module, the second data request unit and the display module are integrated in a target object display client, and the target object display client is suitable for interacting with the browser to display the target object in the web page displayed by the browser through the floating window.
[0047] An embodiment of the present invention further provides an electronic device, including a processor and a display, wherein:
[0048] The processor is adapted to display the target object in the webpage in the floating window by executing the steps of the method described in any of the above embodiments;
[0049] The display is suitable for providing a display interface for displaying the target object.
[0050] An embodiment of the present invention further provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed, the steps of the method described in any of the above embodiments are executed.
[0051] By adopting the display method in the embodiment of the present invention, in response to the user's preset operation on the target object, a floating window can be directly created, and the attribute information and original data of the target object can be obtained, and the target object can be displayed in the floating window based on the attribute information and original data of the target object. In the whole process, the user only needs to perform the preset operation to realize the display of the target object in the web page in the floating window. The whole process does not require the user to manually create the floating window, obtain the target object and other related operation steps, so it can reduce user operations and improve user experience.
[0052] Furthermore, the floating window is created with the current operation position of the preset operation as the center point of the floating window, or the floating window is created on top of the display screen. In other words, the floating window can be automatically created at multiple positions in a variety of ways, and the creation position of the floating window can be flexibly set according to user habits and electronic device parameters. This can reduce the adjustment operations that subsequent users may perform on the position of the floating window, thereby further reducing user operations and improving user experience.
[0053] Using the display system in the embodiment of the present invention, the floating window is created by the floating window creation module in response to the preset operation on the target object; the attribute information and original data of the target object are requested to be obtained by the data request module in response to the preset operation on the target object; the target object is displayed in the floating window based on the obtained attribute information and original data of the target object by the display module. The user only needs to perform the preset operation on the target object to realize the display of the target object in the floating window. The creation of the floating window and the acquisition of the target object and other related operation steps are all response actions of the display system, which can reduce user operations and improve user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] In order to more clearly illustrate the technical solutions of the embodiments of this specification, the drawings required for use in the embodiments of this specification or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0055] Figure 1 A schematic flow chart of a method for displaying a target object in an embodiment of the present invention is shown.
[0056] Figure 2 A schematic structural diagram of a display system in an embodiment of the present invention is shown.
[0057] Figure 3 A schematic structural diagram of an electronic device in an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0058] As described in the background art, currently when users set pictures or videos on a web page to be displayed in a floating window, they usually adopt the following two solutions:
[0059] A) The user first downloads the image or video to the local terminal device and stores it as a local file. The user then starts a specific program to import the local file into the floating window and open it for display.
[0060] B) The user first selects an image in a picture or video to generate a screenshot and stores it as a local file, and then the user starts a specific program to import the local file into a floating window and open it for display.
[0061] For solution A), the user needs to perform multiple operation steps including manually selecting to save pictures or videos locally, specifying a save path, and using a specific program to find local files.
[0062] For solution B), the user needs to perform multiple operation steps including manually selecting the target object, determining to save the image, specifying the save path, and using a specific program to find the local file.
[0063] Both of the above two display solutions require users to perform complex operation steps, resulting in poor user experience.
[0064] In order to solve the above problems, an embodiment of the present invention provides a method for displaying a target object, which is suitable for displaying a target object in a web page. The user only needs to perform a preset operation on the target object to automatically display the target object in a floating window. The entire process does not require the user to create a floating window, save the target object, find the target and import it into the floating window for display, and other related operations. Therefore, user operations can be reduced and user experience can be improved.
[0065] In order to enable those skilled in the art to better understand the inventive concept, working principle and advantages of the embodiments of the present invention, the target object display method in the embodiments of the present invention is described in detail below.
[0066] First, the present invention provides a method for displaying a target object, which is suitable for displaying a target object in a web page, wherein the web page is displayed by a browser. Specifically, the target object may include a multimedia file loaded and displayed on the web page. The multimedia file may be, for example, a picture, a video, etc.
[0067] Reference Figure 1 , the following steps can be used to display the target object.
[0068] S01, in response to a preset operation on the target object, creating a floating window and requesting to obtain attribute information and original data of the target object.
[0069] In a specific implementation, in response to a user's preset operation on the target object, a floating window may be automatically created. Due to differences in user habits and parameters of electronic devices, the floating window may be automatically created in a variety of ways.
[0070] In some embodiments of the present invention, the floating window can be automatically created at a preset creation position in a variety of ways. As an optional example, the preset creation position of the floating window can be any position preset by the system or the user. For example, according to user settings, the floating window can be created at the top, bottom, left edge, right edge, etc. of the electronic device display interface. As another optional example, the floating window is created based on the operation position of the preset operation. For example, when the user performs the preset operation with the mouse, the position of the mouse cursor can be used as the center position of the floating window.
[0071] As an optional example, the floating window with different sizes can be created in a variety of ways. For example, the size of the floating window can be the same as the original size of the target object. For another example, the size of the floating window can be a fixed ratio to the size of the display interface of the electronic device, for example, 1:4. For another example, specific data is set for the length and width of the floating window, for example, the horizontal size is 800 pixels and the vertical size is 450 pixels.
[0072] In a specific implementation, the user can pre-set the parameters in the floating window creation process, including the creation position and the size of the floating window, according to their own habits and the parameters of the electronic device used, to achieve flexible setting of the floating window.
[0073] As a specific example, the user can pre-customize the setting that the floating window is created at the top of the display interface, and the creation size of the floating window is 800 pixels in horizontal dimension and 450 pixels in vertical dimension.
[0074] By adopting the above method, the creation position and creation size of the floating window can be flexibly set, thereby reducing the subsequent user's possible adjustment operations on the position and size of the floating window, thereby further reducing user operations and improving user experience.
[0075] It should be noted that the setting method of the creation position of the floating window and the creation size of the floating window is not limited to the implementation method shown in the above example, and other implementation methods may also be used. The above example does not impose any limitation on the setting method of the creation position of the floating window and the creation size of the floating window.
[0076] In a specific implementation, in response to a preset operation of the user on the target object, a request may be made directly to a browser and / or a web page to obtain the attribute information and original data of the target object.
[0077] Among them, the attribute information of the target object may include setting information of the target object in the Cascading Style Sheet (CSS) corresponding to the web page, such as resolution, size and proportion when actually displayed in the web page, source URL, etc.; the original data of the target object may include the source file of the target object.
[0078] As an optional example, in response to the preset operation, the attribute information of the target object may be acquired from the web page through a browser.
[0079] Based on the storage location of the original data of the target object, in response to the preset slave operation, at least one method can be selected to request to obtain the original data of the target object.
[0080] As an optional example, when the original data of the target object is stored in the source website of the target object, the original data of the target object can be obtained by requesting the source website of the target object through a browser. Specifically, the browser can first request the source URL in the attribute information of the target object from the web page, and then request the corresponding source website to obtain the original data of the target object according to the source URL.
[0081] As another optional example, when the original data of the target object is cached in a local folder by the browser, a request may be made to the browser to obtain the original data of the target object. Specifically, a request may be made to the browser to parse out the original data of the target object by analyzing the cached data of the relevant web page in the local folder of the browser.
[0082] It should be noted that the preset operation on the target object should not be understood as a direct operation of the target object by the user. In actual operation, it may also be an operation performed by the user on the web page, or an operation performed in an area other than the web page in the display interface of the electronic device.
[0083] When the target object is a picture, the original data of the target object may have multiple resolution versions. For example, when the target object displayed in the webpage is a thumbnail, the thumbnail has a low-resolution version displayed in the webpage and a high-resolution version displayed after selection. The high-resolution version usually exists in the same source website as the low-resolution version, and there is a preset rule between the source URLs corresponding to the two that can be replaced with each other. The preset rule is set by the source website, and the preset rules may be the same or different for different source websites.
[0084] In a specific implementation, multiple resolution versions can be requested, and the version with a larger resolution can be selected as the original data of the target object. As an optional example, the browser can first request the source URL in the attribute information of the target object from the web page, and in addition to requesting the corresponding source website to obtain the original data of the target object according to the source URL (for example, the version of the thumbnail displayed in a low resolution on the web page), the preset rules of the source website are also obtained, and the text of the obtained source URL is replaced based on the preset rules. Then, according to the source URL after the text replacement, the corresponding source website is continued to be requested to obtain the original data of the target object (correspondingly, the version displayed in a high resolution after the thumbnail is selected); finally, the version with the largest resolution among all the obtained resolution versions is selected as the original data of the final target object.
[0085] As a specific example, assuming that the source URL corresponding to the version of the thumbnail displayed in low resolution on the web page is www.abc.com / image_thumbnail.jpg, the text of the obtained source URL is replaced based on the preset rule, and the source URL corresponding to the version of the thumbnail displayed in high resolution on the web page after the thumbnail is selected can be obtained as www.abc.com / image_large.jpg; when requesting to obtain the original data of the target object, in addition to requesting the corresponding source website to obtain the original data of the target object according to the source URL www.abc.com / image_thumbnail.jpg, the corresponding source website can also be requested to obtain the original data of the target object according to the source URL www.abc.com / image_large.jpg. If the original data of the target object of the above two resolution versions are obtained at the same time, the resolution version obtained from the source URL www.abc.com / image_large.jpg is selected as the final original data of the target object.
[0086] S02: Based on the acquired attribute information and original data of the target object, display the target object in the floating window.
[0087] After the attribute information and original data of the target object are acquired, the target object may be directly displayed in the floating window based on the attribute information and original data of the target object.
[0088] By adopting the above-mentioned display method, the target object can be displayed in the floating window based on the preset operation performed by the user on the target object. The entire process does not require manual execution of related operation steps such as creating the floating window and obtaining the target object, thereby reducing user operations and improving user experience.
[0089] In addition, it can be seen from the above embodiments that since the original data of the target object can be obtained in response to the preset operation of the target object, the target object with a higher resolution can be displayed in the floating window. For the target object of the picture type, it can be displayed with the highest accuracy on the display interface of the electronic device. Therefore, many problems existing in solution B) can be avoided, such as inaccurate capture area, incomplete picture, low picture quality and other problems.
[0090] In a specific implementation, the electronic device parameters may include the type of electronic device and the parameters of the electronic device display interface. As an optional example, the electronic device may be a type that performs the preset operation through a mouse, keyboard, touch screen, touch control screen, voice control, etc.; the parameters of the electronic device display interface may be the size and resolution of the display interface.
[0091] As a specific example, a user can perform preset operations through voice control. For example, when the user utters a voice command "display the first picture of the web page on the current display interface in a floating window", in response to the voice, operations such as requesting to obtain the attribute information and original data of the target object, creating the floating window, and displaying the target object in the floating window are automatically executed.
[0092] In a specific implementation, the preset operation may include multiple sub-operations. There may be multiple adaptation relationships between each sub-operation and the response operation. Specifically, the creation of the floating window, the request to obtain the attribute information of the target object, and the request to obtain the original data of the target object may respectively respond to different one or more sub-operations, or may respond to the same one or more sub-operations.
[0093] By flexibly setting the adaptation relationship between multiple sub-operations and the corresponding response operations of each module in the display system, it is possible to adapt to different user habits and performance parameters of electronic devices, thereby increasing the universality of the display method.
[0094] As an optional example, the preset operation includes a first sub-operation and a second sub-operation. In response to the first sub-operation, a request is made to obtain the attribute information and original data of the target object. In response to the second sub-operation, the floating window is created.
[0095] As another optional example, the preset operation includes a first sub-operation, a second sub-operation and a third sub-operation. In response to the first sub-operation, a request is made to obtain the attribute information of the target object. In response to the second sub-operation, a request is made to obtain the original data of the target object. In response to the third sub-operation, the floating window is created.
[0096] It should be noted that the number of sub-operations that the preset operation may include is not limited to the number described in the above examples, but may also be other numbers, such as four sub-operations or more sub-operations; the adaptation relationship between each sub-operation and the response operation is not limited to the adaptation relationship shown in the above examples, but may also be other adaptation relationships. The above examples do not limit the number of sub-operations and the corresponding adaptation relationships.
[0097] Accordingly, an embodiment of the present invention further provides a display system, which is suitable for executing the target object display method in any of the above embodiments and displaying the target object in the web page. Figure 2 The display system 10 includes a floating window creation module 11, a data request module 12 and a display module 13, wherein:
[0098] The floating window creation module 11 is adapted to create a floating window in response to a preset operation on the target object;
[0099] The data request module 12 is adapted to request to obtain the attribute information and original data of the target object in response to a preset operation on the target object;
[0100] The display module 13 is adapted to display the target object in the floating window based on the acquired attribute information and original data of the target object.
[0101] With the above display system, the floating window creation module creates a floating window in response to a preset operation on the target object; the data request module requests to obtain the attribute information and original data of the target object in response to the preset operation on the target object; the display module displays the target object in the floating window based on the acquired attribute information and original data of the target object. The user only needs to perform the preset operation on the target object, and the floating window creation module, the data request module and the display module can automatically create a floating window in response to the preset operation, request to obtain the attribute information and original data of the target object, and display the target object in the floating window, thereby reducing user operations and improving user experience.
[0102] As can be seen from the foregoing, the original data of the target object may be stored in multiple locations, such as the source website of the target object or the local cache folder of the browser.
[0103] Accordingly, in a specific implementation, the data request module can obtain the original data of the target object in at least one of the following ways: requesting the source website of the target object to obtain the original data of the target object through a browser; requesting the browser to obtain the original data of the target object.
[0104] Since the attribute information and original data of the target object are stored in different locations, in a specific implementation, the data request module 12 may include: a first data request unit 121 and a second data request unit 122, adapted to respectively request the attribute information and original data of the target object.
[0105] In a specific implementation, the first data request unit 121 and the second data request unit 122 may have multiple adaptation relationships with the attribute information of the target object and the original data of the target object.
[0106] Specifically, the first data request unit 121 and / or the second data request unit 122 may be used to request the property information of the target object; the first data request unit 121 and / or the second data request unit 122 may be used to request the original data of the target object.
[0107] Considering that the preset operation may include multiple sub-operations, there may be multiple adaptation relationships between each module and each sub-operation and the corresponding response operation in the display system.
[0108] As an optional example, the preset operation includes a first sub-operation and a second sub-operation; the data request module is suitable for requesting to obtain the attribute information and original data of the target object in response to the first sub-operation; the floating window creation module is suitable for creating a floating window in response to the second sub-operation.
[0109] As another optional example, the preset operation includes a first sub-operation, a second sub-operation and a third sub-operation; the data request module is suitable for requesting to obtain the attribute information of the target object in response to the first sub-operation; and is suitable for requesting to obtain the original data of the target object in response to the second sub-operation; the floating window creation module is suitable for creating a floating window in response to the third sub-operation.
[0110] In a specific implementation, the display system can adopt a variety of configurations.
[0111] As an optional example, the floating window creation module, the data request module and the display module in the display system can be set in the browser as plug-ins and can interact with the browser.
[0112] As another optional example, the floating window creation module, the data request module and the display module in the display system can be integrated into a target object display client, wherein the target object display client is arranged outside the browser and can interact with the browser.
[0113] As another optional example, at least one of the floating window creation module, data request module and display module in the display system can be set in the browser as a plug-in, and the remaining modules can be integrated into the target object display client. Among them, the corresponding module set in the browser can interact with the browser; the target object display client is set outside the browser and can interact with the browser directly and / or interact with the browser through the module set in the browser.
[0114] In order to enable those skilled in the art to better understand and implement the embodiments of the present invention, specific implementations of the method for displaying target objects of the display system application are given below in combination with some specific examples.
[0115] Continue to refer Figure 2 , the display system 10 may include a floating window creation module 11, a data request module 12 and a display module 13, the data request module 12 may include a first data request unit 121 and a second data request unit 122; the first data request unit 121 may be set in the browser as a plug-in, and may interact with the browser; the second data request unit 122, the floating window creation module 11 and the display module 13 are integrated in the target object display client, the target object display client is set outside the browser, and may interact with the browser directly and / or interact with the browser through the first data request unit 121. Wherein:
[0116] The first data request unit 121 can request the web page to obtain the attribute information of the target object through the browser; the second data request unit 122 can request the browser to obtain the original data of the target object and / or request the source website of the target object to obtain the original data of the target object through the first data request unit 121; the floating window creation module 11 can create a floating window; the display module 13 can display the target object in the floating window based on the acquired attribute information and original data of the target object.
[0117] In a specific implementation, there may be multiple ways for the second data request unit to request the source website of the target object through the first data request unit to obtain the original data of the target object.
[0118] As an optional example, the first data requesting unit may request the source URL in the attribute information of the target object from the web page through a browser, then request the original data of the target object from the corresponding source website according to the source URL, and then pass the obtained original data of the target object to the second data requesting unit in the target object display client.
[0119] As another optional example, the first data requesting unit may request the source URL in the attribute information of the target object from the web page through the browser, and then pass the obtained source URL to the second data requesting unit in the target object display client, and then the second data requesting unit may request the corresponding source website to obtain the original data of the target object according to the obtained source URL.
[0120] In a specific implementation, the type of the original data of the target object transmitted by the first data request unit to the second data request unit may include at least one of the following:
[0121] The original type of the original data of the target object acquired by the first data requesting unit, for example, a binary type;
[0122] The original type of the original data of the target object is converted by the first data request unit and outputted into a common image format type, for example, png format, jpg format, etc.;
[0123] The original type of the original data of the target object is the character type output after being converted by the first data request unit using a character encoding scheme. For example, the first data request unit can use one or more character encoding schemes such as base64, base122, etc. to convert the original type of the original data of the target object.
[0124] It should be noted that the type of the original data of the target object transmitted by the first data request unit to the second data request unit is not limited to the type shown in the above example, but can also be other types. The above example does not limit the type of the original data of the target object transmitted by the first data request unit to the second data request unit.
[0125] The first data request unit needs to transmit the acquired original data of the target object to the second data request unit. In a specific implementation, a variety of data transmission modes can be used between the first data request unit and the second data request unit. As an optional example, the data transmission mode between the first data request unit and the second data request unit may include at least one of the following:
[0126] First, the first data request unit opens a local website (Web) server, and then the second data request unit exchanges data through the local Web server using Hyper Text Transfer Protocol (HTTP);
[0127] First, the second data request unit opens a local Web server, and then the first data request unit exchanges data with the local Web server using the HTTP protocol;
[0128] Exchange data through the Remote Procedure Call (RPC) protocol, where the RPC protocol allows two programs distributed in different address spaces to exchange data;
[0129] Exchange data via full-duplex communication (WebSocket) protocol, where the WebSocket protocol allows two-way data exchange between connected parties on a TCP link;
[0130] Transmitting exchange data via the browser's native messaging mechanism;
[0131] The data is transferred and exchanged by reserving a local shared readable and writable directory and / or a local shared document accessible by the first data request unit and the second data request unit, wherein the first data request unit saves the target object to the local shared readable and writable directory and / or the local shared document so that the second data request unit can share it;
[0132] Exchange data by listening to and sharing the system's clipboard transfers;
[0133] The data is transmitted and exchanged through remote thread technology, wherein the remote thread technology is a technology for entering the memory address space of another process by creating a remote thread in the process. For example, the second data request unit can enter the memory address space of the browser process to obtain the data saved by the first data request unit by creating a thread in the process of the browser.
[0134] It should be noted that the transmission method between the first data request unit and the second data request unit is not limited to the implementation method shown in the above example, and other implementation methods may also be used. The above example does not impose any limitation on the transmission method between the first data request unit and the second data request unit.
[0135] In order to enable those skilled in the art to better understand and implement the embodiments of the present invention, specific applications of the target object display method in a display system are given below in combination with some specific examples.
[0136] Example 1:
[0137] Continue to refer to Figure 2The display system 10 may include a floating window creation module 11, a data request module 12 and a display module 13, the data request module 12 may include a first data request unit 121 and a second data request unit 122; the first data request unit 121 may be set in a browser as a plug-in and may interact with the browser; the second data request unit 122, the floating window creation module 11 and the display module 13 are integrated in a target object display client, the target object display client is set outside the browser, and may interact with the browser directly and / or interact with the browser through the first data request unit 121.
[0138] Among them, the preset operation may include a first sub-operation and a second sub-operation. The first data request unit may request the web page to obtain the attribute information of the target object through the browser in response to the first sub-operation. The second data request unit may request the browser to obtain the original data of the target object in response to the first sub-operation. The floating window creation module may create a floating window in response to the second sub-operation.
[0139] As a specific example, the first sub-operation may include selecting the target object, and the second sub-operation may include dragging the target object along a preset track for a preset distance. The display process of the target object is described in detail below in conjunction with this application scenario.
[0140] First, the user's finger selects the target object. In response to the operation of the user's finger selecting the target object, the first data request unit can request the attribute information of the target object from the web page displayed by the browser, obtain the attribute information of the target object from the cascading style sheet, and save the obtained attribute information of the target object in a local shared document accessible by the first data request unit and the second data request unit; at the same time, the second data request unit requests the original data of the target object from the browser, and parses the buffered data of the browser to obtain the original data of the target object.
[0141] Next, when the user's finger drags the target object along a preset trajectory (for example, toward the right edge of the web page) to a preset distance, such as 10 pixels, the floating window creation module responds to the dragging operation and can create a floating window of the same size as the original size of the target object on the top of the display interface of the electronic device based on the attribute information of the target object and the floating window creation parameters pre-customized by the user (for example, the creation position and creation size of the floating window).
[0142] When the second data requesting unit obtains the attribute information and original data of the target object in the local shared document and the floating window creation module completes the creation of the floating window, the second data requesting unit can display the target object in the floating window through the display module based on the obtained attribute information and original data of the target object.
[0143] In a specific implementation, when each sub-operation includes dragging and dropping the target object, the reason why the display system can respond to the preset operation is that the first data request unit set on the browser adds a draggable attribute to the element corresponding to the target object in the web page based on the Document Object Model (DOM). When the user drags and drops the target object, the first data request unit can capture the corresponding behavior and respond to it / notify the target object display client to respond to it.
[0144] As another specific example, it can also be that: the floating window creation module creates a floating window in response to the first sub-operation; the first data request unit can request the browser to obtain the attribute information of the target object in response to the second sub-operation; and the second data request unit can request the browser to obtain the original data of the target object in response to the second sub-operation.
[0145] As a specific example, the first sub-operation may include selecting the target object, and the second sub-operation may include dragging the target object along a preset track by a preset distance.
[0146] It should be noted that the manner of human-computer interaction of the electronic device and the manner of implementing the corresponding preset operations are not limited to the above-mentioned manners, but may also be other manners, and the above examples do not constitute any limitation thereto.
[0147] Example 2:
[0148] The difference from Example 1 is that the preset operation may include a first sub-operation, a second sub-operation, and a third sub-operation. In response to the first sub-operation, the first data request unit may request the web page through the browser to obtain the attribute information of the target object; in response to the second sub-operation, the second data request unit may request the browser to obtain the original data of the target object; and in response to the third sub-operation, the floating window creation module may create a floating window.
[0149] In a specific example, the first sub-operation may include selecting the target object, the second sub-operation may include dragging the target object by a preset distance, and the third sub-operation may include stopping the selection of the target object after dragging the target object to the specific area; wherein the preset distance may be any distance including 0 pixels. The display process of the target object is described in detail below in conjunction with this application scenario.
[0150] First, the user selects the target object with the left button of the mouse. In response to the operation of the user selecting the target object with the left button of the mouse, the first data request unit can request the attribute information of the target object from the web page displayed by the browser, obtain the attribute information of the target object from the cascading style sheet, and save the obtained attribute information of the target object in a local shared document that can be accessed by the first data request unit and the second data request unit; at the same time, the first data request unit creates the specific area in the web page.
[0151] Then, when the user drags the target object with the left mouse button to reach the preset distance, for example, 10 pixels, the first data request unit, in response to the second sub-operation, can request the source website of the target object to obtain the original data of the target object according to the source URL of the target object in the attribute information of the target object, and then saves the obtained original data of the target object in the local shared document.
[0152] Next, when the customer drags the target object to the specific area with the left mouse button and releases the left mouse button, the second data request unit responds to the operation of dragging the target object to the specific area and then releasing the left mouse button, and can create a floating window with a size ratio of 1:4 to the display interface of the electronic device at the top of the display interface of the electronic device based on the attribute information of the target object and the floating window creation parameters pre-customized by the user (for example, the creation position and creation size of the floating window).
[0153] When the second data request unit can obtain the attribute information and original data of the target object in the local shared document and the floating window creation module completes the creation of the floating window, the second data request unit can display the target object in the floating window through the display module based on the obtained attribute information and original data of the target object.
[0154] Accordingly, an embodiment of the present invention further provides an electronic device, referring to Figure 3 , the electronic device 20 may include a processor 21 and a display 22, wherein:
[0155] The processor 21 is adapted to display the target object in the webpage in the floating window by executing the steps of the method for displaying the target object in any of the above embodiments;
[0156] The display 22 is suitable for providing a display interface for displaying the target object.
[0157] In a specific implementation, the data corresponding to the web page displayed by the browser can be cached locally.
[0158] In a specific implementation, the processor may be any one or more of a central processing unit (CPU), a controller, a microcontroller, a microprocessor, etc.
[0159] In a specific implementation, the display may be used only to provide a display interface; or, in addition to providing a display interface, the display may also provide human-computer interaction. For example, the display is a touch screen, and human-computer interaction may be provided by pressing or touching.
[0160] In a specific implementation, the electronic device can be a computer PC, a mobile phone, a tablet device, or any other computer device with a display interface and on which a resource manager-type program can be installed, in which the processor, the memory, and the display are integrated into one, or a cloud platform in which the processor, the memory, and the display are distributed.
[0161] In a specific implementation, the electronic device may support the use of a mouse, a finger, a stylus, or any other interactive operation method.
[0162] In addition, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is running, the steps of the method for displaying a target object in any of the aforementioned embodiments can be executed. For details, please refer to the aforementioned embodiments, which will not be repeated here.
[0163] In a specific implementation, the computer-readable storage medium may be any appropriate readable storage medium such as an optical disk, a mechanical hard disk, a solid-state hard disk, etc.
[0164] Although the embodiments of this specification are disclosed as above, the present invention is not limited thereto. Any person skilled in the art can make various changes and modifications without departing from the spirit and scope of the present invention, so the protection scope of the present invention shall be subject to the scope defined by the claims.
Claims
1. A method for displaying a target object, characterized in that: Suitable for displaying a target object in a web page, the display method includes: In response to a preset operation on the target object, a floating window is created to request to obtain attribute information and original data of the target object; Based on the acquired attribute information and original data of the target object, the target object is displayed in the floating window.
2. The display method according to claim 1, characterized in that: The preset operation includes a first sub-operation and a second sub-operation, and in response to the preset operation on the target object, creating a floating window and requesting to obtain the attribute information and original data of the target object includes: In response to the first sub-operation, requesting to obtain the attribute information and original data of the target object; In response to the second sub-operation, the floating window is created.
3. The display method according to claim 1, characterized in that: The preset operation includes a first sub-operation, a second sub-operation and a third sub-operation, and in response to the preset operation on the target object, creating a floating window and requesting to obtain the attribute information and original data of the target object includes: In response to the first sub-operation, requesting to obtain attribute information of the target object; In response to the second sub-operation, requesting to obtain original data of the target object; In response to the third sub-operation, the floating window is created.
4. The display method according to any one of claims 1 to 3, characterized in that: The request to obtain the attribute information of the target object includes: The attribute information of the target object is obtained from the web page through a browser.
5. The display method according to any one of claims 1 to 3, characterized in that: The request to obtain the original data of the target object includes at least one of the following: Requesting the source website of the target object to obtain the original data of the target object through a browser; A request is made to the browser to obtain the original data of the target object.
6. The display method according to claim 1, characterized in that: The creating of the floating window includes at least one of the following: Creating the floating window with the current operation position of the preset operation as the center point of the floating window; The floating window is created on top of the display screen.
7. The display method according to claim 1, characterized in that: The creating of the floating window includes at least one of the following: Creating the floating window with a preset size; The floating window is created according to the acquired attribute information of the target object.
8. A display system, suitable for displaying a target object in a web page, characterized in that: include: A floating window creation module, adapted to create a floating window in response to a preset operation on the target object; A data request module, adapted to request to obtain attribute information and original data of the target object in response to a preset operation on the target object; The display module is adapted to display the target object in the floating window based on the acquired attribute information and original data of the target object.
9. The display system according to claim 8, characterized in that: The preset operation includes a first sub-operation and a second sub-operation; The data request module is adapted to request, in response to the first sub-operation, to obtain the attribute information and original data of the target object; The floating window creation module is adapted to create a floating window in response to the second sub-operation.
10. The display system according to claim 8, characterized in that: The preset operation includes a first sub-operation, a second sub-operation and a third sub-operation; The data request module is adapted to request, in response to the first sub-operation, to obtain the attribute information of the target object; and in response to the second sub-operation, requesting to obtain original data of the target object; The floating window creation module is adapted to create a floating window in response to the third sub-operation.
11. The display system according to any one of claims 8 to 10, characterized in that: The data request module is adapted to request the source website of the target object to obtain the original data of the target object through a browser; and / or, Suitable for requesting the browser to obtain the original data of the target object.
12. The display system according to any one of claims 8 to 10, characterized in that: The data request module comprises: A first data request unit is provided in the browser; The second data requesting unit is adapted to request the source website of the target object to obtain the original data of the target object through the first data requesting unit.
13. The display system according to claim 12, characterized in that: The first data request unit is adapted to request, through a browser, to obtain a source URL in the attribute information of the target object from the web page, request the original data of the target object from the corresponding source website according to the source URL, and transmit the obtained original data of the target object to the second data request unit; The second data requesting unit is adapted to obtain original data of the target object transmitted by the first data requesting unit.
14. The display system according to claim 12, characterized in that: The first data request unit is adapted to request a source URL in the attribute information of the target object from the web page through a browser, and pass the acquired source URL to the second data request unit; The second data request unit is adapted to request the corresponding source website to obtain the original data of the target object according to the source URL.
15. The display system according to claim 12, characterized in that: The floating window creation module, the second data request unit and the display module are integrated in a target object display client, and the target object display client is suitable for interacting with the browser to display the target object in the web page displayed by the browser through the floating window.
16. An electronic device, characterized in that: comprising a processor and a display, wherein: The processor is adapted to display the target object in the web page in the floating window by executing the steps of the method according to any one of claims 1 to 7; The display is suitable for providing a display interface for displaying the target object.
17. A computer-readable storage medium having a computer program stored thereon, characterized in that: The computer program executes the steps of the method according to any one of claims 1 to 7 when running.
Citation Information
Patent Citations
Method and device for displaying specified element in web page in browser
CN104361082A
Method and system for dragging webpage picture to software interface
CN106843910A
Information showing method and device, terminal and readable storage medium
CN107992243A
Picture editing method, electronic device and device with storage function
CN109933767A
Screen capture processing method, electronic equipment and storage medium
CN114253448A
