Method and system for realizing synchronous login with mobile phone terminal user account in screen projection scene
By generating a dynamic encryption key using the mobile phone's location coordinates and timestamp in a screen mirroring scenario, the secure transmission and authentication of user login information are achieved, solving the problem of user login information not being synchronized in DLNA screen mirroring technology and improving the convenience and security of the screen mirroring experience.
Patent Information
- Application Number
- CN202511655189.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-12
- Publication Date
- 2026-03-06
AI Technical Summary
Existing DLNA screen mirroring technology cannot securely transmit and verify user login information, resulting in the receiving end being unable to obtain personalized user data. Users need to manually log in again on the receiving end, which undermines the convenience and continuity of the screen mirroring experience.
By obtaining the location coordinates of the mobile device as a reference point, the distance parameters are calculated and encrypted. Combined with the timestamp, a dynamic encryption key is generated to achieve secure transmission of user login information. The information is then decrypted at the screen-sharing receiver and authenticated by the server, enabling automatic login and the retrieval of personalized data.
It ensures the security of user login information transmission, prevents information from being stolen or tampered with, expands personalized service functions in screen mirroring scenarios, reduces redundant user operations, and improves the convenience and consistency of the screen mirroring experience.
Smart Images

Figure CN121619458A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of smart device technology, and in particular to a method and system for synchronizing login with mobile user accounts in a screen mirroring scenario. Background Technology
[0002] In digital entertainment consumption scenarios, screen mirroring from mobile devices to TVs and large-screen devices has become a mainstream application. Currently, the industry generally uses the DLNA protocol to achieve basic screen mirroring functions. This technology can support the transmission of audio and video content playback addresses selected on the mobile device to the TV or large screen to meet users' needs for watching content on a larger screen. However, in actual use, the technology has obvious shortcomings in user experience. For example, user Zhang uses a movie app on his mobile phone to watch movies. The app is logged into his personal account, which contains the playback history of movies he did not finish watching last week and five movies marked as "want to watch". When he continues to watch the movie on the TV in his bedroom, after mirroring the movie playback address to the TV via the DLNA protocol, the TV can only play the initial picture of the current movie. If he wants to continue the previous playback progress or view the movies he wants to watch, he needs to manually enter his account and password again on the TV to log in. The input operation on the TV remote control is cumbersome, taking 5-10 minutes. If Zhang forgets his account and password, he needs to retrieve it via mobile phone verification code. Even if he logs in successfully, he needs to search for the corresponding movie again to find the historical progress. It is impossible to directly synchronize the personalized data on the mobile device.
[0003] The core technical flaw of the problem lies in the fact that existing DLNA screen mirroring technology only realizes one-way transmission of playback address and does not build a secure transmission and verification mechanism for user login information. It cannot guarantee the security of user login information during transmission, nor can it allow the screen mirroring receiver to legally obtain the user's identity association data on the mobile phone. Ultimately, this results in the inability to realize personalized functions such as synchronization of historical playback records and retrieval of favorite content, forcing users to perform redundant operations such as repeated logins and repeated searches, which seriously undermines the convenience and continuity of the screen mirroring experience and makes it difficult to meet users' actual needs for personalized services in screen mirroring scenarios. Summary of the Invention
[0004] The present invention aims to provide a method and system for synchronizing login with mobile user accounts in screen mirroring scenarios, thereby meeting users' needs for personalized services in screen mirroring scenarios.
[0005] To solve the above-mentioned technical problems, the technical solution of the present invention is as follows: Firstly, a method for synchronizing login with a mobile user account in a screen mirroring scenario, the method comprising: The location coordinates of the mobile device are obtained as a reference point. The boundary line segment of the effective communication range of the screen projection receiver is obtained. The distance parameter is obtained by calculating the distance from the reference point to the boundary line segment of the effective communication range. Based on the distance parameter, the user login information is encrypted to obtain encrypted user information; the distance parameter, encrypted user information and the playback address of the content to be projected are sent to the projection receiving end. Based on the distance parameters, encrypted user information and playback address received by the screen mirroring receiver, the validity of the distance parameters is verified to determine whether the distance parameters are within the preset communication distance range. When the distance parameters are within the communication distance range, the encrypted user information is decrypted to obtain the user login information. The decrypted user login information is sent to the server for authentication, and the authentication result returned by the server is received. When the authentication result is successful, the corresponding user account is automatically logged in based on the authentication result, and personalized data associated with the mobile user account is obtained from the server.
[0006] Furthermore, the location coordinates of the mobile device are obtained as a reference point, and the boundary line segment of the effective communication range of the screen projection receiver is obtained. By calculating the distance from the reference point to the boundary line segment of the effective communication range, distance parameters are obtained, including: The system obtains the current location coordinates collected in real time from the mobile device and sets the location coordinates as the reference point for security verification. Based on the device identifier of the screen projection receiver, it obtains the predefined boundary line segment of the valid communication range that allows screen projection from the server. The boundary line segment of the valid communication range is composed of multiple geographical coordinate points connected together. Based on the position coordinates of the reference point and the geometric relationship between each line segment in the effective communication range boundary line segment, the vertical distance from the reference point to the nearest boundary line segment is calculated, and the vertical distance is used as the distance parameter. The calculated distance parameters are bound to the location coordinates and timestamp to obtain a location verification data packet.
[0007] Furthermore, based on the distance parameter, the user login information is encrypted to obtain encrypted user information; the distance parameter, encrypted user information, and the playback address of the content to be projected are sent together to the projection receiving end, including: By receiving the location verification data packet processed by location verification, the distance parameter and timestamp are extracted. Based on the distance parameter and timestamp, a dynamic encryption key is obtained through a key derivation function, where the distance parameter is used as the input element for obtaining the key. By using a dynamic encryption key to perform encryption operations on user login information containing user account and login credentials, encrypted user information is obtained. The distance parameter, timestamp, encrypted user information, and playback address of the content to be cast are encapsulated to obtain a casting request data packet, which is then sent to the casting receiver through an encrypted communication channel.
[0008] Furthermore, based on the distance parameter received by the screen mirroring receiver, encrypted user information, and playback address, the validity of the distance parameter is verified to determine whether it is within the preset communication distance range. When the distance parameter is within the communication distance range, the encrypted user information is decrypted to obtain the user login information, including: By receiving the screen mirroring request data packet from the mobile terminal, the distance parameter, timestamp, encrypted user information and playback address are parsed and extracted. The distance parameter is compared with the preset communication distance range threshold to determine whether the distance parameter is less than or equal to the communication distance range threshold. When the distance parameter is within the preset communication distance range, the dynamic encryption key is obtained by using the same key derivation function as the encryption process, based on the distance parameter and timestamp. Based on the obtained dynamic encryption key, the encrypted user information is decrypted to obtain the plaintext user login information.
[0009] Furthermore, the decrypted user login information is sent to the server for authentication, and the authentication result returned by the server is received, including: Based on the constructed authentication request data packet, which includes the decrypted user login information, timestamp, and device identification information of the screen mirroring receiver, the authentication request data packet is sent to the server through a secure transmission link to request the authentication and authorization status check of the user login information. By receiving the authentication response data packet returned by the server, which contains the authentication result status identifier, user identity identifier, and session token, the authentication response data packet is parsed to extract the authentication result status identifier and verify the validity of the session token. When the authentication result status is "passed" and the session token is valid, the user's unique identifier and session token are bound to the current screen projection session to obtain the authenticated user session context.
[0010] Furthermore, by receiving the authentication response data packet returned by the server, which contains an authentication result status identifier, a user identity identifier, and a session token, the authentication response data packet is parsed to extract the authentication result status identifier and verify the validity of the session token, including: By receiving the authentication response data packet returned by the server, the integrity and digital signature of the data packet are verified to ensure that the data is not tampered with during transmission. The verified authentication response data packet is parsed to extract the authentication result status identifier, the user's unique identifier, the session token, and the token validity period information. By verifying the signature validity of the session token, it is confirmed that the session token was issued by a trusted server and has a complete structure. The validity period information of the session token is checked to confirm that the token is within the valid time range and has not been included in the invalidation list. When a session token passes signature and validity period verification, the authentication result status identifier, the user's unique identifier, and the valid session token are associated and stored to establish a trusted authentication result record. If the session token verification fails or expires, an authentication failure instruction is received, the current login process is terminated, and an error message is returned to the user.
[0011] Furthermore, when the authentication result is successful, the corresponding user account is automatically logged in based on the authentication result, and personalized data associated with the mobile user account is obtained from the server, including: When the authentication result status is marked as passed and the session token is verified, the user's unique identity and valid session token are used to establish an authenticated user login status on the screen mirroring receiving end. Based on the established user login status, a personalized data request is sent to the server. The request includes a unique user identifier, a session token, and a data type identifier. The server returns a personalized data response packet, which includes personalized configuration information associated with the user account, historical data, and preference settings. By performing integrity verification and parsing on the received personalized data response packet, the personalized data content is extracted, and the parsed personalized data content is bound to the current session of the screen projection receiver and applied to the ongoing screen projection scenario.
[0012] Secondly, a system for synchronizing login with mobile user accounts in screen mirroring scenarios includes: The acquisition module is used to acquire the location coordinates of the mobile terminal as a reference point, acquire the boundary line segment of the effective communication range of the screen projection receiver, and obtain the distance parameter by calculating the distance from the reference point to the boundary line segment of the effective communication range; The encryption module is used to encrypt user login information based on distance parameters to obtain encrypted user information; it sends the distance parameters, encrypted user information, and playback address of the content to be projected to the projection receiving end; based on the distance parameters, encrypted user information, and playback address received by the projection receiving end, it verifies the validity of the distance parameters to determine whether the distance parameters are within the preset communication distance range. When the distance parameters are within the communication distance range, it decrypts the encrypted user information to obtain the user login information; The processing module is used to send the decrypted user login information to the server for authentication and receive the authentication result returned by the server. When the authentication result is successful, the corresponding user account is automatically logged in based on the authentication result, and personalized data associated with the mobile user account is obtained from the server.
[0013] Thirdly, a computing device includes: One or more processors; A storage device for storing one or more programs that, when executed by one or more processors, cause the one or more processors to implement the method.
[0014] Fourthly, a computer-readable storage medium storing a program that, when executed by a processor, implements the method.
[0015] The above-described solution of the present invention has at least the following beneficial effects: Because it employs a high-strength encryption algorithm to encrypt user login information at the casting initiator, and uses standard or proprietary protocols such as DLNA, UDP, and Socket to transmit the encrypted login information along with the playback address while numbering and verifying the data packets, and because the casting receiver decrypts the encrypted information through a TV quick app or web application, and the server authenticates the decrypted user login information, allowing the casting receiver to automatically log in and obtain personalized data after successful authentication, it overcomes the limitations of existing DLNA-based casting technologies, which only transmit playback addresses and lack effective transmission and verification mechanisms for user login information. This prevents the casting receiver from obtaining personalized user data, querying historical playback records, and synchronizing favorite content, and requires users to manually log in repeatedly at the casting receiver. This approach ensures the security of user login information transmission, prevents information theft or tampering, expands personalized service functions in casting scenarios, reduces redundant user operations, and improves the convenience, consistency, and security of the casting experience and user account usage. Attached Figure Description
[0016] Figure 1This is a flowchart illustrating a method for synchronizing login with a mobile user account in a screen mirroring scenario, as provided by an embodiment of the present invention.
[0017] Figure 2 This is a schematic diagram of a system for synchronizing login with a mobile user account in a screen mirroring scenario, provided by an embodiment of the present invention.
[0018] Figure 3 This is an interactive flowchart for enabling synchronized login with mobile user accounts in screen mirroring scenarios. Detailed Implementation
[0019] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
[0020] like Figure 1 As shown, an embodiment of the present invention proposes a method for synchronous login with a mobile user account in a screen mirroring scenario, the method comprising the following steps: Step 1: Obtain the location coordinates of the mobile device as a reference point, obtain the boundary line segment of the effective communication range of the screen projection receiver, and obtain the distance parameter by calculating the distance from the reference point to the boundary line segment of the effective communication range; Step 2: Based on the distance parameter, encrypt the user login information to obtain encrypted user information; send the distance parameter, encrypted user information and the playback address of the content to be projected to the projection receiving end. Step 3: Based on the distance parameter received by the screen mirroring receiver, the encrypted user information and the playback address, the validity of the distance parameter is verified to determine whether the distance parameter is within the preset communication distance range. When the distance parameter is within the communication distance range, the encrypted user information is decrypted to obtain the user login information. Step 4: Send the decrypted user login information to the server for authentication, and receive the authentication result returned by the server. Step 5: When the authentication result is successful, the corresponding user account is automatically logged in based on the authentication result, and personalized data associated with the mobile user account is obtained from the server.
[0021] In this embodiment of the invention, ...
[0022] In a preferred embodiment of the present invention, step 1 above may include: Step 1.1: Obtain the current location coordinates collected in real time on the mobile device and set these coordinates as reference points for security verification. Based on the device identifier of the screen mirroring receiver, obtain the predefined boundary segment of the valid communication range allowed for screen mirroring from the server. The boundary segment of the valid communication range is composed of multiple geographical coordinate points connected together. Specifically, when user Zhang needs to mirror content from a certain video app on his mobile phone to the TV in his bedroom, the mobile phone first collects the coordinates of his current location in real time. These coordinates are the reference points used in the security verification process. For example, if Zhang is currently in the bedroom near the head of the bed, the coordinates collected by the mobile phone correspond to his location. The phone obtains the device identifier of the bedroom TV from its geographic coordinates. This identifier is the unique identification information of the bedroom TV in the system and is used to match the device with the server. Based on the obtained bedroom TV device identifier, the phone sends a request to the server corresponding to the video app. The server queries the boundary segment of the valid communication range that is allowed for screen casting for the bedroom TV in advance based on the device identifier. The boundary segment is formed by connecting multiple consecutive geographic coordinate points in sequence. For example, it is a closed line segment formed by connecting multiple geographic coordinate points within a radius of 5 meters centered on the bedroom TV. The server feeds back this valid communication range boundary segment to the phone.
[0023] Step 1.2: Based on the geometric relationship between the reference point's location coordinates and the line segments of the effective communication range boundary, calculate the perpendicular distance from the reference point to the nearest boundary line segment, and use this perpendicular distance as the distance parameter. Specifically, after the mobile phone obtains its own location coordinates as the reference point and the effective communication range boundary line segment corresponding to the bedroom TV obtained from the server, it begins to analyze the geometric relationship between the reference point's location coordinates and the line segments of the effective communication range boundary. The staff preset a distance calculation logic based on geometric principles in the system. The logic calculates the distance from the reference point to each line segment of the effective communication range boundary, and selects the boundary line segment with the shortest distance. Then, it further calculates the perpendicular distance from the reference point to this boundary line segment corresponding to the shortest distance. For example, the reference point coordinates of Zhang's mobile phone are closest to a line segment of the effective communication range boundary that is near the bedroom door. The perpendicular distance from the reference point to this line segment calculated through geometric relationships is 2 meters. This 2-meter distance is the final determined distance parameter.
[0024] Step 1.3 involves binding the calculated distance parameters with the location coordinates and timestamp to obtain a location verification data packet. Specifically, after obtaining the calculated distance parameters, the phone will associate and integrate the distance parameters with the collected current location coordinates of the phone and the timestamp of the current screen casting operation. The timestamp records the specific time when Zhang clicked the screen casting button to the bedroom TV in the mobile app. Through the preset data packet logic, these three pieces of information are tightly bound together to obtain a complete data set containing location, distance, and time information. This data set is the location verification data packet used for screen casting security verification.
[0025] In this embodiment of the invention, by acquiring the current location coordinates collected in real time by the mobile terminal and setting them as a security verification reference point, obtaining a predefined boundary line segment of the allowed effective communication range for screen projection from the server based on the device identifier of the screen projection receiver, and then calculating the vertical distance from the reference point to the nearest boundary line segment as a distance parameter based on the geometric relationship between the reference point coordinates and each line segment of the boundary line segment, and finally binding the distance parameter with the location coordinates and timestamp to form a location verification data packet, this invention overcomes the shortcomings of existing screen projection location verification methods, such as the lack of a predefined effective range associated with the screen projection receiver, insufficient accuracy of distance calculation, and lack of data binding with a time dimension. These shortcomings lead to unreliable location verification basis and the easy occurrence of screen projection requests initiated by unauthorized location devices. This invention achieves location verification with device correlation and range accuracy, and makes the location data timely through timestamp binding, providing a reliable location basis for user login information encryption and screen projection security verification, and effectively intercepting unauthorized location screen projection requests.
[0026] In a preferred embodiment of the present invention, step 2 above may include: Step 2.1: By receiving the location verification data packet processed by the location verification process, the distance parameter and timestamp are extracted. Based on the distance parameter and timestamp, a dynamic encryption key is obtained through a key derivation function. The distance parameter serves as the input element for obtaining the key. Specifically, after the user's mobile phone completes the generation of the location verification data packet, the video app on the mobile phone will first receive the location verification data packet. The app extracts two key pieces of information from this data packet: one is the previously calculated distance parameter, which is the vertical distance from the current location of the mobile phone to the boundary line of the allowed screen casting effective communication range of the bedroom TV, such as the previously determined 2-meter distance; the other is the timestamp bound in the data packet, which is the specific time when Zhang clicked the screen casting to the bedroom TV option in the video app on the mobile phone. After extraction, the video app on the mobile phone will call the preset key derivation function, inputting the extracted distance parameter and timestamp into the function. The distance parameter is a key element that must be included to obtain the key. Without the parameter, a valid key cannot be generated. After the key derivation function performs calculations according to preset rules, a dynamic encryption key that corresponds only to this screen casting scenario is finally obtained. The key is closely related to the current location information and time information and is only valid during this screen casting process.
[0027] Step 2.2 involves using a dynamic encryption key to encrypt the user login information, which includes the user account and login credentials, to obtain encrypted user information. Specifically, after obtaining the dynamic encryption key, the mobile video app automatically retrieves Zhang's user login information on the app. This information includes Zhang's user account used to log in to the video app, such as the mobile phone number used during registration, and the login credentials generated by the system for Zhang's current login status, such as a temporarily valid login token. The mobile video app uses the generated dynamic encryption key to encrypt this user login information, which includes the user account and login credentials. During the encryption process, the dynamic encryption key securely processes each item in the login information, ensuring that sensitive information involving user privacy does not exist in plaintext. After the complete encryption process, the user login information that could originally be directly read is transformed into encrypted user information that cannot be directly parsed.
[0028] Step 2.3 involves encapsulating the distance parameter, timestamp, encrypted user information, and playback address of the content to be cast to obtain a casting request data packet. This data packet is then sent to the receiving end via an encrypted communication channel. Specifically, after generating the encrypted user information, the mobile video app integrates the extracted distance parameter, timestamp, encrypted user information, and playback address of the content Zhang wants to cast. The playback address is the link to the movie Zhang didn't finish watching last week within the video app. The mobile video app then packages these four types of information into a complete and well-structured data set according to the system's preset data encapsulation rules. This data set is the casting request data packet used to initiate the casting request. After the data packet is generated, the mobile app sends it to the receiving end (Zhang's bedroom TV) via a pre-established encrypted communication channel with the TV in the bedroom. This ensures that the data packet is not illegally obtained or tampered with during transmission from the mobile phone to the TV, guaranteeing the security and integrity of data transmission.
[0029] In this embodiment of the invention, by receiving location verification data packets and extracting distance parameters and timestamps, a dynamic encryption key is generated using a key derivation function with the distance parameters as necessary input elements and the timestamp as a combination. This dynamic encryption key is then used to encrypt user login information, including user account and login credentials. Finally, the distance parameters, timestamp, encrypted user information, and playback address of the content to be projected are encapsulated to obtain a projection request data packet, which is then sent to the projection receiver via an encrypted communication channel. This overcomes the shortcomings of existing projection technologies, which often use fixed encryption keys that are easily cracked, lack security guarantees for user login information transmission linked to location verification data, and suffer from scattered data transmission that is prone to loss or tampering. These issues result in low security for user login information and compromised data integrity during projection. The dynamic encryption key, combined with distance parameters and timestamps, possesses uniqueness and timeliness, significantly reducing the risk of key cracking. The encrypted user login information, transmitted through an encrypted channel, effectively prevents theft or tampering. Simultaneously, data encapsulation ensures complete and secure transmission of key information, providing a complete and secure data foundation for verification by the projection receiver, thus improving the security and integrity of user information and data transmission during projection.
[0030] In a preferred embodiment of the present invention, step 3 above may include: Step 3.1: By receiving the screen casting request data packet from the mobile phone, parse and extract the distance parameter, timestamp, encrypted user information and playback address. Compare the distance parameter with the preset communication distance range threshold to determine whether the distance parameter is less than or equal to the communication distance range threshold. Specifically, the TV or large-screen device, as the screen casting receiver, will have its pre-installed screen casting related applications continuously listening for screen casting request signals from the mobile phone. When the screen casting request data packet sent by the mobile phone is detected, the application will immediately start the data receiving and parsing program. First, the application reads the received screen mirroring request data packet completely to ensure that no data packet is missing during transmission. Then, according to the preset structure format of the data packet, it extracts four key data items in sequence: distance parameter, which is the vertical distance from the current location of the mobile phone to the boundary line of the effective communication range allowed for screen mirroring on the receiving end, calculated by the mobile phone; timestamp, which is the specific time information recorded when the mobile phone initiates the screen mirroring operation; encrypted user information, which is the data that cannot be directly read after the mobile phone encrypts the user's login information; and the playback address of the content to be mirrored, which is the playback link corresponding to the audio and video content that the user wants to watch on the receiving end. After extraction, the application calls the pre-configured communication distance range threshold in the system. The threshold is usually a specific geographical range value centered on the screen mirroring receiver, set based on the usage scenario of the screen mirroring receiver. For example, the distance threshold corresponds to a range with a radius of 5 meters centered on the TV. Then, the extracted distance parameter is compared with the preset threshold. The comparison result determines whether the phone that initiated the screen mirroring request is within the valid communication range allowed by the screen mirroring receiver. If the distance parameter is less than or equal to the preset threshold, the phone is determined to be within the valid range; if the distance parameter is greater than the preset threshold, the phone is determined to be within the invalid range.
[0031] Step 3.2: When the distance parameter is within the preset communication distance range, based on the distance parameter and timestamp, the same key derivation function as the encryption process is used to restore the dynamic encryption key. Specifically, after the application on the screen-casting receiving end confirms that the distance parameter is within the preset communication distance range through comparison, it will start the dynamic encryption key restoration process. The application will call its own stored key derivation function, which is completely consistent with the one used by the mobile terminal to encrypt user login information. The function is a unified operation rule agreed upon in advance by the mobile terminal and the screen-casting receiving end for obtaining and restoring the dynamic encryption key, so that the two ends are consistent in key processing logic. The application will extract the distance parameter and timestamp from the screen-casting request data packet as two necessary input elements and pass them into the key derivation function. Since the same operation function as the one used by the mobile terminal to generate the dynamic encryption key is used, and the same distance parameter and timestamp are input, the function will calculate according to the preset operation logic and finally output a key that is completely identical to the dynamic encryption key generated by the mobile terminal to encrypt user login information, thereby completing the accurate restoration of the dynamic encryption key and providing key support for decrypting encrypted user information.
[0032] Step 3.3: Based on the restored dynamic encryption key, the encrypted user information is decrypted to restore the plaintext user login information. Specifically, after successfully restoring the dynamic encryption key, the application on the screen mirroring receiving end immediately starts the decryption operation for the encrypted user information. The application sets the restored dynamic encryption key as the core key for the decryption operation, ensuring that the key used in the decryption process completely matches the key used for encryption on the mobile device. Then, the application sends the extracted encrypted user information to the decryption program. The decryption program uses the dynamic encryption key as a basis and follows the reverse operation logic of encryption on the mobile device to decrypt the encrypted user information layer by layer. After the complete decryption operation, the encrypted user information that was originally unreadable is restored to plaintext user login information. This plaintext information includes the user account registered by the user in the screen mirroring application on the mobile device and the login credentials generated for the user's current login status. The screen mirroring receiving end successfully obtains legitimate and complete plaintext user login information, laying the foundation for sending the information to the server for authentication, achieving synchronized account login, and personalized data acquisition.
[0033] In this embodiment of the invention, by receiving the screen casting request data packet from the mobile terminal and parsing and extracting the distance parameter, timestamp, encrypted user information, and playback address, and comparing the distance parameter with a preset communication distance range threshold to determine whether it is within the range, and when the distance parameter is within the preset communication distance range, a dynamic encryption key is obtained by using the same key derivation function as the encryption process based on the distance parameter and timestamp, and then the encrypted user information is decrypted based on the restored dynamic encryption key to restore the plaintext user login information, this invention overcomes the shortcomings of existing DLNA screen casting technology, such as the lack of location-related security verification for screen casting requests, the susceptibility to unauthorized location devices initiating screen casting requests, and the inability of the screen casting receiver to securely and accurately decrypt user login information due to the lack of a matching key restoration mechanism. This makes it impossible to intercept illegal screen casting requests or legally obtain plaintext user login information. The invention achieves location-based legality screening of screen casting requests to intercept unauthorized device screen casting, ensures the accuracy of dynamic encryption key restoration and the security of user login information decryption, and enables the screen casting receiver to legally and securely obtain plaintext user login information. This provides a reliable security foundation for server authentication and account synchronization login, improving the security and compliance of the screen casting process.
[0034] In a preferred embodiment of the present invention, step 4 above may include: Step 4.1: Based on the constructed authentication request data packet, which includes the decrypted user login information, timestamp, and device identification information of the screen mirroring receiver, the authentication request data packet is sent to the server through a secure transmission link to request authentication and authorization status checks on the user login information. Specifically, after obtaining the plaintext user login information, the application on the screen mirroring receiver will immediately initiate the authentication request data packet construction process. First, the application will determine the core information that the data packet must contain: one is the complete decrypted user login information, covering the user's registered account in the screen mirroring application on the mobile device and the login credentials generated by the system; the second is the timestamp of the current authentication request data packet construction, which records the specific time the authentication request was initiated, facilitating the server's verification of the request's timeliness; the third is the screen mirroring receiver's own... The device identification information is used by the server to identify the specific device initiating the authentication request. After the information is collected, the application will integrate the above three types of information in an orderly manner according to the data packet format preset by the server to obtain a complete authentication request data packet. The data packet format meets the server's parsing requirements. The application will activate the secure transmission link established in advance with the server. The link usually uses TLS encryption communication technology to encrypt the data in real time during transmission to prevent the data from being illegally stolen or tampered with. The application sends the constructed authentication request data packet to the server through the secure transmission link, and at the same time, it explicitly requests the server to perform two verifications on the user login information in the data packet, namely, user identity legality verification and user authorization status check.
[0035] Step 4.2 involves receiving the authentication response data packet returned by the server. This data packet contains an authentication result status identifier, a user identity identifier, and a session token. The authentication response data packet is parsed to extract the authentication result status identifier and verify the validity of the session token. Specifically, after receiving the authentication request data packet sent by the screen-sharing receiver, the server completes internal identity verification and authorization checks, obtains the corresponding authentication response data packet, and returns it to the screen-sharing receiver. The application on the screen-sharing receiver continuously listens to the server's feedback channel. Upon receiving the authentication response data packet, it initiates the parsing and verification process. The application parses the authentication response data packet according to the data packet structure agreed upon by the server, extracting three types of key information: first, the authentication result status identifier, which exists in the form of a preset status code or text identifier, directly reflecting the verification result of the user's login information; second, the user identity identifier, i.e., the identifier assigned to the user by the server... The system consists of three parts: a unique identification code used to associate with the user's personalized data; a session token, which is a temporary access credential generated by the server based on verified user information. This token is used by the receiving end to prove its legitimacy when requesting personalized data from the server. After parsing, the application focuses on verifying the validity of the session token. The verification process includes three core steps: first, verifying the integrity of the token's signature by checking whether the token has a server-specific digital signature and whether the signature matches the server's preset signature rules, confirming that the token was legally issued by the server and has not been tampered with; second, checking the token's validity period by reading the valid time range carried in the token and comparing it with the current time to determine whether the token is within the valid time period, avoiding the use of expired tokens; and third, querying the token expiration list maintained by the server to confirm that the session token has not been prematurely added to the expiration list due to user logout, account abnormalities, or other reasons. Through these three verifications, the legality and validity of the session token are confirmed.
[0036] Step 4.3: When the authentication result status is "passed" and the session token is valid, the user's unique identifier and the session token are bound to the current screen-sharing session to obtain the authenticated user session context. Specifically, when the application on the screen-sharing receiving end confirms that the authentication result status is "passed" and the session token is valid, it will start the session binding process. The application will obtain the unique identifier information of the current screen-sharing session. The identifier is a unique code generated by the application when this screen-sharing request is initiated, which is used to uniquely distinguish this screen-sharing operation from other screen-sharing operations. The application will establish an association relationship between the extracted user's unique identifier, the valid session token, and the unique identifier of the current screen-sharing session. The specific operation involves storing these three types of information in the application's temporary session cache area and recording the corresponding relationships according to preset association rules, so that the three can be synchronously called during the operation. Through this associated storage, an authenticated user session context is formed. The context not only includes the user's legitimate identity information and the access credentials authorized by the server, but also binds the specific session information of this screen casting, becoming the core basis for the screen casting receiver to request personalized data such as the user's historical playback records and favorite content from the server. The data access operation not only meets the identity authorization requirements, but can also be accurately associated with the current screen casting session.
[0037] In this embodiment of the invention, an authentication request data packet containing decrypted user login information, a timestamp, and the identification information of the screen-casting receiving device is constructed and sent to the server via a secure transmission link to request identity verification and authorization status checks. After receiving the authentication response data packet returned by the server, the authentication result status identifier is parsed and the validity of the session token is verified. When the authentication result is successful and the session token is valid, the user's unique identifier and the session token are bound to the current screen-casting session to obtain the authenticated user's session context. Therefore, this invention overcomes the shortcomings of existing DLNA screen-casting technologies, such as the lack of a standardized authentication process for user login information, the lack of security guarantees for authentication data transmission, the lack of device identifier association which easily leads to unauthorized devices impersonating login information, and the failure to verify identity validity through session token verification, which makes it impossible to legally confirm user identity and is prone to identity forgery or unauthorized access. This results in a lack of security foundation for subsequent personalized data synchronization. This invention achieves secure transmission and multi-dimensional verification of authentication data, effectively intercepting illegal access and identity forgery risks from unauthorized devices, ensuring the legality and security of user identity verification. At the same time, by establishing a stable authenticated screen-casting session context through session binding, a reliable identity basis is provided for automatic login and personalized data acquisition, further improving the security and compliance of account synchronization in screen-casting scenarios.
[0038] In a preferred embodiment of the present invention, step 4 above may include: Step 4.21: By receiving the authentication response data packet returned by the server, verify the integrity and digital signature of the data packet to ensure that the data has not been tampered with during transmission. Parse the verified authentication response data packet to extract the authentication result status identifier, user unique identifier, session token, and token validity information. Specifically, the application on the screen-casting receiving end continuously monitors the secure communication link between the server and the client. Upon receiving the authentication response data packet returned by the server, it first initiates the data security verification process. The first step is to verify the integrity of the data packet. The application calls a preset integrity verification algorithm to calculate the entire received authentication response data packet, obtain the actual verification value, and then compares the value with the authentication result status identifier, user unique identifier, session token, and token validity information carried in the data packet. The first step is to compare the data packet with a pre-calculated checksum. If they match, the data packet is considered to have been transmitted without data loss or corruption. If they do not match, the data packet is deemed invalid, and the subsequent parsing process is terminated. The second step is to verify the digital signature of the data packet. The application extracts the digital signature attached by the server from the data packet and simultaneously calls the public key pre-distributed and stored locally by the server to decrypt and verify the digital signature. If the decrypted information matches the core content of the data packet, the data packet is confirmed to have been legally issued by the server and has not been illegally tampered with. If the signature verification fails, the data packet is deemed untrustworthy, and parsing is also terminated. Once the integrity of the data packet and the digital signature have both been verified, the application starts the data packet parsing process. Following the pre-agreed data packet structure format on the server, key information is extracted one by one from the verified authentication response data packet: First, the authentication result status identifier, which exists in the form of a clear status code or semantic identifier, directly reflecting the server's verification conclusion on the user's login information; second, the user's unique identity identifier, which is a unique identity code assigned by the server to each user within the system, used to accurately associate the user's personalized data stored on the server; third, the session token, which is a temporary access credential generated by the server based on the verified user information. When the screen-sharing receiving end requests personalized data from the server, it must carry the token to prove its legitimacy; fourth, the token validity period information, which exists in the form of a time range, clearly defining the valid usage period of the session token and preventing the abuse of expired tokens. After all information is extracted, the application will temporarily cache the extracted information to provide data support for subsequent steps.
[0039] Step 4.22 verifies the validity of the session token's signature to confirm that the session token was issued by a trusted server and has a complete structure. It also checks the session token's validity period to confirm that the token is within its valid time frame and not listed as invalid. Specifically, after extracting the information, the application on the screen-casting receiving end initiates a multi-dimensional validity verification process for the extracted session token. The first step is to verify the session token's signature validity. The application extracts the server-attached exclusive signature from the session token and then uses the locally stored server public key to decrypt and verify the signature. If the core information of the decrypted token is completely consistent with the information carried by the token itself, it confirms that the session token was issued by a trusted server and that the token structure is complete and has not been tampered with. If the signature verification fails, the session token is directly deemed invalid. The second step is to check the session token's validity period. The application reads the extracted token validity period information to obtain the token's effective and expiration times, and simultaneously calls the system time module on the screen-casting receiving end to obtain the current real-time time. The application compares the current time with the token's validity period: if the current time is after the effective time and before the expiration time, the token is considered valid; if the current time is earlier than the effective time or later than the expiration time, the token is considered expired and marked as invalid. The third step is to check if the session token is on the invalidation list. The application sends a token query request to the server via a secure transmission link, carrying the session token to be verified and the device identifier of the screen-casting receiver. Upon receiving the request, the server queries its own invalidation list and sends the result back to the screen-casting receiver. Based on the server's feedback, if the application confirms the token is not on the invalidation list, the final verification is completed; if the token is on the invalidation list, it is deemed invalid. Only when the session token passes all three verifications—signature validity, validity period, and invalidation list—is it considered valid overall.
[0040] Step 4.23: When the session token passes signature and validity period verification, the authentication result status identifier, the user's unique identifier, and the valid session token are associated and stored to establish a trusted authentication result record. If the session token verification fails or expires, an authentication failure instruction is received, terminating the current login process and returning an error message to the user. Specifically, when the application on the screen-sharing receiving end confirms that the session token has passed both signature and validity period verification, the trusted storage process for the authentication result is initiated. The application calls the local secure storage module to bind and store the extracted authentication result status identifier, the user's unique identifier, and the verified valid session token according to the association relationship between user identity, session token, and authentication result. During storage, the application performs secondary encryption on this information so that even if the local storage is illegally accessed, plaintext information cannot be directly obtained. At the same time, the application establishes a dedicated storage system for this secondary storage. The record identifier is associated with the unique identifier of the current screen-sharing session, forming an authenticated user session context. The context not only records the user's legitimate identity and server authorization credentials, but is also strongly bound to the current screen-sharing operation, providing complete identity evidence and authorization support for subsequent requests for personalized data from the server. If the session token verification fails, the application will immediately generate an authentication failure instruction. The instruction triggers two subsequent operations: first, it terminates the current user account login process and stops sending any subsequent requests to the server to avoid invalid data interaction; second, it returns a clear error message to the user. The application will convert the error reason into a text prompt that the user can understand and display it on the display interface of the screen-sharing receiver. It can also be accompanied by simple operation guidance to help users quickly locate and correct the problem, avoiding users repeatedly trying invalid operations due to a lack of clear feedback, and improving the user experience shortcomings of existing technologies that are cumbersome and lack fault guidance.
[0041] In this embodiment of the invention, after receiving the authentication response data packet returned by the server, the integrity and digital signature of the data packet are first verified to ensure that the data transmission has not been tampered with. The verified data packet is parsed to extract the authentication result status identifier, the user's unique identifier, the session token, and the token's validity period information. The signature validity of the session token is verified to confirm that it was issued by a trusted server and has a complete structure. Simultaneously, the token's validity period and whether it is listed in the invalidation list are checked. Finally, if the token passes verification, the authentication result, the user's identifier, and the valid token are associated and stored to establish a trusted authentication record. If the token verification fails or expires, the login process is terminated and an error message is returned. Therefore, it overcomes the shortcomings of existing screen mirroring authentication processes, such as the vulnerability of authentication response data packets to illegal tampering, the lack of signatures and validity periods for session tokens leading to the use of forged or expired tokens, the lack of a trusted storage mechanism for authentication results, and the inability of users to obtain clear feedback when authentication fails. It achieves the following: ensuring the integrity and security of authentication response data during transmission; accurately confirming the legality and validity of session tokens to avoid the risk of unauthorized access; establishing a trusted authentication result storage system for easy operation traceability; and promptly providing users with error information when authentication fails to optimize the troubleshooting experience. It provides a reliable authentication foundation for user account synchronous login and personalized data security access in screen mirroring scenarios.
[0042] In a preferred embodiment of the present invention, step 5 above may include: Step 5.1: When the authentication result status is "passed" and the session token is verified, the user's unique identifier and valid session token are used to establish an authenticated user login status on the screen mirroring receiver. Specifically, after the screen mirroring receiver application confirms through previous steps that the authentication result status is "passed" and the session token passes multiple verifications of signature validity, validity period, and expiration list, it will initiate the process of establishing the authenticated user login status. The application will call its built-in user login status management module. This module is a core functional module built into the screen mirroring receiver application, specifically responsible for the overall management of user login information storage, login status maintenance, and permission synchronization on the screen mirroring receiver. It is a key carrier for ensuring login information security without requiring manual re-login. Its core functions can be broken down into... The system consists of three parts. The first module is specifically responsible for maintaining the user login information and status identifier of the screen mirroring receiver. The application uses the unique user identity identifier and valid session token extracted from the authentication response data packet as core data and sends them to the management module. After receiving the data, the management module stores these two pieces of information in the secure cache area of the screen mirroring receiver. At the same time, the module marks the current user's login status as authenticated and records the effective time of the status. The management module also generates a login status identifier associated with the current screen mirroring session. The identifier is synchronized to other functional modules of the application and used by the modules to determine whether they have the permission to request personalized data from the server. This avoids the screen mirroring receiver from requiring the user to manually enter their account and password again, solving the problem of repeated login in existing DLNA technologies.
[0043] Step 5.2: Based on the established user login status, send a personalized data request to the server. The request includes a unique user identifier, a session token, and a data type identifier. Receive the personalized data response packet returned by the server. The response packet contains personalized configuration information associated with the user account, historical data, and preference settings data. Specifically, after establishing an authenticated user login status, the application on the screen mirroring receiving end will initiate the personalized data request process based on the status. The application will call the data request construction module, which is responsible for generating personalized data requests that conform to the server interface specifications. When constructing the request, the module will explicitly include three core pieces of information: the first is the unique user identifier, enabling the server to accurately locate the personalized data storage location of the currently logged-in user and avoid data matching errors; the second is a valid session token, serving as the basis for the server to verify the legitimacy of the request, proving that the request comes from an authenticated screen mirroring receiving end and preventing unauthorized requests. The third step in acquiring user data is the request data type identifier. This identifier is preset by the application based on the user's core needs in the screen mirroring scenario. Specifically, it includes identifiers for historical data, favorite content data, and personalized configuration data. This ensures that the server can accurately return the specific type of data required by the user. After the request is constructed, the application sends the personalized data request to the server through a pre-established secure transmission link, ensuring the security of the requested data during transmission and preventing it from being stolen or tampered with. Upon receiving the request, the server first verifies the validity of the session token, then queries the personalized data associated with the user based on the user's unique identifier, filters the corresponding content according to the data type identifier in the request, and finally packages it into a personalized data response package and returns it to the screen mirroring receiver. The application on the screen mirroring receiver continuously monitors the server's feedback channel. Upon receiving the response package, it first confirms the integrity of the response package and then temporarily stores it, preparing for data parsing and application in subsequent steps. The response package specifically contains three types of key data associated with the user account: personalized configuration information, historical data, and preference settings data, which precisely cover the personalized data types that existing DLNA technology cannot synchronize.
[0044] Step 5.3 involves performing integrity verification and parsing on the received personalized data response packet to extract the personalized data content. The parsed personalized data content is then bound to the current session of the screen-sharing receiver and applied to the ongoing screen-sharing scenario. Specifically, after receiving the personalized data response packet from the server, the screen-sharing receiver application sequentially performs four steps: integrity verification, data parsing, session binding, and scenario application. First, the integrity verification application calls the data integrity verification module, using a pre-agreed verification algorithm to calculate the overall data of the response packet, obtaining the actual verification value. This value is then compared with the server's preset verification value carried in the response packet. If they match, the response packet is determined not to have been tampered with or damaged during transmission; otherwise, the response packet is discarded, and a new personalized data request is sent to the server to avoid using incomplete or tampered data. After successful verification, the application initiates the data parsing process: It calls the personalized data parsing module to extract specific personalized data content from the response packet according to its preset structure. For example, it extracts the names of unfinished movies and the last playback stop time from the history data field; it extracts the list of movies marked as "want to watch" from the favorites data field; and it extracts the picture quality mode, subtitle settings, and playback speed parameters from the personalized configuration data field. After data extraction, the application binds the parsed personalized data content to the current casting session, calling the session data association module to associate the extracted user personalized data with the unique identifier of the current casting session and store it in the local session cache. This ensures that the data is only effective for the current casting session, avoiding data confusion with other casting sessions and ensuring data contextualization. Application: The application will synchronize the bound personalized data to the corresponding functional modules, achieving deep integration with the screen casting scenario. For example, the movie playback progress in the historical data will be synchronized to the playback control module, which will automatically jump to the progress point to start playback, without the user having to manually drag the progress bar; the favorite content data will be synchronized to the interface display module, and the interface will add a "My Favorites" section to the main screen casting page, directly displaying the movies that the user has marked to watch, without the user having to search again; the personalized configuration data will be synchronized to the playback settings module, which will automatically adjust the picture quality to the user's commonly used high-definition mode, switch the subtitles to the default language, and set the playback speed to the user's preferred value, thus solving the experience shortcomings of existing DLNA technology that requires manual adjustment of settings and re-searching for content, and enabling the screen casting scenario to have a consistent personalized service capability.
[0045] In this embodiment of the invention, because it employs a technical approach that, when the authentication result status is "passed" and the session token is verified, an authenticated user login state is established on the screen-casting receiving end using a unique user identifier and a valid session token, and then a personalized data request containing a unique user identifier, a session token, and a request data type identifier is sent to the server based on the login state, the personalized data response packet returned by the server is received, its integrity is verified and parsed, and finally the parsed personalized data content is bound to the current session on the screen-casting receiving end and applied to the ongoing screen-casting scenario, it overcomes the limitation of existing DLNA screen-casting technology in screen-casting scenarios. The receiving end automatically establishes a legitimate user login status but cannot securely obtain and apply personalized user data. This results in the inability to implement personalized functions such as manual account login, synchronization of historical playback records, retrieval of favorite content, and application of preference settings. The screen casting experience lacks convenience and consistency. The solution achieves automatic establishment of a trusted user login status on the receiving end without manual operation, and securely and accurately obtains and applies personalized user configuration information, historical data, and preference settings. This allows users to directly continue historical playback progress, view favorite content, and use user preference settings during screen casting, significantly improving personalized service capabilities and user experience consistency in screen casting scenarios.
[0046] like Figure 2 As shown, embodiments of the present invention also provide a system for synchronizing login with mobile user accounts in a screen mirroring scenario, comprising: The acquisition module is used to acquire the location coordinates of the mobile terminal as a reference point, acquire the boundary line segment of the effective communication range of the screen projection receiver, and obtain the distance parameter by calculating the distance from the reference point to the boundary line segment of the effective communication range; The encryption module is used to encrypt user login information based on distance parameters to obtain encrypted user information; it sends the distance parameters, encrypted user information, and playback address of the content to be projected to the projection receiving end; based on the distance parameters, encrypted user information, and playback address received by the projection receiving end, it verifies the validity of the distance parameters to determine whether the distance parameters are within the preset communication distance range. When the distance parameters are within the communication distance range, it decrypts the encrypted user information to obtain the user login information; The processing module is used to send the decrypted user login information to the server for authentication and receive the authentication result returned by the server. When the authentication result is successful, the corresponding user account is automatically logged in based on the authentication result, and personalized data associated with the mobile user account is obtained from the server.
[0047] The purpose of this invention is to overcome the shortcomings of existing DLNA screen mirroring technology and provide a screen mirroring method that encrypts and transmits user login information through multiple protocols, enabling automatic login and extended functionality on TVs or large screens, thereby improving the user's screen mirroring experience and meeting user needs for personalized services. This invention can achieve encrypted transmission of user login information through standard protocols such as DLNA, UDP, and socket, or proprietary protocols. The TV or large screen terminal decrypts the information using TV quick apps or web application technology and authenticates it with the server. Upon successful authentication, automatic login is achieved, and functions such as history and favorites are enabled. The specific technical solution is as follows: User login information encryption: The screen mirroring initiator encrypts user login information using a high-strength encryption algorithm to ensure information security during transmission.
[0048] Multi-protocol transmission: The encrypted user login information and playback address are transmitted to the screen mirroring receiver via standard protocols such as DLNA, UDP, and socket, or proprietary protocols.
[0049] Screen mirroring receiver decryption: After receiving the encrypted information transmitted via TV quick app or web application technology, the screen mirroring receiver performs decryption to obtain the user login information.
[0050] Server-side authentication: TV quick app or web application technology sends the decrypted user login information to the server for authentication, and the server verifies the legitimacy of the user information.
[0051] Functionality: After successful authentication, the TV app or web app automatically logs into the user's account, retrieves personalized data such as the user's historical playback records and favorite content from the server, and enables functions such as querying historical records and viewing favorite content.
[0052] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A method for realizing synchronization login with a user account of a mobile phone in a screen projection scenario, characterized in that, The method comprises: Obtain the location coordinates of the mobile phone terminal as a reference point, obtain the boundary line segment of the effective communication range of the screen projection receiving end, calculate the distance from the reference point to the boundary line segment of the effective communication range to obtain a distance parameter; Based on the distance parameter, encrypt the user login information to obtain encrypted user information; send the distance parameter, encrypted user information and the play address of the content to be projected to the screen projection receiving end; Based on the distance parameter, encrypted user information and play address received by the screen projection receiving end, perform validity check on the distance parameter, and determine whether the distance parameter is within the preset communication distance range; when the distance parameter is within the communication distance range, decrypt the encrypted user information to obtain the user login information; Send the decrypted user login information to the server for authentication processing, and receive the authentication result returned by the server; When the authentication result is passed, automatically log in to the corresponding user account based on the authentication result, and obtain personalized data associated with the user account of the mobile phone terminal from the server.
2. The method for realizing synchronization login with a mobile phone user account in a screen projection scene according to claim 1, characterized in that, Obtain the location coordinates of the mobile phone terminal as a reference point, obtain the boundary line segment of the effective communication range of the screen projection receiving end, calculate the distance from the reference point to the boundary line segment of the effective communication range to obtain a distance parameter, comprising: Obtain the current location coordinates collected in real time by the mobile phone terminal, and set the location coordinates as a reference point for security verification; based on the device identifier of the screen projection receiving end, obtain the pre-defined effective communication range boundary line segment allowed for screen projection from the server, and the effective communication range boundary line segment is composed of multiple geographic coordinate points; Based on the geometric relationship between the location coordinates of the reference point and each line segment in the effective communication range boundary line segment, calculate the perpendicular distance from the reference point to the nearest boundary line segment, and take the perpendicular distance as the distance parameter; Bind the calculated distance parameter with the location coordinates and the timestamp to obtain a location verification data packet.
3. The method of claim 2, wherein the method comprises: Encrypt the user login information based on the distance parameter to obtain encrypted user information; Send the distance parameter, encrypted user information and play address of the content to be projected to the screen projection receiving end, comprising: Extract the distance parameter and timestamp from the location verification data packet processed by the location verification, and obtain a dynamic encryption key based on the distance parameter and timestamp through a key derivation function, wherein the distance parameter is used as an input element for obtaining the key; Encrypt the user login information containing the user account and login credentials using the dynamic encryption key to obtain encrypted user information; Data encapsulation is performed on the distance parameter, timestamp, encrypted user information and play address of the content to be projected to obtain a screen projection request data packet, and the screen projection request data packet is sent to the screen projection receiving end through an encrypted communication channel.
4. The method of claim 3, wherein the method is characterized in that, Based on the distance parameter, encrypted user information and play address received by the screen projection receiving end, perform validity check on the distance parameter, and determine whether the distance parameter is within the preset communication distance range; when the distance parameter is within the communication distance range, decrypt the encrypted user information to obtain the user login information, comprising: The distance parameter, the timestamp, the encrypted user information and the playing address are extracted by analyzing the screen projection request data packet received by the mobile phone terminal, the distance parameter is compared with the preset communication distance range threshold, and it is judged whether the distance parameter is less than or equal to the communication distance range threshold; When the distance parameter is in the preset communication distance range, the dynamic encryption key is restored based on the distance parameter and the timestamp, and the same key derivation function as the encryption process is used; Based on the restored dynamic encryption key, the encrypted user information is decrypted and the plaintext user login information is restored.
5. The method of claim 4, wherein the method is characterized in that, The decrypted user login information is sent to the server for authentication processing, and the authentication result returned by the server is received, including: Based on the constructed authentication request data packet, the decrypted user login information, the timestamp and the device identification information of the screen projection receiving end are included, the authentication request data packet is sent to the server through a secure transmission link to request identity verification and authorization state check of the user login information; By receiving the authentication response data packet returned by the server, the authentication response data packet includes the authentication result state identifier, the user identity and the session token, the authentication response data packet is analyzed, the authentication result state identifier is extracted, and the validity of the session token is verified; When the authentication result state identifier is passed and the session token is valid, the user identity unique identifier and the session token are bound with the current screen projection session to obtain the authenticated user session context.
6. The method of claim 5, wherein the method is characterized in that, By receiving the authentication response data packet returned by the server, the authentication response data packet includes the authentication result state identifier, the user identity and the session token, the authentication response data packet is analyzed, the authentication result state identifier is extracted, and the validity of the session token is verified, including: By receiving the authentication response data packet returned by the server, the authentication response data packet includes the authentication result state identifier, the user identity and the session token, the authentication response data packet is analyzed, the authentication result state identifier is extracted, and the validity of the session token is verified, including: By verifying the signature validity of the session token, it is confirmed that the session token is signed by the trusted server and the structure is complete, the validity period information of the session token is checked, it is confirmed that the token is within the valid time range and is not listed in the invalid list; When the session token passes the signature and validity period verification, the authentication result state identifier, the user identity unique identifier and the valid session token are associated and stored, a trusted authentication result record is established, if the session token verification fails or has expired, an authentication failure instruction is obtained, the current login process is terminated and an error prompt information is returned to the user.
7. The method of claim 6, wherein the method is characterized in that, When the authentication result is passed, the corresponding user account is automatically logged in based on the authentication result, and personalized data associated with the user account of the mobile phone terminal is obtained from the server, including: When the authentication result state identifier is passed and the session token passes the verification, the user identity unique identifier and the valid session token are used to establish an authenticated user login state in the screen projection receiving end; Based on the established user login state, a personalized data request is sent to the server, the request containing a user identity unique identifier, a session token and a requested data type identifier, a personalized data response packet returned by the server, the response packet containing personalized configuration information, historical record data and preference setting data associated with the user account; By performing integrity checking and analysis processing on the received personalized data response packet, the personalized data content is extracted, the analyzed personalized data content is bound to the current session of the screen projection receiving end, and is applied to the ongoing screen projection scene.
8. A system for synchronously logging in with a mobile phone user account in a screen projection scenario, the system implementing the method of any one of claims 1 to 7, wherein, Comprise: The acquisition module is used for acquiring the mobile terminal position coordinate as a reference point, acquiring the effective communication range boundary line segment of the screen projection receiving end, calculating the distance from the reference point to the effective communication range boundary line segment to obtain a distance parameter; The encryption module is used for encrypting the user login information based on the distance parameter to obtain encrypted user information; the distance parameter, the encrypted user information and the play address of the to-be-screened content are sent to the screen projection receiving end; based on the screen projection receiving end receiving the distance parameter, the encrypted user information and the play address, the distance parameter is subjected to validity checking to determine whether the distance parameter is within a preset communication distance range; when the distance parameter is within the communication distance range, the encrypted user information is decrypted to obtain the user login information; The processing module is used for sending the decrypted user login information to the server for authentication processing and receiving the authentication result returned by the server; when the authentication result is passed, the corresponding user account is automatically logged in based on the authentication result, and the personalized data associated with the mobile terminal user account is obtained from the server.
9. A computing device, comprising: Comprise: One or more processors; Storage device for storing one or more programs, when the one or more programs are executed by the one or more processors, so that the one or more processors implement the method of any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a program, and the program is executed by the processor to implement the method of any one of claims 1 to 7.