An applet screen projection method, system, device and electronic equipment

By assisting the signaling interaction between the application device and the target projection device through the server, and using the instruction template of the target projection device to project the mini program, the problem of dependence on the development platform in the mini program projection process is solved, and the projection efficiency is improved.

CN115291824BActive Publication Date: 2025-12-26BEIJING QIYI CENTURY SCI & TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202210804871.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-08
Publication Date
2025-12-26
Estimated Expiration
2042-07-08

AI Technical Summary

Technical Problem

Current technologies rely excessively on development platforms for the screen mirroring process of mini-programs, resulting in high costs and low efficiency.

Method used

By using a server to facilitate signaling interaction between the application device and the target projection device, and by utilizing the instruction templates of the target projection device for control, the dependence on the mini-program development platform is reduced.

Benefits of technology

It reduces the dependence on development platforms during the mini-program screen casting process and improves screen casting efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115291824B_ABST
    Figure CN115291824B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a small program screen projection method, system, device and electronic equipment, and relate to the technical field of communication. The method is applied to a small program screen projection system comprising a server, an application device carrying a small program to be projected, and a target screen projection device. The application device obtains a target device identifier of the target screen projection device and sends it to the server. The server receives the target device identifier, sends a target instruction template to the application device, judges whether the application device and the target screen projection device are in the same intranet and sends a judgment result to the application device. The application device generates a control instruction about the small program to be projected based on the target instruction template, and sends the control instruction to the target screen projection device along a link corresponding to the judgment result. The target screen projection device receives the control instruction, analyzes the control instruction based on the target instruction template, and controls the small program to be projected. Compared with the prior art, the scheme provided by the embodiments of the present application can improve the screen projection efficiency of the small program.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of communication, in particular to a small program screen projection method, system, device and electronic equipment. BACKGROUND

[0002] At present, with the development of Internet technology, a small program is an application program that can be used in an APP (Application, mobile application software) without downloading and installing, and is widely used in various APPs due to low application cost and high user acceptance. At the same time, small programs combined with screen projection as a new distribution channel can not only meet the use needs of users, but also enrich the distribution form of the APP of the application small program, so as to meet the user experience while guiding the flow of the APP of the application small program.

[0003] The small program combined with screen projection is to display the application interface of the small program through the screen projection device, so that the small program can be displayed from the small screen of the carrying device to the large screen of the screen projection device.

[0004] The screen projection device refers to a device with a display screen and screen projection function, for example, a television screen with screen projection function, an LED (Light-Emitting Diode) curtain wall, etc. can be used as a screen projection device.

[0005] In the related art, different small programs are developed and constructed by different small program development platforms, and when the small program is projected, the Native SDK (Native Software Development Kit, software development kit based on native program interface) of the development platform for developing and constructing the small program is usually required to access the DLNA (Digital Living Network Allance, Digital Living Network Alliance) protocol or use the cloud screen projection function of the IM SDK (Instant Messaging Software Development Kit, Instant Messaging Software Development Kit), so as to realize the connection between the application device carrying the small program and the screen projection device to be used, and thus the small program is projected by using the screen projection device.

[0006] However, in the above related art, the development platform of the small program is required every time the small program is projected, which leads to excessive dependence of the screen projection process on the development platform of the small program, and thus leads to high screen projection cost and low screen projection efficiency. SUMMARY

[0007] The embodiment of the application aims to provide a small program screen projection method, system, device and electronic equipment to reduce the dependence on the development platform of the small program and improve the screen projection efficiency of the small program. The specific technical solutions are as follows.

[0008] In the first aspect of the application, a small program screen projection system is provided. The system comprises a server, an application device and a target screen projection device. The application device is a device carrying a small program to be projected. The method comprises the following steps.

[0009] The application device obtains a target device identifier of the target screen projection device and sends the target device identifier and a first network identifier of a network used by the application device to the server.

[0010] The server receives the target device identifier and the first network identifier, obtains a second network identifier of a network used by the target screen projection device based on the target device identifier, determines a target instruction template corresponding to the target screen projection device, and sends the target instruction template to the application device. The target instruction template is generated by the server based on registration information sent by the target screen projection device and instruction information supported by the target screen projection device.

[0011] The server determines whether the application device and the target screen projection device are in the same internal network based on the first network identifier and the second network identifier, and sends the determination result to the application device.

[0012] The application device receives the target instruction template and the determination result sent by the server, generates a control instruction for the small program to be projected based on the target instruction template, and sends the control instruction to the target screen projection device along a link corresponding to the determination result.

[0013] The target screen projection device receives the control instruction, analyzes the control instruction based on the target instruction template received in advance, and controls the small program to be projected according to the analysis result.

[0014] Optionally, in a specific implementation, the step of sending the control instruction to the target screen projection device along the link corresponding to the determination result comprises the following steps.

[0015] When the determination result indicates that the application device and the target screen projection device are in the same internal network, the application device sends the control instruction to the target screen projection device.

[0016] The target screen projection device receives the control instruction, analyzes the control instruction based on the target instruction template received in advance, and controls the small program to be projected according to the analysis result.

[0017] The target screen projection device receives the control instruction sent by the application device, parses the control instruction based on the target instruction template received in advance, and controls the to-be-screen-projected applet according to the parsing result.

[0018] Optionally, in a specific implementation, the sending of the control instruction to the target screen projection device along the link corresponding to the judgment result comprises:

[0019] In a case where the judgment result indicates that the application device and the target screen projection device are not in the same intranet, the application device sends the control instruction to the server;

[0020] The server receives the control instruction sent by the application device, and sends the control instruction to the target screen projection device;

[0021] The target screen projection device receives the control instruction, parses the control instruction based on the target instruction template received in advance, and controls the to-be-screen-projected applet according to the parsing result, which comprises:

[0022] The target screen projection device receives the control instruction sent by the server, parses the control instruction based on the target instruction template, and controls the to-be-screen-projected applet according to the parsing result.

[0023] Optionally, in a specific implementation, the registration information comprises a device identifier of the target screen projection device and a second network identifier of a network used by the target screen projection device.

[0024] The obtaining of the second network identifier of the network used by the target screen projection device based on the target device identifier comprises:

[0025] The server obtains, based on the target device identifier, the second network identifier of the network used by the target screen projection device from the registration information sent by the target screen projection device.

[0026] Optionally, in a specific implementation, the device description file set of the target screen projection device comprises service information supported by the target screen projection device and the instruction information; and the target instruction template is generated by the server based on the device description file set received from the target screen projection device.

[0027] Optionally, in a specific implementation, the method further comprises:

[0028] The target screen projection device generates an information identifier of the target screen projection device based on the response information sent by the server and the registration information; wherein the response information is the response information corresponding to the control request generated by the server based on the time stamp of the time point when the control request sent by the target screen projection device is received;

[0029] The application device obtains the target device identifier of the target screen projection device, including:

[0030] The application device obtains the target device identifier of the target screen projection device based on the information identifier of the target screen projection device.

[0031] Optionally, in a specific implementation manner, the information identifier includes a two-dimensional code.

[0032] The application device obtains the target device identifier of the target screen projection device based on the information identifier of the target screen projection device, including:

[0033] The application device obtains the target device identifier of the target screen projection device by scanning the two-dimensional code.

[0034] Optionally, in a specific implementation manner, before the server judges whether the application device and the target screen projection device are in the same intranet based on the first network identifier and the second network identifier, the method further includes:

[0035] The server obtains the response information corresponding to the target screen projection device based on the target device identifier, and judges whether the response information is valid;

[0036] If the response information corresponding to the target screen projection device is valid, the server judges whether the application device and the target screen projection device are in the same intranet based on the first network identifier and the second network identifier.

[0037] Optionally, in a specific implementation manner, before the server judges whether the application device and the target screen projection device are in the same intranet based on the first network identifier and the second network identifier, the method further includes:

[0038] The server determines whether the registration information of the target screen projection device exists based on the target device identifier;

[0039] If the registration information of the target screen projection device exists, the server judges whether the application device and the target screen projection device are in the same intranet based on the first network identifier and the second network identifier.

[0040] Optionally, in a specific implementation manner, the method further includes:

[0041]

[0041] The target screen projection device sends an online notification to the server when it is online;

[0042] The server receives the online notification sent by the target screen projection device, updates the online state of the target screen projection device to an online state, and sends a preset heartbeat sending interval to the target screen projection device;

[0043] The target screen projection device receives the preset heartbeat sending interval and sends the heartbeat packet to the server according to the preset heartbeat sending interval;

[0044] The server receives the heartbeat packet, and if no heartbeat packet sent by the target screen projection device is received within the preset heartbeat sending interval, updates the online state of the target screen projection device to an offline state.

[0045] Optionally, in a specific implementation, the application device obtains the target device identifier of the target screen projection device, including:

[0046] The application device obtains a screen projection device list and an online state of a screen projection device from the server;

[0047] When detecting a selection operation about a target screen projection device sent by a user according to the screen projection device list and the online state of the screen projection device, the target device identifier of the target screen projection device is obtained.

[0048] Optionally, in a specific implementation, the method further includes:

[0049] The server sends push information about updating the online state of the target screen projection device to the application device after updating the online state of the target screen projection device;

[0050] The application device receives the push information sent by the server, and updates the online state of the target screen projection device according to the push message.

[0051] Optionally, in a specific implementation, the method further includes:

[0052] When detecting an instruction information update supported by itself, the target screen projection device sends the updated instruction information supported by itself to the server;

[0053] The server receives the updated instruction information supported by the target screen projection device, updates the target instruction template corresponding to the target screen projection device based on the updated instruction information supported by the target screen projection device, and sends the updated target instruction template to the target screen projection device.

[0054] In a second aspect of the embodiment of the present application, a small program screen projection method is also provided, which is applied to a server in a small program screen projection system; the system further comprises an application device and a target screen projection device; wherein the application device is a device carrying a small program to be projected; the method comprises:

[0055] receiving a target device identifier of the target screen projection device and a first network identifier of a network used by the application device sent by the application device, obtaining a second network identifier of a network used by the target screen projection device based on the target device identifier, determining a target instruction template corresponding to the target screen projection device, and sending the target instruction template to the application device, so that the application device receives the target instruction template and generates a control instruction about the small program to be projected based on the target instruction template; wherein the target instruction template is generated by the server based on the registration information sent by the target screen projection device and the instruction information supported by the target screen projection device;

[0056] judging whether the application device and the target screen projection device are in the same intranet based on the first network identifier and the second network identifier, and sending a judgment result to the application device, so that the application device receives the judgment result, sends the control instruction to the target screen projection device along a link corresponding to the judgment result, so that the target screen projection device receives the control instruction, analyzes the control instruction based on the target instruction template received in advance, and controls the small program to be projected according to the analysis result.

[0057] Optionally, in a specific implementation manner, the method further comprises:

[0058] receiving the control instruction sent by the application device to the server in the case where the judgment result indicates that the application device and the target screen projection device are not in the same intranet, and sending the control instruction to the target screen projection device, so that the target screen projection device receives the control instruction sent by the server, analyzes the control instruction based on the target instruction template, and controls the small program to be projected according to the analysis result.

[0059] Optionally, in a specific implementation manner, the registration information comprises a device identifier of the target screen projection device and a second network identifier of a network used by the target screen projection device;

[0060] The obtaining of the second network identifier of the network used by the target screen projection device based on the target device identifier comprises:

[0061] Based on the target device identifier, the second network identifier of the network used by the target screen projection device is obtained in the registration information sent by the target screen projection device.

[0062] Optionally, in some embodiments, the device description file set of the target screen projection device includes service information supported by the target screen projection device and the instruction information; and the target instruction template is generated by the server based on the device description file set received from the target screen projection device.

[0063] Optionally, in some embodiments, the method further includes:

[0064] generating response information corresponding to the control request based on a time stamp of a time point when the control request is received from the target screen projection device;

[0065] sending the response information to the target screen projection device, so that the target screen projection device generates an information identifier of the target screen projection device based on the response information and the registration information, and so that the application device acquires a target device identifier of the target screen projection device based on the information identifier.

[0066] Optionally, in some embodiments, before the determining whether the application device and the target screen projection device are in the same intranet based on the first network identifier and the second network identifier, the method further includes:

[0067] acquiring response information corresponding to the target screen projection device based on the target device identifier, and determining whether the response information is valid;

[0068] if the response information corresponding to the target screen projection device is valid, determining whether the application device and the target screen projection device are in the same intranet based on the first network identifier and the second network identifier.

[0069] Optionally, in some embodiments, before the determining whether the application device and the target screen projection device are in the same intranet based on the first network identifier and the second network identifier, the method further includes:

[0070] determining whether registration information of the target screen projection device exists based on the target device identifier;

[0071] if the registration information of the target screen projection device exists, determining whether the application device and the target screen projection device are in the same intranet based on the first network identifier and the second network identifier.

[0072] Optionally, in some embodiments, the method further includes:

[0073] receiving the online notification sent by the target screen projection device, updating the online state of the target screen projection device to the online state, and sending a preset heartbeat sending interval to the target screen projection device, so that the target screen projection device receives the preset heartbeat sending interval and sends the heartbeat packet to the server according to the preset heartbeat sending interval;

[0074] receiving the heartbeat packet, and updating the online state of the target screen projection device to the offline state if the heartbeat packet sent by the target screen projection device is not received within the preset heartbeat sending interval.

[0075] Optionally, in a specific implementation, the method further includes:

[0076] sending a screen projection device list and an online state of a screen projection device to the application device, so that the application device acquires the screen projection device list and the online state of the screen projection device, and acquires a target device identifier of a target screen projection device when detecting a selection operation about the target screen projection device sent by a user according to the screen projection device list and the online state of the screen projection device.

[0077] Optionally, in a specific implementation, the method further includes:

[0078] after updating the online state of the target screen projection device, sending push information about updating the online state of the target screen projection device to the application device, so that the application device receives the push information sent by the server and updates the online state of the target screen projection device according to the push message.

[0079] Optionally, in a specific implementation, the method further includes:

