CN112218133A - Screen projection code generation method and device and terminal equipment - Google Patents
Screen projection code generation method and device and terminal equipment Download PDFInfo
- Publication number
- CN112218133A CN112218133A CN202010969026.2A CN202010969026A CN112218133A CN 112218133 A CN112218133 A CN 112218133A CN 202010969026 A CN202010969026 A CN 202010969026A CN 112218133 A CN112218133 A CN 112218133A
- Authority
- CN
- China
- Prior art keywords
- code
- screen
- screen projection
- projection code
- address
- 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.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 46
- 238000004590 computer program Methods 0.000 claims description 23
- 238000003491 array Methods 0.000 claims description 11
- 238000006243 chemical reaction Methods 0.000 claims description 11
- 238000004891 communication Methods 0.000 claims description 11
- 238000005266 casting Methods 0.000 claims description 9
- 238000013519 translation Methods 0.000 claims description 3
- 230000003014 reinforcing effect Effects 0.000 abstract description 2
- 230000006870 function Effects 0.000 description 8
- 238000010586 diagram Methods 0.000 description 7
- 230000008569 process Effects 0.000 description 7
- 238000012545 processing Methods 0.000 description 4
- 230000004044 response Effects 0.000 description 4
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 230000005540 biological transmission Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000003247 decreasing effect Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/41—Structure of client; Structure of client peripherals
- H04N21/4104—Peripherals receiving signals from specially adapted client devices
- H04N21/4122—Peripherals receiving signals from specially adapted client devices additional display device, e.g. video projector
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/14—Digital output to display device ; Cooperation and interconnection of the display device with other functional units
- G06F3/1454—Digital 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
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
- H04N21/441—Acquiring end-user identification, e.g. using personal code sent by the remote control or by inserting a card
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/45—Management operations performed by the client for facilitating the reception of or the interaction with the content or administrating data related to the end-user or to the client device itself, e.g. learning user preferences for recommending movies, resolving scheduling conflicts
- H04N21/4508—Management of client data or end-user data
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/60—Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client
- H04N21/63—Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
- H04N21/64—Addressing
- H04N21/6402—Address allocation for clients
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/60—Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client
- H04N21/63—Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
- H04N21/643—Communication protocols
- H04N21/64322—IP
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Theoretical Computer Science (AREA)
- Databases & Information Systems (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Controls And Circuits For Display Device (AREA)
Abstract
The embodiment of the application provides a screen projection code generation method, a screen projection code generation device and terminal equipment, wherein the method is applied to a sending end and comprises the following steps: acquiring a first screen projection code; decrypting the first screen projection code to obtain a first IP address of a receiving end; sending the first screen projection code to the receiving end according to the first IP address; and when first indication information from the receiving end is received, screen projection is carried out, wherein the first indication information is used for describing that the receiving end allows screen projection. This application embodiment combines throwing screen code and IP address through throwing, lets the user only need know to throw the screen code, just can throw the screen code and throw the screen in the direct input of cross-network section, no longer need input IP address to the screen flow is thrown in the simplification, effectively improves work efficiency, has promoted user experience, reinforcing user stickness.
Description
Technical Field
The application belongs to the technical field of computers, and particularly relates to a screen projection code generation method and device and terminal equipment.
Background
General wireless video transmission, because it is wireless, need not be connected with the line, as long as under same LAN, just can search the equipment of receiving terminal, in order to prevent to throw wrong receiving terminal, can use usually and throw the screen code, throw the screen code at the receiving terminal demonstration, only can see and throw the screen code at the personnel on-the-spot, it throws the screen code to need the user input when the wireless screen of request, and submit, check-up is carried out at the receiving terminal, only when the receiving terminal passes through the check-up, can normally throw the screen.
In the existing video transmission, a user usually needs to input an IP address and then input a correct screen-projecting code to project a screen, the user needs to know the IP address of a receiving end to project the screen, and the user needs to input the IP address and the screen-projecting code in sequence, namely, data needs to be input twice, so that the difficulty of the user is increased invisibly, and the working efficiency is reduced.
Disclosure of Invention
The embodiment of the application provides a screen projection code generation method, a screen projection code generation device and terminal equipment, which can simplify a screen projection process and effectively improve the working efficiency.
In a first aspect, an embodiment of the present application provides a screen-projecting code generation method, which is applied to a sending end, and includes:
acquiring a first screen projection code;
decrypting the first screen projection code to obtain a first IP address of a receiving end;
sending the first screen projection code to the receiving end according to the first IP address;
and when first indication information from the receiving end is received, screen projection is carried out, wherein the first indication information is used for describing that the receiving end allows screen projection. In a second aspect, an embodiment of the present application provides a screen projection code generating method, which is applied to a receiving end, and includes:
acquiring a second IP address of the equipment;
encrypting the second IP address to obtain a second screen projection code;
displaying the second screen projection code;
receiving a first screen projection code from a sending end;
and when the first screen projection code is consistent with the second screen projection code, sending first indication information to the sending terminal, wherein the first indication information is used for describing that the sending terminal is allowed to project the screen.
In a third aspect, an embodiment of the present application provides a screen projection code generating apparatus, including:
the input module is used for acquiring a first screen projection code;
the decryption module is used for decrypting the first screen projection code to obtain a first IP address of a receiving end;
the first communication module is used for sending the first screen projection code to the receiving end according to the first IP address;
and the first authentication module is used for performing screen projection when first indication information from the receiving end is received, and the first indication information is used for describing that the receiving end allows screen projection.
In a fourth aspect, an embodiment of the present application provides a screen projection code generating apparatus, including:
the address module is used for acquiring a second IP address of the equipment;
the encryption module is used for encrypting the second IP address to obtain a second screen projection code;
the display module is used for displaying the second screen projection code;
the second communication module is used for receiving the first screen projection code from the sending end;
and the second authentication module is used for sending first indication information to the sending end when the first screen-throwing code is consistent with the second screen-throwing code, wherein the first indication information is used for describing that the sending end is allowed to throw the screen.
In a fifth aspect, an embodiment of the present application provides a terminal device, a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the screen projection code generating method of any one of the first aspect or the second aspect when executing the computer program.
In a sixth aspect, an embodiment of the present application provides a computer program product, which, when running on a terminal device, causes the terminal device to execute the screen projection code generating method described in any one of the first aspect or the second aspect.
It is understood that the beneficial effects of the second to sixth aspects can be seen from the description of the first aspect, and are not described herein again.
Compared with the prior art, the embodiment of the application has the advantages that: the embodiment of the application provides a screen projection code generation method, which is applied to a sending end and comprises the following steps: acquiring a first screen projection code; decrypting the first screen projection code to obtain a first IP address of a receiving end; sending the first screen projection code to the receiving end according to the first IP address; and when first indication information from the receiving end is received, screen projection is carried out, wherein the first indication information is used for describing that the receiving end allows screen projection. This application embodiment combines throwing screen code and IP address through throwing, lets the user only need know to throw the screen code, just can throw the screen code and throw the screen in the direct input of cross-network section, no longer need input IP address to the screen flow is thrown in the simplification, effectively improves work efficiency, has promoted user experience, reinforcing user stickness.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
Fig. 1 is a schematic flowchart of a screen projection code generation method according to an embodiment of the present application;
fig. 2 is a schematic flowchart of a screen projection code generation method according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of a screen projection code generation apparatus provided in an embodiment of the present application;
fig. 4 is a schematic structural diagram of a screen projection code generation apparatus provided in an embodiment of the present application;
fig. 5 is a schematic structural diagram of a terminal device according to an embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It should also be understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
As used in this specification and the appended claims, the term "if" may be interpreted contextually as "when", "upon" or "in response to" determining "or" in response to detecting ". Similarly, the phrase "if it is determined" or "if a described condition or event is detected" may be interpreted, depending on the context, to mean "upon determining" or "in response to determining" or "upon detecting a described condition or event" or "in response to detecting a described condition or event".
Furthermore, in the description of the present application and the appended claims, the terms "first," "second," "third," and the like are used for distinguishing between descriptions and not necessarily for describing or implying relative importance.
Reference throughout this specification to "one embodiment" or "some embodiments," or the like, means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the present application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," or the like, in various places throughout this specification are not necessarily all referring to the same embodiment, but rather "one or more but not all embodiments" unless specifically stated otherwise. The terms "comprising," "including," "having," and variations thereof mean "including, but not limited to," unless expressly specified otherwise.
The technical solutions provided in the embodiments of the present application are explained in detail below.
Referring to fig. 1, a flow diagram of a screen-shot code generation method is shown, and is applied to a sending end, where the method may include the following steps:
step S101: acquiring a first screen projection code;
and after the user sees the screen projection code displayed by the receiving end, the screen projection code is input at the sending end. The screen projecting code input by the user is the same as the screen projecting code displayed by the receiving end, but the user may input errors in the actual operation process, so for distinguishing, the screen projecting code actually input by the user at the transmitting end is recorded as a first screen projecting code, and the screen projecting code displayed by the receiving end is recorded as a second screen projecting code.
Step S102: decrypting the first screen-projecting code to obtain a first IP address of a receiving end, comprising:
converting the first screen projection code into 10-system data, wherein the first screen projection code is R-system;
and converting the 10-system data into a first IP address.
The method comprises the following steps of converting the first screen projection code into 10-system data, wherein the method comprises three possible implementation modes:
in one possible implementation, the first screen-casting code is converted into 10-system data according to a system conversion. If the first screen projection code is X1X2X3X4X5X6X7 in 36-system, firstly converting into 10-system data:
Z=X1*36*36*36*36*36*36+X2*36*36*36*36*36+X3*36*36*36*36X3+X4*36*36*36+X5*36*36+X6*36+X7;
then, the 10-system data Z is converted into the first IP address, P1 is Z/(255) rounded, and the rest is Z1
P2 is Z1/(255 × 255) rounded, and the rest is Z2
P3 is P3/255 and P4 is left.
The IP address is obtained to be P1.P2.P3. P4.
In another possible implementation manner, under the condition that the encryption algorithm has an index bit, the index bit does not need to be converted into a 10-system during decryption, so according to the position and the numerical value of the index bit agreed in advance, other characters except the index bit in the first screen projection code are selected firstly, namely the preset index bit in the first screen projection code is removed, and the screen projection code after the index bit is removed is updated into the first screen projection code; and then, according to the system conversion, converting the first screen projection code into 10 system data, and converting the 10 system data into a first IP address.
In another possible implementation manner, when the encryption algorithm has an index bit and is further encoded, the screen-projecting code needs to be restored according to the corresponding relationship between the index bit and the array, then the screen-projecting code is converted into a 10-system, and then the 10-system data is converted into the first IP address. Similarly, the index bit does not need to be converted into a 10-system during decryption, so that according to the position and the numerical value of the index bit agreed in advance, other characters except the index bit in the first screen projecting code are selected firstly, namely the preset index bit in the first screen projecting code is removed; after the preset index bits in the first screen projecting code are removed, finding out corresponding first new characters from each character in the screen projecting code after the index bits are removed according to the preset corresponding relation between the index bits and an array, wherein the array is R different arrays consisting of R characters in an R system, and each character in each array corresponds to 0-R-1 first new characters when different index bits are respectively corresponding to the characters in each array;
concatenating the first new character into a first string;
updating the first character string into a first screen-projecting code;
and converting the first screen projection code into 10-system data according to system conversion.
Wherein, according to the setting during encryption, the number of index bits is the same as the R system, for example, 36 systems are selected, and the number of index bits is 36; if 64 is selected, the index bits are 64 bits in total.
And each array comprises R characters, and according to a preset corresponding relation, each character in R different arrays after the sequence is disordered corresponds to a first new character from 0 to R < -1 > when the character corresponds to different index positions. Usually, the number of the arrays may be R different, for example, the array number is the value of the index bit, for example, if the index bit is 3, the corresponding array number is 3, so that the corresponding array can be found according to the value of the index bit. Each character in the first screen-projecting code is found in the array, and optionally, the numerical value corresponding to the position sequence of each character is the same as the numerical value corresponding to the first new character, that is, the subscript of each character is the same as the numerical value corresponding to the first character.
For example, R different arrays may be combined, in order of starting characters but in order of size. Taking R as 36 as an example:
0 th array: 0123456789 ABCDEFGHIJKLMNOPQRSTHWXYZ
Array 1: z0123456789 ABCDEFGHIJKLMNOPQRSTHWXY
Number 2 group: YZ0123456789 ABCDEFGHIJKLMNOPQRSTHWX
Array No. 3: XYZ0123456789 ABCDEFGHIJKLMNOPQRSTHUVW
Array 4: WXYZ0123456789ABCDEFGHIJKLMNOPQRSTUV
.....................................................................
Array 35: BCDEFGHIJKLMNOPQRSTHWXYZ 0123456789A
If the preset index bit is 0, finding the 0 th array; if the preset index bit is 1, finding the 1 st array; if the preset index bit is 3, the 3 rd array is found.
Taking the 1 st array as an example, Z0123456789ABCDEFGHIJKLMNOPQRSTUVWXY, where the numerical value corresponding to the position order of Z in the array is 0, so that the character Z in the array corresponds to the first new character 0; wherein, the numerical value corresponding to the position sequence of the character 0 in the array is 1, so the character Z in the array corresponds to the first new character 1; the numerical value corresponding to the position sequence of the character 1 in the array is 2, so the character 1 in the array corresponds to the first new character 2 … …, and so on, the numerical value corresponding to the position sequence of the character Y in the array is 35, so the character Y in the array corresponds to the first new character Z.
Similarly, the 2 nd group YZ0123456789ABCDEFGHIJKLMNOPQRSTUVWX may represent 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ, the character Y in the group corresponds to the first new character 0, the character Z in the group corresponds to the first new character 1, the character 0 in the group corresponds to the first new character 2, and the character 1 in the group corresponds to the first new character 3.
Of course, the starting characters may be different, but the starting characters need to be in the order from large to small, and the starting characters can be combined into R different arrays. The specific correspondence relationship is similar to the order from small to large, and is not described herein again.
Taking the first screen-projecting code as 10FSXGLL as an example, the preset index bit is the first 1, and the 1 st array is: z0123456789ABCDEFGHIJKLMNOPQRSTUVWXY, finding out the numerical value corresponding to the position sequence of each character except the first screen-projecting code rejection index bit, i.e. the subscript value, in the 1 st array, so as to obtain that 0 in the array corresponds to the first new character 1, F in the array corresponds to the first new character G, S in the array corresponds to the first new character T, X in the array corresponds to the first new character Y, G in the array corresponds to the first new character H, L in the array corresponds to the first new character M, and L in the array corresponds to the first new character M, so that the decrypted first screen-projecting code is 1 GTYHMM.
By analogy, the corresponding updated first screen projection code when the index bit is any value between 0 and 35 can be obtained. And will not be described in detail herein.
Step S103: and sending the first screen projection code to the receiving end according to the first IP address.
The sending end initiates a communication request to the receiving end based on the first IP address, establishes communication with the receiving end and sends the first screen projection code to the receiving end.
Step S104: and when first indication information from the receiving end is received, screen projection is carried out, wherein the first indication information is used for describing that the receiving end allows screen projection.
And when second indication information from the receiving end is received, displaying the second indication information, wherein the second indication information is used for describing screen projection code errors.
Referring to fig. 2, a schematic flow chart of a screen projection code generating method is shown, and the method is applied to a receiving end, and may include the following steps:
step S201: and acquiring a second IP address of the equipment.
The device is a receiving end, the receiving end is a screen projection terminal, and the receiving end can be a desktop computer, a notebook computer, a palm computer, an all-in-one computer and other computing devices. The screen projection terminal can project a large screen. The screen projection terminal can be provided with a corresponding application program, and a user can obtain the screen projection service provided by the system through the application program. Of course, the screen projection service provided by the system can also be presented by a public number (e.g., WeChat public number) or an applet (e.g., WeChat applet) or the like. That is to say, if a user needs the screen projection service provided by the embodiment of the present application, the platform system provided by the embodiment of the present application may be accessed by a corresponding application program, a public number, an applet, or the like, and the user performs screen projection by using the platform system.
Step S202: encrypting the second IP address to obtain a second screen projection code;
the second IP address translation is first converted to 10-ary data. The second IP address translation IPV4 addresses a maximum of 255.255.255.255, denoted respectively by p1.p2.p3.p 4.
Z=P1*255*255*255+P2*255*255+P3*255+P4
Obtaining Z as decimal data, and converting the 10-system data into a second screen projection code of R-system. The R system can be flexibly selected, for example, hexadecimal, thirty system, thirty-six system, sixty-four system, etc., and the screen-casting code bits required for selecting different systems are slightly different, so that a proper R system can be selected according to actual conditions.
In one possible implementation, the 10-system data is converted into the second screen-projecting code of the R-system according to the system conversion. For example, taking R as 36:
x1 ═ Z/(36 × 36); the rest K1;
x2 ═ K1/(36 × 36); the rest K2;
x3 ═ K2/(36 × 36); the rest K3;
x4 ═ K3/(36 × 36 ═ 36); the rest K4;
x5 ═ K4/(36 × 36); the rest K5;
x6 ═ K4/(36); the remainder X7;
the second screen projection code is converted to 36 system as 1GTYHMM, i.e. the second screen projection code is 1 GTYHMM.
In the embodiment of the application, the IP addresses are converted into screen-projecting codes of the R scale through an encryption algorithm, and each IP address corresponds to a fixed and unique screen-projecting code under the R scale. Therefore, if the corresponding IP address of the screen projection terminal is fixed and the user records the screen projection code, the encryption algorithm loses meaning.
In another possible implementation manner, in order to improve the problem that the encryption algorithm loses meaning, a preset index bit is further added on the basis of the original second screen projection code, and the second screen projection code is updated. The position and value of the index bit can be set according to a pre-negotiated rule. For example, the position of the index bit can be flexibly selected, and the index bit can be in front of, behind or inserted into any position in the middle of the original second screen-projecting code. The specific value of the index bit can be dynamically changed, for example, random values are taken from 0 to R at fixed time intervals.
In another possible implementation manner, the screen-projecting code may be further encoded according to a value of the index bit on the basis of increasing the index bit, and specifically includes:
the first step is as follows: and converting the 10-system data into a second screen projection code of an R-system according to the system conversion.
The second step is that: and finding out a second new character corresponding to each character of the second screen projecting code in an array corresponding to the index bit according to a preset corresponding relation, wherein the array consists of R characters in an R system.
The number of index bits of the index bits is the same as the R system, for example, 36 systems are selected, and the number of the index bits is 36; if 64 is selected, the index bits are 64 bits in total.
And randomly scrambling R characters in an R system to generate R different arrays, wherein each array comprises R second new characters, and according to a preset corresponding relation, 0-R-1 characters are generated when each second new character in the R different arrays after the scrambling sequence corresponds to different index bits respectively. Usually, the number of the arrays may be R different, for example, the array number is the value of the index bit, for example, if the index bit is 3, the corresponding array number is 3, so that the corresponding array can be found according to the value of the index bit. The numerical value corresponding to the position sequence of each second new character in the array, namely the subscript value, is usually used as the character in the screen-shot code corresponding to the second new character.
For example, R different arrays may be combined, in order of starting characters but in order of size. Taking R as 36 as an example:
0 th array: 0123456789 ABCDEFGHIJKLMNOPQRSTHWXYZ
Array 1: z0123456789 ABCDEFGHIJKLMNOPQRSTHWXY
Number 2 group: YZ0123456789 ABCDEFGHIJKLMNOPQRSTHWX
Array No. 3: XYZ0123456789 ABCDEFGHIJKLMNOPQRSTHUVW
Array 4: WXYZ0123456789ABCDEFGHIJKLMNOPQRSTUV
.....................................................................
Array 35: BCDEFGHIJKLMNOPQRSTHWXYZ 0123456789A
If the index bit is 0, finding the 1 st array; if the index bit is 1, finding the 1 st array; if the index bit is 3, then find the 3 rd array.
Taking the 1 st array as an example, Z0123456789ABCDEFGHIJKLMNOPQRSTUVWXY, wherein the numerical value corresponding to the position sequence of the second new character Z in the array is 0, so that the character 0 in the screen-projected code corresponding to the second new character Z in the array is; the numerical value corresponding to the position sequence of the second new character 0 in the array is 1, so that the character 1 in the screen-projecting code corresponding to the second new character Z in the array is 1; the numerical value corresponding to the position sequence of the second new character 1 in the array is 2, so that the character 2 … … in the screen-casting code corresponding to the second new character 1 in the array is obtained, and by analogy, the numerical value corresponding to the position sequence of the second new character Y in the array is 35, so that the character Z in the screen-casting code corresponding to the second new character Y in the array is obtained.
Similarly, the 2 nd group YZ0123456789ABCDEFGHIJKLMNOPQRSTUVWX may represent 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ, character 0 in the screen-projected code corresponding to the second new character Y in the group, character 1 in the screen-projected code corresponding to the second new character Z in the group, character 2 in the screen-projected code corresponding to the second new character 0 in the group, and character 3 in the screen-projected code corresponding to the second new character 1 in the group.
Of course, the starting characters may be different, but the starting characters need to be in the order from large to small, and the starting characters can be combined into R different arrays. The specific correspondence relationship is similar to the order from small to large, and is not described herein again.
The third step: concatenating the second new character into a second string;
the fourth step: and adding a preset index bit to the second character string, and updating the second character string after the index bit is added into a second screen-projecting code.
Similarly, the position and value of the index bit can be set according to a pre-negotiated rule.
Taking the second IP address as 192.168.43.1 and the R scale as 36, converting into decimal data as 192 × 255+168 × 255+43 × 255+1 ═ 3183624000+10924200+10965+1 ═ 3194559166;
converted to 36 GTYHMM.
If the index bit is 0, then the corresponding 0 th array is:
0123456789 ABCDEFGHIJKLMNOPQRSTHWXYZ, 1 corresponding to 1, G corresponding to G, T corresponding to T, Y corresponding to Y, H corresponding to H, M corresponding to M, and screen projection code of 01 GTYHMM;
if the index bit is 1 and the preset position is arranged in front of the screen projection code, the 1 st array corresponds to the 1 st array, and the 1 st array is as follows: comprises the following steps:
z0123456789 ABCDEFGHIJKLMNOPQRSTHWXY, a screen-projecting code 1 corresponds to a second new character 0, a screen-projecting code G corresponds to a second new character F, a screen-projecting code T corresponds to a second new character S, a screen-projecting code Y corresponds to a second new character X, a screen-projecting code H corresponds to a second new character G, a screen-projecting code M corresponds to a second new character L, and the updated screen-projecting code is 10 FSXGLL;
if the index bit is 2 and the preset position is arranged in front of the screen projection code, the 2 nd array corresponds to the 2 nd array, and the 2 nd array is: YZ0123456789 ABCDEFGHIJKLMNOPQRSTHWX, a screen-projecting code 1 corresponds to a second new character Z, a screen-projecting code G corresponds to a second new character E, a screen-projecting code T corresponds to a second new character R, a screen-projecting code Y corresponds to a second new character W, a screen-projecting code H corresponds to a second new character F, a screen-projecting code M corresponds to a second new character K, and the updated screen-projecting code is 2 ZERWFKK;
if the index bit is 3 and the index bit is preset to be arranged in front of the screen projection code, the index bit corresponds to a 3 rd array, and the 3 rd array is as follows: XYZ0123456789 ABCDEFGHIJKLMNOPQRSTHW, the screen-projecting code 1 corresponds to a second new character Y, the screen-projecting code G corresponds to a second new character D, the screen-projecting code T corresponds to a second new character Q, the screen-projecting code Y corresponds to a second new character V, the screen-projecting code H corresponds to a second new character E, the screen-projecting code M corresponds to a second new character J, and the updated screen-projecting code is 3 YDQVEJJ.
By analogy, the updated screen projection code corresponding to the index bit with any value between 0 and 35 can be obtained.
Step S203: and displaying the second screen projection code.
And displaying the second screen projection code for a user on site to see so that the user can input the screen projection code at the transmitting end.
Step S204: and receiving a first screen projection code from a sending end.
And receiving a communication request initiated by the sending terminal based on the first IP address, and receiving a first screen projection code input by a user of the sending terminal.
Step S205: and when the first screen projection code is consistent with the second screen projection code, sending first indication information to the sending terminal, wherein the first indication information is used for describing that the sending terminal is allowed to project the screen.
And when the first screen projection code is inconsistent with the second screen projection code, sending second prompt information to the sending end, wherein the second prompt information is used for describing screen projection code errors.
According to the screen projection method and the screen projection device, the IP address is converted into the second screen projection code through the encryption algorithm, the second screen projection code is displayed at the screen projection terminal, and the user can see the second screen projection code, so that the user can input the simple screen projection code to realize screen projection, the user does not need to input the complicated IP address, the user operation is simplified, the screen projection efficiency is improved, and the user experience is improved.
Referring to fig. 3, which is a schematic structural diagram of a device for generating a screen projection code according to an embodiment of the present application, for convenience of description, only a portion related to the embodiment of the present invention is shown, and the device includes:
the input module 31 is used for acquiring a first screen projection code;
the decryption module 32 is configured to decrypt the first screen-projecting code to obtain a first IP address of the receiving end;
the first communication module 33 is configured to send the first screen projection code to the receiving end according to the first IP address;
the first authentication module 34 is configured to perform screen projection when first indication information from the receiving end is received, where the first indication information is used to describe that the receiving end allows screen projection.
Referring to fig. 4, which is a schematic structural diagram of a device for generating a screen projection code according to an embodiment of the present application, for convenience of description, only a portion related to the embodiment of the present invention is shown, and the device includes:
an address module 41, configured to obtain a second IP address of the device;
the encryption module 42 is configured to encrypt the second IP address to obtain a second screen-projecting code;
a display module 43, configured to display the second screen projection code;
the second communication module 44 is configured to receive the first screen-casting code from the sending end;
and a second authentication module 45, configured to send first indication information to the sending end when the first screen-casting code is consistent with the second screen-casting code, where the first indication information is used to describe that the sending end is allowed to cast a screen.
It will be apparent to those skilled in the art that, for convenience and simplicity of description, the foregoing division of the functional modules is merely illustrated, and in practical applications, the above function distribution may be performed by different functional units and modules as needed, that is, the internal structure of the mobile terminal is divided into different functional units or modules to perform all or part of the above described functions. Each functional module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional modules are only used for distinguishing one functional module from another, and are not used for limiting the protection scope of the application. The specific working process of the module in the mobile terminal may refer to the corresponding process in the foregoing method embodiment, and is not described herein again.
Fig. 5 is a schematic diagram of a terminal device according to an embodiment of the present invention. As shown in fig. 5, the terminal device 5 of this embodiment includes: a processor 50, a memory 51 and a computer program 52 stored in said memory 51 and executable on said processor 50. The processor 50, when executing the computer program 52, implements the steps of the screen-shot code generation method described above, such as steps 101 to 104 shown in fig. 1, and such as steps 201 to 205 shown in fig. 2. Alternatively, the processor 50, when executing the computer program 52, implements the functions of the modules/units in the device embodiments described above, such as the functions of the modules 31 to 34 shown in fig. 3, and the functions of the modules 41 to 45 shown in fig. 4.
Illustratively, the computer program 52 may be partitioned into one or more modules/units that are stored in the memory 51 and executed by the processor 50 to implement the present invention. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution process of the computer program 52 in the terminal device 5.
The terminal device 5 may be a desktop computer, a notebook, a palm computer, or other computing devices. The terminal device may include, but is not limited to, a processor 50, a memory 51. Those skilled in the art will appreciate that fig. 5 is merely an example of a terminal device 5 and does not constitute a limitation of terminal device 5 and may include more or fewer components than shown, or some components may be combined, or different components, e.g., the terminal device may also include input-output devices, network access devices, buses, etc.
The Processor 50 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 51 may be an internal storage unit of the terminal device 5, such as a hard disk or a memory of the terminal device 5. The memory 51 may also be an external storage device of the terminal device 5, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the terminal device 5. Further, the memory 51 may also include both an internal storage unit and an external storage device of the terminal device 5. The memory 51 is used for storing the computer program and other programs and data required by the terminal device. The memory 51 may also be used to temporarily store data that has been output or is to be output.
The embodiments of the present application further provide a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the computer program implements the steps in the above-mentioned method embodiments.
The embodiments of the present application provide a computer program product, which when running on a mobile terminal, enables the mobile terminal to implement the steps in the above method embodiments when executed.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus/terminal device and method may be implemented in other ways. For example, the above-described embodiments of the apparatus/terminal device are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated modules/units, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, all or part of the flow of the method according to the embodiments of the present invention may also be implemented by a computer program, which may be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method embodiments may be implemented. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain other components which may be suitably increased or decreased as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media which may not include electrical carrier signals and telecommunications signals in accordance with legislation and patent practice.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present invention, and are intended to be included within the scope of the present invention.
Claims (10)
1. A screen-projecting code generation method is applied to a sending end and is characterized by comprising the following steps:
acquiring a first screen projection code;
decrypting the first screen projection code to obtain a first IP address of a receiving end;
sending the first screen projection code to the receiving end according to the first IP address;
and when first indication information from the receiving end is received, screen projection is carried out, wherein the first indication information is used for describing that the receiving end allows screen projection.
2. The method of claim 1, further comprising:
and when second indication information from the receiving end is received, displaying the second indication information, wherein the second indication information is used for describing screen projection code errors.
3. The screen-projecting code generating method of claim 1, wherein decrypting the screen-projecting code to obtain the first IP address of the receiving end comprises:
converting the first screen projection code into 10-system data, wherein the first screen projection code is R-system;
converting the 10-system data into a first IP address;
converting the first screen projection code into 10-system data, wherein the converting comprises:
converting the first screen projection code into 10-system data according to system conversion;
or,
removing preset index bits in the first screen projection code, and updating the screen projection code after the index bits are removed into the first screen projection code;
converting the first screen projection code into 10-system data according to system conversion;
or,
after the preset index bits in the first screen projecting code are removed, finding out corresponding first new characters from each character in the screen projecting code after the index bits are removed according to the preset corresponding relation between the index bits and an array, wherein the array is R different arrays consisting of R characters in an R system, and each character in each array corresponds to 0-R-1 first new characters when different index bits are respectively corresponding to the characters in each array;
concatenating the first new character into a first string;
updating the first character string into a first screen-projecting code;
and converting the first screen projection code into 10-system data according to system conversion.
4. A screen projection code generation method is applied to a receiving end and is characterized by comprising the following steps:
acquiring a second IP address of the equipment;
encrypting the second IP address to obtain a second screen projection code;
displaying the second screen projection code;
receiving a first screen projection code from a sending end;
and when the first screen projection code is consistent with the second screen projection code, sending first indication information to the sending terminal, wherein the first indication information is used for describing that the sending terminal is allowed to project the screen.
5. The screen-cast code generation method of claim 4, wherein the method further comprises:
and when the first screen projection code is inconsistent with the second screen projection code, sending second prompt information to the sending end, wherein the second prompt information is used for describing screen projection code errors.
6. The screen-casting code generation method of claim 4, wherein encrypting the second IP address to obtain a second screen-casting code comprises:
converting the second IP address translation into 10-system data;
converting the 10-system data into a second screen projection code of an R-system;
converting the 10-system data into a R-system second screen projection code, wherein the converting comprises:
converting the 10-system data into a second screen projection code of an R-system according to the system conversion;
or,
converting the 10-system data into a second screen projection code of an R-system according to the system conversion;
adding a preset index bit for the second screen projection code, and updating the second screen projection code;
or,
converting the 10-system data into a second screen projection code of an R-system according to the system conversion;
finding out a second new character corresponding to each character of the second screen projecting code in an array corresponding to the index bit according to a preset corresponding relation, wherein the array consists of R characters in an R system;
concatenating the second new character into a second string;
and adding a preset index bit to the second character string, and updating the second character string after the index bit is added into a second screen-projecting code.
7. A screen-projecting code generation device is characterized by comprising:
the input module is used for acquiring a first screen projection code;
the decryption module is used for decrypting the first screen projection code to obtain a first IP address of a receiving end;
the first communication module is used for sending the first screen projection code to the receiving end according to the first IP address;
and the first authentication module is used for performing screen projection when first indication information from the receiving end is received, and the first indication information is used for describing that the receiving end allows screen projection.
8. A screen-projecting code generation device is characterized by comprising:
the address module is used for acquiring a second IP address of the equipment;
the encryption module is used for encrypting the second IP address to obtain a second screen projection code;
the display module is used for displaying the second screen projection code;
the second communication module is used for receiving the first screen projection code from the sending end;
and the second authentication module is used for sending first indication information to the sending end when the first screen-throwing code is consistent with the second screen-throwing code, wherein the first indication information is used for describing that the sending end is allowed to throw the screen.
9. A terminal device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the screen-shot code generation method according to any one of claims 1 to 3 when executing the computer program.
10. A terminal device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the screen-shot code generation method according to any one of claims 4 to 6 when executing the computer program.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010969026.2A CN112218133B (en) | 2020-09-15 | 2020-09-15 | Screen projection code generation method and device and terminal equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010969026.2A CN112218133B (en) | 2020-09-15 | 2020-09-15 | Screen projection code generation method and device and terminal equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112218133A true CN112218133A (en) | 2021-01-12 |
CN112218133B CN112218133B (en) | 2022-08-05 |
Family
ID=74048926
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010969026.2A Active CN112218133B (en) | 2020-09-15 | 2020-09-15 | Screen projection code generation method and device and terminal equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112218133B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2023115316A1 (en) * | 2021-12-21 | 2023-06-29 | 广州视源电子科技股份有限公司 | Screen mirroring method and apparatus, and storage medium and electronic device |
WO2024045068A1 (en) * | 2022-08-31 | 2024-03-07 | 广州视源电子科技股份有限公司 | Connection method and apparatus, display device, terminal device, and medium |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111275152A (en) * | 2020-01-16 | 2020-06-12 | 北京迈格威科技有限公司 | Two-dimensional code, encoding method and decoding method of two-dimensional code, decoding device of two-dimensional code and electronic system |
CN111355820A (en) * | 2019-06-27 | 2020-06-30 | 鸿合科技股份有限公司 | Data transmission method, terminal and electronic equipment |
CN111355821A (en) * | 2019-06-27 | 2020-06-30 | 鸿合科技股份有限公司 | Connection code generation method, device, electronic device and storage medium |
-
2020
- 2020-09-15 CN CN202010969026.2A patent/CN112218133B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111355820A (en) * | 2019-06-27 | 2020-06-30 | 鸿合科技股份有限公司 | Data transmission method, terminal and electronic equipment |
CN111355821A (en) * | 2019-06-27 | 2020-06-30 | 鸿合科技股份有限公司 | Connection code generation method, device, electronic device and storage medium |
CN111275152A (en) * | 2020-01-16 | 2020-06-12 | 北京迈格威科技有限公司 | Two-dimensional code, encoding method and decoding method of two-dimensional code, decoding device of two-dimensional code and electronic system |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2023115316A1 (en) * | 2021-12-21 | 2023-06-29 | 广州视源电子科技股份有限公司 | Screen mirroring method and apparatus, and storage medium and electronic device |
WO2024045068A1 (en) * | 2022-08-31 | 2024-03-07 | 广州视源电子科技股份有限公司 | Connection method and apparatus, display device, terminal device, and medium |
Also Published As
Publication number | Publication date |
---|---|
CN112218133B (en) | 2022-08-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112218133B (en) | Screen projection code generation method and device and terminal equipment | |
CN110400164B (en) | Data determining method and device, storage medium and electronic device | |
CN105490711A (en) | Bluetooth automatic connection method, master device, slave device, and system | |
CN110489466B (en) | Method and device for generating invitation code, terminal equipment and storage medium | |
US9641328B1 (en) | Generation of public-private key pairs | |
CN1551559A (en) | Method and device for organising public key based on user_defined identification code cryptographic system | |
CN112163412A (en) | Data verification method and device, electronic equipment and storage medium | |
CN113810168A (en) | Training method of machine learning model, server and computer equipment | |
CN112636903A (en) | Construction method, encryption method, decryption method, device, equipment and storage medium | |
CN113420049A (en) | Data circulation method and device, electronic equipment and storage medium | |
CN110266653B (en) | Authentication method, system and terminal equipment | |
CN110287733B (en) | File tamper-proofing method and device | |
CN111368322A (en) | File decryption method and device, electronic equipment and storage medium | |
CN114124469B (en) | Data processing method, device and equipment | |
CN116010401A (en) | Information hiding trace query method and system based on block chain and careless transmission expansion | |
CN114970464A (en) | Method, device, terminal equipment and storage medium for generating identification | |
CN113556333A (en) | Computer network data secure transmission method and device | |
CN111131270B (en) | Data encryption and decryption method and device, electronic equipment and storage medium | |
JP2003296331A (en) | Data retrieval method and system, retrieval keyword generation device and its computer program | |
CN111506913A (en) | Audio encryption method and device, storage medium and electronic device | |
CN112182593A (en) | Data processing method and device and electronic equipment | |
CN111953384B (en) | Communication address sending method and device, electric energy meter and storage medium | |
CN111147481B (en) | Data processing system, method, device, medium and equipment | |
CN113743915B (en) | Block chain transfer transaction privacy protection method, block chain link point equipment and medium | |
CN116484407B (en) | Data security protection method and device, electronic equipment 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 | ||
CB03 | Change of inventor or designer information |
Inventor after: Deng Hengbo Inventor after: Li Chao Inventor before: Deng Hengbo |
|
CB03 | Change of inventor or designer information | ||
GR01 | Patent grant | ||
GR01 | Patent grant |