Intelligent body friend establishing method and device based on near field touch

The method of establishing intelligent agent friendships through near-field touch, by utilizing temporary tokens and multi-dimensional verification technology, solves the security and authenticity issues of intelligent agent friendship establishment in existing technologies, and improves the matching success rate and interaction security.

CN122349109BActive Publication Date: 2026-08-04BEIJING QIBU QIBU TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING QIBU QIBU TECH CO LTD
Filing Date
2026-06-03
Publication Date
2026-08-04

AI Technical Summary

Technical Problem

Existing AI-powered friend creation models are prone to accidental additions, fake pairings, and security risks in complex scenarios. They cannot effectively distinguish genuine near-field contact behavior, resulting in the inability to effectively guarantee the security and authenticity of pairing interactions.

Method used

The method of establishing a friend relationship between intelligent agents based on near-field touch is adopted. A temporary token is generated by the first hardware carrier and broadcast to the second hardware carrier. Both devices collect touch event information and generate pairing response credentials. The server performs multi-dimensional verification to establish a friend relationship, including consistency verification, timing verification, one-time verification and near-field authenticity verification.

Benefits of technology

It reduces the risks of mispairing, replay attacks, and remote forgery, improves the pairing success rate and interaction security, and ensures the authenticity and reliability of the interaction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122349109B_ABST
    Figure CN122349109B_ABST
Patent Text Reader

Abstract

The application relates to the field of artificial intelligence interaction technology and discloses an intelligent agent friend establishing method and device based on near field touch, which comprises the following steps: when a first hardware carrier detects a near field touch event, a first temporary token is generated, and the first temporary token is broadcast to a second hardware carrier; when the second hardware carrier detects the near field touch event and receives the first temporary token, a second temporary token and a pairing response voucher are generated; multi-dimensional verification is carried out according to the first temporary token, first touch event data, the second temporary token, the pairing response voucher and second touch event data; when the multi-dimensional verification is passed, a friend relationship between a first intelligent agent and a second intelligent agent is established, a binding result is sent to the first hardware carrier, the second hardware carrier, a client and a corresponding virtual intelligent agent, and an interaction state is updated. Through bidirectional triggering, one-time token and multi-dimensional verification, the application reduces false pairing, improves pairing success rate and interaction security.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of artificial intelligence interaction technology, and in particular to a method and apparatus for establishing intelligent agent friends based on near-field touch. Background Technology

[0002] Current mainstream AI-powered friend creation methods generally rely on software for operation, mainly including manual information input, QR code scanning, and remote online pairing. When these traditional pairing methods are applied in complex scenarios such as large gatherings, exhibitions, and offline social events, they are prone to problems such as accidental friend additions and fake pairing requests. They also face security risks of unauthorized identity theft in non-face-to-face environments. Furthermore, pairing interactions relying solely on a single communication link and triggered by a single device cannot effectively verify that the devices of both parties actually experienced the same near-field contact. This makes it difficult for the system to accurately distinguish between genuine face-to-face touch pairing behaviors, and it is vulnerable to malicious attacks such as invalid connections, signal forwarding interception, and signal replay caused by accidental device proximity. Therefore, the overall security and authenticity of the pairing interaction cannot be effectively guaranteed. Summary of the Invention

[0003] The main objective of this invention is to provide a method and apparatus for establishing friend relationships using intelligent agents based on near-field touch, aiming to solve the technical problem of lack of security in friend establishment by existing intelligent agents.

[0004] To achieve the above objectives, the present invention provides a method for establishing intelligent agent friends based on near-field touch, comprising: When the first hardware carrier detects a near-field touch event, it generates a first temporary token based on the first touch event information and broadcasts the first temporary token to the second hardware carrier. The first hardware carrier reports the first temporary token and the first touch event data to the server; When the second hardware carrier synchronously detects a near-field touch event and receives the first temporary token, it collects the second touch event information and generates a second temporary token and a pairing response credential based on the second touch event information. The second hardware carrier reports the second temporary token, pairing response credential, and second touch event data to the server; The server performs multi-dimensional verification based on the first temporary token, the first touch event data, the second temporary token, the pairing response credential, and the second touch event data; When the multi-dimensional verification is successful, the server establishes a friendship relationship between the first intelligent agent and the second intelligent agent, and sends the binding result to the first hardware carrier, the second hardware carrier, the client and the corresponding virtual intelligent agent; Update the interaction state of the virtual agent based on the binding result.

[0005] Furthermore, to achieve the above objectives, the present invention provides a device for establishing intelligent agent friends based on near-field touch, comprising: The first hardware carrier is used to generate a first temporary token based on the first touch event information when a near-field touch event is detected, and to broadcast the first temporary token to the second hardware carrier, and to report the first temporary token and the first touch event data to the server. The second hardware carrier is used to collect second touch event information when a near-field touch event is detected synchronously and a first temporary token is received, and to generate a second temporary token and a pairing response credential based on the second touch event information, and to report the second temporary token, the pairing response credential and the second touch event data to the server. The server is used to perform multi-dimensional verification based on the first temporary token, the first touch event data, the second temporary token, the pairing response credential, and the second touch event data. When the multi-dimensional verification is successful, a friendship relationship is established between the first intelligent agent and the second intelligent agent, and the binding result is sent to the first hardware carrier, the second hardware carrier, the client, and the corresponding virtual intelligent agent. The server also updates the interaction state of the virtual intelligent agent based on the binding result.

[0006] Beneficial Effects: This invention relates to the field of artificial intelligence interaction technology, and discloses a method, apparatus, device, and medium for establishing intelligent agent friendships based on near-field touch, comprising: when a first hardware carrier detects a near-field touch event, generating a first temporary token based on the first touch event information, and broadcasting the first temporary token to a second hardware carrier; the first hardware carrier reporting the first temporary token and the first touch event data to a server; when the second hardware carrier synchronously detects a near-field touch event and receives the first temporary token, collecting second touch event information, and generating a second temporary token and a pairing response credential based on the second touch event information; the second hardware carrier reporting the second temporary token, the pairing response credential, and the second touch event data to the server; the server performing multi-dimensional verification based on the first temporary token, the first touch event data, the second temporary token, the pairing response credential, and the second touch event data; when the multi-dimensional verification passes, the server establishing a friendship relationship between the first intelligent agent and the second intelligent agent, and sending a binding result to the first hardware carrier, the second hardware carrier, the client, and the corresponding virtual intelligent agent; and updating the interaction state of the virtual intelligent agent based on the binding result. This invention reduces the risks of mismatch, replay attacks, and remote forgery by using bidirectional triggering, one-time tokens, time windows, distance constraints, and multi-factor joint decision-making, thereby improving the success rate of pairing and the security of interaction. Attached Figure Description

[0007] The present invention will be further described below with reference to the accompanying drawings and embodiments. In the accompanying drawings: Figure 1 This is a schematic diagram of an application environment for a method for establishing intelligent agent friends based on near-field touch, according to an embodiment of the present invention. Figure 2 This is a flowchart illustrating an embodiment of the intelligent agent friend creation method based on near-field touch according to the present invention. Figure 3 This is a schematic diagram of an embodiment of the intelligent agent friend creation method based on near-field touch according to the present invention; Figure 4 This is a schematic diagram of the functional modules of a preferred embodiment of the intelligent agent friend creation device based on near-field touch of the present invention. Detailed Implementation

[0008] It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the scope of the invention.