[0080] receiving updated instruction information supported by the target screen projection device, updating a target instruction template corresponding to the target screen projection device based on the updated instruction information supported by the target screen projection device, and sending the updated target instruction template to the target screen projection device, wherein the updated instruction information supported by the target screen projection device is sent by the target screen projection device to the server when detecting that the instruction information supported by the target screen projection device is updated.

[0081] In the third aspect of the present application, a small program screen projection method is also provided, which is applied to an application device in a small program screen projection system; the system further includes a server and a template screen projection device; the application device is a device carrying a small program to be projected; and the method includes:

[0082] obtaining a target device identifier of the target screen projection device, and sending the target device identifier and a first network identifier of a network used by the application device to the server, so that the server receives the target device identifier and the first network identifier, obtains a second network identifier of a network used by the target screen projection device based on the target device identifier, determines a target instruction template corresponding to the target screen projection device, judges whether the application device and the target screen projection device are in the same internal network based on the first network identifier and the second network identifier, and sends the target instruction template and the judgment result to the application device; wherein the target instruction template is generated by the server based on registration information sent by the target screen projection device and instruction information supported by the target screen projection device;

[0083] receiving the target instruction template and the judgment result sent by the server, generating a control instruction about the to-be-screen-projected applet based on the target instruction template, sending the control instruction to the target screen projection device along a link corresponding to the judgment result, so that the target screen projection device receives the control instruction, analyzes the control instruction based on the target instruction template received in advance, and controls the to-be-screen-projected applet according to the analysis result.

[0084] Optionally, in a specific implementation manner, the sending of the control instruction to the target screen projection device along the link corresponding to the judgment result comprises:

[0085] in a case where the judgment result indicates that the application device and the target screen projection device are in the same internal network, sending the control instruction to the target screen projection device, so that the target screen projection device receives the control instruction sent by the application device, analyzes the control instruction based on the target instruction template received in advance, and controls the to-be-screen-projected applet according to the analysis result.

[0086] Optionally, in a specific implementation manner, the sending of the control instruction to the target screen projection device along the link corresponding to the judgment result comprises:

[0087] in a case where the judgment result indicates that the application device and the target screen projection device are not in the same internal network, sending the control instruction to the server, so that the server receives the control instruction sent by the application device, and sends the control instruction to the target screen projection device, so that the target screen projection device receives the control instruction sent by the server, analyzes the control instruction based on the target instruction template, and controls the to-be-screen-projected applet according to the analysis result.

[0088] Optionally, in an implementation form, the device description file set of the target screen projection device comprises service information supported by the target screen projection device and the instruction information.

[0089] The target instruction template is generated by the server based on the received device description file set sent by the target screen projection device.

[0090] Optionally, in an implementation form, the target device identifier of the target screen projection device is obtained by:

[0091] The target device identifier of the target screen projection device is obtained based on an information identifier of the target screen projection device, wherein the information identifier is generated by the target screen projection device based on response information sent by the server and the registration information; and the response information is response information corresponding to the control request and generated by the server based on a time stamp of a time point at which the control request is received.

[0092] Optionally, in an implementation form, the information identifier comprises a two-dimensional code.

[0093] The target device identifier of the target screen projection device is obtained based on an information identifier of the target screen projection device, wherein the information identifier is generated by the target screen projection device based on response information sent by the server and the registration information; and the response information is response information corresponding to the control request and generated by the server based on a time stamp of a time point at which the control request is received.

[0094] The target device identifier of the target screen projection device is obtained by scanning the two-dimensional code.

[0095] Optionally, in an implementation form, the target device identifier of the target screen projection device is obtained by:

[0096] The server is queried to obtain a list of screen projection devices and online states of the screen projection devices.

[0097] When detecting a selection operation on a target screen projection device sent by a user according to the list of screen projection devices and the online states of the screen projection devices, the target device identifier of the target screen projection device is obtained.

[0098] Optionally, in an implementation form, the method further comprises:

[0099] The server is queried to obtain a list of screen projection devices and online states of the screen projection devices.

[0100] In the fourth aspect of the present application, a small program screen projection system is also provided, which comprises a server, an application device and a target screen projection device; wherein the application device is a device carrying a small program to be projected;

[0101] The server is configured to receive the target device identifier of the target screen projection device and the first network identifier of the network used by the application device sent by the application device, acquire the second network identifier of the network used by the target screen projection device based on the target device identifier, determine the target instruction template corresponding to the target screen projection device, send the target instruction template to the application device, judge whether the application device and the target screen projection device are in the same intranet based on the first network identifier and the second network identifier, and send the judgment result to the application device; wherein the target instruction template is generated by the server based on the registration information sent by the target screen projection device and the instruction information supported by the target screen projection device;

[0102] The application device is configured to acquire the target device identifier of the target screen projection device, send the target device identifier and the first network identifier to the server, receive the target instruction template and the judgment result sent by the server, generate the control instruction about the small program to be projected based on the target instruction template, and send the control instruction to the target screen projection device along the link corresponding to the judgment result;

[0103] The target screen projection device is configured to receive the control instruction, parse the control instruction based on the target instruction template received in advance, and control the small program to be projected according to the parsing result.

[0104] In the fifth aspect of the present application, a small program screen projection device is also provided, which is applied to a server in a small program screen projection system; the system further comprises an application device and a target screen projection device; wherein the application device is a device carrying a small program to be projected; the device comprises:

[0105] A receiving module is configured to receive the target device identifier of the target screen projection device and the first network identifier of the network used by the application device sent by the application device, acquire the second network identifier of the network used by the target screen projection device based on the target device identifier, determine the target instruction template corresponding to the target screen projection device, send the target instruction template to the application device, so that the application device receives the target instruction template and generates the control instruction about the small program to be projected based on the target instruction template; wherein the target instruction template is generated by the server based on the registration information sent by the target screen projection device and the instruction information supported by the target screen projection device;

[0106] a judging module, configured to judge whether the application device and the target screen projection device are in the same intranet based on the first network identifier and the second network identifier, and send a judging result to the application device, so that the application device receives the judging result, sends the control instruction to the target screen projection device along a link corresponding to the judging result, so that the target screen projection device receives the control instruction, analyzes the control instruction based on the target instruction template received in advance, and controls the to-be-screen-projected applet according to an analysis result.

[0107] Optionally, in a specific implementation, the apparatus further includes:

[0108] an instruction receiving module, configured to receive the control instruction sent by the application device to the server in a case where the judging result indicates that the application device and the target screen projection device are not in the same intranet, and send the control instruction to the target screen projection device, so that the target screen projection device receives the control instruction sent by the server, analyzes the control instruction based on the target instruction template, and controls the to-be-screen-projected applet according to an analysis result.

[0109] Optionally, in a specific implementation, the registration information includes a device identifier of the target screen projection device and a second network identifier of a network used by the target screen projection device.

[0110] The receiving module is specifically configured to:

[0111] based on the target device identifier, acquire the second network identifier of the network used by the target screen projection device in the registration information sent by the target screen projection device.

[0112] Optionally, in a specific implementation, the device description file set of the target screen projection device includes service information supported by the target screen projection device and the instruction information; and the target instruction template is generated by the server based on the device description file set received from the target screen projection device.

[0113] Optionally, in a specific implementation, the apparatus further includes:

[0114] a response information producing module, configured to generate response information corresponding to the control request based on a time stamp of a time point at which the control request sent by the target screen projection device is received.

[0115] The response information sending module is configured to send the response information to the target screen projection device, so that the target screen projection device generates an information identifier of the target screen projection device based on the response information and the registration information, and so that the application device acquires a target device identifier of the target screen projection device based on the information identifier of the target screen projection device.

[0116] Optionally, in an implementation, the apparatus further includes:

[0117] The response information judging module is configured to, before judging whether the application device and the target screen projection device are in the same intranet based on the first network identifier and the second network identifier, acquire corresponding response information of the target screen projection device based on the target device identifier, and judge whether the response information is valid; if yes, triggering the judging module.

[0118] Optionally, in an implementation, the apparatus further includes:

[0119] The registration information determining module is configured to, before judging whether the application device and the target screen projection device are in the same intranet based on the first network identifier and the second network identifier, determine whether registration information of the target screen projection device exists based on the target device identifier; if yes, triggering the judging module.

[0120] Optionally, in an implementation, the apparatus further includes:

[0121] The notification receiving module is configured to receive an online notification sent by the target screen projection device, update an online state of the target screen projection device to an online state, and send a preset heartbeat sending interval to the target screen projection device, so that the target screen projection device receives the preset heartbeat sending interval and sends the heartbeat packet to the server according to the preset heartbeat sending interval.

[0122] The packet receiving module is configured to receive the heartbeat packet, and if no heartbeat packet sent by the target screen projection device is received within the preset heartbeat sending interval, update the online state of the target screen projection device to an offline state.

[0123] Optionally, in an implementation, the apparatus further includes:

[0124] The list sending module is configured to send a screen projection device list and online states of screen projection devices to the application device, so that the application device acquires the screen projection device list and the online states of the screen projection devices, and acquires a target device identifier of a target screen projection device when detecting a selection operation about the target screen projection device sent by a user according to the screen projection device list and the online states of the screen projection devices.

[0125] Optionally, in an implementation form of the apparatus, the apparatus further comprises:

[0126] The push message sending module is configured to, after updating the online state of the target screen projection device, send push information about updating the online state of the target screen projection device to the application device, so that the application device receives the push information sent by the server and updates the online state of the target screen projection device according to the push message.

[0127] Optionally, in an implementation form of the apparatus, the apparatus further comprises:

[0128] The updating module is configured to receive updated instruction information supported by the target screen projection device, update the target instruction template corresponding to the target screen projection device based on the updated instruction information supported by the target screen projection device, and send the updated target instruction template to the target screen projection device, wherein the updated instruction information supported by the target screen projection device is sent by the target screen projection device to the server when the target screen projection device detects that the instruction information supported by itself is updated.

[0129] In a sixth aspect of the embodiment of the present application, a mini-program screen projection apparatus is also provided, which is applied to an application device in a mini-program screen projection system; the system further comprises a server and a target screen projection device; wherein the application device is a device carrying a to-be-screen-projected mini-program; and the apparatus comprises:

[0130] The identification sending module is configured to acquire a target device identifier of the target screen projection device, and send the target device identifier and a first network identifier of a network used by itself to the server, so that the server receives the target device identifier and the first network identifier, acquires a second network identifier of the network used by the target screen projection device based on the target device identifier, determines a target instruction template corresponding to the target screen projection device, judges whether the application device and the target screen projection device are in the same intranet based on the first network identifier and the second network identifier, and sends the target instruction template and a judgment result to the application device; wherein the target instruction template is generated by the server based on the received registration information sent by the target screen projection device and instruction information supported by the target screen projection device;

[0131] The instruction sending module is configured to receive the target instruction template and the judgment result sent by the server, generate a control instruction about the to-be-screen-projected mini-program based on the target instruction template, send the control instruction to the target screen projection device along a link corresponding to the judgment result, so that the target screen projection device receives the control instruction, analyzes the control instruction based on the target instruction template received in advance, and controls the to-be-screen-projected mini-program according to an analysis result.

[0132] Optionally, in an implementation form of the instruction sending module, the instruction sending module is configured to:

[0133] In a case where the judgment result indicates that the application device and the target screen projection device are in the same internal network, the control instruction is sent to the target screen projection device, so that the target screen projection device receives the control instruction sent by the application device, analyzes the control instruction based on the target instruction template received in advance, and controls the to-be-screen-projected applet according to the analysis result.

[0134] Optionally, in an implementation form of the instruction sending module, the instruction sending module is configured to:

[0135] In a case where the judgment result indicates that the application device and the target screen projection device are not in the same internal network, the control instruction is sent to the server, so that the server receives the control instruction sent by the application device, and sends the control instruction to the target screen projection device, so that the target screen projection device receives the control instruction sent by the server, analyzes the control instruction based on the target instruction template, and controls the to-be-screen-projected applet according to the analysis result.

[0136] Optionally, in an implementation form of the target screen projection device, the device description file set of the target screen projection device includes service information supported by the target screen projection device and the instruction information.

[0137] The target instruction template is generated by the server based on the device description file set sent by the target screen projection device.

[0138] Optionally, in an implementation form of the identification sending module, the identification sending module includes:

[0139] an identification obtaining sub-module, configured to obtain a target device identification of the target screen projection device based on an information identification of the target screen projection device, wherein the information identification is generated by the target screen projection device based on response information sent by the server and the registration information; and the response information is response information corresponding to a control request generated by the server based on a time stamp of a time point at which the control request is received.

[0140] Optionally, in an implementation form of the information identification, the information identification includes a two-dimensional code.

[0141] The identification obtaining sub-module is specifically configured to:

[0142] obtain the target device identification of the target screen projection device by scanning the two-dimensional code.

[0143] Optionally, in an implementation form, the identification sending module comprises:

[0144] The state obtaining sub-module is configured to obtain a list of screen projection devices and online states of the screen projection devices from the server.

[0145] The obtaining sub-module is configured to obtain a target device identifier of a target screen projection device when detecting that the user sends a selection operation on the target screen projection device according to the list of screen projection devices and the online states of the screen projection devices.

[0146] Optionally, in an implementation form, the apparatus further comprises:

[0147] The push message obtaining module is configured to receive push information sent by the server for updating the online state of the target screen projection device, and update the online state of the target screen projection device according to the push message, wherein the push message is sent by the server to the application device after updating the online state of the target screen projection device.

[0148] In a seventh aspect of the embodiments of the present application, an electronic device is further provided, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete communication with each other through the communication bus.

[0149] The memory is configured to store a computer program.

[0150] The processor is configured to execute the program stored on the memory, and implement any of the method steps.

[0151] In another aspect of the embodiments of the present application, a computer readable storage medium is further provided, and the computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement any of the method steps.

[0152] In another aspect of the embodiments of the present application, a computer program product comprising instructions which, when executed on a computer, cause the computer to carry out any of the method steps.

