Device connection processing method and apparatus, and electronic device and storage medium
By generating and updating the request response information, the problem that the receiving device cannot be discovered due to blocking is solved, and the device connection success rate is improved.
Patent Information
- Application Number
- PCT/CN2024/129969
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-01-24
- Filing Date
- 2024-11-05
- Publication Date
- 2025-07-31
AI Technical Summary
During the data transmission between devices, the receiving device cannot be discovered due to the active blocking of the sending device, resulting in a decrease in the success rate of the device connection.
By receiving the device discovery request from the sending end, a request response information is generated, and a request response information is determined based on the sending end identification and preset masking rules. If blocked, the request response information is updated and the updated information is sent to realize the connection.
This improves the success rate of equipment connection and avoids the problem that the receiving device cannot be discovered due to blocking.
Smart Images

Figure CN2024129969_31072025_PF_FP_ABST
Abstract
Description
Device connection processing method, device, electronic device and storage medium
[0001] This application claims priority to Chinese patent application filed on January 24, 2024, with application number 2024101046754 and application name “Device connection processing method, device, electronic device and storage medium”, all contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the field of communication technology, and in particular to a device connection processing method, apparatus, electronic device, and storage medium. Background Art
[0003] With the development of communication technology, data transmission between devices is becoming increasingly widespread. Inevitably, data transmission between devices requires establishing a communication connection between them. During this connection process, the device at one end of the data transmission (e.g., the sender) typically discovers the device at the other end of the data transmission (e.g., the receiver), thereby establishing a connection between the devices. However, during device discovery, the sender often actively blocks the receiving device, preventing it from being discovered, reducing the success rate of device connection. Technical issues
[0004] The present application provides a device connection processing method, apparatus, electronic device and storage medium, aiming to solve the problem that the receiving device cannot be discovered, thereby reducing the device connection success rate. Technical Solutions
[0005] In one aspect, the present application provides a device connection processing method, comprising:
[0006] Receive a device discovery request sent by a sending end, and generate request response information according to the device discovery request;
[0007] determining, according to a sender identifier corresponding to the device discovery request, whether the sender should shield the request response information;
[0008] If the sending end blocks the request response information, updating the request response information according to the sending end identifier and the preset blocking rule;
[0009] The updated request response information is sent to the sending end corresponding to the sending end identifier to establish a connection with the sending end.
[0010] In a possible implementation of the present application, determining whether the sender blocks the request response information according to the sender identifier corresponding to the device discovery request includes:
[0011] Obtaining a sender identifier corresponding to the device discovery request;
[0012] Searching for a preset shielding rule to obtain a target shielding relationship group including the sender identifier, wherein the target shielding relationship group includes a target shielding field corresponding to the sender identifier and a field type corresponding to the shielding field;
[0013] If the target mask field exists in the request response information, it is determined that the sending end masks the request response information.
[0014] In a possible implementation of the present application, the preset shielding rule includes at least one non-shielding relationship group, and one of the non-shielding relationship groups includes an end identifier, a field type, and a non-shielding field;
[0015] If the sending end blocks the request response information, updating the request response information according to the sending end identifier and a preset blocking rule includes:
[0016] If the sending end blocks the request response information, searching for the non-blocking relationship group;
[0017] If a non-shielded field matching the sender identifier exists in the non-shielded relationship group, determining a target non-shielded field according to the field type of the non-shielded field, and setting the target non-shielded field as an update field;
[0018] The target mask field in the request response information is updated to the update field corresponding to the field type to obtain the updated request response information.
[0019] In a possible implementation of the present application, after searching for the preset shielding rule, the method further includes:
[0020] If the target shielding relationship group corresponding to the sender identifier is not obtained, sending the request response information to the sender corresponding to the sender identifier;
[0021] If no feedback information corresponding to the request response information is received from the sending end after a preset period of time, it is determined that the sending end blocks the request response information.
[0022] In a possible implementation of the present application, after sending the updated request response information to the sending end corresponding to the sending end identifier, the method includes:
[0023] If no feedback information corresponding to the updated request response information from the sender is received, randomly generating an update field according to the field type of the field in the request response information;
[0024] The request response information updated according to the update field is sent to the sending end corresponding to the sending end identifier.
[0025] In a possible implementation of the present application, after sending the updated request response information to the sending end corresponding to the sending end identifier, the method further includes:
[0026] If feedback information of the updated request response information corresponding to the sender is received, the sender identifier, and the field type and update field corresponding to the updated request response information are set as a non-shielding relationship group, and updated into the preset shielding rule;
[0027] If no feedback information corresponding to the updated request response information of the sender is received, the sender identifier, and the field type and update field corresponding to the updated request response information are set as a shielding relationship group and updated to the preset shielding rules, wherein the shielding relationship group includes the target shielding relationship group and the sender identifier.
[0028] In a possible implementation of the present application, after sending the updated request response information to the sending end corresponding to the sending end identifier to establish a connection with the sending end, the method further includes:
[0029] Obtaining the video address information and video playback time point sent by the sending end;
[0030] The video corresponding to the video address information is projected and played according to the video playback time point.
[0031] In a second aspect, the present application provides a device connection processing apparatus, the device connection processing apparatus comprising:
[0032] A receiving module, configured to receive a device discovery request sent by a sending end, and generate request response information according to the device discovery request;
[0033] a determination module, configured to determine whether the sending end blocks the request response information according to a sending end identifier corresponding to the device discovery request;
[0034] An updating module, configured to update the request response information according to the sending end identifier and a preset blocking rule if the sending end blocks the request response information;
[0035] The sending module is used to send the updated request response information to the sending end corresponding to the sending end identifier to establish a connection with the sending end.
[0036] In a third aspect, the present application provides an electronic device, comprising:
[0037] one or more processors;
[0038] Memory; and
[0039] One or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the processor to implement the steps in any one of the device connection processing methods.
[0040] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program is loaded by a processor to execute the steps in any one of the device connection processing methods described. Beneficial effects
[0041] The present application provides a device connection processing method, apparatus, electronic device and storage medium, which receives a device discovery request sent by a sender, generates a request response message according to the device discovery request; determines whether the sender blocks the request response message according to the sender identifier corresponding to the device discovery request; if the sender blocks the request response message, updates the request response message according to the sender identifier and a preset blocking rule; sends the updated request response message to the sender corresponding to the sender identifier to connect with the sender. This solution determines the blocking of the request response message during the device discovery phase. If the request response message is blocked, the request response message is updated according to the sender identifier and a preset blocking rule, and further sends the updated request response message to the sender corresponding to the sender identifier, attempts to receive the request response corresponding to the device discovery request, and realizes the connection with the sender. That is, if the sender blocks the request response message, the request response message is dynamically updated, and attempts to realize the connection with the sender according to the updated request response message, thereby avoiding the receiving device from being unable to be discovered due to being blocked, thereby improving the device connection success rate. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0043] FIG1 is a schematic diagram of a scenario of a device connection processing method provided in an embodiment of the present application;
[0044] FIG2 is a flow chart of an embodiment of a device connection processing method provided in an embodiment of the present application;
[0045] FIG3 is a flow chart of another embodiment of the device connection processing method provided in an embodiment of the present application;
[0046] FIG4 is a schematic diagram of a flow chart of one implementation scheme for updating the request response information in the device connection processing method provided in an embodiment of the present application;
[0047] FIG5 is a flow chart of another embodiment of the device connection processing method provided in an embodiment of the present application;
[0048] FIG6 is a schematic diagram of a flow chart of one implementation of a device connection processing method provided in an embodiment of the present application;
[0049] FIG7 is a flow chart of another embodiment of the device connection processing method provided in an embodiment of the present application;
[0050] FIG8 is a schematic structural diagram of an embodiment of a device connection processing apparatus provided in an embodiment of the present application;
[0051] FIG9 is a schematic structural diagram of an embodiment of an electronic device provided in an embodiment of the present application. Modes for Carrying Out the Invention
[0052] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making creative efforts shall fall within the scope of protection of the present invention.
[0053] In the description of the present invention, it should be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside" and the like indicate positions or positional relationships based on the positions or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first" and "second" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the said features. In the description of the present invention, the meaning of "multiple" is two or more, unless otherwise clearly and specifically defined.
[0054] In the embodiments of the present application, "and / or" describes the relationship between associated objects, indicating that three possible relationships exist. For example, "A and / or B" can represent three situations: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the character " / ", unless otherwise specified, generally indicates that the associated objects are in an "or" relationship.
[0055] In this application, the word "exemplary" is used to mean "serving as an example, illustration, or illustration." Any embodiment described in this application as "exemplary" is not necessarily to be construed as preferred or advantageous over other embodiments. The following description is given to enable any person skilled in the art to make and use the invention. In the following description, details are listed for the purpose of explanation. It should be understood that one of ordinary skill in the art will recognize that the invention can be practiced without these specific details. In other instances, well-known structures and processes are not described in detail to avoid obscuring the description of the invention with unnecessary detail. Therefore, the present invention is not intended to be limited to the embodiments shown, but is to be accorded the widest scope consistent with the principles and features disclosed herein.
[0056] The embodiments of the present application provide a device connection processing method, apparatus, device, and computer-readable storage medium (the computer-readable storage medium may be referred to as storage medium in its entirety), which are described in detail below.
[0057] The device connection processing method in the embodiment of the present invention is applied to a device connection processing device, which is arranged in an electronic device. The electronic device is provided with one or more processors, memories, and one or more applications, wherein the one or more applications are stored in the memories and configured to be executed by the processor to implement the device connection processing method; the electronic device can be a terminal, such as a mobile phone or a tablet computer, and the electronic device can also be a server, or a service cluster consisting of multiple servers.
[0058] As shown in Figure 1, Figure 1 is a scenario diagram of the device connection processing method in an embodiment of the present application. The device connection scenario in the embodiment of the present invention includes an electronic device 100 (a device connection processing device is integrated in the electronic device 100), and a computer-readable storage medium corresponding to the device connection is run in the electronic device 100 to execute the device connection steps.
[0059] It can be understood that the electronic devices in the scenario of the device connection processing method shown in Figure 1, or the devices contained in the electronic devices, do not constitute a limitation on the embodiments of the present invention. That is, the number of devices and types of devices contained in the scenario of the device connection processing method, or the number and types of devices contained in each device do not affect the overall implementation of the technical solution in the embodiments of the present invention, and can all be regarded as equivalent replacements or derivatives of the technical solution claimed to be protected in the embodiments of the present invention.
[0060] In an embodiment of the present invention, the electronic device 100 is mainly used to: receive a device discovery request sent by a sender, obtain request response information and a sender identifier corresponding to the device discovery request; if the sender blocks the request response information, update the request response information according to the sender identifier and preset blocking rules; send the updated request response information to the sender corresponding to the sender identifier to connect with the sender.
[0061] In the embodiments of the present invention, the electronic device 100 may be an independent electronic device, or may be an electronic device network or electronic device cluster composed of electronic devices. For example, the electronic device 100 described in the embodiments of the present invention includes, but is not limited to, a computer, a network host, a single network electronic device, a set of multiple network electronic devices, or a cloud electronic device composed of multiple electronic devices. The cloud electronic device is composed of a large number of computers or network electronic devices based on cloud computing.
[0062] Those skilled in the art will understand that the application environment shown in FIG1 is merely one application scenario of the present application solution and does not constitute a limitation on the application scenario of the present application solution. Other application environments may also include more or fewer electronic devices than shown in FIG1 , or electronic device network connection relationships. For example, FIG1 shows only one electronic device. It can be understood that the scenario of the device connection processing method may also include one or more other electronic devices, which are not specifically limited here; the electronic device 100 may also include a memory for storing data, for example, storing image information obtained by shooting, etc.
[0063] In addition, in the scenario of the device connection processing method of the present application, the electronic device 100 can be provided with a display device, or the electronic device 100 is not provided with a display device and is communicated with an external display device. Specifically, it also includes a sending end device 200 corresponding to the electronic device 100, and the sending end device 200 initiates a device discovery request as a sending end. The electronic device 100 can access a background database 300 (the background database can be in the local memory of the electronic device, and the background database can also be set in the cloud), and the background database 300 stores information related to the device connection, for example, the initial image in the background database 300, or pre-set filtering parameters.
[0064] It should be noted that the scenario diagram of the device connection processing method shown in Figure 1 is only an example. The scenario of the device connection processing method described in the embodiment of the present invention is to more clearly illustrate the technical solution of the embodiment of the present invention, and does not constitute a limitation on the technical solution provided by the embodiment of the present invention.
[0065] Based on the scenario of the above-mentioned device connection processing method, an embodiment of the device connection processing method is proposed.
[0066] FIG2 is a flow chart of an embodiment of a device connection processing method according to an embodiment of the present application. The device connection processing method includes steps S201 to S204:
[0067] S201: Receive a device discovery request sent by a sending end, and generate request response information according to the device discovery request.
[0068] Among them, the device discovery request is a request sent by the sender in the device discovery phase. It can be understood that in some data transmission scenarios, the sender can be the sender in the data transmission scenario. When data transmission is required, the sender initiates a device discovery request to be received by the receiving end. Furthermore, the receiving end is the data receiving end in the data transmission scenario. It can be understood that the sender and the receiving end can be electronic devices such as mobile phones, computers, and tablets.
[0069] Among them, the request response information, that is, the response information in response to the device discovery request, wherein the request response information includes the protocol of the receiving end and the service information file; it can be understood that data transmission is achieved between the sending end and the receiving end through different data transmission protocols, and the corresponding device discovery request and the format and content of the device discovery request may also be different. Exemplarily, the data transmission protocol may include: DLNA protocol, AirPlay protocol, Miracast protocol, etc., which is not specifically limited in this application.
[0070] For example, in one embodiment of the present application, the sending end is a DLNA protocol screen projection device sending end, and the receiving end is a DLNA protocol screen projection device receiving end. The DLNA protocol screen projection device sending end and the DLNA protocol screen projection device receiving end implement the screen projection function through the DLNA protocol, that is, implement screen projection data transmission; that is, it can be understood that the request response information includes the SSDP request response and the communication protocol.
[0071] Specifically, SSDP: Simple Service Discovery Protocol, that is, the SSDP request response, that is, the response information of the SSDP, is an M-SEARCH response, which can send an "ssdp:discover" (SSDP request response) message to the SSDP port of a specific multicast address using the M-SEARCH method.
[0072] Specifically, the communication protocol includes the SOAP communication protocol. The SOAP communication protocol SOAP (Simple Object Access Protocol) is a simple XML-based protocol that enables applications to exchange information through HTTP in a decentralized or distributed environment. The SOAP communication protocol includes a service information file on the receiving end.
[0073] It is understandable that the sender can discover and search for service devices through HTTPMU, that is, HTTP (Multicast over UDP). The Hypertext Transfer Protocol (HTTP) is a simple request-response protocol that specifies what kind of messages the sender may send to the receiver and what kind of responses it may receive.
[0074] Specifically, the DLNA protocol can generally be simply divided into two device roles: the sender (control point, i.e., the DLNA protocol screen projection device sender) and the receiver (i.e., the DLNA protocol screen projection device receiver). The DLNA protocol implements device discovery capabilities through the SSDP protocol based on HTTPMU. The sender uses the SOAP protocol (SOAP: Simple Object Access Protocol, a remote call method based on XML, to send commands and receive data through HTTP. In the DLNA device discovery phase, the sender will request the device description file and service description file from the receiver through SOAP) to obtain the device description file and service description file of the receiver, and then learn about the device information and service capabilities of the receiver. That is, the sender regularly and repeatedly initiates device discovery requests to the receiver in the local area network, thereby realizing the sending of the device discovery request by the sender, and the device discovery request carries the sending identifier of the sender of the device discovery request.
[0075] S202: Determine, based on a sender identifier corresponding to the device discovery request, whether the sender should shield the request response information;
[0076] The sender identifier is a unique identifier used to characterize the sender. Exemplarily, the sender identifier can be a sender device ID, a sender communication identifier, and the like.
[0077] Specifically, in one embodiment of the present application, after the receiving end receives the device discovery request sent by the sending end and obtains the request response information and the sending end identifier corresponding to the device discovery request, it can determine whether the sending end blocks the request response information by sending the request response information to the sending end corresponding to the sending end identifier, and then determine whether the sending end blocks the receiving end. Alternatively, in some other embodiments, it is also possible to determine whether the request response information contains a blocked field by looking up the preset blocking rule, and then determine whether the sending end blocks the request response information sent by the receiving end, that is, determine whether the sending end blocks the receiving end. If it is determined that the sending end blocks the request response information, the request response information is updated according to the sending end identifier and the preset blocking rule.
[0078] S203: If the sending end blocks the request response information, the request response information is updated according to the sending end identifier and a preset blocking rule.
[0079] Among them, the preset shielding rules are used to determine the fields that are not shielded in the request response information; it can be understood that the preset shielding rules can be created based on the device discovery information in the historical data transmission process, or obtained through user presets, and this application does not limit this specifically.
[0080] Specifically, the specific implementation method of updating the request response information is not specifically limited in this application, and is illustratively:
[0081] In some embodiments of the present application, updated request response information is obtained by identifying the non-masked field corresponding to the sender identifier in the preset masking rule and replacing the non-masked field corresponding to the masked field corresponding to the sender identifier in the preset masking rule with the request response information.
[0082] In some other embodiments of the present application, by identifying the non-masked field corresponding to the sender identifier in the preset masking rule, and when the non-masked field corresponding to the sender identifier in the preset masking rule is not identified, a target field corresponding to each masked field in the request response information is randomly generated, and the target field is updated to the request response information.
[0083] S204: Send the updated request response information to the sending end corresponding to the sending end identifier to establish a connection with the sending end.
[0084] Specifically, after the request response information is updated, the updated request response information is sent to the sender that sent the device discovery request. Furthermore, the sender creates a connection with the receiver based on the request response information. For example, in the DLAN protocol screen transmission implementation scenario, the receiver sends the updated M-SEARCH response to the sender by using the M-SEARCH method to the SSDP port of a specific multicast address.
[0085] This solution determines whether the sender has blocked the request response information during the device discovery phase. If the sender blocks the request response information, the solution updates the request response information based on the sender's identifier and preset blocking rules, adaptively adjusts the request response information, and establishes a connection with the sender based on the updated request response information. This improves the device connection success rate.
[0086] Further, based on the above implementation scheme, referring to FIG3 , FIG3 is a flow chart of another implementation scheme of the device connection processing method provided in an embodiment of the present application, specifically including steps S301-S306:
[0087] S301: Receive a device discovery request sent by a sending end, and generate request response information according to the device discovery request.
[0088] Specifically, the specific implementation of step S301 can be found in any implementation scheme.
[0089] S302: Obtain a sender identifier corresponding to the device discovery request.
[0090] Specifically, the sender identifier may be carried in the device discovery request, and the receiver extracts the sender identifier corresponding to the sender by parsing the device discovery request.
[0091] S303: Search for a preset shielding rule and obtain a target shielding relationship group including the sender identifier, wherein the target shielding relationship group includes a target shielding field corresponding to the sender identifier.
[0092] Specifically, in the implementation scheme of the present application, the preset shielding rules include a blacklist consisting of at least one shielding relationship group, wherein the shielding relationship group includes at least one (sending) end identifier, field type, and at least one shielding field corresponding to each of the field types.
[0093] Among them, the field type is the type divided according to the field content representation of the masked field. For example, the masked field represents the manufacturer, and the field type is the manufacturer type. That is, it can be understood that the masked field is a computer field representing the manufacturer, which can represent the manufacturer's number, name, etc.
[0094] Exemplarily, in one embodiment of the present application, after receiving the device discovery request sent by the sender and obtaining the sender identifier, the receiving end searches the blacklist in the preset shielding rules. If there is a target shielding relationship group including the sender identifier in the blacklist, the target shielding field in the target shielding group and the field type corresponding to the target shielding field are obtained, and the fields in the request response information are matched and searched for corresponding target shielding fields and the field type corresponding to the target shielding field.
[0095] S304: If the target mask field exists in the request response information, determine that the sending end masks the request response information.
[0096] Furthermore, after the receiving end searches for the preset shielding rule according to the sending end identifier, it obtains the target shielding relationship group corresponding to the sending end identifier included in the preset shielding rule, and then compares the field in the request response information corresponding to the field type of the target shielding field in the target shielding relationship group with the corresponding target shielding field. If there is at least one field in the request response information that is the same as the target shielding field, it is determined that the sending end shields the request response information.
[0097] S305: If the sending end blocks the request response information, the request response information is updated according to the sending end identifier and a preset blocking rule.
[0098] S306: Send the updated request response information to the sending end corresponding to the sending end identifier to establish a connection with the sending end.
[0099] Specifically, the specific implementation scheme of steps S305-S36 can be found in any of the above implementation schemes.
[0100] This solution determines that the sending end blocks the request response information through a preset blocking rule, thereby saving the step of sending the request response information to the sending end for blocking determination and improving data processing efficiency.
[0101] It is understandable that in some embodiments of the present application, the request response information may be sent to the sending end, and a screening judgment may be made based on whether feedback regarding the request response information from the sending end is received. This application does not make any specific limitations.
[0102] Further, based on the above implementation scheme, referring to FIG4 , FIG4 is a flow chart of one implementation scheme for updating the request response information in the device connection processing method provided in an embodiment of the present application, specifically including steps S401-S403:
[0103] S401: If the sending end blocks the request response information, search for a non-blocking relationship group.
[0104] Specifically, in the present embodiment, the preset shielding rules include at least one non-shielded relationship group, and one of the non-shielded relationship groups includes an end identifier, a field type, and a non-shielded field. It can be understood that the end identifier is the identifier of a different sending end, and the field type has the same meaning as the above-mentioned field type. The non-shielded field, that is, the field that will not be shielded by the sending end corresponding to the sending end identifier and the field type, exemplarily, the field type is the manufacturer type, the shielded field is A, and the non-shielded field is B.
[0105] Specifically, in the implementation scheme of the present application, after determining that the sending end blocks the request response information, the receiving end searches for the non-blocking relationship group in the preset blocking rule according to the sending end identifier corresponding to the device discovery request.
[0106] S402: If a non-shielded field matching the sender identifier exists in the non-shielded relationship group, determine a target non-shielded field according to the field type of the non-shielded field, and set the target non-shielded field as an update field.
[0107] Furthermore, in one of the embodiments of the present application, after executing the sending end identifier corresponding to the device discovery request and searching for the non-shielded relationship group in the preset shielding rule, if there is a target non-shielded relationship group including the sending end identifier in the non-shielded relationship group, the target non-shielded field in the target non-shielded relationship group whose field type is the same as the field type of the target shielded field shielded in the request response information is obtained as the update field.
[0108] S403: Update the target mask field in the request response information to the update field corresponding to the field type to obtain the updated request response information.
[0109] Furthermore, after obtaining the update field, the receiving end replaces the masked field corresponding to the same field type in the request response information with the update field, thereby updating the request response information and obtaining the updated request response information.
[0110] It is understandable that the non-shielded relationship groups may be stored in a form to form a whitelist.
[0111] In this solution, the request response information is updated through a preset non-shielding relationship group, thereby improving the updating efficiency of the request response information.
[0112] Further, based on the above implementation scheme, referring to FIG5 , FIG5 is a flow chart of another implementation scheme of the device connection processing method provided in an embodiment of the present application, specifically including steps S501-S505:
[0113] S501: Receive a device discovery request sent by a sending end, and generate request response information according to the device discovery request.
[0114] Specifically, the specific implementation of step S501 can be found in any implementation scheme.
[0115] S502: Search for a preset shielding rule. If neither the target shielding relationship group corresponding to the sender identifier nor the non-shielding relationship group including the sender identifier is obtained, send the request response information to the sender corresponding to the sender identifier.
[0116] Specifically, in the technical solution of the present application, the preset shielding rules include the shielding relationship group and non-shielding relationship group described in the above-mentioned implementation scheme. After the receiving end receives the device discovery request sent by the sending end and obtains the request response information and the sending end identifier corresponding to the device discovery request, the receiving end searches for the preset shielding rules to determine whether the preset shielding rules include the shielding relationship group and non-shielding relationship group corresponding to the sending end identifier that sent the device discovery request. If the target shielding relationship group corresponding to the sending end identifier and the non-shielding relationship group including the sending end identifier are not obtained, it means that the information corresponding to the sending end identifier is not preset in the preset shielding rules. At this time, it is impossible to judge whether the sending end blocks the request response information based on the preset shielding rules, and the request response information is directly sent to the sending end corresponding to the sending end identifier for judgment.
[0117] It can be understood that in some other implementation schemes of the present application, the preset shielding rules are searched. If the target shielding relationship group corresponding to the sending end identifier is not obtained, but there is a target non-shielding relationship group including the sending end identifier, the field of the corresponding field type in the request response information is directly updated according to the target non-shielding relationship group to avoid waste of trial and error procedures. After the update, it is directly sent to the receiving end, and step S503 is further executed.
[0118] It can be understood that in some other implementation schemes of the present application, the preset shielding rules are searched. If the target shielding relationship group corresponding to the sending end identifier is not obtained, the non-shielding relationship group is not searched, and the request response information is directly sent to the sending end corresponding to the sending end identifier, and step S503 is further executed.
[0119] S503: If no feedback information corresponding to the request response information is received from the sending end after a preset period of time, it is determined that the sending end blocks the request response information.
[0120] Specifically, it can be understood that if no feedback information corresponding to the request response information is received from the sender after the preset time, it means that the sender has not processed the request response information, that is, it is determined that the sender has blocked the request response information.
[0121] It is understandable that in the implementation scheme of the present application, after the target shielding relationship group corresponding to the sender identifier is not obtained, and the request response information is sent to the sender corresponding to the sender identifier, and no feedback information is received from the sender regarding the request response information, the field types and fields that may be shielded in the request response information are extracted, and the fields are used as shielding fields. The field types and the sender identifier are associated to generate a shielding relationship group and updated to the preset shielding rules so that they can be searched during the next communication. It is understandable that the field types that may be shielded can be preset, or the field types already in the preset shielding rules can be used as the field types that may be shielded to perform field extraction for the request response information, so as to achieve real-time update of the preset shielding rules.
[0122] S504: If the sending end blocks the request response information, the request response information is updated according to the sending end identifier and a preset blocking rule.
[0123] S505: Send the updated request response information to the sending end corresponding to the sending end identifier to establish a connection with the sending end.
[0124] Specifically, the specific implementation of steps S504-S505 can be found in any of the above implementation plans.
[0125] Specifically, based on the above implementation scheme, the present application also provides a specific implementation scheme for updating the request response information according to the sender identifier and the preset blocking rule, which specifically includes the steps of:
[0126] (1) If the sending end blocks the request response information, searching for the non-blocking relationship group;
[0127] (2) if there is a non-shielded field in the non-shielded relationship group that matches the sender identifier, determining a target non-shielded field according to the field type of the non-shielded field, and setting the target non-shielded field as an update field;
[0128] (3) The target mask field in the request response information is updated to the update field corresponding to the field type, to obtain the updated request response information.
[0129] Specifically, refer to Figure 6, which is a flow chart of one implementation scheme of the device connection processing method provided in an embodiment of the present application. In the implementation scheme of the present application, the sending end feature identifier can be the User-Agent and other information of the sending end, and the receiving end feature identifier can be the SERVER information in the M-SEARCH response, the manufacturer information in the device description file, etc.
[0130] S1: The DLNA receiver R1 obtains a DLNA anti-shielding rule list from the cloud as a preset shielding rule. For example, the anti-shielding rule list includes a designated shielding rule list L1 (L1 is the blacklist in the above embodiment), a designated non-shielding rule list L2 (L2 is the whitelist in the above embodiment), etc.
[0131] Specifically, in one embodiment of the present application, the shielding relationship group and the non-shielding relationship group in the anti-shielding rule list are stored in a single table, for example:
[0132] The * represents any sending end identifier, and RMx represents any sending end representation update field.
[0133] S2: The DLNA receiver R1 receives a device discovery request RQx from any DLNA transmitter Ax among A1 / A2 / A3 / A4.
[0134] S3: The DLNA receiver R1 parses the device discovery request RQx and compares the content of RQx, such as the User-Agent field, with the relevant information in L1 / L2 to determine whether the DLNA sender can be identified.
[0135] If the sender Ax cannot be identified in step S3 (i.e., if the target shielding relationship group corresponding to the sender identifier and the non-shielding relationship group including the sender identifier are not obtained, the request response information is sent to the sender corresponding to the sender identifier), then steps S4-S6 are executed:
[0136] S4: After receiving the device discovery request RQx, the DLNA receiver R1 keeps the device UUID information in the USN information in the M-SEARCH request response and the UDN information in the device description file (i.e., the device UUID information) unchanged, but R1 returns different feature identification information in each request response RPx. As described in steps S5 / S6:
[0137] S5: The DLNA receiver R1, in the device discovery request response RPx, bypasses the specified feature identifier in the masking rule list L1, configures the relevant feature information in the RPx response content to multiple different sets of information RMx that are not permanently fixed, such as those specified by the cloud or randomly generated, and responds alternately to prevent them from being used as valid feature identifiers. That is, if no feedback information corresponding to the updated request response information from the sender is received, an update field is randomly generated based on the field type of the field in the request response information. It is understandable that the field type in the request response information can correspond to an existing field type in the preset masking rule. The request response information updated according to the update field is sent to the sender corresponding to the sender identifier until the updated request response information is not masked, at which point the random generation of the update field ceases.
[0138] S6: The DLNA receiver R1, in the device discovery request response RPx, configures the relevant feature information in the RPx response content into corresponding multiple different information groups RM2 / RM3 / RM4 according to the specified feature identifiers in the unblocking rule list L2, and responds alternately, simulating a receiver that is specified as unblocked in the unblocking rule (i.e., determines the target unblocked field according to the field type of the unblocked field, and sets the target unblocked field as the update field. It is understandable that the unblocked fields corresponding to the respective field types in the unblocking relationship group can be sequentially used as update fields to update the request response information, and the updated request response information is sent to the sender until the updated request response information is not blocked).
[0139] If the sending end Ax can be identified in step S3, step S7 is executed:
[0140] S7: The DLNA receiver R1, in the device discovery request response RPx, configures the relevant feature information in the RPx response content as the corresponding identification information RMx according to the specified feature identifier in the unblocking rule list L2, simulating the receiving end specified as unblocked in the unblocking rule (that is, if there is an unblocked field in the unblocking relationship group that matches the sender identifier, a target unblocked field is determined based on the field type of the unblocked field, and the target unblocked field is set as the update field, thereby obtaining the updated request response information).
[0141] S8: The DLNA transmitter Ax receives the device discovery request response RQx from the receiver R1, completing the single device discovery request instruction.
[0142] S9: The DLNA transmitter Ax repeats S2-S8 multiple times, records the DLNA receiver list L3 and presents it to the user side.
[0143] The above is the specific process of the technical solution for DLNA protocol anti-shielding.
[0144] The list L3 is used to display connectable receiving ends to the user, that is, the list L3 includes at least one connected receiving end.
[0145] Further, based on the above implementation scheme, referring to FIG. 7 , FIG. 7 is a flow chart of another implementation scheme of the device connection processing method provided in an embodiment of the present application, specifically including steps S701-S706:
[0146] S701, receiving a device discovery request sent by a sending end, and generating request response information according to the device discovery request;
[0147] S702: Determine, based on a sender identifier corresponding to the device discovery request, whether the sender blocks the request response information;
[0148] S703: If the sending end blocks the request response information, update the request response information according to the sending end identifier and a preset blocking rule;
[0149] S704: Send the updated request response information to the sending end corresponding to the sending end identifier to establish a connection with the sending end.
[0150] Specifically, the specific implementation scheme of steps S701-S704 can be found in any of the above implementation schemes.
[0151] S705. If feedback information corresponding to the updated request response information of the sender is received, the sender identifier, and the field type and update field corresponding to the updated request response information are set to a non-shielded relationship group and updated to the preset shielding rule.
[0152] Specifically, if the receiving end receives feedback information corresponding to the updated request response information from the sending end, it means that the sending end has not blocked the request response information, and then extracts the field corresponding to the field type in the request response information as a non-blocked field, associates the field type, the non-blocked field corresponding to the field type, and the sending end identifier to form a relationship group, and updates the relationship group to the preset blocking rule. It can be understood that the update action is performed for the situation where the non-blocked field of any field type corresponding to the sending end identifier is not stored in the preset blocking rule, or the formed relationship group does not exist in the preset blocking rule.
[0153] S706. If no feedback information corresponding to the updated request response information of the sender is received, the sender identifier, and the field type and update field corresponding to the updated request response information are set as a shielding relationship group and updated to the preset shielding rule.
[0154] Specifically, if the receiving end does not receive the feedback information corresponding to the updated request response information from the sending end, it means that the updated request response information is further blocked. Then, according to any of the above implementation schemes, the update field is re-determined to re-update the request response information and resend it. At the same time, the corresponding field type and update field in the blocked updated request response information are extracted, set as a blocking relationship group, and updated to the preset blocking rule.
[0155] It is understood that a certain field type of the sender identifier may correspond to multiple masked fields, or to multiple non-masked fields of the same field type. That is, a certain field type of a sender identifier may correspond to multiple masked fields. For example, a sender identifier and a vendor type may correspond to masked fields such as vendor A and vendor B.
[0156] It can be understood that in some embodiments of the present application, after receiving the device discovery request sent by the sender and obtaining the request response information and sender identifier corresponding to the device discovery request, there will be a situation where the sender determines that the sender has not blocked the request response information according to the preset blocking rule (the field corresponding to each field type in the request response information is the same as the non-blocked field in the target non-blocked relationship group including the sender identifier in the whitelist), and then sends the request response information to the sender, but no feedback from the sender regarding the request response information is received. This situation may be that the blocking rule of the sender has been updated. At this time, the target non-blocked field including the sender identifier in the whitelist can be updated to a blocked field according to the request response information, and a blocked relationship group and a non-blocked relationship group corresponding to the sender identifier can be generated.
[0157] This solution can update the preset shielding rules in real time to ensure the accuracy of the preset shielding rules.
[0158] Further, in one embodiment of the present application, after the backend sends the updated request response information to the sending end corresponding to the sending end identifier, the receiving end establishes a connection with the receiving end according to the M-SEARCH request response, device description file, service description file and other information in the request response information, and further, the sending end sends the data of the device to be sent to the receiving end so that the receiving end can transmit it. For example:
[0159] (1) The sender establishes a screen projection link with the receiver based on the request response information. The sender sends the video address information and video playback time point of the video to be screen-transmitted to the receiver through the screen projection link;
[0160] (2) The receiving end obtains the video address information and video playback time point sent by the sending end;
[0161] (3) Casting and playing the video corresponding to the video address information according to the video playback time point.
[0162] For various reasons, some DLNA senders in this solution may extract the receiver's signature information (e.g., the SERVER information in the M-SEARCH response and the manufacturer information in the device description file) based on the receiver's M-SEARCH request response, device description file, and service description file in the SSDP. These signature information can then be used to perform special processing, such as device blocking, on the receiver. There may be multiple such senders, and each may have different blocking rules. These rules may be specified based on a specific set of receiver signatures, or may be specified to be unblocked. Senders may also dynamically update their blocking rules. The invention provides that during the device discovery phase of DLNA, when the receiving end receives the device discovery request from the sending end, if the sending end has a specified shielding rule for the receiving end, the receiving end can dynamically change the information in the SSDP M-SEARCH request response, SOAP device description file, and SOAP service description file that can be used as the characteristic identification of the receiving end, so as to avoid bypassing the information of the sending end as the specified shielding rule; if the sending end has a specified non-shielding rule for the receiving end, the receiving end can return the characteristic identification information in each request response in a targeted manner, simulating the receiving end as the non-shielded receiving end specified by the sending end. When the receiving end faces multiple senders and each sender repeats the device discovery request multiple times, the device UUID information in the USN information in the M-SEARCH request response and the UDN information in the device description file (i.e., the device UUID information) remain unchanged, and the receiving end returns different two types of characteristic identification information in each response. If the M-SEARCH request, device description file request, or service description file request is accompanied by information such as the User-Agent that can identify the sender, the receiver can execute corresponding anti-shielding rules based on different senders. The sender's designated shielding rules and designated non-shielding rules for the receiver can be maintained and updated through dynamic configuration in the cloud. The above method can effectively avoid the situation where the sender can identify the receiver and actively shield it, and at the same time will not affect the sender's normal device discovery behavior for the same receiver, greatly improving the user's perception of the receiver's device discovery success rate, stability, and compatibility, thereby improving the quality of the receiver.
[0163] The embodiment of the present application provides a device connection processing method, which receives a device discovery request sent by a sender, generates a request response message according to the device discovery request; determines whether the sender blocks the request response message according to the sender identifier corresponding to the device discovery request; if the sender blocks the request response message, updates the request response message according to the sender identifier and a preset blocking rule; sends the updated request response message to the sender corresponding to the sender identifier to connect with the sender. This solution determines the blocking of the request response message during the device discovery phase. If the request response message is blocked, updates the request response message according to the sender identifier and a preset blocking rule, further sends the updated request response message to the sender corresponding to the sender identifier, attempts to receive the request response corresponding to the device discovery request, and realizes the connection with the sender. That is, if the sender blocks the request response message, dynamically updates the request response message and attempts to realize the connection with the sender according to the updated request response message, thereby avoiding the receiving device from being unable to be discovered due to being blocked, thereby improving the device connection success rate.
[0164] In order to better implement the device connection processing method in the embodiment of the present application, based on the device connection processing method, the embodiment of the present application further provides a device connection processing device, as shown in FIG8 , the device connection processing device includes modules 801-804:
[0165] The receiving module 801 is configured to receive a device discovery request sent by a sending end, and generate a request response message according to the device discovery request;
[0166] A determination module 802 is configured to determine whether the sender shields the request response information according to a sender identifier corresponding to the device discovery request;
[0167] An updating module 803 is configured to update the request response information according to the sender identifier and a preset blocking rule if the sender blocks the request response information;
[0168] The sending module 804 is configured to send the updated request response information to the sending end corresponding to the sending end identifier to establish a connection with the sending end.
[0169] In some embodiments of the present application, the determining module 802 is configured to determine whether the sending end blocks the request response information based on the sending end identifier corresponding to the device discovery request, specifically including:
[0170] Obtaining a sender identifier corresponding to the device discovery request;
[0171] Searching for a preset shielding rule to obtain a target shielding relationship group including the sender identifier, wherein the target shielding relationship group includes a target shielding field corresponding to the sender identifier and a field type corresponding to the shielding field;
[0172] If the target mask field exists in the request response information, it is determined that the sending end masks the request response information.
[0173] In some embodiments of the present application, the preset shielding rule includes at least one non-shielding relationship group, and one of the non-shielding relationship groups includes an end identifier, a field type, and a non-shielding field;
[0174] The updating module 803 is configured to update the request response information according to the sending end identifier and a preset blocking rule if the sending end blocks the request response information, specifically including:
[0175] If the sending end blocks the request response information, searching for the non-blocking relationship group;
[0176] If a non-shielded field matching the sender identifier exists in the non-shielded relationship group, determining a target non-shielded field according to the field type of the non-shielded field, and setting the target non-shielded field as an update field;
[0177] The target mask field in the request response information is updated to the update field corresponding to the field type to obtain the updated request response information.
[0178] In some embodiments of the present application, the determining module 802, after searching for the preset shielding rule, further includes:
[0179] If the target shielding relationship group corresponding to the sender identifier is not obtained, sending the request response information to the sender corresponding to the sender identifier;
[0180] If no feedback information corresponding to the request response information is received from the sending end after a preset period of time, it is determined that the sending end blocks the request response information.
[0181] In some embodiments of the present application, the sending module 804 is configured to send the updated request response information to the sending end corresponding to the sending end identifier, and further includes:
[0182] If no feedback information corresponding to the updated request response information from the sender is received, randomly generating an update field according to the field type of the field in the request response information;
[0183] The request response information updated according to the update field is sent to the sending end corresponding to the sending end identifier.
[0184] In some embodiments of the present application, an updating module is further included. After the sending module 804 is configured to send the updated request response information to the sending end corresponding to the sending end identifier, the updating module includes:
[0185] If feedback information of the updated request response information corresponding to the sender is received, the sender identifier, and the field type and update field corresponding to the updated request response information are set as a non-shielding relationship group, and updated into the preset shielding rule;
[0186] If no feedback information corresponding to the updated request response information of the sender is received, the sender identifier, and the field type and update field corresponding to the updated request response information are set as a shielding relationship group and updated to the preset shielding rules, wherein the shielding relationship group includes the target shielding relationship group and the sender identifier.
[0187] In some embodiments of the present application, a screen projection module is further included. After the sending module 804 is configured to send the updated request response information to the sending end corresponding to the sending end identifier to establish a connection with the sending end, the screen projection module includes the following functions:
[0188] Obtaining the video address information and video playback time point sent by the sending end;
[0189] The video corresponding to the video address information is projected and played according to the video playback time point.
[0190] The present embodiment provides a device connection processing apparatus, which comprises a receiving module configured to receive a device discovery request sent by a sender and generate a request response message based on the device discovery request; a determining module configured to determine, based on a sender identifier corresponding to the device discovery request, whether the sender has blocked the request response message; an updating module configured to update the request response message based on the sender identifier and preset blocking rules if the sender has blocked the request response message; and a sending module configured to send the updated request response message to the sender corresponding to the sender identifier, thereby establishing a connection with the sender. This solution performs a shielding judgment on the request response information during the device discovery phase. When the request response information is shielded, the request response information is updated according to the sender identifier and preset shielding rules, and the updated request response information is further sent to the sender corresponding to the sender identifier, and attempts are made to discover the request response corresponding to the device discovery request to achieve connection with the sender. That is, when the sender shields the request response information, the request response information is dynamically updated, and attempts are made to achieve connection with the sender based on the updated request response information, thereby avoiding the receiving device from being unable to be discovered due to being shielded, and improving the device connection success rate.
[0191] On the basis of the above implementation scheme, an embodiment of the present invention further provides an electronic device, as shown in FIG9 , which is a schematic structural diagram of an embodiment of the electronic device provided in the embodiment of the present application.
[0192] Electronic equipment includes:
[0193] one or more processors;
[0194] Memory; and
[0195] One or more applications, wherein the one or more applications are stored in the memory and are configured to execute, by the processor, the steps of the device connection processing method in any of the above device connection processing method embodiments.
[0196] Specifically, the electronic device may include components such as a processor 1001 with one or more processing cores, a memory 1002 with one or more computer-readable storage media, a power supply 1003, and an input unit 1004. Those skilled in the art will appreciate that the electronic device structure shown in FIG9 does not limit the electronic device and may include more or fewer components than shown, or combine certain components, or arrange the components differently.
[0197] Processor 1001 is the device's connection processing center, connecting the various parts of the entire electronic device using various interfaces and lines. By running or executing software programs and / or modules stored in memory 1002 and calling data stored in memory 1002, it performs various functions of the electronic device and processes data, thereby monitoring the electronic device as a whole. It is understood that processor 1001 transmits signals with the controller. Optionally, processor 1001 may include one or more processing cores; preferably, processor 1001 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly handles wireless communications. It is understood that the above-mentioned modem processor may not be integrated into processor 1001.
[0198] The memory 1002 can be used to store software programs and modules. The processor 1001 executes various functional applications and data processing by running the software programs and modules stored in the memory 1002. The memory 1002 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory 1002 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage device. Accordingly, the memory 1002 may also include a memory controller to provide the processor 1001 with access to the memory 1002.
[0199] In some embodiments of the present application, the device connection processing apparatus may be implemented as a computer program that can be run on an electronic device as shown in FIG9 . The memory of the electronic device may store the various program modules that comprise the device connection processing method apparatus, such as the response receiving module 701, the determination module 702, the update module 703, and the sending module 804 shown in FIG8 . The computer program composed of the various program modules causes the processor to execute the steps of the device connection processing method of various embodiments of the present application as described in this specification.
[0200] For example, the electronic device shown in FIG9 can execute step S201 through the response receiving module 701 in the device connection processing method apparatus shown in FIG8 . The electronic device can execute step S202 through the determination module 702. The electronic device can execute step S203 through the update module 703. The electronic device can execute step S204 through the sending module 704. The electronic device includes a processor, a memory, and a network interface connected through a system bus. The processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the electronic device is used to communicate with an external electronic device through a network connection. When the computer program is executed by the processor, a device connection processing method is implemented.
[0201] The electronic device also includes a power supply 1003 for supplying power to various components. Preferably, the power supply 1003 can be logically connected to the processor 1001 via a power management system, thereby enabling the power management system to manage charging, discharging, and power consumption. The power supply 1003 can also include one or more DC or AC power supplies, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and other arbitrary components.
[0202] The electronic device may further include an input unit 1004, which may be configured to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.
[0203] Although not shown, the electronic device may further include a display unit, etc., which will not be described in detail here. Specifically, in this embodiment, the processor 1001 in the electronic device will load the executable files corresponding to the processes of one or more application programs into the memory 1002 according to the following instructions, and the processor 1001 will run the application programs stored in the memory 1002 to implement various functions as follows:
[0204] Receive a device discovery request sent by a sending end, and generate request response information according to the device discovery request;
[0205] determining, according to a sender identifier corresponding to the device discovery request, whether the sender should shield the request response information;
[0206] If the sending end blocks the request response information, updating the request response information according to the sending end identifier and the preset blocking rule;
[0207] The updated request response information is sent to the sending end corresponding to the sending end identifier to establish a connection with the sending end.
[0208] Those skilled in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be accomplished by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.
[0209] To this end, an embodiment of the present invention provides a computer-readable storage medium (hereinafter referred to as a storage medium), which may include: a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, etc. A computer program is stored thereon, and the computer program is loaded by a processor to execute the steps of any device connection processing method provided in an embodiment of the present invention. For example, the computer program loaded by the processor may execute the following steps:
[0210] Receive a device discovery request sent by a sending end, and generate request response information according to the device discovery request;
[0211] determining, according to a sender identifier corresponding to the device discovery request, whether the sender should shield the request response information;
[0212] If the sending end blocks the request response information, updating the request response information according to the sending end identifier and the preset blocking rule;
[0213] The updated request response information is sent to the sending end corresponding to the sending end identifier to establish a connection with the sending end.
[0214] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, please refer to the detailed description of other embodiments above and will not be repeated here.
[0215] In specific implementation, the above units or structures can be implemented as independent entities, or can be arbitrarily combined to implement as the same or several entities. The specific implementation of the above units or structures can refer to the previous method embodiments and will not be repeated here.
[0216] The specific implementation of the above operations can be found in the previous embodiments and will not be repeated here.
[0217] The above is a detailed introduction to a device connection processing method, apparatus, electronic device and storage medium provided in the embodiments of the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for those skilled in the art, based on the ideas of the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting the present invention.
Claims
1. A method for processing device connection, wherein, Executed by the receiving end, including: Receiving a device discovery request sent by the sending end, and generating request response information according to the device discovery request; Determining whether the sending end shields the request response information according to the sending end identifier corresponding to the device discovery request; If the sending end shields the request response information, updating the request response information according to the sending end identifier and a preset shielding rule; Sending the updated request response information to the sending end corresponding to the sending end identifier to establish a connection with the sending end.
2. The device connection processing method according to claim 1, wherein, The determining whether the sending end shields the request response information according to the sending end identifier corresponding to the device discovery request includes: Obtaining the sending end identifier corresponding to the device discovery request; Searching for a preset shielding rule to obtain a target shielding relationship group including the sending end identifier, where the target shielding relationship group includes a target shielding field corresponding to the sending end identifier and a field type corresponding to the shielding field; If the target shielding field exists in the request response information, determining that the sending end shields the request response information.
3. The device connection processing method according to claim 2, wherein, The obtaining the sending end identifier corresponding to the device discovery request includes: Parsing the device discovery request to extract the sending end identifier corresponding to the sending end.
4. The device connection processing method according to claim 1, wherein, It also includes: Creating the preset shielding rule based on device discovery information during the historical data transmission process.
5. The device connection processing method according to claim 2, wherein, The preset shielding rule includes at least one non-shielding relationship group, and one non-shielding relationship group includes an end identifier, a field type, and a non-shielding field; The if the sending end shields the request response information, updating the request response information according to the sending end identifier and the preset shielding rule includes: If the sending end shields the request response information, searching for the non-shielding relationship group; If a non-shielding field matching the sending end identifier exists in the non-shielding relationship group, determining a target non-shielding field according to the field type of the non-shielding field, and setting the target non-shielding field as the update field; Updating the target shielding field in the request response information to the update field corresponding to the field type to obtain the updated request response information.
6. The device connection processing method according to claim 5, wherein, After the if the sending end shields the request response information, searching for the non-shielding relationship group, it also includes: When the non-shielding field corresponding to the sending end identifier in the preset shielding rule is not recognized, randomly generating target fields corresponding to each shielding field in the request response information, and updating the target fields to the request response information.
7. The device connection processing method according to claim 5, wherein, After searching for the preset shielding rule, it also includes: If the target shielding relationship group corresponding to the sending end identifier is not obtained, sending the request response information to the sending end corresponding to the sending end identifier; If feedback information corresponding to the request response information from the sending end is not received after a preset duration, determining that the sending end shields the request response information.
8. The device connection processing method according to claim 1, wherein, After sending the updated request response information to the sending end corresponding to the sending end identifier, it includes: If the feedback information corresponding to the updated request response information of the sending end is not received, update fields are randomly generated according to the field types of the fields in the request response information; The request response information updated according to the update fields is sent to the sending end corresponding to the sending end identifier.
9. The device connection processing method according to claim 1, wherein, After sending the updated request response information to the sending end corresponding to the sending end identifier, it further includes: If the feedback information corresponding to the updated request response information of the sending end is received, the sending end identifier, as well as the field type and update fields corresponding to the updated request response information, are set as an unshielded relationship group and updated to the preset shielding rules; If the feedback information corresponding to the updated request response information of the sending end is not received, the sending end identifier, as well as the field type and update fields corresponding to the updated request response information, are set as a shielding relationship group and updated to the preset shielding rules, where the shielding relationship group includes the target shielding relationship group and the sending end identifier.
10. The device connection processing method according to claim 1, wherein, After sending the updated request response information to the sending end corresponding to the sending end identifier to establish a connection with the sending end, it includes: Obtain the video address information and video playback time point sent by the sending end; Perform screen mirroring playback of the video corresponding to the video address information according to the video playback time point.
11. A method for processing device connection, wherein, Executed by the sending end, it includes: Send a device discovery request to the receiving end to enable the receiving end to generate a request response information, where, when the receiving end discovers that the sending end shields the request response information, the request response information is updated; Obtain the updated request response information sent by the receiving end to establish a connection with the receiving end.
12. The device connection processing method according to claim 11, wherein, The sending the device discovery request to the receiving end includes: Based on the Simple Object Access Protocol, repeatedly initiate a device discovery request for the receiving end within the local area network, where the device discovery request contains the sending identifier of the sending end.
13. The device connection processing method according to claim 11, wherein, The request response information includes the protocol of the receiving end and the service information file, and the sending end performs data transmission with the receiving end through the DLNA protocol.
14. The device connection processing method according to claim 11, wherein, After sending the device discovery request to the receiving end to enable the receiving end to generate a request response information, it further includes: Receive the request response information sent by the receiving end.
15. The device connection processing method according to claim 11, wherein, It further includes: When shielding the receiving end, send the device discovery request containing the shielded fields to the receiving end.
16. An apparatus for processing device connections, wherein, Applied to the receiving end, it includes: A receiving module, configured to receive the device discovery request sent by the sending end and generate a request response information according to the device discovery request; A determination module, configured to determine whether the sending end shields the request response information according to the sending end identifier corresponding to the device discovery request; An update module, configured to, if the sending end shields the request response information, update the request response information according to the sending end identifier and the preset shielding rules; A sending module, configured to send the updated request response information to the sending end corresponding to the sending end identifier to establish a connection with the sending end.
17. The device connection processing apparatus according to claim 16, wherein, The determining module is configured to determine whether the sending end shields the request response information according to the sending end identifier corresponding to the device discovery request, and specifically includes: Obtain the sending end identifier corresponding to the device discovery request; Search for a preset shielding rule, and obtain a target shielding relationship group including the sending end identifier. The target shielding relationship group includes a target shielding field corresponding to the sending end identifier and a field type corresponding to the shielding field; If the target shielding field exists in the request response information, it is determined that the sending end shields the request response information.
18. An apparatus for processing device connections, wherein, Applied to the sending end, it includes: A sending module, configured to send a device discovery request to a receiving end, so that the receiving end generates a request response information. Wherein, when the receiving end discovers that the sending end shields the request response information, the request response information is updated; An obtaining module, configured to obtain the updated request response information sent by the receiving end to connect to the receiving end.
19. An electronic device, wherein, The electronic device includes: One or more processors; A memory; and One or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the processor to implement the steps in the device connection processing method described in any one of claims 1 to 10 or 11-15.
20. A computer-readable storage medium, wherein, A computer program is stored thereon, and the computer program is loaded by the processor to execute the steps in the device connection processing method described in any one of claims 1 to 10 or 11-15.
Citation Information
Patent Citations
Communication protocol method, system and device for local area network screen projection and storage medium
CN113259760A
Screen projection equipment discovery method and device, electronic equipment and storage medium
CN113507517A
Screen projection interaction method, device and system, storage medium and product
CN113918110A
Equipment connection processing method and device, electronic equipment and storage medium
CN117915490A
Remote management of DLNA system
US20140324944A1