WO2022179275A1 - 终端应用控制的方法、终端设备及芯片*** - Google Patents

终端应用控制的方法、终端设备及芯片*** Download PDF

Info

Publication number
WO2022179275A1
WO2022179275A1 PCT/CN2021/140198 CN2021140198W WO2022179275A1 WO 2022179275 A1 WO2022179275 A1 WO 2022179275A1 CN 2021140198 W CN2021140198 W CN 2021140198W WO 2022179275 A1 WO2022179275 A1 WO 2022179275A1
Authority
WO
WIPO (PCT)
Prior art keywords
terminal device
page
interface
target
control
Prior art date
Application number
PCT/CN2021/140198
Other languages
English (en)
French (fr)
Inventor
刘成
李�杰
刘敏
孙玺临
程银柱
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2022179275A1 publication Critical patent/WO2022179275A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • G06F9/452Remote windowing, e.g. X-Window System, desktop virtualisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/955Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
    • 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/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • 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

Definitions

  • the present application relates to the field of terminal technology, and in particular, to a method, terminal device and chip system for controlling a terminal application.
  • the APP (Application, application) on the multi-client cooperative control of the mobile phone source includes two schemes: multi-client APP cooperative control and screen projection cooperative control.
  • the multi-client APP collaborative control refers to installing the same APP as the mobile phone source APP on the multi-client, and opening the client's APP page by sharing the link and copying the text.
  • Screencasting collaborative control refers to projecting the application of the mobile phone source to the client through the screencasting technology, and operating the application on the client, and the mobile phone source will also execute the corresponding instructions.
  • the above method for controlling the APP at the source end of the mobile phone has high requirements on the client, and requires multiple clients to download and install the same APP adapted to the screen size of the client.
  • the present application provides a terminal application control method, a terminal device and a chip system, which can display an interface of a target application in a terminal device supporting a browser.
  • an embodiment of the present application provides a terminal application control method, including: a first terminal device sets a first label on a page element in a target application interface, and collects the content of the page element to obtain page layout information, where the page The layout information includes the content of the first label and the page element; the first terminal device acquires the type of the second terminal device, and sends the page layout information and the type of the second terminal device to the server; the server The target page template is determined according to the type of the second terminal device, the page corresponding to the target page template is rendered based on the page layout information, and the address identifier of the rendered page is generated; the first terminal device obtains the the address identification, and send the address identification to the second terminal device; the second terminal device opens the address identification through a browser, and displays a target page adapted to the interface of the browser, the target page contains the target application interface.
  • tags are set for page elements in the target application interface, and the content of the page elements is collected to obtain page layout information.
  • the server determines the target page template according to the type of the second terminal device, renders the page corresponding to the target page template based on the page layout information, and generates an address identifier of the rendered page.
  • the first terminal device sends the address identification to the second terminal device.
  • the second terminal device opens the address identifier through a browser, and displays a target page adapted to the interface of the browser, and the target page includes the target application interface.
  • the embodiment of the present application can display the interface of the target application in the second terminal device supporting a browser, so as to realize sharing the interface of the target application in the first terminal device to the second terminal device for display.
  • the second terminal device may not support the target application, and the interface of the target application can be displayed by supporting a browser.
  • the server may be the interface construction server in the content described later.
  • the method further includes: the second terminal device monitors an operation event acting on the target page through a browser, and sends the operation event to the server,
  • the operation event includes the data, type, operation mode and window title of the operation event;
  • the server sends the operation event to the first terminal device;
  • the first terminal device applies the target application to the target according to the operation event
  • the page element is updated.
  • the second terminal device can monitor the operation event through the browser, and send the operation event to the server, and then the server can perform the operation
  • the event is sent to the first terminal device.
  • the first terminal device can update the page element of the target application according to the operation event, so that reverse control of the target application of the first terminal device by the second terminal device can be realized.
  • the browser listens to the operation event, and the second terminal device sends the operation event and the tag of the operation event. to the server, and the server sends the operation event and the label of the operation event to the first terminal device.
  • the first terminal device determines a control corresponding to the operation event in the target application according to the label of the operation event, and executes the operation event according to the determined control.
  • the operation event may include the data, type, operation mode and window title of the operation event.
  • the first terminal device when the interface of the target application of the first terminal device changes, the first terminal device sends the page layout change information of the target application to the server, and the server determines the page change of the target page template according to the page layout change information of the target application. information.
  • the server sends the page change information to the second terminal device, and the second terminal device synchronously refreshes the page change information to the loaded page through the browser.
  • an embodiment of the present application provides a terminal application control method, which is applicable to a first terminal device.
  • the method includes: setting a first label on a page element in a target application interface, and collecting the content of the page element, obtaining page layout information, where the page layout information includes the content of the first label and the page element; obtaining the type of the second terminal device, and sending the page layout information and the type of the second terminal device to the server; receiving The address identifier sent by the server, the page address identifier is obtained by the server according to the rendered page, and the rendered page is determined by the server according to the type of the second terminal device.
  • the page layout information is obtained by rendering the target page template; the address identifier is sent to the second terminal device, so that the second terminal device opens the address identifier through a browser, and displays the same as the browser.
  • the target page to which the server interface is adapted, the target page contains the target application interface.
  • tags are set on page elements in the target application interface, and content of the page elements is collected to obtain page layout information.
  • the server determines the target page template according to the type of the second terminal device, renders the page corresponding to the target page template based on the page layout information, and generates an address identifier of the rendered page.
  • the first terminal device sends the address identification to the second terminal device.
  • the second terminal device opens the address identifier through a browser, and displays a target page adapted to the interface of the browser, and the target page includes the target application interface.
  • the embodiment of the present application can display the interface of the target application in the second terminal device supporting a browser, so as to realize sharing the interface of the target application in the first terminal device to the second terminal device for display.
  • the second terminal device may not support the target application, and the interface of the target application can be displayed by supporting a browser.
  • the second terminal device can adaptively display the interface of the target application according to the browser interface.
  • the page element may be a control in the target application interface. After setting a label for the above control, the text content or image content of the above control needs to be collected.
  • the target application interface includes controls such as "OK”, “Next”, and “Cancel”. If the corresponding labels are set for the above controls, the text content of each control "OK”, “Next”, “Cancel” is collected. "Wait.
  • the above page elements with tags and the content of the page elements are recorded as page layout information.
  • the type of the second terminal device may include a PC, a tablet, a mobile phone, a watch, and other devices.
  • the above method further includes: receiving operation event data sent by the server, the operation event data including the data, type, operation mode and window title of the operation event, the operation event data for the operation event received by the server and acting on the target page; generating a control instruction according to the operation event data; executing the control instruction to update the page elements of the target application.
  • the operation event data is an operation event sent by the second terminal device to the server
  • the operation event is an operation event that is monitored by the second terminal device through a browser and acts on the target page.
  • the browser can monitor the operation event, the second terminal device sends the operation event to the server, and then the server sends the operation event to the server. to the first terminal device.
  • the first terminal device can update the page element of the target application according to the operation event, so that reverse control of the target application of the first terminal device by the second terminal device can be realized.
  • the second terminal device includes multiple types of second terminal devices, the address identifiers are multiple, and each page address corresponds to a type of second terminal device; the Sending the address identifier to the second terminal device includes: adding a unique identifier to each of the address identifiers; and sending the added unique address identifier to the corresponding second terminal device.
  • the embodiment of the present application can render a target page template for each type of second terminal device, obtain an address identifier, and then add a unique identifier to each address identifier, so that each The address identifier can only be used once. Afterwards, the address identifiers added with the unique identifiers are respectively sent to the corresponding second terminal devices, so that each second terminal device opens the respective address identifiers through the browser, and displays the interface of the target application in the browser interface.
  • the sharing authority of each second terminal device may be different, and the sharing authority may include displaying the interface of the target application, displaying the interface of the target application, controlling the target application, and controlling the target application. If the sharing authority is to display the interface of the target application, the server does not receive the operation event acting on the browser interface of the second terminal device. If the sharing authority is to display the interface of the target application and control the target application, the server receives the operation event acting on the browser interface of the second terminal device.
  • the second terminal device may include a second terminal device A and a second terminal device B, the sharing permission of the second terminal device A is to display the interface of the target application, and the sharing permission of the second terminal device B is to control the target application. . Then, the first terminal device can send the address identifier to the second terminal device A, and send the control information of the target application to the second terminal device B, so that the second terminal device B can control the second terminal device A's access to the target page. show.
  • the target application may be an application capable of playing videos, and the control information of the target application is control time information.
  • the second terminal device B receives the touch operation acting on the interface of the second terminal device B, determines the target time at which the touch operation is obtained, generates a control instruction according to the touch operation and the target time, and sends the control instruction to the second terminal device. A sends the control command. In response to the control instruction, the second terminal device A stops playing the video or continues to play the video.
  • an embodiment of the present application provides a terminal application control method, which is applicable to a server.
  • the method includes: receiving page layout information sent by a first terminal device and a type of the second terminal device, where the page layout information includes the first terminal device.
  • the first label is a label set on the page element
  • the first terminal device sends the address identification to the second terminal device, and the second terminal device opens the address identification through a browser, and displays a target page adapted to the interface of the browser.
  • the page contains the target application interface.
  • tags are set on page elements in the target application interface, and content of the page elements is collected to obtain page layout information.
  • the server determines the target page template according to the type of the second terminal device, renders the page corresponding to the target page template based on the page layout information, and generates an address identifier of the rendered page.
  • the first terminal device sends the address identification to the second terminal device.
  • the second terminal device opens the address identifier through a browser, and displays a target page adapted to the interface of the browser, and the target page includes the target application interface.
  • the embodiment of the present application can display the interface of the target application in the second terminal device supporting a browser, so as to realize sharing the interface of the target application in the first terminal device to the second terminal device for display.
  • the second terminal device may not support the target application, and the interface of the target application can be displayed by supporting a browser.
  • the second terminal device can adaptively display the interface of the target application according to the browser interface.
  • the page element is a first control in the target application interface, one of the first controls corresponds to one of the first labels; the type of the second terminal device is multiple Each type corresponds to at least one target page template, each target page template includes a plurality of second controls, and each second control corresponds to a second label; Rendering the template includes: determining a second control corresponding to each first control according to a preset label correspondence between the first label and the second label; comparing the content of the first control with the corresponding The second control is associated and renders the target page template.
  • target page templates corresponding to different types of second terminal devices are different.
  • the type of the second terminal device may include a PC, a tablet, a mobile phone, a watch, and other devices.
  • the PC corresponds to the target page template 1
  • the tablet corresponds to the target page template 2
  • the mobile phone corresponds to the target page template 3
  • the watch corresponds to the target page template 4.
  • the page corresponding to the target page template 1 is page 1, there may be multiple second controls in page 1, and each second control corresponds to a second label.
  • the correspondence between the first label and the second label may be preset.
  • the first label includes first labels corresponding to N first controls
  • the second label includes second labels corresponding to M second controls
  • the label correspondence between each first label and each second label can be determined according to each
  • the corresponding relationship between a control and each second control may be preset.
  • the first label corresponding to the ImageView control corresponds to the second label corresponding to the img control
  • the first label corresponding to the TextView control corresponds to the second label corresponding to the p control
  • the first label corresponding to the Button control corresponds to the Input : corresponds to the second label corresponding to the button control.
  • the above method further includes: receiving an operation event acting on the browser interface of the second terminal device, the operation event including the data, type, operation mode and window title of the operation event ; Send the operation event to the first terminal device, so that the first terminal device updates the page element of the target application according to the operation event.
  • the operation event data is an operation event sent by the second terminal device to the server
  • the operation event is an operation event that is monitored by the second terminal device through the browser and acts on the browser interface.
  • the method further includes: receiving the sharing permission of the second terminal device sent by the first terminal device; the sharing permission includes displaying the interface of the target application, and displaying the the interface of the target application and control the target application; if the sharing authority is to display the interface of the target application, the step of receiving the operation event acting on the browser interface of the second terminal device is not performed; If the sharing permission is to display the interface of the target application and control the target application, the step of receiving an operation event acting on the browser interface of the second terminal device is performed.
  • the second terminal device includes a second terminal device A and a second terminal device B
  • the sharing authority of the second terminal device A is to display the interface of the target application
  • the second terminal The sharing authority of device B is to control the target application
  • the sending the address identifier to the first terminal device includes: sending the address identifier and control information of the target application to the first terminal device to Make the first terminal device send the address identifier to the second terminal device A, and send the control information to the second terminal device B, so that the second terminal device B can control the second terminal device A to the display of the target page.
  • an embodiment of the present application provides a terminal device, including: one or more processors and a memory; the memory is coupled to the one or more processors, the memory is used for storing computer program codes, and the memory is
  • the computer program code includes computer instructions; when the one or more processors execute the computer instructions, the terminal device is made to perform the method according to any one of the first aspects, or the method according to any one of the second aspects. The method of one, or the method of any one of the third aspects.
  • an embodiment of the present application provides a server, including: one or more processors and a memory; the memory is coupled to the one or more processors, the memory is used for storing computer program codes, the memory
  • the computer program code includes computer instructions; when executed by the one or more processors, the computer instructions cause the terminal device to perform the method as described in any one of the first aspects, or as in any of the second aspects The method of item 1, or the method of any one of the third aspects.
  • an embodiment of the present application provides a chip system, the chip system includes a processor, the processor is coupled to a memory, and the processor executes a computer program stored in the memory to implement the first aspect The method of any one of the above, or the method of any one of the second aspect, or the method of any one of the third aspect.
  • the chip system may be a single chip, or a chip module composed of multiple chips.
  • an embodiment of the present application provides a chip system, the chip system includes a memory and a processor, and the processor executes a computer program stored in the memory to implement any one of the first aspects.
  • the chip system may be a single chip, or a chip module composed of multiple chips.
  • an embodiment of the present application provides a computer program product that, when the computer program product runs on a terminal device, enables the terminal device to execute the method described in any one of the first aspects above, or perform any of the methods in the second aspect.
  • an embodiment of the present application provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, implements the method according to any one of the first aspects , or the method of any one of the second aspects, or the method of any one of the third aspects.
  • the terminal device described in the fourth aspect the server described in the fifth aspect, the chip system described in the sixth aspect and the seventh aspect, the computer program product described in the eighth aspect, and the ninth aspect
  • the computer-readable storage medium is used to execute the method provided in the first aspect, or the method described in the second aspect, or the method described in the third aspect. Therefore, for the beneficial effects that can be achieved, reference may be made to the beneficial effects in the corresponding method, which will not be repeated here.
  • FIG. 1 is a schematic diagram of a scenario used by a terminal application control method provided by an embodiment of the present application
  • FIG. 2 is a schematic diagram of a scenario provided by an embodiment of the present application.
  • FIG. 3 is a schematic diagram of a process of sharing an interface of a target application of a first terminal device with an interface of a second terminal device provided by an embodiment of the present application;
  • FIG. 4 is a schematic diagram of a process of counter-controlling a target application by a second terminal device according to an embodiment of the present application
  • FIG. 5 is a schematic flowchart of a terminal application control method provided by an embodiment of the present application.
  • FIG. 6 is a schematic diagram of a “buy” APP interface in mobile phone A provided by an embodiment of the present application.
  • FIG. 7 is a schematic diagram of displaying a “buy” APP interface in a tablet computer provided by an embodiment of the present application.
  • FIG. 8 is a schematic diagram of displaying a “buy” APP interface in a PC provided by an embodiment of the present application.
  • FIG. 9 is a schematic diagram of displaying a “buy” APP interface in a mobile phone B provided by an embodiment of the present application.
  • FIG. 10 is a schematic diagram of a scenario provided by an embodiment of the present application.
  • FIG. 11(a) and FIG. 11(b) are schematic diagrams of scenarios provided by the embodiments of the present application.
  • FIG. 12 is a schematic diagram of a hardware architecture of a terminal device provided by an embodiment of the present application.
  • FIG. 13 is a block diagram of a software structure of a terminal device provided by an embodiment of the present application.
  • the term “if” may be contextually interpreted as “when” or “once” or “in response to determining” or “in response to detecting “.
  • the phrases “if it is determined” or “if the [described condition or event] is detected” may be interpreted, depending on the context, to mean “once it is determined” or “in response to the determination” or “once the [described condition or event] is detected. ]” or “in response to detection of the [described condition or event]”.
  • references in this specification to "one embodiment” or “some embodiments” and the like mean that a particular feature, structure or characteristic described in connection with the embodiment is included in one or more embodiments of the present application.
  • appearances of the phrases “in one embodiment,” “in some embodiments,” “in other embodiments,” “in other embodiments,” etc. in various places in this specification are not necessarily All refer to the same embodiment, but mean “one or more but not all embodiments” unless specifically emphasized otherwise.
  • the terms “including”, “including”, “having” and their variants mean “including but not limited to” unless specifically emphasized otherwise.
  • Client A in response to a page sharing operation performed by the user in the APP, client A generates a sharing text and a target page corresponding to the sharing text.
  • the client A sends the shared text and the target page to the client B through the instant messaging technology.
  • client B After client B obtains the shared text, it copies the shared text.
  • the user can apply the shared text paste operation in the APP of client B, and client B responds to the shared text paste operation, detects whether the text in the shared text paste operation is consistent with the text in the target page, and opens client A if they are consistent.
  • the target page to share in response to a page sharing operation performed by the user in the APP, client A generates a sharing text and a target page corresponding to the sharing text.
  • the client A sends the shared text and the target page to the client B through the instant messaging technology.
  • client B After client B obtains the shared text, it copies the shared text.
  • the user can apply the shared text paste operation in the APP of client B, and client B respond
  • the related art has high requirements for a pair of clients, and requires multiple clients to download and install the same APP adapted to the screen size of the client. Moreover, the related technology cannot realize anti-control, and essentially only opens the same page for sharing, and any operation on the page cannot be transmitted to other clients. Moreover, in the first related art, the way in which client A shares the target page with other clients is relatively complicated. It is necessary to click and share on a certain page of the APP of client A to generate a shared text, and then transmit the shared text to other clients through an instant messaging application. , other clients copy and share the text, and open the APP to jump to the target page.
  • Client A tags the page and instructions in the APP to client B.
  • Client B restores the labeled instructions, converts the instructions on client A into instructions on client B, and constructs the screen of client A.
  • the user can perform operations such as clicking, sliding, etc. on the screen of the client A built on the client B to simulate the user's touch event on the client A.
  • Client B listens for mouse events and transmits the event to client A in the form of an instruction stream.
  • Client A restores the instruction stream sent by client B and executes the restored instructions, thereby realizing control of the client on client B.
  • A tags the page and instructions in the APP to client B.
  • Client B restores the labeled instructions, converts the instructions on client A into instructions on client B, and constructs the screen of client A.
  • the user can perform operations such as clicking, sliding, etc. on the screen of the client A built on the client B to simulate the user's touch event on the client A.
  • Client B listens for mouse events and transmits the event to client A in
  • one client A can only project the page to one client B, and one client B can control client A in reverse. can not achieve.
  • the instruction stream sent by client B to client A is a touch event generated by the user applying an operation on client B, and the formation of the touch event requires the actual operation of the user on client B, so the user can After an operation is performed on client B, it may take a long time for client A to respond to the operation.
  • an embodiment of the present application provides a terminal application control method.
  • the first terminal device sets tags for page elements that need to be shared in the target application, and acquires the type and sharing permission of the second terminal device, where the second terminal device is a terminal device that shares the target application.
  • the first terminal device sends the type of the second terminal device and page layout information to the server, where the page layout information is obtained according to page elements.
  • the server determines the target page template according to the type of the second terminal device, renders the Html page of the target page template based on the page layout information, and then sends the URL (Uniform Resource Locator) address of the rendered target page template to the The first terminal device.
  • the first terminal device sends the URL address to the second terminal device, and the second terminal device opens the URL address through a browser or WebView, wherein the page controls in the browser or WebView correspond to the controls in the target application one-to-one through tags.
  • the second terminal device When the second terminal device receives an operation acting on the browser or WebView (for example, a click event of a control), the second terminal device responds to the operation and sends the event corresponding to the operation and the tag of the event to the first terminal device.
  • the first terminal device determines a control corresponding to the event in the target application according to the tag of the event, and executes the event according to the determined control.
  • the first terminal device sends the page layout change information of the target application to the server, and the server re-renders the constructed Html DOM tree according to the page layout change information of the target application, and Generate a new URL address.
  • the first terminal device sends the new URL address to the second terminal device.
  • the second terminal device reloads the rendered page according to the new URL address.
  • both the first terminal device and the second terminal device in this embodiment of the present application may be a personal computer (personal computer, PC), a mobile phone, a tablet computer, a wearable device, a vehicle-mounted device, an augmented reality (AR) )/virtual reality (VR) devices, notebook computers, ultra-mobile personal computers (UMPCs), netbooks, personal digital assistants (personal digital assistants, PDAs) and other terminal devices.
  • a personal computer personal computer
  • PC personal computer
  • mobile phone a tablet computer
  • a wearable device a vehicle-mounted device
  • VR virtual reality
  • notebook computers notebook computers
  • netbooks personal digital assistants
  • PDAs personal digital assistants
  • FIG. 1 is a schematic diagram of a scenario where the terminal application control method provided by the embodiment of the present application is applicable.
  • the scenario includes a first terminal device, a second terminal device and a server.
  • a target APP is installed on the first terminal device, and the target APP includes an interface UI.
  • the first terminal device is further provided with a Dues server, and the Dues server includes a content acquisition module, a content scheduling module and a content preprocessing module.
  • the content collection module is used to set tags for page elements in the target APP, for example, to set tags for page elements that need to be shared and page elements for all event execution. After the content collection module sets tags on page elements that need to be shared by the target APP, multiple tagged page elements are obtained.
  • the content scheduling module is used for scheduling a plurality of marked page elements to the content preprocessing module.
  • the content preprocessing module packages the multiple marked page elements according to a specific format, so that the multiple marked page elements can be transmitted to subsequent modules in a fixed data structure.
  • the content preprocessing module may include processing RView content, converting RView into JSON language, and processing Light content, and updating the behavior list according to the result of processing the Light content.
  • the Dues server is also provided with a data conversion module and a web server.
  • the web server is used to provide users with the functions of selecting shared terminal devices and setting permissions for shared terminal devices.
  • the shared terminal devices may include: PCs, tablets, mobile phones, watches, and other devices.
  • the first four terminal devices are correspondingly set with specific Html templates, and the above Html templates can set UIs corresponding to the terminal devices.
  • the interface of the target application in the first terminal device can be proportionally scaled and adapted according to the browser resolution of the other device.
  • Permissions for sharing terminal devices include: share only, control only, share and control.
  • the permission of the shared terminal device is only sharing, which means that the current terminal device can only browse the page shared by the target application in the first terminal device, and cannot control the target application. This permission is usually used for display devices with large screens.
  • the permission of the shared terminal device is only control, which means that the current terminal device can only be used for some simple control functions, such as being used as a remote control, and cannot display the page shared by the target application. This permission is usually used for lightweight devices such as watches.
  • Sharing and control is a combination of the above two permissions, which can display the page shared by the target application, and can also control the target application. This permission is usually used for mobile phones and tablet devices.
  • the data conversion module is used to perform data conversion on the data output by the content preprocessing module, and send the converted data to the Web server.
  • the data output by the content preprocessing module is a language describing the UI resource tree ViewTree
  • the data conversion module converts the language describing the UI resource tree ViewTree into a JSON language that the interface construction server can understand and process.
  • the Web server processes the converted data according to the selected shared terminal device (ie, the second terminal device) to obtain rendering data with a preset data structure. For example, the Web server adds relevant field information such as the type and authority information of the second terminal device to the converted data to obtain drawing data with a preset data structure.
  • the web server sends the selected shared terminal device, device permissions and drawing data to the interface construction server through Socket.
  • the drawing data can include label information, type information and content.
  • the data structure of the drawing data can be as shown in the following code:
  • the interface construction server includes a data parsing module, a layout drawing module, a page control drawing module, an interface synthesis module and a page rendering module.
  • the data parsing module is used for parsing the drawing data to obtain layout information and page control information.
  • the layout drawing module is used to use a unified flex layout as the CSS (Cascading Style Sheets, Cascading Style Sheets) style of the Html page layout, and set corresponding interface layout parameters for the layout information obtained by parsing (for example, including layout container properties).
  • CSS CSS
  • Cascading Style Sheets Cascading Style Sheets
  • Cascading Style Sheets Cascading Style Sheets
  • the page control drawing module is used to determine the control correspondence between the label of the control in the target application and the label of the control in the Html.
  • the first terminal device is a mobile phone
  • the page control drawing module determines that the label of the ImageView control in the target application corresponds to the label of the img control in Html
  • the label of the TextView control in the target application corresponds to the label of the p control in Html
  • the target application The label of the Button control corresponds to the label of the Html Input: button control, etc.
  • the interface synthesis module is used to associate and synthesize the corresponding relationship between interface layout parameters and controls.
  • the page rendering module is used to determine the corresponding Html page according to the shared terminal device and device permissions, and render the Html page based on the corresponding relationship between interface layout parameters and controls, such as rendering the Html control label generated after parsing and the corresponding event in the Html control label.
  • the interface construction server is configured to send the URL address of the rendered Html page to the first terminal device.
  • the interface construction server also includes a Socket monitoring module. After the socket monitoring module is activated, it is used for monitoring new instructions and layout data sent by the first terminal device.
  • the first terminal device After acquiring the URL address of the rendered Html page, the first terminal device encrypts the URL address, for example, a one-way salt value may be used to encrypt the URL address. In addition, the first terminal device generates a unique suffix for the URL address through the distributed ID, and the unique suffix is used to ensure that each URL address can only be used once. If the number of second terminal devices is multiple, after obtaining the URL address of the rendered Html page, the first terminal device generates multiple suffixes for the URL address through distributed ID, and URL addresses with different suffixes are sent to different the second terminal equipment. The second terminal device opens the sharing page according to the received URL address, and the web browser of the second terminal device sends a get request to obtain the corresponding Html page, so as to complete the mapping of the source-end Activity.
  • a one-way salt value may be used to encrypt the URL address.
  • the first terminal device generates a unique suffix for the URL address through the distributed ID, and the
  • the counter-control process of the second terminal device to the first terminal device is as follows: the browser page of the second terminal device receives the interaction event and transmits it to the interface construction server through WebSocket, and the Socket monitoring module of the interface construction server monitors all Htmls with interaction event tags.
  • tag when the user performs an interactive operation on the web browser of the second terminal device, serializes the user's interaction event into JSON data, the JSON data includes the change of data, the type of the event, the operation mode of the event, and the information in the first terminal.
  • the windowTitle corresponding to the device, etc.
  • the data structure of this data is shown in the following code:
  • the interface construction server transmits JSON data to the behavior receiving module of the Dues server through Socket, and the behavior receiving module sends the JSON data to the behavior dispatching module.
  • the behavior scheduling module parses and converts the JSON data, repackages it into the instruction sequence required for the execution of the target APP process, and enters the process of the target APP.
  • the process of the target APP executes the command operation according to the page element root and label to complete the counter-control of the target APP.
  • the sending end may be the first terminal device, and the receiving end may be the interface construction server.
  • the sender marks the page element and sets the label.
  • the sending end collects the content of each page element, packages the collected content of each page element, and sends the packaged content of each page element to the receiving end.
  • the receiving end parses the received data, obtains the content of each page element, and updates the content of the corresponding page element according to the tag.
  • the process of sharing the interface of the target application of the first terminal device to display in the interface of the second terminal device may include: after starting to perform cooperative control on the target APP in the first terminal device, the Dues server controls the target APP in the target APP.
  • the page elements that need to be shared and the page elements of all event executions are set with tags, to obtain multiple marked page elements, and package the multiple marked page elements to obtain the UI data of the target APP.
  • the Dues server sends the UI data of the target APP to the interface construction server.
  • the interface construction server draws the Html page according to the UI data of the target APP, and generates the URL address of the Html page.
  • the process of how to draw the Html page according to the UI data of the target APP will not be repeated here.
  • the target APP sends the obtained URL address of the Html page to the second terminal device.
  • the second terminal device opens the URL address through a web browser, and displays an interface of the target APP that matches the second terminal device according to the corresponding relationship between the controls on the Html page and the controls on the first terminal device.
  • the Dues server obtains the change information of the target APP interface, and sends the change information of the target APP interface to the interface construction server.
  • the interface construction server updates the Html page according to the change information of the target APP interface.
  • the second terminal device updates the interface displayed in the web browser according to the updated Html page.
  • the process for the second terminal device to reversely control the target APP may include: after the second terminal device receives an operation (eg, a click event of a control) acting on the browser interface, the browser listens to the operation event , the second terminal device sends the operation event and the label of the operation event to the interface construction server, and the interface construction server receives the operation event acting on the web browser interface of the second terminal device, and obtains the operation event sequence.
  • the interface construction server converts the sequence of operation events into JSON data, and the JSON data includes data changes, event types, operation methods of events, and the window title WindowTitle on the first terminal device.
  • the interface construction server sends the JSON data to the Dues server, and the Dues server parses and converts the JSON data, repackages it into an instruction sequence required for the execution of the target APP process, and enters the instruction sequence into the process of the target APP.
  • the interface construction server can send JSON data to the behavior receiving module of the Dues server, and the behavior receiving module can send the JSON data to the behavior dispatching module.
  • the behavior scheduling module parses and converts the JSON data, repackages it into the instruction sequence required for the execution of the target APP process, and injects the instruction sequence into the process of the target APP.
  • the process of the target APP executes the instruction operation according to the page element root and the label, and updates the page elements of the target APP, so as to realize the anti-control of the target APP.
  • FIG. 5 is a schematic flowchart of a terminal application control method provided by an embodiment of the present application.
  • the terminal application control method may include the following steps:
  • step 101 the first terminal device sets a first label on the page element to be shared in the target application interface, and collects the content of the page element to obtain page layout information.
  • the page element may be a control in the target application interface. After setting a label for the above control, the text content or image content of the above control needs to be collected.
  • the target application interface includes controls such as "OK”, “Next”, and “Cancel”. If the corresponding labels are set for the above controls, the text content of each control "OK”, “Next”, “Cancel” is collected. "Wait.
  • the above-mentioned page layout letter includes a first tag, a page element having the tag, and the content of the page element.
  • Step 102 the first terminal device acquires the type and sharing authority of the second terminal device.
  • the type of the second terminal device may include a PC, a tablet, a mobile phone, a watch, and other devices.
  • the permissions of the second terminal device may include: displaying the target application interface, controlling the target application, displaying the target application and the interface, and controlling the target application.
  • the permission of the second terminal device is to display the target application interface, which means that the second terminal device can only display the page shared by the target application and cannot control the target application.
  • This permission can usually be used for display devices with large screens.
  • the permission of the shared terminal device is to control the target application, which means that the second terminal device can only be used for some simple control functions, such as being used as a remote control, and cannot display the page shared by the target application.
  • This permission can usually be used for light devices such as watches. magnitude equipment.
  • the permission of the second terminal device is to display the target application and interface and control the target application, which means that the second terminal device can not only display the page shared by the target application, but also control the target application. This permission can usually be used for mobile phones and tablets. equipment, etc.
  • Step 103 the first terminal device sends the type and page layout information of the second terminal device to the interface construction server.
  • the interface construction server may be provided with various page templates.
  • Each page template corresponds to one type of the second terminal device, and each page template has a corresponding UI.
  • the page template may be an Html template.
  • the Html template has a UI corresponding to the PC; if the type of the second terminal device is a tablet, the Html template has a UI corresponding to the tablet; if the type of the second terminal device is mobile phone, the Html template has a UI corresponding to the mobile phone; if the type of the second terminal device is a watch, the Html template has a UI corresponding to the watch.
  • the interface of the target application in the first terminal device can be proportionally scaled and adapted according to the browser resolution of the other device, without setting the Html template corresponding to the other device .
  • Step 104 the interface construction server determines a target page template according to the type of the second terminal device, renders a page corresponding to the target page template based on the page layout information, and obtains the URL address of the rendered page.
  • the page corresponding to the target page template may be provided with multiple second controls, each second control corresponds to a second label, and the position of each second control on the page may be preset.
  • the page module may be a JS template, and the second controls corresponding to different page modules may be different.
  • the interface construction server rendering the page of the target page template based on the page layout information may include: obtaining a first label of a first control of the target APP in the page layout information, where the first control is any control of the target APP; determining the second label corresponding to the first label; determining the second control corresponding to the determined second label in the page corresponding to the target page template; associating the content of the first control with the second control, and performing render.
  • target page templates corresponding to different types of second terminal devices are different.
  • the type of the second terminal device may include a PC, a tablet, a mobile phone, a watch, and other devices.
  • the PC corresponds to the target page template 1
  • the tablet corresponds to the target page template 2
  • the mobile phone corresponds to the target page template 3
  • the watch corresponds to the target page template 4.
  • the page corresponding to the target page template 1 is page 1, there may be multiple second controls in page 1, and each second control corresponds to a second label.
  • the correspondence between the first label and the second label may be preset.
  • the first label includes first labels corresponding to N first controls
  • the second label includes second labels corresponding to M second controls
  • the label correspondence between each first label and each second label can be determined according to each
  • the corresponding relationship between a control and each second control may be preset, and then in step 104, the label corresponding relationship between each first label and each second label may be directly used.
  • the first label corresponding to the ImageView control corresponds to the second label corresponding to the img control
  • the first label corresponding to the TextView control corresponds to the second label corresponding to the p control
  • the first label corresponding to the Button control corresponds to the Input : corresponds to the second label corresponding to the button control.
  • the interface construction server After the target page template is rendered, a rendered page is obtained, and the rendered page is the interface of the target APP in the first terminal device. After that, the interface construction server generates the URL address of the page after rendering is completed, and sends the URL address to the first terminal device.
  • Step 105 the first terminal device sends the URL address to the second terminal device.
  • the first terminal device may encrypt the URL address.
  • the first terminal device may encrypt the URL address in a one-way salt encryption manner.
  • the first terminal device may generate a unique suffix for the URL address, and add the unique suffix to the end of the URL address, so that the URL address can only be used once by the second terminal device.
  • each second terminal device corresponds to a URL address
  • the first terminal device may generate a unique suffix for each URL address, and add the unique suffix to the end of the corresponding URL address.
  • Step 106 the second terminal device opens the URL address, and displays a target page adapted to the interface of the browser, and the target page includes the target application interface.
  • the second terminal device may open the URL address through a web browser or WebView, and display a page including the target APP interface in the web browser window. Moreover, the page can be adaptively adjusted according to the browser window.
  • tags are set on page elements in the target application interface, and content of the page elements is collected to obtain page layout information.
  • the server determines the target page template according to the type of the second terminal device, renders the page corresponding to the target page template based on the page layout information, and generates an address identifier of the rendered page.
  • the first terminal device sends the address identification to the second terminal device.
  • the second terminal device opens the address identifier through the browser, and displays a target page adapted to the interface of the browser, and the target page includes the target application interface.
  • the embodiment of the present application can display the interface of the target application in the second terminal device supporting a browser, so as to realize sharing the interface of the target application in the first terminal device to the second terminal device for display.
  • the second terminal device may not support the target application, and the interface of the target application can be displayed by supporting a browser.
  • the second terminal device can adaptively display the interface of the target application according to the browser interface.
  • the target application as a "buy" APP
  • the first terminal device as a mobile phone A
  • the second terminal device as a PC, a tablet, and a mobile phone B
  • FIG. 6 is a schematic diagram of the “buy” APP interface in mobile phone A.
  • the “buy” APP interface includes a plurality of first controls, such as first controls 11 to 17 .
  • the first control 11 may be an identification control of the "buy” APP, and the content of the control may be a picture containing the word "buy".
  • the first control 12 may be a search control for inputting search content.
  • the first control 13 may be a category control for product classification, for example, may include categories such as "daily necessities", “electronic products", "food” and so on.
  • the first control 14, the first control 15 and the first control 16 may be display controls for displaying commodities.
  • the first control 17 may be a display control for displaying commodities, and there may be multiple first controls 17 . Each of the first controls 11 to 17 corresponds to a first label.
  • FIG. 7 is a schematic diagram showing a “buy” APP interface in a tablet computer.
  • the “buy” APP interface displayed on the tablet computer through the browser includes a plurality of second controls, such as second controls 21 to 27 .
  • the second control 21 may be an identification control of the "buy” APP, and the content of the control may be a picture containing the word "buy”.
  • the second control 22 may be a search control for inputting search content.
  • the second control 23 may be a category control for product classification, for example, it may include categories such as "daily necessities", "electronic products", and "food”.
  • the second control 24, the first control 25 and the first control 26 may be display controls for displaying commodities.
  • the second control 27 may be a display control for displaying commodities, and there may be multiple second controls 27 .
  • Each of the second controls 21 to 27 corresponds to a second label. There may be a preset label correspondence between the first label and the second label.
  • the process of displaying the interface of the "buy” APP in the mobile phone A to the tablet computer may include: setting a first control for each of the first controls 11 to 17 in the "buy” APP interface in the mobile phone A. and collect the content of each first control, obtain the UI data of the "buy” APP in the mobile phone A, and send the UI data and the type of the second terminal device to the interface construction server.
  • the interface construction server determines, according to the type of the second terminal device, the target page template as the target page template corresponding to the tablet computer.
  • the target page template includes a plurality of second controls, each second control corresponds to a second label, and the position of each second label in the target page template can be preset.
  • the interface construction server associates the content of the first control corresponding to the first label with the corresponding second control according to the label correspondence between the first label and the second label, and renders the target page template to obtain the target page.
  • the interface construction server sends the URL address of the target page to mobile phone A, and mobile phone A encrypts the URL address and adds a unique suffix, and then sends the URL address to the tablet computer.
  • the tablet computer opens the URL address through a web browser, and displays the interface of the "buy" APP.
  • the user operates the "buy” APP in the tablet computer, and the process that the tablet computer reverses the control of the "buy” APP in the mobile phone A may include: the user applies a preset operation to a certain commodity in the browser interface of the tablet computer, and the tablet
  • the browser of the computer monitors the preset operation event, and sends the preset operation event to the interface construction server, and the interface construction server converts the preset operation event into JSON data.
  • the JSON data includes data changes, event types, The operation mode of the event, the WindowTitle of the mobile phone, etc.
  • the interface construction server sends the JSON data to the Dues server of the mobile phone.
  • the Dues server parses and converts the JSON data, repackages it into the instruction sequence required for the execution of the "buy” APP process, and enters the instruction sequence into the "buy” APP. process.
  • the process of the "buy” APP executes the command operation according to the page element root and label, and updates the page elements of the "buy” APP, so as to realize the counter-control of the "buy” APP.
  • the interface aspect ratio of the target page template corresponding to the tablet computer is quite different from the interface aspect ratio of the "buy" APP of mobile phone A, so the first controls 14 and 15 in the interface of mobile phone A "buy” APP are
  • the arrangement of and 17 is different from the arrangement of the second controls 24, 25 and 27 in the target page template.
  • the first controls 14 and 15 are arranged and distributed vertically, and the second controls 24 and 25 are distributed horizontally side by side.
  • the plurality of first controls 17 are arranged in multiple rows, with two first controls 17 in each row, and the plurality of second controls 27 are arranged in multiple rows, with five second controls 17 in each row.
  • mobile phone A can share the "buy" APP interface to multiple second terminal devices, for example, to tablet computers, PCs, and mobile phone B.
  • second terminal devices for example, to tablet computers, PCs, and mobile phone B.
  • user A shares the currently browsed clothes with multiple second terminal devices
  • user A performs operations such as swiping or clicking on the page in mobile phone A
  • the browser interface of each second terminal device will also follow. Change.
  • user B can also perform operations such as swiping or clicking on the current page in the browser interface of the second terminal device to tell user A that this dress looks better, and the "buy" APP interface in mobile phone A will also change accordingly.
  • FIG. 8 is a schematic diagram showing a “buy” APP interface in a PC.
  • the “buy” APP interface displayed by the PC through the browser includes a plurality of second controls, such as second controls 31 to 37 .
  • the second control 31 may be an identification control of the "buy” APP, and the content of the control may be a picture containing the word "buy”.
  • the second control 32 may be a search control for inputting search content.
  • the second control 33 may be a category control for product classification, for example, it may include categories such as "daily necessities", “electronic products", and "food”.
  • the second control 34, the first control 35 and the first control 36 may be display controls for displaying commodities.
  • the second control 37 may be a display control for displaying commodities, and there may be multiple second controls 37 . Each of the second controls 31 to 37 corresponds to a second label.
  • FIG. 9 is a schematic diagram showing a “buy” APP interface in mobile phone B.
  • the “buy” APP interface displayed by the mobile phone B through the browser includes a plurality of second controls, such as second controls 41 to 47 .
  • the second control 41 may be an identification control of the "buy” APP, and the content of the control may be a picture containing the word "buy”.
  • the second control 42 may be a search control for inputting search content.
  • the second control 43 may be a category control for classifying goods, for example, it may include categories such as "daily necessities", "electronic products", and "food”.
  • the second control 44, the first control 45 and the first control 46 may be display controls for displaying commodities.
  • the second control 47 may be a display control for displaying commodities, and there may be multiple second controls 47 . Each of the second controls 41 to 47 corresponds to a second label.
  • the target application as a video application
  • the first terminal device as a mobile phone
  • the second terminal device as a large-screen device (such as a tablet or a TV) and a lightweight device (such as a watch).
  • the mobile phone when video A is played through the video application of the mobile phone, the mobile phone sends the video information to the tablet, and the tablet displays the video.
  • the mobile phone sends the video information to the tablet, and the tablet displays the video through the browser for a specific process, please refer to Embodiment 1, which will not be repeated here.
  • the mobile phone sends the control time corresponding to the video to the watch, and the watch responds to the user operation acting on the watch interface to control the video played on the tablet, such as pausing and continuing to play.
  • the first terminal device and the second terminal device do not need to be in the same physical space or under the same local area network.
  • the target application as a collaborative game application
  • the first terminal device as a mobile phone
  • the second terminal device as a touch screen device (eg, a tablet).
  • the second terminal device does not support the collaborative game application.
  • the mobile phone when user A plays a game through the collaborative game application of the mobile phone, the mobile phone sends the game screen to the tablet, and the tablet displays the video through the browser.
  • the mobile phone sends the game screen to the tablet, and the tablet displays the video through the browser for a specific process, please refer to Embodiment 1, which will not be repeated here.
  • user B applies an operation in the browser interface of the tablet, the tablet sends the operation to the mobile phone, and the mobile phone displays the operation in the collaborative game application.
  • the tablet sends the operation to the mobile phone, and the mobile phone displays the specific process of the operation in the collaborative game application with reference to Embodiment 1, which will not be repeated here.
  • the first terminal device can share the application interface with the second terminal device, and the second terminal device can control the target application in the first terminal device.
  • FIG. 12 is a schematic diagram of a hardware architecture of a terminal device 100 provided by an embodiment of the present application.
  • the terminal device 100 may be the aforementioned first terminal device, or may be the aforementioned second terminal device.
  • the terminal device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2.
  • Mobile communication module 150 wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, sensor module 180, buttons 190, motor 191, indicator 192, camera 193, display screen 194, And a subscriber identification module (subscriber identification module, SIM) card interface 195 and so on.
  • SIM subscriber identification module
  • the sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, and ambient light. Sensor 180L, bone conduction sensor 180M, etc.
  • the structures illustrated in the embodiments of the present invention do not constitute a specific limitation on the terminal device 100 .
  • the terminal device 100 may include more or less components than those shown in the drawings, or combine some components, or separate some components, or arrange different components.
  • the illustrated components may be implemented in hardware, software, or a combination of software and hardware.
  • the processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), controller, memory, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural-network processing unit (NPU) Wait. Wherein, different processing units may be independent devices, or may be integrated in one or more processors.
  • application processor application processor, AP
  • modem processor graphics processor
  • graphics processor graphics processor
  • ISP image signal processor
  • controller memory
  • video codec digital signal processor
  • DSP digital signal processor
  • NPU neural-network processing unit
  • the controller may be the nerve center and command center of the terminal device 100 .
  • the controller can generate an operation control signal according to the instruction operation code and timing signal, and complete the control of fetching and executing instructions.
  • a memory may also be provided in the processor 110 for storing instructions and data.
  • the memory in the processor 110 is a cache memory. This memory may hold instructions or data that have just been used or recycled by the processor 110 . If the processor 110 needs to use the instruction or data again, it can be called directly from memory. Repeated accesses are avoided and the latency of the processor 110 is reduced, thereby increasing the efficiency of the system.
  • the processor 110 may include one or more interfaces.
  • the interface may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous transceiver (universal asynchronous transmitter) receiver/transmitter, UART) interface, mobile industry processor interface (MIPI), general-purpose input/output (GPIO) interface, subscriber identity module (SIM) interface, and / or universal serial bus (universal serial bus, USB) interface, etc.
  • I2C integrated circuit
  • I2S integrated circuit built-in audio
  • PCM pulse code modulation
  • PCM pulse code modulation
  • UART universal asynchronous transceiver
  • MIPI mobile industry processor interface
  • GPIO general-purpose input/output
  • SIM subscriber identity module
  • USB universal serial bus
  • the I2C interface is a bidirectional synchronous serial bus that includes a serial data line (SDA) and a serial clock line (SCL).
  • the processor 110 may contain multiple sets of I2C buses.
  • the processor 110 can be respectively coupled to the touch sensor 180K, the charger, the flash, the camera 193 and the like through different I2C bus interfaces.
  • the processor 110 may couple the touch sensor 180K through the I2C interface, so that the processor 110 and the touch sensor 180K communicate with each other through the I2C bus interface, so as to realize the touch function of the terminal device 100 .
  • the I2S interface can be used for audio communication.
  • the processor 110 may contain multiple sets of I2S buses.
  • the processor 110 may be coupled with the audio module 170 through an I2S bus to implement communication between the processor 110 and the audio module 170 .
  • the audio module 170 can transmit audio signals to the wireless communication module 160 through the I2S interface, so as to realize the function of answering calls through a Bluetooth headset.
  • the PCM interface can also be used for audio communications, sampling, quantizing and encoding analog signals.
  • the audio module 170 and the wireless communication module 160 may be coupled through a PCM bus interface.
  • the audio module 170 can also transmit audio signals to the wireless communication module 160 through the PCM interface, so as to realize the function of answering calls through the Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
  • the UART interface is a universal serial data bus used for asynchronous communication.
  • the bus may be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication.
  • a UART interface is typically used to connect the processor 110 with the wireless communication module 160 .
  • the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to implement the Bluetooth function.
  • the audio module 170 can transmit audio signals to the wireless communication module 160 through the UART interface, so as to realize the function of playing music through the Bluetooth headset.
  • the MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193 .
  • MIPI interfaces include camera serial interface (CSI), display serial interface (DSI), etc.
  • the processor 110 communicates with the camera 193 through the CSI interface, so as to realize the shooting function of the terminal device 100 .
  • the processor 110 communicates with the display screen 194 through the DSI interface to implement the display function of the terminal device 100 .
  • the GPIO interface can be configured by software.
  • the GPIO interface can be configured as a control signal or as a data signal.
  • the GPIO interface may be used to connect the processor 110 with the camera 193, the display screen 194, the wireless communication module 160, the audio module 170, the sensor module 180, and the like.
  • the GPIO interface can also be configured as I2C interface, I2S interface, UART interface, MIPI interface, etc.
  • the USB interface 130 is an interface that conforms to the USB standard specification, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, and the like.
  • the USB interface 130 can be used to connect a charger to charge the terminal device 100, and can also be used to transmit data between the terminal device 100 and peripheral devices. It can also be used to connect headphones to play audio through the headphones. This interface can also be used to connect other terminal devices, such as AR devices.
  • the interface connection relationship between the modules illustrated in the embodiment of the present invention is only a schematic illustration, and does not constitute a structural limitation of the terminal device 100 .
  • the terminal device 100 may also adopt different interface connection manners in the foregoing embodiments, or a combination of multiple interface connection manners.
  • the charging management module 140 is used to receive charging input from the charger.
  • the charger may be a wireless charger or a wired charger.
  • the charging management module 140 may receive charging input from the wired charger through the USB interface 130 .
  • the charging management module 140 may receive wireless charging input through the wireless charging coil of the terminal device 100 . While the charging management module 140 charges the battery 142 , it can also supply power to the terminal device through the power management module 141 .
  • the power management module 141 is used for connecting the battery 142 , the charging management module 140 and the processor 110 .
  • the power management module 141 receives input from the battery 142 and/or the charging management module 140 and supplies power to the processor 110 , the internal memory 121 , the external memory, the display screen 194 , the camera 193 , and the wireless communication module 160 .
  • the power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle times, battery health status (leakage, impedance).
  • the power management module 141 may also be provided in the processor 110 .
  • the power management module 141 and the charging management module 140 may also be provided in the same device.
  • the wireless communication function of the terminal device 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modulation and demodulation processor, the baseband processor, and the like.
  • Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals.
  • Each antenna in terminal device 100 may be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization.
  • the antenna 1 can be multiplexed as a diversity antenna of the wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
  • the mobile communication module 150 may provide a wireless communication solution including 2G/3G/4G/5G, etc. applied on the terminal device 100 .
  • the mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA) and the like.
  • the mobile communication module 150 can receive electromagnetic waves from the antenna 1, filter and amplify the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation.
  • the mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and then turn it into an electromagnetic wave for radiation through the antenna 1 .
  • at least part of the functional modules of the mobile communication module 150 may be provided in the processor 110 .
  • at least part of the functional modules of the mobile communication module 150 may be provided in the same device as at least part of the modules of the processor 110 .
  • the modem processor may include a modulator and a demodulator.
  • the modulator is used to modulate the low frequency baseband signal to be sent into a medium and high frequency signal.
  • the demodulator is used to demodulate the received electromagnetic wave signal into a low frequency baseband signal. Then the demodulator transmits the demodulated low-frequency baseband signal to the baseband processor for processing.
  • the low frequency baseband signal is processed by the baseband processor and passed to the application processor.
  • the application processor outputs sound signals through audio devices (not limited to the speaker 170A, the receiver 170B, etc.), or displays images or videos through the display screen 194 .
  • the modem processor may be a stand-alone device.
  • the modem processor may be independent of the processor 110, and may be provided in the same device as the mobile communication module 150 or other functional modules.
  • the wireless communication module 160 can provide applications on the terminal device 100 including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellites Wireless communication solutions such as global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared technology (IR).
  • WLAN wireless local area networks
  • BT Bluetooth
  • GNSS global navigation satellite system
  • FM frequency modulation
  • NFC near field communication
  • IR infrared technology
  • the wireless communication module 160 may be one or more devices integrating at least one communication processing module.
  • the wireless communication module 160 receives electromagnetic waves via the antenna 2 , frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110 .
  • the wireless communication module 160 can also receive the signal to be sent from the processor 110 , perform frequency modulation on it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2 .
  • the antenna 1 of the terminal device 100 is coupled with the mobile communication module 150, and the antenna 2 is coupled with the wireless communication module 160, so that the terminal device 100 can communicate with the network and other devices through wireless communication technology.
  • Wireless communication technologies may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), broadband code division Multiple access (wideband code division multiple access, WCDMA), time division code division multiple access (time-division code division multiple access, TD-SCDMA), long term evolution (long term evolution, LTE), BT, GNSS, WLAN, NFC, FM , and/or IR technology, etc.
  • GNSS may include global positioning system (GPS), global navigation satellite system (GLONASS), Beidou navigation satellite system (BDS), quasi-zenith satellite system (quasi-zenith) satellite system, QZSS) and/or satellite based augmentation systems (SBAS).
  • GPS global positioning system
  • GLONASS global navigation satellite system
  • BDS Beidou navigation satellite system
  • QZSS quasi-zenith satellite system
  • SBAS satellite based augmentation systems
  • the terminal device 100 implements a display function through a GPU, a display screen 194, an application processor, and the like.
  • the GPU is a microprocessor for image processing, and is connected to the display screen 194 and the application processor.
  • the GPU is used to perform mathematical and geometric calculations for graphics rendering.
  • Processor 110 may include one or more GPUs that execute program instructions to generate or alter display information.
  • Display screen 194 is used to display images, videos, and the like.
  • Display screen 194 includes a display panel.
  • the display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (active-matrix organic light).
  • LED diode AMOLED
  • flexible light-emitting diode flexible light-emitting diode (flex light-emitting diode, FLED), Miniled, MicroLed, Micro-oLed, quantum dot light-emitting diode (quantum dot light emitting diodes, QLED) and so on.
  • the terminal device 100 may include one or N display screens 194 , where N is a positive integer greater than one.
  • the terminal device 100 can realize the shooting function through the ISP, the camera 193, the video codec, the GPU, the display screen 194 and the application processor.
  • the ISP is used to process the data fed back by the camera 193 .
  • the shutter is opened, the light is transmitted to the camera photosensitive element through the lens, the light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing, converting it into an image visible to the naked eye.
  • ISP can also perform algorithm optimization on image noise, brightness, and skin tone.
  • ISP can also optimize the exposure, color temperature and other parameters of the shooting scene.
  • the ISP may be provided in the camera 193 .
  • Camera 193 is used to capture still images or video.
  • the object is projected through the lens to generate an optical image onto the photosensitive element.
  • the photosensitive element may be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor.
  • CMOS complementary metal-oxide-semiconductor
  • the photosensitive element converts the optical signal into an electrical signal, and then transmits the electrical signal to the ISP to convert it into a digital image signal.
  • the ISP outputs the digital image signal to the DSP for processing.
  • DSP converts digital image signals into standard RGB, YUV and other formats of image signals.
  • the terminal device 100 may include 1 or N cameras 193 , where N is a positive integer greater than 1.
  • a digital signal processor is used to process digital signals, in addition to processing digital image signals, it can also process other digital signals. For example, when the terminal device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy, and the like.
  • Video codecs are used to compress or decompress digital video.
  • the terminal device 100 may support one or more video codecs.
  • the terminal device 100 can play or record videos in various encoding formats, for example, moving picture experts group (moving picture experts group, MPEG) 1, MPEG2, MPEG3, MPEG4 and so on.
  • MPEG moving picture experts group
  • the NPU is a neural-network (NN) computing processor.
  • NN neural-network
  • Applications such as intelligent cognition of the terminal device 100 can be implemented through the NPU, such as image recognition, face recognition, speech recognition, text understanding, and the like.
  • the external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the terminal device 100 .
  • the external memory card communicates with the processor 110 through the external memory interface 120 to realize the data storage function. For example to save files like music, video etc in external memory card.
  • Internal memory 121 may be used to store computer executable program code, which includes instructions.
  • the processor 110 executes various functional applications and data processing of the terminal device 100 by executing the instructions stored in the internal memory 121 .
  • the internal memory 121 may include a storage program area and a storage data area.
  • the storage program area can store an operating system, an application program required for at least one function (such as a sound playback function, an image playback function, etc.), and the like.
  • the storage data area may store data (such as audio data, phone book, etc.) created during the use of the terminal device 100 and the like.
  • the internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, universal flash storage (UFS), and the like.
  • the terminal device 100 may implement audio functions through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, an application processor, and the like. Such as music playback, recording, etc.
  • the audio module 170 is used for converting digital audio information into analog audio signal output, and also for converting analog audio input into digital audio signal. Audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be provided in the processor 110 , or some functional modules of the audio module 170 may be provided in the processor 110 .
  • Speaker 170A also referred to as a "speaker" is used to convert audio electrical signals into sound signals.
  • the terminal device 100 can listen to music through the speaker 170A, or listen to a hands-free call.
  • the receiver 170B also referred to as "earpiece" is used to convert audio electrical signals into sound signals.
  • the terminal device 100 answers a call or a voice message, the voice can be answered by placing the receiver 170B close to the human ear.
  • the microphone 170C also called “microphone” or “microphone” is used to convert sound signals into electrical signals.
  • the user can make a sound by approaching the microphone 170C through a human mouth, and input the sound signal into the microphone 170C.
  • the terminal device 100 may be provided with at least one microphone 170C.
  • the terminal device 100 may be provided with two microphones 170C, which may implement a noise reduction function in addition to collecting sound signals.
  • the terminal device 100 may further be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify sound sources, and implement directional recording functions.
  • the earphone jack 170D is used to connect wired earphones.
  • the earphone interface 170D may be the USB interface 130, or may be a 3.5mm open mobile terminal platform (OMTP) standard interface, a cellular telecommunications industry association of the USA (CTIA) standard interface.
  • OMTP open mobile terminal platform
  • CTIA cellular telecommunications industry association of the USA
  • the pressure sensor 180A is used to sense pressure signals, and can convert the pressure signals into electrical signals.
  • the pressure sensor 180A may be provided on the display screen 194 .
  • the capacitive pressure sensor may be comprised of at least two parallel plates of conductive material. When a force is applied to the pressure sensor 180A, the capacitance between the electrodes changes.
  • the terminal device 100 determines the intensity of the pressure according to the change in capacitance. When a touch operation acts on the display screen 194, the terminal device 100 detects the intensity of the touch operation according to the pressure sensor 180A.
  • the terminal device 100 may also calculate the touched position according to the detection signal of the pressure sensor 180A.
  • touch operations acting on the same touch position but with different touch operation intensities may correspond to different operation instructions. For example, when a touch operation whose intensity is less than the first pressure threshold acts on the short message application icon, the instruction for viewing the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, the instruction to create a new short message is executed.
  • the gyro sensor 180B may be used to determine the motion attitude of the terminal device 100 .
  • the angular velocity of the end device 100 about three axes ie, the x, y and z axes
  • the gyro sensor 180B can be used for image stabilization.
  • the gyro sensor 180B detects the shaking angle of the terminal device 100, calculates the distance to be compensated by the lens module according to the angle, and allows the lens to offset the shaking of the terminal device 100 through reverse motion to achieve anti-shake.
  • the gyro sensor 180B can also be used for navigation and somatosensory game scenarios.
  • the air pressure sensor 180C is used to measure air pressure.
  • the terminal device 100 calculates the altitude through the air pressure value measured by the air pressure sensor 180C to assist in positioning and navigation.
  • the magnetic sensor 180D includes a Hall sensor.
  • the terminal device 100 can detect the opening and closing of the flip holster using the magnetic sensor 180D.
  • the terminal device 100 can detect the opening and closing of the flip according to the magnetic sensor 180D. Further, according to the detected opening and closing state of the leather case or the opening and closing state of the flip cover, characteristics such as automatic unlocking of the flip cover are set.
  • the acceleration sensor 180E can detect the magnitude of the acceleration of the terminal device 100 in various directions (generally three axes).
  • the magnitude and direction of gravity can be detected when the terminal device 100 is stationary. It can also be used to identify the posture of terminal devices, and can be used in applications such as horizontal and vertical screen switching, pedometers, etc.
  • the terminal device 100 can measure the distance through infrared or laser. In some embodiments, when shooting a scene, the terminal device 100 can use the distance sensor 180F to measure the distance to achieve fast focusing.
  • Proximity light sensor 180G may include, for example, light emitting diodes (LEDs) and light detectors, such as photodiodes.
  • the light emitting diodes may be infrared light emitting diodes.
  • the terminal device 100 emits infrared light to the outside through the light emitting diode.
  • the terminal device 100 detects infrared reflected light from nearby objects using a photodiode. When sufficient reflected light is detected, it can be determined that there is an object near the terminal device 100 . When insufficient reflected light is detected, the terminal device 100 may determine that there is no object near the terminal device 100 .
  • the terminal device 100 can use the proximity light sensor 180G to detect that the user holds the terminal device 100 close to the ear to talk, so as to automatically turn off the screen to save power.
  • Proximity light sensor 180G can also be used in holster mode, pocket mode automatically unlocks and locks the screen.
  • the ambient light sensor 180L is used to sense ambient light brightness.
  • the terminal device 100 can adaptively adjust the brightness of the display screen 194 according to the perceived ambient light brightness.
  • the ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures.
  • the ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the terminal device 100 is in a pocket, so as to prevent accidental touch.
  • the fingerprint sensor 180H is used to collect fingerprints.
  • the terminal device 100 can use the collected fingerprint characteristics to realize fingerprint unlocking, accessing application locks, taking photos with fingerprints, answering incoming calls with fingerprints, and the like.
  • the temperature sensor 180J is used to detect the temperature.
  • the terminal device 100 uses the temperature detected by the temperature sensor 180J to execute the temperature processing strategy. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold value, the terminal device 100 reduces the performance of the processor located near the temperature sensor 180J, so as to reduce power consumption and implement thermal protection.
  • the terminal device 100 when the temperature is lower than another threshold, the terminal device 100 heats the battery 142 to avoid abnormal shutdown of the terminal device 100 caused by the low temperature.
  • the terminal device 100 boosts the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperature.
  • Touch sensor 180K also called “touch panel”.
  • the touch sensor 180K may be disposed on the display screen 194 , and the touch sensor 180K and the display screen 194 form a touch screen, also called a “touch screen”.
  • the touch sensor 180K is used to detect a touch operation on or near it.
  • the touch sensor can pass the detected touch operation to the application processor to determine the type of touch event.
  • Visual output related to touch operations may be provided through display screen 194 .
  • the touch sensor 180K may also be disposed on the surface of the terminal device 100 , which is different from the position where the display screen 194 is located.
  • the bone conduction sensor 180M can acquire vibration signals. In some embodiments, the bone conduction sensor 180M can acquire the vibration signal of the vibrating bone mass of the human voice. The bone conduction sensor 180M can also contact the pulse of the human body and receive the blood pressure beating signal. In some embodiments, the bone conduction sensor 180M can also be disposed in the earphone, combined with the bone conduction earphone.
  • the audio module 170 can analyze the voice signal based on the vibration signal of the voice part vibrating bone mass obtained by the bone conduction sensor 180M, so as to realize the voice function.
  • the application processor can analyze the heart rate information based on the blood pressure beat signal obtained by the bone conduction sensor 180M, and realize the function of heart rate detection.
  • the keys 190 include a power-on key, a volume key, and the like. Keys 190 may be mechanical keys. It can also be a touch key.
  • the terminal device 100 may receive key input and generate key signal input related to user settings and function control of the terminal device 100 .
  • Motor 191 can generate vibrating cues.
  • the motor 191 can be used for vibrating alerts for incoming calls, and can also be used for touch vibration feedback.
  • touch operations acting on different applications can correspond to different vibration feedback effects.
  • the motor 191 can also correspond to different vibration feedback effects for touch operations on different areas of the display screen 194 .
  • Different application scenarios for example: time reminder, receiving information, alarm clock, games, etc.
  • the touch vibration feedback effect can also support customization.
  • the indicator 192 can be an indicator light, which can be used to indicate the charging state, the change of the power, and can also be used to indicate a message, a missed call, a notification, and the like.
  • the SIM card interface 195 is used to connect a SIM card.
  • the SIM card can be contacted and separated from the terminal device 100 by inserting into the SIM card interface 195 or pulling out from the SIM card interface 195 .
  • the terminal device 100 may support 1 or N SIM card interfaces, where N is a positive integer greater than 1.
  • the SIM card interface 195 can support Nano SIM card, Micro SIM card, SIM card and so on. Multiple cards can be inserted into the same SIM card interface 195 at the same time. Multiple cards can be of the same type or different.
  • the SIM card interface 195 can also be compatible with different types of SIM cards.
  • the SIM card interface 195 is also compatible with external memory cards.
  • the terminal device 100 interacts with the network through the SIM card to realize functions such as calls and data communication.
  • the terminal device 100 adopts an eSIM, that is, an embedded SIM card.
  • the eSIM card can be embedded in the terminal device 100 and cannot be separated from the terminal device 100 .
  • FIG. 13 is a block diagram of a software structure of a terminal device 100 according to an embodiment of the present application.
  • the layered architecture divides the software into several layers, and each layer has a clear role and division of labor. Layers communicate with each other through software interfaces.
  • the Android system is divided into four layers, which are, from top to bottom, an application layer, an application framework layer, an Android runtime (Android runtime) and a system library, and a kernel layer.
  • the application layer can include a series of application packages.
  • the application package can include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message and so on.
  • the application framework layer provides an application programming interface (application programming interface, API) and a programming framework for applications in the application layer.
  • the application framework layer includes some predefined functions.
  • the application framework layer may include a window manager, a content provider, a view system, a telephony manager, a resource manager, a notification manager, and the like.
  • a window manager is used to manage window programs.
  • the window manager can get the size of the display screen, determine whether there is a status bar, lock the screen, take screenshots, etc.
  • Content providers are used to store and retrieve data and make these data accessible to applications.
  • Data can include videos, images, audio, calls made and received, browsing history and bookmarks, phone book, etc.
  • the view system includes visual controls, such as controls for displaying text, controls for displaying pictures, and so on. View systems can be used to build applications.
  • a display interface can consist of one or more views.
  • the display interface including the short message notification icon may include a view for displaying text and a view for displaying pictures.
  • the telephony manager is used to provide the communication function of the terminal device 100 .
  • the management of call status including connecting, hanging up, etc.).
  • the resource manager provides various resources for the application, such as localization strings, icons, pictures, layout files, video files and so on.
  • the notification manager enables applications to display notification information in the status bar, which can be used to convey notification-type messages, and can disappear automatically after a brief pause without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc.
  • the notification manager can also display notifications in the status bar at the top of the system in the form of graphs or scroll bar text, such as notifications of applications running in the background, and notifications on the screen in the form of dialog windows. For example, text information is prompted in the status bar, a prompt sound is issued, the terminal device vibrates, and the indicator light flashes.
  • Android Runtime includes core libraries and a virtual machine. Android runtime is responsible for scheduling and management of the Android system.
  • the core library consists of two parts: one is the function functions that the java language needs to call, and the other is the core library of Android.
  • the application layer and the application framework layer run in virtual machines.
  • the virtual machine executes the java files of the application layer and the application framework layer as binary files.
  • the virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, safety and exception management, and garbage collection.
  • a system library can include multiple functional modules. For example: surface manager (surface manager), media library (Media Libraries), 3D graphics processing library (eg: OpenGL ES), 2D graphics engine (eg: SGL), etc.
  • surface manager surface manager
  • media library Media Libraries
  • 3D graphics processing library eg: OpenGL ES
  • 2D graphics engine eg: SGL
  • the Surface Manager is used to manage the display subsystem and provides a fusion of 2D and 3D layers for multiple applications.
  • the media library supports playback and recording of a variety of commonly used audio and video formats, as well as still image files.
  • the media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
  • the 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
  • 2D graphics engine is a drawing engine for 2D drawing.
  • the kernel layer is the layer between hardware and software.
  • the kernel layer contains at least display drivers, camera drivers, audio drivers, and sensor drivers.
  • an embodiment of the present application further provides a terminal device, including: one or more processors and a memory.
  • a memory is coupled to the one or more processors for storing computer program code including computer instructions.
  • the terminal device is caused to perform one or more steps in any one of the above methods.
  • an embodiment of the present application further provides a computer-readable storage medium, where instructions are stored in the computer-readable storage medium, and when the computer or processor is run on a computer or a processor, the computer or the processor is made to execute any one of the above. one or more steps in a method.
  • the embodiment of the present application also provides a computer program product containing instructions, when the computer program product is run on a computer or a processor, the computer or processor is made to execute one or more of the above-mentioned methods. step.
  • an embodiment of the present application further provides a chip system
  • the chip system may include a memory and a processor, and the processor executes a computer program stored in the memory to implement one or more of the above-mentioned methods. step.
  • the chip system may be a single chip, or a chip module composed of multiple chips.
  • an embodiment of the present application further provides a chip system
  • the chip system may include a processor, the processor is coupled to a memory, and the processor executes a computer program stored in the memory to implement any of the above methods. one or more steps.
  • the chip system may be a single chip, or a chip module composed of multiple chips.
  • a computer program product includes one or more computer instructions.
  • the computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable device.
  • Computer instructions may be stored in or transmitted over a computer-readable storage medium.
  • Computer instructions may be sent from one website site, computer, server or data center to another website site, computer, server or data center by wire (eg, coaxial cable, fiber optic, digital subscriber line) or wireless (eg, infrared, wireless, microwave, etc.) data center for transmission.
  • a computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, a data center, or the like that includes an integration of one or more available media.
  • Useful media may be magnetic media (eg, floppy disks, hard disks, magnetic tapes), optical media (eg, DVDs), or semiconductor media (eg, solid state disks (SSDs)), and the like.
  • the process can be completed by instructing the relevant hardware by a computer program, and the program can be stored in a computer-readable storage medium.
  • the program When the program is executed , which may include the processes of the foregoing method embodiments.
  • the aforementioned storage medium includes: ROM or random storage memory RAM, magnetic disk or optical disk and other mediums that can store program codes.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Software Systems (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

本申请适用于终端技术领域,提供了终端应用控制方法、终端设备及芯片***。上述方法包括:第一终端设备对目标应用界面中的页面元素设置标签,并采集页面元素的内容,得到页面布局信息;第一终端设备获取第二终端设备的类型和共享权限;服务器根据第二终端设备的类型确定目标页面模板,基于页面布局信息对目标页面模板对应的页面进行渲染,并生成渲染后的页面的地址标识;第二终端设备通过浏览器打开地址标识,显示与浏览器的界面适应的目标页面,目标页面中包含目标应用界面。上述方法能够在支持浏览器的第二终端设备中显示目标应用的界面,第二终端设备可以不支持目标应用,支持浏览器即可显示目标应用的界面。

Description

终端应用控制的方法、终端设备及芯片***
本申请要求于2021年02月24日提交国家知识产权局、申请号为202110205358.8、申请名称为“终端应用控制方法、终端设备及芯片***”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及终端技术领域,尤其涉及一种终端应用控制的方法、终端设备及芯片***。
背景技术
目前在多客户端上协同控制手机源端的APP(Application,应用)上包括多客户端APP协同控制以及投屏协同控制两种方案。其中,多客户端APP协同控制指的是在多客户端上安装与手机源端的APP相同的APP,通过分享链接以及复制文字的方法打开客户端的APP页面。投屏协同控制指的是将手机源端的应用通过投屏技术投到客户端上,在客户端上对应用进行操作,手机源端也会执行相应的指令。
然而,上述控制手机源端的APP的方法对客户端要求较高,需要多个客户端下载安装适配该客户端屏幕大小的同一个APP。而在APP不支持的客户端上控制手机源端的APP则无法实现。
发明内容
本申请提供一种终端应用控制方法、终端设备及芯片***,能够在支持浏览器的终端设备中显示目标应用的界面,终端设备可以不支持目标应用,支持浏览器即可显示目标应用的界面。
为达到上述目的,本申请采用如下技术方案:
第一方面,本申请实施例提供一种终端应用控制方法,包括:第一终端设备对目标应用界面中的页面元素设置第一标签,并采集页面元素的内容,得到页面布局信息,所述页面布局信息包含所述第一标签和所述页面元素的内容;所述第一终端设备获取第二终端设备的类型,并向服务器发送所述页面布局信息和第二终端设备的类型;所述服务器根据所述第二终端设备的类型确定目标页面模板,基于所述页面布局信息对所述目标页面模板对应的页面进行渲染,并生成渲染后的页面的地址标识;所述第一终端设备获取所述地址标识,并向所述第二终端设备发送所述地址标识;所述第二终端设备通过浏览器打开所述地址标识,显示与所述浏览器的界面适应的目标页面,所述目标页面中包含所述目标应用界面。
本申请实施例,对目标应用界面中的页面元素设置标签,并采集页面元素的内容,得到页面布局信息。之后,服务器根据第二终端设备的类型确定目标页面模板,基于页面布局信息对目标页面模板对应的页面进行渲染,并生成渲染后的页面的地址标识。第一终端设备向所述第二终端设备发送该地址标识。第二终端设备通过浏览器打开该 地址标识,显示与浏览器的界面适应的目标页面,该目标页面中包含目标应用界面。本申请实施例能够在支持浏览器的第二终端设备中显示目标应用的界面,实现将第一终端设备中目标应用的界面共享到第二终端设备中显示。而且,第二终端设备可以不支持目标应用,支持浏览器即可显示目标应用的界面。
其中,服务器可以为后述内容中的界面构建服务器。
结合第一方面,在一些实施例中,所述方法还包括:所述第二终端设备通过浏览器监听作用于所述目标页面上的操作事件,并将所述操作事件发送给所述服务器,所述操作事件包括操作事件的数据、类型、操作方式和窗口标题;所述服务器向所述第一终端设备发送所述操作事件;所述第一终端设备根据所述操作事件对所述目标应用的页面元素进行更新。
本申请实施例,若用户在第二终端设备的浏览器界面上施加预设操作,第二终端设备能够通过浏览器监听到该操作事件,并将该操作事件发送给服务器,之后服务器将该操作事件发送给第一终端设备。第一终端设备根据该操作事件能够对目标应用的页面元素进行更新,从而能够实现第二终端设备对第一终端设备的目标应用的反向控制。
示例性的,当第二终端设备接收到作用于浏览器界面上的操作(例如控件的click事件)后,浏览器监听到该操作事件,第二终端设备将该操作事件以及操作事件的标签发送至服务器,服务器将该操作事件以及操作事件的标签发送给第一终端设备。第一终端设备根据该操作事件的标签确定目标应用中与该操作事件对应的控件,根据确定的控件执行该操作事件。该操作事件可以包括操作事件的数据、类型、操作方式和窗口标题。
示例性的,当第一终端设备的目标应用的界面发生变化时,第一终端设备将目标应用的页面布局变化信息发送给服务器,服务器根据目标应用的页面布局变化信息确定目标页面模板的页面变化信息。服务器将页面变化信息发送给第二终端设备,第二终端设备通过浏览器将页面变化信息同步刷新到加载的页面上。
第二方面,本申请实施例提供一种终端应用控制方法,适用于第一终端设备,所述方法包括:对目标应用界面中的页面元素设置第一标签,并采集所述页面元素的内容,得到页面布局信息,所述页面布局信息包含所述第一标签和所述页面元素的内容;获取第二终端设备的类型,并向服务器发送所述页面布局信息和第二终端设备的类型;接收服务器发送的所述地址标识,所述页地址标识由所述服务器根据渲染后的页面得到,所述渲染后的页面由所述服务器根据所述第二终端设备的类型确定目标页面模板,并根据所述页面布局信息对所述目标页面模板进行渲染得到;向所述第二终端设备发送所述地址标识,以使得所述第二终端设备通过浏览器打开所述地址标识,显示与所述浏览器界面适应的目标页面,所述目标页面中包含所述目标应用界面。
上述终端应用控制方法,对目标应用界面中的页面元素设置标签,并采集页面元素的内容,得到页面布局信息。之后,服务器根据第二终端设备的类型确定目标页面模板,基于页面布局信息对目标页面模板对应的页面进行渲染,并生成渲染后的页面的地址标识。第一终端设备向所述第二终端设备发送该地址标识。第二终端设备通过浏览器打开该地址标识,显示与浏览器的界面适应的目标页面,该目标页面中包含目 标应用界面。本申请实施例能够在支持浏览器的第二终端设备中显示目标应用的界面,实现将第一终端设备中目标应用的界面共享到第二终端设备中显示。而且,第二终端设备可以不支持目标应用,支持浏览器即可显示目标应用的界面。第二终端设备能够根据浏览器界面自适应显示目标应用的界面。
其中,页面元素可以为目标应用界面中的控件,若对上述控件设置标签后,需要采集上述控件的文本内容或图片内容。例如,目标应用界面中包括“确定”、“下一步”、“取消”等控件,若对上述控件设置对应的标签后,则采集各个控件的文本内容“确定”、“下一步”、“取消”等。上述具有标签的页面元素和页面元素的内容,记为页面布局信息。
一些实施例中,第二终端设备的类型可以包括PC、平板、手机、手表和其他设备。
结合第二方面,在一些实施例中,上述方法还包括:接收所述服务器发送的操作事件数据,所述操作事件数据包括操作事件的数据、类型、操作方式和窗口标题,所述操作事件数据为所述服务器接收的作用于所述目标页面上的操作事件;根据所述操作事件数据生成控制指令;执行所述控制指令,对所述目标应用的页面元素进行更新。
具体的,所述操作事件数据为第二终端设备发送给服务器的操作事件,所述操作事件为由所述第二终端设备通过浏览器监听到的作用于所述目标页面上的操作事件。
本申请实施例,若用户在第二终端设备的浏览器界面上施加预设操作,浏览器能够监听到该操作事件,第二终端设备将该操作事件发送给服务器,之后服务器将该操作事件发送给第一终端设备。第一终端设备根据该操作事件能够对目标应用的页面元素进行更新,从而能够实现第二终端设备对第一终端设备的目标应用的反向控制。
结合第二方面,在一些实施例中,所述第二终端设备包括多个类型的第二终端设备,所述地址标识为多个,每个页面地址对应一个类型的第二终端设备;所述向所述第二终端设备发送所述地址标识,包括:对每个所述地址标识添加唯一标识;将添加唯一的地址标识发送给相应的第二终端设备。
其中,对于多个第二终端设备的情况,本申请实施例能够对每个第二终端设备的类型渲染一个目标页面模板,得到一个地址标识,然后对各个地址标识分别添加一个唯一标识,使得各个地址标识只能够被使用一次。之后,将添加了唯一标识的地址标识分别发送给相应的第二终端设备,使得各个第二终端设备通过浏览器打开各自的地址标识,在浏览器界面中显示目标应用的界面。
示例性的,每个第二终端设备的共享权限可以不同,共享权限可以包括显示目标应用的界面,以及显示目标应用的界面且控制目标应用,以及控制目标应用。若共享权限为显示目标应用的界面,则服务器不接收作用于第二终端设备浏览器界面上的操作事件。若共享权限为显示目标应用的界面且控制目标应用,则服务器接收作用于第二终端设备浏览器界面上的操作事件。
一些实施例中,第二终端设备可以包括第二终端设备A和第二终端设备B,第二终端设备A的共享权限为显示目标应用的界面,第二终端设备B的共享权限为控制目标应用。则,第一终端设备可以将地址标识发送给第二终端设备A,将目标应用的控制信息发送给第二终端设备B,以使得第二终端设备B能够控制第二终端设备A对目标页面的显示。
其中,目标应用可以为能够播放视频的应用,目标应用的控制信息为控制时间信息。第二终端设备B接收作用于第二终端设备B界面上的触控操作,确定获取到所述触控操作的目标时刻,根据该触控操作和目标时刻生成控制指令,并向第二终端设备A发送该控制指令。第二终端设备A响应该控制指令,停止播放视频或继续播放视频。
第三方面,本申请实施例提供一种终端应用控制方法,适用于服务器,所述方法包括:接收第一终端设备发送的页面布局信息和第二终端设备的类型,所述页面布局信息包含第一标签和所述第一终端设备中目标应用界面中的页面元素的内容,所述第一标签为对所述页面元素设置的标签;根据所述第二终端设备的类型确定目标页面模板,并根据所述页面布局信息对所述目标页面模板进行渲染;对所述目标页面模板渲染完成后,生成渲染后的页面的地址标识;向所述第一终端设备发送所述地址标识,以使得所述第一终端设备将所述地址标识发送给所述第二终端设备,所述第二终端设备通过浏览器打开所述地址标识,显示与所述浏览器的界面适应的目标页面,所述目标页面中包含所述目标应用界面。
上述终端控制方法,对目标应用界面中的页面元素设置标签,并采集页面元素的内容,得到页面布局信息。之后,服务器根据第二终端设备的类型确定目标页面模板,基于页面布局信息对目标页面模板对应的页面进行渲染,并生成渲染后的页面的地址标识。第一终端设备向所述第二终端设备发送该地址标识。第二终端设备通过浏览器打开该地址标识,显示与浏览器的界面适应的目标页面,该目标页面中包含目标应用界面。本申请实施例能够在支持浏览器的第二终端设备中显示目标应用的界面,实现将第一终端设备中目标应用的界面共享到第二终端设备中显示。而且,第二终端设备可以不支持目标应用,支持浏览器即可显示目标应用的界面。第二终端设备能够根据浏览器界面自适应显示目标应用的界面。
结合第三方面,在一些实施例中,所述页面元素为所述目标应用界面中第一控件,一个所述第一控件对应一个所述第一标签;所述第二终端设备的类型为多种,每种类型对应至少一个目标页面模板,每个所述目标页面模板包括多个第二控件,每个第二控件对应一个第二标签;所述根据所述页面布局信息对所述目标页面模板进行渲染,包括:根据所述第一标签和所述第二标签之间的预设标签对应关系,确定与各个第一控件对应的第二控件;将所述第一控件的内容与对应的第二控件关联,并对所述目标页面模板进行渲染。
示例性的,不同的第二终端设备的类型对应的目标页面模板不同。例如,第二终端设备的类型可以包括PC、平板、手机、手表和其他设备。其中,PC对应目标页面模板1,平板对应目标页面模板2,手机对应目标页面模板3,手表对应目标页面模板4。
一种场景中,目标页面模板1对应的页面为页面1,页面1中的第二控件可以为多个,且每个第二控件对应一个第二标签。第一标签和第二标签之前的对应关系可以预先设置。第一标签包括N个第一控件对应的第一标签,第二标签包括M个第二控件对应的第二标签,各个第一标签和各个第二标签之间的标签对应关系,可以根据各个第一控件与各个第二控件之间的对应关系可以预先设置。例如,ImageView控件对应的第一标签,与img控件对应的第二标签相对应;TextView控件对应的第一标签,与 p控件对应的第二标签相对应;Button控件对应的第一标签,与Input:button控件对应的第二标签相对应。
结合第三方面,在一些实施例中,上述方法还包括:接收作用于所述第二终端设备浏览器界面上的操作事件,所述操作事件包括操作事件的数据、类型、操作方式和窗口标题;向所述第一终端设备发送所述操作事件,以使得所述第一终端设备根据所述操作事件对所述目标应用的页面元素进行更新。
例如,所述操作事件数据为第二终端设备发送给服务器的操作事件,所述操作事件为由所述第二终端设备通过浏览器监听到的作用于浏览器界面上的操作事件。
结合第三方面,在一些实施例中,所述方法还包括:接收所述第一终端设备发送的第二终端设备的共享权限;所述共享权限包括显示所述目标应用的界面,以及显示所述目标应用的界面且控制所述目标应用;若所述共享权限为显示所述目标应用的界面,则不执行所述接收作用于所述第二终端设备浏览器界面上的操作事件的步骤;若所述共享权限为显示所述目标应用的界面且控制所述目标应用,则执行所述接收作用于所述第二终端设备浏览器界面上的操作事件的步骤。
结合第三方面,在一些实施例中,所述第二终端设备包括第二终端设备A和第二终端设备B,第二终端设备A的共享权限为显示所述目标应用的界面,第二终端设备B的共享权限为控制所述目标应用;所述向所述第一终端设备发送所述地址标识,包括:将所述地址标识和所述目标应用的控制信息发送给第一终端设备,以使得第一终端设备将所述地址标识发送给第二终端设备A,将所述控制信息发送给第二终端设备B,使得所述第二终端设备B能够控制所述第二终端设备A对所述目标页面的显示。
第四方面,本申请实施例提供一种终端设备,包括:一个或多个处理器和存储器;所述存储器与所述一个或多个处理器耦合,所述存储器用于存储计算机程序代码,所述计算机程序代码包括计算机指令;当所述一个或多个处理器执行所述计算机指令时,使得所述终端设备执行如第一方面中任一项所述的方法,或如第二方面中任一项所述的方法,或如第三方面中任一项所述的方法。
第五方面,本申请实施例提供一种服务器,包括:一个或多个处理器和存储器;所述存储器与所述一个或多个处理器耦合,所述存储器用于存储计算机程序代码,所述计算机程序代码包括计算机指令;当所述一个或多个处理器执行所述计算机指令时,使得所述终端设备执行如第一方面中任一项所述的方法,或如第二方面中任一项所述的方法,或如第三方面中任一项所述的方法。
第六方面,本申请实施例提供一种芯片***,所述芯片***包括处理器,所述处理器与存储器耦合,所述处理器执行所述存储器中存储的计算机程序,以实现如第一方面中任一项所述的方法,或如第二方面中任一项所述的方法,或如第三方面中任一项所述的方法。其中,该芯片***可以为单个芯片,或者多个芯片组成的芯片模组。
第七方面,本申请实施例提供一种芯片***,所述芯片***包括存储器和处理器,所述处理器执行所述存储器中存储的计算机程序,以实现如第一方面中任一项所述的方法,或如第二方面中任一项所述的方法,或如第三方面中任一项所述的方法。其中,该芯片***可以为单个芯片,或者多个芯片组成的芯片模组。
第八方面,本申请实施例提供一种计算机程序产品,当计算机程序产品在终端设 备上运行时,使得终端设备执行上述第一方面中任一项所述的方法,或如第二方面中任一项所述的方法,或如第三方面中任一项所述的方法。
第九方面,本申请实施例提供一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时实现如第一方面任一项所述的方法,或如第二方面中任一项所述的方法,或如第三方面中任一项所述的方法。
可以理解地,上述提供的第四方面所述的终端设备、第五方面所述的服务器、第六方面和第七方面所述的芯片***、第八方面所述的计算机程序产品、第九方面所述的计算机可读存储介质,用于执行第一方面中所提供的方法,或执行第二方面中所述的方法,或执行第三方面中所述的方法。因此,其所能达到的有益效果可参考对应方法中的有益效果,此处不再赘述。
附图说明
图1为本申请实施例提供的终端应用控制方法所使用的场景示意图;
图2为本申请实施例提供的场景示意图;
图3为本申请实施例提供的将第一终端设备的目标应用的界面共享到第二终端设备的界面中显示的过程示意图;
图4为本申请实施例提供的第二终端设备对目标应用进行反控的过程示意图;
图5为本申请实施例提供的终端应用控制方法的流程示意图;
图6为本申请实施例提供的手机A中“买”APP界面示意图;
图7为本申请实施例提供的平板电脑中显示“买”APP界面的示意图;
图8为本申请实施例提供的PC中显示“买”APP界面的示意图;
图9为本申请实施例提供的手机B中显示“买”APP界面的示意图;
图10为本申请实施例提供的场景示意图;
图11(a)和图11(b)为本申请实施例提供的场景示意图;
图12为本申请实施例提供的终端设备的硬件架构示意图;
图13为本申请实施例提供的终端设备的软件结构框图。
具体实施方式
以下描述中,为了说明而不是为了限定,提出了诸如特定***结构、技术之类的具体细节,以便透彻理解本申请实施例。然而,本领域的技术人员应当清楚,在没有这些具体细节的其它实施例中也可以实现本申请。在其它情况中,省略对众所周知的***、装置、电路以及方法的详细说明,以免不必要的细节妨碍本申请的描述。
应当理解,当在本申请说明书和所附权利要求书中使用时,术语“包括”指示所描述特征、整体、步骤、操作、元素和/或组件的存在,但并不排除一个或多个其它特征、整体、步骤、操作、元素、组件和/或其集合的存在或添加。
还应当理解,在本申请说明书和所附权利要求书中使用的术语“和/或”是指相关联列出的项中的一个或多个的任何组合以及所有可能组合,并且包括这些组合。
如在本申请说明书和所附权利要求书中所使用的那样,术语“如果”可以依据上下文被解释为“当...时”或“一旦”或“响应于确定”或“响应于检测到”。类似地,短语“如果确定”或“如果检测到[所描述条件或事件]”可以依据上下文被解释为意指“一旦确定”或“响应于确定”或“一旦检测到[所描述条件或事件]”或“响应于检测到[所描述条件或事 件]”。
另外,在本申请说明书和所附权利要求书的描述中,术语“第一”、“第二”、“第三”等仅用于区分描述,而不能理解为指示或暗示相对重要性。
在本申请说明书中描述的参考“一个实施例”或“一些实施例”等意味着在本申请的一个或多个实施例中包括结合该实施例描述的特定特征、结构或特点。由此,在本说明书中的不同之处出现的语句“在一个实施例中”、“在一些实施例中”、“在其他一些实施例中”、“在另外一些实施例中”等不是必然都参考相同的实施例,而是意味着“一个或多个但不是所有的实施例”,除非是以其他方式另外特别强调。术语“包括”、“包含”、“具有”及它们的变形都意味着“包括但不限于”,除非是以其他方式另外特别强调。
此外,本申请实施例中提到的“多个”应当被解释为两个或两个以上。
本申请实施例中提供的终端应用控制方法中所涉及到的步骤仅仅作为示例,并非所有的步骤均是必须执行的步骤,或者并非各个信息或消息中的内容均是必选的,在使用过程中可以根据需要酌情增加或减少。
本申请实施例中同一个步骤或者具有相同功能的步骤或者消息在不同实施例之间可以互相参考借鉴。
本申请实施例描述的业务场景是为了更加清楚的说明本申请实施例的技术方案,并不构成对于本申请实施例提供的技术方案的限定,本领域普通技术人员可知,随着网络架构的演变和新业务场景的出现,本申请实施例提供的技术方案对于类似的技术问题,同样适用。
相关技术一中提供了一种多客户端APP协同控制的方法。例如,客户端A响应用户在APP中施加的页面分享操作,生成分享文本以及与该分享文本对应的目标页面。客户端A通过即时通讯技术向客户端B发送该分享文本以及目标页面。客户端B获取到该分享文本后,复制该分享文本。用户可以在客户端B的APP中施加分享文本粘贴操作,客户端B响应该分享文本粘贴操作,检测该分享文本粘贴操作中的文本与目标页面中的文本是否一致,若一致则打开客户端A所要分享的目标页面。
然而,相关技术一对客户端要求高,需要多个客户端下载安装适配该客户端屏幕大小的同一个APP,而对于无法安装该类APP的客户端则无法实现多客户端APP协同控制。而且,相关技术一无法实现反控,本质上只是打开同一个页面进行分享,对该页面的任何操作并不能传递到其他客户端。而且,相关技术一中客户端A将目标页面分享给其他客户端的方式较为复杂,需要在客户端A的APP的某一页面点击分享生成分享文本,通过即时通讯应用传递该分享文本给其他客户端,其他客户端复制分享文本,打开APP才能跳转到目标页面。
相关技术二中提供了一种投屏协同控制的方法。客户端A将APP中的页面以及指令打上标签发送给客户端B。客户端B对打上标签的指令进行还原,将客户端A上的指令转换为客户端B上的指令,构建客户端A的画面。用户在客户端B上构建的客户端A的画面上可以通过鼠标施加点击、滑动等操作,以模拟用户在客户端A上的触控事件。客户端B监听鼠标事件将事件以指令流的形式传给客户端A,客户端A将客户端B发送的指令流进行还原,并执行还原后的指令,从而实现在客户端B上控制客户端A。
然而,在相关技术二中,一个客户端A只能够将页面投屏到一个客户端B,以及一个客户端B反控客户端A,而对于一个客户端A对多个客户端B的场景则无法实现。而且,客户端B向客户端A发送的指令流是用户在客户端B上施加操作生成的触控事件,而触控事件的形成需要用户在客户端B上实实在在的操作,因此用户在客户端B上施加某一操作之后,客户端A上可能会经过较长时间才会响应该操作。
基于上述问题,本申请实施例提供一种终端应用控制方法。第一终端设备对目标应用中需要共享的页面元素设置标签,以及获取第二终端设备的类型和共享权限,第二终端设备为共享目标应用的终端设备。第一终端设备将第二终端设备的类型和页面布局信息发送给服务器,其中页面布局信息根据页面元素得到。服务器根据第二终端设备的类型确定目标页面模板,基于页面布局信息对目标页面模板的Html页面进行渲染,之后将渲染后的目标页面模板的URL(Uniform Resource Locator,统一资源定位符)地址发送给第一终端设备。第一终端设备将URL地址发送给第二终端设备,第二终端设备通过浏览器或WebView打开URL地址,其中浏览器或WebView中的页面控件与目标应用中的控件通过标签一一对应。
当第二终端设备接收到作用于浏览器或WebView上的操作(例如控件的click事件)后,第二终端设备响应该操作,将该操作对应的事件以及事件的标签发送至第一终端设备。第一终端设备根据事件的标签确定目标应用中与该事件对应的控件,根据确定的控件执行该事件。
当第一终端设备的目标应用的页面发生变化时,第一终端设备将目标应用的页面布局变化信息发送给服务器,服务器根据目标应用的页面布局变化信息对构建的Html DOM树重新进行渲染,并生成新的URL地址。第一终端设备将新的URL地址发送给第二终端设备。第二终端设备根据新的URL地址重新加载渲染页面。
示例性的,本申请实施例中的第一终端设备和第二终端设备均可以是个人计算机(personal computer,PC)、手机、平板电脑、可穿戴设备、车载设备、增强现实(augmented reality,AR)/虚拟现实(virtual reality,VR)设备、笔记本电脑、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本、个人数字助理(personal digital assistant,PDA)等终端设备,本申请实施例对终端设备的具体类型不作任何限制。
图1为本申请实施例提供的终端应用控制方法适用的场景示意图。参见图1,该场景包含第一终端设备、第二终端设备和服务器。
第一终端设备上安装有目标APP,目标APP包含界面UI。第一终端设备上还设置有Dues服务器,Dues服务器包含内容采集模块、内容调度模块和内容预处理模块。内容采集模块用于对目标APP中的页面元素设置标签,例如对需要共享的页面元素以及所有事件执行的页面元素设置标签。在内容采集模块对目标APP需要共享的页面元素设置标签后,得到多个标记的页面元素。内容调度模块用于将多个标记的页面元素调度给内容预处理模块。内容预处理模块将多个标记的页面元素按照特定格式进行打包,使得多个标记的页面元素能够以固定的数据结构传递给后面的模块。内容预处理模块可以包括对Rview内容处理,将Rview转换成JSON语言,以及对Light内容处理,并根据对Light内容处理的结果更新行为列表。
Dues服务器上还设置有数据转换模块和Web服务器。Web服务器用于为用户提 供选择共享终端设备、设置共享终端设备的权限的功能。其中,共享终端设备可以包括:PC、平板、手机、手表和其他设备。前四种终端设备均对应设置有特定的Html模板,上述Html模板能够设定与终端设备对应的UI。当用户选择其他设备时,可以根据其他设备的浏览器分辨率对第一终端设备中目标应用的界面进行等比缩放和适配。
共享终端设备的权限包括:仅共享、仅控制、共享与控制。其中,共享终端设备的权限为仅共享,表示当前终端设备只能浏览第一终端设备中目标应用分享过来的页面,并不能对目标应用进行反控,该权限通常用于具有大屏的显示设备。共享终端设备的权限为仅控制,表示当前终端设备只能用作一些简单的控制功能,比如作为遥控器使用,并不能显示目标应用分享过来的页面,该权限通常用于手表等轻量级设备。共享与控制是上述两种权限的结合,即可显示目标应用分享过来的页面,也可对目标应用进行反控,该权限通常用于手机和平板设备等。
数据转换模块用于对内容预处理模块输出的数据进行数据转换,将转换后的数据发送给Web服务器。例如,内容预处理模块输出的数据为描述UI资源树ViewTree的语言,数据转换模块将描述UI资源树ViewTree的语言,转换为界面构建服务器能够理解和处理的JSON语言。
Web服务器根据所选择的共享终端设备(即第二终端设备)对转换后的数据进行处理,得到具有预设数据结构的绘制数据。例如,Web服务器在转换后的数据上添加上第二终端设备的类型、权限信息等相关的字段信息,得到具有预设数据结构的绘制数据。Web服务器将所选择的共享终端设备、设备权限以及绘制数据通过Socket发送给界面构建服务器。该绘制数据可以包含标签信息、类型信息和内容,例如该绘制数据的数据结构可以如下述代码所示:
Figure PCTCN2021140198-appb-000001
界面构建服务器包括数据解析模块、布局绘制模块、页面控件绘制模块、界面合 成模块和页面渲染模块。
其中,数据解析模块用于对绘制数据进行解析,得到布局信息和页面控件信息。
布局绘制模块用于采用统一的flex布局作为Html页面布局的CSS(Cascading Style Sheets,层叠样式表)样式,针对解析获得的布局信息(例如包括布局容器属性)设置对应的界面布局参数。
页面控件绘制模块用于确定目标应用中的控件的标签与Html中的控件的标签之间的控件对应关系。例如第一终端设备为手机,页面控件绘制模块确定目标应用中的ImageView控件的标签与Html的img控件的标签对应,目标应用中的TextView控件的标签与Html的p控件的标签对应,目标应用中的Button控件的标签与Html的Input:button控件的标签对应等。
界面合成模块用于将界面布局参数与控件对应关系,进行关联合成。
页面渲染模块用于根据共享终端设备和设备权限确定对应的Html页面,基于界面布局参数与控件对应关系对Html页面进行渲染,例如渲染解析后生成的Html控件标签和Html控件标签中对应的事件。
界面构建服务器用于将渲染后的Html页面的URL地址发送给第一终端设备。
另外,界面构建服务器还包括Socket监听模块。Socket监听模块被激活后,用于监听第一终端设备发送来的新的指令与布局数据。
第一终端设备获取到渲染后的Html页面的URL地址后,对该URL地址进行加密,例如可以采用单向盐值对该URL地址进行加密。另外,第一终端设备通过分布式ID为该URL地址生成一个唯一后缀,该唯一后缀用于确保每个URL地址只能被使用一次。若第二终端设备的数量为多个,则第一终端设备获取到渲染后的Html页面的URL地址后,通过分布式ID为该URL地址生成多个后缀,不同后缀的URL地址被发送给不同的第二终端设备。第二终端设备根据接收到的URL地址打开分享页面,第二终端设备的Web浏览器发送get请求获取到相应的Html页面,完成源端Activity的映射。
第二终端设备对第一终端设备的反控过程如下:第二终端设备的浏览器页面接收交互事件,通过WebSocket传递给界面构建服务器,界面构建服务器的Socket监听模块监听所有带交互事件tag的Html标签,当用户在第二终端设备的Web浏览器上进行交互操作时,将用户的交互事件序列化成JSON数据,该JSON数据包括数据的变化、事件的类型、事件的操作方式、在第一终端设备对应的windowTitle等。该数据的数据结构如下述代码所示:
Figure PCTCN2021140198-appb-000002
Figure PCTCN2021140198-appb-000003
例如,界面构建服务器通过Socket将JSON数据传递到Dues服务器的行为接收模块,行为接收模块将JSON数据发送给行为调度模块。行为调度模块对JSON数据进行解析转换,重新打包成目标APP进程执行时所需的指令序列,并打进目标APP的进程。目标APP的进程根据页面元素root和标签来执行该指令操作,完成对目标APP的反控。
参见图2,发送端可以为第一终端设备,接收端可以为界面构建服务器。在页面元素的生命周期内,发送端对页面元素进行标记,设置标签。之后,发送端采集每个页面元素的内容,将采集的各个页面元素的内容进行打包,并将打包后的各个页面元素的内容发送给接收端。接收端对接收到的数据进行解析,得到各个页面元素的内容,并根据标签更新相应的页面元素的内容。
参见图3,将第一终端设备的目标应用的界面共享到第二终端设备的界面中显示的过程可以包括:开始对第一终端设备中的目标APP进行协同控制之后,Dues服务器对目标APP中需要共享的页面元素以及所有事件执行的页面元素设置标签,得到多个标记的页面元素,并将多个标记的页面元素打包得到目标APP的UI数据。Dues服务器将目标APP的UI数据发送给界面构建服务器。界面构建服务器根据目标APP的UI数据绘制Html页面,并生成Html页面的URL地址,关于如何根据目标APP的UI数据绘制Html页面的过程在此不再赘述。目标APP将获取到的Html页面的URL地址发送给第二终端设备。第二终端设备通过Web浏览器打开该URL地址,根据Html页面的控件与第一终端设备的控件的对应关系,显示与第二终端设备匹配的目标APP的界面。
而在第一终端设备的目标APP的界面发生变化后,Dues服务器获取目标APP界面的变化信息,将目标APP界面的变化信息发送给界面构建服务器。界面构建服务器根据目标APP界面的变化信息对Html页面进行更新。之后,第二终端设备根据更新后的Html页面对Web浏览器中显示的界面更新。
参见图4,第二终端设备对目标APP进行反控的过程可以包括:当第二终端设备接收到作用于浏览器界面上的操作(例如控件的click事件)后,浏览器监听到该操作事件,第二终端设备将该操作事件以及操作事件的标签发送至界面构建服务器,界面构建服务器接收作用于第二终端设备的Web浏览器界面上的操作事件,得到操作事件序列。界面构建服务器将操作事件序列转化为JSON数据,JSON数据包括数据的变化、事件的类型、事件的操作方式、在第一终端设备的窗口标题WindowTitle等。界面构建服务器将JSON数据发送给Dues服务器,Dues服务器对JSON数据进行解析转换,重新打包成目标APP进程执行时所需的指令序列,并将该指令序列打进目标APP的进程。例如,界面构建服务器可以将JSON数据发送给Dues服务器的行为接收模块,行为接收模块将JSON数据发送给行为调度模块。行为调度模块对JSON数据进行解析转换,重新打包成目标APP进程执行时所需的指令序列,并将该指令序列注入目标 APP的进程。目标APP的进程根据页面元素root和标签来执行该指令操作,以及对目标APP的页面元素进行更新,从而实现对目标APP的反控。
图5为本申请实施例提供的终端应用控制方法的流程示意图。参见图5,该终端应用控制方法可以包括以下步骤:
步骤101,第一终端设备对目标应用界面中需要共享的页面元素设置第一标签,并采集页面元素的内容,得到页面布局信息。
其中,页面元素可以为目标应用界面中的控件,若对上述控件设置标签后,需要采集上述控件的文本内容或图片内容。例如,目标应用界面中包括“确定”、“下一步”、“取消”等控件,若对上述控件设置对应的标签后,则采集各个控件的文本内容“确定”、“下一步”、“取消”等。上述页面布局信包括第一标签、具有标签的页面元素和页面元素的内容。
步骤102,第一终端设备获取第二终端设备的类型和共享权限。
其中,第二终端设备的类型可以包括PC、平板、手机、手表和其他设备。
第二终端设备的权限可以包括:显示目标应用界面、控制目标应用、显示目标应用且界面且控制目标应用。其中,第二终端设备的权限为显示目标应用界面,表示第二终端设备只能显示目标应用分享过来的页面,并不能对目标应用进行反控,该权限通常可以用于具有大屏的显示设备。共享终端设备的权限为控制目标应用,表示第二终端设备只能用作一些简单的控制功能,比如作为遥控器使用,并不能显示目标应用分享过来的页面,该权限通常可以用于手表等轻量级设备。第二终端设备的权限为显示目标应用且界面且控制目标应用,表示第二终端设备既可以显示目标应用分享过来的页面,也可对目标应用进行反控,该权限通常可以用于手机和平板设备等设备。
步骤103,第一终端设备将第二终端设备的类型和页面布局信息发送给界面构建服务器。
其中,界面构建服务器中可以设置有与多种页面模板。每种页面模板对应第二终端设备的一个类型,且每种页面模板具有相应的UI。例如,该页面模板可以为Html模板。
例如,若第二终端设备的类型为PC,则Html模板具有与PC对应的UI;若第二终端设备的类型为平板,则Html模板具有与平板对应的UI;若第二终端设备的类型为手机,则Html模板具有与手机对应的UI;若第二终端设备的类型为手表,则Html模板具有与手表对应的UI。
若第二终端设备的类型为其他设备,则可以根据其他设备的浏览器分辨率对第一终端设备中目标应用的界面进行等比缩放和适配,而不设置与该其他设备对应的Html模板。
步骤104,界面构建服务器根据第二终端设备的类型确定目标页面模板,基于页面布局信息对目标页面模板对应的页面进行渲染,得到渲染后的页面的URL地址。
其中,目标页面模板对应的页面中可以设置有多个第二控件,每个第二控件对应一个第二标签,而且每个第二控件在页面的位置可以预先设定好。例如,页面模块可以为JS模板,不同的页面模块对应的第二控件可以不同。
示例性的,界面构建服务器基于页面布局信息对目标页面模板的页面进行渲染, 可以包括:获取页面布局信息中目标APP的第一控件的第一标签,第一控件为目标APP的任一控件;确定与第一标签对应的第二标签;确定目标页面模板对应的页面中与所确定的第二标签对应的第二控件;将第一控件的内容与第二控件关联,以及对目标页面模板进行渲染。
本实施例中,不同的第二终端设备的类型对应的目标页面模板不同。例如,第二终端设备的类型可以包括PC、平板、手机、手表和其他设备。其中,PC对应目标页面模板1,平板对应目标页面模板2,手机对应目标页面模板3,手表对应目标页面模板4。
一种场景中,目标页面模板1对应的页面为页面1,页面1中的第二控件可以为多个,且每个第二控件对应一个第二标签。第一标签和第二标签之前的对应关系可以预先设置。第一标签包括N个第一控件对应的第一标签,第二标签包括M个第二控件对应的第二标签,各个第一标签和各个第二标签之间的标签对应关系,可以根据各个第一控件与各个第二控件之间的对应关系可以预先设置好,之后在步骤104中直接使用各个第一标签和各个第二标签之间的标签对应关系即可。例如,ImageView控件对应的第一标签,与img控件对应的第二标签相对应;TextView控件对应的第一标签,与p控件对应的第二标签相对应;Button控件对应的第一标签,与Input:button控件对应的第二标签相对应。
对于目标页面模板2至目标页面模板4,如何建立上述标签对应关系,请参考目标页面模板1的场景,在此不再赘述。
在对目标页面模板渲染完成后,得到渲染完成后的页面,该渲染后的页面即为第一终端设备中目标APP的界面。之后,界面构建服务器生成渲染完成后的页面的URL地址,并将URL地址发送给第一终端设备。
步骤105,第一终端设备将URL地址发送给第二终端设备。
一些实施例中,第一终端设备可以对URL地址进行加密。例如,第一终端设备可以采用单向盐值加密的方式对URL地址进行加密。
一些实施例中,第一终端设备可以为URL地址生成一个唯一后缀,将该唯一后缀添加到URL地址的尾部,使得该URL地址只能被第二终端设备使用一次。
对于第二终端设备为多个的情况,每个第二终端设备对应一个URL地址,第一终端设备可以为每个URL地址生成一个唯一后缀,将唯一后缀添加到相应的URL地址的尾部。
步骤106,第二终端设备打开该URL地址,显示与浏览器的界面适应的目标页面,该目标页面中包含目标应用界面。
其中,第二终端设备可以通过Web浏览器或WebView等方式打开该URL地址,在Web浏览器窗口中显示包含目标APP界面的页面。而且,该页面能够根据浏览器窗口进行自适应调整。
上述终端应用控制方法,对目标应用界面中的页面元素设置标签,并采集页面元素的内容,得到页面布局信息。之后,服务器根据第二终端设备的类型确定目标页面模板,基于页面布局信息对目标页面模板对应的页面进行渲染,并生成渲染后的页面的地址标识。第一终端设备向所述第二终端设备发送该地址标识。第二终端设备通过 浏览器打开该地址标识,显示与浏览器的界面适应的目标页面,该目标页面中包含目标应用界面。本申请实施例能够在支持浏览器的第二终端设备中显示目标应用的界面,实现将第一终端设备中目标应用的界面共享到第二终端设备中显示。而且,第二终端设备可以不支持目标应用,支持浏览器即可显示目标应用的界面。第二终端设备能够根据浏览器界面自适应显示目标应用的界面。
实施例一
以下以目标应用为“买”APP,第一终端设备为手机A,第二终端设备为PC、平板和手机B为例,对本申请实施例进行说明。其中,第二终端设备可以为一个或多个,多个第二终端设备的类型可以不同或者相同。
图6为手机A中“买”APP界面示意图。参见图6,“买”APP界面中包括多个第一控件,例如第一控件11至17。其中,第一控件11可以为“买”APP的标识控件,该控件内容可以为包含“买”字的图片。第一控件12可以为用于输入搜索内容的搜索控件。第一控件13可以为货品分类的类别控件,例如可以包括“生活用品”、“电子产品”、“食品”等类别。第一控件14、第一控件15和第一控件16可以为用于展示商品的展示控件。第一控件17可以为用于显示商品的显示控件,第一控件17可以为多个。第一控件11至第一控件17中的每个第一控件对应一个第一标签。
图7为平板电脑中显示“买”APP界面的示意图。参见图7,平板电脑通过浏览器显示的“买”APP界面中包括多个第二控件,例如第二控件21至27。其中,第二控件21可以为“买”APP的标识控件,该控件内容可以为包含“买”字的图片。第二控件22可以为用于输入搜索内容的搜索控件。第二控件23可以为货品分类的类别控件,例如可以包括“生活用品”、“电子产品”、“食品”等类别。第二控件24、第一控件25和第一控件26可以为用于展示商品的展示控件。第二控件27可以为用于显示商品的显示控件,第二控件27可以为多个。第二控件21至第二控件27中的每个第二控件对应一个第二标签。第一标签和第二标签之间可以具有预设的标签对应关系。
将手机A中“买”APP的界面显示到平板电脑中的过程可以包括:对手机A中“买”APP界面中的第一控件11至第一控件17中的每个第一控件设置一个第一标签,并采集各个第一控件的内容,得到手机A中“买”APP的UI数据,并将该UI数据和第二终端设备的类型为平板电脑发送给界面构建服务器。界面构建服务器根据第二终端设备的类型,确定目标页面模板为与平板电脑对应的目标页面模板。该目标页面模板中包括多个第二控件,每个第二控件对应一个第二标签,各个第二标签在目标页面模板中的位置可以预先设定。界面构建服务器根据第一标签和第二标签之间的标签对应关系,将第一标签对应的第一控件的内容与相应的第二控件关联,以及对目标页面模板进行渲染,得到目标页面。之后,界面构建服务器将目标页面的URL地址发送给手机A,手机A对该URL地址进行加密和添加唯一后缀等处理后,将该URL地址发送给平板电脑。平板电脑通过Web浏览器打开该URL地址,显示“买”APP的界面。
用户在平板电脑中对“买”APP进行操作,平板电脑对手机A中“买”APP进行反控的过程可以包括:用户在平板电脑的浏览器界面中对某件商品施加预设操作,平板电脑的浏览器监听到该预设操作事件,将该该预设操作事件发送给界面构建服务器,界面构建服务器将该预设操作事件转化为JSON数据,JSON数据包括数据的变化、事件 的类型、事件的操作方式、在手机的WindowTitle等。界面构建服务器将JSON数据发送给手机的Dues服务器,Dues服务器对JSON数据进行解析转换,重新打包成“买”APP进程执行时所需的指令序列,并将该指令序列打进“买”APP的进程。“买”APP的进程根据页面元素root和标签来执行该指令操作,以及对“买”APP的页面元素进行更新,从而实现对“买”APP的反控。
一些实施例中,平板电脑对应的目标页面模板的界面长宽比例与手机A“买”APP的界面长宽比例相差较大,因此手机A“买”APP的界面中的第一控件14、15和17的排布方式,与目标页面模板中第二控件24、25和27的排布方式不同。如图6和图7所示,第一控件14和15竖向排列分布,第二控件24和25横向并排分布。多个第一控件17呈多行排列分布,且每行两个第一控件17,多个第二控件27呈多行排列分布,且每行五个第二控件17。
一种场景中,手机A可以将“买”APP界面分享给多个第二终端设备,例如分享给平板电脑、PC和手机B。示例性的,当手机A向多个第二终端设备分享当前浏览的衣物时,当用户A在手机A中施加滑动或者点击页面等操作时,各个第二终端设备的浏览器界面同样也会跟着改变。相同的,用户B也可以在第二终端设备的浏览器界面中施加滑动或者点击当前页面等操作,告诉用户A这件衣服比较好看,手机A中“买”APP界面同样也会跟着改变。
图8为PC中显示“买”APP界面的示意图。参见图8,PC通过浏览器显示的“买”APP界面中包括多个第二控件,例如第二控件31至37。其中,第二控件31可以为“买”APP的标识控件,该控件内容可以为包含“买”字的图片。第二控件32可以为用于输入搜索内容的搜索控件。第二控件33可以为货品分类的类别控件,例如可以包括“生活用品”、“电子产品”、“食品”等类别。第二控件34、第一控件35和第一控件36可以为用于展示商品的展示控件。第二控件37可以为用于显示商品的显示控件,第二控件37可以为多个。第二控件31至第二控件37中的每个第二控件对应一个第二标签。
图9为手机B中显示“买”APP界面的示意图。参见图9,手机B通过浏览器显示的“买”APP界面中包括多个第二控件,例如第二控件41至47。其中,第二控件41可以为“买”APP的标识控件,该控件内容可以为包含“买”字的图片。第二控件42可以为用于输入搜索内容的搜索控件。第二控件43可以为货品分类的类别控件,例如可以包括“生活用品”、“电子产品”、“食品”等类别。第二控件44、第一控件45和第一控件46可以为用于展示商品的展示控件。第二控件47可以为用于显示商品的显示控件,第二控件47可以为多个。第二控件41至第二控件47中的每个第二控件对应一个第二标签。
实施例二
以下以目标应用为视频应用,第一终端设备为手机,第二终端设备为大屏设备(例如平板或电视)和轻量级设备(例如手表)为例,对本申请实施例进行说明。
参见图10,在通过手机的视频应用播放视频A时,手机将视频信息发送给平板,平板显示该视频。手机将视频信息发送给平板,平板通过浏览器显示该视频的具体过程请参考实施例一,在此不再赘述。手机将与该视频对应的控制时间发送给手表,手表相应于作用在手表界面的用户操作,实现对平板中播放的视频的控制,例如暂停播 放、继续播放等。
本实施例中,不需要第一终端设备和第二终端设备在同一个物理空间内或者在同一个局域网下。
实施例三
以下以目标应用为协同游戏类应用,第一终端设备为手机,第二终端设备为触屏设备(例如平板)为例,对本申请实施例进行说明。其中,第二终端设备不支持该协同游戏类应用。
参见图11(a),在用户A通过手机的协同游戏类应用玩游戏时,手机将游戏画面发送给平板,平板通过浏览器显示该视频。手机将游戏画面发送给平板,平板通过浏览器显示该视频的具体过程请参考实施例一,在此不再赘述。
参见图11(b),用户B在平板的浏览器界面中施加操作,平板将该操作发送给手机,手机在协同游戏类应用中显示该操作。其中,平板将操作发送给手机,手机在协同游戏类应用中显示该操作的具体过程请参考实施例一,在此不再赘述。
本实施例中,对于不支持目标应用的第二终端设备,第一终端设备可以将应用界面分享给第二终端设备,第二终端设备可以控制第一终端设备中的目标应用。
示例性的,图12是本申请实施例提供的终端设备100的硬件架构示意图。该终端设备100可以为上述的第一终端设备,也可以为上述的第二终端设备。
该终端设备100可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。其中传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,气压传感器180C,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感器180G,指纹传感器180H,温度传感器180J,触摸传感器180K,环境光传感器180L,骨传导传感器180M等。
可以理解的是,本发明实施例示意的结构并不构成对终端设备100的具体限定。在本申请另一些实施例中,终端设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,存储器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。
其中,控制器可以是终端设备100的神经中枢和指挥中心。控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理 器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了***的效率。
在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuit sound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purpose input/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。
I2C接口是一种双向同步串行总线,包括一根串行数据线(serial data line,SDA)和一根串行时钟线(derail clock line,SCL)。在一些实施例中,处理器110可以包含多组I2C总线。处理器110可以通过不同的I2C总线接口分别耦合触摸传感器180K,充电器,闪光灯,摄像头193等。例如:处理器110可以通过I2C接口耦合触摸传感器180K,使处理器110与触摸传感器180K通过I2C总线接口通信,实现终端设备100的触摸功能。
I2S接口可以用于音频通信。在一些实施例中,处理器110可以包含多组I2S总线。处理器110可以通过I2S总线与音频模块170耦合,实现处理器110与音频模块170之间的通信。在一些实施例中,音频模块170可以通过I2S接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。
PCM接口也可以用于音频通信,将模拟信号抽样,量化和编码。在一些实施例中,音频模块170与无线通信模块160可以通过PCM总线接口耦合。在一些实施例中,音频模块170也可以通过PCM接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。I2S接口和PCM接口都可以用于音频通信。
UART接口是一种通用串行数据总线,用于异步通信。该总线可以为双向通信总线。它将要传输的数据在串行通信与并行通信之间转换。在一些实施例中,UART接口通常被用于连接处理器110与无线通信模块160。例如:处理器110通过UART接口与无线通信模块160中的蓝牙模块通信,实现蓝牙功能。在一些实施例中,音频模块170可以通过UART接口向无线通信模块160传递音频信号,实现通过蓝牙耳机播放音乐的功能。
MIPI接口可以被用于连接处理器110与显示屏194,摄像头193等***器件。MIPI接口包括摄像头串行接口(camera serial interface,CSI),显示屏串行接口(display serial interface,DSI)等。在一些实施例中,处理器110和摄像头193通过CSI接口通信,实现终端设备100的拍摄功能。处理器110和显示屏194通过DSI接口通信,实现终端设备100的显示功能。
GPIO接口可以通过软件配置。GPIO接口可以被配置为控制信号,也可被配置为数据信号。在一些实施例中,GPIO接口可以用于连接处理器110与摄像头193,显示屏194,无线通信模块160,音频模块170,传感器模块180等。GPIO接口还可以被配置为I2C接口,I2S接口,UART接口,MIPI接口等。
USB接口130是符合USB标准规范的接口,具体可以是Mini USB接口,Micro USB接口,USB Type C接口等。USB接口130可以用于连接充电器为终端设备100充电,也可以用于终端设备100与***设备之间传输数据。也可以用于连接耳机,通过耳机播放音频。该接口还可以用于连接其他终端设备,例如AR设备等。
可以理解的是,本发明实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对终端设备100的结构限定。在本申请另一些实施例中,终端设备100也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。
充电管理模块140用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。在一些有线充电的实施例中,充电管理模块140可以通过USB接口130接收有线充电器的充电输入。在一些无线充电的实施例中,充电管理模块140可以通过终端设备100的无线充电线圈接收无线充电输入。充电管理模块140为电池142充电的同时,还可以通过电源管理模块141为终端设备供电。
电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器121,外部存储器,显示屏194,摄像头193,和无线通信模块160等供电。电源管理模块141还可以用于监测电池容量,电池循环次数,电池健康状态(漏电,阻抗)等参数。在其他一些实施例中,电源管理模块141也可以设置于处理器110中。在另一些实施例中,电源管理模块141和充电管理模块140也可以设置于同一个器件中。
终端设备100的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。
天线1和天线2用于发射和接收电磁波信号。终端设备100中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。
移动通信模块150可以提供应用在终端设备100上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波、放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块150的至少部分功能模块可以被设置于处理器110中。在一些实施例中,移动通信模块150的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。
调制解调处理器可以包括调制器和解调器。其中,调制器用于将待发送的低频基带信号调制成中高频信号。解调器用于将接收的电磁波信号解调为低频基带信号。随后解调器将解调得到的低频基带信号传送至基带处理器处理。低频基带信号经基带处理器处理后,被传递给应用处理器。应用处理器通过音频设备(不限于扬声器170A,受话器170B等)输出声音信号,或通过显示屏194显示图像或视频。在一些实施例中,调制解调处理器可以是独立的器件。在另一些实施例中,调制解调处理器可以独立于处理器110,与移动通信模块150或其他功能模块设置在同一个器件中。
无线通信模块160可以提供应用在终端设备100上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星***(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块160可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块160经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块160还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。
在一些实施例中,终端设备100的天线1和移动通信模块150耦合,天线2和无线通信模块160耦合,使得终端设备100可以通过无线通信技术与网络以及其他设备通信。无线通信技术可以包括全球移动通讯***(global system for mobile communications,GSM),通用分组无线服务(general packet radio service,GPRS),码分多址接入(code division multiple access,CDMA),宽带码分多址(wideband code division multiple access,WCDMA),时分码分多址(time-division code division multiple access,TD-SCDMA),长期演进(long term evolution,LTE),BT,GNSS,WLAN,NFC,FM,和/或IR技术等。GNSS可以包括全球卫星定位***(global positioning system,GPS),全球导航卫星***(global navigation satellite system,GLONASS),北斗卫星导航***(beidou navigation satellite system,BDS),准天顶卫星***(quasi-zenith satellite system,QZSS)和/或星基增强***(satellite based augmentation systems,SBAS)。
终端设备100通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。
显示屏194用于显示图像,视频等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode的,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一些实施例中,终端设备100可以包括1个或N个显示屏194,N为大于1的正整数。
终端设备100可以通过ISP,摄像头193,视频编解码器,GPU,显示屏194以及应用处理器等实现拍摄功能。
ISP用于处理摄像头193反馈的数据。例如,拍照时,打开快门,光线通过镜头被传递到摄像头感光元件上,光信号转换为电信号,摄像头感光元件将电信号传递给ISP处理,转化为肉眼可见的图像。ISP还可以对图像的噪点,亮度,肤色进行算法优化。ISP还可以对拍摄场景的曝光,色温等参数优化。在一些实施例中,ISP可以设置在摄像头193中。
摄像头193用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体(complementary metal-oxide-semiconductor,CMOS)光电晶体管。感光元件把光信号转换成电信号,之后将电信号传递给ISP转换成数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的RGB,YUV等格式的图像信号。在一些实施例中,终端设备100可以包括1个或N个摄像头193,N为大于1的正整数。
数字信号处理器用于处理数字信号,除了可以处理数字图像信号,还可以处理其他数字信号。例如,当终端设备100在频点选择时,数字信号处理器用于对频点能量进行傅里叶变换等。
视频编解码器用于对数字视频压缩或解压缩。终端设备100可以支持一种或多种视频编解码器。这样,终端设备100可以播放或录制多种编码格式的视频,例如:动态图像专家组(moving picture experts group,MPEG)1,MPEG2,MPEG3,MPEG4等。
NPU为神经网络(neural-network,NN)计算处理器,通过借鉴生物神经网络结构,例如借鉴人脑神经元之间传递模式,对输入信息快速处理,还可以不断的自学习。通过NPU可以实现终端设备100的智能认知等应用,例如:图像识别,人脸识别,语音识别,文本理解等。
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展终端设备100的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。
内部存储器121可以用于存储计算机可执行程序代码,该可执行程序代码包括指令。处理器110通过运行存储在内部存储器121的指令,从而执行终端设备100的各种功能应用以及数据处理。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作***,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储终端设备100使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。
终端设备100可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。
音频模块170用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。音频模块170还可以用于对音频信号编码和解码。在一些实施例中,音频模块170可以设置于处理器110中,或将音频模块170的部分功能模块设置于处理器110中。
扬声器170A,也称“喇叭”,用于将音频电信号转换为声音信号。终端设备100可以通过扬声器170A收听音乐,或收听免提通话。
受话器170B,也称“听筒”,用于将音频电信号转换成声音信号。当终端设备100接听电话或语音信息时,可以通过将受话器170B靠近人耳接听语音。
麦克风170C,也称“话筒”,“传声器”,用于将声音信号转换为电信号。当拨打电话或发送语音信息时,用户可以通过人嘴靠近麦克风170C发声,将声音信号输入到麦克风170C。终端设备100可以设置至少一个麦克风170C。在另一些实施例中,终端设备100可以设置两个麦克风170C,除了采集声音信号,还可以实现降噪功能。在另一些实施例中,终端设备100还可以设置三个,四个或更多麦克风170C,实现采集声音信号,降噪,还可以识别声音来源,实现定向录音功能等。
耳机接口170D用于连接有线耳机。耳机接口170D可以是USB接口130,也可以是3.5mm的开放移动电子设备平台(open mobile terminal platform,OMTP)标准接口,美国蜂窝电信工业协会(cellular telecommunications industry association of the USA,CTIA)标准接口。
压力传感器180A用于感受压力信号,可以将压力信号转换成电信号。在一些实施例中,压力传感器180A可以设置于显示屏194。压力传感器180A的种类很多,如电阻式压力传感器,电感式压力传感器,电容式压力传感器等。电容式压力传感器可以是包括至少两个具有导电材料的平行板。当有力作用于压力传感器180A,电极之间的电容改变。终端设备100根据电容的变化确定压力的强度。当有触摸操作作用于显示屏194,终端设备100根据压力传感器180A检测触摸操作强度。终端设备100也可以根据压力传感器180A的检测信号计算触摸的位置。在一些实施例中,作用于相同触摸位置,但不同触摸操作强度的触摸操作,可以对应不同的操作指令。例如:当有触摸操作强度小于第一压力阈值的触摸操作作用于短消息应用图标时,执行查看短消息的指令。当有触摸操作强度大于或等于第一压力阈值的触摸操作作用于短消息应用图标时,执行新建短消息的指令。
陀螺仪传感器180B可以用于确定终端设备100的运动姿态。在一些实施例中,可以通过陀螺仪传感器180B确定终端设备100围绕三个轴(即,x,y和z轴)的角速度。陀螺仪传感器180B可以用于拍摄防抖。示例性的,当按下快门,陀螺仪传感器180B检测终端设备100抖动的角度,根据角度计算出镜头模组需要补偿的距离,让镜头通过反向运动抵消终端设备100的抖动,实现防抖。陀螺仪传感器180B还可以用于导航,体感游戏场景。
气压传感器180C用于测量气压。在一些实施例中,终端设备100通过气压传感器180C测得的气压值计算海拔高度,辅助定位和导航。
磁传感器180D包括霍尔传感器。终端设备100可以利用磁传感器180D检测翻盖皮套的开合。在一些实施例中,当终端设备100是翻盖机时,终端设备100可以根据磁传感器180D检测翻盖的开合。进而根据检测到的皮套的开合状态或翻盖的开合状态,设置翻盖自动解锁等特性。
加速度传感器180E可检测终端设备100在各个方向上(一般为三轴)加速度的大小。当终端设备100静止时可检测出重力的大小及方向。还可以用于识别终端设备姿态,应用于横竖屏切换,计步器等应用。
距离传感器180F,用于测量距离。终端设备100可以通过红外或激光测量距离。在一些实施例中,拍摄场景,终端设备100可以利用距离传感器180F测距以实现快速对焦。
接近光传感器180G可以包括例如发光二极管(LED)和光检测器,例如光电二极管。发光二极管可以是红外发光二极管。终端设备100通过发光二极管向外发射红外光。终端设备100使用光电二极管检测来自附近物体的红外反射光。当检测到充分的反射光时,可以确定终端设备100附近有物体。当检测到不充分的反射光时,终端设备100可以确定终端设备100附近没有物体。终端设备100可以利用接近光传感器180G检测用户手持终端设备100贴近耳朵通话,以便自动熄灭屏幕达到省电的目的。接近光传感器180G也可用于皮套模式,口袋模式自动解锁与锁屏。
环境光传感器180L用于感知环境光亮度。终端设备100可以根据感知的环境光亮度自适应调节显示屏194亮度。环境光传感器180L也可用于拍照时自动调节白平衡。环境光传感器180L还可以与接近光传感器180G配合,检测终端设备100是否在口袋里,以防误触。
指纹传感器180H用于采集指纹。终端设备100可以利用采集的指纹特性实现指纹解锁,访问应用锁,指纹拍照,指纹接听来电等。
温度传感器180J用于检测温度。在一些实施例中,终端设备100利用温度传感器180J检测的温度,执行温度处理策略。例如,当温度传感器180J上报的温度超过阈值,终端设备100执行降低位于温度传感器180J附近的处理器的性能,以便降低功耗实施热保护。在另一些实施例中,当温度低于另一阈值时,终端设备100对电池142加热,以避免低温导致终端设备100异常关机。在其他一些实施例中,当温度低于又一阈值时,终端设备100对电池142的输出电压执行升压,以避免低温导致的异常关机。
触摸传感器180K,也称“触控面板”。触摸传感器180K可以设置于显示屏194,由触摸传感器180K与显示屏194组成触摸屏,也称“触控屏”。触摸传感器180K用于检测作用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏194提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器180K也可以设置于终端设备100的表面,与显示屏194所处的位置不同。
骨传导传感器180M可以获取振动信号。在一些实施例中,骨传导传感器180M可以获取人体声部振动骨块的振动信号。骨传导传感器180M也可以接触人体脉搏,接收血压跳动信号。在一些实施例中,骨传导传感器180M也可以设置于耳机中,结合成骨传导耳机。音频模块170可以基于骨传导传感器180M获取的声部振动骨块的振动信号,解析出语音信号,实现语音功能。应用处理器可以基于骨传导传感器180M获取的血压跳动信号解析心率信息,实现心率检测功能。
按键190包括开机键,音量键等。按键190可以是机械按键。也可以是触摸式按键。终端设备100可以接收按键输入,产生与终端设备100的用户设置以及功能控制有关的键信号输入。
马达191可以产生振动提示。马达191可以用于来电振动提示,也可以用于触摸振动反馈。例如,作用于不同应用(例如拍照,音频播放等)的触摸操作,可以对应不同的振动反馈效果。作用于显示屏194不同区域的触摸操作,马达191也可对应不同的振动反馈效果。不同的应用场景(例如:时间提醒,接收信息,闹钟,游戏等)也可以对应不同的振动反馈效果。触摸振动反馈效果还可以支持自定义。
指示器192可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。
SIM卡接口195用于连接SIM卡。SIM卡可以通过***SIM卡接口195,或从SIM卡接口195拔出,实现和终端设备100的接触和分离。终端设备100可以支持1个或N个SIM卡接口,N为大于1的正整数。SIM卡接口195可以支持Nano SIM卡,Micro SIM卡,SIM卡等。同一个SIM卡接口195可以同时***多张卡。多张卡的类型可以相同,也可以不同。SIM卡接口195也可以兼容不同类型的SIM卡。SIM卡接口195也可以兼容外部存储卡。终端设备100通过SIM卡和网络交互,实现通话以及数据通信等功能。在一些实施例中,终端设备100采用eSIM,即:嵌入式SIM卡。eSIM卡可以嵌在终端设备100中,不能和终端设备100分离。
图13是本申请实施例的终端设备100的软件结构框图。
分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,将Android***分为四层,从上至下分别为应用程序层,应用程序框架层,安卓运行时(Android runtime)和***库,以及内核层。
应用程序层可以包括一系列应用程序包。
如图13所示,应用程序包可以包括相机,图库,日历,通话,地图,导航,WLAN,蓝牙,音乐,视频,短信息等应用程序。
应用程序框架层为应用程序层的应用程序提供应用编程接口(application programming interface,API)和编程框架。应用程序框架层包括一些预先定义的函数。
如图13所示,应用程序框架层可以包括窗口管理器,内容提供器,视图***,电话管理器,资源管理器,通知管理器等。
窗口管理器用于管理窗口程序。窗口管理器可以获取显示屏大小,判断是否有状态栏,锁定屏幕,截取屏幕等。
内容提供器用来存放和获取数据,并使这些数据可以被应用程序访问。数据可以包括视频,图像,音频,拨打和接听的电话,浏览历史和书签,电话簿等。
视图***包括可视控件,例如显示文字的控件,显示图片的控件等。视图***可用于构建应用程序。显示界面可以由一个或多个视图组成的。例如,包括短信通知图标的显示界面,可以包括显示文字的视图以及显示图片的视图。
电话管理器用于提供终端设备100的通信功能。例如通话状态的管理(包括接通,挂断等)。
资源管理器为应用程序提供各种资源,比如本地化字符串,图标,图片,布局文件,视频文件等等。
通知管理器使应用程序可以在状态栏中显示通知信息,可以用于传达告知类型的消息,可以短暂停留后自动消失,无需用户交互。比如通知管理器被用于告知下载完成,消息提醒等。通知管理器还可以是以图表或者滚动条文本形式出现在***顶部状态栏的通知,例如后台运行的应用程序的通知,还可以是以对话窗口形式出现在屏幕上的通知。例如在状态栏提示文本信息,发出提示音,终端设备振动,指示灯闪烁等。
Android Runtime包括核心库和虚拟机。Android runtime负责安卓***的调度和管理。
核心库包含两部分:一部分是java语言需要调用的功能函数,另一部分是安卓的核心库。
应用程序层和应用程序框架层运行在虚拟机中。虚拟机将应用程序层和应用程序框架层的java文件执行为二进制文件。虚拟机用于执行对象生命周期的管理,堆栈管理,线程管理,安全和异常的管理,以及垃圾回收等功能。
***库可以包括多个功能模块。例如:表面管理器(surface manager),媒体库(Media Libraries),三维图形处理库(例如:OpenGL ES),2D图形引擎(例如:SGL)等。
表面管理器用于对显示子***进行管理,并且为多个应用程序提供了2D和3D图层的融合。
媒体库支持多种常用的音频,视频格式回放和录制,以及静态图像文件等。媒体库可以支持多种音视频编码格式,例如:MPEG4,H.264,MP3,AAC,AMR,JPG,PNG等。
三维图形处理库用于实现三维图形绘图,图像渲染,合成,和图层处理等。
2D图形引擎是2D绘图的绘图引擎。
内核层是硬件和软件之间的层。内核层至少包含显示驱动,摄像头驱动,音频驱动,传感器驱动。
可选的,本申请实施例还提供了一种终端设备,包括:一个或多个处理器和存储器。存储器与一个或多个处理器耦合,存储器用于存储计算机程序代码,计算机程序代码包括计算机指令。当一个或多个处理器执行计算机指令时,使得终端设备执行上述任一个方法中的一个或多个步骤。
可选的,本申请实施例还提供了一种计算机可读存储介质,该计算机可读存储介质中存储有指令,当其在计算机或处理器上运行时,使得计算机或处理器执行上述任一个方法中的一个或多个步骤。
可选的,本申请实施例还提供了一种包含指令的计算机程序产品,当该计算机程序产品在计算机或处理器上运行时,使得计算机或处理器执行上述任一个方法中的一个或多个步骤。
可选的,本申请实施例还提供了一种芯片***,该芯片***可包括存储器和处理器,该处理器执行该存储器中存储的计算机程序,以实现上述任一个方法中的一个或多个步骤。其中,该芯片***可以为单个芯片,或者多个芯片组成的芯片模组。
可选的,本申请实施例还提供了一种芯片***,该芯片***可包括处理器,该处理器与存储器耦合,该处理器执行存储器中存储的计算机程序,以实现上述任一个方法中的一个或多个步骤。其中,该芯片***可以为单个芯片,或者多个芯片组成的芯片模组。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行计算机程序指令时,全部或部分地产生按照本申请实施例的流程或功能。计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。计算机指令可以存储在计算机可读存储介质 中,或者通过计算机可读存储介质进行传输。计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线)或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如,固态硬盘(solid state disk,SSD))等。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,该流程可以由计算机程序来指令相关的硬件完成,该程序可存储于计算机可读取存储介质中,该程序在执行时,可包括如上述各方法实施例的流程。而前述的存储介质包括:ROM或随机存储记忆体RAM、磁碟或者光盘等各种可存储程序代码的介质。
最后应说明的是:以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何在本申请揭露的技术范围内的变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。