[0153] The advantageous effects of the embodiments of the present application are as follows:

[0154] It can be seen that the application embodiment provides a small program screen projection method, which is applied to a small program screen projection system, and the system comprises a server, an application device carrying a small program to be projected, and a target screen projection device. When the small program to be projected is controlled to be projected, the screen projection device desired to be used for projecting the small program to be projected can be determined as the target screen projection device, and then the target device identifier of the target screen projection device can be acquired by the application device, and the target device identifier and the first network identifier of the network used by the application device are sent to the server. Then, the server can receive the target device identifier and the first network identifier, acquire the second network identifier of the network used by the target screen projection device based on the target device identifier, determine the target instruction template corresponding to the target screen projection device generated based on the registration information sent by the target screen projection device and the instruction information supported by the target screen projection device, and send the target instruction template to the application device. In this way, the server can judge whether the application device and the target screen projection device are in the same intranet based on the first network identifier and the second network identifier, and send the judgment result to the application device. The application device can receive the target instruction template and the judgment result sent by the server, generate a control instruction about the small program to be projected based on the target instruction template, and send the control instruction to the target screen projection device along the link corresponding to the judgment result. Thus, the target screen projection device receives the control instruction, analyzes the control instruction based on the target instruction template received in advance, and controls the small program to be projected according to the analysis result.

[0155] In this way, when the small program to be projected carried by the application device is controlled, the application device and the target screen projection device can both acquire the instruction template of the target screen projection device with the help of the server, and then the application device can realize signaling interaction with the target screen projection device by using the instruction template without using the development platform of the small program to be projected, so that the dependence on the development platform of the small program can be reduced, and the screen projection efficiency of the small program can be improved. BRIEF DESCRIPTION OF DRAWINGS

[0156] In order to more clearly illustrate the technical solutions in the embodiments of the application or the prior art, the drawings needed to be used in the embodiments or the prior art description will be briefly introduced.

[0157] Figure 1 A flowchart of a small program screen projection method provided by the application embodiment;

[0158] Figure 2 A schematic diagram of a small program screen projection system provided by the application embodiment;

[0159] Figure 3 An interaction diagram of a server, an application device, and a target screen projection device in a specific example provided by the application embodiment;

[0160] Figure 4Another interaction schematic diagram of a server, an application device and a target screen projection device in a specific example provided for an embodiment of the present application;

[0161] Figure 5 Another interaction schematic diagram of a server, an application device and a target screen projection device in a specific example provided for an embodiment of the present application;

[0162] Figure 6 A flowchart of a small program screen projection method provided for an embodiment of the present application;

[0163] Figure 7 A flowchart of another small program screen projection method provided for an embodiment of the present application;

[0164] Figure 8 A structural schematic diagram of a small program screen projection device provided for an embodiment of the present application;

[0165] Figure 9 A structural schematic diagram of another small program screen projection device provided for an embodiment of the present application;

[0166] Figure 10 A structural schematic diagram of an electronic device provided for an embodiment of the present application. DETAILED DESCRIPTION

[0167] The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application.

[0168] In the related art, different small programs are developed and constructed by different small program development platforms, and when the small programs are projected, the connection between an application device carrying the small program and a screen projection device to be used can be achieved only by accessing the DLNA protocol through the Native SDK of the development platform for developing and constructing the small program or using the cloud screen projection function of the IM SDK, so that the small program is projected by using the screen projection device.

[0169] However, in the above related technology, the development platform of the small program needs to be used every time the small program is projected, which leads to that the screen projection process excessively depends on the development platform of the small program, and thus leads to high screen projection cost and low screen projection efficiency.

[0170] In order to solve the above technical problems, an embodiment of the present application provides a small program screen projection method, which is applied to a small program screen projection system, the system comprising a server, an application device and a target screen projection device, wherein the application device is a device carrying a small program to be projected.

[0171] The method is suitable for various application scenarios with applet screen projection needs, for example, a user projects a video applet onto a home screen projection device to watch a movie and controls the applet through the home screen projection device, an advertiser projects an advertising applet onto an outdoor screen projection device to display an advertisement, and the like.

[0172] In addition, the application device in the method can be various devices that can carry applets, such as a mobile phone, a notebook computer, a tablet computer, and the like, the method can include one target screen projection device or multiple target screen projection devices, the target screen projection device in the method can be various devices with a screen projection function, such as a television, an LED curtain wall, and the like, the server in the method can be a cloud server or a local server, and the like, the application device, the server, and the target screen projection device can be in the same space or different spaces, and the application device, the server, and the target screen projection device can use the same network or different networks.

[0173] Therefore, the application embodiments do not specifically limit the application scenarios and execution subjects of the method.

[0174] The applet screen projection method provided by the application embodiments can include the following steps.

[0175] The application device obtains a target device identifier of the target screen projection device and sends the target device identifier and a first network identifier of a network used by the application device to the server;

[0176] The server receives the target device identifier and the first network identifier, obtains a second network identifier of a network used by the target screen projection device based on the target device identifier, determines a target instruction template corresponding to the target screen projection device, and sends the target instruction template to the application device; the target instruction template is generated by the server based on registration information sent by the target screen projection device and instruction information supported by the target screen projection device;

[0177] The server determines whether the application device and the target screen projection device are in the same internal network based on the first network identifier and the second network identifier and sends a determination result to the application device;

[0178] The application device receives the target instruction template and the determination result sent by the server, generates a control instruction about the applet to be projected based on the target instruction template, and sends the control instruction to the target screen projection device along a link corresponding to the determination result;

[0179] The target screen projection device receives the control instruction, parses the control instruction based on the target instruction template received in advance, and controls the to-be-screened applet according to the parsing result.

[0180] As can be seen, the embodiment of the present application provides a small program screen projection method, which is applied to a small program screen projection system, and the system comprises a server, an application device carrying a to-be-screened small program, and a target screen projection device. When the to-be-screened small program is controlled to be projected, the screen projection device desired to be used to project the to-be-screened small program can be determined as the target screen projection device, and then the target device identifier of the target screen projection device can be acquired by the application device, and the target device identifier and the first network identifier of the network used by the application device are sent to the server. Then, the server can receive the target device identifier and the first network identifier, acquire the second network identifier of the network used by the target screen projection device based on the target device identifier, determine the target instruction template corresponding to the target screen projection device generated based on the registration information sent by the target screen projection device and the instruction information supported by the target screen projection device, and send the target instruction template to the application device. In this way, the server can determine whether the application device and the target screen projection device are in the same intranet based on the first network identifier and the second network identifier, and send the determination result to the application device. The application device can receive the target instruction template and the determination result sent by the server, generate a control instruction about the to-be-screened small program based on the target instruction template, and send the control instruction to the target screen projection device along the link corresponding to the determination result. Thus, the target screen projection device receives the control instruction, parses the control instruction based on the target instruction template received in advance, and controls the to-be-screened small program according to the parsing result.

[0181] In this way, when the to-be-screened small program carried by the application device is controlled, the application device and the target screen projection device can both acquire the instruction template of the target screen projection device with the help of the server, and then the application device can realize signaling interaction with the target screen projection device by using the instruction template without using the development platform of the to-be-screened small program, so that the dependence on the development platform of the small program can be reduced, and the screen projection efficiency of the small program can be improved.

[0182] The small program screen projection method provided by the embodiment of the present application will be described in detail below with reference to the accompanying drawings.

[0183] Figure 1 A schematic diagram of a small program screen projection method provided by the embodiment of the present application is shown in the figure. Figure 2 The system can comprise a server 100, an application device 200, and a target screen projection device 300, wherein the application device is a device carrying a to-be-screened small program.

[0184] The server 100 is configured to receive the target device identifier of the target screen projection device 300 and the first network identifier of the network used by the application device 200, acquire the second network identifier of the network used by the target screen projection device 300 based on the target device identifier, determine the target instruction template corresponding to the target screen projection device 300, and send the target instruction template to the application device 200; determine whether the application device 200 and the target screen projection device 300 are in the same intranet based on the first network identifier and the second network identifier, and send the determination result to the application device 200; wherein the target instruction template is generated by the server 100 based on the registration information sent by the target screen projection device 300 and the instruction information supported by the target screen projection device 300;

[0185] The application device 200 is configured to acquire the target device identifier of the target screen projection device 300, and send the target device identifier and the first network identifier to the server 100; receive the target instruction template and the determination result sent by the server 100, generate the control instruction for the to-be-screened mini program based on the target instruction template, and send the control instruction to the target screen projection device 300 along the link corresponding to the determination result.

[0186] The target screen projection device 300 is configured to receive the control instruction, parse the control instruction based on the target instruction template received in advance, and control the to-be-screened mini program according to the parsing result.

[0187] As shown in Figure 1 The method can include the following steps S101-S105:

[0188] S101: The application device 200 acquires the target device identifier of the target screen projection device 300, and sends the target device identifier and the first network identifier of the network used by the application device 200 to the server 100;

[0189] When the to-be-screened mini program is controlled to be screened, the screen projection device that is expected to be used to control the to-be-screened mini program to be screened can be determined first, and the screen projection device is taken as the target screen projection device 300. In this way, the application device 200 can acquire the target device identifier of the target screen projection device 300, and send the target device identifier and the first network identifier of the network used by the application device 200 to the server 100.

[0190] The device identifier of each screen projection device corresponds to the screen projection device one by one, so that the target device identifier of the target screen projection device 300 can be used to uniquely determine the target screen projection device 300. The device identifier can include device brand, device number, device name and the like, which are all reasonable, and the target device identifier is not limited in the embodiment of the application.

[0191] The first network identifier of the network used by the application device 200 includes a network IP of an external network of the network used by the application device 200 and a network IP of an internal network of the network used by the application device 200.

[0192] The first network identifier of the network used by the application device 200 includes a network IP of an external network of the network used by the application device 200 and a network IP of an internal network of the network used by the application device 200.

[0193] The external network refers to an independent public network allocated to a user by a network operator, and the internal network refers to a network allocated to a network device by a router WLAN. The external network used by the application device 200 refers to an independent public network allocated to a user by a network operator, and the internal network used by the application device 200 refers to a network allocated to the application device 200 by a router WLAN. For example, in the environment of the application device 200, the independent public network allocated to a user by a network operator is network A, and the network allocated to the application device 200 by a router WLAN is network B, so the external network used by the application device 200 is network A, and the internal network used is network B.

[0194] In addition, the number of target screen projection devices 300 can be determined according to actual needs, and the target screen projection device 300 can be one screen projection device or multiple screen projection devices, and the embodiments of the application do not make specific limitations.

[0195] The target screen projection device 300 can be determined in multiple ways, and the target device identifier of the target screen projection device 300 can be obtained in multiple ways.

[0196] For example, the user can select a screen projection device in the same space as the application device 200 as the target screen projection device 300 according to actual needs, and then the user can send the target device identifier of the selected target screen projection device 300 to the application device 200 through a point selection operation, an input operation, etc.

[0197] For another example, the application device 200 can store a screen projection device list, so that the application device 200 can randomly determine the target screen projection device 300 in the screen projection device list, and the device identifier of the screen projection device can be recorded in the screen projection device list, so that the application device 200 can obtain the target device identifier of the target screen projection device 300 after determining the target screen projection device 300.

[0198] For example, the user can set a selection rule of the target projection device 300, and the application device 200 can determine the target projection device 300 by scanning the stored projection device list based on the selection rule. The projection device list can record the device identifier of the projection device, so that the application device 200 can obtain the target device identifier of the target projection device 300 after determining the target projection device 300. For example, the selection rule can be a scanning period of the projection device in the projection device list, or a preset order for determining the target projection device 300 in the projection device list.

[0199] S102: The server 100 receives the target device identifier and the first network identifier, obtains the second network identifier of the network used by the target projection device 300 based on the target device identifier, determines the target instruction template corresponding to the target projection device 300, and sends the target instruction template to the application device 200;

[0200] The target instruction template is generated by the server 100 based on the registration information sent by the target projection device 300 and the instruction information supported by the target projection device 300.

[0201] In order to communicate with the server, the projection device can be registered in the server 100. When the projection device is registered in the server, the server 100 can send the registration information of the projection device and the instruction information supported by the projection device.

[0202] The registration information can include the device identifier of the projection device.

[0203] Generally, the instruction that the projection device can respond to matches the instruction information supported by the projection device, so that the instruction format supported by the projection device is a determined format that matches the instruction information supported by the projection device. In addition, when the projection device receives an instruction that matches the above instruction format, the projection device can respond to the instruction.

[0204] For each projection device, the server 100 can generate an instruction template corresponding to the projection device based on the registration information and the instruction information supported by the projection device when receiving the registration information and the instruction information supported by the projection device. The instruction template matches the instruction information supported by the projection device, and when the projection device receives an instruction generated by other devices according to the instruction template, since the format of the instruction matches the instruction information supported by the projection device, the projection device can respond to the instruction.

[0205] Based on this, the server 100 can generate a target instruction template corresponding to the target screen projection device 300 based on the registration information and the instruction information supported by the target screen projection device 300 when receiving the registration information and the instruction information supported by the target screen projection device 300.

[0206] Then, the server 100 can store the target instruction template and establish a correspondence between the target instruction template and the target screen projection device 300. Furthermore, in order to enable the target screen projection device 300 to parse the instruction received by the target screen projection device 300 according to the target instruction template and respond to the instruction after successful parsing, the server 100 can distribute the target instruction template corresponding to the target screen projection device 300 to the target screen projection device 300.

[0207] Optionally, the target instruction template can be in a Soap (Simple Object Access Protocol) format.

[0208] In this way, when the server 100 receives the target device identifier and the first network identifier of the network used by the application device 200, the server 100 can obtain the second network identifier of the network used by the target screen projection device 300 based on the target device identifier, and determine the target instruction template corresponding to the target screen projection device 300 based on the target device identifier. In this way, after the server 100 determines the target instruction template corresponding to the target screen projection device 300, the server 100 can send the target instruction template to the application device 200.