[0009] The method for establishing intelligent agent friends based on near-field touch provided in this invention can be applied to, for example... Figure 1 In this application environment, the client communicates with the server via a network. When the server detects a near-field touch event through the client's first hardware carrier, it generates a first temporary token based on the first touch event information and broadcasts the first temporary token to a second hardware carrier. The first hardware carrier reports the first temporary token and the first touch event data to the server. When the second hardware carrier synchronously detects a near-field touch event and receives the first temporary token, it collects the second touch event information and generates a second temporary token and a pairing response credential based on the second touch event information. The second hardware carrier reports the second temporary token, the pairing response credential, and the second touch event data to the server. The server performs multi-dimensional verification based on the first temporary token, the first touch event data, the second temporary token, the pairing response credential, and the second touch event data. When the multi-dimensional verification passes, the server establishes a friendship relationship between the first and second intelligent agents and sends the binding result to the first hardware carrier, the second hardware carrier, the client, and the corresponding virtual intelligent agent. The server updates the interaction state of the virtual intelligent agent based on the binding result. This invention reduces the risks of mismatches, replay attacks, and remote forgery by employing bidirectional triggering, one-time tokens, time windows, distance constraints, and multi-factor joint decision-making, thereby improving pairing success rates and interaction security. The client can be, but is not limited to, various personal computers, laptops, smartphones, tablets, and portable wearable devices. The server can be implemented using a standalone server or a server cluster consisting of multiple servers. The invention is described in detail below through specific embodiments.

[0010] Please see Figure 2 , Figure 2This is a flowchart illustrating an embodiment of the intelligent agent friend creation method based on near-field touch provided by the present invention. It should be noted that although the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than that shown here.

[0011] like Figure 2 As shown, the intelligent agent friend creation method based on near-field touch proposed in this invention includes the following steps: S100: When the first hardware carrier detects a near-field touch event, it generates a first temporary token based on the first touch event information and broadcasts the first temporary token to the second hardware carrier. S200, the first hardware carrier reports the first temporary token and the first touch event data to the server; S300: When the second hardware carrier synchronously detects a near-field touch event and receives the first temporary token, it collects the second touch event information and generates a second temporary token and a pairing response credential based on the second touch event information. S400, the second hardware carrier reports the second temporary token, pairing response credential, and second touch event data to the server; S500, the server performs multi-dimensional verification based on the first temporary token, the first touch event data, the second temporary token, the pairing response credential, and the second touch event data; S600. When the multi-dimensional verification is passed, the server establishes a friendship relationship between the first intelligent agent and the second intelligent agent, and sends the binding result to the first hardware carrier, the second hardware carrier, the client and the corresponding virtual intelligent agent. S700. Update the interaction state of the virtual agent according to the binding result.

[0012] In this embodiment, as Figure 3As shown, when the first hardware carrier detects a near-field touch event, it immediately collects the first touch event information and generates a first temporary token (Token1, abbreviated as T1). This token is then broadcast to the second hardware carrier via a near-field communication link. The detection of the near-field touch event can be achieved using technologies such as NFC (Near Field Communication), BLE (Bluetooth Low Energy), ultrasound, or UWB (Ultra-Wideband), and a candidate session is only triggered when the estimated distance between the two devices is less than a preset distance threshold. The first temporary token T1 includes at least a first event timestamp, a first random number, a first hardware anonymity identifier, and a first posture or motion feature. The posture or motion feature can cover data such as acceleration, angular velocity, posture angle, contact direction, shaking characteristics, or touch duration. Simultaneously, the first hardware carrier reports the first temporary token and complete first touch event data to the server for subsequent joint verification by the server.

[0013] When the second hardware carrier synchronously detects a near-field touch event and receives the first temporary token T1, it first performs an integrity check on T1 to confirm that its format is valid and has not been tampered with. Then, the second hardware carrier collects the second touch event information and generates a second temporary token (Token2, T2) and a pairing response credential accordingly. The second temporary token T2 contains at least a second event timestamp, a second random number, a second hardware anonymity identifier, and a digest associated with the first temporary token T1. This digest is used to establish a unique correspondence between T1 and T2 on the server side. The pairing response credential further proves that the second hardware carrier has indeed received and acknowledged the pairing request from the first hardware carrier. Afterward, the second hardware carrier reports the second temporary token, the pairing response credential, and the second touch event data to the server, thus completing the two-way data reporting process.

[0014] After receiving the data reported by both hardware carriers, the server performs multi-dimensional verification based on the first temporary token, the first touch event data, the second temporary token, the pairing response credential, and the second touch event data. Specifically, this verification includes at least four levels: consistency verification, timing verification, one-time verification, and near-field authenticity verification. Consistency verification determines whether the association digest between T1 and T2 matches, whether the event session identifiers of both parties correspond, and verifies the token integrity code, signature, or message authentication code to confirm that both tokens belong to the same candidate pairing session. Timing verification calculates the differences between the first touch event time, the second touch event time, the first token sending time, and the second token receiving time. Only when all differences fall within a preset time window are both considered to belong to the same pairing session, thus eliminating abnormal responses that are too early, too late, or across sessions. One-time verification ensures that both T1 and T2 are one-time tokens. The server invalidates the corresponding token after the verification passes or after the preset time window expires to prevent it from being copied and replayed. Near-field authenticity verification employs a joint decision based on a first determination result based on distance-related parameters and a second determination result based on posture or motion characteristics. A near-field contact is considered genuine only when both determination results meet threshold conditions. The distance-related parameters include at least one or more of the following: RSSI (Received Signal Strength Indicator), time difference of arrival, round-trip time delay, ultrasonic propagation time, and UWB ranging results. Posture-related parameters are determined by comparing the similarity of acceleration, angular velocity, posture angle, contact direction, swaying characteristics, or contact duration between the two entities to determine if they originated from the same physical contact.

[0015] In addition, the server executes multi-factor authentication rules, comprehensively considering two or more of the following factors: whether both parties detected near-field touch events, whether the token association matches, whether the time windows match, whether the distance threshold is met, whether the posture features are compatible, whether the user's authorization status is valid, and whether the device's historical risk score is below the threshold. The server also performs anti-replay verification, anti-forgery verification, and session uniqueness verification on T1 and T2. The anti-replay verification includes determining whether the token has been consumed or expired, and the anti-forgery verification includes verifying the token integrity code, signature, or message authentication code. When more than three devices are detected touching concurrently within the same preset time window, or when multiple candidate pairing sessions exist, the server will further perform collision detection, session isolation, and candidate pairing filtering. Based on the event time reported by each device, temporary token association, device anonymity identifier, distance-related parameters, posture or action features, and candidate session number, the server identifies the set of concurrent sessions and performs pairwise association analysis on the candidate device pairs. Finally, the server retains the device pair with the highest overall matching degree and consistent bidirectional confirmation as the valid session. If the overall matching degree of multiple candidate device pairs is the same or the difference is lower than the preset threshold, making it impossible to uniquely determine the target pairing relationship, the server will trigger an automatic retry mechanism, send a retry flag and random backoff parameters to the relevant devices, so that each device can regenerate a temporary token and initiate a new candidate session after the backoff time expires.

[0016] When all the above multi-dimensional verifications pass, the server establishes a friendship between the first and second intelligent agents and sends the binding result to the first hardware carrier, the second hardware carrier, the client, and the corresponding virtual intelligent agent. This binding result includes at least the friend establishment status, the peer intelligent agent's identifier, the session number, and the authorization parameters or key negotiation parameters required for subsequent interactions. After receiving the binding result, each recipient's client will display the intelligent agent's status, friend relationship, binding result, and pairing history. The virtual intelligent agent updates its interaction status based on the binding result, such as triggering a handshake animation, emotional expression, or immersive interactive feedback, thereby mapping near-field touch behavior in the physical world to the establishment of social relationships and emotional interaction in virtual space, completing the entire intelligent agent friend establishment process.

[0017] In one embodiment, S100 includes: S101. When the first hardware carrier detects a near-field touch event, it collects the first event timestamp, the first random number, the first hardware anonymous identifier, and the first posture or action feature as the first touch event information. S102, Preprocess the first event timestamp, the first random number, the first hardware anonymity identifier, and the first posture or action feature; S103. Generate a one-time first temporary token based on the preprocessed first event timestamp, first random number, first hardware anonymous identifier and first posture or action feature; S104. Broadcast the first temporary token to the second hardware carrier via a near-field communication link.