Claims (13)

  1. 一种终端应用控制方法,其特征在于,所述方法包括:
    第一终端设备对目标应用界面中的页面元素设置第一标签,并采集页面元素的内容,得到页面布局信息,所述页面布局信息包含所述第一标签和所述页面元素的内容;
    所述第一终端设备获取第二终端设备的类型和共享权限,并向服务器发送所述页面布局信息、第二终端设备的类型和共享权限;
    所述服务器根据所述第二终端设备的类型确定目标页面模板,基于所述页面布局信息对所述目标页面模板对应的页面进行渲染,并生成渲染后的页面的地址标识;
    所述第一终端设备获取所述地址标识,并向所述第二终端设备发送所述地址标识;
    所述第二终端设备通过浏览器打开所述地址标识,显示与所述浏览器的界面适应的目标页面,所述目标页面中包含所述目标应用界面。
  2. 根据权利要求1所述的方法,其特征在于,所述方法还包括:
    所述第二终端设备通过浏览器监听作用于所述目标页面上的操作事件,并将所述操作事件发送给所述服务器,所述操作事件包括操作事件的数据、类型、操作方式和窗口标题;
    所述服务器向所述第一终端设备发送所述操作事件;
    所述第一终端设备根据所述操作事件对所述目标应用的页面元素进行更新。
  3. 一种终端应用控制方法,其特征在于,适用于第一终端设备,所述方法包括:
    对目标应用界面中的页面元素设置第一标签,并采集所述页面元素的内容,得到页面布局信息,所述页面布局信息包含所述第一标签和所述页面元素的内容;
    获取第二终端设备的类型,并向服务器发送所述页面布局信息和第二终端设备的类型;
    接收服务器发送的地址标识,所述地址标识由所述服务器根据渲染后的页面得到,所述渲染后的页面由所述服务器根据所述第二终端设备的类型确定目标页面模板,并根据所述页面布局信息对所述目标页面模板进行渲染得到;
    向所述第二终端设备发送所述地址标识,以使得所述第二终端设备通过浏览器打开所述地址标识,显示与所述浏览器的界面适应的目标页面,所述目标页面中包含所述目标应用界面。
  4. 根据权利要求3所述的方法,其特征在于,所述方法包括:
    接收所述服务器发送的操作事件,所述操作事件包括操作事件的数据、类型、操作方式和窗口标题,所述操作事件为所述服务器接收的作用于所述目标页面上的操作事件;
    根据所述操作事件生成控制指令;
    执行所述控制指令,对所述目标应用的页面元素进行更新。
  5. 根据权利要求3所述的方法,其特征在于,所述第二终端设备包括多个类型的第二终端设备,所述地址标识为多个,每个页面地址对应一个类型的第二终端设备;
    所述向所述第二终端设备发送所述地址标识,包括:
    对每个所述地址标识添加唯一标识;
    将添加唯一的地址标识发送给相应的第二终端设备。
  6. 根据权利要求3所述的方法,其特征在于,所述第二终端设备包括第二终端设备A和第二终端设备B,第二终端设备A的共享权限为显示所述目标应用的界面,第二终端设备B的共享权限为控制所述目标应用;
    所述方法还包括:
    将所述地址标识发送给第二终端设备A,将所述目标应用的控制信息发送给第二终端设备B,以使得所述第二终端设备B能够控制所述第二终端设备A对所述目标页面的显示。
  7. 一种终端应用控制方法,其特征在于,适用于服务器,所述方法包括:
    接收第一终端设备发送的页面布局信息和第二终端设备的类型,所述页面布局信息包含第一标签和所述第一终端设备中目标应用界面中的页面元素的内容,所述第一标签为对所述页面元素设置的标签;
    根据所述第二终端设备的类型确定目标页面模板,并根据所述页面布局信息对所述目标页面模板进行渲染;
    对所述目标页面模板渲染完成后,生成渲染后的页面的地址标识;
    向所述第一终端设备发送所述地址标识,以使得所述第一终端设备将所述地址标识发送给所述第二终端设备,所述第二终端设备通过浏览器打开所述地址标识,显示与所述浏览器的界面适应的目标页面,所述目标页面中包含所述目标应用界面。
  8. 根据权利要求7所述的方法,其特征在于,所述页面元素为所述目标应用界面中的第一控件,一个所述第一控件对应一个所述第一标签;所述第二终端设备的类型为多种,每种类型对应至少一个目标页面模板,每个所述目标页面模板包括多个第二控件,每个第二控件对应一个第二标签;
    所述根据所述页面布局信息对所述目标页面模板进行渲染,包括:
    根据所述第一标签和所述第二标签之间的预设标签对应关系,确定与各个第一控件对应的第二控件;
    将所述第一控件的内容与对应的第二控件关联,并对所述目标页面模板进行渲染。
  9. 根据权利要求7所述的方法,其特征在于,所述方法还包括:
    接收作用于所述第二终端设备的浏览器界面上的操作事件,所述操作事件包括操作事件的数据、类型、操作方式和窗口标题;
    向所述第一终端设备发送所述操作事件,以使得所述第一终端设备根据所述操作事件对所述目标应用的页面元素进行更新。
  10. 根据权利要求9所述的方法,其特征在于,所述方法还包括:
    接收所述第一终端设备发送的第二终端设备的共享权限;所述共享权限包括显示所述目标应用的界面,以及显示所述目标应用的界面且控制所述目标应用;
    若所述共享权限为显示所述目标应用的界面,则不执行所述接收作用于所述第二终端设备的浏览器界面上的操作事件的步骤;
    若所述共享权限为显示所述目标应用的界面且控制所述目标应用,则执行所述接收作用于所述第二终端设备的浏览器界面上的操作事件的步骤。
  11. 根据权利要求7所述的方法,其特征在于,所述第二终端设备包括第二终端设备A和第二终端设备B,第二终端设备A的共享权限为显示所述目标应用的界面, 第二终端设备B的共享权限为控制所述目标应用;
    所述向所述第一终端设备发送所述地址标识,包括:
    将所述地址标识和所述目标应用的控制信息发送给第一终端设备,以使得第一终端设备将所述地址标识发送给第二终端设备A,将所述控制信息发送给第二终端设备B,使得所述第二终端设备B能够控制所述第二终端设备A对所述目标页面的显示。
  12. 一种终端设备,其特征在于,包括:一个或多个处理器和存储器;
    所述存储器与所述一个或多个处理器耦合,所述存储器用于存储计算机程序代码,所述计算机程序代码包括计算机指令;
    当所述一个或多个处理器执行所述计算机指令时,使得所述终端设备执行如权利要求3至6中任一项所述的方法,或如权利要求7至11中任一项所述的方法。
  13. 一种芯片***,其特征在于,所述芯片***包括处理器,所述处理器与存储器耦合,所述处理器执行所述存储器中存储的计算机程序,以实现如权利要求3至6中任一项所述的方法,或如权利要求7至11中任一项所述的方法。