[0209] Optionally, the server 100 has a screen projection device list, and the server 100 establishes a correspondence between the registration information and the instruction information of each screen projection device received by the server 100 and the instruction template corresponding to each screen projection device, and records the correspondence in the screen projection device list. In this way, when the target device identifier of the target screen projection device 300 is obtained, the target instruction template corresponding to the target screen projection device 300 can be found in the correspondence.

[0210] The second network identifier of the network used by the target screen projection device 300 can include a network IP of an external network used by the target screen projection device 300 and a network IP of an internal network used by the target screen projection device 300.

[0211] In the above, when the server 100 obtains the second network identifier of the network used by the target projection device 300 based on the target device identifier, the server 100 can request the target projection device 300 for the second network identifier of the network used by the target projection device 300 based on the target device identifier, or the server 100 can obtain the second network identifier of the network used by the target projection device 300 stored in advance. Both of the above are reasonable, and are not limited in the embodiment of the present application.

[0212] Optionally, in a specific implementation, the registration information includes the device identifier of the target projection device 300 and the second network identifier of the network used by the target projection device 300; and the step S102 can include the following step 11.

[0213] Step 11: The server obtains the second network identifier of the network used by the target projection device based on the target device identifier in the registration information sent by the target projection device.

[0214] In the specific implementation, the registration information of the target projection device 300 can include the target device identifier of the target projection device 300 and the second network identifier of the network used by the target projection device 300.

[0215] In this way, after the server 100 receives the registration information sent by the target projection device 300, the server 100 can store the registration information of the target projection device 300. In this way, when the server 100 receives the target device identifier sent by the application device 200, the server 100 can determine the second network identifier of the network used by the target projection device 300 in the registration information of the target projection device 300 based on the target device identifier.

[0216] Optionally, when the device identifier of the target projection device 300 and / or the network used by the target projection device 300 changes, the registration information can be updated accordingly, and the original registration information cannot correspond to the target projection device. Therefore, the server needs to receive the updated registration information and re-register.

[0217] Optionally, in a specific implementation, the device description file set of the target projection device can include service information and instruction information supported by the target projection device 300; and the target instruction template is generated by the server 100 based on the device description file set sent by the target projection device 300.

[0218] In the specific implementation, the device description file set of the target projection device 300 can include service information and instruction information supported by the target projection device 300.

[0219] In this way, the target screen projection device 300 can send the device description file set to the server 100, so that the server 100 can receive the device description file set, parse the device description file set, and generate a target instruction template corresponding to the target screen projection device 300 based on the registration information and the device description file set.

[0220] The service information is the Service information of the target screen projection device 300, and specifically can include service type, service port, service URL (Uniform Resource Locator), and the like. The instruction information is an Action list of the target screen projection device 300, and specifically includes Action name, parameter return, parameter unit, parsing method, supported MIME (Multipurpose Internet Mail Extensions), and Action URL (Action URL address) relative path, and the like.

[0221] S103: The server 100 determines whether the application device 200 and the target screen projection device 300 are in the same intranet based on the first network identifier and the second network identifier, and sends the determination result to the application device 200.

[0222] The server 100 can determine whether the application device 200 and the target screen projection device 300 are in the same intranet based on the first network identifier and the second network identifier, obtain a determination result, and send the determination result to the application device 200. The determination of whether the application device 200 and the target screen projection device 300 are in the same intranet is a determination of whether the intranet used by the network used by the application device 200 and the target screen projection device 300 is the same.

[0223] Generally, whether multiple devices are in the same space can be determined by determining whether the external network IP used by the multiple devices is the same. For example, by determining the external network IP currently used by a device, it can be determined whether the device is currently in a company or in a home. However, due to the existence of shared Internet access, for example, multiple users in a certain cell use the same independent public network. In this case, the independent public network used by the multiple users is the same, and the external network IP of the devices used by the multiple users is the same, and it is not possible to determine whether the multiple devices are in the same space. Based on this, when determining whether multiple devices are in the same space, it is necessary to determine whether the external network IP and the intranet IP are the same. When the external network IP and the intranet IP are the same, it can be determined that the independent public network and the WLAN network used by the multiple devices are the same, and further, it can be determined that the multiple devices are in the same space.

[0224] Based on this, the server 100 can determine whether the internal network IP of the network used by the application device 200 and the internal network IP of the network used by the target screen projection device 300 are the same, and whether the external network IP of the network used by the application device 200 and the external network IP of the network used by the target screen projection device 300 are the same when judging whether the application device 200 and the target screen projection device 300 are in the same internal network.

[0225] The server 100 can first judge whether the external network IP in the first network identifier and the external network IP in the second network identifier are the same.

[0226] If the external network IP in the first network identifier and the external network IP in the second network identifier are different, the application device 200 and the target screen projection device 300 are not in the same external network, and further, it is determined that the application device 200 and the target screen projection device 300 are not in the same internal network.

[0227] If the external network IP in the first network identifier and the external network IP in the second network identifier are the same, it is determined that the application device 200 and the target screen projection device 300 are in the same external network, and further, the internal network IP in the first network identifier and the mask of the first network identifier are ANDed, and the internal network IP in the second network identifier and the mask of the first network identifier are ANDed. Then, it is judged whether the two operation results are the same. If the operation results are the same, the application device 200 and the target screen projection device 300 are in the same internal network, otherwise, the application device 200 and the target screen projection device 300 are not in the same internal network.

[0228] For example, the network used by the application device 200 is external network A and internal network C, the network used by the target screen projection device 300 is external network B and internal network D, and the external network used by the application device 200 is different from the external network used by the target screen projection device 300, so the application device 200 and the target screen projection device 300 are not in the same internal network.

[0229] The network used by the application device 200 is external network A and internal network D, where the IP of the internal network D is E and the mask is F. The network used by the target screen projection device 300 is external network A and internal network D, where the IP of the internal network D is E and the mask is H. The external network used by the application device 200 is the same as the external network used by the target screen projection device 300, the internal network IP and the mask of the application device 200 are ANDed, the operation result is P, the internal network IP and the mask of the target screen projection device 300 are ANDed, the operation result is Q, and the two operation results are different, so the application device 200 and the target screen projection device 300 are not in the same internal network.

[0230] The network used by the application device 200 is the external network A and the internal network D, wherein the IP of the internal network D is E and the mask is F. The network used by the target screen projection device 300 is the external network A and the internal network D, wherein the IP of the internal network D is E and the mask is F. The external network used by the application device 200 is the same as the external network used by the target screen projection device 300, the internal network IP and the mask of the application device 200 are subjected to an AND operation, and the operation result is P; the internal network IP and the mask of the target screen projection device 300 are subjected to an AND operation, and the operation result is P; the two operation results are the same, and the application device 200 and the target screen projection device 300 are in the same internal network.

[0231] Further, after obtaining the above determination result, the server 100 can send the above determination result to the application device 200.

[0232] S104: The application device 200 receives the target instruction template and the determination result sent by the server 100, generates a control instruction about the to-be-screen-projected applet based on the target instruction template, and sends the control instruction to the target screen projection device 300 along the link corresponding to the determination result.

[0233] In the specific implementation manner, the application device 200 can receive the above target instruction template and the above determination result, and then generate a control instruction about the to-be-screen-projected applet supported by the target screen projection device 300 based on the target instruction template, and send the control instruction to the target screen projection device 300 along the link corresponding to the determination result.

[0234] The control information can include the screen projection content of the to-be-screen-projected applet, for example, the address of the to-be-screen-projected content; can also include control information of the screen projection content, for example, fast forwarding the screen projection content by 15 seconds or pausing the screen projection content; and can also include the screen projection content of the to-be-screen-projected applet and the control information of the screen projection content.

[0235] For example, the control information includes the play address URL of the to-be-screen-projected content in the to-be-screen-projected applet or the identifier of the video in the database, and the application device 200 generates a control instruction for screen projecting the above to-be-screen-projected content based on the above target instruction template, which is used to instruct the target screen projection device to screen project the above to-be-screen-projected content and carries the play address of the to-be-screen-projected content. The application device 200 sends the above control instruction to the target screen projection device 300 along the link corresponding to the determination result.

[0236] Optionally, the instruction content of the control instruction is used to instruct the screen projection manner of the to-be-screen-projected applet, for example, can include information used to instruct the screen projection duration and / or screen projection rule. For example, the control instruction instructs the target screen projection device to screen project the to-be-screen-projected content for 15 minutes; for another example, the screen projection rule is interval screen projection of the to-be-screen-projected content, that is, screen projection for 5 minutes, stop screen projection for 10 minutes, and then screen projection for 5 minutes.

[0237] Optionally, after completing a control task, when the application device 200 wants to use the target projection device 300 to perform a control task again on other applets, because the target instruction template of the target projection device 300 has been obtained, the target instruction template can be used to generate a control instruction, and the control instruction can be sent to the target projection device 300. Of course, the target instruction template of the target projection device 300 can also be obtained from the server 100 again by performing steps S101-S102, so as to avoid the target instruction template of the target projection device 300 obtained before being invalid.

[0238] S105: The target projection device 300 receives the control instruction, parses the control instruction based on the target instruction template received in advance, and controls the to-be-projected applet according to the parsing result.

[0239] The target projection device 300 receives the control instruction sent by the application device 200, and then can parse the control instruction based on the target instruction template sent by the server 100 in advance, obtain the control information and instruction content carried by the control instruction, parse the parsed instruction into a control instruction that can be executed by the target projection device 300 itself, and control the to-be-projected applet according to the instruction content obtained by parsing.

[0240] For example, the control information includes the address of the to-be-projected content in the database and the projection duration. The to-be-projected content is obtained from the database according to the address indicated by the control information, and the to-be-projected content is played according to the playing time indicated by the control information.

[0241] The server 100 judges whether the target projection device 300 and the application device 200 are in the same intranet based on the first network identifier and the second network identifier. The judgment result may indicate that the target projection device 300 and the application device 200 are in the same intranet, or may indicate that the target projection device 300 and the application device 200 are not in the same intranet. The transmission link of the control instruction corresponding to different judgment results is different. Based on this, based on different judgment results, the link through which the application device 200 sends the control instruction to the target projection device 300 is different.

[0242] When the judgment result indicates that the target projection device 300 and the application device 200 are not in the same intranet, the application device 200 can directly connect to the target projection device 300 through the intranet and send the control instruction to the target projection device 300. In this way, when the application device 200 wants to use the target projection device 300 to control the to-be-projected applet, the application device 200 can directly send the control instruction about the to-be-projected applet to the target projection device 300.

[0243] Optionally, in an implementation, the step S104 can include the following step 21:

[0244] Step 21: When the judgment result indicates that the application device 200 and the target projection device 300 are in the same internal network, the application device 200 sends a control instruction to the target projection device 300.

[0245] The step S105 can include the following step 22:

[0246] Step 22: The target projection device 300 receives the control instruction sent by the application device 200, analyzes the control instruction based on the target instruction template received in advance, and controls the to-be-projected applet according to the analysis result.

[0247] In the implementation, when the judgment result indicates that the application device 200 and the target projection device 300 are in the same internal network, the application device 200 can directly send the control instruction to the target projection device 300 through the internal network.

[0248] In this way, the target projection device 300 can accept the control instruction sent by the application device 200, analyze the control instruction based on the target instruction template received in advance, obtain the control information and instruction content carried by the control instruction, parse the analyzed instruction into a control instruction that can be executed by the target projection device 300 itself, and control the to-be-projected applet according to the instruction content obtained by the analysis.

[0249] When the judgment result indicates that the target projection device 300 and the application device 200 are not in the same internal network, the application device 200 cannot directly connect to the target projection device 300 through the internal network and send a control instruction to the target projection device 300. Therefore, when the application device 200 wants to use the target projection device 300 to control the to-be-projected applet, the application device 200 needs to send the control instruction to the server 100, so that the server 100 receives the control instruction sent by the application device 200 and sends the control instruction to the target projection device 300.

[0250] Optionally, in an implementation, the step S104 can include the following steps 31-32:

[0251] Step 31: When the judgment result indicates that the application device 200 and the target projection device 300 are not in the same internal network, the application device sends a control instruction to the server 100.

[0252] Step 32: The server 100 receives the control instruction sent by the application device 200 and sends the control instruction to the target projection device 300.

[0253] The step S105 can include the following step 33.

[0254] Step 33: The target screen projection device 300 receives the control instruction sent by the server 100, parses the control instruction based on the target instruction template, and controls the to-be-screen-projection applet according to the parsing result.

[0255] In the specific implementation, when the above determination result represents that the application device 200 and the target screen projection device 300 are not in the same intranet, the application device 200 can send the above control instruction to the server 100. The server 100 receives the above control instruction and sends the above control instruction to the target screen projection device 300.

[0256] Therefore, the target screen projection device 300 can receive the control instruction sent by the server 100, parse the control instruction based on the target instruction template received in advance, and control the to-be-screen-projection applet according to the parsing result.

[0257] In this way, for the application device 200 and the target screen projection device 300 that are not in the same intranet, through the interaction among the application device 200, the target screen projection device 300, and the server 100, the application device 200 can control the to-be-screen-projection applet carried by itself through the target screen projection device 300.

[0258] As can be seen above, when the to-be-screen-projection applet carried by the application device is controlled, the application device and the target screen projection device can both obtain the instruction template of the target screen projection device by means of the server, and then the application device can realize the signaling interaction with the target screen projection device without using the development platform of the to-be-screen-projection applet, thereby reducing the dependence on the development platform of the applet and improving the screen projection efficiency of the applet.

[0259] When the target screen projection device 300 is updated, for example, the target screen projection device 300 is upgraded, so that the instruction information supported by the target screen projection device 300 changes, the target screen projection device 300 can no longer support the target instruction template generated based on the instruction information sent to the server 100 last time.

[0260] Based on this, the updated instruction information supported by the target screen projection device 300 can be sent to the server 100, so that the server 100 can regenerate the target instruction template corresponding to the target screen projection device 300 based on the updated instruction information.

[0261] Optionally, in a specific implementation, the method provided by the embodiment of the application can further include the following steps 41-42.