[0018] In this embodiment, when the first hardware carrier detects a near-field touch event, its built-in near-field detection module immediately initiates a data acquisition process. The detection process can be implemented using at least one of NFC (Near Field Communication), BLE (Bluetooth Low Energy), ultrasound, or UWB (Ultra-Wideband). The system only triggers a candidate session when the estimated distance between the two devices is less than a preset distance threshold, thereby avoiding accidental triggering at close range or long distance. After the touch event is confirmed, the first hardware carrier simultaneously collects four types of key information as the first touch event information: a first event timestamp, used to accurately record the moment the touch occurred; a first random number, serving as the entropy source of the token to ensure unpredictability; a first hardware anonymity identifier, used to achieve device-level differentiation while protecting the user's real identity; and a first posture or motion feature, which may include one or more of acceleration, angular velocity, posture angle, contact direction, shaking characteristics, or touch duration, to characterize the device's motion state at the moment of physical contact.

[0019] After data collection, the first hardware carrier preprocesses the raw data to improve the standardization and security of subsequent token generation. Preprocessing steps typically include: standardizing the format and time zone of the first event timestamp to ensure consistency of the time base; performing entropy value verification and length alignment on the first random number to avoid security risks caused by weak randomness; desensitizing or rotating the first hardware anonymity identifier to reduce the risk of long-term tracking; and filtering, normalizing, and extracting features from the first posture or motion characteristics to eliminate interference data caused by sensor jitter or environmental vibration. Furthermore, the preprocessing stage may also involve serializing the above fields according to a preset protocol and attaching a version number or protocol identifier to ensure correct parsing by the receiver.

[0020] Based on the preprocessed data, the first hardware carrier generates a one-time temporary token (Token1, T1). This token is designed for one-time use and its content includes at least a preprocessed first event timestamp, a first random number, a first hardware anonymity identifier, and a first gesture or action feature. It may also include a candidate session number, protocol version, and integrity verification information. During generation, the system calculates a related digest based on the first random number, the first event timestamp, and the first hardware anonymity identifier. This digest will serve as the reference for the second hardware carrier when generating a response token. To ensure the token is unforgeable, an integrity code, digital signature, or Message Authentication Code (MAC) is also appended during generation, ensuring that any alteration to the token content can be identified by the recipient or server. This token has a time limit, valid only within a preset time window, and automatically expires once consumed or timed out, fundamentally suppressing replay attacks.

[0021] Once generated, the first hardware carrier broadcasts the first temporary token to the second hardware carrier via a near-field communication link. This broadcasting process also relies on short-range communication channels such as NFC, BLE, ultrasound, or UWB to ensure that the signal coverage is strictly limited to the near-field area. Simultaneously with the token broadcast, the first hardware carrier also reports the first temporary token and complete first touch event data to the server, enabling the server to establish a session context in advance and await response data from the second hardware carrier. Thus, the first hardware carrier completes the entire process of touch detection, data acquisition, preprocessing, token generation, and broadcasting, laying the data foundation for subsequent two-way confirmation and multi-dimensional joint verification by the server.

[0022] In one embodiment, S300 includes: S301. When the second hardware carrier synchronously detects a near-field touch event and receives the first temporary token, it performs integrity, legality and validity checks on the first temporary token. If all the above checks pass, a pairing response credential is generated. S302. Collect the second event timestamp, the second random number, the second hardware anonymous identifier, and the second posture or action feature as the second touch event information; S303, Preprocess the second event timestamp, the second random number, the second hardware anonymity identifier, and the second posture or action feature; S304. Associate the preprocessed second touch event information with the first temporary token to generate association summary information; S305. Generate a one-time second temporary token based on the preprocessed second event timestamp, second random number, second hardware anonymity identifier, and associated digest information.

[0023] In this embodiment, when the second hardware carrier synchronously detects a near-field touch event and receives the first temporary token, its built-in near-field detection module and communication module work together to confirm that the two devices are in near-field contact. This detection process can be implemented using at least one of NFC, BLE, ultrasound, or UWB technologies, and a candidate session is only triggered when the estimated distance between the two devices is less than a preset distance threshold, thereby ensuring the authenticity of the touch event and spatial limitations. After receiving the first temporary token, the second hardware carrier immediately performs integrity, legality, and validity checks on it: the integrity check includes verifying whether the token format conforms to the preset protocol specification, whether the data length is correct, and whether there is any transmission truncation; the validity check covers timeliness checks and anti-tampering verification, that is, determining whether the token is within a preset time window, whether it has been consumed or expired, and verifying the integrity code, digital signature, or message authentication code (MAC) contained in the token to confirm that the token has not been maliciously tampered with or forged during transmission. If any of the above checks fails, the second hardware carrier will refuse to respond to the pairing request and discard the token; only when all checks pass will the subsequent pairing process begin.

[0024] After confirming the validity of the first temporary token, the second hardware carrier generates a pairing response credential. This credential serves to prove to both the first and server that the second hardware carrier has legitimately received and acknowledged the pairing request. The pairing response credential typically includes a confirmation identifier for receiving the first temporary token, a candidate session number, and the second hardware carrier's response status code. It may also include a response signature calculated using a local key to prevent interception and misuse. Simultaneously, the second hardware carrier collects second touch event information, specifically including a second event timestamp, a second random number, a second hardware anonymity identifier, and second posture or motion characteristics. The second posture or motion characteristics at least encompass one or more of acceleration, angular velocity, attitude angle, contact direction, shaking characteristics, or touch duration, used to accurately characterize the kinematic state of the second hardware carrier at the moment of physical contact, providing raw data for subsequent posture compatibility verification on the server side.

[0025] After data acquisition, the second hardware carrier preprocesses the second touch event information to ensure data quality and security. The preprocessing steps include: standardizing the format and aligning the second event timestamp to its time zone to ensure comparability with the time reference of the first hardware carrier; performing entropy verification and length alignment on the second random number to ensure the unpredictability of the token; desensitizing or rotating the second hardware anonymous identifier to prevent leakage of the user's real identity during transmission; and filtering, normalizing, and extracting features from the second posture or action characteristics to eliminate sensor noise and environmental vibration interference, extracting key feature vectors that characterize the entity's contact behavior. Furthermore, the preprocessing stage serializes each field according to a preset protocol and appends the protocol version number and integrity verification information to ensure correct server parsing and comparison.

[0026] Subsequently, the second hardware carrier associates the preprocessed second touch event information with the first temporary token to generate association digest information. This digest generation process is based on the first random number, the first event timestamp, and the first hardware anonymity identifier in the first temporary token, and uses a preset digest algorithm (such as hash operation or message authentication code calculation) to generate a unique reference value pointing to the first temporary token. This digest information is embedded in the second temporary token, enabling the server to accurately determine the unique correspondence between the second and first temporary tokens during subsequent verification, thereby confirming that both tokens belong to the same candidate pairing session and effectively preventing cross-session binding or malicious session injection attacks.

[0027] Based on the preprocessed second event timestamp, second random number, second hardware anonymity identifier, and the aforementioned associated digest information, the second hardware carrier generates a one-time second temporary token (Token2, abbreviated as T2). This token is designed for one-time use, and its content includes at least the preprocessed second event timestamp, second random number, second hardware anonymity identifier, and associated digest information. It can also be further appended with a candidate session number, protocol version, and integrity verification value. During generation, the system also attaches a digital signature or message authentication code to T2 to ensure the integrity and non-repudiation of the token content. Similar to the first temporary token, the second temporary token has strict time limits, valid only within a preset time window, and automatically expires once verification is completed or it is marked as consumed by the server, fundamentally suppressing token duplication and replay attacks. After generation, the second hardware carrier reports the second temporary token, pairing response credential, and complete second touch event data to the server. Simultaneously, it can return confirmation information to the first hardware carrier via a near-field communication link, thus completing the bidirectional triggering and data reporting process. This provides the server with a complete two-sided chain of evidence for performing consistency checks, timing checks, distance constraint checks, attitude compatibility checks, and multi-factor joint decision-making.