PCT/CN2021/140198 2021-02-24 2021-12-21 终端应用控制的方法、终端设备及芯片*** WO2022179275A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110205358.8 2021-02-24
CN202110205358.8A CN115033313A (zh) 2021-02-24 2021-02-24 终端应用控制方法、终端设备及芯片***

Publications (1)

Publication Number Publication Date
WO2022179275A1 true WO2022179275A1 (zh) 2022-09-01

Family

ID=83047781

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/140198 WO2022179275A1 (zh) 2021-02-24 2021-12-21 终端应用控制的方法、终端设备及芯片***

Country Status (2)

Country Link
CN (1) CN115033313A (zh)
WO (1) WO2022179275A1 (zh)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115964011A (zh) * 2023-03-16 2023-04-14 深圳市湘凡科技有限公司 基于多屏协同的显示应用界面的方法及相关装置
CN117130699A (zh) * 2023-04-06 2023-11-28 荣耀终端有限公司 一种界面显示方法及电子设备
CN117478943A (zh) * 2023-09-08 2024-01-30 荣耀终端有限公司 加载桌面界面的方法和终端设备

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115981588B (zh) * 2023-03-16 2023-09-26 中国邮电器材集团有限公司 一种多终端数据显示方法、设备和***

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110258535A1 (en) * 2010-04-20 2011-10-20 Scribd, Inc. Integrated document viewer with automatic sharing of reading-related activities across external social networks
CN104346329A (zh) * 2013-07-23 2015-02-11 腾讯科技(深圳)有限公司 实现统一资源定位符页面共享的方法、装置及设备
CN109033466A (zh) * 2018-08-31 2018-12-18 掌阅科技股份有限公司 页面分享方法、计算设备及计算机存储介质

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110258535A1 (en) * 2010-04-20 2011-10-20 Scribd, Inc. Integrated document viewer with automatic sharing of reading-related activities across external social networks
CN104346329A (zh) * 2013-07-23 2015-02-11 腾讯科技(深圳)有限公司 实现统一资源定位符页面共享的方法、装置及设备
CN109033466A (zh) * 2018-08-31 2018-12-18 掌阅科技股份有限公司 页面分享方法、计算设备及计算机存储介质

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115964011A (zh) * 2023-03-16 2023-04-14 深圳市湘凡科技有限公司 基于多屏协同的显示应用界面的方法及相关装置
CN115964011B (zh) * 2023-03-16 2023-06-06 深圳市湘凡科技有限公司 基于多屏协同的显示应用界面的方法及相关装置
CN117130699A (zh) * 2023-04-06 2023-11-28 荣耀终端有限公司 一种界面显示方法及电子设备
CN117478943A (zh) * 2023-09-08 2024-01-30 荣耀终端有限公司 加载桌面界面的方法和终端设备