[0262] Step 41: When detecting the update of the supported instruction information of the target casting device 300, the target casting device 300 sends the updated supported instruction information of the target casting device 300 to the server 100.

[0263] Step 42: The server 100 receives the updated supported instruction information of the target casting device 300, updates the target instruction template corresponding to the target casting device 300 based on the updated supported instruction information of the target casting device 300, and sends the updated target instruction template to the target casting device 300.

[0264] In the specific implementation, when detecting the update of the supported instruction information of the target casting device 300, the target casting device 300 can send the updated supported instruction information of the target casting device 300 to the server 100.

[0265] In this way, the server 100 can receive the updated supported instruction information of the target casting device 300 sent by the target casting device 300, and update the target instruction template corresponding to the target casting device 300 based on the updated instruction information, and update the stored correspondence between the target casting device 300 and the target instruction template.

[0266] That is, when detecting the update of the supported instruction information of the target casting device 300, the target casting device 300 can send the updated supported instruction information of the target casting device 300 to the server 100, so that the server 100 updates the supported instruction information of the target casting device 300, and updates the target instruction template corresponding to the target casting device 300 based on the updated instruction information, thereby avoiding the problem that the target casting device 300 no longer supports the target instruction template generated by the server 100 due to the update of the supported instruction information of the target casting device 300.

[0267] In the applet casting system provided by the embodiment of the application, the application device 200 can obtain the target device identifier of the target casting device 300 in multiple ways.

[0268] Optionally, in a specific implementation, the method provided by the embodiment of the application can include the following step 51:

[0269] Step 51: The target casting device 300 generates the information identifier of the target casting device based on the response information and the registration information sent by the server 100;

[0270] The response information is the response information corresponding to the control request generated by the server 100 based on the time stamp of the time point at which the control request sent by the target casting device 300 is received;

[0271] The above step S101, in which the application device 200 obtains the target device identifier of the target casting device 300, can include the following step 52:

[0272] Step 52: The application device 200 obtains the target device identifier of the target projection device 300 based on the information identifier of the target projection device 300.

[0273] In the specific implementation, the target projection device 300 can send a control request to the server 100. Thus, the server 100 can receive the control request sent by the target projection device 300, determine a timestamp of the time when the control request is received, generate response information of the control request corresponding to the target projection device 300 based on the timestamp, and send the response information to the target projection device 300.

[0274] The target projection device 300 can receive the response information and generate the identification information of the target projection device 300 based on the response information and the registration information of the target projection device 300. Thus, the application device 200 can obtain the target device identifier of the target projection device 300 through the identification information of the target projection device 300.

[0275] The timestamp is used to authenticate the time when the control request is received, and determine that the response information corresponding to the control request is valid within a preset time after the time when the server 100 receives the control request. The preset time can be set according to actual needs, which can be one hour, one day, or one week, and all of them are reasonable, which is not limited in the embodiment of the application.

[0276] The control request can be a Session request or other control request program. For example, the target projection device 300 sends a Session request to the server 100 after being online, the server 100 receives the Session request, records the time when the Session request is received, generates a Session for the Session request based on the timestamp of the time when the server 100 receives the Session request, and sets the preset time as one day to ensure that the Session is valid within one day after the time when the server 100 receives the control request.

[0277] Thus, by setting the preset time, it can be ensured that the response information sent by the server 100 to the target projection device 300 is valid within the preset time, and the target projection device 300 is prevented from being stolen outside the preset time.

[0278] Meanwhile, the response information is stored in the server 100, and the corresponding relationship between the response information and the target projection device 300 is established. For example, the server 100 establishes the corresponding relationship between the response information and the target projection device 300 after generating the response information of the target projection device 300, and records the corresponding relationship in the projection device list.

[0279] The information identifier can include the response information, a second network identifier, and a target device identifier.

[0280] The information identifier can be a two-dimensional code corresponding to the target screen projection device 300, or a communication identifier in a communication mode such as NFC (Near Field Communication), WiFi P2P (Wi-Fi Peer-To-Peer), or the like. In this way, the application device 200 can obtain the information identifier of the target screen projection device 300 by scanning the two-dimensional code of the target screen projection device 300, or by communication interaction in the form of NFC, WiFi P2P, or the like, and further obtain the device identifier of the target screen projection device 300 by obtaining the information identifier of the target screen projection device 300. In this way, when a target screen projection device 300 is selected by the user, the target device identifier of the target screen projection device 300 can be obtained in the above manner.

[0281] Optionally, in a specific implementation, the information identifier includes a two-dimensional code.

[0282] The step 52 can further include a step 521 of:

[0283] The step 521 includes a step of obtaining the target device identifier of the target screen projection device 300 by scanning the two-dimensional code of the target screen projection device 300.

[0284] In the specific implementation, when the identifier information includes a two-dimensional code, the application device 200 can obtain the target device identifier of the target screen projection device 300 by scanning the two-dimensional code of the target screen projection device 300.

[0285] The target screen projection device 300 can generate a two-dimensional code based on the response information sent by the server 100, the response information, a second network identifier of a network used by the target screen projection device 300, and a target device identifier of the target screen projection device 300, so that the application device 200 can scan the two-dimensional code to obtain the target device identifier of the target screen projection device 300.

[0286] Since the response information is generated by the server 100 based on the time stamp of the time when the control request of the target screen projection device 300 is received, it is valid within a preset time. Therefore, when the preset time is exceeded, the response information will be invalid, and the control relationship between the server 100 and the target screen projection device 300 can be invalid.

[0287] Based on this, before the server 100 judges whether the application device 200 and the target screen projection device 300 are in the same intranet based on the first network identifier and the second network identifier, it is also necessary to determine whether the response information corresponding to the target screen projection device 300 is valid.

[0288] Optionally, in a specific implementation, before the server 100 judges whether the application device 200 and the target screen projection device 300 are in the same intranet based on the first network identifier and the second network identifier in the above step S103, the method can further include the following steps 61-62:

[0289] Step 61: The server 100 acquires the response information corresponding to the target screen projection device 300 based on the target device identifier, judges whether the response information is valid, and if so, executes step 62.

[0290] Step 62: If the response information corresponding to the target screen projection device 300 is valid, the server 100 judges whether the application device 200 and the target screen projection device 300 are in the same intranet based on the first network identifier and the second network identifier.

[0291] In this specific implementation, before the server 100 judges whether the application device 200 and the target screen projection device 300 are in the same intranet based on the first network identifier of the network used by the application device 200 and the second network identifier of the network used by the target screen projection device 300, it can first find the response information corresponding to the target screen projection device 300 in the screen projection device list according to the target device identifier of the target screen projection device 300, and then judge whether the response information is valid according to the timestamp of the response information.

[0292] That is, after the server 100 acquires the target device identifier of the target screen projection device 300, it can first find the response information corresponding to the target screen projection device 300 according to the target device identifier, and judge whether the response information is valid, determine whether the target screen projection device 300 has expired or is stolen, and further judge whether the application device 200 and the target screen projection device 300 are in the same intranet when the response information corresponding to the target screen projection device 300 is valid.

[0293] When the network and / or device identifier used by the target screen projection device 300 changes, the registration information sent by the target screen projection device 300 to the server 100 can be inconsistent with the current registration information of the target screen projection device 300, and then the target device identifier of the target screen projection device 300 obtained by the application device 200 can be inconsistent with the registration information of the target screen projection device 300 in the server 100. In this way, the registration information of the target screen projection device 300 in the server 100 based on the target device identifier sent by the application device 200 can not exist. Based on this, after the server 100 judges that the response information corresponding to the target screen projection device 300 is valid, before judging whether the application device 200 and the target screen projection device 300 are in the same intranet based on the first network identifier and the second network identifier, it is also necessary to determine whether the registration information of the target screen projection device 300 exists.

[0294] Optionally, in a specific implementation, before the step S103, the server 100 judges whether the application device 200 and the target screen projection device 300 are in the same intranet based on the first network identifier and the second network identifier, can also include the following steps 71-72:

[0295] Step 71: The server 100 determines whether the registration information of the target screen projection device 300 exists based on the target device identifier; if yes, execute step 72:

[0296] Step 72: If the registration information of the target screen projection device 300 exists, the server 100 judges whether the application device 200 and the target screen projection device 300 are in the same intranet based on the first network identifier and the second network identifier.

[0297] In the specific implementation, after the server 100 determines that the response information corresponding to the target screen projection device 300 is valid based on the first network identifier of the network used by the application device 200 and the second network identifier of the network used by the target screen projection device 300, before judging whether the application device 200 and the target screen projection device 300 are in the same intranet, the server 100 searches the registration information of the target screen projection device 300 in the corresponding relationship between the target screen projection device 300 and the registration information stored in the server 100 according to the target device identifier of the target screen projection device 300 obtained, and determines whether the registration information of the target screen projection device 300 exists.

[0298] That is, after the server 100 acquires the target device identifier of the target screen projection device 300 and determines that the response information corresponding to the target screen projection device 300 is valid, the server 100 can need to search for the registration information of the target screen projection device 300 in the correspondence between the target screen projection device 300 and the registration information stored in the server according to the target device identifier, to determine whether the registration information exists. After it is determined that the response information corresponding to the target screen projection device 300 is valid and the registration information of the target screen projection device 300 exists, based on the first network identifier of the network used by the application device 200 and the second network identifier of the network used by the target screen projection device 300, it is further determined whether the application device 200 and the target screen projection device 300 are in the same intranet.

[0299] Generally, the screen projection device can be used for screen projection only when the screen projection device is online. Based on this, for each screen projection device registered in the server 100, the server 100 can determine the online state of the screen projection device, and then, when the online state of the screen projection device is the online state, the screen projection device can be used for screen projection.

[0300] The server 100 can determine the online state of the screen projection device in multiple ways, for example, the server 100 determines the online state of each screen projection device through a heartbeat mechanism.

[0301] The heartbeat mechanism, as a mechanism for ensuring the validity of the connection by sending a heartbeat packet, can generally be used by any of the two devices in communication to inform the other device that it is still online, or to detect whether the other device is online.

[0302] Optionally, in a specific implementation, the method provided by the embodiment of the application can further include steps 81-84:

[0303] Step 81: The target screen projection device 300 sends an online notification to the server 100 when it is online.

[0304] Step 82: The server 100 receives the online notification sent by the target screen projection device 300, updates the online state of the target screen projection device 300 to the online state, and sends a preset heartbeat sending interval to the target screen projection device 300.

[0305] Step 83: The target screen projection device 300 receives the preset heartbeat sending interval and sends a heartbeat packet to the server 100 according to the preset heartbeat sending interval.

[0306] Step 84: The server 100 receives the heartbeat packet, and if no heartbeat packet sent by the target screen projection device 300 is received within the preset heartbeat sending interval, updates the online state of the target screen projection device 300 to the offline state.

[0307] In the specific implementation, when the target screen projection device 300 is online, an online notification is sent to the server 100. In this way, after receiving the online notification sent by the target screen projection device 300, the server 100 can update the online state of the target screen projection device 300 to the online state. At the same time, a preset heartbeat sending interval is sent to the target screen projection device 300. The preset heartbeat sending interval can be set according to actual needs, which can be 5 seconds or 1 minute, and both are reasonable, and the embodiment of the application does not make specific limitation.

[0308] After receiving the preset heartbeat sending interval sent by the server 100, the target screen projection device 300 sends a heartbeat packet to the server 100 according to the preset heartbeat sending interval. The heartbeat packet can be set according to actual needs, which can be a device online message or a subscription update message, and both are reasonable, and the embodiment of the application does not make specific limitation.

[0309] In the case that the target screen projection device 300 is online, the target screen projection device 300 sends a heartbeat packet to the server 100 according to the preset heartbeat sending interval.

[0310] For example, the heartbeat sending interval is 5 seconds, and the heartbeat packet is a subscription update message. The target screen projection device 300 can send a subscription update message to the server 100 every 5 seconds, and the server 100 receives the subscription update message sent by the target screen projection device 300 to determine that the online state of the target screen projection device 300 is the online state.

[0311] The server 100 receives the heartbeat packet sent by the target screen projection device 300 and determines the online state of the target screen projection device 300 based on the preset heartbeat sending interval. If the heartbeat packet sent by the target screen projection device 300 according to the heartbeat sending interval is received, it is considered that the online state of the target screen projection device 300 is the online state; if the heartbeat packet sent by the target screen projection device 300 according to the heartbeat sending interval is not received, it is considered that the online state of the target screen projection device 300 is the offline state, and then the online state of the target screen projection device 300 is updated to the offline state.

[0312] In this way, the server 100 can determine the online state of the target screen projection device 300 by whether the heartbeat packet sent by the target screen projection device 300 is received within the preset heartbeat sending interval, and then when the online state of the target screen projection device 300 changes, the online state of the target screen projection device 300 can be updated in time.

[0313] Optionally, in a specific implementation, the step S101 of obtaining the target device identifier of the target screen projection device by the application device can include the following steps 91-92:

[0314] Step 91: The application device 200 acquires the screen projection device list and the online state of the screen projection device from the server 100;

[0315] Step 92: When detecting the selection operation of the target screen projection device 300 sent by the user according to the screen projection device list and the online state of the screen projection device, the target device identifier of the target screen projection device 300 is acquired.

[0316] In the specific implementation, when the application device 200 needs to project the applet, the application device 200 can send a screen projection device list acquisition request to the server 100. The server 100 receives the screen projection device list acquisition request and sends the screen projection device list and the online state of each screen projection device to the application device 200.

[0317] The application device 200 receives the screen projection device list and the online state of the screen projection device sent by the server 100. The user can select the screen projection device meeting the use requirement of the screen projection as the target screen projection device 300 by checking the screen projection device list and the online state of the screen projection device. When the user selects the target screen projection device 300, the application device 200 determines the target screen projection device 300 according to the selection operation of the user and acquires the target device identifier of the target screen projection device 300 based on the screen projection device list.

