A token acquisition method and device based on a double-token index, equipment and medium
By employing a dual-token indexing mechanism and the UDP protocol in the trusted communication system, the token index matching problem caused by network latency is solved, ensuring that the called terminal can successfully obtain the identity token of the calling terminal and improving the reliability of trusted communication.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- WEIWEI SHANGHAI NETWORK TECH CO LTD
- Filing Date
- 2026-02-06
- Publication Date
- 2026-06-26
AI Technical Summary
In a trusted communication system, transmission delays between trusted networks can cause the token index generated by the called terminal to be unable to match the identity token uploaded by the calling terminal, thus affecting the implementation of trusted communication functions.
A dual-token indexing mechanism is adopted. By generating the first and second token indices at different times, and using the UDP protocol and a preset retransmission mechanism, the identity token is queried in parallel with the token message transmission server to ensure a successful match.
It effectively eliminates the negative impact of transmission delays between trusted networks, ensuring that the called terminal can successfully query the identity token of the calling terminal, thus improving the reliability of trusted communication.
Smart Images

Figure CN122293331A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of trusted communication, and in particular to a token acquisition method, apparatus, device and medium based on dual-token index. Background Technology
[0002] Trusted communication technology, as a core technology for ensuring the authenticity of communication identities and data security, is essentially based on cryptographic engineering principles. Through the collaborative verification of digital certificates and identity tokens, it achieves trusted authentication of the calling terminal's identity throughout the entire call process. In practical applications, the called terminal needs to accurately obtain and visually display the true identity information of the calling terminal. This requirement not only aims to improve the user's caller ID experience but, more importantly, prevents security risks such as fake calls and fraudulent calls.
[0003] Currently, trusted communication systems generally rely on identity tokens to identify the calling terminal. Specifically, when a calling terminal initiates a call request to a called terminal, it generates a corresponding identity token and token index based on the current timestamp and uploads both to a token message transmission server. Upon receiving the call request, the called terminal generates a corresponding token index based on the current timestamp and then uses the token index to query the token message transmission server for the calling terminal's identity token.
[0004] However, in the actual operation of a trusted communication system, due to the transmission delay between trusted networks, the token index generated by the called terminal often cannot match the identity token uploaded by the calling terminal, which ultimately prevents the called terminal from presenting the true identity of the calling terminal and affects the implementation of trusted communication functions. Summary of the Invention
[0005] This application provides a token acquisition method, apparatus, device, and medium based on dual-token indexing, aiming to solve the technical problem that the token index generated by the called terminal is difficult to match the identity token uploaded by the calling terminal due to the influence of transmission delay between trusted networks. In a first aspect, embodiments of this application provide a token acquisition method based on a dual-token index, the method being applied to a called terminal, the method comprising: Receive call requests from the calling terminal; Based on the first moment, generate the first token index according to the preset token index generation rules; Based on the second moment, a second token index is generated according to the preset token index generation rule, wherein the second moment is before the first moment, and the time difference between the first moment and the second moment is determined by the preset token index generation rule; A token request message is sent to a token message delivery server. The token request message includes a first token index and a second token index. The token request message is used to obtain the identity token of the calling terminal, and the identity token matches the call request. Receive the identity token returned by the token message transmission server.
[0006] Optionally, sending a token request message to the token message delivery server includes: The token request message is sent to the token message delivery server based on the UDP protocol. The receipt of the identity token returned by the token message transmission server includes: Based on the UDP protocol, the identity token returned by the token message transmission server is received.
[0007] Optionally, the method further includes: If the called terminal does not receive the identity token returned by the token message transmission server, it sends the token request message to the token message transmission server according to the preset retransmission mechanism and based on the UDP protocol.
[0008] Secondly, embodiments of this application provide a token acquisition method based on a dual-token index, the method being applied to a calling terminal, the method comprising: Initiate a call request to the called terminal; Generate the calling terminal's identity token based on the call request; Generate a token index according to the preset token index generation rules; The identity token and the token index are sent to the token message transmission server so that the called terminal can obtain the identity token from the token message transmission server.
[0009] Optionally, sending the identity token and the token index to the token message transmission server so that the called terminal can obtain the identity token from the token message transmission server includes: Based on the UDP protocol, the identity token and the token index are sent to the token message transmission server so that the called terminal can obtain the identity token from the token message transmission server.
[0010] Optionally, the call request includes the number of the called terminal, and generating the identity token of the calling terminal based on the call request includes: Obtain the number of the calling terminal and its current timestamp; The calling terminal's identity token is generated based on the host terminal's number, the called terminal's number, and the current timestamp.
[0011] Thirdly, embodiments of this application provide a token acquisition method based on a dual-token index, the method being applied to a token message transmission server, the method comprising: Receive a token request message from the called terminal, the token request message including a first token index and a second token index, the token request message being used to obtain the identity token of the calling terminal; The identity token of the calling terminal is queried based on the target token index, wherein the target token index is either the first token index or the second token index; If the identity token of the calling terminal is found, the identity token of the calling terminal is returned to the called terminal.
[0012] Fourthly, embodiments of this application also provide a token acquisition device based on a dual-token index, which includes a unit for performing the above-described method.
[0013] Fifthly, embodiments of this application also provide a computer device, which includes a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the above-described method.
[0014] Sixthly, embodiments of this application also provide a computer-readable storage medium storing a computer program that, when executed by a processor, can implement the above-described method.
[0015] This application provides a token acquisition method, apparatus, device, and medium based on a dual-token index. The method is applied to a called terminal and includes: receiving a call request from a calling terminal; generating a first token index based on a first time point according to a preset token index generation rule; generating a second token index based on a second time point according to the preset token index generation rule, wherein the second time point is before the first time point, and the time difference between the first and second time points is determined by the preset token index generation rule; sending a token request message to a token message transmission server, the token request message including the first token index and the second token index, the token request message being used to obtain the calling terminal's identity token, the identity token matching the call request; and receiving the identity token returned by the token message transmission server. Therefore, the technical solution of this application receives a call request from a calling terminal. Next, a first token index is generated based on a first time point according to a preset token index generation rule. Then, a second token index is generated based on a second time point according to the preset token index generation rule. The second time point is before the first time point, and the time difference between the first and second time points is determined by the preset token index generation rule. Finally, a token request message is sent to a token message transmission server. The token request message includes a first token index and a second token index. The token request message is used to obtain the calling terminal's identity token, which matches the call request. Finally, the calling terminal receives the identity token returned by the token message transmission server. Therefore, the technical solution of this application employs a dual-token index mechanism: by generating two token indexes based on two consecutive associated moments, and using a parallel query method with dual indexes, the negative impact of transmission delays between trusted networks is effectively eliminated, ensuring that the called terminal can successfully query the identity token uploaded by the calling terminal using either the first or second token index. Attached Figure Description
[0016] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0017] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] One or more embodiments are illustrated by way of example with reference numerals in the accompanying drawings. These illustrations do not constitute a limitation on the embodiments. Elements with the same reference numerals in the drawings are denoted as similar elements. Unless otherwise stated, the figures in the drawings are not to be limited by scale.
[0019] Figure 1 One of the flowcharts for a token acquisition method based on a dual-token index provided in this application embodiment; Figure 2 A second schematic flowchart illustrating a token acquisition method based on a dual-token index, provided for an embodiment of this application; Figure 3 The third flowchart illustrates a token acquisition method based on a dual-token index, as provided in this application embodiment. Figure 4 This is one of the schematic block diagrams of a token acquisition device based on a dual-token index provided in the embodiments of this application; Figure 5 This is a second schematic block diagram of a token acquisition device based on a dual-token index provided in an embodiment of this application; Figure 6 This is the third schematic block diagram of a token acquisition device based on a dual-token index provided in the embodiments of this application; Figure 7 A computer device provided in an embodiment of this application. Detailed Implementation
[0020] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0021] The following disclosure provides numerous different embodiments or examples for implementing various structures of this application. To simplify the disclosure, specific examples of components and arrangements are described below. These are merely examples and are not intended to limit the scope of this application. Furthermore, reference numerals and / or letters may be repeated in different examples. Such repetition is for simplification and clarity and does not in itself indicate a relationship between the various embodiments and / or arrangements discussed.
[0022] It should be understood that, when used in this specification and the appended claims, the terms "comprising" and "including" indicate the presence of the described features, integrals, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.
[0023] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the scope of the application. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.
[0024] It should also be further understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0025] As used in this specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if [described condition or event] is detected" may be interpreted, depending on the context, as "once determined," "in response to determination," "once [described condition or event] is detected," or "in response to detection of [described condition or event]."
[0026] To address the technical problem in existing technologies where the token index generated by the called terminal is difficult to match the identity token uploaded by the calling terminal due to transmission delays between trusted networks, this application provides a token acquisition device based on dual token indexes. This device can eliminate the negative impact of transmission delays between trusted networks and ensure that the called terminal can successfully query the identity token uploaded by the calling terminal.
[0027] Figure 1 This is one of the flowcharts illustrating a token acquisition method based on a dual-token index, provided in an embodiment of this application. In one embodiment, the method is applied to a called terminal, and the method includes: S101-S105.
[0028] S101, Receive the call request from the calling terminal.
[0029] It should be noted that the calling terminal selects a type of identity information to initiate a call request to the called terminal. Next, the calling terminal generates a corresponding identity token based on the current timestamp and according to preset token generation rules. Then, the calling terminal generates a corresponding token index based on the current timestamp and according to preset token index generation rules. Finally, the calling terminal uploads the identity token and token index to the token message transmission server for the called terminal to download.
[0030] S102. Based on the first moment, generate the first token index according to the preset token index generation rules.
[0031] It should be noted that the first moment refers to the current timestamp of the called terminal. After receiving the call request from the calling terminal, the called terminal generates a first token index based on the current timestamp and according to a preset token index generation rule. The preset token index generation rule is as follows: tokenIndex = Hash(caller number || last three digits of called number || "@" || String(TimeCount)).
[0032] Where tokenIndex is the token index, Hash is the hash function (e.g., SM3), the calling number is the calling terminal's number, and the called number is the called terminal's number. "@" is the separator, and TimeCount is the time counter value, incrementing by 1 every minute. Specifically, the formula for calculating TimeCount is as follows: TimeCount = floor(current timestamp / 60). Here, floor is a function of the time count value.
[0033] It should be noted that the token index generation rules for the calling terminal and the called terminal are consistent. Based on the aforementioned preset token index generation rules, it is known that within the same minute, the token index generated by the calling terminal and the called terminal will be the same. When transmission delays occur in trusted network communication, this will cause the token index generated by the called terminal based on the current timestamp to be inconsistent with the token index generated by the calling terminal.
[0034] S103. Based on the second time point, generate a second token index according to the preset token index generation rules.
[0035] To address the issue of being unable to retrieve the calling terminal's token due to inconsistencies between the calling and called terminal's token indexes, this embodiment generates a second token index based on a second time point, according to a preset token index generation rule. The second time point is prior to the first time point, and the time difference between the first and second times points is determined by the preset token index generation rule. For example, if the preset token index generation rule determines that the tokens are generated within the same minute, generating the same token index based on the same calling and called terminal numbers allows the second time point to be set to one minute before the first time point, thereby eliminating the negative impact of trusted network transmission delays. In other words, the called terminal retrieves the calling terminal's identity token based on either the token index generated at the current time point or the token index generated based on the timestamp corresponding to the minute preceding the current time point. Put simply, the TimeCount calculated based on the timestamp corresponding to the first time point is one greater than the TimeCount calculated based on the timestamp corresponding to the second time point.
[0036] S104. Send a token request message to the token message delivery server.
[0037] The token request message includes a first token index and a second token index. The token request message is used to obtain the calling terminal's identity token. The identity token is matched against the call request.
[0038] It should be noted that after the token message transmission server receives the first token index and the second token index, it first uses the first token index to query the calling terminal's identity token. If the calling terminal's identity token is not found, it uses the second token index to query the calling terminal's identity token.
[0039] S105, Receive the identity token returned by the token message transmission server.
[0040] The token message delivery server returns the identity token of the calling terminal to the called terminal. Upon receiving the token, the called terminal extracts the calling terminal's identity information from the identity token and displays that information.
[0041] This application provides a token acquisition method based on a dual-token index. The method is applied to a called terminal and includes: receiving a call request from a calling terminal; generating a first token index based on a first time point according to a preset token index generation rule; generating a second token index based on a second time point according to the preset token index generation rule, wherein the second time point is before the first time point, and the time difference between the first and second time points is determined by the preset token index generation rule; sending a token request message to a token message transmission server, the token request message including the first token index and the second token index, the token request message being used to obtain the calling terminal's identity token, the identity token matching the call request; and receiving the identity token returned by the token message transmission server. Therefore, the technical solution of this application receives a call request from a calling terminal. Then, based on a first time point, a first token index is generated according to a preset token index generation rule. Furthermore, based on a second time point, a second token index is generated according to a preset token index generation rule. The second time point is before the first time point, and the time difference between the first and second time points is determined by the preset token index generation rule. Finally, a token request message is sent to a token message transmission server. The token request message includes a first token index and a second token index. The token request message is used to obtain the calling terminal's identity token, which matches the call request. Finally, the calling terminal receives the identity token returned by the token message transmission server. Therefore, the technical solution of this application employs a dual-token index mechanism: by generating two token indexes based on two consecutive associated moments, and using a parallel query method with dual indexes, the negative impact of transmission delays between trusted networks is effectively eliminated, ensuring that the called terminal can successfully query the identity token uploaded by the calling terminal using either the first or second token index.
[0042] In one embodiment, S104 specifically includes the following steps: S1041.
[0043] S1041. Send a token request message to the token message delivery server based on the UDP protocol.
[0044] It should be noted that the UDP protocol is used in this embodiment to send a token request message to the token message sending server.
[0045] The above S105 specifically includes the following steps: S1051.
[0046] S1051. Based on the UDP protocol, receive the identity token returned by the token message transmission server.
[0047] It should be noted that the UDP protocol is used in this embodiment to receive the identity token returned by the token message transmission server.
[0048] It should be noted that the UDP protocol is used to obtain the token data of the calling terminal in this embodiment, which effectively reduces the time overhead caused by the TCP three-way handshake. At the same time, a failure retransmission mechanism is added at the application layer to ensure that the token data of the calling terminal can be obtained even in a weak network environment.
[0049] In one embodiment, the method further includes: S106.
[0050] S106. If the called terminal does not receive the identity token returned by the token message transmission server, it shall send a token request message to the token message transmission server according to the preset retransmission mechanism and based on the UDP protocol.
[0051] The preset retransmission mechanism was set by the applicant based on practical experience. For example, the maximum number of retransmissions is 3. In this embodiment, if the called terminal does not receive the identity token returned by the token message transmission server, it sends a token request message to the token message transmission server according to the preset retransmission mechanism and the UDP protocol to ensure that the called terminal can receive the identity token returned by the token message transmission server.
[0052] Figure 2 This is a second flowchart illustrating a token acquisition method based on a dual-token index, provided as an embodiment of this application. In one embodiment, the method is applied to a calling terminal, and the method includes: S201-S204.
[0053] S201, Initiate a call request to the called terminal.
[0054] The calling terminal selects a trusted identity and initiates a call request to the called terminal.
[0055] S202. Generate the calling terminal's identity token based on the call request.
[0056] In one embodiment, the call request includes the number of the called terminal, and S202 specifically includes the following steps: S2021-S2022.
[0057] S2021. Obtain the calling terminal's number and current timestamp.
[0058] S2022. Generate the calling terminal's identity token based on the host terminal's number, the called terminal's number, and the current timestamp.
[0059] It should be noted that S2021-S2022 will be explained in detail below.
[0060] The call request includes the number of the called terminal. In this embodiment, the calling terminal's identity token is generated based on the calling terminal's number, the called terminal's number, and a timestamp.
[0061] S203. Generate a token index according to the preset token index generation rules.
[0062] It should be noted that the preset token index generation rules have been described in detail in S102 above. Therefore, this application will not repeat them here.
[0063] S204. Send an identity token and a token index to the token message delivery server so that the called terminal can obtain the identity token from the token message delivery server.
[0064] In one embodiment, S204 specifically includes the following steps: S2041.
[0065] S2041. Based on the UDP protocol, send an identity token and a token index to the token message delivery server so that the called terminal can obtain the identity token from the token message delivery server.
[0066] It should be noted that, in this embodiment of the application, an identity token and a token index are sent to the token message transmission server based on the UDP protocol, so that the called terminal can obtain the identity token from the token message transmission server.
[0067] Figure 3 This is the third flowchart illustrating a token acquisition method based on a dual-token index, provided as an embodiment of this application. In one embodiment, the method is applied to a token message transmission server, and the method includes: S301-S303.
[0068] S301, Receive the token request message from the called terminal.
[0069] The token request message includes a first token index and a second token index. The token request message is used to obtain the calling terminal's identity token.
[0070] It should be noted that the token request message has been described in detail in S104 above.
[0071] S302. Query the identity token of the calling terminal based on the target token index.
[0072] The target token index is either the first token index or the second token index.
[0073] S303. If the identity token of the calling terminal is found, the identity token of the calling terminal is returned to the called terminal.
[0074] When the token message delivery server finds the calling terminal's identity token, it returns the calling terminal's identity token to the called terminal.
[0075] See Figure 4 , Figure 4 This is one of the schematic block diagrams of a token acquisition device based on a dual-token index provided in this application embodiment. Corresponding to the above-described token acquisition method based on a dual-token index, this application also provides a token acquisition device based on a dual-token index. This token acquisition device based on a dual-token index includes a unit for executing the above-described token acquisition method based on a dual-token index, and can be configured in a terminal such as a desktop computer, tablet computer, or laptop computer. Specifically, the method is applied to the called terminal, and the token acquisition device based on a dual-token index includes: The first receiving unit 401 is used to receive the call request from the calling terminal; The first generation unit 402 is used to generate a first token index based on a first moment and according to a preset token index generation rule. The second generation unit 403 is used to generate a second token index based on a second time point according to the preset token index generation rule, wherein the second time point is before the first time point, and the time difference between the first time point and the second time point is determined by the preset token index generation rule. The first sending unit 404 is configured to send a token request message to a token message transmission server. The token request message includes a first token index and a second token index. The token request message is used to obtain the identity token of the calling terminal, and the identity token matches the call request. The second receiving unit 405 is used to receive the identity token returned by the token message transmission server.
[0076] In one embodiment, the first transmitting unit 404 is specifically used for: The token request message is sent to the token message delivery server based on the UDP protocol. In one embodiment, the second receiving unit 405 is specifically used for: Based on the UDP protocol, the identity token returned by the token message transmission server is received.
[0077] In one embodiment, the first sending unit 404 is further specifically configured to: if the called terminal does not receive the identity token returned by the token message transmission server, send the token request message to the token message transmission server according to a preset retransmission mechanism and based on the UDP protocol.
[0078] See Figure 5 , Figure 5This is a second schematic block diagram of a token acquisition device based on a dual-token index provided in this application embodiment. Corresponding to the above-described token acquisition method based on a dual-token index, this application also provides a token acquisition device based on a dual-token index. This token acquisition device based on a dual-token index includes a unit for executing the above-described token acquisition method based on a dual-token index, and can be configured in terminals such as desktop computers, tablet computers, and laptops. Specifically, the method is applied to a calling terminal, and the token acquisition device based on a dual-token index includes: Initiating unit 501 is used to initiate a call request to the called terminal; The third generation unit 502 is used to generate the identity token of the calling terminal based on the call request; The fourth generation unit 503 is used to generate a token index according to a preset token index generation rule; The second sending unit 504 is used to send the identity token and the token index to the token message transmission server, so that the called terminal can obtain the identity token from the token message transmission server.
[0079] In one embodiment, the second transmitting unit 504 is specifically used for: Based on the UDP protocol, the identity token and the token index are sent to the token message transmission server so that the called terminal can obtain the identity token from the token message transmission server.
[0080] In one embodiment, the third generation unit 502 is specifically used for: Obtain the number of the calling terminal and its current timestamp; The calling terminal's identity token is generated based on the host terminal's number, the called terminal's number, and the current timestamp.
[0081] See Figure 6 , Figure 6 This is the third schematic block diagram of a token acquisition device based on a dual-token index provided in this application embodiment. Corresponding to the above-described token acquisition method based on a dual-token index, this application also provides a token acquisition device based on a dual-token index. This token acquisition device based on a dual-token index includes a unit for executing the above-described token acquisition method based on a dual-token index, and can be configured in terminals such as desktop computers, tablet computers, and laptops. Specifically, the method is applied to a token message transmission server, and the token acquisition device based on a dual-token index includes: The third receiving unit 601 is used to receive a token request message from the called terminal. The token request message includes a first token index and a second token index. The token request message is used to obtain the identity token of the calling terminal. Query unit 602 is used to query the identity token of the calling terminal based on the target token index, wherein the target token index is the first token index or the second token index; The return unit 603 is used to return the identity token of the calling terminal to the called terminal if the identity token of the calling terminal is found.
[0082] like Figure 7 As shown, this application provides a computer device including a processor 71, a communication interface 72, a memory 73, and a communication bus 74. The processor 71, the communication interface 72, and the memory 73 communicate with each other through the communication bus 74. The memory 73 is used to store computer programs. In one embodiment of this application, when the processor 71 executes the program stored in the memory 73, it implements the control method for token acquisition based on dual-token index provided in any of the foregoing method embodiments.
[0083] It will be understood by those skilled in the art that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program may be stored in a storage medium, which is a computer-readable storage medium. The computer program is executed by at least one processor in the computer system to implement the process steps of the embodiments of the above methods.
[0084] Therefore, embodiments of this application also provide a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the token acquisition method based on a dual-token index as provided in any of the foregoing method embodiments.
[0085] The storage medium is a physical, non-transient storage medium, such as a USB flash drive, external hard drive, read-only memory (ROM), magnetic disk, or optical disk, or any other physical storage medium capable of storing program code. The computer-readable storage medium can be non-volatile or volatile.
[0086] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this application.
[0087] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For example, the division of each unit is merely a logical functional division, and there may be other division methods in actual implementation. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed.
[0088] The steps in the methods of this application embodiment can be adjusted, merged, or deleted according to actual needs. The units in the apparatus of this application embodiment can be merged, divided, or deleted according to actual needs. Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0089] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, a terminal, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application.
[0090] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0091] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Since these modifications and variations fall within the scope of the claims and their equivalents, this application also intends to include these modifications and variations.
[0092] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A token acquisition method based on dual-token indexing, characterized in that, The method is applied to the called terminal, and the method includes: Receive call requests from the calling terminal; Based on the first moment, generate the first token index according to the preset token index generation rules; Based on the second moment, a second token index is generated according to the preset token index generation rule, wherein the second moment is before the first moment, and the time difference between the first moment and the second moment is determined by the preset token index generation rule; A token request message is sent to a token message delivery server. The token request message includes a first token index and a second token index. The token request message is used to obtain the identity token of the calling terminal, and the identity token matches the call request. Receive the identity token returned by the token message transmission server.
2. The method according to claim 1, characterized in that, Sending a token request message to the token message delivery server includes: The token request message is sent to the token message delivery server based on the UDP protocol. The receipt of the identity token returned by the token message transmission server includes: Based on the UDP protocol, the identity token returned by the token message transmission server is received.
3. The method of claim 2, wherein, The method further includes: If the called terminal does not receive the identity token returned by the token message transmission server, it sends the token request message to the token message transmission server according to the preset retransmission mechanism and based on the UDP protocol.
4. A method for token acquisition based on double token index, characterized in that, The method is applied to a calling terminal, and the method includes: Initiate a call request to the called terminal; Generate the calling terminal's identity token based on the call request; Generate a token index according to the preset token index generation rules; The identity token and the token index are sent to the token message transmission server so that the called terminal can obtain the identity token from the token message transmission server.
5. The method according to claim 4, characterized in that, Sending the identity token and the token index to the token message transmission server so that the called terminal can obtain the identity token from the token message transmission server includes: Based on the UDP protocol, the identity token and the token index are sent to the token message transmission server so that the called terminal can obtain the identity token from the token message transmission server.
6. The method of claim 4, wherein, The call request includes the number of the called terminal, and the step of generating the identity token of the calling terminal based on the call request includes: Obtain the number of the calling terminal and its current timestamp; The calling terminal's identity token is generated based on the host terminal's number, the called terminal's number, and the current timestamp.
7. A token acquisition method based on a dual-token index, characterized in that, The method is applied to a token message sending server, and the method includes: Receive a token request message from the called terminal, the token request message including a first token index and a second token index, the token request message being used to obtain the identity token of the calling terminal; The identity token of the calling terminal is queried based on the target token index, wherein the target token index is either the first token index or the second token index; If the identity token of the calling terminal is found, the identity token of the calling terminal is returned to the called terminal.
8. A token acquisition device based on a dual-token index, characterized in that, The device is applied to the called terminal, and the device includes: The first receiving unit is used to receive the call request from the calling terminal; The first generation unit is used to generate a first token index based on a first moment and according to a preset token index generation rule; The second generation unit is used to generate a second token index based on a second time point according to the preset token index generation rule, wherein the second time point is before the first time point, and the time difference between the first time point and the second time point is determined by the preset token index generation rule; A sending unit is configured to send a token request message to a token message delivery server. The token request message includes a first token index and a second token index. The token request message is used to obtain the identity token of the calling terminal, and the identity token matches the call request. The second receiving unit is used to receive the identity token returned by the token message transmission server.
9. A computer device, comprising: The computer device includes a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The storage medium stores a computer program that, when executed by a processor, can implement the method as described in any one of claims 1 to 7.