Also Published As

Publication number Publication date
CN115033313A (zh) 2022-09-09

Similar Documents

Publication Publication Date Title
WO2021013158A1 (zh) 显示方法及相关装置
CN109814766B (zh) 一种应用显示方法及电子设备
WO2020259452A1 (zh) 一种移动终端的全屏显示方法及设备
WO2021036735A1 (zh) 显示用户界面的方法及电子设备
WO2020253758A1 (zh) 一种用户界面布局方法及电子设备
WO2021000807A1 (zh) 一种应用程序中等待场景的处理方法和装置
WO2021000804A1 (zh) 锁定状态下的显示方法及装置
WO2022179275A1 (zh) 终端应用控制的方法、终端设备及芯片***
WO2021036770A1 (zh) 一种分屏处理方法及终端设备
WO2022068483A1 (zh) 应用启动方法、装置和电子设备
CN113961157B (zh) 显示交互***、显示方法及设备
WO2022037726A1 (zh) 分屏显示方法和电子设备
WO2021190524A1 (zh) 截屏处理的方法、图形用户接口及终端
WO2022160991A1 (zh) 权限控制方法和电子设备
WO2022042637A1 (zh) 一种蓝牙数据传输方法及相关装置
WO2022179495A1 (zh) 一种隐私风险反馈方法、装置及第一终端设备
WO2022166435A1 (zh) 分享图片的方法和电子设备
WO2022135157A1 (zh) 页面显示的方法、装置、电子设备以及可读存储介质
WO2022022674A1 (zh) 应用图标布局方法及相关装置
WO2022127130A1 (zh) 一种添加操作序列的方法、电子设备和***
WO2022206763A1 (zh) 一种显示方法、电子设备和***
CN115022982B (zh) 多屏协同无感接入方法、电子设备及存储介质
WO2022089276A1 (zh) 一种收藏处理的方法及相关装置
WO2022062902A1 (zh) 一种文件传输方法和电子设备
WO2022206762A1 (zh) 一种显示方法、电子设备和***

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21927699

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21927699

Country of ref document: EP

Kind code of ref document: A1