[0318] When the screen projection device does not send the heartbeat packet to the server 100 according to the preset heartbeat sending interval, the server 100 can update the online state of the screen projection device. Thus, the online state of the screen projection device in the screen projection device list in the server 100 can be inconsistent with the online state of the screen projection device sent by the server 100 to the application device 200. The online state of the screen projection device in the application device 200 needs to be updated to avoid that the user using the application device 200 cannot select the appropriate target screen projection device 300.

[0319] Optionally, in one specific implementation, the method for projecting the applet provided in the embodiment of the application can further include steps 101-102 as follows:

[0320] Step 101: After updating the online state of the target screen projection device 300, the server 100 sends the push information about updating the online state of the target screen projection device 300 to the application device 200;

[0321] Step 102: The application device 200 receives the push information sent by the server 100 and updates the online state of the target screen projection device 300 according to the push message.

[0322] In the specific implementation, based on the heartbeat mechanism, when the server 100 does not receive the heartbeat packet from the target screen projection device 300 within the preset heartbeat sending interval, the server 100 determines that the online state of the target screen projection device 300 changes, and the online state changes to the offline state. Therefore, the server 100 updates the online state of the target screen projection device 300 to the offline state. Similarly, if the target screen projection device 300 is originally in the offline state, when the target screen projection device 300 is online and sends the online notification to the server 100, the server 100 receives the online notification and updates the online state of the target screen projection device 300 to the online state.

[0323] Based on the heartbeat mechanism, if the server 100 detects that the online state of the target screen projection device 300 changes, the server 100 can update the online state of the target screen projection device 300. If the application device 200 is online, when the server 100 detects that the online state of the target screen projection device 300 changes, the server 100 sends a push message about updating the online state of the target screen projection device 300 to the application device 200. The push message is used to prompt the application device 200 to update the online state of the target screen projection device 300 in the screen projection device list obtained previously. The sending manner of the push message can be that the server 100 sends the push message to the platform provider of the application device 200, and then the platform provider forwards the push message to the application system of the application device 200. The application system pushes the push message to the application device 200 in which the small program to be projected is installed through the push notification.

[0324] After the application device 200 receives the push message, the application device 200 determines the target screen projection device 300 corresponding to the push message according to the push message, and updates the online state of the target screen projection device 300.

[0325] Optionally, in an implementation, when the user selects the target screen projection device 300, only the screen projection device in the online state can be displayed, that is, if the online state of the screen projection device is updated from the online state to the offline state, the screen projection device is not displayed when the user views the device list; if the online state of the screen projection device is updated from the offline state to the online state, the screen projection device can be displayed when the user views the device list.

[0326] In order to facilitate understanding of the interaction process of the server 100, the application device 200 and the target screen projection device 300 in the small program screen projection method, the interaction process is described in combination with Figure 3 , Figure 4 and Figure 5 .

[0327] As Figure 3As shown, Phone is an application device carrying a small program to be cast, and the TV end is the target casting device. The TV end opens the casting service, sends the registration information containing the TV end device ID, the external network IP and the internal network IP of the network used by the TV end to the server, and uploads the device description file set to the server.

[0328] The server receives the device description file set uploaded by the TV end, parses the device description file set, and obtains the parsing result Device (device description file). The Device contains Service0, Service1 and other service information of the TV end. The functions of the TV end represented by each service information are different, and each service information contains an Action list. Based on the Action list, the Action template corresponding to the TV end can be generated, and based on the parsing result, the Soap template supported by the TV end can be generated.

[0329] The TV end requests Session from the server, and the server generates the Session corresponding to the TV end based on the request and returns the Session to the TV end. The TV end obtains the Session and generates a two-dimensional code or other device identifier based on the Session. The Phone obtains the device identifier and other information from the TV end through scanning code / NFC / WIFI P2P and other methods. The TV end returns the Session, the TV end device ID, the internal network IP and the external network IP used by the TV end to the Phone. The server receives the Session, the TV end device ID, the internal network IP and the external network IP used by the TV end returned by the TV end. The Phone sends the Session, the TV end device ID, the internal network IP and the external network IP used by the TV end, and the internal network IP, the external network IP and the device ID of the Phone to the server, and requests pairing from the server. The server receives the Session, the TV end device ID, the internal network IP and the external network IP used by the TV end, and the internal network IP, the external network IP and the device ID of the Phone sent by the Phone, and then judges whether the Session is valid based on the Session. If the Session is valid, the TV device is searched in the casting device list according to the TV end device ID, the external network IP and the internal network IP used by the TV end, and the device ID of the Phone, and it is checked whether the registration information of the TV device exists.

[0330] The registration information of the above television device exists, and then it is judged whether the intranet IP and the extranet IP used by the television end and the intranet IP and the extranet IP used by the Phone match. If the judgment result represents that the television end and the Phone match, the Phone and the television end pairing succeeds, and the pairing success information is returned to the Phone. The Phone requests the television end supported Soap template corresponding to the television end from the server, and the server returns the instruction template of the television device to the Phone.

[0331] As shown in Figure 4 When the television end device starts the screen projection service, the television end sends the television end device online notification to the server and subscribes to the device keep-alive service of the server. The server receives the above online notification, updates the online state state of the television end device to online, and returns the subscription update information sending interval t to the television end. The television end receives the above subscription update information sending interval t, and sends the subscription update information to the server based on the above sending interval t. If the television end does not send the subscription update information beyond the sending interval t, the server updates the online state state of the television end device to offline, and returns the device offline notification to the television end.

[0332] The Phone applet APP starts, and registers the push service of the server. The Phone obtains the extranet IP and intranet IP of the network used by the television end based on the cached screen projection device list, and sends the device ID of the television end, the extranet IP and intranet IP of the network used by the television end, and the device ID of the Phone, the extranet IP and intranet IP of the network used by the Phone to the server. The server receives the above information, judges whether the Phone and the television end are in the same intranet, and then sends the push message of the above judgment information and the online state of the television end device to the IOS platform where the Phone is located. The IOS APNS receives the above push message, and pushes the push message to the applet device through the system Push. When the applet APP exits, the above push service is unregistered from the server.

[0333] As shown in Figure 5As shown, when the server judges that the Phone and the television terminal are in the same intranet based on the device ID of the television terminal, the external network IP and the intranet IP of the network used, and the device ID, the external network IP and the intranet IP of the network used of the server, the applet requests the Soap template corresponding to the television terminal from the server, and the server returns the Soap template corresponding to the television terminal to the Phone. The applet splices the screen projection parameters of the content to be projected in the Soap template, for example, splices the video address and the screen projection instruction. And sends the Soap screen projection instruction to the television terminal through the fetch general command. The television terminal receives the Soap screen projection command, analyzes the Soap screen projection value, and projects the applet to be projected according to the analysis result.

[0334] Figure 6 A small program screen projection method is provided for the embodiment of the application, which is applied to a server in a small program screen projection system; the above-mentioned system further comprises an application device and a target screen projection device; wherein the application device is a device carrying an applet to be projected; as Figure 6 As shown, the method can comprise the following steps S601-S602:

[0335] S601: receiving the target device identifier of the target screen projection device and the first network identifier of the network used by the application device sent by the application device, obtaining the second network identifier of the network used by the target screen projection device based on the target device identifier, and determining the target instruction template corresponding to the target screen projection device, and sending the target instruction template to the application device, so that the application device receives the target instruction template and generates a control instruction about the applet to be projected based on the target instruction template; wherein the target instruction template is generated by the server based on the registration information sent by the target screen projection device and the instruction information supported by the target screen projection device;

[0336] S602: judging whether the application device and the target screen projection device are in the same intranet based on the first network identifier and the second network identifier, and sending the judgment result to the application device, so that the application device receives the judgment result, sends the control instruction to the target screen projection device along the link corresponding to the judgment result, so that the target screen projection device receives the control instruction, analyzes the control instruction based on the target instruction template received in advance, and controls the applet to be projected according to the analysis result.

[0337] When the applet to be projected is controlled, the screen projection device which is expected to be used to control the applet to be projected can be determined first, and the screen projection device is taken as the target screen projection device. In this way, the application device can obtain the target device identifier of the target screen projection device, and send the target device identifier and the first network identifier of the network used by the application device to the server.

[0338] The server can receive the target device identifier and the first network identifier of the network used by the application device, and then acquire the second network identifier of the network used by the target screen projection device based on the target device identifier, and determine the target instruction template corresponding to the target screen projection device based on the target device identifier. In this way, after the server determines the target instruction template corresponding to the target screen projection device 300, the server can send the target instruction template to the application device. In this way, the application device can generate the control instruction for the to-be-screen-projected applet based on the target instruction template of the target screen projection device received by the application device.

[0339] Then, the server can determine whether the application device and the target screen projection device are in the same intranet based on the first network identifier and the second network identifier, and send the determination result to the application device. In this way, the application device can receive the determination result, and send the control instruction to the target screen projection device along the link corresponding to the determination result. Thus, the target screen projection device can receive the control instruction, parse the control instruction based on the target instruction template received in advance, and control the to-be-screen-projected applet according to the parsing result.

[0340] As can be seen from the above, when the to-be-screen-projected applet carried by the application device is controlled, the application device and the target screen projection device can both acquire the instruction template of the target screen projection device with the help of the server, and then the application device can realize signaling interaction with the target screen projection device without using the development platform of the to-be-screen-projected applet, thereby reducing the dependence on the development platform of the applet and improving the screen projection efficiency of the applet.

[0341] Optionally, in a specific implementation manner, the method further includes:

[0342] receiving the control instruction sent by the application device to the server in the case where the determination result indicates that the application device and the target screen projection device are not in the same intranet, and sending the control instruction to the target screen projection device, so that the target screen projection device receives the control instruction sent by the server, parses the control instruction based on the target instruction template, and controls the to-be-screen-projected applet according to the parsing result.

[0343] Optionally, in a specific implementation manner, the registration information includes a device identifier of the target screen projection device and a second network identifier of the network used by the target screen projection device.

[0344] The acquiring of the second network identifier of the network used by the target screen projection device based on the target device identifier includes:

[0345] Based on the target device identifier, a second network identifier of a network used by the target screen projection device is acquired from the registration information sent by the target screen projection device.

[0346] Optionally, in a specific implementation, the device description file set of the target screen projection device includes service information supported by the target screen projection device and the instruction information; and the target instruction template is generated by the server based on the received device description file set sent by the target screen projection device.

[0347] Optionally, in a specific implementation, the method further includes:

[0348] Based on a time stamp of a time point when the received control request sent by the target screen projection device is received, response information corresponding to the control request is generated;

[0349] The response information is sent to the target screen projection device, so that the target screen projection device generates an information identifier of the target screen projection device based on the response information and the registration information, so that the application device acquires a target device identifier of the target screen projection device based on the information identifier.

[0350] Optionally, in a specific implementation, before step S602, based on the first network identifier and the second network identifier, it is judged whether the application device and the target screen projection device are in the same intranet, and the method further includes:

[0351] Based on the target device identifier, response information corresponding to the target screen projection device is acquired, and it is judged whether the response information is valid;

[0352] If the response information corresponding to the target screen projection device is valid, based on the first network identifier and the second network identifier, it is judged whether the application device and the target screen projection device are in the same intranet.

[0353] Optionally, in a specific implementation, before step S602, based on the first network identifier and the second network identifier, it is judged whether the application device and the target screen projection device are in the same intranet, and the method further includes:

[0354] Based on the target device identifier, it is determined whether the registration information of the target screen projection device exists;

[0355] If the registration information of the target screen projection device exists, based on the first network identifier and the second network identifier, it is judged whether the application device and the target screen projection device are in the same intranet.

[0356] Optionally, in a specific implementation, the method further includes:

[0357] receiving the online notification sent by the target screen projection device, updating the online state of the target screen projection device to the online state, and sending a preset heartbeat sending interval to the target screen projection device, so that the target screen projection device receives the preset heartbeat sending interval and sends the heartbeat packet to the server according to the preset heartbeat sending interval;

[0358] receiving the heartbeat packet, and updating the online state of the target screen projection device to the offline state if the heartbeat packet sent by the target screen projection device is not received within the preset heartbeat sending interval.

[0359] Optionally, in a specific implementation manner, the method further includes:

[0360] sending a screen projection device list and an online state of a screen projection device to the application device, so that the application device acquires the screen projection device list and the online state of the screen projection device, and acquires a target device identifier of a target screen projection device when detecting a selection operation about the target screen projection device sent by a user according to the screen projection device list and the online state of the screen projection device.

[0361] Optionally, in a specific implementation manner, the method further includes:

[0362] after updating the online state of the target screen projection device, sending push information about updating the online state of the target screen projection device to the application device, so that the application device receives the push information sent by the server and updates the online state of the target screen projection device according to the push message.

[0363] Optionally, in a specific implementation manner, the method further includes:

[0364] receiving updated instruction information supported by the target screen projection device, updating a target instruction template corresponding to the target screen projection device based on the updated instruction information supported by the target screen projection device, and sending the updated target instruction template to the target screen projection device, wherein the updated instruction information supported by the target screen projection device is sent by the target screen projection device to the server when detecting that the instruction information supported by the target screen projection device is updated.

[0365] The specific implementation manners of the above method are the same as those of the method for projecting a small program applied to a small program screen projection system provided by the embodiments of the application, and will not be described herein again.

[0366] Figure 7A small program screen projection method is provided for an application device in a small program screen projection system. The system also includes a server and a target screen projection device. The application device is a device that carries a small program to be projected. As shown in the accompanying drawings, the method can include the following steps S701-S702. Figure 7

[0367] S701: Obtain a target device identifier of the target screen projection device, and send the target device identifier and a first network identifier of a network used by the application device to the server, so that the server receives the target device identifier and the first network identifier, obtains a second network identifier of a network used by the target screen projection device based on the target device identifier, determines a target instruction template corresponding to the target screen projection device, judges whether the application device and the target screen projection device are in the same intranet based on the first network identifier and the second network identifier, and sends the target instruction template and the judgment result to the application device. The target instruction template is generated by the server based on registration information sent by the target screen projection device and instruction information supported by the target screen projection device.