[0028] In one embodiment, S500 includes: S501. When the server performs consistency verification, it generates a corresponding digest based on the first random number, the first event timestamp and the first hardware anonymity identifier in the first temporary token, and determines whether the associated digest information in the second temporary token can uniquely point to the first temporary token based on the corresponding digest. S502. When the server performs timing verification, it calculates the difference between the time of the first touch event, the time of the second touch event, the time of the first token sending, and the time of the second token receiving, and only when all the differences fall within the preset time window is it determined that the two parties belong to the same pairing session. S503. When the server performs near-field authenticity verification, it uses a first determination result based on distance-related parameters and a second determination result based on posture or action features to make a joint decision. When both the first determination result and the second determination result meet the threshold condition, the near-field touch is determined to be established. S504. When the server performs a one-time verification, it verifies whether the first temporary token and the second temporary token are unconsumed and unexpired one-time tokens. When the first temporary token and the second temporary token are unconsumed and unexpired one-time tokens, the verification passes and the tokens are marked as expired. S505. When the server performs multi-factor confirmation, it uses two or more of the following factors for joint judgment: double-sided touch trigger, token association matching, time window matching, distance threshold satisfaction, posture feature compatibility, valid user authorization, and device historical risk score below the threshold. When the corresponding factor meets the conditions, the multi-factor confirmation is passed.

[0029] In this embodiment, when the server performs consistency verification, it first generates a corresponding digest value based on the first random number, the first event timestamp, and the first hardware anonymity identifier in the first temporary token using a preset digest algorithm. Then, the server extracts the associated digest information carried in the second temporary token and uses a comparison algorithm to determine whether the associated digest uniquely points to the first temporary token, thus confirming that both tokens belong to the same candidate pairing session, rather than being cross-referenced or maliciously injected from different sessions. During this process, the server also simultaneously verifies the integrity code, digital signature, or Message Authentication Code (MAC) contained in both tokens to ensure that the token content has not been tampered with, forged, or intercepted and replaced during transmission. Consistency verification is only successful if the associated digests match and both integrity verifications pass; otherwise, the server will reject the pairing request and record the abnormal session.

[0030] When the server performs timing verification, it extracts and calculates the differences between four key time points: the time of the first touch event recorded on the first hardware carrier, the time of the second touch event recorded on the second hardware carrier, the sending time of the first temporary token, and the receiving time of the second temporary token. The server requires that each of these time differences strictly fall within a preset time window to prove that the touch behavior of both parties is synchronous and continuous in physical time, thereby effectively eliminating abnormal situations such as premature token pre-generation, excessively delayed reporting, or cross-session responses. The setting of this time window needs to comprehensively consider the transmission delay of the near-field communication link, the device's local clock deviation, and network jitter factors to ensure reasonable fault tolerance in real near-field touch scenarios, while accurately intercepting forged requests with timing abnormalities.

[0031] When the server performs near-field authenticity verification, it employs a dual-determination mechanism for joint decision-making. The first determination is based on distance-related parameters, which include at least one or more of RSSI, UWB ranging results, ultrasonic propagation time, time difference of arrival, or round-trip time delay. The actual physical distance between the two devices is estimated through multi-source ranging data fusion, and it is determined whether this distance is less than a preset distance threshold. The second determination is based on attitude or motion characteristics. The server compares data such as acceleration, angular velocity, attitude angle, contact direction, shaking characteristics, or contact duration collected by the hardware of both devices, calculating motion similarity to determine whether the two devices have engaged in the same physical contact or synchronized action. The server only considers the near-field contact to be genuine if and only if both the first and second determinations meet their respective threshold conditions. In complex environments, the server can also dynamically adjust the weights of the two determinations. For example, when the reliability of UWB ranging is high, the weight of distance constraint verification can be increased; or when environmental noise is high, the weight of attitude compatibility verification can be increased to improve the accuracy of determinations in complex scenarios.

[0032] When the server performs a one-time verification, it first queries the current status of the first and second temporary tokens through the token management module to verify whether they are unconsumed and still valid one-time tokens. This verification process includes checking whether the tokens have been consumed by previous sessions, whether they have automatically expired due to exceeding a preset time window, and whether they appear in the list of cancelled or marked as abnormal tokens. If both tokens are confirmed to be unconsumed and not expired, the one-time verification passes, and the server immediately marks the corresponding tokens as consumed or expired and writes this information to the token consumption record. This mechanism fundamentally prevents attackers from performing replay attacks by copying, intercepting, or recording historical tokens, ensuring that the temporary tokens used by each paired session have only one-time validity.

[0033] When the server performs multi-factor authentication, it comprehensively uses two or more factors, including two-sided touch triggering, token association matching, time window matching, distance threshold satisfaction, posture feature compatibility, valid user authorization status, and device historical risk score below a threshold, for joint judgment. Each factor can be configured as a weighted scoring mode or a rule-based judgment mode according to the actual application scenario. The server only considers the near-field friend establishment request to be valid when the comprehensive score reaches the preset threshold or all mandatory rules are satisfied.

[0034] In one embodiment, when the first hardware carrier detects a near-field touch event and when the second hardware carrier simultaneously detects a near-field touch event, the specific steps include: Obtain the near-field distance between the first hardware carrier and the second hardware carrier; The near-field distance is compared with a preset near-field distance threshold; When the near-field distance is less than a preset near-field distance threshold, it is determined that a touch event has occurred, and a candidate session is triggered.

[0035] In this embodiment, the system acquires the near-field distance between the first and second hardware carriers using various near-field communication technologies, including at least one or more of NFC, BLE, ultrasonic ranging, and UWB. Specifically, the distance-related parameters at least cover one or more of RSSI, time difference of arrival, round-trip time, ultrasonic propagation time, or UWB ranging results. The system can make a preliminary estimate based on a single ranging result, or it can comprehensively calculate the actual physical distance between the two devices using a multi-source data fusion algorithm to improve ranging accuracy and robustness in complex electromagnetic environments or scenarios with obstructions. After acquiring the near-field distance, the system compares it with a preset near-field distance threshold. This threshold is not fixed but dynamically set based on the characteristics of the communication technology used, the current ambient noise level, and security strategies. For example, NFC typically requires extremely close distances at the centimeter level or even shorter, while BLE or UWB may set a slightly higher upper limit threshold while ensuring security. However, both must ensure that only genuine near-field contact passes the initial screening.

[0036] During the comparison process, the system also incorporates attitude or action features synchronously collected by the attitude detection module, such as acceleration, angular velocity, attitude angle, contact direction, shaking characteristics, or touch duration, as auxiliary judgment criteria. This avoids misjudging a valid touch simply because the distance estimate is briefly below the threshold due to occasional signal proximity or environmental reflection. When it is confirmed that the near-field distance is consistently less than the preset near-field distance threshold, and the auxiliary attitude data supports the existence of physical contact behavior, the system determines that a touch event has occurred and triggers a candidate session. It should be clarified that this only indicates that both devices have entered a candidate state for pairing, not that a friend has been established directly. After triggering a candidate session, the first hardware carrier immediately collects the first event timestamp, the first random number, the first hardware anonymity identifier, and the first attitude or action feature to generate a first temporary token and broadcasts it. The second hardware carrier, after synchronously detecting the near-field touch event and receiving the first temporary token, performs an integrity check and generates a second temporary token.

[0037] The server will then perform multi-dimensional verification on the data reported by both parties, including consistency verification, timing verification, one-time verification, and near-field authenticity verification. Among these, distance constraint verification serves as the first determination result of near-field authenticity verification. Only when the distance estimate continuously meets the threshold condition and together with the second determination result such as posture compatibility meets the requirements will the near-field touch be finally recognized as real and a friend relationship between the agents be established. If the near-field distance is greater than or equal to the preset threshold, or if there is a significant contradiction between the posture data and the distance estimate, the system will not trigger a candidate session, thereby effectively filtering out risks of non-real contact such as long-distance false triggering, signal forwarding, relay impersonation, or occasional proximity.

