CN109960562B - Information display method and device and computer readable storage medium - Google Patents

Information display method and device and computer readable storage medium Download PDF

Info

Publication number
CN109960562B
CN109960562B CN201910267993.1A CN201910267993A CN109960562B CN 109960562 B CN109960562 B CN 109960562B CN 201910267993 A CN201910267993 A CN 201910267993A CN 109960562 B CN109960562 B CN 109960562B
Authority
CN
China
Prior art keywords
display
information
floating layer
displayed
data transfer
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.)
Active
Application number
CN201910267993.1A
Other languages
Chinese (zh)
Other versions
CN109960562A (en
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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201910267993.1A priority Critical patent/CN109960562B/en
Publication of CN109960562A publication Critical patent/CN109960562A/en
Application granted granted Critical
Publication of CN109960562B publication Critical patent/CN109960562B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
    • G06F3/0488Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures
    • 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

Landscapes

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

Abstract

The invention discloses an information display method, an information display device and a computer readable storage medium, belonging to the technical field of computers, wherein in the method provided by the invention, information to be displayed sent by a server based on a heartbeat packet is received in the operation process; if the information displayable region on the current display page does not have the display floating layer, generating the display floating layer on the information displayable region on the current display page; acquiring content to be displayed corresponding to the address information; and displaying the acquired content to be displayed in the display floating layer. The information display method and the information display device have the advantages that the display floating layer is generated in the information display area which can be displayed on the current page, so that the display of the display floating layer cannot be cancelled even if the data transfer application retreats to the background, the exposure of the content to be displayed and displayed based on the display floating layer is improved, in addition, the information display is carried out based on the data transfer application, and other APPs are not needed to specially develop the information display area.

Description

Information display method and device and computer readable storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to an information display method and apparatus, and a computer-readable storage medium.
Background
In order to improve the popularity of products, product popularization is generally performed, and along with the development of science and technology, product popularization methods are higher and higher, for example, activities, advertisements and the like related to products are put on electronic equipment, and how to perform information display such as the activities, the advertisements and the like on the equipment is a technical problem to be solved.
The conventional information display method needs to display published information in each information-related Application program (APP), so that each APP needs to be researched and developed, each APP has a display area for displaying the information, and then the information is displayed on the display area, so that research and development burden is caused based on the operation, the research and development workload is large, the display areas may be different due to different functions of each APP, and the developed display areas have poor universality; in addition, prior art needs APP work in the proscenium when above-mentioned show region show information, and when APP retreated to backstage during operation, the information of show also can be unseen thereupon, just so can't accomplish the timely popularization of information.
Therefore, how to continue to display information after the APP falls back to the background and other APPs are not required to develop information display areas specifically is one of the considerable problems.
Disclosure of Invention
Embodiments of the present invention provide an information display method, an information display apparatus, and a computer-readable storage medium, which are used to continue to display information after an APP moves back to a background and do not require other APPs to specially develop an information display area.
On one hand, the embodiment of the invention provides an information display method, which is applied to data transfer application, wherein the data transfer application is used for providing a data transfer function for an application needing data transfer; and the method, comprising:
in the operation process, receiving information to be displayed sent by a server based on a heartbeat packet, wherein the information to be displayed carries position information of an information displayable region and address information of content to be displayed;
if the displayable information area on the current display page does not have a display floating layer, generating a display floating layer on the displayable information area on the current display page;
acquiring the content to be displayed corresponding to the address information;
and displaying the acquired content to be displayed in the display floating layer.
Optionally, the display float layer is a floating window.
On the other hand, an embodiment of the present invention provides an information display apparatus, which is disposed in a data transfer application, where the data transfer application is configured to provide a data transfer function for an application that needs data transfer; and the apparatus, comprising:
the receiving unit is used for receiving information to be displayed sent by the server based on the heartbeat packet in the operation process, wherein the information to be displayed carries position information of an information displayable region and address information of content to be displayed;
the display floating layer generating unit is used for generating a display floating layer on the displayable information area on the current display page if the displayable information area on the current display page does not have the display floating layer;
the acquisition unit is used for acquiring the content to be displayed corresponding to the address information;
and the display unit is used for displaying the acquired content to be displayed in the display floating layer.
In one aspect, an embodiment of the present invention provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor executes the computer program to implement the information presentation method provided in the present invention.
In one aspect, an embodiment of the present invention provides a computer-readable medium, in which processor-executable instructions are stored, where the processor-executable instructions are used to execute the information presentation method provided by the present invention.
The invention has the beneficial effects that:
according to the information display method, the information display device and the computer readable storage medium, the information to be displayed is obtained based on the heartbeat packet of the server, so that a communication link for sending the information to be displayed is not required to be established between the data transfer application and the server, and signaling interaction is reduced; in addition, the display floating layer is generated on the current page based on the data transfer application, and the content to be displayed is displayed in the display floating layer, so that an information display area specially developed by other APPs is not needed.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
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 specification, illustrate embodiments of the invention and together with the description serve to explain the invention and not to limit the invention. In the drawings:
fig. 1 is a schematic view of an application scenario of an information presentation method according to an embodiment of the present invention;
fig. 2 is a schematic flow chart of an information displaying method according to an embodiment of the present invention;
fig. 3a is a schematic diagram of a terminal device according to an embodiment of the present invention;
fig. 3b is a second schematic diagram of a terminal device according to an embodiment of the present invention;
fig. 4 is a schematic diagram illustrating an effect of a display floating layer generated in an information displayable region on a current page according to an embodiment of the present invention;
fig. 5a is a schematic view illustrating a first effect of displaying a content to be displayed based on an immovable display floating layer according to an embodiment of the present disclosure;
fig. 5b is a schematic diagram illustrating a second effect of displaying a content to be displayed based on an immovable display floating layer according to an embodiment of the present disclosure;
fig. 6a is a schematic view illustrating a first effect of displaying a content to be displayed based on a movable display floating layer according to an embodiment of the present invention;
fig. 6b is a schematic diagram illustrating a second effect of displaying a content to be displayed based on a movable display floating layer according to an embodiment of the present invention;
fig. 7 is a schematic flow chart illustrating the display floating layer being moved according to the movement track corresponding to the movement instruction according to the embodiment of the present invention;
FIG. 8 is a schematic diagram illustrating the effect of position information of each touch event according to an embodiment of the present invention;
fig. 9 is a schematic structural diagram of an information display apparatus according to an embodiment of the present invention.
Detailed Description
The information display method, the information display device and the computer-readable storage medium provided by the embodiment of the invention are used for continuously displaying information after the APP falls back to the background and do not need other APPs to specially develop the information display area.
The preferred embodiments of the present invention will be described below with reference to the accompanying drawings of the specification, it being understood that the preferred embodiments described herein are merely for illustrating and explaining the present invention, and are not intended to limit the present invention, and that the embodiments and features of the embodiments in the present invention may be combined with each other without conflict.
To facilitate understanding of the invention, the present invention relates to technical terms in which:
1. the terminal device is an electronic device that can install various applications and can display an object provided in the installed application, and the electronic device may be mobile or fixed. For example, a mobile phone, a tablet computer, various wearable devices, a vehicle-mounted device, a Personal Digital Assistant (PDA), a point of sale (POS), a monitoring device in a subway station, or other electronic devices capable of implementing the above functions may be used.
2. Application programs (APPs), which are computer programs that can perform one or more specific tasks, have a visual display interface and can interact with users, such as electronic maps and WeChat, and are all called Application programs.
3. The APP foreground means that the APP works on the interface of the uppermost layer of the terminal equipment, and if office software used in office works needs to work on the foreground; the APP background means that the APP is in a working state but is not displayed on the uppermost interface of the terminal device, and if a cell phone housekeeper generally works in the background.
4. The suspension window, the interface that indicates the suspension on the screen, this suspension window show on other APP interfaces, do not receive APP operating condition's restriction, promptly, no matter APP work is in the proscenium or work at the background, and this suspension window all can demonstrate.
5. The heartbeat package is used for enabling the application program to send simple information to the server at regular time so as to inform the server that the application program is in an online state, and therefore long connection between the application program and the server is maintained. According to the invention, the information to be displayed is carried in the heartbeat packet, so that the data transfer application program generates a display floating layer on the current page according to the received position information of the information-displayable region carried by the information to be displayed, and then displays the content to be displayed corresponding to the address information carried by the information to be displayed in the generated display floating layer. Therefore, the display of the content to be displayed is realized, and a display area does not need to be specially developed on the application needing the data transfer function, so that the universality of information display is realized; in addition, because the display floating layer is generated in the information displayable area on the current page, the display floating layer does not disappear even if the data transfer application quits from the foreground to work in the background, and the continuous display of the display information is realized when the data transfer application quits to the background.
In order to solve the problem that information cannot be continuously displayed when the APP moves back to the background in the prior art, an embodiment of the present invention provides a solution, referring to an application scenario diagram shown in fig. 1, where the scenario includes at least one terminal device (terminal device 100-1 to terminal device 100-N) and a server 200, where: the terminal device 100 is provided with a data transfer application, the data transfer application is used for providing a data transfer function for an application needing data transfer, the data transfer application can run independently and can also interact with other applications APP through interfaces for a Software Development Kit (SDK), when the application needing data transfer shows information such as activities based on the terminal device 100-1, the server 200 can make content needing to be shown, namely content to be shown in the invention, for transmission, address information is generated based on the content to be shown, the address information is used for sending the content to the data transfer application, and then the address information is carried in the information to be shown so as to be sent to the data transfer application. In addition, the server 200 also carries the position information of the information-exposable area in the information to be displayed. When the server 200 sends the information to be displayed to the data transfer application, because the heartbeat packet is frequently required to be sent to the data transfer application, the server 200 carries the information to be displayed in the heartbeat packet and sends the information to the data transfer application, in this way, after the data transfer application receives the heartbeat packet, the information to be displayed is analyzed from the heartbeat packet, if the information displayable region on the current display page does not have a display floating layer, the display floating layer is generated on the information displayable region on the current display page, then the content to be displayed corresponding to the address information carried by the information to be displayed is obtained, and the obtained content to be displayed is displayed in the generated display floating layer. Based on the method, the display of the content to be displayed is finished, and the display floating layer is generated on the current display page (the uppermost layer), so that the generated display floating layer cannot disappear even if the data transfer application retreats to the background to work, and the divergence and the exposure of the display content are improved. In addition, the data transfer application is separately configured, and the data transfer application is used for implementing information display, so that an information display area is not required to be specially set for other applications needing data transfer, only the data transfer in the invention is required, and the universality is high.
The terminal devices 100-1 to 100-N are communicatively connected to the server 200 via a network 300, and the network 300 may be a local area network, a wide area network, or the like. The terminal device may be a portable device (e.g., a mobile phone, a tablet, a notebook Computer, etc.) or a Personal Computer (PC), and the data transfer application in the terminal device 100 may be integrated in the face payment device. The server 200 may be any device capable of providing internet services, wherein the server 200 may be a server, a server cluster composed of several servers, or a cloud computing center. It should be noted that the server 200 and the server for processing data transfer in the present invention may be the same or separate, and may be determined according to actual situations.
Specifically, each terminal device in the present invention may include one or more processors 110 (CPU), a memory 120, an input device 130, an output device 140, a database 150, and the like, wherein the input device 130 may include a keyboard, a mouse, a touch screen, and the like, and the output device 140 may include a Display device, such as a Liquid Crystal Display (LCD), a Cathode Ray Tube (CRT), and the like.
Memory 120 may include Read Only Memory (ROM) and Random Access Memory (RAM), and provides processor 110 with program instructions and data stored in memory 120. In the embodiment of the present invention, the memory 120 may be used to store the program of the information presentation method in the embodiment of the present invention.
The processor 110 is configured to execute the steps of any one of the information displaying method and the lesion identifier according to the embodiment of the present invention by calling the program instructions stored in the memory 120, and the processor 110 is configured to execute the steps according to the obtained program instructions.
The following describes an information presentation method provided according to an exemplary embodiment of the present invention with reference to the following drawings in conjunction with the application scenario of fig. 1. It should be noted that the above application scenarios are merely illustrated for the convenience of understanding the spirit and principles of the present invention, and the embodiments of the present invention are not limited in this respect. Rather, embodiments of the present invention may be applied to any scenario where applicable.
The embodiments of the present invention are schematically illustrated by taking the application scenario diagram shown in fig. 1 as an example.
Based on the foregoing embodiment, referring to fig. 2, a schematic flow chart of the information displaying method provided by the embodiment of the present invention is applied to a data transfer application, where the data transfer application is configured to provide a data transfer function for an application that needs data transfer, and the data transfer application may be implemented according to the following steps:
s21, when the data transfer application program is needed to display the content to be displayed, the server generates information to be displayed for displaying the content to be displayed.
Alternatively, the content to be presented in the present invention may be, but is not limited to, activity content and the like, and the activity content may be a payment activity and the like, such as a payment deactivation activity or a payment red envelope activity and the like.
Specifically, when the active content needs to be displayed, the active content may be produced in advance, and the server may configure address information for the active content in order to send the active content to the data transfer application. Then, the server may determine, according to the resolution of the common terminal device, the location information of the information displayable region for presenting the active content, and then generate the information to be displayed by using the location information of the information displayable region and the address information.
In particular, the resolution is generally expressed as: the number of pixels in each direction, the number of pixels in the horizontal direction x the number of pixels in the vertical direction, and the resolutions of different terminal devices are different, and for a terminal device having a length greater than a width, as shown in fig. 3a, the number of pixels in the horizontal direction is greater than the number of pixels in the vertical direction, and for a terminal device having a length less than a width, as shown in fig. 3b, the number of pixels in the horizontal direction is less than the number of pixels in the vertical direction, based on the above description, the server may determine the position information of the information displayable region according to the resolution of the terminal device, for example, the field of view of the user is generally concentrated at the middle position of the screen of the terminal device, so the position information near the middle position of the screen may be used as the position information of the information displayable region, based on which the position information in the middle of the screen may be determined based on the, as may be expressed in pixel coordinates, and then the coordinates of the information-presentable region are determined based on the pixel coordinates in the middle of the screen.
Optionally, the server may further determine the location information of the information-exposable area according to the following method: the data transfer application determines the resolution of the terminal equipment where the data transfer application is located, then when the heartbeat packet is sent to the server, the determined resolution is carried in the heartbeat packet and sent to the server, and the server determines the position information of the information displayable area according to the received resolution.
Alternatively, the area of the information-exposable region may be determined according to the presentation form of the content to be presented, and when the content to be presented is presented in the form of a picture, the size of the information-exposable region may be determined based on the resolution of the picture, so as to present the picture with the best quality to the user.
Optionally, the position information of the information displayable region in the embodiment of the present invention may be expressed as: the coordinates of the center point may show the length and width of the information area. Optionally, the determined position information of the information exposable area may also be expressed as: the coordinates of the center point, the length and width of the displayable information area, and the format and time length of the loaded information content. Of course, other representation methods can be provided, and the concrete conditions can be determined according to actual conditions.
The address information of the information to be displayed in the present invention may be, but is not limited to, a Uniform Resource Locator (URL) and the like.
And S22, the server carries the information to be displayed in the heartbeat packet and sends the information to the data transfer application.
During the operation process of the data transfer application, heartbeat packets are continuously sent to the server to maintain long connection between the data transfer application and the server. Likewise, the server will also respond to heartbeat packets of the data transfer application. Based on the principle, in order to reduce the signaling interaction between the server and the data transfer application, when the server sends the information to be displayed to the data transfer application program, the information to be displayed is transmitted based on the heartbeat packet between the server and the data transfer application program, namely, the information to be displayed is added into the heartbeat packet, and then the information to be displayed is sent when the server sends the heartbeat packet to the data transfer application method. Therefore, a connection is not needed to be established for transmitting the information to be displayed, and the heartbeat packet is sent by the data transfer application and the server at regular time, so that the signaling consumption of the server and the data transfer application is effectively reduced by sending the information to be displayed based on the heartbeat packet.
S23, in the operation process, after receiving information to be displayed sent by a server based on a heartbeat package, if the information displayable region on the current display page does not have a display floating layer, generating a display floating layer on the information displayable region on the current display page.
Specifically, the information to be displayed carries position information of an information displayable region and address information of the content to be displayed.
Specifically, the data transfer application can run in the foreground or in the background, and the data transfer application receives the heartbeat packet sent by the server, so that the information to be displayed can be analyzed from the heartbeat packet.
Specifically, for the same information to be displayed, the server generally carries the information to be displayed in each heartbeat packet, so that when the data transfer application receives the heartbeat packet sent by the server, the previous heartbeat packet may carry the information to be displayed, so the data transfer application has generated the display floating layer on the current page and displayed the content to be displayed corresponding to the address information in the generated display floating layer, so it is necessary to determine whether the information displayable region on the current display page has the display floating layer, if not, a presentation float is generated directly on the displayable information area on top of the current presentation page, which, with reference to the presentation float shown in figure 4, the page below the display floating layer can be a page displayed based on the data transfer application, and can also be a page displayed based on other applications for the data transfer application working in a background; if yes, it indicates that the content to be displayed is displayed, so step S23 does not need to be executed this time.
Alternatively, the display floating layer in the present invention can be, but not limited to, a floating window, and any floating layer that can be displayed at the uppermost layer and still be displayed at the uppermost layer without being affected by the background operation of the data transfer application can be applied to the present invention.
And S24, acquiring the content to be displayed corresponding to the address information.
In this step, address information of the content to be displayed is taken as an example for explanation, and when the URL address of the content to be displayed is analyzed from the heartbeat packet, the content to be displayed is acquired based on the URL address.
And S25, displaying the acquired content to be displayed in the display floating layer.
In this step, after the content to be displayed is acquired, the acquired content to be displayed is displayed in the display floating floor.
Specifically, step S25 may be implemented according to the following procedure:
and displaying the content to be displayed in a webpage view form in the display floating layer.
Optionally, the presentation form of the content to be presented in the present invention may be, but is not limited to, pictures, videos, texts, virtual reality VR, augmented reality AR, 3D content, and the like.
By adopting the method, the content to be displayed is displayed in the display floating layer generated on the information displayable area on the current page, so that the effect that the display floating layer cannot disappear even if the data transfer application program works in a background is achieved. In addition, because the data transfer application realizes the information display, the information display area does not need to be configured on other applications needing data transfer, and the universality of habit display is improved.
Based on any of the above embodiments, the information to be displayed in the present invention further carries indication information indicating whether the display floating layer is movable; the information display method provided by the invention further comprises the following steps:
if the indication information indicates that the display floating layer is allowed to be moved, the display floating layer is configured to be a movable display floating layer.
In practical application, a user of the terminal device may adjust the position of the floating layer according to the actual situation of the user, so that in the embodiment of the present invention, whether the display floating layer is movable or not may be set, based on which indication information indicating whether the display floating layer is movable or not may be configured, and then different values are given to the indication information to indicate the state of the display floating layer, for example, the value of the indication information indicating whether the display floating layer is movable or not is configured as 1 to represent that the display floating layer is allowed to move, and the value of the indication information indicating whether the display floating layer is movable or not is configured as 0 to represent that the display floating layer is not.
Specifically, the server may configure a value of the indication information whether to be movable or not according to the size of the region where the information can be displayed, and if the area of the information can be displayed is larger than a preset area threshold, it indicates that the current information can be displayed in a larger region, that is, the generated display floating layer is larger, and the meaning of movement of the display floating layer is not large, so that the indication information whether to be movable or not may be configured as 0, that is, movement is not allowed. If the area of the information display area is smaller than the preset area threshold, it is indicated that the current information display area is smaller, and correspondingly, the occupied area of the display floating layer is smaller, so that the display floating layer can be set to be movable, and a user can drag the display floating layer to other positions according to the requirement of the user, therefore, the movable indication information can be configured to be 1, namely, the movement is allowed.
Based on the description, the data transfer application can extract indication information whether the display floating layer is movable or not from the information to be displayed, if the value of the indication information is 1, the indication information indicates that the display floating layer is allowed to be moved, and the attribute of the display floating layer is configured into the movable display floating layer; and if the value of the indication information is 0, the indication information indicates that the display floating layer is not allowed to be moved, and the attribute of the display floating layer is configured into the immovable floating layer.
In specific implementation, when the display floating layer is set to be not allowed to move, a larger displayable information area is set to fill up a screen corresponding to a direction in which the number of pixels in the terminal device is smaller, and accordingly, the display floating layer may be larger, and position information of the displayable information area is set based on the purpose, as shown in fig. 5a and 5b, fig. 5a shows a first schematic diagram of an effect of displaying a content to be displayed based on the display floating layer which is not movable, the diagram is a display floating layer generated on the terminal device in which the number of pixels in the horizontal direction is smaller than that in the vertical direction, and it can be seen that the display floating layer occupies the screen in the horizontal direction of the terminal device; and fig. 5b is a schematic diagram of a second effect of displaying the content to be displayed based on the immovable display floating layer, where the display floating layer is generated on the terminal device whose pixel number in the horizontal direction is greater than that in the vertical direction, and it can be seen that the floating layer occupies the screen in the vertical direction of the terminal device.
When the display floating layer is set to allow movement, a smaller displayable information area is set, and accordingly, the display floating layer generated based on the smaller displayable information area is smaller, as shown in fig. 6a and 6b, fig. 6a shows a first schematic diagram of an effect of displaying a content to be displayed based on the movable display floating layer, where the diagram is a display floating layer generated on a terminal device whose pixel number in the horizontal direction is smaller than that in the vertical direction, and a page below the display floating layer may be a page for data transfer application or a page displayed based on other applications, and it can be seen that the smaller display floating layer has a smaller influence on the page below; fig. 6b is a schematic diagram of a second effect of displaying content to be displayed based on a movable display floating layer, where the display floating layer is generated on a terminal device whose pixel number in the horizontal direction is greater than that in the vertical direction, and the display floating layer is at the upper right corner, and generally this position does not have a large influence on the underlying page.
On this basis, the information display method provided by the embodiment of the invention further comprises the following steps:
and if an interactive instruction aiming at the display floating layer is received, executing corresponding operation on the display floating layer according to the interactive instruction.
Specifically, the interactive instruction in the present invention may be, but is not limited to, a click instruction, a double click instruction, a long press instruction, a move instruction, and the like, and different operations may be configured for different instructions in advance. Thus, when it is detected that the user triggers the interactive instruction and identifies which of the interactive instructions, the display floating layer is correspondingly processed according to the identified instruction, which is described in detail below:
and when the interactive instruction is a click instruction, zooming the display floating layer according to the click instruction, or displaying detail information of the content to be displayed on the display floating layer, and the like.
Optionally, in order to improve user experience, a close option may be set in the upper right corner of the display floating layer, referring to the upper right corner of the display floating layer shown in fig. 6a, when it is detected that a click instruction triggered by a user is for the close option, the display floating layer is closed, and then the content to be displayed is not displayed.
Specifically, when a user triggers an interactive command based on a presentation float, at least two of a press screen (DOWN) touch event, a MOVE (MOVE) touch event, and an off screen (UP) touch event are generally generated, and the identified interactive command is determined by monitoring whether any two events are generated.
In specific implementation, the interactive instruction triggered by the user can be determined as a click instruction according to the following method: and if the touch events of the display floating layer triggering the DOWN touch event and the UP touch event are detected, and the time interval between the two touch events is determined to be smaller than a preset interval threshold value, determining that a click command for the display floating layer is received.
Optionally, when the user triggers the long-press instruction, a closing operation and the like may be performed on the display floating layer, which may be determined according to an actual situation. Specifically, if it is detected that a DOWN touch event and an UP touch event are generated for the display floating layer, and a time interval between the UP touch event and the DOWN touch event is greater than a preset interval threshold, it is determined that a long press instruction for the display floating layer is received.
Optionally, when the user triggers the double-click command, the display floating layer may also be scaled or selected for selecting the content to be selected, but the functions executed by the click command and the double-click command are different when the final implementation is ensured. In specific implementation, if it is detected that a DOWN touch event, an UP touch event, a DOWN touch event, and an UP touch event are continuously triggered for the display floating layer, it is determined that a double-click command is received.
Optionally, when the interaction instruction is a movement instruction, if the movement instruction for the display floating layer is received, and if the indication information indicates that the display floating layer is allowed to be moved, the display floating layer is moved according to a movement track corresponding to the movement instruction.
Specifically, it may be determined that a movement instruction for the display floating layer is received according to the following method:
and if a screen DOWN touch event, at least one mobile MOVE touch event and a screen UP touch event triggered to press the display floating layer are monitored in sequence, determining that a mobile instruction for the display floating layer is received.
When it is detected that the user triggers a movement instruction for the display floating layer, the display floating layer may be moved according to a movement track corresponding to the movement instruction by using the method shown in fig. 7:
and S71, recording the position information of the touch point corresponding to each touch event.
And S72, after the current touch event occurs, moving the display floating layer displayed at the position information of the touch point corresponding to the previous touch event to the position information of the touch point corresponding to the current touch event, and displaying the display floating layer.
Referring to the movable display floating layer shown in fig. 6b, when a user executes a movement instruction based on the display floating layer, the position information of each touch event may be recorded when detecting each touch event based on the movement instruction, as shown in fig. 8, which shows an effect diagram of the position information of each touch event, assuming that the display floating layer is at the position information corresponding to the n-1 MOVE touch event, when detecting that the n-1 MOVE touch event occurs, the position information of the n-1 MOVE touch event is recorded, and the display floating layer is moved from the position information corresponding to the n-1 MOVE touch event to the position information corresponding to the n-MOVE touch event. Therefore, the floating layer is displayed according to the movement track of the user, so that the requirements of the user are met, and the satisfaction degree of the user on data transfer application is improved.
In specific implementation, when the display floating layer is a floating window, the data transfer application may use a method of rewriting a boulean dispatchevent (MotionEvent event) by View of the floating window to realize that the floating window is movable.
Specifically, the parameter event of the dispatctchouchvent may listen for three touch events:
action _ DOWN event occurs, indicating that the object presses the screen, it is determined that a DOWN touch event occurs.
Action _ MOVE event occurs, indicating that an object MOVEs on the screen, it is determined that a MOVE touch event occurs.
Action _ UP event occurs, indicating that the object leaves the screen, it is determined that an UP touch event occurs.
Based on any of the above embodiments, the information display method provided by the present invention further includes:
if a data transfer instruction is received, canceling the display of the display floating layer;
and when the data transfer is detected to be successful, continuing to display the display floating layer on the information displayable region on the current display page, and displaying the content to be displayed in the display floating layer.
Specifically, the data transfer application in the present invention is also used to provide a data transfer function for other applications, and when the data transfer party sees the activities displayed by the display floating layer, the data transfer method indicated by the activities may be adopted, thereby achieving the activity diffusion effect. When a user transfers data based on a method indicated by an activity, some pages are inevitably generated in the data transfer process, and in order to avoid displaying the content of the pages generated in the data transfer process, the invention provides that when a data transfer instruction triggered by the user is detected, the display of the floating layer is cancelled. And when the data transfer is detected to be successful, continuously displaying the display floating layer on the current display page and the displayable information area, and displaying the content to be displayed in the display floating layer.
Based on any of the above embodiments, the information display method provided by the present invention further includes:
and if the received heartbeat packet sent by the server does not contain the information to be displayed, canceling the display of the display floating layer.
Specifically, when the content to be displayed does not need to be displayed continuously, for example, when an activity is ended or stopped, an empty heartbeat packet, that is, a heartbeat packet containing information to be displayed, is sent to the data transfer application, and when the data application receives the heartbeat packet, the display of the floating layer is cancelled.
Optionally, when the terminal device is required to display other content to be displayed, the server may send an empty heartbeat packet to the data transfer application, that is, a heartbeat packet that does not include information to be displayed, so that the data transfer application cancels display of the display floating layer based on the heartbeat packet, after waiting for a period of time, the server may generate new information to be displayed based on the new content to be displayed, and then carries the new information to be displayed in the heartbeat packet to send to the data transfer application, so that the data transfer application implements the information display method based on the new information to be displayed according to the flow of steps S21 to S26.
Based on the same inventive concept, the embodiment of the invention also provides an information display device, and as the principle of solving the problems of the device is similar to the information display method, the implementation of the device can refer to the implementation of the method, and repeated parts are not described again.
As shown in fig. 9, which is a schematic structural diagram of an information displaying apparatus provided in an embodiment of the present invention, the information displaying apparatus is disposed in a data transfer application, and the data transfer application is configured to provide a data transfer function for an application that needs data transfer; and the above information display device, comprising:
the receiving unit 91 is configured to receive information to be displayed, which is sent by a server based on a heartbeat packet in an operation process, where the information to be displayed carries position information of an information displayable region and address information of content to be displayed;
a display floating layer generating unit 92, configured to generate a display floating layer on the displayable information area on the current display page if there is no display floating layer in the displayable information area on the current display page;
an obtaining unit 93, configured to obtain content to be displayed corresponding to the address information;
and the display unit 94 is configured to display the acquired content to be displayed in the display floating layer.
Optionally, the information to be displayed also carries indication information of whether the display floating layer is movable; the information display apparatus provided by the present invention further includes:
a configuration unit 95, configured to configure the display floating layer as a movable display floating layer if the indication information indicates that the display floating layer is allowed to be moved;
the control unit 96 is configured to, if a movement instruction for the display floating layer is received and if the indication information indicates that the display floating layer is allowed to be moved, move the display floating layer according to a movement track corresponding to the movement instruction.
Optionally, the control unit 96 is specifically configured to determine that a movement instruction for the display floating layer is received if a screen DOWN touch event, at least one movement MOVE touch event, and a screen UP touch event triggered and pressed for the display floating layer are sequentially monitored;
the control unit 96 is specifically configured to record position information of a touch point corresponding to each touch event; and after the current touch event occurs, moving the display floating layer displayed at the position information of the touch point corresponding to the previous touch event to the position information of the touch point corresponding to the current touch event, and displaying the display floating layer.
Optionally, the information display apparatus provided by the present invention further includes:
a cancellation display unit 97, configured to cancel display of the display floating layer if a data transfer instruction is received;
the display floating layer generating unit 92 is specifically configured to, when it is detected that the data transfer is successful, continue to display the display floating layer on the displayable information area on the current display page, and trigger the displaying unit 94 to display the content to be displayed in the display floating layer.
Optionally, the display canceling unit 97 is further configured to cancel the display of the display floating layer if the received heartbeat packet sent by the server does not include information to be displayed.
Optionally, the display unit 94 is specifically configured to display the content to be displayed in a webpage view in the display floating layer.
For convenience of description, the above parts are separately described as modules (or units) according to functional division. Of course, the functionality of the various modules (or units) may be implemented in the same or in multiple pieces of software or hardware in practicing the invention.
Having described the information presentation method and apparatus of an exemplary embodiment of the present invention, a computing device according to another exemplary embodiment of the present invention is next described.
As will be appreciated by one skilled in the art, aspects of the present invention may be embodied as a system, method or program product. Thus, various aspects of the invention may be embodied in the form of: an entirely hardware embodiment, an entirely software embodiment (including firmware, microcode, etc.) or an embodiment combining hardware and software aspects that may all generally be referred to herein as a "circuit," module "or" system.
In some possible embodiments, the computing device according to the present invention may include at least one processor, a memory, and a computer program stored in the memory and running on the processor, and when the processor executes the program, the processor may implement the information presentation method provided in any of the above embodiments of the present invention, for example, the processor may execute the information presentation processes in steps S21 to S25 shown in fig. 2.
Taking the computing device as a terminal device as an example, at this time, the processor in the computing device is the processor 110 in fig. 1, and the memory in the computing device is the memory 120 in fig. 1.
Based on any one of the embodiments, in an embodiment of the present invention, a computer-readable storage medium is provided, on which a computer program is stored, and the computer program, when executed by a processor, implements the information presentation method in any of the above-described method embodiments.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (16)

1. The information display method is characterized by being applied to data transfer application, wherein the data transfer application is used for providing a data transfer function for an application needing data transfer; and the method, comprising:
in the operation process, receiving a heartbeat packet which is sent by a server and carries information to be displayed, wherein the information to be displayed carries position information of an information displayable region and address information of content to be displayed;
if the displayable information area on the current display page does not have a display floating layer, generating a display floating layer on the displayable information area on the current display page;
acquiring the content to be displayed corresponding to the address information;
displaying the obtained content to be displayed in the display floating layer;
the display floating layer is generated based on the data transfer application, and can display the acquired content to be displayed under the condition that the data transfer application works in a background and the current display page is a foreground application page, wherein the foreground application comprises the application needing data transfer.
2. The method of claim 1, wherein the information to be displayed further carries indication information of whether the display floating layer is movable; the method further comprises:
if the indication information indicates that the display floating layer is allowed to be moved, configuring the display floating layer into a movable display floating layer;
and if a moving instruction for the display floating layer is received and if the indication information indicates that the display floating layer is allowed to be moved, moving the display floating layer according to a moving track corresponding to the moving instruction.
3. The method of claim 2, wherein the receiving of the movement instruction for the presentation float is determined by:
if a screen DOWN touch event, at least one mobile MOVE touch event and a screen UP touch event triggered to press the display floating layer are monitored in sequence, determining that a mobile instruction for the display floating layer is received; then
Moving the display floating layer according to a moving track corresponding to the moving instruction, specifically comprising:
recording position information of a touch point corresponding to each touch event;
and after the current touch event occurs, moving the display floating layer displayed at the position information of the touch point corresponding to the previous touch event to the position information of the touch point corresponding to the current touch event, and displaying the display floating layer.
4. The method of any of claims 1 to 3, further comprising:
if a data transfer instruction is received, canceling the display of the display floating layer; wherein the data transfer instruction is used for data transfer;
and when the data transfer is detected to be successful, continuing to display the display floating layer on the information displayable region on the current display page, and displaying the content to be displayed in the display floating layer.
5. The method of any of claims 1 to 3, further comprising:
and if the received heartbeat packet sent by the server does not contain the information to be displayed, canceling the display of the display floating layer.
6. The method according to any one of claims 1 to 3, wherein displaying the acquired content to be displayed in the display floating layer specifically comprises:
and displaying the content to be displayed in a webpage view form in the display floating layer.
7. The method according to any one of claims 1 to 3, wherein the location information of the information-exposable area is determined by the server based on a resolution of a device on which the data transfer application is located, which is reported by the data transfer application.
8. The information display device is characterized by being arranged in a data transfer application, wherein the data transfer application is used for providing a data transfer function for an application needing data transfer; and the apparatus, comprising:
the receiving unit is used for receiving a heartbeat packet which is sent by a server and carries information to be displayed in the running process, wherein the information to be displayed carries position information of an information displayable area and address information of content to be displayed;
the display floating layer generating unit is used for generating a display floating layer on the displayable information area on the current display page if the displayable information area on the current display page does not have the display floating layer;
the acquisition unit is used for acquiring the content to be displayed corresponding to the address information;
the display unit is used for displaying the acquired content to be displayed in the display floating layer;
the display floating layer is generated based on the data transfer application, the display unit can display the acquired content to be displayed under the condition that the data transfer application works in a background and the current display page is a foreground application page, and the foreground application comprises the application needing data transfer.
9. The information display device according to claim 8, wherein the information to be displayed further carries indication information indicating whether the display floating layer is movable, and the information display device further comprises:
the configuration unit is used for configuring the display floating layer into a movable display floating layer if the indication information indicates that the display floating layer is allowed to move;
and the control unit is used for moving the display floating layer according to a moving track corresponding to the moving instruction if the moving instruction for the display floating layer is received and if the indication information indicates that the display floating layer is allowed to be moved.
10. The information presentation device of claim 9, wherein the control unit is specifically configured to determine that a movement command for the presentation float is received if a screen DOWN touch event, at least one mobile MOVE touch event, and a screen UP touch event triggered to press for the presentation float are monitored in sequence;
the control unit is specifically used for recording position information of a touch point corresponding to each touch event; and after the current touch event occurs, moving the display floating layer displayed at the position information of the touch point corresponding to the previous touch event to the position information of the touch point corresponding to the current touch event, and displaying the display floating layer.
11. The information presentation device of any one of claims 8-10, further comprising:
the display canceling unit is used for canceling the display of the display floating layer if a data transfer instruction is received; wherein the data transfer instruction is used for data transfer;
the display floating layer generating unit is specifically configured to, when it is detected that the data transfer is successful, continue to display the display floating layer on the displayable information area on the current display page, and trigger the displaying unit 94 to display the content to be displayed in the display floating layer.
12. The information presentation device of any one of claims 8-10, further comprising:
and the display floating layer canceling unit is used for canceling the display of the display floating layer if the received heartbeat packet sent by the server does not contain the information to be displayed.
13. The information presentation device according to any one of claims 8 to 10, wherein the presentation unit is specifically configured to present the content to be presented in a web page view in the presentation floating layer.
14. The information presentation device according to any one of claims 8 to 10, wherein the location information of the information presentable area is determined by the server based on a resolution of a device on which the data transfer application is located, which is reported by the data transfer application.
15. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method according to any of claims 1 to 7 when executing the program.
16. A computer readable medium having stored thereon processor-executable instructions for performing the method of any one of claims 1 to 7.
CN201910267993.1A 2019-04-03 2019-04-03 Information display method and device and computer readable storage medium Active CN109960562B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910267993.1A CN109960562B (en) 2019-04-03 2019-04-03 Information display method and device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910267993.1A CN109960562B (en) 2019-04-03 2019-04-03 Information display method and device and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN109960562A CN109960562A (en) 2019-07-02
CN109960562B true CN109960562B (en) 2021-01-05

Family

ID=67025591

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910267993.1A Active CN109960562B (en) 2019-04-03 2019-04-03 Information display method and device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN109960562B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112800358B (en) * 2019-11-14 2024-03-08 北京金山云网络技术有限公司 Background area generation method and device, electronic equipment and storage medium

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130318429A1 (en) * 2012-05-22 2013-11-28 Movile Dynamic floating web video player
CN103440083B (en) * 2013-08-23 2016-08-10 深圳市精准分众传媒有限公司 A kind of method representing mobile phone advertisement with suspended pattern
CN107436758B (en) * 2016-05-28 2019-04-26 腾讯科技(深圳)有限公司 A kind of information display method and mobile terminal of mobile terminal
CN107493354A (en) * 2017-10-16 2017-12-19 聚好看科技股份有限公司 It is a kind of update application message method, using shop server and using shop
CN107992243A (en) * 2017-11-29 2018-05-04 珠海市魅族科技有限公司 A kind of information displaying method and device, terminal, readable storage medium storing program for executing
CN108182021A (en) * 2018-01-30 2018-06-19 腾讯科技(深圳)有限公司 Multimedia messages methods of exhibiting, device, storage medium and equipment
CN108769157B (en) * 2018-05-16 2021-03-19 北京奇虎科技有限公司 Message popup display method and device, computing equipment and computer storage medium
CN109542650A (en) * 2018-11-30 2019-03-29 北京小米移动软件有限公司 Advertisement loading method, device and computer readable storage medium

Also Published As

Publication number Publication date
CN109960562A (en) 2019-07-02

Similar Documents

Publication Publication Date Title
CN113157906B (en) Recommendation information display method, device, equipment and storage medium
WO2020192451A1 (en) Real-time picture projection method and apparatus of ar glasses screen, controller and medium
US20190230311A1 (en) Video interface display method and apparatus
CN113032080B (en) Page implementation method, application program, electronic device and storage medium
CN109840114A (en) Page processing method and mobile terminal
US20150121301A1 (en) Information processing method and electronic device
US20170199642A1 (en) Display method of terminal device and terminal device
CN110347317A (en) A kind of windows switching method, device, storage medium and interactive intelligent tablet computer
US10346284B1 (en) Feature usage prediction using shell application feature telemetry
CN109587031A (en) Data processing method
CN109885781B (en) Mixed page unified browsing method, device, equipment and storage medium
CN107562321A (en) Using installation method, device and terminal
CN106598514A (en) Method and system for switching virtual reality mode in terminal device
CN102622395A (en) Method, server and client for assisting in accessing to webpage by application virtualization
CN110019464A (en) Page processing method and device
US20170192731A1 (en) Control redistribution among multiple devices
CN111836093B (en) Video playing method, device, equipment and medium
CN109960562B (en) Information display method and device and computer readable storage medium
CN113129417A (en) Image rendering method in panoramic application and terminal equipment
CN109788333A (en) For being displayed in full screen the method and device of video
CN113094144A (en) Display screen interface control method and electronic equipment
CN108399058A (en) A kind of signal display control method and device
US20130036374A1 (en) Method and apparatus for providing a banner on a website
CN115878935A (en) Local refreshing method, system, device, equipment and medium of chart
CN111949150B (en) Method and device for controlling peripheral switching, storage medium 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
GR01 Patent grant
GR01 Patent grant