[0368] S702: Receive the target instruction template and the judgment result sent by the server, generate a control instruction for the small program to be projected based on the target instruction template, and send the control instruction to the target screen projection device along a link corresponding to the judgment result, so that the target screen projection device receives the control instruction, analyzes the control instruction based on the target instruction template received in advance, and controls the small program to be projected according to the analysis result.

[0369] When the small program to be projected is controlled, the screen projection device that is expected to be used to control the small program to be projected can be determined first, and the screen projection device is taken as the target screen projection device. In this way, the application device can obtain the target device identifier of the target screen projection device, and send the target device identifier and a first network identifier of a network used by the application device to the server.

[0370] In this way, the server can receive the target device identifier and the first network identifier of the network used by the application device. Then, the server can obtain the second network identifier of the network used by the target screen projection device and the target instruction template corresponding to the target screen projection device based on the target device identifier. Then, the server can judge whether the application device and the target screen projection device are in the same intranet based on the first network identifier and the second network identifier, and send the judgment result to the application device. The target instruction template and the judgment result are also sent to the application device.

[0371] Then, the application device can receive the target instruction template and the judgment result, generate a control instruction for the small program to be projected based on the target instruction template of the target screen projection device received, and send the control instruction to the target screen projection device along a link corresponding to the judgment result. ​

[0372] Thus, the target screen projection device can receive the control instruction, parse the control instruction based on the target instruction template received in advance, and control the to-be-screened applet according to the parsing result.

[0373] As can be seen from the above, when the to-be-screened applet carried by the application device is controlled, the application device and the target screen projection device can both acquire the instruction template of the target screen projection device by means of the server, and then the application device can realize signaling interaction with the target screen projection device without using the development platform of the to-be-screened applet, thereby reducing the dependence on the development platform of the applet and improving the screen projection efficiency of the applet.

[0374] Optionally, in a specific implementation, the step S702 of sending the control instruction to the target screen projection device along the link corresponding to the judgment result comprises:

[0375] In the case where the judgment result indicates that the application device and the target screen projection device are in the same internal network, the control instruction is sent to the target screen projection device, so that the target screen projection device receives the control instruction sent by the application device, parses the control instruction based on the target instruction template received in advance, and controls the to-be-screened applet according to the parsing result.

[0376] Optionally, in a specific implementation, the step S702 of sending the control instruction to the target screen projection device along the link corresponding to the judgment result comprises:

[0377] In the case where the judgment result indicates that the application device and the target screen projection device are not in the same internal network, the control instruction is sent to the server, so that the server receives the control instruction sent by the application device and sends the control instruction to the target screen projection device, so that the target screen projection device receives the control instruction sent by the server, parses the control instruction based on the target instruction template, and controls the to-be-screened applet according to the parsing result.

[0378] Optionally, in a specific implementation, the device description file set of the target screen projection device includes service information supported by the target screen projection device and the instruction information.

[0379] The target instruction template is generated by the server based on the device description file set sent by the target screen projection device.

[0380] Optionally, in a specific implementation, the target device identifier of the target screen projection device is acquired by:

[0381] Based on the information identification of the target screen projection device, a target device identification of the target screen projection device is acquired, wherein the information identification is generated by the target screen projection device based on the response information sent by the server and the registration information; the response information is response information corresponding to the control request generated by the server based on a time stamp of a time point at which the control request sent by the target screen projection device is received.

[0382] Optionally, in a specific implementation manner, the information identification comprises a two-dimensional code.

[0383] Based on the information identification of the target screen projection device, a target device identification of the target screen projection device is acquired, comprising:

[0384] The target device identification of the target screen projection device is acquired by scanning the two-dimensional code.

[0385] Optionally, in a specific implementation manner, the step S701 of acquiring the target device identification of the target screen projection device comprises:

[0386] A screen projection device list and an online state of a screen projection device are acquired from the server.

[0387] When a selection operation about a target screen projection device sent by a user according to the screen projection device list and the online state of the screen projection device is detected, a target device identification of the target screen projection device is acquired.

[0388] Optionally, in a specific implementation manner, the method further comprises:

[0389] Push information sent by the server about updating the online state of the target screen projection device is received, and the online state of the target screen projection device is updated according to the push message, wherein the push message is sent by the server to the application device after updating the online state of the target screen projection device.

[0390] The specific implementation manners of the method are the same as those of the small program screen projection method applied to the small program screen projection system provided by the embodiments of the application, and thus are not described herein again.

[0391] Based on the same inventive concept, corresponding to the small program screen projection method provided by the embodiments of the application shown in the above Figure 6 Based on the same inventive concept, corresponding to the small program screen projection method provided by the embodiments of the application shown in the above

[0392] Figure 8 A structural schematic diagram of a small program screen projection device provided by the embodiments of the application is shown in FIG. 1. As shown in FIG. 1, the small program screen projection device comprises a server 100 and an application device 200.Figure 8 As shown, the apparatus can include the following modules:

[0393] The receiving module 810 is configured to receive the target device identifier of the target screen projection device and the first network identifier of the network used by the application device sent by the application device, acquire the second network identifier of the network used by the target screen projection device based on the target device identifier, determine the target instruction template corresponding to the target screen projection device, send the target instruction template to the application device, so that the application device receives the target instruction template and generates the control instruction about the to-be-screen-projected applet based on the target instruction template; wherein the target instruction template is generated by the server based on the received registration information sent by the target screen projection device and the instruction information supported by the target screen projection device.

[0394] The determining module 820 is configured to determine whether the application device and the target screen projection device are in the same intranet based on the first network identifier and the second network identifier, send the determination result to the application device, so that the application device receives the determination result, sends the control instruction to the target screen projection device along the link corresponding to the determination result, so that the target screen projection device receives the control instruction, analyzes the control instruction based on the target instruction template received in advance, and controls the to-be-screen-projected applet according to the analysis result.

[0395] As can be seen from the above, when the to-be-screen-projected applet carried by the application device is controlled, the application device and the target screen projection device can both acquire the instruction template of the target screen projection device with the help of the server, and then the application device can realize signaling interaction with the target screen projection device without using the development platform of the to-be-screen-projected applet, so that the dependence on the development platform of the applet can be reduced and the screen projection efficiency of the applet can be improved.

[0396] Optionally, in a specific implementation manner, the apparatus further includes:

[0397] The instruction receiving module is configured to receive the control instruction sent by the application device to the server in the case where the determination result indicates that the application device and the target screen projection device are not in the same intranet, and send the control instruction to the target screen projection device, so that the target screen projection device receives the control instruction sent by the server, analyzes the control instruction based on the target instruction template, and controls the to-be-screen-projected applet according to the analysis result.

[0398] Optionally, in a specific implementation manner, the registration information includes the device identifier of the target screen projection device and the second network identifier of the network used by the target screen projection device.

[0399] The receiving module 810 is specifically configured to:

[0400] Based on the target device identifier, the second network identifier of the network used by the target screen projection device is acquired from the registration information sent by the target screen projection device.

[0401] Optionally, in a specific implementation, the device description file set of the target screen projection device includes service information supported by the target screen projection device and the instruction information; and the target instruction template is generated by the server based on the received device description file set sent by the target screen projection device.

[0402] Optionally, in a specific implementation, the apparatus further includes:

[0403] The response information production module is configured to generate response information corresponding to the control request based on the time stamp of the time point when the control request sent by the target screen projection device is received.

[0404] The response information sending module is configured to send the response information to the target screen projection device, so that the target screen projection device generates an information identifier of the target screen projection device based on the response information and the registration information, and so that the application device acquires a target device identifier of the target screen projection device based on the information identifier of the target screen projection device.

[0405] Optionally, in a specific implementation, the apparatus further includes:

[0406] The response information judgment module is configured to, before the judgment of whether the application device and the target screen projection device are in the same intranet based on the first network identifier and the second network identifier, acquire response information corresponding to the target screen projection device based on the target device identifier, and judge whether the response information is valid; if yes, the judgment module 820 is triggered.

[0407] Optionally, in a specific implementation, the apparatus further includes:

[0408] The registration information determination module is configured to, before the judgment of whether the application device and the target screen projection device are in the same intranet based on the first network identifier and the second network identifier, determine whether registration information of the target screen projection device exists based on the target device identifier; if yes, the judgment module 820 is triggered.

[0409] Optionally, in a specific implementation, the apparatus further includes:

[0410] The notification receiving module is configured to receive an online notification sent by the target screen projection device, update the online state of the target screen projection device to the online state, and send a preset heartbeat sending interval to the target screen projection device, so that the target screen projection device receives the preset heartbeat sending interval and sends the heartbeat packet to the server according to the preset heartbeat sending interval.

[0411] The packet receiving module is configured to receive the heartbeat packet, and if the heartbeat packet sent by the target screen projection device is not received within the preset heartbeat sending interval, update the online state of the target screen projection device to the offline state.

[0412] Optionally, in a specific implementation manner, the apparatus further includes:

[0413] The list sending module is configured to send a screen projection device list and online states of screen projection devices to the application device, so that the application device acquires the screen projection device list and the online states of screen projection devices, and acquires a target device identifier of a target screen projection device when detecting a selection operation about the target screen projection device sent by a user according to the screen projection device list and the online states of screen projection devices.

[0414] Optionally, in a specific implementation manner, the apparatus further includes:

[0415] The push message sending module is configured to send push information about updating the online state of the target screen projection device to the application device after updating the online state of the target screen projection device, so that the application device receives the push information sent by the server and updates the online state of the target screen projection device according to the push message.

[0416] Optionally, in a specific implementation manner, the apparatus further includes:

[0417] The updating module is configured to receive updated instruction information supported by the target screen projection device, update a target instruction template corresponding to the target screen projection device based on the updated instruction information supported by the target screen projection device, and send the updated target instruction template to the target screen projection device, wherein the updated instruction information supported by the target screen projection device is sent by the target screen projection device to the server when detecting that the instruction information supported by the target screen projection device is updated.

[0418] Based on the same inventive concept, the application embodiment provides a screen projection method of an applet, and an applet screen projection apparatus applied to an application device in an applet screen projection system. Figure 7 The application embodiment further provides an applet screen projection apparatus applied to an application device in an applet screen projection system. The system further includes a server and a target screen projection device. The application device is a device on which a to-be-screen-projected applet is loaded.

[0419] Figure 9 A structure diagram of a small program screen projection device is provided for an embodiment of the present application. As shown in the figure, the device can include the following modules: Figure 9

[0420] The identification sending module 910 is configured to obtain a target device identification of the target screen projection device, and send the target device identification and a first network identification of a network used by the device to the server, so that the server receives the target device identification and the first network identification, obtains a second network identification of a network used by the target screen projection device based on the target device identification, determines a target instruction template corresponding to the target screen projection device, judges whether the application device and the target screen projection device are in the same intranet based on the first network identification and the second network identification, and sends the target instruction template and the judgment result to the application device. The target instruction template is generated by the server based on the registration information sent by the target screen projection device and the instruction information supported by the target screen projection device.

[0421] The instruction sending module 920 is configured to receive the target instruction template and the judgment result sent by the server, generate a control instruction about the small program to be projected based on the target instruction template, send the control instruction to the target screen projection device along a link corresponding to the judgment result, so that the target screen projection device receives the control instruction, analyzes the control instruction based on the target instruction template received in advance, and controls the small program to be projected according to the analysis result.

[0422] As can be seen from the above, when the application device controls the small program to be projected carried by the application device, the application device and the target screen projection device can both obtain the instruction template of the target screen projection device with the help of the server, and then the application device can realize signaling interaction with the target screen projection device without using the development platform of the small program to be projected, thereby reducing the dependence on the development platform of the small program and improving the screen projection efficiency of the small program.

[0423] Optionally, in a specific implementation, the instruction sending module 920 is specifically configured to:

[0424] In the case where the judgment result indicates that the application device and the target screen projection device are in the same intranet, the control instruction is sent to the target screen projection device, so that the target screen projection device receives the control instruction sent by the application device, analyzes the control instruction based on the target instruction template received in advance, and controls the small program to be projected according to the analysis result.

[0425] ​Optionally, in an implementation, the instruction sending module 920 is configured to:

[0426] In a case where the determination result indicates that the application device and the target screen projection device are not in the same intranet, the control instruction is sent to the server, so that the server receives the control instruction sent by the application device, and sends the control instruction to the target screen projection device, so that the target screen projection device receives the control instruction sent by the server, analyzes the control instruction based on the target instruction template, and controls the to-be-screen-projected applet according to the analysis result.

[0427] Optionally, in an implementation, the device description file set of the target screen projection device includes service information supported by the target screen projection device and the instruction information.

[0428] The target instruction template is generated by the server based on the received device description file set sent by the target screen projection device.

[0429] Optionally, in an implementation, the identification sending module 910 includes:

[0430] An identification obtaining sub-module, configured to obtain a target device identification of the target screen projection device based on an information identification of the target screen projection device, wherein the information identification is generated by the target screen projection device based on response information sent by the server and the registration information; and the response information is response information corresponding to a control request generated by the server based on a time stamp of a time point at which the control request is received.

[0431] Optionally, in an implementation, the information identification includes a two-dimensional code.

[0432] The identification obtaining sub-module is specifically configured to:

[0433] The target device identification of the target screen projection device is obtained by scanning the two-dimensional code.

[0434] Optionally, in an implementation, the identification sending module 910 includes:

[0435] A state obtaining sub-module, configured to obtain a screen projection device list and online states of screen projection devices from the server.

[0436] An obtaining sub-module, configured to obtain a target device identification of a target screen projection device when detecting a selection operation about the target screen projection device sent by a user according to the screen projection device list and the online states of the screen projection devices.

[0437] Optionally, in an implementation, the apparatus further comprises:

[0438] The push message obtaining module is configured to receive the push information about updating the online state of the target screen projection device sent by the server, and update the online state of the target screen projection device according to the push message, wherein the push message is sent by the server to the application device after updating the online state of the target screen projection device.