[0038] In one embodiment, it also includes: If multiple hardware devices touch concurrently within the same time window, generating multiple candidate pairing sessions, the server executes a collision detection mechanism and a session isolation mechanism. Candidate pairings are clustered and sorted according to candidate session number, temporary token bidirectional reference relationship, event temporal proximity, near-field distance parameter, and pose similarity; An isolated session context is established for each candidate pairing. The hardware carrier pair with the highest overall matching degree is identified based on the ranking results, and the remaining hardware carriers are marked as interfering hardware carriers and excluded. If multiple candidate pairings have similar matching degrees within the same time window, the server sends a retry instruction and random backoff parameters to the relevant hardware carrier. After the backoff time expires, the hardware carrier regenerates a temporary token and initiates a new round of near-field touch pairing process.

[0039] In this embodiment, when three or more hardware devices simultaneously touch within the same preset time window, or when multiple candidate pairing sessions exist simultaneously due to signal crossover, the server will trigger a collision detection mechanism and a session isolation mechanism. At this time, the server first collects temporary tokens and touch event data reported by all hardware devices within the time window, identifying sets of concurrent sessions with potential cross-references or overlaps. Collision detection aims to resolve pairing ambiguities arising from simultaneous close-range touching of multiple devices in multi-person scenarios, exhibition scenarios, or dense social environments. The session isolation mechanism, by constructing an independent logical processing environment for each potential pairing relationship, prevents data confusion, token misuse, or incorrect binding between different sessions, ensuring that each candidate pairing can complete independent verification and evaluation within a closed and controllable context.

[0040] After identifying the concurrent session set, the server clusters and sorts the candidate pairings according to the candidate session number, the bidirectional reference relationship of the temporary tokens, the event temporal proximity, the near-field distance parameter, and the pose similarity. Specifically, the candidate session number is used to distinguish independent session processes initiated by different device groups; the bidirectional reference relationship of the temporary tokens is used to verify whether there is a unique correspondence between the first temporary token and the second temporary token, that is, whether the association digest carried in the second temporary token can uniquely point to the first temporary token, and whether the sending record of the first temporary token contains the expected response identifier for the second hardware carrier; the event temporal proximity evaluates the time synchronization of the actions of both parties by calculating the difference between the time of the first touch event, the time of the second touch event, the time of the first token sending, and the time of the second token receiving; the smaller the time difference, the higher the matching priority; the near-field distance parameter includes at least RSSI (Received Signal Strength Index). The server estimates the physical distance between candidate device pairs by fusing multi-source ranging data, using one or more of the following: received signal strength indicator, UWB (Ultra-Wideband) ranging results, ultrasonic propagation time, or round-trip time. The smaller and more stable the estimated distance, the higher the ranking. Attitude similarity is calculated based on acceleration, angular velocity, attitude angle, contact direction, shaking characteristics, or contact duration acquired by both hardware components to determine the consistency of their actions. Higher similarity indicates a greater likelihood that the two entities engaged in the same physical contact. The server then integrates these multi-dimensional indicators and clusters the candidate device pairs using a weighted scoring or rule-based ranking algorithm. Pairs with highly correlated characteristics are grouped into the same candidate cluster and ranked from highest to lowest overall matching degree.

[0041] For each candidate pairing, the server establishes isolated session contexts. These contexts include the pair's independent token status, verification progress, timing records, distance estimates, pose feature vectors, and risk scoring strategies, ensuring that data between candidate pairs does not interfere with each other. Subsequently, the server performs pairwise association analysis on the candidate device pairs based on the ranking results. This analysis focuses on whether bidirectional touches are simultaneous, whether token references are uniquely matched, whether the time difference is the smallest among all candidates, whether the distance estimate meets a threshold and is significantly better than other candidates, and whether the pose similarity meets preset conditions. A comprehensive judgment is made by combining multiple factors, including the validity of user authorization status and the device's historical risk score being below a threshold. Only hardware carrier pairs with consistent bidirectional confirmation and the highest overall matching degree are retained as valid sessions, while other candidate relationships that fail the uniqueness check are explicitly marked as interfering hardware carriers or conflicting sessions and excluded. Excluded devices do not receive binding results, and their reported temporary tokens are invalidated, thus preventing mis-pairing or cross-binding.

[0042] If multiple candidate pairings have the same overall matching degree or a difference below a preset threshold within the same time window, causing the server to be unable to uniquely determine the target pairing relationship, the server will trigger an automatic retry mechanism to avoid security risks or social awkwardness that may arise from forcibly binding in an ambiguous state. At this time, the server sends a retry instruction and random backoff parameters to all relevant hardware carriers. The retry instruction explicitly informs the devices that the current session failed to complete the binding due to a collision conflict and needs to re-initiate the pairing process. The random backoff parameters assign a differentiated random waiting time window to each device, ensuring that devices do not simultaneously rebroadcast tokens after the backoff period ends, thereby reducing the probability of renewed conflicts. The backoff parameters are typically designed by combining device identifier hashes, current timestamps, and random entropy sources to ensure fairness and unpredictability.

[0043] Upon receiving a retry instruction, the relevant hardware devices enter a waiting state until their assigned random backoff time expires. During this period, the original session context and any generated temporary tokens are marked as invalid by the server and their caches are cleared to prevent misuse of historical data. After the backoff time expires, each hardware device re-executes the near-field touch detection process, re-collecting event timestamps, random numbers, hardware anonymity identifiers, and gesture or motion features, and generating a new one-time temporary token based on the latest data. Subsequently, the devices rebroadcast the token and report it to the server via near-field communication links such as NFC (Near Field Communication), BLE (Bluetooth Low Energy), ultrasound, or UWB (Ultra-Wideband), initiating a new round of near-field touch pairing. Because the backoff time of each device varies randomly, and the random number and associated digest of the new token are regenerated, the probability of another conflict is significantly reduced, thereby effectively improving the pairing success rate and system robustness in complex multi-user scenarios.

[0044] In one embodiment, the interaction state of the virtual agent is updated based on the binding result, followed by: Once the first hardware carrier and the second hardware carrier have established a friendship relationship, the interaction data of the hardware carriers are collected in real time. The interactive action data is synchronously uploaded to the server and the corresponding virtual intelligent agent system; The virtual intelligent agent system matches a preset interactive effect template based on the received interactive action data; The virtual agent triggers interactive actions according to the matched interactive effect template.

[0045] In this embodiment, after updating the interaction state of the virtual intelligent agent according to the binding result, the system enters the continuous interaction phase. Once the first and second hardware carriers have established a friend relationship, the posture detection modules built into both devices will collect the interaction action data of the hardware carriers in real time. This collection process relies on inertial sensors such as accelerometers, gyroscopes, and magnetometers, as well as optional pressure sensors or haptic feedback elements, enabling precise capture of various physical interaction behaviors initiated by the user through the hardware carriers. The interaction action data includes at least one or more of the following corresponding to shaking, moving, colliding, rotating, tilting, tapping, long pressing, or other custom interaction actions: acceleration, angular velocity, attitude angle, contact direction, shaking characteristics, or touch duration. The sampling frequency can be dynamically adjusted according to the action type. For high-frequency, fast actions (such as shaking or colliding), a high sampling rate is used to ensure that action details are not lost; for low-frequency, continuous actions (such as tilting or moving), the sampling rate is appropriately reduced to balance power consumption and data accuracy.

[0046] The collected interactive action data, after local preprocessing, is synchronously uploaded to the server and the corresponding virtual agent system via a secure communication link. Preprocessing steps include filtering to eliminate inherent sensor noise, data compression to reduce transmission bandwidth consumption, and encryption based on a local key to protect user privacy. In addition to the raw action data, the uploaded content may include device identifiers, timestamps, preliminary action type classification results, and a Message Authentication Code (MAC) for integrity verification, ensuring the server can accurately identify the data source and verify transmission integrity. Upon receiving the interactive action data, the server stores it in a session cache for subsequent auditing and behavior analysis, and forwards it to the corresponding virtual agent system in real time, achieving low-latency mapping from physical world actions to virtual space feedback.

