CN111552565A - Multithreading screen projection method and device - Google Patents

Multithreading screen projection method and device Download PDF

Info

Publication number
CN111552565A
CN111552565A CN202010338855.0A CN202010338855A CN111552565A CN 111552565 A CN111552565 A CN 111552565A CN 202010338855 A CN202010338855 A CN 202010338855A CN 111552565 A CN111552565 A CN 111552565A
Authority
CN
China
Prior art keywords
screen projection
screen
client
request
state
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010338855.0A
Other languages
Chinese (zh)
Inventor
赵晓波
徐瑞霞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Honghe Innovation Information Technology Co Ltd
Original Assignee
Shenzhen Honghe Innovation Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Honghe Innovation Information Technology Co Ltd filed Critical Shenzhen Honghe Innovation Information Technology Co Ltd
Priority to CN202010338855.0A priority Critical patent/CN111552565A/en
Publication of CN111552565A publication Critical patent/CN111552565A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/5038Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the execution order of a plurality of tasks, e.g. taking priority or time dependency constraints into consideration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/14Digital output to display device ; Cooperation and interconnection of the display device with other functional units
    • G06F3/1454Digital output to display device ; Cooperation and interconnection of the display device with other functional units involving copying of the display data of a local workstation or window to a remote workstation or window so that an actual copy of the data is displayed simultaneously on two or more displays, e.g. teledisplay
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/5013Request control

Abstract

The application relates to the technical field of screen projection, in particular to a multithreading screen projection method and device. The method comprises the following steps: when a first screen projection request sent by a first client is received, acquiring an equipment state list; determining a first number of state identifiers in the equipment state list, and judging whether the first number reaches a preset upper limit; if the first quantity does not reach the preset upper limit, screen projection is carried out on the first client according to the first screen projection request; and if the first quantity reaches a preset upper limit, transferring the first screen projection request into a waiting queue. According to the screen projection system and the screen projection method, whether the number of the screen projection clients exceeds the preset upper limit or not is judged through the state identification, when the number exceeds the preset upper limit, the first screen projection request is transferred into the waiting queue, screen projection on the first client can be prevented, screen projection display windows are prevented from being disordered due to screen projection on the clients exceeding the upper limit, and therefore the stability of the screen projection system is improved.

Description