[0439] The embodiment of the application further provides an electronic device, such as Figure 10 As shown in the figure, the electronic device comprises a processor 1001, a communication interface 1002, a memory 1003 and a communication bus 1004, wherein the processor 1001, the communication interface 1002 and the memory 1003 complete mutual communication through the communication bus 1004,

[0440] The memory 1003 is configured to store a computer program.

[0441] The processor 1001 is configured to execute the program stored in the memory 1003, and realize any method step mentioned above.

[0442] The communication bus mentioned above can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For the convenience of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or only one type of bus.

[0443] The communication interface is configured to realize communication between the terminal and other devices.

[0444] The memory can comprise a random access memory (RAM) and can also comprise a non-volatile memory, for example at least one disk memory. Optionally, the memory can also be at least one storage device located away from the aforementioned processor.

[0445] The processor described above can be a general processor, including a central processing unit (CPU), a network processor (NP), etc.; or can be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component.

[0446] In yet another embodiment provided by the present application, a computer readable storage medium is provided, and the computer readable storage medium stores a computer program. The computer program is executed by a processor to implement the applet screen projection method in any of the above embodiments.

[0447] In yet another embodiment provided by the present application, a computer program product containing instructions is provided, which, when executed on a computer, causes the computer to perform the applet screen projection method in any of the above embodiments.

[0448] In the above embodiments, the implementation can be achieved by software, hardware, firmware or any combination thereof, entirely or partially. When implemented by software, the implementation can be in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the entire or partial processes or functions described in the embodiments of the present application are generated. The computer can be a general purpose computer, a special purpose computer, a computer network or other programmable apparatus. The computer instructions can be stored in a computer readable storage medium or transferred from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions can be transferred from one website, computer, server or data center to another website, computer, server or data center through wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) manner. The 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, data center, etc. integrated with one or more available media. The available medium can be a magnetic medium (such as a floppy disk, a hard disk, a magnetic tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid state disk (SSD)), etc.

[0449] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0450] The various embodiments in this specification are described in a related manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments, device embodiments, electronic device embodiments, and computer-readable storage medium embodiments are basically similar to the method embodiments, so the descriptions are relatively simple; relevant parts can be referred to the descriptions of the method embodiments.

[0451] The above description is merely a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention are included within the scope of protection of the present invention.

Claims

1. An applet screen projection method, characterized by, The application is applied to a small program screen projection system, and the system comprises a server, an application device and a target screen projection device; wherein the application device is a device carrying a small program to be projected; the method comprises: The application device acquires a target device identifier of the target screen projection device and sends the target device identifier and a first network identifier of a network used by the application device to the server; The server receives the target device identifier and the first network identifier, acquires a second network identifier of a network used by the target screen projection device based on the target device identifier, determines a target instruction template corresponding to the target screen projection device, and sends the target instruction template to the application device; wherein the target instruction template is generated by the server based on registration information sent by the target screen projection device and instruction information supported by the target screen projection device, so that the target screen projection device can respond to an instruction generated according to the target instruction template; The server determines whether the application device and the target screen projection device are in the same intranet based on the first network identifier and the second network identifier, and sends a determination result to the application device; The application device receives the target instruction template and the determination result sent by the server, generates a control instruction about the small program to be projected based on the target instruction template, and sends the control instruction to the target screen projection device along a link corresponding to the determination result; The target screen projection device receives the control instruction, analyzes the control instruction based on the target instruction template received in advance, and controls the small program to be projected according to the analysis result.

2. The method of claim 1, wherein, The application device sends the control instruction to the target screen projection device along a link corresponding to the determination result; The target screen projection device receives the control instruction, analyzes the control instruction based on the target instruction template received in advance, and controls the small program to be projected according to the analysis result. The target screen projection device receives the control instruction sent by the application device, analyzes the control instruction based on the target instruction template received in advance, and controls the small program to be projected according to the analysis result. The application device sends the control instruction to the target screen projection device along a link corresponding to the determination result; 3. The method of claim 1, wherein, The server receives the control instruction sent by the application device and sends the control instruction to the target screen projection device; The target screen projection device receives the control instruction, analyzes the control instruction based on the target instruction template received in advance, and controls the small program to be projected according to the analysis result. ​ ​ The target screen projection device receives the control instruction sent by the server, parses the control instruction based on the target instruction template, and controls the to-be-projected applet according to the parsing result.

4. The method of claim 1, wherein, The registration information includes a device identifier of the target screen projection device and a second network identifier of a network used by the target screen projection device. The second network identifier of the network used by the target screen projection device is acquired based on the target device identifier. The server acquires the second network identifier of the network used by the target screen projection device in the registration information sent by the target screen projection device based on the target device identifier.

5. The method of claim 1, wherein, The device description file set of the target screen projection device includes service information supported by the target screen projection device and the instruction information; and the target instruction template is generated by the server based on the received device description file set sent by the target screen projection device.

6. The method of claim 4, wherein, The method further includes: The target screen projection device generates an information identifier of the target screen projection device based on the response information sent by the server and the registration information; wherein the response information is response information corresponding to the control request and generated by the server based on a time stamp of a time point at which the control request sent by the target screen projection device is received. The application device acquires the target device identifier of the target screen projection device, including: The application device acquires the target device identifier of the target screen projection device based on the information identifier of the target screen projection device.

7. The method of claim 6, wherein, The information identifier includes a two-dimensional code. The application device acquires the target device identifier of the target screen projection device based on the information identifier of the target screen projection device, including: The application device acquires the target device identifier of the target screen projection device by scanning the two-dimensional code.

8. The method of claim 6, wherein, Before the server judges whether the application device and the target screen projection device are in the same intranet based on the first network identifier and the second network identifier, the method further includes: The server acquires corresponding response information of the target screen projection device based on the target device identifier, and judges whether the response information is valid; If the response information corresponding to the target screen projection device is valid, the server judges whether the application device and the target screen projection device are in the same intranet based on the first network identifier and the second network identifier.

9. The method of claim 8, wherein, Before the server judges whether the application device and the target screen projection device are in the same intranet based on the first network identifier and the second network identifier, the method further includes: The server determines whether the registration information of the target screen projection device exists based on the target device identifier; If the registration information of the target screen projection device exists, the server judges whether the application device and the target screen projection device are in the same intranet based on the first network identifier and the second network identifier.

10. The method of claim 1, wherein, The method further includes: The target screen projection device sends an online notification to the server when it is online. The server receives the online notification sent by the target screen projection device, updates the online state of the target screen projection device to the online state, and sends a preset heartbeat sending interval to the target screen projection device; The target screen projection device receives the preset heartbeat sending interval and sends the heartbeat packet to the server according to the preset heartbeat sending interval; The server receives the heartbeat packet, and if the heartbeat packet sent by the target screen projection device is not received within the preset heartbeat sending interval, updates the online state of the target screen projection device to the offline state.

11. The method of claim 10, wherein, The application device obtains the target device identifier of the target screen projection device, including: The application device obtains the screen projection device list and the online state of the screen projection device from the server; When detecting the selection operation of the target screen projection device sent by the user according to the screen projection device list and the online state of the screen projection device, the target device identifier of the target screen projection device is obtained.

12. The method of claim 11, wherein, The method further comprises: After updating the online state of the target screen projection device, the server sends push information about updating the online state of the target screen projection device to the application device; The application device receives the push information sent by the server, and updates the online state of the target screen projection device according to the push message.

13. The method of claim 1, wherein, The method further comprises: When detecting the update of the instruction information supported by itself, the target screen projection device sends the updated instruction information supported by itself to the server; The server receives the updated instruction information supported by the target screen projection device, updates the target instruction template corresponding to the target screen projection device based on the updated instruction information supported by the target screen projection device, and sends the updated target instruction template to the target screen projection device.

14. An applet screen projection method, characterized by, A server applied to a small program screen projection system; the system further comprises an application device and a target screen projection device; wherein the application device is a device carrying a small program to be projected; the method comprises: Receiving the target device identifier of the target screen projection device and the first network identifier of the network used by the application device sent by the application device, obtaining the second network identifier of the network used by the target screen projection device based on the target device identifier, determining the target instruction template corresponding to the target screen projection device, and sending the target instruction template to the application device, so that the application device receives the target instruction template, generates a control instruction about the small program to be projected based on the target instruction template; wherein the target instruction template is generated by the server based on the received registration information and the instruction information supported by the target screen projection device sent by the target screen projection device, so that the target screen projection device can respond to the instruction generated according to the target instruction template; Based on the first network identifier and the second network identifier, it is judged whether the application device and the target screen projection device are in the same intranet, and the judgment result is sent to the application device, so that the application device receives the judgment result, sends the control instruction to the target screen projection device along the link corresponding to the judgment result, so that the target screen projection device receives the control instruction, analyzes the control instruction based on the target instruction template received in advance, and controls the to-be-screened applet according to the analysis result.

15. An applet screen projection method, characterized by, The application device applied to the applet screen projection system; the system further comprises a server and a target screen projection device; wherein the application device is a device carrying a to-be-screened applet; the method comprises: Obtaining the target device identifier of the target screen projection device, and sending the target device identifier and the first network identifier of the network used by itself to the server, so that the server receives the target device identifier and the first network identifier, obtains the second network identifier of the network used by the target screen projection device based on the target device identifier, determines the target instruction template corresponding to the target screen projection device, judges whether the application device and the target screen projection device are in the same intranet based on the first network identifier and the second network identifier, and sends the target instruction template and the judgment result to the application device; wherein the target instruction template is generated by the server based on the registration information sent by the target screen projection device and the instruction information supported by the target screen projection device, so that the target screen projection device can respond to the instruction generated according to the target instruction template; Receiving the target instruction template and the judgment result sent by the server, generating a control instruction about the to-be-screened applet based on the target instruction template, sending the control instruction to the target screen projection device along the link corresponding to the judgment result, so that the target screen projection device receives the control instruction, analyzes the control instruction based on the target instruction template received in advance, and controls the to-be-screened applet according to the analysis result.

16. An applet screen projection system, characterized by comprising: The system comprises a server, an application device and a target screen projection device; wherein the application device is a device carrying a to-be-screened applet; The server is configured to receive the target device identifier of the target screen projection device and the first network identifier of the network used by the application device, acquire the second network identifier of the network used by the target screen projection device based on the target device identifier, determine the target instruction template corresponding to the target screen projection device, and send the target instruction template to the application device; determine whether the application device and the target screen projection device are in the same intranet based on the first network identifier and the second network identifier, and send the determination result to the application device; wherein the target instruction template is generated by the server based on the registration information sent by the target screen projection device and the instruction information supported by the target screen projection device, so that the target screen projection device can respond to the instruction generated according to the target instruction template. The application device is configured to acquire the target device identifier of the target screen projection device, and send the target device identifier and the first network identifier to the server; receive the target instruction template and the determination result sent by the server, generate the control instruction for the to-be-screen-projected applet based on the target instruction template, and send the control instruction to the target screen projection device along the link corresponding to the determination result. The target screen projection device is configured to receive the control instruction, parse the control instruction based on the target instruction template received in advance, and control the to-be-screen-projected applet according to the parsing result.

17. An applet screen projection device, characterized by comprising: A server applied to a small program screen projection system; the system further includes an application device and a target screen projection device; wherein the application device is a device carrying a to-be-screen-projected applet; the device includes: A receiving module is configured to receive the target device identifier of the target screen projection device and the first network identifier of the network used by the application device, acquire the second network identifier of the network used by the target screen projection device based on the target device identifier, determine the target instruction template corresponding to the target screen projection device, and send the target instruction template to the application device, so that the application device receives the target instruction template and generates the control instruction for the to-be-screen-projected applet based on the target instruction template; wherein the target instruction template is generated by the server based on the registration information sent by the target screen projection device and the instruction information supported by the target screen projection device, so that the target screen projection device can respond to the instruction generated according to the target instruction template. A determining module is configured to determine whether the application device and the target screen projection device are in the same intranet based on the first network identifier and the second network identifier, and send the determination result to the application device, so that the application device receives the determination result, sends the control instruction to the target screen projection device along the link corresponding to the determination result, so that the target screen projection device receives the control instruction, parses the control instruction based on the target instruction template received in advance, and controls the to-be-screen-projected applet according to the parsing result.

18. An applet screen projection device, characterized by comprising: The application discloses an application device applied to a small program screen projection system; the system further comprises a server and a target screen projection device; wherein the application device is a device carrying a small program to be projected; the device comprises: An identification sending module is configured to acquire a target device identification of the target screen projection device, and send the target device identification and a first network identification of a network used by the application device to the server, so that the server receives the target device identification and the first network identification, acquires a second network identification of a network used by the target screen projection device based on the target device identification, determines a target instruction template corresponding to the target screen projection device, judges whether the application device and the target screen projection device are in the same intranet based on the first network identification and the second network identification, and sends the target instruction template and a judgment result to the application device; wherein the target instruction template is generated by the server based on registration information sent by the target screen projection device and instruction information supported by the target screen projection device, so that the target screen projection device can respond to an instruction generated according to the target instruction template; An instruction sending module is configured to receive the target instruction template and the judgment result sent by the server, generate a control instruction about the small program to be projected based on the target instruction template, send the control instruction to the target screen projection device along a link corresponding to the judgment result, so that the target screen projection device receives the control instruction, analyzes the control instruction based on the target instruction template received in advance, and controls the small program to be projected according to an analysis result.

19. An electronic device, comprising: The application discloses an application device applied to a small program screen projection system; the system further comprises a server and a target screen projection device; wherein the application device is a device carrying a small program to be projected; the device comprises: The memory is used for storing a computer program. The processor is used for executing the program stored on the memory, and realizes the method steps in any one of claims 1-15.

20. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, and the computer program is executed by the processor to realize the method steps in any one of claims 1-15.

Citation Information

Patent Citations

  • Television screen projection method and device, television screen projection system and computer equipment

    CN110248216A

  • Intelligent screen projection method and device, intelligent terminal and server

    CN110602087A

  • Screen projection processing method and device

    CN110784758A

  • Screen projection method and device, electronic equipment and storage medium

    CN113825000A