[0047] Upon receiving interactive action data, the virtual agent system initiates an interactive effect template matching process. The system has a built-in library of preset interactive effect templates, categorized and indexed according to action type, action intensity, action duration, relative posture of both devices, and the current intimacy level of the friend relationship. The matching process first extracts features and identifies the actions in the uploaded interactive action data, determining if it belongs to a shaking, collision, synchronized movement, opposing rotation, or other predefined action categories. Then, considering the current state of both virtual agents (e.g., online status, emotional state, scene context), it retrieves the most suitable interactive effect template from the template library. Template content includes animation sequences, sound effects, particle effects, emotional expression parameters, and immersive interactive feedback logic. For example, a slight shaking can be matched as a virtual handshake or nod, a violent collision as a high-five or competitive action, and synchronized rotation as a dance or coordinated skill release. The matching algorithm supports both precise and fuzzy matching modes. For clearly identified high-confidence actions, precise matching directly calls the corresponding template. For actions with ambiguous boundaries or complex actions, a weighted score is used to select the optimal template or trigger template fusion to generate a mixed effect.

[0048] The virtual agent triggers interactive actions according to the matched interaction effect template, transforming real-world contact behaviors into an immersive interactive experience in virtual space. The triggering process is executed collaboratively by the virtual agent system's rendering engine and physics simulation engine: the rendering engine drives the virtual avatar to perform corresponding skeletal animations, facial expression changes, and scene effects; the physics simulation engine handles actions such as cloth movement, collision bounces, and fluid interactions, enhancing the realism of the feedback. The triggering results of the interactive actions are simultaneously pushed to both clients, who then present the interactive effects through multiple channels such as screen display, vibration feedback, ambient lighting effects, or audio output, allowing users to intuitively perceive the emotional connection and social feedback between the virtual agents. Furthermore, the virtual agent system records the action type, template matching results, and user response data for subsequent optimization of the template library, tuning of the matching algorithm, and construction of personalized interaction habit models, thereby continuously improving the naturalness of the interaction and the depth of emotional resonance over long-term use. The entire process achieves a closed-loop end-to-end from physical hardware action acquisition to virtual agent feedback output, seamlessly extending real-world social behaviors into the interactive ecosystem of virtual agents.

[0049] In one embodiment, S502 includes: S5021. Calculate the touch event difference between the time of the first touch event and the time of the second touch event; S5022, Calculate the first event difference between the first touch event time and the first token sending time; S5023. Calculate the token time difference between the first token sending time and the second token receiving time; S5024. Determine whether the touch event difference, the first event difference, and the token time difference all fall within a preset time window; S5025. When all the above differences fall within a preset time window, it is determined that the two parties belong to the same pairing session.

[0050] In this embodiment, during the implementation of timing verification, the server verifies whether the hardware carriers of both parties are within a reasonable time range of the same pairing session by comparing multi-dimensional timestamps, thereby eliminating false pairing requests caused by network latency, replay attacks, or cross-session interference.

[0051] Specifically, the server first extracts the first touch event timestamp and the first token sending timestamp from the first temporary token T1 reported by the first hardware carrier, and extracts the second touch event timestamp and the second token receiving timestamp from the second temporary token T2 reported by the second hardware carrier. Subsequently, the server sequentially calculates the touch event difference between the first touch event time and the second touch event time to determine whether the physical contact behavior of both parties occurs synchronously in time. It calculates the first event difference between the first touch event time and the first token sending time to assess whether the local processing delay of the first hardware carrier from sensing the touch to generating and sending the token is within a reasonable range, preventing time logic contradictions caused by device abnormalities or human injection. It calculates the token time difference between the first token sending time and the second token receiving time to measure whether the transmission time of the near-field communication link conforms to the expected propagation characteristics of near-field communication technologies such as NFC, BLE, ultrasound, or UWB.

[0052] Based on this, the server compares the three differences mentioned above with a preset time window. This preset time window is typically set based on the physical propagation speed of near-field communication, the device's local processing capabilities, and user interaction habits in typical application scenarios. Only when the touch event difference, the first event difference, and the token time difference all fall within this preset time window does the server determine that the two hardware carriers belong to the same pairing session in terms of timing logic. On the one hand, by requiring that each time difference be within a reasonable range, pre-generated tokens prepared too early, cross-session responses arriving too late, and expired tokens that have been maliciously intercepted and replayed are effectively excluded. On the other hand, in multi-person scenarios or exhibition scenarios, when multiple devices touch concurrently within the same preset time window, the server can further combine the timing verification results with the collision conflict detection mechanism to cluster and sort multiple candidate pairing relationships based on the event time proximity, retaining only the device pairs with the closest timing logic and consistent two-way confirmation as valid sessions, thereby significantly reducing the probability of mispairing and improving the system's anti-attack capability.

[0053] In one embodiment, S503 includes: S5031, the distance-related parameters include at least one or more of the following: Received Signal Strength Indication (RSSI), Time Difference of Arrival (TDOA), Round Trip Delay (RTD), Ultrasonic Propagation Time (UWB), and UWB ranging results; S5032. Calculate the actual physical distance between the first hardware carrier and the second hardware carrier based on the above distance-related parameters; S5033. The actual physical distance is compared with a preset distance threshold. When the actual physical distance is less than the preset distance threshold, near-field contact is determined to be established, and a first determination result is generated. S5034, the posture or motion characteristics include at least one or more of acceleration, angular velocity, posture angle, contact direction, shaking characteristics, or contact duration; S5035. Calculate the action similarity based on the above posture or action characteristics; S5036. The action similarity is used to determine whether the first hardware carrier and the second hardware carrier have the same physical contact or synchronous action, and a second determination result is generated. S5037. A joint decision is made based on the first and second determination results, and when both the first and second determination results meet the threshold conditions, the near-field contact is determined to be established.

[0054] In this embodiment, during the near-field authenticity verification process, the server employs a dual verification mechanism of distance constraints and attitude compatibility to comprehensively determine whether the two hardware carriers have actually made physical contact. The initial design intention of this mechanism is to solve the problem that a single verification dimension is easily bypassed or misjudged. Specifically, the first determination result is generated based on distance-related parameters. After receiving the event data reported by the first and second hardware carriers, the server extracts one or more parameters from the received signal strength indication (RSSI), time difference of arrival, round-trip time delay, ultrasonic propagation time, or UWB ranging results, and uses these parameters to estimate the actual physical distance between the two devices. Subsequently, the server compares the estimated distance value with a preset distance threshold. Only when the actual physical distance is less than the threshold is the server determined that the two parties meet the near-field contact conditions in space, and the first determination result is generated as passed.

[0055] Meanwhile, the second judgment result is generated based on posture or action features. The server extracts information such as acceleration, angular velocity, posture angle, contact direction, shaking features or contact duration from the data collected from the hardware carriers of both parties. By calculating the similarity of the posture or action features of both parties, it determines whether the two devices originated from the same physical contact behavior or synchronous action. When the similarity reaches the preset condition, the second judgment result is generated as pass.

[0056] Ultimately, when the server executes joint decision-making, it does not simply rely on a single-dimensional judgment result. Instead, it requires both the first and second judgment results to simultaneously meet their respective threshold conditions: the spatial distance must be sufficiently close and the action features must be highly compatible for a near-field touch to be considered valid. By combining distance constraint verification with posture compatibility verification, false pairing requests caused by accidental device proximity, signal forwarding, or remote forgery are effectively eliminated. Furthermore, in multi-person scenarios or complex environments, this joint decision-making can also work in conjunction with collision detection and session isolation mechanisms. When multiple candidate pairing sessions exist within the same time window, the server further filters candidates based on the ranking of distance estimates and the degree of posture similarity, retaining only device pairs with consistent bidirectional confirmation and the highest overall matching degree as valid sessions, thereby significantly improving the authenticity and security of pairing.