Multithreading screen projection method and device
Technical Field
The application relates to the technical field of screen projection, in particular to a multithreading screen projection method and device.
Background
With the development of screen projection technology, more and more people start to project the display content of a small screen onto a large screen, for example, the display picture of a smart phone is projected onto a large-screen smart television, so that the smart phone can be conveniently watched by multiple people, and the visual experience is improved. In addition to projecting the screen content of one sending end onto a large screen of a receiving end, the method also supports projecting the screen content of multiple sending ends onto the same receiving end at present, realizes multi-screen content sharing, and is generally applied to video conferences or teaching scenes.
In the prior art, when receiving a screen-casting request initiated by a sending end, a receiving end responds to the screen-casting request, so as to cast a screen of the sending end. When a plurality of sending terminals and receiving terminals are connected to request screen projection in a short time and the screen projection upper limit of the receiving terminal is exceeded, the screen projection display window of the receiving terminal is disordered (if one more display window is arranged at any position) or the screen projection program is broken down, so that the stability of the screen projection system is reduced.
Disclosure of Invention
The application aims to provide a multithreading screen projection method and device, and the problem of how to improve the stability of a screen projection system in the prior art is solved.
The embodiment of the application provides the following scheme:
according to a first aspect of the present application, an embodiment of the present application provides a multithreading screen projection method, which is applied in an electronic device, and the method includes:
when a first screen projection request sent by a first client is received, acquiring an equipment state list, wherein the equipment state list is used for storing state identifiers of screen projection clients, and each state identifier corresponds to one screen projection client;
determining a first number of state identifiers in the equipment state list, and judging whether the first number reaches a preset upper limit;
if the first quantity does not reach the preset upper limit, screen projection is carried out on the first client according to the first screen projection request;
and if the first quantity reaches the preset upper limit, transferring the first screen projection request into a waiting queue.
Optionally, the screen-casting the first client according to the first screen-casting request includes:
distributing a first state identifier to the first client according to the first screen projection request;
creating a first screen projection display window according to the first state identifier;
and projecting the screen content of the first client into the first screen projection display window.
Optionally, before the creating the first screen projection display window according to the first state identifier, the method further includes:
adding the first state identifier to the device state list, and determining a second number of state identifiers in the device state list;
acquiring layout information corresponding to the second quantity;
after the creating a first screen projection display window according to the first state identification, the method further comprises:
and according to the layout information, carrying out layout adjustment on the screen projection display window corresponding to the screen projection client and the first screen projection display window.
Optionally, the performing layout adjustment on the screen projection display window corresponding to the screen projection client and the first screen projection display window according to the layout information includes:
acquiring time sequence numbers of the screen projection client and the first client;
and sequentially adjusting the arrangement sequence of the screen projection display windows corresponding to the screen projection client and the first screen projection display windows according to the time sequence numbers and the layout information.
Optionally, after the first screen-throwing request is transferred to a waiting queue, the method further includes:
monitoring whether a screen projection finishing request sent by a second client side is received, wherein the second client side is in a screen projection state, and a second state identifier of the second client side is stored in the equipment state list;
stopping screen projection on the second client when the screen projection ending request is monitored;
and reading a second screen projection request from the waiting queue, and projecting a screen of the client corresponding to the second screen projection request.
Optionally, before reading the second screen-projection request from the waiting queue, the method further includes:
acquiring each screen projection request to be processed in the waiting queue and authentication information corresponding to each screen projection request to be processed, wherein the waiting queue comprises a plurality of screen projection requests to be processed, and the authentication information comprises sending time and/or client identity information;
calculating the priority of each screen projection request to be processed according to the authentication information;
and sequencing the plurality of screen casting requests to be processed according to the sequence of the priority from high to low, and taking the screen casting request to be processed with the highest priority as the second screen casting request.
Optionally, when the screen projection ending request is monitored, stopping screen projection of the second client includes:
when the screen projection ending request is monitored, destroying a second screen projection display window corresponding to the second client;
and deleting the second state identification from the device state list.
Based on the same inventive concept, according to a second aspect of the present application, an embodiment of the present application provides a multithreading screen projection apparatus, including:
the device comprises an acquisition module, a display module and a display module, wherein the acquisition module is used for acquiring a device state list when receiving a first screen projection request sent by a first client, the device state list is used for storing state identifiers of screen projection clients, and each state identifier corresponds to one screen projection client;
the judging module is used for determining a first number of the state identifiers in the equipment state list and judging whether the first number reaches a preset upper limit;
the screen projection module is used for projecting a screen to the first client according to the first screen projection request if the first quantity does not reach the preset upper limit;
and the transfer module is used for transferring the first screen projection request into a waiting queue if the first number reaches the preset upper limit.
Based on the same inventive concept, according to a third aspect of the present application, a computer-readable storage medium is provided, on which a computer program is stored which, when being executed by a processor, carries out the method steps as in any one of the first aspects of the present application.
Based on the same inventive concept, according to a fourth aspect of the present application, there is provided an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the method steps as in the first aspect of the present application when executing the program.
Compared with the prior art, the application has the following advantages and beneficial effects:
the method comprises the steps that when a first screen projection request sent by a first client is received, an equipment state list is obtained and used for storing state identifications of screen projection clients, wherein each state identification corresponds to one screen projection client; determining a first number of state identifiers in the equipment state list, and judging whether the first number reaches a preset upper limit; if the first quantity does not reach the preset upper limit, screen projection is carried out on the first client according to the first screen projection request; and if the first quantity reaches the preset upper limit, transferring the first screen projection request into a waiting queue. When a plurality of clients request screen projection in a short time and exceed the screen projection upper limit of the electronic equipment, the screen projection display window is disordered or the screen projection program is crashed because the clients exceeding the screen projection upper limit are not intercepted in the prior art, but the invention judges whether the number of the screen projection clients exceeds the preset upper limit or not through the state identifier when receiving the first screen projection request sent by the first client, so that when the preset upper limit is exceeded, the first screen projection request is transferred into a waiting queue to prevent the first client from screen projection, the screen projection display window disorder and the screen projection program crash are avoided, the stability of a screen projection system is improved, the screen projection request in the waiting queue has the possibility of being executed, and the problem that the screen cannot be projected when the number of the screen projection clients exceeds the preset upper limit is avoided.
Drawings
In order to more clearly illustrate the embodiments of the present specification or the technical solutions in the prior art, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present specification, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a schematic flowchart of a multithread screen projection method according to a first embodiment of the present application;
FIG. 2 is a flowchart illustrating a second embodiment of the multi-thread screen projection method according to the present application;
FIG. 3 is a flowchart illustrating a multithread screen projection method according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of a multithread screen projection device according to the first embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described clearly and completely with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments, and all other embodiments obtained by a person skilled in the art based on the embodiments of the present application belong to the scope of protection of the embodiments of the present application.
Referring to fig. 1, fig. 1 is a schematic flow chart of a first embodiment of the multithread screen projection method, and the first embodiment of the multithread screen projection method is provided.
In this embodiment, the multithreading screen projection method is applied to an electronic device, and the method includes:
step S10: when a first screen projection request sent by a first client is received, an equipment state list is obtained, the equipment state list is used for storing state identifiers of screen projection clients, and each state identifier corresponds to one screen projection client.
The electronic device is a receiving end device of a screen projection request, and includes but is not limited to: the system comprises an electronic whiteboard and an intelligent television, wherein a client is sending end equipment of a screen projection request, the client sends the screen projection request to the electronic equipment, and the electronic equipment performs screen projection display on screen contents of the client according to the screen projection request under the condition that the condition allows. The screen-casting client is sending terminal equipment which already casts the screen through the electronic equipment, and the first client is sending terminal equipment which initiates a first screen-casting request.
The state identifier is used for representing a screen projection state of the client corresponding to the state identifier, wherein the screen projection state specifically includes a first state, a second state and a third state, the first state is used for representing that the corresponding client is in a ready screen projection state, the second state is used for representing that the corresponding client is in a screen projection state, the third state is used for representing that the corresponding client is in a screen projection finishing state, and an equipment identification number and a state identifier of the screen projection client are stored in the equipment state list and used for recording the screen projection state corresponding to each screen projection client.
Step S20: and determining a first number of the state identifiers in the equipment state list, and judging whether the first number reaches a preset upper limit.
And counting a first number of the state identifications in the equipment state list, wherein the screen projection clients correspond to the state identifications one by one, so that the first number represents the number of the screen projection clients. The preset upper limit is the maximum screen projection amount of the load of the electronic equipment, and can be set according to actual needs, for example, the preset upper limit is set to 4 or 6.
In a specific implementation, when a first screen projection request sent by a first client is received, the electronic device acquires an equipment state list, counts a first number of state identifiers based on the equipment state list, and judges whether the first number reaches a preset upper limit, so that processing is performed according to a judgment result in the following.
If the first quantity does not reach the preset upper limit, executing step S30: and screen projection is carried out on the first client according to the first screen projection request.
If the first number does not reach the preset upper limit, it is indicated that the number of the screen-casting clients does not reach the maximum screen-casting number of the electronic device, and the electronic device can also cast the screen content of the first client, so that the screen-casting of the first client is performed according to the first screen-casting request, and the screen content of the first client is displayed on the screen of the electronic device.
If the first number reaches the preset upper limit, executing step S40: and transferring the first screen projection request into a waiting queue.
If the first number reaches the preset upper limit, the number of the screen projection clients reaches the maximum screen projection number of the electronic equipment, the electronic equipment cannot project the screen content of the first client any more, at the moment, the first screen projection request is transferred to a waiting queue, the electronic equipment is prevented from projecting the screen to the first client, and screen projection display window disorder caused by screen projection of the first client after the screen projection client exceeds the preset upper limit is avoided. Due to the fact that control is carried out at the screen projection inlet, resource consumption of screen projection operation is reduced.
The technical scheme provided in the embodiment of the application at least has the following technical effects or advantages:
in the embodiment, when a first screen projection request sent by a first client is received, an equipment state list is obtained, where the equipment state list is used to store state identifiers of screen projection clients, and each state identifier corresponds to one screen projection client; determining a first number of state identifiers in the equipment state list, and judging whether the first number reaches a preset upper limit; if the first quantity does not reach the preset upper limit, screen projection is carried out on the first client according to the first screen projection request; and if the first quantity reaches the preset upper limit, transferring the first screen projection request into a waiting queue. When a plurality of clients request screen projection in a short time and exceed the screen projection upper limit of the electronic equipment, the screen projection display window is disordered or the screen projection program is crashed because the clients exceeding the screen projection upper limit are not intercepted in the prior art, but the invention judges whether the number of the screen projection clients exceeds the preset upper limit or not through the state identifier when receiving the first screen projection request sent by the first client, so that when the preset upper limit is exceeded, the first screen projection request is transferred into a waiting queue to prevent the first client from screen projection, the screen projection display window is disordered and the screen projection program is crashed are avoided, the stability of the screen projection system is improved, the screen projection request in the waiting queue has the possibility of being executed, and the problem that the screen cannot be projected when the number of the screen projection clients exceeds the preset upper limit is avoided.
Referring to fig. 2, fig. 2 is a flowchart illustrating a multithread screen projection method according to a second embodiment of the present application.
In this embodiment, the step S30 includes:
s301: and allocating a first state identifier to the first client according to the first screen projection request.
When the first quantity does not reach the preset upper limit, the electronic device casts a screen to the first client, and specifically, a first state identifier is allocated to the first client to record the screen casting state of the first client.
S302: and creating a first screen projection display window according to the first state identifier.
The allocation state identifier is a trigger condition for the electronic device to create a screen-casting display window for the corresponding client, and after the first state identifier is allocated to the first client, the electronic device is triggered to create a first screen-casting display window for the first client.
S303: and projecting the screen content of the first client into the first screen projection display window.
After a first screen projection display window is created for the first client, screen content of the first client is obtained, and the screen content is projected into the first screen projection display window, so that screen projection of the screen content of the first client is realized.
Further, before the step S302, the method further includes:
adding the first state identifier to the device state list, and determining a second number of state identifiers in the device state list;
and acquiring layout information corresponding to the second number.
In order to improve the screen space utilization rate of the electronic equipment, the screen-casting display window is laid out according to a preset layout rule, wherein the preset layout rule comprises a corresponding relation between the second number of the state identifiers and layout information, for example, when the second number of the state identifiers is one, the layout information is that the screen space of the electronic equipment is not split, and the screen-casting display window independently occupies the whole screen space; when the second number of the state identifiers is two, the layout information is that the screen space is divided into a left screen and a right screen, and two screen projection display windows respectively occupy one screen; when the second number of the state identifiers is three, the screen space is divided into three split screens, namely a left screen, an upper right screen and a lower right screen, three projection screen display windows respectively occupy one split screen, the preset layout rule further includes other layout rules, and this embodiment is not limited thereto.
In a specific implementation, after the first state identifier is added to the device state list, the number of the state identifiers is changed from a first number to a second number, layout information is also adjusted accordingly, the layout information corresponding to the second number is searched in the preset layout rule, and layout adjustment is performed according to the layout information, so that the screen space of the electronic device can be fully utilized. And adding the first state identifier into the device state list, setting the first state identifier as ready screen projection, and performing occupation on the first client side to avoid screen projection on other client sides in a preparation process of screen projection on the first client side.
Correspondingly, after the step S302, the method further includes:
and according to the layout information, carrying out layout adjustment on the screen projection display window corresponding to the screen projection client and the first screen projection display window.
In this embodiment, the time sequence numbers of the screen-projecting client and the first client are obtained, and the arrangement order of the screen-projecting display windows corresponding to the screen-projecting client and the first screen-projecting display windows is sequentially adjusted according to the time sequence numbers and the layout information, so that the display order of each window is ensured to be unchanged when the number of windows is switched. For example, the second number is 3, the description layout information is to divide the screen space into three split screens, namely a left screen, an upper right screen and a lower right screen, the first client number is one, the screen projection client number is two, the screen projection client includes a first screen projection client and a second screen projection client, the original layout information of the screen projection client is to divide the screen space into two split screens, namely a left screen and a right screen, the screen projection display window corresponding to the first screen projection client occupies the left screen, and the screen projection display window corresponding to the second screen projection client occupies the right screen. At the moment, the right screen is divided into an upper right screen and a lower right screen, the time sequence number of the first screen projection client is obtained as one, the time sequence number of the second screen projection client is obtained as two, the time sequence number of the first client is obtained as three, the screen projection display window corresponding to the first screen projection client is projected to the left screen according to the time sequence number, the screen projection display window corresponding to the second screen projection client is projected to the upper right screen, and the first screen projection display window is projected to the lower right screen.
The technical scheme provided in the embodiment of the application at least has the following technical effects or advantages:
in this embodiment, when the first number does not reach the preset upper limit, a first state identifier is allocated to the first client according to the first screen-casting request, and the first state identifier is set to be ready for screen casting, so that the first client can be occupied, and screen casting on other clients in a preparation process of screen casting on the first client is avoided; creating a first screen projection display window according to the first state identifier; and projecting the screen content of the first client into the first screen projecting display window, thereby realizing the screen projection of the screen content of the first client.
Referring to fig. 3, fig. 3 is a flowchart illustrating a multithread screen projection method according to a third embodiment of the present application.
In this embodiment, after the step S40, the method further includes:
step S401: monitoring whether a screen projection finishing request sent by a second client side is received, wherein the second client side is in a screen projection state, and a second state identifier of the second client side is stored in the equipment state list;
step S402: stopping screen projection on the second client when the screen projection ending request is monitored;
step S403: and reading a second screen projection request from the waiting queue, and projecting a screen of the client corresponding to the second screen projection request.
The second client is a screen projection client which wants to finish screen projection, in order to process the screen projection requests in the waiting queue, the electronic equipment monitors whether the screen projection finishing request sent by the second client is received or not, and stops screen projection on the second client when the screen projection finishing request is monitored, and then the current screen projection number of the electronic equipment is less than the maximum screen projection number, so that the screen projection requests in the waiting queue can be processed. Therefore, the electronic device reads a second screen projection request from the waiting queue and projects a screen of the client corresponding to the second screen projection request.
Further, before the step S403, the method further includes: acquiring each screen projection request to be processed in the waiting queue and authentication information corresponding to each screen projection request to be processed, wherein the waiting queue comprises a plurality of screen projection requests to be processed, and the authentication information comprises sending time and/or client identity information; calculating the priority of each screen projection request to be processed according to the authentication information; and sequencing the plurality of screen casting requests to be processed according to the sequence of the priority from high to low, and taking the screen casting request to be processed with the highest priority as the second screen casting request.
And when the number of screen throwing requests to be processed in the waiting queue is larger than the number of screen throwing requests, calculating the priority of each screen throwing request to be processed according to the authentication information of each screen throwing request to be processed, and selecting the screen throwing request to be processed with the highest priority from the waiting queue as a second screen throwing request to respond. The authentication information comprises sending time and/or client identity information, specifically, the priority of each screen throwing request to be processed is calculated according to the sending time of each screen throwing request to be processed, the priority of the screen throwing request to be processed before the sending time is higher than the priority of the screen throwing request to be processed after the sending time, and therefore the screen throwing request to be processed before the sending time can be responded preferentially. Or calculating the priority of each screen projection request to be processed according to client identity information corresponding to each screen projection request to be processed, wherein the client identity information is information for distinguishing client identities, for example, in a teaching scene, the importance degree of a teacher client is higher than that of a student client, so that the priority of the teacher client is higher than that of the student client, and the screen projection requests to be processed with higher importance degree can be responded preferentially. Or the priority of each screen throwing request to be processed is calculated according to the sending time of each screen throwing request to be processed and the client identity information, and the screen throwing requests to be processed with the sending time before and higher in importance degree can be preferentially responded by combining the sending time and the client identity information.
Further, the step S402 includes:
when the screen projection ending request is monitored, destroying a second screen projection display window corresponding to the second client;
and deleting the second state identification from the device state list.
When the screen projection ending request is monitored, screen projection is ended by destroying a second screen projection display window corresponding to the second client, the second state identification of the second client is updated to be in the third state in the equipment state list, and when the second state identification of the second client is updated to be in the third state, the second state identification is deleted from the equipment state list, so that the state identification in the equipment state list is reduced, and the screen projection request to be processed in the waiting queue can be processed.
Further, after the step S40, the method further includes:
if the first number reaches the preset upper limit, judging whether the current system idle rate reaches a preset idle rate; if the current system idle rate reaches the preset idle rate, adding a preset value to the preset upper limit to obtain a new preset upper limit, and returning to the step S20.
When the idle rate of the current system is high, the upper limit value is increased moderately, and the screen projection quantity can be increased on the premise of ensuring the fluency of the screen projection system.
The technical scheme provided in the embodiment of the application at least has the following technical effects or advantages:
in the embodiment, whether a screen projection ending request sent by the second client is received or not is monitored; stopping screen projection on the second client when the screen projection ending request is monitored; and reading a second screen projection request from the waiting queue, and projecting a screen to the client corresponding to the second screen projection request, so that the processing efficiency of the screen projection request in the waiting queue is improved.
Based on the same inventive concept, an embodiment of the present application further provides a multithread screen projection apparatus, and specifically, referring to fig. 4, the multithread screen projection apparatus includes:
an obtaining module 10, configured to obtain an equipment state list when a first screen projection request sent by a first client is received, where the equipment state list is used to store state identifiers of screen projection clients, and each state identifier corresponds to one screen projection client;
a determining module 20, configured to determine a first number of the status identifiers in the device status list, and determine whether the first number reaches a preset upper limit;
the screen projecting module 30 is configured to project a screen to the first client according to the first screen projecting request if the first number does not reach the preset upper limit;
and a transfer module 40, configured to transfer the first screen-casting request to a waiting queue if the first number reaches the preset upper limit.
Further, the screen projection module 30 is specifically configured to allocate a first state identifier to the first client according to the first screen projection request; creating a first screen projection display window according to the first state identifier; and projecting the screen content of the first client into the first screen projection display window.
Further, the multithreading screen projection device further comprises:
the layout module is used for adding the first state identifier to the equipment state list and determining a second number of the state identifiers in the equipment state list; acquiring layout information corresponding to the second quantity;
the layout module is further configured to perform layout adjustment on the screen projection display window corresponding to the screen projection client and the first screen projection display window according to the layout information.
Further, the layout module is further configured to obtain time sequence numbers of the screen projection client and the first client; and sequentially adjusting the arrangement sequence of the screen projection display windows corresponding to the screen projection client and the first screen projection display windows according to the time sequence numbers and the layout information.
Further, the multithreading screen projection device further comprises:
the monitoring module is used for monitoring whether a screen projection finishing request sent by a second client side is received, the second client side is in a screen projection state, and a second state identifier of the second client side is stored in the equipment state list;
the screen projection module 30 is further configured to stop projecting the screen of the second client when the screen projection ending request is monitored; and reading a second screen projection request from the waiting queue, and projecting a screen of the client corresponding to the second screen projection request.
Further, the screen projection module 30 is further configured to obtain each to-be-processed screen projection request in the waiting queue and authentication information corresponding to each to-be-processed screen projection request, where the waiting queue includes a plurality of to-be-processed screen projection requests, and the authentication information includes sending time and/or client identity information; calculating the priority of each screen projection request to be processed according to the authentication information; and sequencing the plurality of screen casting requests to be processed according to the sequence of the priority from high to low, and taking the screen casting request to be processed with the highest priority as the second screen casting request.
Further, the screen projection module 30 is further configured to destroy a second screen projection display window corresponding to the second client when the screen projection request is monitored to be ended; and deleting the second state identification from the device state list.
Based on the same inventive concept, the present application further provides a computer-readable storage medium, on which a computer program is stored, and the computer program, when executed by a processor, implements any of the method steps described above.
Based on the same inventive concept, an embodiment of the present application further provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the method steps described in any of the foregoing are implemented.
Compared with the prior art, the embodiment of the application has the following advantages and beneficial effects:
according to the method and the device, when a first screen projection request sent by a first client is received, an equipment state list is obtained and used for storing state identifiers of screen projection clients, wherein each state identifier corresponds to one screen projection client; determining a first number of state identifiers in the equipment state list, and judging whether the first number reaches a preset upper limit; if the first quantity does not reach the preset upper limit, screen projection is carried out on the first client according to the first screen projection request; and if the first quantity reaches the preset upper limit, transferring the first screen projection request into a waiting queue. When a plurality of clients request screen projection in a short time and exceed the screen projection upper limit of the electronic equipment, the screen projection display window is disordered or the screen projection program is crashed because the clients exceeding the screen projection upper limit are not intercepted in the prior art, but the invention judges whether the number of the screen projection clients exceeds the preset upper limit or not through the state identifier when receiving the first screen projection request sent by the first client, so that when the preset upper limit is exceeded, the first screen projection request is transferred into a waiting queue to prevent the first client from screen projection, the screen projection display window is disordered and the screen projection program is crashed are avoided, the stability of the screen projection system is improved, the screen projection request in the waiting queue has the possibility of being executed, and the problem that the screen cannot be projected when the number of the screen projection clients exceeds the preset upper limit is avoided.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (modules, systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While the preferred embodiments of the present application have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all alterations and modifications as fall within the scope of the application.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include such modifications and variations.

Claims (10)

1. A multithreading screen projection method is applied to electronic equipment and is characterized by comprising the following steps:
when a first screen projection request sent by a first client is received, acquiring an equipment state list, wherein the equipment state list is used for storing state identifiers of screen projection clients, and each state identifier corresponds to one screen projection client;
determining a first number of state identifiers in the equipment state list, and judging whether the first number reaches a preset upper limit;
if the first quantity does not reach the preset upper limit, screen projection is carried out on the first client according to the first screen projection request;
and if the first quantity reaches the preset upper limit, transferring the first screen projection request into a waiting queue.
2. The multi-threaded screen-casting method of claim 1, wherein the casting the screen of the first client according to the first screen-casting request comprises:
distributing a first state identifier to the first client according to the first screen projection request;
creating a first screen projection display window according to the first state identifier;
and projecting the screen content of the first client into the first screen projection display window.
3. The multi-threaded screen projection method of claim 2, wherein prior to the creating a first screen projection display window according to the first state identification, the method further comprises:
adding the first state identifier to the device state list, and determining a second number of state identifiers in the device state list;
acquiring layout information corresponding to the second quantity;
after the creating a first screen projection display window according to the first state identification, the method further comprises:
and according to the layout information, carrying out layout adjustment on the screen projection display window corresponding to the screen projection client and the first screen projection display window.
4. The multithread screen projection method of claim 3, wherein the performing layout adjustment on the screen projection display window corresponding to the screen projection client and the first screen projection display window according to the layout information comprises:
acquiring time sequence numbers of the screen projection client and the first client;
and sequentially adjusting the arrangement sequence of the screen projection display windows corresponding to the screen projection client and the first screen projection display windows according to the time sequence numbers and the layout information.
5. The multi-threaded screen casting method according to any one of claims 1-4, wherein after the first screen casting request is transferred into a wait queue, the method further comprises:
monitoring whether a screen projection finishing request sent by a second client side is received, wherein the second client side is in a screen projection state, and a second state identifier of the second client side is stored in the equipment state list;
stopping screen projection on the second client when the screen projection ending request is monitored;
and reading a second screen projection request from the waiting queue, and projecting a screen of the client corresponding to the second screen projection request.
6. The multi-threaded screen shot method of claim 5, wherein prior to reading a second screen shot request from the wait queue, the method further comprises:
acquiring each screen projection request to be processed in the waiting queue and authentication information corresponding to each screen projection request to be processed, wherein the waiting queue comprises a plurality of screen projection requests to be processed, and the authentication information comprises sending time and/or client identity information;
calculating the priority of each screen projection request to be processed according to the authentication information;
and sequencing the plurality of screen casting requests to be processed according to the sequence of the priority from high to low, and taking the screen casting request to be processed with the highest priority as the second screen casting request.
7. The multithread screen-casting method of claim 6, wherein stopping casting the screen of the second client when the screen-casting-end request is monitored comprises:
when the screen projection ending request is monitored, destroying a second screen projection display window corresponding to the second client;
and deleting the second state identification from the device state list.
8. A multi-threaded screen projection apparatus, comprising:
the device comprises an acquisition module, a display module and a display module, wherein the acquisition module is used for acquiring a device state list when receiving a first screen projection request sent by a first client, the device state list is used for storing state identifiers of screen projection clients, and each state identifier corresponds to one screen projection client;
the judging module is used for determining a first number of the state identifiers in the equipment state list and judging whether the first number reaches a preset upper limit;
the screen projection module is used for projecting a screen to the first client according to the first screen projection request if the first quantity does not reach the preset upper limit;
and the transfer module is used for transferring the first screen projection request into a waiting queue if the first number reaches the preset upper limit.
9. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method steps of any one of claims 1 to 7.
10. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method steps of any of claims 1-7 when executing the program.
CN202010338855.0A 2020-04-26 2020-04-26 Multithreading screen projection method and device Pending CN111552565A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010338855.0A CN111552565A (en) 2020-04-26 2020-04-26 Multithreading screen projection method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010338855.0A CN111552565A (en) 2020-04-26 2020-04-26 Multithreading screen projection method and device

Publications (1)

Publication Number Publication Date
CN111552565A true CN111552565A (en) 2020-08-18

Family

ID=72003046

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010338855.0A Pending CN111552565A (en) 2020-04-26 2020-04-26 Multithreading screen projection method and device

Country Status (1)

Country Link
CN (1) CN111552565A (en)

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111766998A (en) * 2020-09-03 2020-10-13 湖南新云网科技有限公司 Data interaction method and device, electronic equipment and computer readable storage medium
CN112019914A (en) * 2020-08-27 2020-12-01 北京字节跳动网络技术有限公司 Screen projection method and device, electronic equipment and computer readable medium
CN112019897A (en) * 2020-08-27 2020-12-01 北京字节跳动网络技术有限公司 Screen projection method and device, electronic equipment and computer readable medium
CN112019898A (en) * 2020-08-27 2020-12-01 北京字节跳动网络技术有限公司 Screen projection method and device, electronic equipment and computer readable medium
CN112019896A (en) * 2020-08-27 2020-12-01 北京字节跳动网络技术有限公司 Screen projection method and device, electronic equipment and computer readable medium
CN112423073A (en) * 2020-09-30 2021-02-26 西安万像电子科技有限公司 Remote control method and system for screen projection equipment
CN113703706A (en) * 2021-08-27 2021-11-26 海信视像科技股份有限公司 Display method, display device and terminal for multi-path screen projection
WO2022042592A1 (en) * 2020-08-27 2022-03-03 北京字节跳动网络技术有限公司 Screen projection method and apparatus, electronic device, and computer-readable medium
CN114173184A (en) * 2020-09-10 2022-03-11 华为终端有限公司 Screen projection method and electronic equipment
CN114461159A (en) * 2021-12-31 2022-05-10 惠州华阳通用电子有限公司 Screen projection control method
CN114793291A (en) * 2022-01-25 2022-07-26 深圳软牛科技有限公司 IOS multi-device real-time screen projection method and system, computer device and storage medium
CN115643309A (en) * 2022-10-27 2023-01-24 极道科技(北京)有限公司 Dynamic flow control method and system based on request scheduling queue length
WO2023045761A1 (en) * 2021-09-27 2023-03-30 华为技术有限公司 Screen mirroring control method and apparatus

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104461710A (en) * 2014-12-12 2015-03-25 北京国双科技有限公司 Method and device for processing tasks
WO2017166617A1 (en) * 2016-03-31 2017-10-05 乐视控股(北京)有限公司 Terminal control method and apparatus, and electronic device
CN110515573A (en) * 2018-05-21 2019-11-29 腾讯科技(深圳)有限公司 Throw screen method, apparatus, system and computer equipment

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104461710A (en) * 2014-12-12 2015-03-25 北京国双科技有限公司 Method and device for processing tasks
WO2017166617A1 (en) * 2016-03-31 2017-10-05 乐视控股(北京)有限公司 Terminal control method and apparatus, and electronic device
CN110515573A (en) * 2018-05-21 2019-11-29 腾讯科技(深圳)有限公司 Throw screen method, apparatus, system and computer equipment

Cited By (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112019914A (en) * 2020-08-27 2020-12-01 北京字节跳动网络技术有限公司 Screen projection method and device, electronic equipment and computer readable medium
CN112019897A (en) * 2020-08-27 2020-12-01 北京字节跳动网络技术有限公司 Screen projection method and device, electronic equipment and computer readable medium
CN112019898A (en) * 2020-08-27 2020-12-01 北京字节跳动网络技术有限公司 Screen projection method and device, electronic equipment and computer readable medium
CN112019896A (en) * 2020-08-27 2020-12-01 北京字节跳动网络技术有限公司 Screen projection method and device, electronic equipment and computer readable medium
CN112019914B (en) * 2020-08-27 2021-10-22 北京字节跳动网络技术有限公司 Screen projection method and device, electronic equipment and computer readable medium
WO2022042592A1 (en) * 2020-08-27 2022-03-03 北京字节跳动网络技术有限公司 Screen projection method and apparatus, electronic device, and computer-readable medium
CN111766998B (en) * 2020-09-03 2021-06-01 湖南新云网科技有限公司 Data interaction method and device, electronic equipment and computer readable storage medium
CN111766998A (en) * 2020-09-03 2020-10-13 湖南新云网科技有限公司 Data interaction method and device, electronic equipment and computer readable storage medium
CN114173184A (en) * 2020-09-10 2022-03-11 华为终端有限公司 Screen projection method and electronic equipment
CN112423073A (en) * 2020-09-30 2021-02-26 西安万像电子科技有限公司 Remote control method and system for screen projection equipment
CN113703706A (en) * 2021-08-27 2021-11-26 海信视像科技股份有限公司 Display method, display device and terminal for multi-path screen projection
WO2023045761A1 (en) * 2021-09-27 2023-03-30 华为技术有限公司 Screen mirroring control method and apparatus
CN114461159A (en) * 2021-12-31 2022-05-10 惠州华阳通用电子有限公司 Screen projection control method
CN114461159B (en) * 2021-12-31 2024-04-09 惠州华阳通用电子有限公司 Screen throwing control method
CN114793291A (en) * 2022-01-25 2022-07-26 深圳软牛科技有限公司 IOS multi-device real-time screen projection method and system, computer device and storage medium
CN114793291B (en) * 2022-01-25 2023-11-07 深圳软牛科技有限公司 IOS multi-device real-time screen projection method, system, computer device and storage medium
CN115643309A (en) * 2022-10-27 2023-01-24 极道科技(北京)有限公司 Dynamic flow control method and system based on request scheduling queue length

Similar Documents

Publication Publication Date Title
CN111552565A (en) Multithreading screen projection method and device
CN109451051B (en) Service request processing method and device, electronic equipment and storage medium
CN112346859A (en) Resource scheduling method and device, electronic equipment and storage medium
CN105320561A (en) Task management method and system
CN110580188B (en) Multithreading network allocation method and storage medium
CN110795284B (en) Data recovery method, device and equipment and readable storage medium
CN112988346B (en) Task processing method, device, equipment and storage medium
CN113900754A (en) Desktop sharing method and device, computer equipment and storage medium
CN109218817B (en) Method and device for displaying virtual gift prompting message
CN112148480A (en) Task processing method, device and equipment based on multithreading and storage medium
CN114071230B (en) Multi-terminal screen throwing method, computer equipment and computer readable storage medium
CN111282263A (en) Event message processing method and device, electronic equipment and readable storage medium
CN106331764A (en) Panoramic video sharing method and panoramic video sharing device
CN107396030B (en) Video call processing method and scheduling control terminal
CN107566809B (en) Video monitoring alarm method, device and system
EP4089533A2 (en) Pooling user interface engines for cloud ui rendering
CN104348886A (en) Information processing method and electronic equipment
CN113099247B (en) Virtual resource processing method, device, server, storage medium and program product
CN111813541B (en) Task scheduling method, device, medium and equipment
CN111984424A (en) Task processing method, device, equipment and computer readable storage medium
CN111953932A (en) Data processing method and device, terminal equipment and storage medium
CN115278278B (en) Page display method and device, electronic equipment and storage medium
CN107291530B (en) Data processing method and device
CN113014945B (en) Data processing method and device, storage medium and computer equipment
CN115297259B (en) Camera management method, terminal and storage medium

Legal Events

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

Application publication date: 20200818

RJ01 Rejection of invention patent application after publication