[0057] In one embodiment, a near-field touch-based agent friend creation device is provided, which corresponds one-to-one with the near-field touch-based agent friend creation method described in the above embodiments. (Refer to...) Figure 4 , Figure 4 This is a schematic diagram of the functional modules of a preferred embodiment of the intelligent agent friend-building device based on near-field touch of the present invention. The modules include a first hardware carrier detection 10, a second hardware carrier detection 20, and a server 30. Detailed descriptions of each functional module are as follows: The first hardware carrier 10 is used to generate a first temporary token based on the first touch event information when a near-field touch event is detected, and broadcast the first temporary token to the second hardware carrier, and to report the first temporary token and the first touch event data to the server. The second hardware carrier 20 is used to collect second touch event information when a near-field touch event is detected synchronously and a first temporary token is received, and to generate a second temporary token and a pairing response credential based on the second touch event information, and to report the second temporary token, the pairing response credential and the second touch event data to the server. Server 30 is used to perform multi-dimensional verification based on the first temporary token, the first touch event data, the second temporary token, the pairing response credential, and the second touch event data; when the multi-dimensional verification is successful, a friendship relationship is established between the first intelligent agent and the second intelligent agent, and the binding result is sent to the first hardware carrier, the second hardware carrier, the client, and the corresponding virtual intelligent agent, and the interaction state of the virtual intelligent agent is updated according to the binding result.

[0058] In one embodiment, the first hardware carrier 10 includes: When the first hardware carrier detects a near-field touch event, it collects the first event timestamp, the first random number, the first hardware anonymous identifier, and the first posture or action feature as the first touch event information. The first event timestamp, the first random number, the first hardware anonymity identifier, and the first posture or action feature are preprocessed. A one-time first temporary token is generated based on the preprocessed first event timestamp, first random number, first hardware anonymous identifier, and first posture or action feature; The first temporary token is broadcast to the second hardware carrier via a near-field communication link.

[0059] In one embodiment, the second hardware carrier 20 includes: When the second hardware carrier synchronously detects a near-field touch event and receives the first temporary token, it performs integrity, legality and validity checks on the first temporary token. If all the above checks pass, a pairing response credential is generated. Collect the second event timestamp, the second random number, the second hardware anonymous identifier, and the second posture or action feature as the second touch event information; Preprocess the second event timestamp, the second random number, the second hardware anonymity identifier, and the second posture or action feature; The preprocessed second touch event information is associated with the first temporary token to generate an association summary. A one-time second temporary token is generated based on the preprocessed second event timestamp, second random number, second hardware anonymity identifier, and associated digest information.

[0060] In one embodiment, server 30 includes: When the server performs consistency verification, it generates a corresponding digest based on the first random number, the first event timestamp, and the first hardware anonymity identifier in the first temporary token, and determines whether the associated digest information in the second temporary token can uniquely point to the first temporary token based on the corresponding digest. When the server performs timing verification, it calculates the difference between the time of the first touch event, the time of the second touch event, the time of the first token sending, and the time of the second token receiving, and only when all the differences fall within the preset time window is it determined that the two parties belong to the same pairing session. When the server performs near-field authenticity verification, it uses a first determination result based on distance-related parameters and a second determination result based on posture or action features to make a joint decision. When both the first determination result and the second determination result meet the threshold conditions, the near-field touch is considered to be established. When the server performs a one-time verification, it verifies whether the first temporary token and the second temporary token are unconsumed and unexpired one-time tokens. If the first temporary token and the second temporary token are unconsumed and unexpired one-time tokens, the verification passes and the tokens are marked as expired. When the server performs multi-factor verification, it uses two or more of the following factors for joint judgment: double-sided touch trigger, token association matching, time window matching, distance threshold satisfaction, posture feature compatibility, valid user authorization, and device historical risk score below the threshold. When the corresponding factor meets the conditions, the multi-factor verification is successful.

[0061] In one embodiment, server 30 specifically includes: Obtain the near-field distance between the first hardware carrier and the second hardware carrier; The near-field distance is compared with a preset near-field distance threshold; When the near-field distance is less than a preset near-field distance threshold, it is determined that a touch event has occurred, and a candidate session is triggered.

[0062] In one embodiment, server 30 further includes: If multiple hardware devices touch concurrently within the same time window, generating multiple candidate pairing sessions, the server executes a collision detection mechanism and a session isolation mechanism. Candidate pairings are clustered and sorted according to candidate session number, temporary token bidirectional reference relationship, event temporal proximity, near-field distance parameter, and pose similarity; An isolated session context is established for each candidate pairing. The hardware carrier pair with the highest overall matching degree is identified based on the ranking results, and the remaining hardware carriers are marked as interfering hardware carriers and excluded. If multiple candidate pairings have similar matching degrees within the same time window, the server sends a retry instruction and random backoff parameters to the relevant hardware carrier. After the backoff time expires, the hardware carrier regenerates a temporary token and initiates a new round of near-field touch pairing process.

[0063] In one embodiment, server 30 includes: Once the first hardware carrier and the second hardware carrier have established a friendship relationship, the interaction data of the hardware carriers are collected in real time. The interactive action data is synchronously uploaded to the server and the corresponding virtual intelligent agent system; The virtual intelligent agent system matches a preset interactive effect template based on the received interactive action data; The virtual agent triggers interactive actions according to the matched interactive effect template.

[0064] In one embodiment, server 30 includes: Calculate the touch event difference between the time of the first touch event and the time of the second touch event; Calculate the first event difference between the time of the first touch event and the time of the first token transmission; Calculate the token time difference between the first token sending time and the second token receiving time; Determine whether the touch event difference, the first event difference, and the token time difference all fall within a preset time window; When all the above differences fall within a preset time window, it is determined that the two parties belong to the same pairing session.

[0065] In one embodiment, server 30 includes: The distance-related parameters include at least one or more of the following: Received Signal Strength Indication (RSSI), Time Difference of Arrival (TDOA), Round-Trip Delay (RTD), Ultrasonic Propagation Time (UWB), and UWB ranging results. The actual physical distance between the first hardware carrier and the second hardware carrier is calculated based on the above distance-related parameters. The actual physical distance is compared with a preset distance threshold. If the actual physical distance is less than the preset distance threshold, a near-field contact is determined to have occurred, and a first determination result is generated. The posture or motion characteristics include at least one or more of the following: acceleration, angular velocity, posture angle, contact direction, swaying characteristics, or contact duration; Calculate the action similarity based on the above posture or action characteristics; The action similarity is used to determine whether the first hardware carrier and the second hardware carrier have the same physical contact or synchronous action, and a second determination result is generated. A joint decision is made based on the first and second determination results, and when both the first and second determination results meet the threshold conditions, the near-field contact is deemed to have occurred.

[0066] For specific limitations regarding the near-field touch-based agent friend creation device, please refer to the aforementioned limitations on the near-field touch-based agent friend creation method, which will not be repeated here. Each module in the aforementioned near-field touch-based agent friend creation device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the corresponding operations of each module.

[0067] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is used as an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.

[0068] It should be noted that any AI models, software tools, or components not belonging to this company appearing in the embodiments of this application are merely illustrative examples and do not represent actual use. All user personal information involved in the embodiments of this application has been authorized (with the knowledge and consent) by the relevant parties or has been fully authorized by all parties, and the executing entity may obtain it through various legal and compliant means. The collection, storage, use, processing, transmission, provision, and disclosure of the information, data, and signals involved all comply with relevant laws and regulations and do not violate public order and good morals.

[0069] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.

Claims

1. A method for establishing intelligent agent friends based on near-field touch, characterized in that, Includes the following steps: When the first hardware carrier detects a near-field touch event, it generates a first temporary token based on the first touch event information and broadcasts the first temporary token to the second hardware carrier. The first hardware carrier reports the first temporary token and the first touch event data to the server; When the second hardware carrier synchronously detects a near-field touch event and receives the first temporary token, it collects the second touch event information and generates a second temporary token and a pairing response credential based on the second touch event information. The second hardware carrier reports the second temporary token, pairing response credential, and second touch event data to the server; The server performs multi-dimensional verification based on the first temporary token, the first touch event data, the second temporary token, the pairing response credential, and the second touch event data; When the multi-dimensional verification is successful, the server establishes a friendship relationship between the first intelligent agent and the second intelligent agent, and sends the binding result to the first hardware carrier, the second hardware carrier, the client and the corresponding virtual intelligent agent; Update the interaction state of the virtual agent based on the binding result.

2. The method for establishing intelligent agent friends based on near-field touch as described in claim 1, characterized in that, When the first hardware carrier detects a near-field touch event, it generates a first temporary token based on the first touch event information and broadcasts the first temporary token to the second hardware carrier, including: When the first hardware carrier detects a near-field touch event, it collects the first event timestamp, the first random number, the first hardware anonymous identifier, and the first posture or action feature as the first touch event information. The first event timestamp, the first random number, the first hardware anonymity identifier, and the first posture or action feature are preprocessed. A one-time first temporary token is generated based on the preprocessed first event timestamp, first random number, first hardware anonymous identifier, and first posture or action feature; The first temporary token is broadcast to the second hardware carrier via a near-field communication link.

3. The method for establishing intelligent agent friends based on near-field touch as described in claim 1, characterized in that, When the second hardware carrier synchronously detects a near-field touch event and receives the first temporary token, it collects the second touch event information and generates a second temporary token and a pairing response credential based on the second touch event information, including: When the second hardware carrier synchronously detects a near-field touch event and receives the first temporary token, it performs integrity, legality and validity checks on the first temporary token. If all the above checks pass, a pairing response credential is generated. Collect the second event timestamp, the second random number, the second hardware anonymous identifier, and the second posture or action feature as the second touch event information; Preprocess the second event timestamp, the second random number, the second hardware anonymity identifier, and the second posture or action feature; The preprocessed second touch event information is associated with the first temporary token to generate an association summary. A one-time second temporary token is generated based on the preprocessed second event timestamp, second random number, second hardware anonymity identifier, and associated digest information.

4. The method for establishing intelligent agent friends based on near-field touch as described in claim 1, characterized in that, The server performs multi-dimensional verification based on the first temporary token, the first touch event data, the second temporary token, the pairing response credential, and the second touch event data, including: When the server performs consistency verification, it generates a corresponding digest based on the first random number, the first event timestamp, and the first hardware anonymity identifier in the first temporary token, and determines whether the associated digest information in the second temporary token can uniquely point to the first temporary token based on the corresponding digest. When the server performs timing verification, it calculates the difference between the time of the first touch event, the time of the second touch event, the time of the first token sending, and the time of the second token receiving, and only when all the differences fall within the preset time window is it determined that the two parties belong to the same pairing session. When the server performs near-field authenticity verification, it uses a first determination result based on distance-related parameters and a second determination result based on posture or action features to make a joint decision. When both the first determination result and the second determination result meet the threshold conditions, the near-field touch is considered to be established. When the server performs a one-time verification, it verifies whether the first temporary token and the second temporary token are unconsumed and unexpired one-time tokens. If the first temporary token and the second temporary token are unconsumed and unexpired one-time tokens, the verification passes and the tokens are marked as expired. When the server performs multi-factor verification, it uses two or more of the following factors for joint judgment: double-sided touch trigger, token association matching, time window matching, distance threshold satisfaction, posture feature compatibility, valid user authorization, and device historical risk score below the threshold. When the corresponding factor meets the conditions, the multi-factor verification is successful.

5. The method for establishing intelligent agent friends based on near-field touch as described in claim 1, 2, or 3, characterized in that, When the first hardware carrier detects a near-field touch event and when the second hardware carrier simultaneously detects a near-field touch event, specifically including: Obtain the near-field distance between the first hardware carrier and the second hardware carrier; The near-field distance is compared with a preset near-field distance threshold; When the near-field distance is less than a preset near-field distance threshold, it is determined that a touch event has occurred, and a candidate session is triggered.

6. The method for establishing intelligent agent friends based on near-field touch as described in claim 1, characterized in that, Also includes: If multiple hardware devices touch concurrently within the same time window, generating multiple candidate pairing sessions, the server executes a collision detection mechanism and a session isolation mechanism. Candidate pairings are clustered and sorted according to candidate session number, temporary token bidirectional reference relationship, event temporal proximity, near-field distance parameter, and pose similarity; An isolated session context is established for each candidate pairing. The hardware carrier pair with the highest overall matching degree is identified based on the ranking results, and the remaining hardware carriers are marked as interfering hardware carriers and excluded. If multiple candidate pairings have similar matching degrees within the same time window, the server sends a retry instruction and random backoff parameters to the relevant hardware carrier. After the backoff time expires, the hardware carrier regenerates a temporary token and initiates a new round of near-field touch pairing process.

7. The method for establishing intelligent agent friends based on near-field touch as described in claim 1, characterized in that, Update the interaction state of the virtual agent based on the binding result, followed by: Once the first hardware carrier and the second hardware carrier have established a friendship relationship, the interaction data of the hardware carriers are collected in real time. The interactive action data is synchronously uploaded to the server and the corresponding virtual intelligent agent system; The virtual intelligent agent system matches a preset interactive effect template based on the received interactive action data; The virtual agent triggers interactive actions according to the matched interactive effect template.

8. The method for establishing intelligent agent friends based on near-field touch as described in claim 4, characterized in that, When the server performs timing verification, it calculates the differences between the time of the first touch event, the time of the second touch event, the time of the first token sending, and the time of the second token receiving. Only when all differences fall within a preset time window is the server considered to belong to the same pairing session, including: Calculate the touch event difference between the time of the first touch event and the time of the second touch event; Calculate the first event difference between the time of the first touch event and the time of the first token transmission; Calculate the token time difference between the first token sending time and the second token receiving time; Determine whether the touch event difference, the first event difference, and the token time difference all fall within a preset time window; When all the above differences fall within a preset time window, it is determined that the two parties belong to the same pairing session.

9. The method for establishing intelligent agent friends based on near-field touch as described in claim 4, characterized in that, When the server performs near-field authenticity verification, it uses a first determination result based on distance-related parameters and a second determination result based on posture or action features for joint decision-making. Near-field contact is considered valid when both the first and second determination results meet threshold conditions, including: The distance-related parameters include at least one or more of the following: Received Signal Strength Indication (RSSI), Time Difference of Arrival (TDOA), Round-Trip Delay (RTD), Ultrasonic Propagation Time (UWB), and UWB ranging results. The actual physical distance between the first hardware carrier and the second hardware carrier is calculated based on the above distance-related parameters. The actual physical distance is compared with a preset distance threshold. If the actual physical distance is less than the preset distance threshold, a near-field contact is determined to have occurred, and a first determination result is generated. The posture or motion characteristics include at least one or more of the following: acceleration, angular velocity, posture angle, contact direction, swaying characteristics, or contact duration; Calculate the action similarity based on the above posture or action characteristics; The action similarity is used to determine whether the first hardware carrier and the second hardware carrier have the same physical contact or synchronous action, and a second determination result is generated. A joint decision is made based on the first and second determination results, and when both the first and second determination results meet the threshold conditions, the near-field contact is deemed to have occurred.

10. A device for creating intelligent agent friends based on near-field touch, characterized in that, The intelligent agent friend-building device based on near-field touch includes: The first hardware carrier is used to generate a first temporary token based on the first touch event information when a near-field touch event is detected, and to broadcast the first temporary token to the second hardware carrier, and to report the first temporary token and the first touch event data to the server. The second hardware carrier is used to collect second touch event information when a near-field touch event is detected synchronously and a first temporary token is received, and to generate a second temporary token and a pairing response credential based on the second touch event information, and to report the second temporary token, the pairing response credential and the second touch event data to the server. The server is used to perform multi-dimensional verification based on the first temporary token, the first touch event data, the second temporary token, the pairing response credential, and the second touch event data. When the multi-dimensional verification is successful, a friendship relationship is established between the first intelligent agent and the second intelligent agent, and the binding result is sent to the first hardware carrier, the second hardware carrier, the client, and the corresponding virtual intelligent agent. The server also updates the interaction state of the virtual intelligent agent based on the binding result.